732 Commits

Author SHA1 Message Date
Daniel Watkins
4e83114045 ubuntu-cpc: When performing a minimized build, don't generate artifacts
that won't boot with the linux-kvm kernel (LP: #1757223).
2018-03-20 16:10:44 -04:00
Balint Reczey
8cc5fb43fa Don't ask for password and GECOS while creating vagrant user 2017-12-21 09:49:49 +01:00
Christopher Glass
7854028092 Changed default user configuration in the vagrant image, in accordance
with the vagrant community's expectations (LP: #1569237)
2017-12-07 14:09:43 +01:00
Balint Reczey
cbf0a7c417 Use default xz compression (-6) for raspi2 image
Xz with -0 generated ~35% bigger compressed image.

LP: #1732681
2017-12-05 22:40:35 +01:00
Balint Reczey
646a88b5ee Use xz -T4 -0 instead of pxz
Test showed very little difference in file-size between -0 and -9 while
both compression and decompression need much less memory and compression
needs less CPU time for -0.

Supported xz versions before 5.2 also accept the -T4 option but ignore it.

Also depend on xz-utils instead of downloading pxz.

LP: #1701132
2017-12-05 22:40:35 +01:00
Balint Reczey
7cc9576845 Depend on packages instead of installing them at run time 2017-12-05 22:40:35 +01:00
Łukasz 'sil2100' Zemczak
03e8249758 For the IMAGEFORMAT=none parts to work for ubuntu-image classic builds, we need to make sure IMAGEFORMAT is preserved and not overwritten if defined. Backporting from trunk. 2017-11-21 17:01:40 +01:00
Christopher Glass
67dab61787 Backport "minimized round 2" changes from trunk to Xenial (LP: #1731492) 2017-11-10 18:41:57 +01:00
Łukasz 'sil2100' Zemczak
5da7c23c81 Backport Gary's commit adding the IMAGEFORMAT=none to support generating a single rootfs. 2017-11-08 12:35:06 +01:00
Steve Langasek
6c56522961 divert /usr/bin/systemd-detect-virt as part of the grub diversions, so
that the grub kernel postinst hook is operational when we're building
in a container.  LP: #1729034.
2017-10-31 10:05:39 -07:00
Steve Langasek
cb73e2475e Make sure to remove any initramfs that was generated in a minimized
image.
2017-10-21 20:53:00 -07:00
Steve Langasek
d5c4f11daa * Use kvm kernel only on amd64.
* Make non-x86 minimized images consistent with x86 by not explicitly
  installing the server task.
* Clean up dangling /boot/initrd.img symlink left behind on minimized
  builds.
2017-10-20 23:10:26 -07:00
Dimitri John Ledkov
22a8f817ca Now that grub-related diversions have been factored out in 2.466
instead of having bogus root=stuff arg generated in grub.cfg, it is
actually empty. Therefore update the sed command to make the arg in
the root= token optional. This should resolve non-booting livecd cpc
images.
2017-10-10 13:49:46 +01:00
Steve Langasek
13c0c8ffd5 Unminimization information should only go to motd when we are actually minimized 2017-10-08 16:10:45 -04:00
Steve Langasek
b2fba90356 Fix the force-partuuid handling to create the file under
/etc/default/grub.d/ with a .cfg extension as grub expects; it's unclear
how this ever worked without.
2017-10-05 16:02:26 +02:00
Steve Langasek
b66cc28507 Factor out grub-related diversions and use them consistently, so we
don't end up with wrong os-probe output in our grub.cfg.
2017-10-05 16:01:04 +02:00
Steve Langasek
60df0277fd Skip installation of kernel headers for all minimal images 2017-10-04 17:41:45 +00:00
Steve Langasek
4a4bac20f6 Use kvm kernel flavor for minimized cloud image, not virtual 2017-10-04 17:41:08 +00:00
Steve Langasek
dfb4c593b1 include adjustments to the minimize/unminimize wording that were made in the merge commit on trunk 2017-10-03 22:23:04 -07:00
Balint Reczey
413a53d482 When SUBPROJECT environment variable is not set assume it to be "" 2017-10-03 17:31:27 +02:00
Balint Reczey
88d854ffb5 Use SUBPROJECT=minimized name instead of SUBPROJECT=minimize for consistency 2017-10-03 17:31:26 +02:00
Balint Reczey
b90b04a7b7 Warn users that unminimize may fail reinstalling packages 2017-10-03 17:31:26 +02:00
Balint Reczey
d33ab3825f Mention unminimize script in motd 2017-10-03 17:31:26 +02:00
Steve Langasek
4d7509f570 Fix a reference to an undefined variable in a script that's set -u. 2017-10-03 17:31:16 +02:00
Balint Reczey
86ed851b5a Force partuuid in /etc/default/grub.d/* instead of in /etc/default/grub
This prevents ucf questions upon installation of changed /etc/default/grub
2017-09-28 09:38:23 -04:00
Steve Langasek
b32298ede1 minimization handling for UEFI disk images 2017-09-28 09:38:23 -04:00
Balint Reczey
1ca59f1c3a Print the documentation files which could not be restored by unminimize 2017-09-28 09:38:23 -04:00
Balint Reczey
a40bd1d55b Explain why unminimization script is a bit complicated 2017-09-28 09:38:23 -04:00
Balint Reczey
8244beb6d1 Verify only documentation that should have been restored after unminimization 2017-09-28 09:38:23 -04:00
Balint Reczey
93fc7c56f2 Use "dpkg --verify-format rpm" explicitly to be safe when the default changes 2017-09-28 09:38:23 -04:00
Balint Reczey
e5cbd2384a Fix typo 2017-09-28 09:38:23 -04:00
Balint Reczey
98f27745b7 Drop initramfs-tools diversion
Kernels which are able to boot without initramfs now dropped dependency
on initramfs-tools thus initramfs-tools can be removed from the image
instead of having to divert it to avoid initramfs generation.
2017-09-28 09:38:23 -04:00
Balint Reczey
e9fc1d8c9f Install ubuntu-minimal while unminimizing the system 2017-09-28 09:38:23 -04:00
Balint Reczey
5e1d0f0ee7 Add unminimize script for reverting minimization on running system 2017-09-28 09:38:23 -04:00
Balint Reczey
9dd178a0e5 Drop man pages and most of the documentation from minimized images
/usr/share/doc/*/copyright and changelog.Debian.gz files are still kept
2017-09-28 09:38:23 -04:00
Balint Reczey
c2d66c7d96 Source config/binary instead of /build/config/binary which may not exist 2017-09-28 09:38:23 -04:00
Steve Langasek
bd2a11774f if we're using SUBPROJECT=minimize, and tzdata is not installed, remove
files that have been left behind.  This is a workaround for a bug that should
be fixed in tzdata.
2017-09-28 09:38:23 -04:00
Steve Langasek
cd15b730f7 In a cloud environment, we can rely on the kernel being able to boot the
root filesystem directly, without an initramfs; enable this when
building minimized.
2017-09-28 09:38:21 -04:00
Steve Langasek
5a6f68a1a9 We probably still want sudo, even in a minimal image. 2017-09-28 09:34:31 -04:00
Steve Langasek
86108d69d9 Make the 999-cpc-fixes.chroot subproject-aware, so we don't try to locale-gen 2017-09-28 09:34:31 -04:00
Steve Langasek
95b06ff341 Export the subproject into config/chroot and config/binary, so that this
information is available to per-project hooks that need to be
subproject-aware (e.g., to skip steps when SUBPROJECT=minimize)
2017-09-28 09:34:31 -04:00
Steve Langasek
527a7b165e Begin adding support for a project-independent 'minimize' subproject,
which (ironically) omits ubuntu-minimal in favor of using only the
minbase package set.
2017-09-28 09:34:31 -04:00
Steve Langasek
9c9e8c4e4f Mount using --make-rslave to ensure safe unmounts for rbind mounts 2017-09-26 01:10:15 -04:00
Steve Langasek
f16611774f * Improve teardown_mountpoint to recursively find all submounts and
unmount them, instead of working from a hard-coded list.  This makes
  the code resilient against other submounts being added later, including
  downstream.
* Also nuke the sleep / udevadm settle calls in the process, which should
  never be required and slow down the builds.
2017-09-19 13:45:37 -07:00
Victor Tapia
13e9dc0089 live-build/ubuntu-cpc/hooks/061-open-iscsi.chroot: generate iSCSI
Initiator Name at first iscsid run for cloud images to ensure it is
unique (LP: #1444992).
2017-09-19 11:03:29 +02:00
Robert C Jennings
a623618e2c Install udev before calls to udevadm 2017-09-13 21:05:22 -05:00
Robert C Jennings
0acda846dd live-build/ubuntu-cpc/functions: Add teardown_mountpoint to reverse setup_mountpoint
* 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.
2017-09-13 13:18:03 -05:00
Steve Langasek
11a92795fe 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.
2017-09-12 13:25:55 -07:00
Steve Langasek
3fdf3933ed Fix suppression of kpartx error. LP: #1684090. 2017-09-11 14:34:09 -07:00
Steve Langasek
314a6b95a3 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.
2017-09-11 14:33:23 -07:00