diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2016-03-16 22:57:26 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2016-03-16 22:57:26 +0100 |
commit | f190500c5fa197e006ea40860801939277ef7dcd (patch) | |
tree | 7f722981e44366e37b992e4721a4fff14fbbeba5 | |
parent | 70aefb18628eab236cc5dbaa6e2537236127ca94 (diff) |
Changes done for todays backport of R 3.2.4
-rwxr-xr-x | backport | 81 | ||||
-rw-r--r-- | backport_others | 6 |
2 files changed, 52 insertions, 35 deletions
@@ -6,10 +6,11 @@ ARCH=i386 export ARCH # R version against which the software is compiled -Rversion=3.2.3 +Rversion=3.2.4 reposversion="cran3" +iteration=0 -# Where the buildresults should be stored +# Where the buildresults should be stored and where to look for current backports rcrandir=/home/jranke/svn/website/www/ranke/r-cran # Author: Johannes Ranke <jranke@uni-bremen.de> @@ -23,7 +24,7 @@ rcrandir=/home/jranke/svn/website/www/ranke/r-cran usage() { -echo "Usage: ./backport [options] sourcepackage squeeze|wheezy|jessie" +echo "Usage: ./backport [options] sourcepackage wheezy|jessie" echo "Options:" echo " -k, --keep Keep copied source package and directory used for package building" echo " -s, --skip Skip apt-get update/upgrade and pbuilder update" @@ -59,7 +60,7 @@ pkg=$1 DIST=$2 # Validate distribution argument -if [ $DIST != "squeeze" ] && [ $DIST != "wheezy" ] && [ $DIST != "jessie" ]; then usage; exit 1; fi +if [ $DIST != "wheezy" ] && [ $DIST != "jessie" ]; then usage; exit 1; fi export DIST # Set required r-base-dev version for packages build-depending on R @@ -87,41 +88,57 @@ cp -r $pkg-* $DIST # Go to package building directory cd $DIST/$pkg-* -# Determine the version of the Debian package -oldversion=`dpkg-parsechangelog | grep ^Version | cut -f2 -d " "` -cranversion=$oldversion"~"$DIST"cran.0" +# Determine the version of the upstream Debian package +upstreamversion=`dpkg-parsechangelog | grep ^Version | cut -f2 -d " "` -echo Old version is $oldversion -echo CRAN version is $cranversion +# Define the version to be used for the backport +cranversion=$upstreamversion"~"$DIST"cran.$iteration" -# Add new version to changelog -dch -v "${cranversion}" --force-distribution -D $DIST-cran -b "Backport from Debian unstable to Debian $DIST" +# Only do a backport if not already available +# This avoids recompiling packages resulting in different sizes which +# would make an update of the archive index inside the loop in backport_others +# necessary -# Adapt build dependency on r-base-dev if present -if grep -q "^Build-Depends.*r-base-dev" debian/control -then - ssed -i -R "/^Build-Depends/s/r-base-dev \(>= .*?\)/$rbasedev/" debian/control - ssed -i -R "/^Build-Depends-Indep/s/r-base-dev \(>= .*?\)/$rbasedev/" debian/control +new_dsc=$rcrandir/$DIST-cran3/${pkg}_${cranversion}.dsc - dch -a "debian/control: Adapt build dependency on r-base-dev to current backport" -fi +if [ -e $new_dsc ]; then -# Check for a script doing modifications required for backporting -script=../\_reverts\_$pkg\.sh + echo backport.sh: $new_dsc already present -if [ -f $script ]; then source $script; fi +else -if [ "$skip" = false ] -then - sudo -E pbuilder update -fi -sudo -E pdebuild --debbuildopts '-sa' \ - --buildresult $rcrandir/$DIST-cran3/ \ - -- --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 + echo backport.sh: Upstream version is $upstreamversion + echo backport.sh: New 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" + + # Adapt build dependency on r-base-dev if present + if grep -q "^Build-Depends.*r-base-dev" debian/control + then + ssed -i -R "/^Build-Depends/s/r-base-dev \(>= .*?\)/$rbasedev/" debian/control + ssed -i -R "/^Build-Depends-Indep/s/r-base-dev \(>= .*?\)/$rbasedev/" debian/control + + dch -a "debian/control: Adapt build dependency on r-base-dev to current backport" + fi + + # Check for a script doing modifications required for backporting + script=../\_reverts\_$pkg\.sh + + if [ -f $script ]; then source $script; fi + + if [ "$skip" = false ] + then + sudo -E pbuilder update + fi + sudo -E pdebuild --debbuildopts '-sa' \ + --buildresult $rcrandir/$DIST-cran3/ \ + -- --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 fi cd ../.. diff --git a/backport_others b/backport_others index a923587..03b91ca 100644 --- a/backport_others +++ b/backport_others @@ -7,7 +7,7 @@ usage() { -echo "Usage: ./backport_others [options] squeeze|wheezy|jessie" +echo "Usage: ./backport_others [options] wheezy|jessie" echo "Options:" echo " -s Skip apt-get update/upgrade and pbuilder update" } @@ -44,13 +44,13 @@ then fi # Validate distribution argument -if [ $DIST != "squeeze" ] && [ $DIST != "wheezy" ] && [ $DIST != "jessie" ]; then usage; exit 1; fi +if [ $DIST != "wheezy" ] && [ $DIST != "jessie" ]; then usage; exit 1; fi export DIST # When doing a new repository, lattice, r-cran-mass and survival have to be # built first, then nlme and rmatrix, then the rest -# Packages to backport to squeeze/wheezy/jessie (without rpy2): +# Packages to backport to wheezy/jessie (without rpy2): for i in lattice nlme rmatrix mgcv boot cluster codetools foreign kernsmooth r-cran-class r-cran-coda r-cran-spatial r-cran-nnet r-cran-mass rodbc rpart survival r-cran-littler rpy rkward r-cran-rjags; do ./backport -s $i $DIST |