diff options
Diffstat (limited to 'backport_r-base.sh')
-rw-r--r-- | backport_r-base.sh | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/backport_r-base.sh b/backport_r-base.sh index 760a601..937ced0 100644 --- a/backport_r-base.sh +++ b/backport_r-base.sh @@ -3,10 +3,14 @@ # Script to automate backporting r-base for CRAN # Author: Johannes Ranke <jranke@uni-bremen.de> + # Developed in parallel with Vincent Goulet <vincent.goulet@act.ulaval.ca> +# On Debian I used to run this script as root. On Ubuntu I now run it with +# sudo -E sh backport_r-base.sh # Preconditions: - shell variables DIST and ARCH # - sid sources in /etc/apt/sources/list +# - cdbs installed (and maybe more) export DEBEMAIL="jranke@uni-bremen.de" export DEBFULLNAME="Johannes Ranke" @@ -35,20 +39,32 @@ cd r-base-* oldversion=`dpkg-parsechangelog | grep ^Version | cut -f2 -d " "` cranversion=$oldversion"~"$DIST"cran.0" +echo Old version is $oldversion +echo CRAN version is $cranversion + # Add new version to changelog dch -v "${cranversion}" --force-distribution -D $DIST-cran -b "Backport from Debian unstable to Debian $DIST" # Reverts for lenny and etch: - # 1. R 2.9.2 wants debhelper >= 7.2.3, which is not in lenny nor etch - # This also means we have to reinclude debian/r-doc-{info,html}.{postinst,prerm}, - # thanks Dirk for pointing this out. + # 1. Starting with Debian packages for R 2.9.2 there is a build dependency + # on debhelper >= 7.2.3, which is not in lenny nor etch This also means we + # have to reinclude debian/r-doc-{info,html}.{postinst,prerm}, thanks Dirk + # for pointing this out. sed -i '/^Build-Depends/s/debhelper (>= 7.2.3)/debhelper/' debian/control dch -a "debian/control: revert Build-Depends: to 'debhelper' since $DIST has a version < 7.2.3" sed -i 's/dh_prep/dh_clean/g' debian/rules - dch -a "debian/rules: revert dh_prep calls to dh_clean calls since the latter is not present in this release's version of 'debhelper'" - cp ../r-doc-scripts/r-doc-{info,html}.{postinst,prerm} debian + dch -a "debian/rules: revert dh_prep calls to dh_clean calls since the latter is not present in this release's version of 'debhelper'" + cp ../r-doc-scripts/r-doc-{info,html}.{postinst,prerm} debian + + # 2. Starting with Debian packages for R 2.9.2-2 there is an install + # dependency on 'dpkg (>= 1.15.4) | install-info'. Neither package is in + # Debian releases etch nor lenny. This also requires to reinclude + # debian/r-doc-{info,html}.{postinst,prerm}, just like for the fix above. + + sed -i '/^Depends/s/dpkg (>= 1.15.4) | install-info/dpkg | install-info/' debian/control + dch -a "debian/control: revert Depends: to 'dpkg | install-info' for r-doc-info since ${DISTRIB_DESCRIPTION} has a version of dpkg < 1.15.4 and no separate package install-info" # Reverts for etch only: if [ $DIST = "etch" ] @@ -119,7 +135,7 @@ then fi pbuilder update -pdebuild --debbuildopts '-sa' --buildresult /home/ranke/svn/website/www/ranke/r-cran/$DIST-cran/ -- --distribution $DIST --basetgz /var/cache/pbuilder/$DIST-$ARCH-base.tgz --aptcache /exthd/pbuilder/$DIST-$ARCH/aptcache --buildplace /exthd/pbuilder/$DIST-$ARCH/build +pdebuild --debbuildopts '-sa' --buildresult /home/ranke/svn/website/www/ranke/r-cran/$DIST-cran/ -- --distribution $DIST --basetgz /var/cache/pbuilder/$DIST-$ARCH-base.tgz --aptcache /var/cache/pbuilder/$DIST-$ARCH/aptcache --buildplace /var/cache/pbuilder/$DIST-$ARCH/build if [ $? -ne 0 ]; then exit fi |