Compare commits

...

29 Commits

Author SHA1 Message Date
Robert C Jennings
2048477b0d live-build/ubuntu-cpc/hooks/999-extras.binary: Exit on first failure.
(LP: #1687752)
2017-05-12 11:47:09 -07:00
Mathieu Trudel-Lapierre
b5bb3c3a6e releasing package livecd-rootfs version 2.408.11 2017-04-07 16:18:45 -04:00
Mathieu Trudel-Lapierre
5081c333bb Add apt-get update to ubuntu-cpc ppc64el builds so they use the new
sources.
2017-04-07 16:12:48 -04:00
Adam Conrad
2c9f9dd323 Fix security mirror sources.list entries for non-x86 architectures.
(LP: #1679252)
2017-04-04 09:28:52 -06:00
Mathieu Trudel-Lapierre
a0983db864 releasing package livecd-rootfs version 2.408.9 2017-03-23 14:41:36 -04:00
Mathieu Trudel-Lapierre
d50b3ba529 ubuntu-cpc: Remove redundant copy of grub files. (LP: #1637290) 2017-03-23 14:40:47 -04:00
Steve Langasek
e6793cfa3a Merge lp:~rcj/livecd-rootfs/xenial-proposed/ 2017-03-21 08:40:59 -07:00
Daniel Watkins
28e14a0b77 * Don't overwrite the default sources.list in cloud images.
* Replace sources.list generated using COMPONENTS with the sources.list from
  an Ubuntu Server installation (i.e. with all components enabled, and all
  deb-src lines commented).  LP: #1513529.
2017-03-21 08:36:01 -07:00
Robert C Jennings
dacc1ea41e Fix OVA generation and add grub label helper for ubuntu-cpc
[ Chris Glass ]
* Fix the manifest generation in OVA files so that ovf files don't have
  double extensions.  (LP: #1627931)
* Fix the OVF's metadata to include Ubuntu specific identifiers and
  descriptions instead of the generic Linux ones.  (LP: #1656293) 
[ Daniel Watkins ]
* Add replace_grub_root_with_label function thereby consolidating multiple
  uses of the same calls to sed.
2017-03-17 13:39:21 -05:00
Daniel Watkins
ececc9789d Add replace_grub_root_with_label function
When update-grub is run, it will detect the disks in the build system.
Currently, we sed the grub configuration in places where this happens;
replace_grub_root_with_label moves that seddery in to a single callable
location to avoid ending up with multiple versions of it.

(It's worth noting that we also do this in 999-cpc-fixes.chroot, but as our
functions file isn't available within the chroot we don't use it there.)
2017-03-17 13:35:37 -05:00
Christopher Glass
92a10c0df0 Fix the OVF's metadata to include Ubuntu specific identifiers and
descriptions instead of the generic Linux ones.  (LP: #1656293)
2017-03-17 13:34:22 -05:00
Christopher Glass
4bc9def5d6 This branch fixes the manifest generation in OVA files (LP:1627931)
The .ova file extension was passed twice, resulting in file not found errors in
both the general case and the vagrant-specific file creation.
2017-03-17 13:32:55 -05:00
Adam Conrad
188d485441 Set device_tree_address for the new kernel in the RPi bootloader config.txt 2017-02-16 10:32:15 -07:00
Adam Conrad
f2f8665598 * Forward-port hardware enablement delta from trusty to xenial, with changes:
- Implement hwe stack swapping as task filters instead of install hints
  - Revert ubuntu-desktop and ubuntu-gnome to use tasks again for the above
2017-02-16 10:18:54 -07:00
Steve Langasek
40a4d16f3e Document the Vcs-Bzr branch for SRUs. 2017-02-08 22:57:39 -08:00
Łukasz 'sil2100' Zemczak
66aaa4ab40 Remove the systemd-sysv- line from ubuntu-touch config routines. 2016-10-06 14:41:45 +02:00
Łukasz 'sil2100' Zemczak
58dd50b464 Add changelog entry for previous commit. 2016-10-03 14:15:34 +02:00
Łukasz 'sil2100' Zemczak
f10c47f913 Add additional hints to ubuntu-touch* i386/amd64 image builds to pull in the gles version of the UITK. 2016-10-03 14:14:22 +02:00
Łukasz 'sil2100' Zemczak
a4f597c84b Fix small but terrible typo in the ubuntu-touch-custom handling that was breaking touch builds. Please note: I corrected the 2.408.5 version in the upload queue so this is also part of that release. 2016-09-29 10:18:40 +02:00
Łukasz 'sil2100' Zemczak
24c2b2773f releasing package livecd-rootfs version 2.408.5 2016-09-27 17:43:02 +02:00
Łukasz 'sil2100' Zemczak
8f735f316b Sync with what's currently released to xenial-proposed: remove ubuntu-pd, add ubuntu-touch-custom, remove the kernel.yaml addition for snappy as it's not meant to be in xenial and no longer needed. 2016-09-27 17:41:54 +02:00
Steve Langasek
5efb2007af add meta/kernel.yaml to the kernel snaps 2016-09-14 19:02:41 +00:00
Steve Langasek
8bcc5ca1c2 Add the new dhcpd user introduced by latest archive changes. 2016-09-14 19:02:28 +00:00
Steve Langasek
455d0a6af4 Temporarily change the 60-install-click.chroot script to pull in clicks for
arm64 builds from a different location for ubuntu-touch.
2016-09-14 19:00:14 +00:00
Steve Langasek
6b04c07371 releasing package livecd-rootfs version 2.408.4 2016-09-09 17:04:58 -07:00
Steve Langasek
4079a1acce live-build/ubuntu-cpc/hooks/042-vagrant.binary: fix unmount handling
so that the teardown is done properly /before/ we try to make an
image from our filesystem, since otherwise /etc/resolv.conf is broken.
LP: #1621393.
2016-09-09 17:04:54 -07:00
Brian Murray
d51fef0426 * Fixes for vagrant box builder in ubuntu-cpc LP: #1565985
- Install virtualbox-guest-utils
  - Don't disable default synced folder
  - Don't set vm name
  - Add cloud-init config to manage /etc/hosts LP: #1561250
2016-09-09 17:00:35 -07:00
Adam Conrad
b0e649a83c Switch ubuntu-gnome from using tasks to metapackages (LP: #1602035) 2016-07-21 02:31:01 -06:00
Steve Langasek
caedaee057 Rename old ubuntu-core tarballs to ubuntu-base, for consistency with
the changes already made to yakkety and the ubuntu-cdimage project.
LP: #1579950.
2016-05-09 17:07:33 -07:00
15 changed files with 342 additions and 190 deletions

114
debian/changelog vendored
View File

@ -1,3 +1,117 @@
livecd-rootfs (2.408.12) xenial; urgency=medium
* live-build/ubuntu-cpc/hooks/999-extras.binary: Exit on first failure.
(LP: #1687752)
-- Robert C Jennings <robert.jennings@canonical.com> Tue, 09 May 2017 13:57:44 -0700
livecd-rootfs (2.408.11) xenial; urgency=medium
* Add `apt-get update` to ubuntu-cpc ppc64el builds so they use the new
sources.
-- Daniel Watkins <daniel.watkins@canonical.com> Fri, 07 Apr 2017 16:12:53 -0400
livecd-rootfs (2.408.10) xenial; urgency=medium
[ Adam Conrad ]
* Fix security mirror sources.list entries for non-x86 architectures.
(LP: #1679252)
-- Daniel Watkins <daniel.watkins@canonical.com> Mon, 03 Apr 2017 14:05:25 -0400
livecd-rootfs (2.408.9) xenial; urgency=medium
[ Daniel Watkins ]
* Don't overwrite the default sources.list in cloud images.
* Replace sources.list generated using COMPONENTS with the sources.list from
an Ubuntu Server installation (i.e. with all components enabled, and all
deb-src lines commented). LP: #1513529.
[ Chris Glass ]
* Fix the manifest generation in OVA files so that ovf files don't have
double extensions. (LP: #1627931)
* Fix the OVF's metadata to include Ubuntu specific identifiers and
descriptions instead of the generic Linux ones. (LP: #1656293)
[ Daniel Watkins ]
* Add replace_grub_root_with_label function thereby consolidating multiple
uses of the same calls to sed.
[ Robert C Jennings ]
* ubuntu-cpc: Remove redundant copy of grub files. (LP: #1637290)
-- Robert C Jennings <robert.jennings@canonical.com> Thu, 23 Mar 2017 14:40:59 -0400
livecd-rootfs (2.408.8) xenial; urgency=medium
* Set device_tree_address for the new kernel in the RPi bootloader config.txt
-- Adam Conrad <adconrad@ubuntu.com> Thu, 16 Feb 2017 10:21:51 -0700
livecd-rootfs (2.408.7) xenial; urgency=medium
[ Łukasz 'sil2100' Zemczak ]
* Add additional hints to ubuntu-touch* i386/amd64 image builds to pull in
the gles version of the UITK.
* Now that we have have systemd working on ubuntu-touch, remove the
systemd-sysv- in add_package config to make sure we can build an image with
systemd as the init system.
[ Adam Conrad ]
* Forward-port hardware enablement delta from trusty to xenial, with changes:
- Implement hwe stack swapping as task filters instead of install hints
- Revert ubuntu-desktop and ubuntu-gnome to use tasks again for the above
-- Adam Conrad <adconrad@ubuntu.com> Wed, 08 Feb 2017 11:50:52 -0700
livecd-rootfs (2.408.5) xenial; urgency=medium
* Temporarily change the 60-install-click.chroot script to pull in clicks for
arm64 builds from a different location for ubuntu-touch.
* Add the new dhcpd user to touch hooks introduced by latest archive changes.
* Remove the ubuntu-pd project logic.
* Synced ubuntu-touch-custom changes from the vivid branch to xenial. This
also adds a new symlink called ubuntu-touch-custom to the ubuntu-touch hooks
dir.
* Stop using the overlay PPA for touch livecd-rootfs changes (LP: #1628085).
-- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Tue, 27 Sep 2016 13:27:28 +0200
livecd-rootfs (2.408.4) xenial; urgency=medium
* live-build/ubuntu-cpc/hooks/042-vagrant.binary: fix unmount handling
so that the teardown is done properly /before/ we try to make an
image from our filesystem, since otherwise /etc/resolv.conf is broken.
LP: #1621393.
-- Steve Langasek <steve.langasek@ubuntu.com> Fri, 09 Sep 2016 17:04:54 -0700
livecd-rootfs (2.408.3) xenial-proposed; urgency=medium
[ Louis Zuckerman ]
* Fixes for vagrant box builder in ubuntu-cpc LP: #1565985
- Install virtualbox-guest-utils
- Don't disable default synced folder
- Don't set vm name
- Add cloud-init config to manage /etc/hosts LP: #1561250
-- Brian Murray <brian@ubuntu.com> Tue, 30 Aug 2016 13:17:55 -0700
livecd-rootfs (2.408.2) xenial; urgency=medium
* Switch ubuntu-gnome from using tasks to metapackages (LP: #1602035)
-- Adam Conrad <adconrad@ubuntu.com> Wed, 20 Jul 2016 01:46:41 -0600
livecd-rootfs (2.408.1) xenial; urgency=medium
* Rename old ubuntu-core tarballs to ubuntu-base, for consistency with
the changes already made to yakkety and the ubuntu-cdimage project.
LP: #1579950.
-- Steve Langasek <steve.langasek@ubuntu.com> Mon, 09 May 2016 17:00:19 -0700
livecd-rootfs (2.408) xenial; urgency=medium livecd-rootfs (2.408) xenial; urgency=medium
* drop linux-firmware-raspi2, it does not actually contain driver * drop linux-firmware-raspi2, it does not actually contain driver

2
debian/control vendored
View File

@ -4,7 +4,7 @@ Priority: optional
Build-Depends: debhelper (>= 7) Build-Depends: debhelper (>= 7)
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Standards-Version: 3.9.6 Standards-Version: 3.9.6
Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-core-dev/livecd-rootfs/trunk Vcs-Bzr: lp:~ubuntu-core-dev/livecd-rootfs/xenial-proposed/
Package: livecd-rootfs Package: livecd-rootfs
Architecture: any Architecture: any

View File

@ -58,116 +58,56 @@ EOF
# preinstalled being slightly different in what it doesn't ask) from # preinstalled being slightly different in what it doesn't ask) from
# debian-installer's apt-setup: # debian-installer's apt-setup:
codename=$LB_DISTRIBUTION cat > chroot/etc/apt/sources.list << EOF
file="chroot/etc/apt/sources.list"
dists="main"
alldists="main"
if echo "$LB_PARENT_ARCHIVE_AREAS" | grep -q restricted; then
dists="$dists restricted"
alldists="$alldists restricted"
fi
if echo "$LB_PARENT_ARCHIVE_AREAS" | grep -q universe; then
UNIVERSE=true
else
UNIVERSE=false
fi
if echo "$LB_PARENT_ARCHIVE_AREAS" | grep -q multiverse; then
MULTIVERSE=true
else
MULTIVERSE=false
fi
cat > $file <<EOF
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution. # newer versions of the distribution.
deb $LB_PARENT_MIRROR_BINARY $LB_DISTRIBUTION main restricted
deb $LB_PARENT_MIRROR_BINARY $codename $dists # deb-src $LB_PARENT_MIRROR_BINARY $LB_DISTRIBUTION main restricted
deb-src $LB_PARENT_MIRROR_BINARY $codename $dists
## Major bug fix updates produced after the final release of the ## Major bug fix updates produced after the final release of the
## distribution. ## distribution.
deb $LB_PARENT_MIRROR_BINARY $codename-updates $dists deb $LB_PARENT_MIRROR_BINARY $LB_DISTRIBUTION-updates main restricted
deb-src $LB_PARENT_MIRROR_BINARY $codename-updates $dists # deb-src $LB_PARENT_MIRROR_BINARY $LB_DISTRIBUTION-updates main restricted
EOF
# Even if universe isn't enabled, we write example lines for it.
echo >> $file
if [ "$UNIVERSE" = true ]; then
alldists="$alldists universe"
COMMENT=
else
cat >> $file <<EOF
## Uncomment the following two lines to add software from the 'universe'
## repository.
EOF
COMMENT='# '
fi
cat >> $file <<EOF
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any ## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team. ## review or updates from the Ubuntu security team.
${COMMENT}deb $LB_PARENT_MIRROR_BINARY $codename universe deb $LB_PARENT_MIRROR_BINARY $LB_DISTRIBUTION universe
${COMMENT}deb-src $LB_PARENT_MIRROR_BINARY $codename universe # deb-src $LB_PARENT_MIRROR_BINARY $LB_DISTRIBUTION universe
${COMMENT}deb $LB_PARENT_MIRROR_BINARY $codename-updates universe deb $LB_PARENT_MIRROR_BINARY $LB_DISTRIBUTION-updates universe
${COMMENT}deb-src $LB_PARENT_MIRROR_BINARY $codename-updates universe # deb-src $LB_PARENT_MIRROR_BINARY $LB_DISTRIBUTION-updates universe
EOF
# Multiverse is different, don't write anything unless enabled.
if [ "$MULTIVERSE" = true ]; then
alldists="$alldists multiverse"
cat >> $file <<EOF
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to ## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in ## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu ## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team. ## security team.
deb $LB_PARENT_MIRROR_BINARY $codename multiverse deb $LB_PARENT_MIRROR_BINARY $LB_DISTRIBUTION multiverse
deb-src $LB_PARENT_MIRROR_BINARY $codename multiverse # deb-src $LB_PARENT_MIRROR_BINARY $LB_DISTRIBUTION multiverse
deb $LB_PARENT_MIRROR_BINARY $codename-updates multiverse deb $LB_PARENT_MIRROR_BINARY $LB_DISTRIBUTION-updates multiverse
deb-src $LB_PARENT_MIRROR_BINARY $codename-updates multiverse # deb-src $LB_PARENT_MIRROR_BINARY $LB_DISTRIBUTION-updates multiverse
EOF
fi
cat >> $file <<EOF
## N.B. software from this repository may not have been tested as ## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes ## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features. ## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review ## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team. ## or updates from the Ubuntu security team.
# deb $LB_PARENT_MIRROR_BINARY $codename-backports $alldists deb $LB_PARENT_MIRROR_BINARY $LB_DISTRIBUTION-backports main restricted universe multiverse
# deb-src $LB_PARENT_MIRROR_BINARY $codename-backports $alldists # deb-src $LB_PARENT_MIRROR_BINARY $LB_DISTRIBUTION-backports main restricted universe multiverse
EOF
cat >> $file <<EOF ## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu $LB_DISTRIBUTION partner
# deb-src http://archive.canonical.com/ubuntu $LB_DISTRIBUTION partner
deb $LB_PARENT_MIRROR_BINARY $codename-security $dists deb $LB_PARENT_MIRROR_BINARY_SECURITY $LB_DISTRIBUTION-security main restricted
deb-src $LB_PARENT_MIRROR_BINARY $codename-security $dists # deb-src $LB_PARENT_MIRROR_BINARY_SECURITY $LB_DISTRIBUTION-security main restricted
EOF deb $LB_PARENT_MIRROR_BINARY_SECURITY $LB_DISTRIBUTION-security universe
# deb-src $LB_PARENT_MIRROR_BINARY_SECURITY $LB_DISTRIBUTION-security universe
# Security sources for Ubuntu universe; not used much, but e.g. unsupported deb $LB_PARENT_MIRROR_BINARY_SECURITY $LB_DISTRIBUTION-security multiverse
# binary packages from a supported source package will end up here. # deb-src $LB_PARENT_MIRROR_BINARY_SECURITY $LB_DISTRIBUTION-security multiverse
if [ "$UNIVERSE" = true ]; then
COMMENT=
else
COMMENT='# '
fi
cat >> $file <<EOF
${COMMENT}deb $LB_PARENT_MIRROR_BINARY $codename-security universe
${COMMENT}deb-src $LB_PARENT_MIRROR_BINARY $codename-security universe
EOF
# Security sources for Ubuntu multiverse, with the same caveats as for
# universe.
if [ "$MULTIVERSE" = true ]; then
COMMENT=
else
COMMENT='# '
fi
cat >> $file <<EOF
${COMMENT}deb $LB_PARENT_MIRROR_BINARY $codename-security multiverse
${COMMENT}deb-src $LB_PARENT_MIRROR_BINARY $codename-security multiverse
EOF EOF
fi fi
@ -238,7 +178,7 @@ deb file:/var/lib/preinstalled-pool/ $LB_DISTRIBUTION $LB_PARENT_ARCHIVE_AREAS
> chroot/etc/apt/sources.list > chroot/etc/apt/sources.list
rm chroot/etc/apt/sources.list.preinstall chroot/etc/apt/sources.list.orig rm chroot/etc/apt/sources.list.preinstall chroot/etc/apt/sources.list.orig
fi fi
if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-pd" ]; then if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-touch-custom" ]; then
if [ "$ARCH" = "armhf" ]; then if [ "$ARCH" = "armhf" ]; then
INFO_DESC="$(lsb_release -d -s)" INFO_DESC="$(lsb_release -d -s)"
echo "$INFO_DESC - $ARCH ($BUILDSTAMP)" >chroot/etc/media-info echo "$INFO_DESC - $ARCH ($BUILDSTAMP)" >chroot/etc/media-info
@ -251,16 +191,6 @@ deb file:/var/lib/preinstalled-pool/ $LB_DISTRIBUTION $LB_PARENT_ARCHIVE_AREAS
build_name: server build_name: server
serial: $BUILDSTAMP serial: $BUILDSTAMP
EOF EOF
cat > chroot/etc/apt/sources.list << EOF
deb ${LB_PARENT_MIRROR_BINARY} ${LB_DISTRIBUTION} main restricted universe multiverse
deb ${LB_PARENT_MIRROR_BINARY} ${LB_DISTRIBUTION}-updates main restricted universe multiverse
deb ${LB_PARENT_MIRROR_BINARY_SECURITY} ${LB_DISTRIBUTION}-security main restricted universe multiverse
EOF
lb chroot_hosts install
lb chroot_resolv install
Chroot chroot "apt-get update"
lb chroot_resolv remove
lb chroot_hosts remove
fi fi
echo "===== Checking size of /usr/share/doc =====" echo "===== Checking size of /usr/share/doc ====="
@ -345,7 +275,7 @@ EOF
fi fi
fi fi
if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-pd" ]; then if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-touch-custom" ]; then
(cd "binary/$INITFS/custom.dir/" && tar -c *) | \ (cd "binary/$INITFS/custom.dir/" && tar -c *) | \
gzip -9 --rsyncable > "$PREFIX.custom.tar.gz" gzip -9 --rsyncable > "$PREFIX.custom.tar.gz"
chmod 644 "$PREFIX.custom.tar.gz" chmod 644 "$PREFIX.custom.tar.gz"
@ -602,6 +532,7 @@ for FLAVOUR in $LB_LINUX_FLAVOURS; do
if [ -z "$LB_LINUX_FLAVOURS" ] || [ "$LB_LINUX_FLAVOURS" = "none" ]; then if [ -z "$LB_LINUX_FLAVOURS" ] || [ "$LB_LINUX_FLAVOURS" = "none" ]; then
continue continue
fi fi
FLAVOUR=${FLAVOUR%%-hwe-*}
if [ "$FLAVOUR" = "virtual" ]; then if [ "$FLAVOUR" = "virtual" ]; then
# The virtual kernel is named generic in /boot # The virtual kernel is named generic in /boot
FLAVOUR="generic" FLAVOUR="generic"
@ -635,17 +566,18 @@ done
NUMFLAVOURS="$(set -- $LB_LINUX_FLAVOURS; echo $#)" NUMFLAVOURS="$(set -- $LB_LINUX_FLAVOURS; echo $#)"
if [ "$NUMFLAVOURS" = 1 ] && [ "$LB_LINUX_FLAVOURS" != "none" ]; then if [ "$NUMFLAVOURS" = 1 ] && [ "$LB_LINUX_FLAVOURS" != "none" ]; then
# only one kernel flavour # only one kernel flavour
FLAVOUR=${LB_LINUX_FLAVOURS%%-hwe-*}
if [ -e "binary/$INITFS/vmlinuz" ]; then if [ -e "binary/$INITFS/vmlinuz" ]; then
ln "binary/$INITFS/vmlinuz" "$PREFIX.kernel" ln "binary/$INITFS/vmlinuz" "$PREFIX.kernel"
chmod 644 "$PREFIX.kernel" chmod 644 "$PREFIX.kernel"
else else
ln -sf "$PREFIX.kernel-$LB_LINUX_FLAVOURS" "$PREFIX.kernel" ln -sf "$PREFIX.kernel-$FLAVOUR" "$PREFIX.kernel"
fi fi
if [ -e "binary/$INITFS/initrd.lz" ]; then if [ -e "binary/$INITFS/initrd.lz" ]; then
ln "binary/$INITFS/initrd.lz" "$PREFIX.initrd" ln "binary/$INITFS/initrd.lz" "$PREFIX.initrd"
chmod 644 "$PREFIX.initrd" chmod 644 "$PREFIX.initrd"
else else
ln -sf "$PREFIX.initrd-$LB_LINUX_FLAVOURS" "$PREFIX.initrd" ln -sf "$PREFIX.initrd-$FLAVOUR" "$PREFIX.initrd"
fi fi
fi fi
@ -689,7 +621,7 @@ if [ "$SUBARCH" = "ac100" ] || [ "$SUBARCH" = "nexus7" ]; then
fi fi
if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-pd" ]; then if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-touch-custom" ]; then
sourceslist="chroot/etc/apt/sources.list" sourceslist="chroot/etc/apt/sources.list"
lb chroot_proc install "$@" lb chroot_proc install "$@"

View File

@ -58,9 +58,15 @@ add_task ()
# failure. # failure.
for task; do for task; do
if [ -z "$HWE_BUILD" ]; then
# We need a ridiculous number of backslashes to protect # We need a ridiculous number of backslashes to protect
# parentheses from eval. # parentheses from eval.
echo "!chroot chroot apt-cache dumpavail | grep-dctrl -nsPackage \\\\\\( -XFArchitecture $ARCH -o -XFArchitecture all \\\\\\) -a -wFTask $task" >> "config/package-lists/livecd-rootfs.list.chroot_$pass" echo "!chroot chroot apt-cache dumpavail | grep-dctrl -nsPackage \\\\\\( -XFArchitecture $ARCH -o -XFArchitecture all \\\\\\) -a -wFTask $task" >> "config/package-lists/livecd-rootfs.list.chroot_$pass"
else
# If HWE_BUILD is set, we strip out drivers not available
# in the HWE stack, then sed the rest with their HWE suffixes
echo "!chroot chroot apt-cache dumpavail | grep-dctrl -nsPackage \\\\\\( -XFArchitecture $ARCH -o -XFArchitecture all \\\\\\) -a -wFTask $task | grep -v xserver-xorg-input-vmmouse | sed -e 's/xserver-xorg.*/&-hwe-16.04/'" >> "config/package-lists/livecd-rootfs.list.chroot_$pass"
fi
done done
} }
@ -135,7 +141,7 @@ case $IMAGEFORMAT in
*) *)
case $PROJECT in case $PROJECT in
ubuntu-server|ubuntu-touch|ubuntu-pd) ubuntu-server|ubuntu-touch|ubuntu-touch-custom)
;; ;;
*) *)
add_package live lupin-casper add_package live lupin-casper
@ -168,7 +174,7 @@ if [ "$PREINSTALLED" = "true" ] && [ "$SUBPROJECT" != "wubi" ]; then
ubuntu-server) ubuntu-server)
add_package live oem-config-debconf ubiquity-frontend-debconf add_package live oem-config-debconf ubiquity-frontend-debconf
;; ;;
ubuntu-core|base|ubuntu-touch|ubuntu-pd|ubuntu-cpc|ubuntu-desktop-next) ubuntu-core|ubuntu-base|base|ubuntu-touch|ubuntu-touch-custom|ubuntu-cpc|ubuntu-desktop-next)
;; ;;
*) *)
add_package live oem-config-gtk ubiquity-frontend-gtk add_package live oem-config-gtk ubiquity-frontend-gtk
@ -186,16 +192,20 @@ case $BINARYFORMAT in
;; ;;
esac esac
SIGNED_KERNEL_PACKAGE="linux-signed-generic" HWE_X_PACKAGES="xserver-xorg-hwe-16.04 xserver-xorg-video-all-hwe-16.04 xserver-xorg-input-all-hwe-16.04"
UNITY_HWE_HINTS="unity-settings-daemon notify-osd libqt4-sql-sqlite unity gnome-terminal" HWE_KERNEL_FLAVOUR="generic-hwe-16.04"
HWE_SIGNED_KERNEL_PACKAGE="linux-signed-$HWE_KERNEL_FLAVOUR"
case $PROJECT in case $PROJECT in
ubuntu|ubuntu-dvd) ubuntu|ubuntu-dvd)
add_package install ubuntu-minimal ubuntu-standard HWE_BUILD="yes"
add_package install ubuntu-desktop $UNITY_HWE_HINTS add_task install minimal standard ubuntu-desktop
add_package install $HWE_X_PACKAGES
LIVE_TASK='ubuntu-live' LIVE_TASK='ubuntu-live'
LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)'
KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR"
case $ARCH in case $ARCH in
amd64) add_package live $SIGNED_KERNEL_PACKAGE ;; amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;;
esac esac
;; ;;
@ -219,11 +229,15 @@ case $PROJECT in
;; ;;
kubuntu|kubuntu-dvd) kubuntu|kubuntu-dvd)
HWE_BUILD="yes"
add_task install minimal standard add_task install minimal standard
add_task install kubuntu-desktop add_task install kubuntu-desktop
add_package install $HWE_X_PACKAGES
LIVE_TASK='kubuntu-live' LIVE_TASK='kubuntu-live'
LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)'
KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR"
case $ARCH in case $ARCH in
amd64) add_package live linux-signed-generic ;; amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;;
esac esac
COMPONENTS='main restricted universe' COMPONENTS='main restricted universe'
add_chroot_hook remove-gnome-icon-cache add_chroot_hook remove-gnome-icon-cache
@ -258,16 +272,17 @@ case $PROJECT in
;; ;;
xubuntu) xubuntu)
HWE_BUILD="yes"
add_task install minimal standard xubuntu-desktop add_task install minimal standard xubuntu-desktop
add_package install $HWE_X_PACKAGES
add_package install xterm add_package install xterm
LIVE_TASK='xubuntu-live' LIVE_TASK='xubuntu-live'
LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)'
KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR"
case $ARCH in case $ARCH in
amd64) add_package live linux-signed-generic ;; amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;;
esac esac
COMPONENTS='main restricted universe multiverse' COMPONENTS='main restricted universe multiverse'
case $ARCH in
amd64|i386) KERNEL_FLAVOURS=generic ;;
esac
;; ;;
ubuntu-netbook) ubuntu-netbook)
@ -276,44 +291,62 @@ case $PROJECT in
;; ;;
mythbuntu) mythbuntu)
HWE_BUILD="yes"
add_task install minimal standard mythbuntu-desktop add_task install minimal standard mythbuntu-desktop
add_package install $HWE_X_PACKAGES
LIVE_TASK='mythbuntu-live' LIVE_TASK='mythbuntu-live'
LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)'
KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR"
case $ARCH in case $ARCH in
amd64) add_package live linux-signed-generic ;; amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;;
esac esac
COMPONENTS='main restricted universe multiverse' COMPONENTS='main restricted universe multiverse'
;; ;;
lubuntu) lubuntu)
HWE_BUILD="yes"
add_task install minimal standard lubuntu-desktop add_task install minimal standard lubuntu-desktop
LIVE_TASK='lubuntu-live'
case $ARCH in case $ARCH in
amd64) add_package live linux-signed-generic ;; amd64|i386) add_package install thermald ;;
esac
add_package install $HWE_X_PACKAGES
LIVE_TASK='lubuntu-live'
LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)'
KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR"
case $ARCH in
amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;;
esac esac
COMPONENTS='main restricted universe multiverse' COMPONENTS='main restricted universe multiverse'
case $ARCH in
amd64|i386) KERNEL_FLAVOURS=generic ;;
esac
# The Lubuntu STRUCTURE file has "feature # The Lubuntu STRUCTURE file has "feature
# no-follow-recommends". Mirror this. # no-follow-recommends". Mirror this.
export APT_OPTIONS="--yes --no-install-recommends" export APT_OPTIONS="--yes --no-install-recommends"
;; ;;
ubuntu-gnome) ubuntu-gnome)
HWE_BUILD="yes"
add_task install minimal standard ubuntu-gnome-desktop add_task install minimal standard ubuntu-gnome-desktop
add_package install $HWE_X_PACKAGES
LIVE_TASK='ubuntu-gnome-live' LIVE_TASK='ubuntu-gnome-live'
LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)'
KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR"
case $ARCH in case $ARCH in
amd64) add_package live linux-signed-generic ;; amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;;
esac esac
COMPONENTS='main restricted universe' COMPONENTS='main restricted universe'
;; ;;
ubuntu-mate) ubuntu-mate)
HWE_BUILD="yes"
add_task install minimal standard ubuntu-mate-core ubuntu-mate-desktop add_task install minimal standard ubuntu-mate-core ubuntu-mate-desktop
LIVE_TASK='ubuntu-mate-live'
case $ARCH in case $ARCH in
amd64) add_package live linux-signed-generic ;; amd64|i386) add_package install thermald ;;
esac
add_package install $HWE_X_PACKAGES
LIVE_TASK='ubuntu-mate-live'
LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)'
KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR"
case $ARCH in
amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;;
esac esac
COMPONENTS='main restricted universe multiverse' COMPONENTS='main restricted universe multiverse'
# The Ubuntu MATE STRUCTURE file has "feature # The Ubuntu MATE STRUCTURE file has "feature
@ -322,19 +355,25 @@ case $PROJECT in
;; ;;
ubuntustudio-dvd) ubuntustudio-dvd)
HWE_BUILD="yes"
add_task install minimal standard ubuntustudio-desktop ubuntustudio-audio ubuntustudio-fonts ubuntustudio-graphics ubuntustudio-video ubuntustudio-publishing ubuntustudio-photography add_task install minimal standard ubuntustudio-desktop ubuntustudio-audio ubuntustudio-fonts ubuntustudio-graphics ubuntustudio-video ubuntustudio-publishing ubuntustudio-photography
add_package install $HWE_X_PACKAGES linux-generic-hwe-16.04-
COMPONENTS='main restricted universe multiverse' COMPONENTS='main restricted universe multiverse'
case $ARCH in case $ARCH in
amd64|i386) KERNEL_FLAVOURS=lowlatency ;; amd64|i386) KERNEL_FLAVOURS=lowlatency-hwe-16.04 ;;
esac esac
;; ;;
ubuntukylin) ubuntukylin)
HWE_BUILD="yes"
add_task install minimal standard ubuntukylin-desktop add_task install minimal standard ubuntukylin-desktop
add_package install $HWE_X_PACKAGES
add_package install ubuntukylin-default-settings add_package install ubuntukylin-default-settings
LIVE_TASK='ubuntukylin-live' LIVE_TASK='ubuntukylin-live'
LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)'
KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR"
case $ARCH in case $ARCH in
amd64) add_package live linux-signed-generic ;; amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;;
esac esac
COMPONENTS='main restricted universe' COMPONENTS='main restricted universe'
;; ;;
@ -413,13 +452,18 @@ case $PROJECT in
OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal" OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal"
;; ;;
ubuntu-touch|ubuntu-pd) ubuntu-base)
if [ "$PROJECT" = "ubuntu-touch" ]; then OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal"
meta_package=ubuntu-touch ;;
else
meta_package=ubuntu-pocket-desktop ubuntu-touch|ubuntu-touch-custom)
fi HINTS="packagekit ubuntu-system-settings-online-accounts"
add_package install ubuntu-minimal $meta_package systemd-sysv- packagekit ubuntu-system-settings-online-accounts case $ARCH in
amd64|i386)
HINTS="$HINTS qml-module-ubuntu-components-gles unity8"
;;
esac
add_package install ubuntu-minimal ubuntu-touch $HINTS
COMPONENTS='main restricted universe' COMPONENTS='main restricted universe'
BOOTAPPEND_LIVE='hostname=ubuntu-phablet username=ubuntu' BOOTAPPEND_LIVE='hostname=ubuntu-phablet username=ubuntu'
@ -557,7 +601,7 @@ case $ARCH in
esac esac
case $PROJECT in case $PROJECT in
ubuntu-server|ubuntu-core|ubuntu-touch|ubuntu-pd) ubuntu-server|ubuntu-core|ubuntu-base|ubuntu-touch|ubuntu-touch-custom)
case $SUBPROJECT in case $SUBPROJECT in
system-image) system-image)
# keep the kernel for the system-image build # keep the kernel for the system-image build
@ -637,6 +681,7 @@ cat > /boot/firmware/config.txt << EOM
# Some settings may impact device functionality. See link above for details # Some settings may impact device functionality. See link above for details
kernel=uboot.bin kernel=uboot.bin
device_tree_address=0x02000000
# enable i2c # enable i2c
dtparam=i2c_arm=on dtparam=i2c_arm=on
@ -743,7 +788,7 @@ EOF
fi fi
;; ;;
ubuntu-touch:*|ubuntu-pd:*|ubuntu-core:system-image|ubuntu-desktop-next:system-image|ubuntu-cpc:*) ubuntu-touch:*|ubuntu-touch-custom:*|ubuntu-core:system-image|ubuntu-desktop-next:system-image|ubuntu-cpc:*)
cp -af /usr/share/livecd-rootfs/live-build/${PROJECT}/* \ cp -af /usr/share/livecd-rootfs/live-build/${PROJECT}/* \
config/ config/
;; ;;

View File

@ -249,4 +249,11 @@ convert_to_qcow2() {
qemu-img info "$destination" qemu-img info "$destination"
} }
replace_grub_root_with_label() {
# When update-grub is run, it will detect the disks in the build system.
# Instead, we want grub to use the cloudimg-rootfs labelled disk
CHROOT_ROOT="$1"
sed -i -e "s,root=[^ ]\+,root=LABEL=cloudimg-rootfs," \
"$CHROOT_ROOT/boot/grub/grub.cfg"
}

View File

@ -70,9 +70,6 @@ install_grub() {
amd64) amd64)
chroot mountpoint apt-get install -qqy grub-efi-amd64-signed grub-efi-amd64 shim-signed chroot mountpoint apt-get install -qqy grub-efi-amd64-signed grub-efi-amd64 shim-signed
grub_modules="part_gpt fat ext2 normal chain boot configfile linux multiboot search_fs_uuid search_label terminal serial video video_fb video_bochs usb usb_keyboard efi_gop efi_uga" grub_modules="part_gpt fat ext2 normal chain boot configfile linux multiboot search_fs_uuid search_label terminal serial video video_fb video_bochs usb usb_keyboard efi_gop efi_uga"
chroot mountpoint cp /usr/lib/shim/shim.efi.signed "${efi_boot_dir}/shimx64.efi"
chroot mountpoint cp /usr/lib/shim/MokManager.efi.signed "${efi_boot_dir}/MokManager.efi"
chroot mountpoint cp /usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed "${efi_boot_dir}/grubx64.efi"
efi_target=x86_64-efi efi_target=x86_64-efi
;; ;;
esac esac
@ -108,7 +105,7 @@ EOF
chroot mountpoint dpkg-divert --local --rename /etc/grub.d/30_os-prober chroot mountpoint dpkg-divert --local --rename /etc/grub.d/30_os-prober
chroot mountpoint update-grub chroot mountpoint update-grub
sed -i "s,root=.* ,root=LABEL=cloudimg-rootfs ,g" mountpoint/boot/grub/grub.cfg replace_grub_root_with_label mountpoint
chroot mountpoint dpkg-divert --remove --local --rename /etc/grub.d/30_os-prober chroot mountpoint dpkg-divert --remove --local --rename /etc/grub.d/30_os-prober
chroot mountpoint apt-get -y clean chroot mountpoint apt-get -y clean

View File

@ -26,6 +26,7 @@ install_grub() {
mkdir mountpoint mkdir mountpoint
mount_partition "${rootfs_dev_mapper}" mountpoint mount_partition "${rootfs_dev_mapper}" mountpoint
chroot mountpoint apt-get -qqy update
chroot mountpoint apt-get -qqy install grub2 chroot mountpoint apt-get -qqy install grub2
chroot mountpoint apt-get -qqy remove --purge grub-legacy-ec2 chroot mountpoint apt-get -qqy remove --purge grub-legacy-ec2
@ -51,7 +52,7 @@ EOF
chroot mountpoint dpkg-divert --local --rename /etc/grub.d/30_os-prober chroot mountpoint dpkg-divert --local --rename /etc/grub.d/30_os-prober
chroot mountpoint update-grub chroot mountpoint update-grub
sed -i "s,root=.* ,root=LABEL=cloudimg-rootfs ,g" mountpoint/boot/grub/grub.cfg replace_grub_root_with_label mountpoint
chroot mountpoint dpkg-divert --remove --local --rename /etc/grub.d/30_os-prober chroot mountpoint dpkg-divert --remove --local --rename /etc/grub.d/30_os-prober
umount_partition mountpoint umount_partition mountpoint

View File

@ -9,11 +9,24 @@
# #
# For this step, we re-use the VMDK's made in 040-vmdk-image.binary # For this step, we re-use the VMDK's made in 040-vmdk-image.binary
# Switch on $ARCH to determine which ID and description to use in the produced
# OVF. We have fancy Ubuntu-specific IDs in the OVF specification, we might as
# well use them.
case $ARCH in case $ARCH in
amd64|i386) ;; amd64)
*) echo "OVA images are not supported for $ARCH yet."; ovf_id=94
ovf_os_type="ubuntu64Guest"
ovf_desc_bits=64 ;;
i386)
ovf_id=93
ovf_os_type="ubuntu32Guest"
ovf_desc_bits=32 ;;
*)
echo "OVA images are not supported for $ARCH yet.";
exit 0;; exit 0;;
esac esac
cur_d=${PWD} cur_d=${PWD}
my_d=$(dirname $(readlink -f ${0})) my_d=$(dirname $(readlink -f ${0}))
@ -57,7 +70,10 @@ sed -i "${ovf}" \
-e "s/@@NUM_CPUS@@/2/g" \ -e "s/@@NUM_CPUS@@/2/g" \
-e "s/@@VERSION@@/${version}/g" \ -e "s/@@VERSION@@/${version}/g" \
-e "s/@@DATE@@/${serial_stamp}/g" \ -e "s/@@DATE@@/${serial_stamp}/g" \
-e "s/@@MEM_SIZE@@/1024/g" -e "s/@@MEM_SIZE@@/1024/g" \
-e "s/@@OVF_ID@@/${ovf_id}/g" \
-e "s/@@OVF_OS_TYPE@@/${ovf_os_type}/g" \
-e "s/@@OVF_DESC_BITS@@/${ovf_desc_bits}/g"
# Get the checksums # Get the checksums
vmdk_sha256=$(sha256sum ${vmdk_f} | cut -d' ' -f1) vmdk_sha256=$(sha256sum ${vmdk_f} | cut -d' ' -f1)
@ -67,7 +83,7 @@ ovf_sha256=$(sha256sum ${ovf} | cut -d' ' -f1)
manifest="${scratch_d}/${prefix}.mf" manifest="${scratch_d}/${prefix}.mf"
cat > "${manifest}" <<EOF cat > "${manifest}" <<EOF
SHA256(${vmdk_f##*/})= ${vmdk_sha256} SHA256(${vmdk_f##*/})= ${vmdk_sha256}
SHA256(${ovf##*/}.ovf)= ${ovf_sha256} SHA256(${ovf##*/})= ${ovf_sha256}
EOF EOF
# Now create the OVA # Now create the OVA

View File

@ -1,34 +1,40 @@
#!/bin/bash -eux #!/bin/bash -ex
# vi: ts=4 noexpandtab # vi: ts=4 noexpandtab
# #
# Generate a generic Vagrant Box. # Generate a generic Vagrant Box.
# #
# Vagrant images are essentially nothing more than OVA's with extra-metadata. # Vagrant images are essentially nothing more than OVA's with extra-metadata
# and some preinstalled packages.
# #
# We can't use the OVA's for Vagrant since Vagrant uses SSH to modify the instance. # We can't use the OVA's for Vagrant since Vagrant uses SSH to modify the
# This build step creates a cloud-config ISO so that Cloud-Init will configure # instance. This build step creates a cloud-config ISO so that Cloud-Init
# the initial user, creates meta-data that tells Vagrant how to interact with # will configure the initial user, creates meta-data that tells Vagrant how
# the cloud-init created users, and finally create the OVA. # to interact with the cloud-init created users, and finally create the OVA.
# #
# For this step, we re-use the VMDK's made in 040-vmdk-image.binary # For this step, we make a deriviative of binary/boot/disk.ext4 and install
# some packages in it, convert it to a vmdk, and then assemble the vagrant
# box.
cur_d=${PWD} cur_d=${PWD}
my_d=$(dirname $(readlink -f ${0})) my_d=$(dirname $(readlink -f ${0}))
base_vmdk="livecd.ubuntu-cpc.disk1.vmdk" # Switch on $ARCH to determine which ID and description to use in the produced
# OVF. We have fancy Ubuntu-specific IDs in the OVF specification, we might as
# well use them.
case $ARCH in case $ARCH in
amd64|i386) ;; amd64)
ovf_id=94
ovf_os_type="ubuntu64Guest"
ovf_desc_bits=64 ;;
i386)
ovf_id=93
ovf_os_type="ubuntu32Guest"
ovf_desc_bits=32 ;;
*) *)
echo "Vagrant images are not supported for $ARCH" echo "Vagrant images are not supported for $ARCH yet."
exit 0 exit 0;;
esac esac
if [ ! -e ${base_vmdk} ]; then
echo "Did not find VMDK to produce Vagrant images."
exit 0
fi
. /build/config/functions . /build/config/functions
# Virtualbox is needed for making a small VMDK # Virtualbox is needed for making a small VMDK
@ -37,7 +43,26 @@ apt-get -qqy install genisoimage qemu-utils
# Lets be safe about this # Lets be safe about this
box_d=$(mktemp -d) box_d=$(mktemp -d)
seed_d=$(mktemp -d) seed_d=$(mktemp -d)
trap "rm -rf ${box_d} ${seed_d}" EXIT mount_d=$(mktemp -d)
create_derivative "disk" "vagrant" #sets ${derivative_img}
mount_disk_image ${derivative_img} ${mount_d}
cleanup_vagrant() {
if [ -d "$mount_d" ]; then
umount_disk_image "$mount_d"
fi
rm -rf ${box_d} ${seed_d} ${mount_d} ${derivative_img}
}
trap cleanup_vagrant EXIT
chroot ${mount_d} apt-get update
# virtualbox-guest-utils Recommends: virtualbox-guest-x11, which we want to
# avoid pulling into a cloud image.
chroot ${mount_d} apt-get install --no-install-recommends -y virtualbox-guest-utils
chroot ${mount_d} apt-get clean
umount_disk_image "$mount_d"
rmdir "$mount_d"
# Used to identify bits # Used to identify bits
suite=$(chroot chroot lsb_release -c -s) suite=$(chroot chroot lsb_release -c -s)
@ -47,7 +72,7 @@ distro=$(chroot chroot lsb_release --id --short | tr [:upper:] [:lower:])
# Get the VMDK in place # Get the VMDK in place
prefix="${distro}-${suite}-${version}-cloudimg" prefix="${distro}-${suite}-${version}-cloudimg"
vmdk_f="${box_d}/${prefix}.vmdk" vmdk_f="${box_d}/${prefix}.vmdk"
cp ${base_vmdk} ${vmdk_f} create_vmdk ${derivative_img} ${vmdk_f}
# Vagrant needs a base user. We either inject the well-known SSH key # Vagrant needs a base user. We either inject the well-known SSH key
# or use password authentication. Both are ugly. So we'll use a password # or use password authentication. Both are ugly. So we'll use a password
@ -70,6 +95,7 @@ cat > ${seed_d}/user-data <<END
password: ${ubuntu_user_pass} password: ${ubuntu_user_pass}
chpasswd: { expire: False } chpasswd: { expire: False }
ssh_pwauth: True ssh_pwauth: True
manage_etc_hosts: localhost
END END
# Create the fake meta-data # Create the fake meta-data
@ -111,15 +137,11 @@ Vagrant.configure("2") do |config|
config.vm.base_mac = "${macaddr}" config.vm.base_mac = "${macaddr}"
config.ssh.username = "ubuntu" config.ssh.username = "ubuntu"
config.ssh.password = "${ubuntu_user_pass}" config.ssh.password = "${ubuntu_user_pass}"
config.vm.synced_folder '.', '/vagrant', disabled: true
config.vm.provider "virtualbox" do |vb| config.vm.provider "virtualbox" do |vb|
vb.name = "${prefix}"
vb.customize [ "modifyvm", :id, "--uart1", "0x3F8", "4" ] vb.customize [ "modifyvm", :id, "--uart1", "0x3F8", "4" ]
vb.customize [ "modifyvm", :id, "--uartmode1", "file", File.join(Dir.pwd, "%s-console.log" % vb.name) ] vb.customize [ "modifyvm", :id, "--uartmode1", "file", File.join(Dir.pwd, "${prefix}-console.log") ]
end end
end end
EOF EOF
@ -160,7 +182,10 @@ sed -i "${ovf}" \
-e "s/@@NUM_CPUS@@/2/g" \ -e "s/@@NUM_CPUS@@/2/g" \
-e "s/@@VERSION@@/${version}/g" \ -e "s/@@VERSION@@/${version}/g" \
-e "s/@@DATE@@/${serial_stamp}/g" \ -e "s/@@DATE@@/${serial_stamp}/g" \
-e "s/@@MEM_SIZE@@/1024/g" -e "s/@@MEM_SIZE@@/1024/g" \
-e "s/@@OVF_ID@@/${ovf_id}/g" \
-e "s/@@OVF_OS_TYPE@@/${ovf_os_type}/g" \
-e "s/@@OVF_DESC_BITS@@/${ovf_desc_bits}/g"
ovf_sha256=$(sha256sum ${ovf} | cut -d' ' -f1) ovf_sha256=$(sha256sum ${ovf} | cut -d' ' -f1)
@ -169,7 +194,7 @@ manifest="${box_d}/${prefix}.mf"
cat > "${manifest}" <<EOF cat > "${manifest}" <<EOF
SHA256(${vmdk_f##*/})= ${vmdk_sha256} SHA256(${vmdk_f##*/})= ${vmdk_sha256}
SHA256(${cdrom_vmdk_f##*/})= ${cdrom_sha256} SHA256(${cdrom_vmdk_f##*/})= ${cdrom_sha256}
SHA256(${ovf##*/}.ovf)= ${ovf_sha256} SHA256(${ovf##*/})= ${ovf_sha256}
EOF EOF
# Now create the box # Now create the box

View File

@ -12,4 +12,4 @@ fi
. /build/config/functions . /build/config/functions
# Cleaner execution # Cleaner execution
/bin/run-parts --regex ".*\.binary" "${extra_d}" /bin/run-parts --exit-on-error --regex ".*\.binary" "${extra_d}"

View File

@ -18,8 +18,9 @@
<VirtualSystem ovf:id="@@NAME@@"> <VirtualSystem ovf:id="@@NAME@@">
<Info>A virtual machine</Info> <Info>A virtual machine</Info>
<Name>@@NAME@@</Name> <Name>@@NAME@@</Name>
<OperatingSystemSection ovf:id="100" vmw:osType="other3xLinux64Guest"> <OperatingSystemSection ovf:id="@@OVF_ID@@" vmw:osType="@@OVF_OS_TYPE@@">
<Info>The kind of installed guest operating system</Info> <Info>The kind of installed guest operating system</Info>
<Description>Ubuntu Linux (@@OVF_DESC_BITS@@-bit)</Description>
</OperatingSystemSection> </OperatingSystemSection>
<ProductSection ovf:required="false"> <ProductSection ovf:required="false">

View File

@ -16,8 +16,9 @@
<VirtualSystem ovf:id="@@NAME@@"> <VirtualSystem ovf:id="@@NAME@@">
<Info>A virtual machine</Info> <Info>A virtual machine</Info>
<Name>@@NAME@@</Name> <Name>@@NAME@@</Name>
<OperatingSystemSection ovf:id="100" vmw:osType="other3xLinux64Guest"> <OperatingSystemSection ovf:id="@@OVF_ID@@" vmw:osType="@@OVF_OS_TYPE@@">
<Info>The kind of installed guest operating system</Info> <Info>The kind of installed guest operating system</Info>
<Description>Ubuntu Linux (@@OVF_DESC_BITS@@-bit)</Description>
</OperatingSystemSection> </OperatingSystemSection>
<ProductSection ovf:required="false"> <ProductSection ovf:required="false">

View File

@ -53,6 +53,7 @@ systemd-network:x:112:117:systemd Network Management,,,:/run/systemd/netif:/bin/
systemd-resolve:x:113:118:systemd Resolver,,,:/run/systemd/resolve:/bin/false systemd-resolve:x:113:118:systemd Resolver,,,:/run/systemd/resolve:/bin/false
systemd-bus-proxy:x:114:119:systemd Bus Proxy,,,:/run/systemd:/bin/false systemd-bus-proxy:x:114:119:systemd Bus Proxy,,,:/run/systemd:/bin/false
nm-openvpn:x:115:120:NetworkManager OpenVPN,,,:/var/lib/openvpn/chroot:/bin/false nm-openvpn:x:115:120:NetworkManager OpenVPN,,,:/var/lib/openvpn/chroot:/bin/false
dhcpd:x:116:122::/var/run:/bin/false
EOF EOF
else else
echo "/etc/passwd post-debootstrap hash doesn't match record" >&2 echo "/etc/passwd post-debootstrap hash doesn't match record" >&2
@ -101,6 +102,7 @@ systemd-network:*:16372:0:99999:7:::
systemd-resolve:*:16372:0:99999:7::: systemd-resolve:*:16372:0:99999:7:::
systemd-bus-proxy:*:16372:0:99999:7::: systemd-bus-proxy:*:16372:0:99999:7:::
nm-openvpn:*:16909:0:99999:7::: nm-openvpn:*:16909:0:99999:7:::
dhcpd:*:16925:0:99999:7:::
EOF EOF
else else
echo "/etc/shadow post-debootstrap hash doesn't match record" >&2 echo "/etc/shadow post-debootstrap hash doesn't match record" >&2
@ -186,6 +188,7 @@ systemd-resolve:x:118:
systemd-bus-proxy:x:119: systemd-bus-proxy:x:119:
input:x:121: input:x:121:
nm-openvpn:x:120: nm-openvpn:x:120:
dhcpd:x:122:
EOF EOF
else else
echo "/etc/group post-debootstrap hash doesn't match record" >&2 echo "/etc/group post-debootstrap hash doesn't match record" >&2
@ -271,6 +274,7 @@ systemd-resolve:!::
systemd-bus-proxy:!:: systemd-bus-proxy:!::
input:!:: input:!::
nm-openvpn:!:: nm-openvpn:!::
dhcpd:!::
EOF EOF
else else
echo "/etc/gshadow post-debootstrap hash doesn't match record" >&2 echo "/etc/gshadow post-debootstrap hash doesn't match record" >&2

View File

@ -4,8 +4,19 @@ set -e
echo "Setting up click packages" echo "Setting up click packages"
CLICKARCH=$(dpkg --print-architecture)
click_uri=http://archive-team.internal/click_packages click_uri=http://archive-team.internal/click_packages
if [ "$CLICKARCH" = "arm64" ]; then
# FIXME: this is temporary. Since right now we can't have arm64 clicks in the store
# (before implementing fat-packages), we need to fetch the arm64 click list from a
# different place
click_list=$click_uri/click_list.arm64
click_install_flags="--allow-unauthenticated"
else
click_list=$click_uri/click_list click_list=$click_uri/click_list
click_install_flags=""
fi
click_db=/usr/share/click/preinstalled click_db=/usr/share/click/preinstalled
click_db_custom=/custom/click click_db_custom=/custom/click
@ -20,8 +31,6 @@ tmpdir="$(mktemp -d)"
cleanup () { rm -rf "$tmpdir"; } cleanup () { rm -rf "$tmpdir"; }
trap cleanup EXIT trap cleanup EXIT
CLICKARCH=$(dpkg --print-architecture)
wget --no-verbose -O "$tmpdir/click_list" "$click_list" wget --no-verbose -O "$tmpdir/click_list" "$click_list"
for package in $(cat "$tmpdir/click_list") for package in $(cat "$tmpdir/click_list")
do do
@ -61,7 +70,7 @@ do
mv /etc/click/databases/10_core.conf \ mv /etc/click/databases/10_core.conf \
/etc/click/databases/10_core.conf.tmp /etc/click/databases/10_core.conf.tmp
fi fi
click install --force-missing-framework --root="$root" --all-users \ click install --force-missing-framework --root="$root" --all-users $click_install_flags \
"$tmpdir/$package" "$tmpdir/$package"
if [ "$root" = "$click_db_custom" ]; then if [ "$root" = "$click_db_custom" ]; then
mv /etc/click/databases/10_core.conf.tmp \ mv /etc/click/databases/10_core.conf.tmp \