[r-backports] / backport_r-base.sh Repository:
ViewVC logotype

Diff of /backport_r-base.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 60, Wed Sep 2 04:57:22 2009 UTC revision 62, Thu Nov 5 04:55:33 2009 UTC
# Line 3  Line 3 
3  # Script to automate backporting r-base for CRAN  # Script to automate backporting r-base for CRAN
4    
5  # Author: Johannes Ranke <jranke@uni-bremen.de>  # Author: Johannes Ranke <jranke@uni-bremen.de>
6    
7  # Developed in parallel with Vincent Goulet <vincent.goulet@act.ulaval.ca>  # Developed in parallel with Vincent Goulet <vincent.goulet@act.ulaval.ca>
8    # On Debian I used to run this script as root. On Ubuntu I now run it with
9    # sudo -E sh backport_r-base.sh
10    
11  # Preconditions: - shell variables DIST and ARCH  # Preconditions: - shell variables DIST and ARCH
12  #                - sid sources in /etc/apt/sources/list  #                - sid sources in /etc/apt/sources/list
13    #                - cdbs installed (and maybe more)
14    
15  export DEBEMAIL="jranke@uni-bremen.de"  export DEBEMAIL="jranke@uni-bremen.de"
16  export DEBFULLNAME="Johannes Ranke"  export DEBFULLNAME="Johannes Ranke"
# Line 18  Line 22 
22      rm -rf `ls -d r-base-*`      rm -rf `ls -d r-base-*`
23  fi  fi
24    
25  #apt-get update  apt-get update
26  apt-get source -t unstable r-base  apt-get source -t unstable r-base
27    
28  # Change any ~ in the name of the build directory for a - to avoid a  # Change any ~ in the name of the build directory for a - to avoid a
# Line 35  Line 39 
39  oldversion=`dpkg-parsechangelog | grep ^Version | cut -f2 -d " "`  oldversion=`dpkg-parsechangelog | grep ^Version | cut -f2 -d " "`
40  cranversion=$oldversion"~"$DIST"cran.0"  cranversion=$oldversion"~"$DIST"cran.0"
41    
42    echo Old version is $oldversion
43    echo CRAN version is $cranversion
44    
45  # Add new version to changelog  # Add new version to changelog
46  dch -v "${cranversion}" --force-distribution -D $DIST-cran -b "Backport from Debian unstable to Debian $DIST"  dch -v "${cranversion}" --force-distribution -D $DIST-cran -b "Backport from Debian unstable to Debian $DIST"
47    
48  # Reverts for lenny and etch:  # Reverts for lenny and etch:
49    
50          # 1. R 2.9.2 wants debhelper >= 7.2.3, which is not in lenny nor etch      # 1. Starting with Debian packages for R 2.9.2 there is a build dependency
51          #    This also means we have to reinclude debian/r-doc-{info,html}.{postinst,prerm},      # on debhelper >= 7.2.3, which is not in lenny nor etch This also means we
52          #    thanks Dirk for pointing this out.      # have to reinclude debian/r-doc-{info,html}.{postinst,prerm}, thanks Dirk
53        # for pointing this out.
54    
55          sed -i '/^Build-Depends/s/debhelper (>= 7.2.3)/debhelper/' debian/control          sed -i '/^Build-Depends/s/debhelper (>= 7.2.3)/debhelper/' debian/control
56          dch -a "debian/control: revert Build-Depends: to 'debhelper' since $DIST has a version < 7.2.3"          dch -a "debian/control: revert Build-Depends: to 'debhelper' since $DIST has a version < 7.2.3"
# Line 50  Line 58 
58          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'"          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'"
59          cp ../r-doc-scripts/r-doc-{info,html}.{postinst,prerm} debian          cp ../r-doc-scripts/r-doc-{info,html}.{postinst,prerm} debian
60    
61        # 2. Starting with Debian packages for R 2.9.2-2 there is an install
62        # dependency on 'dpkg (>= 1.15.4) | install-info'. Neither package is in
63        # Debian releases etch nor lenny. This also requires to reinclude
64        # debian/r-doc-{info,html}.{postinst,prerm}, just like for the fix above.
65    
66        sed -i '/^Depends/s/dpkg (>= 1.15.4) | install-info/dpkg | install-info/' debian/control
67        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"
68    
69  # Reverts for etch only:  # Reverts for etch only:
70  if [ $DIST = "etch" ]  if [ $DIST = "etch" ]
71  then  then
# Line 119  Line 135 
135  fi  fi
136    
137  pbuilder update  pbuilder update
138  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
139  if [ $? -ne 0 ]; then  if [ $? -ne 0 ]; then
140      exit      exit
141  fi  fi

Legend:
Removed from v.60  
changed lines
  Added in v.62

Johannes Ranke
ViewVC Help
Powered by ViewVC 1.0.1