218 Commits

Author SHA1 Message Date
Ivan Kapelyukhin
89719c2ff3
perf(cpc): split disk-image-uefi out of disk-image series file
Due to how `disk-image` file is structured, it builds BIOS and UEFI
images at the same time. However, certain images (e.g., GCE images)
require only UEFI image to be built, BIOS image is being simply
discarded. This results in longer build times.

Splitting out `disk-image-uefi` would allow images to use it instead of
`disk-image` and thus avoid building unused BIOS images.

`disk-image` now depends on `disk-image-uefi` for backward
compatibility.

(cherry picked from commit b40ce74fd67bbaa7f9ec94463d8da759724f9fec)
2022-03-03 15:59:20 +01:00
Gauthier Jolly
8039471375
ubuntu-cpc: secure esp mountpoint (LP: #1881006)
Change mount option for ubuntu-cpc images from "defaults" to
"umask=0077". ESP partitions might contain sensitive data and
non-root users shouldn't have read access on it.
2021-03-18 10:17:09 +00:00
Dimitri John Ledkov
d447d167dc
Perform fsck on all rootfs.
LP: #1912835
(cherry picked from commit 33b7272a2331279b4c7aa8de73ed8a9069d0bd39)
2021-02-09 00:58:56 +00:00
Dimitri John Ledkov
bcb48c1625
esp: perform fsck.
LP: #1912835
(cherry picked from commit 53b28d5f58284657ee8efd08a633d557af1fcd97)
2021-02-09 00:58:50 +00:00
Dimitri John Ledkov
319341bda5
esp: install grub in ubuntu bootloader id path, instead of removable.
Do not use removable uefi bootloader path in the cloud-images by
default, as that prevents upgrades of the bootloader.

LP: #1912830
(cherry picked from commit 7c760864fdcb278ca37396f06f5e3f297428d63d)
2021-02-09 00:58:43 +00:00
Robert C Jennings
b5e21920dd
Merge bionic-sru-grub into ubuntu/bionic [a=powersj] [r=patviafore,rcj]
SRU always install grub-pc with shim-signed (LP: #1901906), and ensure to autoremove packages

MP: https://code.launchpad.net/~powersj/livecd-rootfs/+git/livecd-rootfs-1/+merge/393734
2020-11-20 15:06:31 -06:00
Joshua Powers
d5a2099c33
amd64: always install grub-pc with shim-signed
shim-signed depends on grub-efi-amd64-signed, which in turn has
alternative depends on either `grub-efi-amd64 | grub-pc`. However to
support booting with either via shim&signed-grub and BIOS, the choice
must be made to install grub-pc, not grub-efi-amd64.

This makes images consistent with Ubuntu Deskop, Live Server, buildd
bootable images; all of which already do install grub-pc and
shim-signed.

Additionally, this will ensure that autoremove is run after installing
anything in the CPC build hooks. This is done to avoid shipping images
that include packages that are autoremovable. This will clean-up as
packages are installed and detect any breakage at build time.

LP: #1901906
2020-11-13 09:13:59 -08:00
Pat Viafore
457170a92c
Make Ubuntu Vagrant box 40G. (LP: #1580596)
Vagrant images were previously put at 10G, but this was a regression
from Trusty, in which they were 40G.  This made it a tough sell for
users to upgrade if they were using a Ubuntu desktop experience.

This change does not impact disk usage as Vagrant with the virtualbox
provider dynamically allocates space with the VMDK.  On a test system,
the VMDK took up 1.1G of disk space according to df, and after
creating a 2G file in Vagrant, the VMDK grew to 3.1G.

Therefore, users who are running on a system with little free space will
not see adverse effects if they upgrade to a new vagrant image
2020-05-22 15:38:32 -05:00
Łukasz 'sil2100' Zemczak
fcaa6d447c Ensure seed part. is mounted; wait for getty 2020-01-24 18:55:34 +01:00
Michael Hudson-Doyle
d381420065 Preserve apt preferences created by any package we install (i.e. ubuntu-advantage-tools) against live-build's attempt to delete them. (LP: #1855354) 2019-12-19 15:45:17 +13:00
Łukasz 'sil2100' Zemczak
f212eb9a73 Merge branch 'hyperv-bionic' of git+ssh://git.launchpad.net/~davidkrauser/livecd-rootfs/+git/livecd-rootfs into ubuntu/bionic 2019-11-12 21:17:15 +01:00
Łukasz 'sil2100' Zemczak
ce1b1cf815 Backport the 999-ubuntu-image-customization changes, add a delta on top to still support the old legacy raspi2 images. 2019-10-23 12:41:40 +02:00
David Krauser
335470331c Add support for HyperV Gallery images 2019-10-09 16:05:14 -04:00
Robert C Jennings
1f8eb7b8dc
ubuntu-cpc: use sys.exit() rather than quit() 2019-08-30 12:38:38 -05:00
Robert C Jennings
08e6f93a75
ubuntu-cpc: remove unused final.binary hook support
Right now this is a solution looking for a problem as the implementation
no longer relies on it.
2019-08-30 12:38:38 -05:00
Robert C Jennings
39fb950de2
ubuntu-cpc: rework image artifact cleanup
The livecd.ubuntu-cpc.ext4 that is present in each build (plus kernel
and initrd) are not renamed from /build/binary/boot/filsystem.ext4
and friends until after the binary hooks are run, so this patch moves
from trying to perform this cleanup in a binary hook.  Now the cleanup
will be run at the end of live-build/binary for the ubuntu-cpc project.
2019-08-30 12:38:37 -05:00
Robert C Jennings
f7cd30f59a
ubuntu-cpc: Only produce explicitly named artifacts (LP: #1837254)
In parallel builds where a list of image targets are provided the build
may produce binaries that are not part of the named set of targets but
are created by series dependencies.  These implicitly created binaries
may be generated by multiple builds but are unused as our convention for
the ubuntu-cpc project is to only consume binaries from the explicitly
named image targets; this avoid overwriting the same object by multiple
parallel builds.

This patch adds support for a 'provides' keyword for series files. It can
be specified multiple times per series file.  The field is used by the
make-hooks script to generate a list of output files created explicitly by
the named image targets.  The list is saved to the "explicit_provides"
file in the hooks output directory. In the case of the "all" target
this list would be empty.  This list is consumed by the "final.binary"
hook file.

This patch adds support for optional final.binary hooks in hooks.d/base
and/or hooks.d/extra.  These final.binary hooks are always included as
the last hook(s) if either exist with the hook in "extra" running last.

The base/final.binary hook includes logic to parse the "explicit_provides"
file generated by the make-hooks script and remove any binary output not
explicitly specified.

Some series files named unnecessary dependencies, specifically
disk-image, to keep output of implicit artifacts consistent between
parallel builds.  These unnecessary dependencies are removed in this
patch.
2019-08-30 12:38:36 -05:00
Robert C Jennings
aa06de9ae1
ubuntu-cpc: Ensure base disk image is the same between all build targets
The following targets have livecd.ubuntu-cpc.manifest (and
livecd.ubuntu-cpc.ext4) which differ in some way from the 'all'
target. They are all missing grub-efi and other modifications:

root-dir
squashfs
tarball

These targets do not depend on the 'disk-image' target. This means that
the ext4 produced will lack the uefi modifications (and any from the
disk-image target binary hooks).

Since the ext4 file is common to all builds there is a chance that a
parallel build from one of these targets could overwrite this artifact.
This patch ensures that all targets will produce consistent base output.
2019-05-21 15:52:06 -05:00
Robert C Jennings
7da22ddf55
ubuntu-cpc: Allow comments in series files
An upcoming addition of the disk-image target to several series files will
required some explanation.  Without comment support in series files that
is not possible.  This patch adds support for comments in series files.
2019-05-21 15:52:06 -05:00
Robert C Jennings
3029676441
ubuntu-cpc: parallel builds: Remove old targets
Also fix references to the old file names in the hooks
2019-05-21 15:52:06 -05:00
Robert C Jennings
d154f08e04
ubuntu-cpc: parallel builds: Add hook generation tooling 2019-05-21 15:51:40 -05:00
Robert C Jennings
f2e2efcbbb
ubuntu-cpc: parallel builds: Re-organize hooks 2019-05-21 15:49:33 -05:00
Balint Reczey
df69f3bcd9 Build WSL rootfs tarball
LP: #1827930
2019-05-17 14:55:50 +02:00
Steve Langasek
3229f51cc6 Also don't create the update-motd directory since we're not writing to it.
It will almost certainly be created at some point but we don't need to
create it here.
2019-03-12 12:25:48 -07:00
Steve Langasek
c87f87e4e1 Drop /etc/update-motd.d/51-cloudguest from cloud images; this is not consistent with current Ubuntu Advantage product language. Any future customizations to update-motd for cloud images should be done via a package instead. 2019-03-12 11:53:03 -07:00
Łukasz 'sil2100' Zemczak
dbdf9e4a00 ARCH is not available in .chroot hooks so we need to get the architecture manually. 2019-01-18 16:58:08 +01:00
Łukasz 'sil2100' Zemczak
770a7b4c85 Add the 100-purge-grub-legacy-ec2-arm.chroot to ubuntu-cpc 2019-01-15 14:45:02 +01:00
Cody Shepherd
6527da055d Change call to add grub efi packages using new create_manifests()
function.
2018-11-27 11:29:57 -08:00
Cody Shepherd
00c8b06004 Include snaps in image manifests 2018-11-27 11:16:45 -08:00
Cody Shepherd
35c780c190 Include grub efi packages in uefi image manifests. 2018-10-25 09:22:46 -07:00
Dimitri John Ledkov
96065b96c8 releasing package livecd-rootfs version 2.525.9 2018-09-20 13:43:39 +02:00
Daniel Watkins
d97233a7bb * ubuntu-cpc: Reintroduce the -root.tar.xz artifact (LP: #1585233).
* ubuntu-cpc: Generate the root image contents once, and use it for both the
  -root.tar.xz and the .squashfs.
* ubuntu-cpc: Generate -root.tar.xz with --xattrs.
2018-08-06 16:23:06 -04:00
Daniel Watkins
87c11b5114 Don't fail to build CPC images if /lib/modules already exists in the
squashfs.
2018-04-24 12:01:44 -04:00
Daniel Watkins
12339422c5 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 14:30:27 -04:00
Dimitri John Ledkov
815c3dfc10 Whitelist preserving "unowned" /var/log/journal. Maybe systemd package
should own the directory, and only adjust the permissions in
postinst. LP: #1754332
2018-03-16 18:38:22 +00:00
Dimitri John Ledkov
bc194dd48b Build EFI armhf images. 2018-03-06 12:58:38 +00:00
Dimitri John Ledkov
d4fe705be7 Stop building vagrant.box, ova, vmdk images for i386.
https://trello.com/c/zhisDVTq
2018-02-05 15:37:52 +00:00
Steve Langasek
c02f0f0f4c Install grub-ieee1275 instead of grub2 on ppc64el; grub2 is a dummy
transitional package in universe.
2017-12-06 14:22:41 -08:00
Michael Hudson-Doyle
c24e13f8f9 install grub-ieee1275 instead of grub2 on ppc64el
grub2 is a dummy transitional package that is in universe.
2017-12-01 13:44:32 +13:00
Balint Reczey
532bd5b5ed Build minimized images in a 1GiB image 2017-11-23 20:27:16 +01:00
Balint Reczey
c45ea223b4 Use default xz compression (-6) for raspi2 image
Xz with -0 generated ~35% bigger compressed image.

LP: #1732681
2017-11-20 21:18:33 +01:00
Balint Reczey
578fa5a92d Update changelog 2017-11-14 19:04:21 +01:00
Balint Reczey
4a168af954 Skip setting up initrd for s390x when it is not generated for the image
This fixes building minimized s390x images.
2017-11-14 18:44:06 +01:00
Steve Langasek
51890b5b43 add 'file' to the axe list for minimized 2017-10-18 18:11:53 -07:00
Steve Langasek
c9b427c11b Another round of package removals for minimization 2017-10-18 17:50:56 -07:00
Steve Langasek
c0bb8d760f remove vim a little harder 2017-10-13 23:52:03 -04:00
Steve Langasek
783437f533 instead, call apt clean from the chroot 2017-10-13 21:50:26 -04:00
Steve Langasek
dec765f035 no actual point in apt clean here, since that just cleans files from the bind mount 2017-10-13 21:40:02 -04:00
Steve Langasek
bc361bc33b call apt clean separately for the squashfs 2017-10-13 17:35:33 -04:00
Steve Langasek
dc875735b8 More packages to remove when minimizing 2017-10-13 17:25:50 -04:00