Merge lp:~pjdc/launchpad-buildd/chroot-scripts into lp:~canonical-sysadmins/launchpad-buildd/chroot-scripts

Proposed by Paul Collins
Status: Merged
Merged at revision: 58
Proposed branch: lp:~pjdc/launchpad-buildd/chroot-scripts
Merge into: lp:~canonical-sysadmins/launchpad-buildd/chroot-scripts
Diff against target: 85 lines (+27/-18)
1 file modified
make-chroot.sh (+27/-18)
To merge this branch: bzr merge lp:~pjdc/launchpad-buildd/chroot-scripts
Reviewer Review Type Date Requested Status
The Canonical Sysadmins Pending
Review via email: mp+342373@code.launchpad.net

Description of the change

various fixes needed to create bionic porter chroots

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'make-chroot.sh'
--- make-chroot.sh 2016-03-22 00:49:24 +0000
+++ make-chroot.sh 2018-03-29 02:34:15 +0000
@@ -128,7 +128,7 @@
128 --nomangle) pkgmangle=""; shift;;128 --nomangle) pkgmangle=""; shift;;
129 --debian) debian=yes; shift;; # building a debian chroot129 --debian) debian=yes; shift;; # building a debian chroot
130 --xdebian) debian=yes; xdebian=yes; shift;; # cross-built debian130 --xdebian) debian=yes; xdebian=yes; shift;; # cross-built debian
131 --ubuntu-porter) dchroot=yes; home=yes; proposed=yes; rapt=yes; shift;;131 --ubuntu-porter) home=yes; proposed=yes; rapt=yes; shift;;
132 --user) buildduser=$2; shift; shift;;132 --user) buildduser=$2; shift; shift;;
133 --noarchuser) noarchuser=yes; shift;;133 --noarchuser) noarchuser=yes; shift;;
134 --group) builddgroup=$2; shift; shift;;134 --group) builddgroup=$2; shift; shift;;
@@ -257,12 +257,15 @@
257257
258# figure out whether or not we should be using --ports258# figure out whether or not we should be using --ports
259case "$distro:$arch" in259case "$distro:$arch" in
260 *:arm64) ports=-ports;;
260 *:armel) ports=-ports;;261 *:armel) ports=-ports;;
261 *:armhf) ports=-ports;;262 *:armhf) ports=-ports;;
262 *:hppa) ports=-ports;;263 *:hppa) ports=-ports;;
263 *:ia64) ports=-ports;;264 *:ia64) ports=-ports;;
264 *:lpia) ports=-ports;;265 *:lpia) ports=-ports;;
266 *:ppc64el) ports=-ports;;
265 dapper:sparc) ;;267 dapper:sparc) ;;
268 *:s390x) ports=-ports;;
266 *:sparc) ports=-ports;;269 *:sparc) ports=-ports;;
267 warty:powerpc) ;;270 warty:powerpc) ;;
268 hoary:powerpc) ;;271 hoary:powerpc) ;;
@@ -419,24 +422,26 @@
419 [l-o]*) catsuite=lucid-cat;;422 [l-o]*) catsuite=lucid-cat;;
420 [p-r]*) catsuite=precise-cat;;423 [p-r]*) catsuite=precise-cat;;
421 saucy) catsuite=saucy-cat;;424 saucy) catsuite=saucy-cat;;
422 [t-v]*) catsuite=trusty-cat;;425 [t-w]*) catsuite=trusty-cat;;
423 *) catsuite=trusty-cat;;426 [x-z]*) catsuite=xenial-cat;;
427 *) catsuite=;; # -cat is not signed, which apt now declines to deal with
424 esac428 esac
425 if test "$arch" != "lpia"; then429 if test -n "$catsuite"; then
426 echo deb http://archive.admin.canonical.com/ubuntu $catsuite main430 if test "$arch" != "lpia"; then
427 else431 echo deb http://archive.admin.canonical.com/ubuntu $catsuite main
428 # lpia lacks *-cat, so abuse i386... although it means unauthenticated pacakges432 else
429 echo deb http://archive.admin.canonical.com/ubuntu/ dists/$catsuite/main/binary-i386/433 # lpia lacks *-cat, so abuse i386... although it means unauthenticated pacakges
430 fi >&6434 echo deb http://archive.admin.canonical.com/ubuntu/ dists/$catsuite/main/binary-i386/
431 if test -n "$cat"; then435 fi >&6
432 echo deb-src http://archive.admin.canonical.com/ubuntu $catsuite main436 if test -n "$cat"; then
437 echo deb-src http://archive.admin.canonical.com/ubuntu $catsuite main
438 fi
439 cat <<- EOF > $chrootdir/etc/apt/preferences
440 Package: *
441 Pin: release a=$catsuite
442 Pin-Priority: 50
443 EOF
433 fi444 fi
434 cat <<- EOF > $chrootdir/etc/apt/preferences
435 Package: *
436 Pin: release a=$catsuite
437 Pin-Priority: 50
438 EOF
439
440 if [ -n "$home" ]; then445 if [ -n "$home" ]; then
441 addmount /home $chrootdir/home none bind 0 0446 addmount /home $chrootdir/home none bind 0 0
442 fi447 fi
@@ -634,8 +639,12 @@
634for pkg in $builddep; do639for pkg in $builddep; do
635 echo "apt-get -y build-dep $pkg || true" >&5 # do not care if these install640 echo "apt-get -y build-dep $pkg || true" >&5 # do not care if these install
636done641done
637if test -n "$rapt"; then642if test -n "$rapt" -a -n "$catsuite"; then
638 echo "apt-get -y -oAPT::Get::AllowUnauthenticated=true install sudo rapt libnss-db" >&5 # insist on success643 echo "apt-get -y -oAPT::Get::AllowUnauthenticated=true install sudo rapt libnss-db" >&5 # insist on success
644else
645 echo "apt-get -y install sudo libnss-db software-properties-common" >&5 # insist on success
646 echo "add-apt-repository -y -u ppa:canonical-sysadmins/rapt" >&5 # insist on success
647 echo "apt-get -y install rapt" >&5 # insist on success
639fi648fi
640649
641if test -z "$buildd"; then650if test -z "$buildd"; then

Subscribers

People subscribed via source and target branches