summaryrefslogtreecommitdiff
path: root/backport
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2016-03-16 22:57:26 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2016-03-16 22:57:26 +0100
commitf190500c5fa197e006ea40860801939277ef7dcd (patch)
tree7f722981e44366e37b992e4721a4fff14fbbeba5 /backport
parent70aefb18628eab236cc5dbaa6e2537236127ca94 (diff)
Changes done for todays backport of R 3.2.4
Diffstat (limited to 'backport')
-rwxr-xr-xbackport81
1 files changed, 49 insertions, 32 deletions
diff --git a/backport b/backport
index caea334..26f1435 100755
--- a/backport
+++ b/backport
@@ -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 ../..

Contact - Imprint