diff options
author | ranke <ranke@f247ebf9-aa24-0410-a698-f940e971ad2b> | 2009-07-06 21:45:30 +0000 |
---|---|---|
committer | ranke <ranke@f247ebf9-aa24-0410-a698-f940e971ad2b> | 2009-07-06 21:45:30 +0000 |
commit | 21f32aff61eca7e79b76f9cbccae28efa66d369e (patch) | |
tree | 91e653116787054a34b70f07a70fbffdfcedfbc7 /backport_r-base.sh | |
parent | 57dee9ba2a595485609c96e4f4c0093614c648a8 (diff) |
Rewrite of backporting scripts for exclusive use of pdebuild,
getting rid of schroot
git-svn-id: svn+ssh://stiller/home/schatz/reps/r-backports@56 f247ebf9-aa24-0410-a698-f940e971ad2b
Diffstat (limited to 'backport_r-base.sh')
-rw-r--r-- | backport_r-base.sh | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/backport_r-base.sh b/backport_r-base.sh new file mode 100644 index 0000000..7c93f4c --- /dev/null +++ b/backport_r-base.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +# 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> + +# Preconditions: - shell variables DIST and ARCH +# - sid sources in /etc/apt/sources/list + +export DEBEMAIL="jranke@uni-bremen.de" +export DEBFULLNAME="Johannes Ranke" +echo Distribution is $DIST +echo Architecture is $ARCH + +if [ -d r-base-* ] +then + rm -rf `ls -d r-base-*` +fi + +apt-get update +apt-get source -t unstable r-base + +# Change any ~ in the name of the build directory for a - to avoid a +# bug in texi2dvi. Thanks Vincent +if [ -d r-base-*~* ] +then + dir=`ls -d r-base-*~*` + mv $dir `echo $dir | sed y/~/-/` +fi + +cd r-base-* + +# Old version +oldversion=`dpkg-parsechangelog | grep ^Version | cut -f2 -d " "` +cranversion=$oldversion"~"$DIST"cran.0" + +# Add new version to changelog +dch -v "${cranversion}" -D $DIST-cran -b "Backport from Debian unstable to Debian $DIST" + +# Reverts for lenny: +# None at this time + +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 +if [ $? -ne 0 ]; then + exit +fi + +cd .. + +# Create diff to Debian unstable +interdiff -z r-base_*.diff.gz /home/ranke/svn/website/www/ranke/r-cran/$DIST-cran/r-base_*cran*.diff.gz > /home/ranke/svn/website/www/ranke/r-cran/$DIST-cran/interdiff_to_debian_sid |