mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-08-21 13:44:08 +00:00
Compare commits
56 Commits
ubuntu/mas
...
2.408.18
Author | SHA1 | Date | |
---|---|---|---|
|
d330c595ae | ||
|
410703eae5 | ||
|
a623618e2c | ||
|
cf1b95b854 | ||
|
6219443b4c | ||
|
0acda846dd | ||
|
f6897fae71 | ||
|
a99dd8bf9f | ||
|
2c98112f93 | ||
|
11a92795fe | ||
|
b81173b1b5 | ||
|
3fdf3933ed | ||
|
314a6b95a3 | ||
|
880d4f8b89 | ||
|
95aabdf668 | ||
|
a4988ccf13 | ||
|
a75544e0c3 | ||
|
f48670cec5 | ||
|
e3b44822d7 | ||
|
0cabfc3781 | ||
|
02223103c1 | ||
|
8d72b588a1 | ||
|
2569995de8 | ||
|
0fcff1923c | ||
|
2685b836bd | ||
|
95c239f301 | ||
|
e25936cc61 | ||
|
2048477b0d | ||
|
b5bb3c3a6e | ||
|
5081c333bb | ||
|
2c9f9dd323 | ||
|
a0983db864 | ||
|
d50b3ba529 | ||
|
e6793cfa3a | ||
|
28e14a0b77 | ||
|
dacc1ea41e | ||
|
ececc9789d | ||
|
92a10c0df0 | ||
|
4bc9def5d6 | ||
|
188d485441 | ||
|
f2f8665598 | ||
|
40a4d16f3e | ||
|
66aaa4ab40 | ||
|
58dd50b464 | ||
|
f10c47f913 | ||
|
a4f597c84b | ||
|
24c2b2773f | ||
|
8f735f316b | ||
|
5efb2007af | ||
|
8bcc5ca1c2 | ||
|
455d0a6af4 | ||
|
6b04c07371 | ||
|
4079a1acce | ||
|
d51fef0426 | ||
|
b0e649a83c | ||
|
caedaee057 |
189
debian/changelog
vendored
189
debian/changelog
vendored
@ -1,3 +1,192 @@
|
|||||||
|
livecd-rootfs (2.408.18) xenial; urgency=medium
|
||||||
|
|
||||||
|
[ Robert C Jennings ]
|
||||||
|
* Install udev before calls to udevadm
|
||||||
|
|
||||||
|
-- Steve Langasek <steve.langasek@ubuntu.com> Wed, 13 Sep 2017 22:10:11 -0700
|
||||||
|
|
||||||
|
livecd-rootfs (2.408.17) xenial; urgency=medium
|
||||||
|
|
||||||
|
[ Robert C Jennings ]
|
||||||
|
* live-build/ubuntu-cpc/functions: Add a function, teardown_mountpoint,
|
||||||
|
to reverse the work done in setup_mountpoint. Lack of this function
|
||||||
|
has forced users of setup_mountpoint to implement this separately
|
||||||
|
and the implementations have diverged. (LP: #1716992)
|
||||||
|
* live-build/ubuntu-cpc/functions: Remove umount_settle function.
|
||||||
|
The was only used where teardown_mountpoint was lacking.
|
||||||
|
|
||||||
|
-- Steve Langasek <steve.langasek@ubuntu.com> Wed, 13 Sep 2017 12:21:30 -0700
|
||||||
|
|
||||||
|
livecd-rootfs (2.408.16) xenial; urgency=medium
|
||||||
|
|
||||||
|
* live-build/ubuntu-cpc/functions: call apt-get update in the chroot
|
||||||
|
after mounting a blank /var/lib/apt, so that further operations work
|
||||||
|
as expected; otherwise, 'apt-get purge ^grub-.*' fails on s390x because
|
||||||
|
no such packages are known to apt.
|
||||||
|
* live-build/ubuntu-cpc/hooks/030-root-tarball.binary: correct a missing
|
||||||
|
unmount of /var/{lib,cache}/apt on cleanup, detected via autopkgtests.
|
||||||
|
|
||||||
|
-- Steve Langasek <steve.langasek@ubuntu.com> Tue, 12 Sep 2017 13:25:58 -0700
|
||||||
|
|
||||||
|
livecd-rootfs (2.408.15) xenial; urgency=medium
|
||||||
|
|
||||||
|
[ Mathieu Trudel-Lapierre ]
|
||||||
|
* Drop preloading of grub modules that are built into the grub signed
|
||||||
|
image. This is functionally a no-op, changed only to clean up the code.
|
||||||
|
|
||||||
|
[ Steve Langasek ]
|
||||||
|
* live-build/ubuntu-cpc/functions: mount tmpfs on /var/cache/apt and
|
||||||
|
/var/lib/apt, so we don't have to leave empty space in our derivative
|
||||||
|
images for packages that have been downloaded/installed/removed. This
|
||||||
|
normally isn't relevant for the installed system, since the root
|
||||||
|
filesystem will auto-expand in place on the target disk, but lets us
|
||||||
|
ship smaller images.
|
||||||
|
* live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary: call apt-get
|
||||||
|
update *before* installing packages, not after.
|
||||||
|
|
||||||
|
[ Colin Watson ]
|
||||||
|
* Mount and unmount /dev recursively, to cope with setups where there are
|
||||||
|
interesting bind-mounts under /dev (e.g. loop devices bind-mounted by
|
||||||
|
LXD). LP: #1716465.
|
||||||
|
|
||||||
|
[ Balint Reczey ]
|
||||||
|
* Fix suppression of kpartx error. LP: #1684090.
|
||||||
|
|
||||||
|
-- Steve Langasek <steve.langasek@ubuntu.com> Mon, 11 Sep 2017 14:38:42 -0700
|
||||||
|
|
||||||
|
livecd-rootfs (2.408.14) xenial; urgency=medium
|
||||||
|
|
||||||
|
* live-build/auto/config: Filter libgles1-mesa out of tasks, as it is not a
|
||||||
|
dependency of anything in updates anymore, fixing mate/myth (LP: #1704013)
|
||||||
|
|
||||||
|
-- Adam Conrad <adconrad@ubuntu.com> Wed, 12 Jul 2017 16:28:13 -0600
|
||||||
|
|
||||||
|
livecd-rootfs (2.408.13) xenial; urgency=medium
|
||||||
|
|
||||||
|
[ Balint Reczey ]
|
||||||
|
* Source ubuntu-cpc functions from the right place
|
||||||
|
* Use all config hooks from the proper place, not from /build/
|
||||||
|
* Add basic but configurable autopkgtest (LP: #1690440)
|
||||||
|
* sync before calling kpartx to let writing to loop devices finish
|
||||||
|
* wrap kpartx and trap spurious errors, to work around kpartx
|
||||||
|
unreliability.
|
||||||
|
|
||||||
|
-- Steve Langasek <steve.langasek@ubuntu.com> Tue, 06 Jun 2017 21:52:21 -0700
|
||||||
|
|
||||||
|
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
2
debian/control
vendored
@ -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
|
||||||
|
3
debian/tests/control
vendored
Normal file
3
debian/tests/control
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Tests: default-bootstraps
|
||||||
|
Depends: @, lsb-release
|
||||||
|
Restrictions: needs-root isolation-machine
|
97
debian/tests/default-bootstraps
vendored
Executable file
97
debian/tests/default-bootstraps
vendored
Executable file
@ -0,0 +1,97 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# autopkgtest check: Build default rootfs for all supported project:subproject pairs
|
||||||
|
# (C) 2017 Canonical Ltd.
|
||||||
|
# Author: Balint Reczey <balint.reczey@canonical.com>
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ -z "$SUITE"]; then
|
||||||
|
SUITE=$(lsb_release -c -s)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Known project:subproject:template combinations.
|
||||||
|
# Listed subprojects can be combined with other projects as well,
|
||||||
|
# but this list gives reasonable coverage.
|
||||||
|
ALL_TRIPLETS="
|
||||||
|
base::
|
||||||
|
edubuntu::
|
||||||
|
edubuntu-dvd::
|
||||||
|
kubuntu::
|
||||||
|
kubuntu-active::
|
||||||
|
kubuntu-dvd::
|
||||||
|
kubuntu-plasma5::
|
||||||
|
lubuntu::
|
||||||
|
lubuntu-next::
|
||||||
|
mythbuntu::
|
||||||
|
ubuntu::
|
||||||
|
ubuntu-base::
|
||||||
|
ubuntu-budgie::
|
||||||
|
ubuntu-budgie-desktop::
|
||||||
|
ubuntu-budgie-live::
|
||||||
|
ubuntu-core:system-image:ubuntu-core
|
||||||
|
ubuntu-cpc::ubuntu-cpc
|
||||||
|
ubuntu-desktop-next:system-image:ubuntu-desktop-next
|
||||||
|
ubuntu-desktop-next::ubuntu-desktop-next
|
||||||
|
ubuntu-dvd::
|
||||||
|
ubuntu-gnome::
|
||||||
|
ubuntukylin::
|
||||||
|
ubuntu-mate::
|
||||||
|
ubuntu-mate-core::
|
||||||
|
ubuntu-mate-desktop::
|
||||||
|
ubuntu-mate-live::
|
||||||
|
ubuntu-netbook::
|
||||||
|
ubuntu-server::
|
||||||
|
ubuntu-server:ubuntu-rtm:
|
||||||
|
ubuntu-server:ubuntu-rtm/foo:
|
||||||
|
ubuntu-server:wubi:
|
||||||
|
ubuntu-touch-custom::ubuntu-touch-custom
|
||||||
|
ubuntu-touch::ubuntu-touch
|
||||||
|
xubuntu::"
|
||||||
|
|
||||||
|
if [ -z "$SELECTED_TRIPLETS" ]; then
|
||||||
|
SELECTED_TRIPLETS="
|
||||||
|
ubuntu-base::
|
||||||
|
ubuntu-cpc::ubuntu-cpc
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
live_build_rootfs() {
|
||||||
|
PROJECT=${1%%:*}
|
||||||
|
local SUBPROJECT_TMP=${1%:*}
|
||||||
|
SUBPROJECT=${SUBPROJECT_TMP#*:}
|
||||||
|
TEMPLATE=${1##*:}
|
||||||
|
ARCH=$(dpkg --print-architecture)
|
||||||
|
echo "Building rootfs for project: '$PROJECT' subproject: '$SUBPROJECT' template: '$TEMPLATE' in $PWD"
|
||||||
|
cp -a /usr/share/livecd-rootfs/live-build/auto .
|
||||||
|
if [ -n "$TEMPLATE" ]; then
|
||||||
|
cp -a /usr/share/livecd-rootfs/live-build/$TEMPLATE .
|
||||||
|
fi
|
||||||
|
(env PROJECT=$PROJECT \
|
||||||
|
SUBPROJECT=$SUBPROJECT \
|
||||||
|
SUITE=$SUITE \
|
||||||
|
ARCH=$ARCH \
|
||||||
|
lb config
|
||||||
|
)
|
||||||
|
mkdir chroot
|
||||||
|
# this part needs root rights, but right now the whole script ran as root by autopkgtest
|
||||||
|
(env PROJECT=$PROJECT \
|
||||||
|
SUBPROJECT=$SUBPROJECT \
|
||||||
|
ARCH=$ARCH \
|
||||||
|
lb build
|
||||||
|
)
|
||||||
|
echo "Build results for project: '$PROJECT' subproject: '$SUBPROJECT' template: '$TEMPLATE' in $PWD"
|
||||||
|
du -sh *
|
||||||
|
echo ""
|
||||||
|
}
|
||||||
|
|
||||||
|
WORKDIR=$(mktemp -d)
|
||||||
|
trap "RET=\$?; rm -rf $WORKDIR; exit \$RET" 0 INT QUIT ABRT PIPE TERM
|
||||||
|
cd $WORKDIR
|
||||||
|
|
||||||
|
for i in $SELECTED_TRIPLETS; do
|
||||||
|
mkdir $i
|
||||||
|
(cd $i && live_build_rootfs $i)
|
||||||
|
# clean up after build to avoid filling the disk, needs root rights
|
||||||
|
rm -rf $i
|
||||||
|
done
|
||||||
|
|
@ -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 "$@"
|
||||||
|
@ -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 | grep -v libgles1-mesa | 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/
|
||||||
;;
|
;;
|
||||||
|
@ -11,9 +11,22 @@ backing_img=
|
|||||||
apt-get -qqy install dosfstools gdisk
|
apt-get -qqy install dosfstools gdisk
|
||||||
|
|
||||||
clean_loops() {
|
clean_loops() {
|
||||||
|
local kpartx_ret
|
||||||
|
local kpartx_stdout
|
||||||
|
|
||||||
if [ -n "${backing_img}" ]; then
|
if [ -n "${backing_img}" ]; then
|
||||||
kpartx -v -d "${backing_img}"
|
# sync before removing loop to avoid "Device or resource busy" errors
|
||||||
|
sync
|
||||||
|
kpartx_ret=""
|
||||||
|
kpartx_stdout=$(kpartx -v -d "${backing_img}") || kpartx_ret=$?
|
||||||
|
echo "$kpartx_stdout"
|
||||||
|
if [ -n "$kpartx_ret" ]; then
|
||||||
|
if echo "$kpartx_stdout" | grep -q "loop deleted"; then
|
||||||
|
echo "Suppressing kpartx returning error (#860894)"
|
||||||
|
else
|
||||||
|
exit $kpartx_ret
|
||||||
|
fi
|
||||||
|
fi
|
||||||
unset backing_img
|
unset backing_img
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -69,16 +82,35 @@ mount_image() {
|
|||||||
setup_mountpoint() {
|
setup_mountpoint() {
|
||||||
local mountpoint="$1"
|
local mountpoint="$1"
|
||||||
|
|
||||||
mount --bind /dev "$mountpoint/dev"
|
mount --rbind /dev "$mountpoint/dev"
|
||||||
mount devpts-live -t proc "$mountpoint/dev/pts"
|
|
||||||
mount proc-live -t proc "$mountpoint/proc"
|
mount proc-live -t proc "$mountpoint/proc"
|
||||||
mount sysfs-live -t sysfs "$mountpoint/sys"
|
mount sysfs-live -t sysfs "$mountpoint/sys"
|
||||||
mount -t tmpfs none "$mountpoint/tmp"
|
mount -t tmpfs none "$mountpoint/tmp"
|
||||||
|
mount -t tmpfs none "$mountpoint/var/lib/apt"
|
||||||
|
mount -t tmpfs none "$mountpoint/var/cache/apt"
|
||||||
mv "$mountpoint/etc/resolv.conf" resolv.conf.tmp
|
mv "$mountpoint/etc/resolv.conf" resolv.conf.tmp
|
||||||
cp /etc/resolv.conf "$mountpoint/etc/resolv.conf"
|
cp /etc/resolv.conf "$mountpoint/etc/resolv.conf"
|
||||||
|
chroot "$mountpoint" apt-get update
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
teardown_mountpoint() {
|
||||||
|
# Reverse the operations from setup_mountpoint
|
||||||
|
local mountpoint="$1"
|
||||||
|
|
||||||
|
umount "$mountpoint/var/cache/apt"
|
||||||
|
umount "$mountpoint/var/lib/apt"
|
||||||
|
umount "$mountpoint/tmp"
|
||||||
|
umount "$mountpoint/sys"
|
||||||
|
umount "$mountpoint/proc"
|
||||||
|
umount -R "$mountpoint/dev"
|
||||||
|
|
||||||
|
apt-get install -qqy udev
|
||||||
|
udevadm settle
|
||||||
|
sleep 3
|
||||||
|
mv resolv.conf.tmp "$mountpoint/etc/resolv.conf"
|
||||||
|
}
|
||||||
|
|
||||||
mount_partition() {
|
mount_partition() {
|
||||||
partition="$1"
|
partition="$1"
|
||||||
mountpoint="$2"
|
mountpoint="$2"
|
||||||
@ -111,21 +143,11 @@ EOF
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
umount_settle() {
|
|
||||||
# Unmount device, and let it settle
|
|
||||||
umount $1
|
|
||||||
udevadm settle
|
|
||||||
sleep 3
|
|
||||||
}
|
|
||||||
|
|
||||||
umount_partition() {
|
umount_partition() {
|
||||||
local mountpoint=${1}
|
local mountpoint=${1}
|
||||||
mv resolv.conf.tmp "$mountpoint/etc/resolv.conf"
|
teardown_mountpoint $mountpoint
|
||||||
for submnt in proc sys dev/pts dev tmp;
|
umount -R $mountpoint
|
||||||
do
|
udevadm settle
|
||||||
umount_settle $mountpoint/$submnt
|
|
||||||
done
|
|
||||||
umount_settle $mountpoint
|
|
||||||
|
|
||||||
if [ -n "${rootfs_dev_mapper}" -a -b "${rootfs_dev_mapper}" ]; then
|
if [ -n "${rootfs_dev_mapper}" -a -b "${rootfs_dev_mapper}" ]; then
|
||||||
# buildd's don't have /etc/mtab symlinked
|
# buildd's don't have /etc/mtab symlinked
|
||||||
@ -249,4 +271,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"
|
||||||
|
}
|
||||||
|
@ -5,7 +5,7 @@ if [ -n "$SUBARCH" ]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. /build/config/functions
|
. config/functions
|
||||||
|
|
||||||
mkdir binary/boot/filesystem.dir
|
mkdir binary/boot/filesystem.dir
|
||||||
cp -a chroot/* binary/boot/filesystem.dir
|
cp -a chroot/* binary/boot/filesystem.dir
|
||||||
@ -24,9 +24,4 @@ chroot binary/boot/filesystem.dir mkdir /lib/modules
|
|||||||
chroot binary/boot/filesystem.dir rm /usr/sbin/grub-probe
|
chroot binary/boot/filesystem.dir rm /usr/sbin/grub-probe
|
||||||
chroot binary/boot/filesystem.dir dpkg-divert --remove --local --rename /usr/sbin/grub-probe
|
chroot binary/boot/filesystem.dir dpkg-divert --remove --local --rename /usr/sbin/grub-probe
|
||||||
|
|
||||||
mv resolv.conf.tmp "binary/boot/filesystem.dir/etc/resolv.conf"
|
teardown_mountpoint binary/boot/filesystem.dir
|
||||||
umount "binary/boot/filesystem.dir/proc"
|
|
||||||
umount "binary/boot/filesystem.dir/sys"
|
|
||||||
umount "binary/boot/filesystem.dir/dev/pts"
|
|
||||||
umount "binary/boot/filesystem.dir/dev"
|
|
||||||
umount "binary/boot/filesystem.dir/tmp"
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
|
|
||||||
. /build/config/functions
|
. config/functions
|
||||||
|
|
||||||
BOOTPART_START=
|
BOOTPART_START=
|
||||||
BOOTPART_END=
|
BOOTPART_END=
|
||||||
@ -88,7 +88,7 @@ case $ARCH:$SUBARCH in
|
|||||||
# not the best place for this, but neither flash-kernel nor
|
# not the best place for this, but neither flash-kernel nor
|
||||||
# u-boot have provisions for installing u-boot via maintainer
|
# u-boot have provisions for installing u-boot via maintainer
|
||||||
# script
|
# script
|
||||||
/build/config/hooks/raspi2/mkknlimg --dtok \
|
config/hooks/raspi2/mkknlimg --dtok \
|
||||||
mountpoint/usr/lib/u-boot/rpi_2/u-boot.bin \
|
mountpoint/usr/lib/u-boot/rpi_2/u-boot.bin \
|
||||||
mountpoint/boot/firmware/uboot.bin
|
mountpoint/boot/firmware/uboot.bin
|
||||||
;;
|
;;
|
||||||
|
@ -9,7 +9,7 @@ case $ARCH in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
. /build/config/functions
|
. config/functions
|
||||||
|
|
||||||
apt-get -qqy install dosfstools gdisk
|
apt-get -qqy install dosfstools gdisk
|
||||||
|
|
||||||
@ -61,18 +61,22 @@ install_grub() {
|
|||||||
efi_boot_dir="/boot/efi/EFI/BOOT"
|
efi_boot_dir="/boot/efi/EFI/BOOT"
|
||||||
chroot mountpoint mkdir -p "${efi_boot_dir}"
|
chroot mountpoint mkdir -p "${efi_boot_dir}"
|
||||||
|
|
||||||
|
chroot mountpoint apt-get -y update
|
||||||
|
|
||||||
|
# The modules below only make sense on non-Secure Boot UEFI systems.
|
||||||
|
# Otherwise, with Secure Boot enabled GRUB will refuse to load them.
|
||||||
|
# Any modules already in debian/build-efi-images do not need to be listed.
|
||||||
|
# Furthermore, other modules such as terminal, video_* and efi_* are all
|
||||||
|
# already available.
|
||||||
case $ARCH in
|
case $ARCH in
|
||||||
arm64)
|
arm64)
|
||||||
chroot mountpoint apt-get -qqy install --no-install-recommends grub-efi-arm64 grub-efi-arm64-bin
|
chroot mountpoint apt-get -qqy install --no-install-recommends grub-efi-arm64 grub-efi-arm64-bin
|
||||||
grub_modules="part_gpt fat gzio ext2 normal chain boot configfile linux search_fs_uuid search_label terminal serial video video_fb efi_gop"
|
grub_modules="serial"
|
||||||
efi_target=arm64-efi
|
efi_target=arm64-efi
|
||||||
;;
|
;;
|
||||||
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="multiboot serial usb usb_keyboard"
|
||||||
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
|
||||||
@ -80,8 +84,9 @@ install_grub() {
|
|||||||
cat << EOF >> mountpoint/etc/default/grub.d/50-cloudimg-settings.cfg
|
cat << EOF >> mountpoint/etc/default/grub.d/50-cloudimg-settings.cfg
|
||||||
${CLOUD_IMG_STR}
|
${CLOUD_IMG_STR}
|
||||||
# For Cloud Image compatability
|
# For Cloud Image compatability
|
||||||
GRUB_PRELOAD_MODULES="${grub_modules}"
|
GRUB_PRELOAD_MODULES="${GRUB_PRELOAD_MODULES:-$grub_modules}"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
chroot mountpoint grub-install "${loop_device}" \
|
chroot mountpoint grub-install "${loop_device}" \
|
||||||
--boot-directory=/boot \
|
--boot-directory=/boot \
|
||||||
--efi-directory=/boot/efi \
|
--efi-directory=/boot/efi \
|
||||||
@ -108,16 +113,16 @@ 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
|
||||||
chroot mountpoint apt-get -y update
|
|
||||||
|
|
||||||
rm mountpoint/tmp/device.map
|
rm mountpoint/tmp/device.map
|
||||||
sync
|
sync
|
||||||
umount mountpoint/boot/efi
|
umount mountpoint/boot/efi
|
||||||
sleep 5
|
sleep 5
|
||||||
|
apt-get install -qqy udev
|
||||||
udevadm settle
|
udevadm settle
|
||||||
mount
|
mount
|
||||||
umount_partition mountpoint
|
umount_partition mountpoint
|
||||||
|
@ -7,7 +7,7 @@ case $ARCH in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
. /build/config/functions
|
. config/functions
|
||||||
|
|
||||||
create_partitions() {
|
create_partitions() {
|
||||||
disk_image="$1"
|
disk_image="$1"
|
||||||
@ -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
|
||||||
|
@ -12,7 +12,7 @@ esac
|
|||||||
|
|
||||||
apt-get install -qqy qemu-utils
|
apt-get install -qqy qemu-utils
|
||||||
|
|
||||||
. /build/config/functions
|
. config/functions
|
||||||
|
|
||||||
if [ -f binary/boot/disk.ext4 ]; then
|
if [ -f binary/boot/disk.ext4 ]; then
|
||||||
convert_to_qcow2 binary/boot/disk.ext4 livecd.ubuntu-cpc.disk1.img
|
convert_to_qcow2 binary/boot/disk.ext4 livecd.ubuntu-cpc.disk1.img
|
||||||
|
@ -11,7 +11,7 @@ case $ARCH in
|
|||||||
exit 0;;
|
exit 0;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
. /build/config/functions
|
. config/functions
|
||||||
|
|
||||||
if [ -e binary/boot/disk.ext4 ]; then
|
if [ -e binary/boot/disk.ext4 ]; then
|
||||||
create_vmdk binary/boot/disk.ext4 livecd.ubuntu-cpc.disk1.vmdk
|
create_vmdk binary/boot/disk.ext4 livecd.ubuntu-cpc.disk1.vmdk
|
||||||
|
@ -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
|
||||||
exit 0;;
|
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;;
|
||||||
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
|
||||||
|
@ -1,35 +1,41 @@
|
|||||||
#!/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
|
||||||
echo "Vagrant images are not supported for $ARCH"
|
ovf_os_type="ubuntu64Guest"
|
||||||
exit 0
|
ovf_desc_bits=64 ;;
|
||||||
|
i386)
|
||||||
|
ovf_id=93
|
||||||
|
ovf_os_type="ubuntu32Guest"
|
||||||
|
ovf_desc_bits=32 ;;
|
||||||
|
*)
|
||||||
|
echo "Vagrant images are not supported for $ARCH yet."
|
||||||
|
exit 0;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ ! -e ${base_vmdk} ]; then
|
. config/functions
|
||||||
echo "Did not find VMDK to produce Vagrant images."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
. /build/config/functions
|
|
||||||
|
|
||||||
# Virtualbox is needed for making a small VMDK
|
# Virtualbox is needed for making a small VMDK
|
||||||
apt-get -qqy install genisoimage qemu-utils
|
apt-get -qqy install genisoimage qemu-utils
|
||||||
@ -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
|
||||||
|
|
||||||
@ -151,16 +173,19 @@ cp ${my_d}/ovf/ubuntu-ova-v1-cloudcfg-vmdk.tmpl ${ovf}
|
|||||||
serial_stamp=$(date +%Y%m%d)
|
serial_stamp=$(date +%Y%m%d)
|
||||||
sed -i "${ovf}" \
|
sed -i "${ovf}" \
|
||||||
-e "s/@@NAME@@/${prefix}-${serial_stamp}/g" \
|
-e "s/@@NAME@@/${prefix}-${serial_stamp}/g" \
|
||||||
-e "s/@@FILENAME1@@/${vmdk_f##*/}/g" \
|
-e "s/@@FILENAME1@@/${vmdk_f##*/}/g" \
|
||||||
-e "s/@@VMDK_FILE_SIZE@@/${vmdk_size}/g" \
|
-e "s/@@VMDK_FILE_SIZE@@/${vmdk_size}/g" \
|
||||||
-e "s/@@VMDK_CAPACITY@@/${vmdk_capacity}/g" \
|
-e "s/@@VMDK_CAPACITY@@/${vmdk_capacity}/g" \
|
||||||
-e "s/@@FILENAME2@@/${cdrom_vmdk_f##*/}/g" \
|
-e "s/@@FILENAME2@@/${cdrom_vmdk_f##*/}/g" \
|
||||||
-e "s/@@VMDK_FILE_SIZE2@@/${cdrom_size}/g" \
|
-e "s/@@VMDK_FILE_SIZE2@@/${cdrom_size}/g" \
|
||||||
-e "s/@@VMDK_CAPACITY2@@/${cdrom_capacity}/g" \
|
-e "s/@@VMDK_CAPACITY2@@/${cdrom_capacity}/g" \
|
||||||
-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
|
||||||
@ -181,16 +206,16 @@ OVA information:
|
|||||||
VMDK Name: ${vmdk_f##*/}
|
VMDK Name: ${vmdk_f##*/}
|
||||||
VMDK Capacity: ${vmdk_capacity}
|
VMDK Capacity: ${vmdk_capacity}
|
||||||
VMDK SHA256: ${vmdk_sha256}
|
VMDK SHA256: ${vmdk_sha256}
|
||||||
CDROM Name: ${cdrom_vmdk_f##*/}
|
CDROM Name: ${cdrom_vmdk_f##*/}
|
||||||
CDROM Capacity: ${cdrom_capacity}
|
CDROM Capacity: ${cdrom_capacity}
|
||||||
CDROM SHA256: ${cdrom_sha256}
|
CDROM SHA256: ${cdrom_sha256}
|
||||||
EOM
|
EOM
|
||||||
|
|
||||||
tar -C ${box_d} \
|
tar -C ${box_d} \
|
||||||
-cf ${cur_d}/livecd.ubuntu-cpc.vagrant.box \
|
-cf ${cur_d}/livecd.ubuntu-cpc.vagrant.box \
|
||||||
box.ovf \
|
box.ovf \
|
||||||
Vagrantfile \
|
Vagrantfile \
|
||||||
metadata.json \
|
metadata.json \
|
||||||
${prefix}.mf \
|
${prefix}.mf \
|
||||||
${vmdk_f##*/} \
|
${vmdk_f##*/} \
|
||||||
${cdrom_vmdk_f##*/}
|
${cdrom_vmdk_f##*/}
|
||||||
|
@ -9,7 +9,7 @@ if [ ! -d ${my_dir}/extra ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Export the common functions to the extras
|
# Export the common functions to the extras
|
||||||
. /build/config/functions
|
. config/functions
|
||||||
|
|
||||||
# Cleaner execution
|
# Cleaner execution
|
||||||
/bin/run-parts --regex ".*\.binary" "${extra_d}"
|
/bin/run-parts --exit-on-error --regex ".*\.binary" "${extra_d}"
|
||||||
|
@ -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">
|
||||||
|
@ -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">
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
click_list=$click_uri/click_list
|
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_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 \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user