From 5f54688b1c6d85765a6190bd8463d9c2b5593044 Mon Sep 17 00:00:00 2001 From: ranke Date: Wed, 4 Nov 2009 18:13:29 +0000 Subject: Script update for backporting to lenny git-svn-id: svn+ssh://stiller/home/schatz/reps/r-backports@61 f247ebf9-aa24-0410-a698-f940e971ad2b --- README | 10 +++++----- backport_others.sh | 21 ++++++++++++--------- backport_r-base.sh | 28 ++++++++++++++++++++++------ build_others.sh | 12 ++++++++---- build_r-base.sh | 9 +++++++-- clean.sh | 2 +- 6 files changed, 55 insertions(+), 27 deletions(-) diff --git a/README b/README index 8f9e82e..4055a27 100644 --- a/README +++ b/README @@ -1,9 +1,9 @@ This directory contains my scripts to build backports of R software from Debian sid to older Debian distributions. -Currently (2009-07-06) I am using the following setup: +Currently (2009-11-02) I am using the following setup: -/root/.pbuilderrc contains: +~/.pbuilderrc contains: NAME="$DIST-$ARCH" APTCACHEHARDLINK=no @@ -16,9 +16,9 @@ Currently (2009-07-06) I am using the following setup: OTHERMIRROR="deb http://security.debian.org $DIST/updates main|deb http://localhost/r-cran $DIST-cran/" COMPONENTS="main" -This means on my external USB drive mounted under /exthd, I have the -appropriate aptcache and buildresult directories setup under /exthd/pbuilder. I -have four pbuilder images used for package creation under /var/cache/pbuilder: +This means I have the appropriate aptcache and buildresult directories set up +under /var/cache/pbuilder. I have four pbuilder images used for package +creation under /var/cache/pbuilder: /var/cache/pbuilder/etch-amd64-base.tgz /var/cache/pbuilder/lenny-amd64-base.tgz /var/cache/pbuilder/etch-i386-base.tgz /var/cache/pbuilder/lenny-i386-base.tgz diff --git a/backport_others.sh b/backport_others.sh index 2eb82d4..ba2a1a1 100644 --- a/backport_others.sh +++ b/backport_others.sh @@ -1,35 +1,38 @@ # Author: Johannes Ranke +# On Debian I used to run this script as root. On Ubuntu I now run it with +# sudo -E sh backport_others.sh + # Preconditions: - shell variables DIST and ARCH # - sid sources in /etc/apt/sources/list +# - ssed and cdbs installed (and maybe more) # - Edit the sed scripts below to adapt the build dependencies # to the appropriate version of r-base-dev # - Set the R version # R version against which the software is compiled -Rversion=2.9.2 +Rversion=2.10.0 echo Distribution is $DIST echo Architecture is $ARCH text="Recompiled on $DIST for CRAN" -#apt-get update -#pbuilder update +apt-get update +pbuilder update -#for i in survival; do -for i in rpart survival vr littler; do -#for i in boot cluster codetools foreign kernsmooth lattice mgcv nlme rmatrix rodbc rpart survival vr littler; do +#for i in nlme; do +#for i in boot cluster codetools foreign kernsmooth lattice mgcv nlme r-cran-class r-cran-spatial r-cran-nnet r-cran-mass rmatrix rodbc rpart survival littler; do apt-get source -t unstable $i cd $i-* version=`dpkg-parsechangelog | grep ^Version | cut -f2 -d " "`~$DIST"cran".$Rversion dch -b -v $version --force-distribution -D $DIST-cran $text - sed -i '/^Build-Depends/s/r-base-dev (>= 2\..\..)/r-base-dev (>= 2.9.2-1~etchcran.0)/' debian/control - sed -i '/^Build-Depends-Indep/s/r-base-dev (>= 2\..\..)/r-base-dev (>= 2.9.2-1~etchcran.0)/' debian/control + ssed -i -R '/^Build-Depends/s/r-base-dev \(>= 2\..*?\)/r-base-dev (>= 2.10.0-1~lennycran.0)/' debian/control + ssed -i -R '/^Build-Depends-Indep/s/r-base-dev \(>= 2\..*?\)/r-base-dev (>= 2.10.0-1~lennycran.0)/' debian/control dch -a "debian/control: adapt build dependencies on r-base-dev to current backport" - 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 cd .. done 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 + # Developed in parallel with Vincent Goulet +# 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 diff --git a/build_others.sh b/build_others.sh index d7f8f4a..21da734 100644 --- a/build_others.sh +++ b/build_others.sh @@ -1,19 +1,23 @@ # Author: Johannes Ranke +# On Debian I used to run this script as root. On Ubuntu I now run it with +# sudo -E sh build_others.sh + # Preconditions: - shell variables DIST and ARCH # - CRAN sources in /etc/apt/sources/list +# - cdbs installed (and maybe more) echo Distribution is $DIST echo Architecture is $ARCH -apt-get update +#apt-get update pbuilder update -#for i in survival; do -for i in cluster foreign kernsmooth lattice mgcv nlme rmatrix rodbc rpart survival vr littler; do +#for i in nlme; do +#for i in cluster foreign kernsmooth lattice mgcv nlme r-cran-class r-cran-spatial r-cran-nnet r-cran-massrmatrix rodbc rpart survival littler; do apt-get source -t $DIST-cran $i cd $i-* - pdebuild --debbuildopts '-b' --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 '-b' --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 cd .. done diff --git a/build_r-base.sh b/build_r-base.sh index f9e2fe7..c84af4c 100644 --- a/build_r-base.sh +++ b/build_r-base.sh @@ -4,8 +4,12 @@ # Author: Johannes Ranke +# On Debian I used to run this script as root. On Ubuntu I now run it with +# sudo -E sh build_r-base.sh + # Preconditions: - shell variables DIST and ARCH # - CRAN sources in /etc/apt/sources/list +# - cdbs installed (and maybe more) echo Distribution is $DIST echo Architecture is $ARCH @@ -15,8 +19,9 @@ apt-get source -t $DIST-cran r-base cd r-base-* -#pbuilder update -pdebuild --debbuildopts '-b' --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 +pbuilder update + +pdebuild --debbuildopts '-b' --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 diff --git a/clean.sh b/clean.sh index dff61a7..6cb2035 100644 --- a/clean.sh +++ b/clean.sh @@ -1,5 +1,5 @@ # Author: Johannes Ranke -for i in r-base boot cluster codetools foreign kernsmooth lattice mgcv nlme rmatrix rodbc rpart survival vr littler; do +for i in r-base boot cluster codetools foreign kernsmooth lattice mgcv nlme r-cran-class r-cran-mass r-cran-nnet r-cran-spatial rmatrix rodbc rpart survival vr littler; do rm -rf $i* done -- cgit v1.2.1