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
1=== modified file 'make-chroot.sh'
2--- make-chroot.sh 2016-03-22 00:49:24 +0000
3+++ make-chroot.sh 2018-03-29 02:34:15 +0000
4@@ -128,7 +128,7 @@
5 --nomangle) pkgmangle=""; shift;;
6 --debian) debian=yes; shift;; # building a debian chroot
7 --xdebian) debian=yes; xdebian=yes; shift;; # cross-built debian
8- --ubuntu-porter) dchroot=yes; home=yes; proposed=yes; rapt=yes; shift;;
9+ --ubuntu-porter) home=yes; proposed=yes; rapt=yes; shift;;
10 --user) buildduser=$2; shift; shift;;
11 --noarchuser) noarchuser=yes; shift;;
12 --group) builddgroup=$2; shift; shift;;
13@@ -257,12 +257,15 @@
14
15 # figure out whether or not we should be using --ports
16 case "$distro:$arch" in
17+ *:arm64) ports=-ports;;
18 *:armel) ports=-ports;;
19 *:armhf) ports=-ports;;
20 *:hppa) ports=-ports;;
21 *:ia64) ports=-ports;;
22 *:lpia) ports=-ports;;
23+ *:ppc64el) ports=-ports;;
24 dapper:sparc) ;;
25+ *:s390x) ports=-ports;;
26 *:sparc) ports=-ports;;
27 warty:powerpc) ;;
28 hoary:powerpc) ;;
29@@ -419,24 +422,26 @@
30 [l-o]*) catsuite=lucid-cat;;
31 [p-r]*) catsuite=precise-cat;;
32 saucy) catsuite=saucy-cat;;
33- [t-v]*) catsuite=trusty-cat;;
34- *) catsuite=trusty-cat;;
35+ [t-w]*) catsuite=trusty-cat;;
36+ [x-z]*) catsuite=xenial-cat;;
37+ *) catsuite=;; # -cat is not signed, which apt now declines to deal with
38 esac
39- if test "$arch" != "lpia"; then
40- echo deb http://archive.admin.canonical.com/ubuntu $catsuite main
41- else
42- # lpia lacks *-cat, so abuse i386... although it means unauthenticated pacakges
43- echo deb http://archive.admin.canonical.com/ubuntu/ dists/$catsuite/main/binary-i386/
44- fi >&6
45- if test -n "$cat"; then
46- echo deb-src http://archive.admin.canonical.com/ubuntu $catsuite main
47+ if test -n "$catsuite"; then
48+ if test "$arch" != "lpia"; then
49+ echo deb http://archive.admin.canonical.com/ubuntu $catsuite main
50+ else
51+ # lpia lacks *-cat, so abuse i386... although it means unauthenticated pacakges
52+ echo deb http://archive.admin.canonical.com/ubuntu/ dists/$catsuite/main/binary-i386/
53+ fi >&6
54+ if test -n "$cat"; then
55+ echo deb-src http://archive.admin.canonical.com/ubuntu $catsuite main
56+ fi
57+ cat <<- EOF > $chrootdir/etc/apt/preferences
58+ Package: *
59+ Pin: release a=$catsuite
60+ Pin-Priority: 50
61+ EOF
62 fi
63- cat <<- EOF > $chrootdir/etc/apt/preferences
64- Package: *
65- Pin: release a=$catsuite
66- Pin-Priority: 50
67- EOF
68-
69 if [ -n "$home" ]; then
70 addmount /home $chrootdir/home none bind 0 0
71 fi
72@@ -634,8 +639,12 @@
73 for pkg in $builddep; do
74 echo "apt-get -y build-dep $pkg || true" >&5 # do not care if these install
75 done
76-if test -n "$rapt"; then
77+if test -n "$rapt" -a -n "$catsuite"; then
78 echo "apt-get -y -oAPT::Get::AllowUnauthenticated=true install sudo rapt libnss-db" >&5 # insist on success
79+else
80+ echo "apt-get -y install sudo libnss-db software-properties-common" >&5 # insist on success
81+ echo "add-apt-repository -y -u ppa:canonical-sysadmins/rapt" >&5 # insist on success
82+ echo "apt-get -y install rapt" >&5 # insist on success
83 fi
84
85 if test -z "$buildd"; then

Subscribers

People subscribed via source and target branches