From 7e750f644cbbc9ad35cbdc4f4909b52faede853d Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Sat, 25 Apr 2020 00:05:41 +0200 Subject: Changes for backports of R 4.0.0 to bullseye and buster --- README | 31 +++++++++++++++++++++++++++++-- backport | 18 +++++++++--------- backport_others | 8 ++++---- build | 2 +- build_others | 2 +- clean | 4 ++-- move_debs | 6 +++--- 7 files changed, 49 insertions(+), 22 deletions(-) diff --git a/README b/README index dcd0450..58e26af 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ This directory contains my scripts to build backports of R software from Debian -sid to older Debian distributions. +sid or even experimental to older Debian distributions. Currently I am using the following setup: @@ -27,9 +27,13 @@ creation under /var/cache/pbuilder, among others: With the pbuilderrc mentioned above, this can be created as a normal user with export ARCH=i386 - export DIST=buster + export DIST=bullseye sudo -E pbuilder create +We also need to create the build directory: + + sudo mkdir /var/cache/pbuilder/bullseye-i386/build + When using these scripts on Debian, I used to configure sudo to allow my normal user to use pbuilder, apt-get and the backporting scripts. Currently, I have set up my Debian installations using the Ubuntu like sudo configuration that @@ -37,3 +41,26 @@ I select during the installation. I am building other architectures on different machines (raspi: armxx) or in a local chroot (amd64). + +For creating a local chroot, I am using (e.g. for bullseye) + + cd /var/chroot + sudo mkdir bullseye-amd64 + sudo debootstrap bullseye bullseye-amd64 http://ftp.de.debian.org/debian/ + +Then I add a new entry in /etc/schroot/schroot.conf like + + [bullseye64] + description=Debian bullseye 64-bit + type=directory + profile=default + directory=/var/chroot/bullseye-amd64 + +and use sudo schroot -c bullseye64 to enter it. Within the chroot I install vim +and add the matching local r-cran repository to /etc/apt/sources.list like + + deb http://localhost/r-cran bullseye-cran40/ + deb-src http://localhost/r-cran bullseye-cran40/ + +In the chroot, build-essential and devscripts have to be installed + diff --git a/backport b/backport index d479968..acfde10 100755 --- a/backport +++ b/backport @@ -6,8 +6,8 @@ ARCH=i386 export ARCH # R version against which the software is compiled -iteration=0 -Rversion=3.6.1 +iteration=1 +Rversion=4.0.0 # Set required r-base-dev version for packages build-depending on R rbasedev="r-base-dev (>= $Rversion)" @@ -26,7 +26,7 @@ rcrandir=/home/jranke/git/uni/website/www/ranke/r-cran usage() { -echo "Usage: ./backport [options] sourcepackage stretch|buster" +echo "Usage: ./backport [options] sourcepackage stretch|buster|bullseye" 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" @@ -62,7 +62,7 @@ pkg=$1 DIST=$2 # Validate distribution argument -if [ $DIST != "stretch" ] && [ $DIST != "buster" ]; then usage; exit 1; fi +if [ $DIST != "stretch" ] && [ $DIST != "buster" ] && [ $DIST != "bullseye" ]; then usage; exit 1; fi export DIST # Remove previously extracted sources @@ -71,13 +71,13 @@ then sudo rm -rf `ls -d $pkg-*` fi -# Get current source (from unstable or buildd-unstable, depending on sources.list) +# Get current source from sid. If we want buildd-unstable, we need to change to -t buildd-unstable below if [ "$skip" = false ] then sudo apt-get update sudo apt-get upgrade fi -sudo apt-get source $pkg +sudo apt-get source -t sid $pkg # Copy sources to $DIST directory to enable parallel builds mkdir -p $DIST @@ -98,8 +98,8 @@ cranversion=$upstreamversion"~"$DIST"cran.$iteration" # would make an update of the archive index inside the loop in backport_others # necessary -new_dsc=$rcrandir/$DIST-cran35/${pkg}_${cranversion}.dsc -logfile=$rcrandir/$DIST-cran35/${pkg}_${cranversion}_${ARCH}.build +new_dsc=$rcrandir/$DIST-cran40/${pkg}_${cranversion}.dsc +logfile=$rcrandir/$DIST-cran40/${pkg}_${cranversion}_${ARCH}.build if [ -e $new_dsc ]; then @@ -136,7 +136,7 @@ else --aptcache /var/cache/pbuilder/$DIST-$ARCH/aptcache fi sudo -E pdebuild --debbuildopts '-sa' \ - --buildresult $rcrandir/$DIST-cran35/ \ + --buildresult $rcrandir/$DIST-cran40/ \ --logfile $logfile \ -- --override-config \ --distribution $DIST --basetgz /var/cache/pbuilder/$DIST-$ARCH-base.tgz \ diff --git a/backport_others b/backport_others index dab6139..dacac7a 100755 --- a/backport_others +++ b/backport_others @@ -11,7 +11,7 @@ export ARCH usage() { -echo "Usage: ./backport_others [options] stretch|buster" +echo "Usage: ./backport_others [options] stretch|buster|bullseye" echo "Options:" echo " -s Skip apt-get update/upgrade and pbuilder update" } @@ -51,7 +51,7 @@ then fi # Validate distribution argument -if [ $DIST != "stretch" ] && [ $DIST != "buster" ]; then usage; exit 1; fi +if [ $DIST != "stretch" ] && [ $DIST != "buster" ] && [ $DIST != "bullseye" ]; then usage; exit 1; fi export DIST # When doing a new repository, do lattice, r-cran-mass @@ -63,8 +63,8 @@ export DIST #for i in lattice r-cran-mass; do #for i in rmatrix; do #for i in survival nlme; do -#for i in rpart mgcv boot cluster codetools foreign kernsmooth r-cran-class r-cran-coda r-cran-spatial r-cran-nnet rodbc littler rpy2 rkward; do -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 littler rpy2 rkward; do +#for i in rpart mgcv boot cluster codetools foreign kernsmooth r-cran-class r-cran-coda r-cran-spatial r-cran-nnet littler rpy2 rkward; do +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 rpart survival littler rpy2 rkward; do ./backport -s $i $DIST diff --git a/build b/build index 1e84502..439eabb 100755 --- a/build +++ b/build @@ -18,7 +18,7 @@ command -v lsb_release >/dev/null 2>&1 || { DIST=`lsb_release -cs` # URL of the local CRAN repo for checking for existing builds -localcran="http://ryz/r-cran/$DIST-cran35/" +localcran="http://ryz/r-cran/$DIST-cran40/" skip=false while test -n "${1}"; do diff --git a/build_others b/build_others index 658bd6a..fdb5dc0 100755 --- a/build_others +++ b/build_others @@ -39,6 +39,6 @@ fi #for i in rmatrix nlme; do #for i in survival; do #for i in cluster foreign r-cran-class r-cran-spatial r-cran-nnet kernsmooth mgcv rodbc rpart littler rpy2 rkward; do -for i in lattice rmatrix nlme cluster foreign r-cran-class r-cran-spatial r-cran-nnet r-cran-mass kernsmooth mgcv rodbc rpart survival littler rpy2 rkward; do +for i in lattice rmatrix nlme cluster foreign r-cran-class r-cran-spatial r-cran-nnet r-cran-mass kernsmooth mgcv rpart survival littler rpy2 rkward; do ./build -s $i done diff --git a/clean b/clean index b23428c..a2d5acb 100755 --- a/clean +++ b/clean @@ -4,14 +4,14 @@ usage() { -echo "Usage: ./clean [stretch|buster]" +echo "Usage: ./clean [stretch|buster|bullseye]" } if [ $# -gt 1 ]; then usage; exit 1; fi if [ $# -eq 1 ] then DIST=$1 - if [ $DIST != "stretch" ] && [ $DIST != "buster" ]; then usage; exit 1; fi + if [ $DIST != "stretch" ] && [ $DIST != "buster" ] && [ $DIST != "bullseye" ]; then usage; exit 1; fi cd $DIST fi diff --git a/move_debs b/move_debs index ad91384..50e763a 100755 --- a/move_debs +++ b/move_debs @@ -4,7 +4,7 @@ usage() { -echo "Usage: ./move_debs stretch|buster" +echo "Usage: ./move_debs stretch|buster|bullseye" } # Positional argument @@ -12,7 +12,7 @@ if [ $# -lt 1 ]; then usage; exit 1; fi DIST=$1 # Validate distribution argument -if [ $DIST != "stretch" ] && [ $DIST != "buster" ]; then usage; exit 1; fi +if [ $DIST != "stretch" ] && [ $DIST != "buster" ] && [ $DIST != "bullseye" ]; then usage; exit 1; fi sudo chown jranke $DIST/*${DIST}cran*_amd64.{deb,build} -mv -v $DIST/*${DIST}cran*_amd64.{deb,build} /home/jranke/git/uni/website/www/ranke/r-cran/$DIST-cran35 +mv -v $DIST/*${DIST}cran*_amd64.{deb,build} /home/jranke/git/uni/website/www/ranke/r-cran/$DIST-cran40 -- cgit v1.2.1