391 Commits

Author SHA1 Message Date
Joshua Powers
a9249b1773
amd64: revert all grub changes for xenial
For LP: #1901906, on other releases we ensured that grub-pc is always
installed with shim-signed. However, xenial has different behavior that
does not work the same. This reverts those changes back to what
livecd-rootfs was before any of those changes were made, keeping only
the autoremove packages work.

LP: #1901906
2020-12-04 13:26:52 -08:00
Joshua Powers
e196306173
amd64: always install grub-efi-amd64-signed
shim-signed does not depend on grub-efi-amd64-signed in Xenial.
Historically, Xenial did not always ship with signatures. This is
different than LTSes after Xenial where this is the case. A future SRU
for grub should change this, but for now ensure to install the signed
package so that secure boot systems can actually boot.

LP: #1901906
2020-12-02 10:44:22 -08:00
Robert C Jennings
98238df82a
Merge xenial-sru-grub into ubuntu/xenial [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/393733
2020-11-20 15:26:53 -06:00
Joshua Powers
370db20757
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:19:10 -08:00
Cody Shepherd
aede5df67b
Skip jasper for buildd subproject 2020-10-26 09:40:53 -07:00
Cody Shepherd
bd20b4321b
Set ports/archive as appropriate for default mirror 2020-10-06 10:20:43 -07:00
Cody Shepherd
0e66c9e3f0
Set a default archive mirror 2020-10-06 10:20:43 -07:00
Cody Shepherd
172a7dd55c
Add hooks to build bootable buildd images
Only install policyrd-script-zg2 in lxd tarball
2020-10-06 10:20:41 -07:00
Michael Hudson-Doyle
d70309b7e0 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:47:26 +13:00
Łukasz 'sil2100' Zemczak
baf2b5bcdd Backport enabling of adding extra snaps to ubuntu-core images via the EXTRA_SNAPS environment 2019-10-30 17:30:10 +01:00
Robert C Jennings
53e8eeaee3
magic-proxy: dump proxy log to stdout on failure (LP: #1847300)
When we encounter a failure in 'lb binary' the launchpad builders can
only surface the build output from stdout.  If the binary hook failure
implicates the archive we can not determine fault without the apt
proxy log.  This patch will dump the proxy log to stdout to aid in
debugging these failures.
2019-10-08 11:02:30 -05:00
Colin Watson
6049019a8b Fix exclusion of makedev from buildd chroots
debootstrap doesn't respect --exclude for "Priority: required" packages,
so we have to purge makedev later.

LP: #1844504
2019-09-24 14:31:40 +01:00
Colin Watson
566b3f3a3e Exclude makedev from buildd chroots
It was historically excluded, and apparently breaks some builds (e.g.
mir).
2019-09-17 13:42:33 +02:00
Robert C Jennings
8f8ea8922e
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 14:05:08 -05:00
Robert C Jennings
77ae8d704f
ubuntu-cpc: parallel builds
* Replace "snap download" with tool that uses snap store's coherence feature

    This is important for parallel image builds to ensure all pre-seeded snaps
    have the same versions across image variants.

* Inject a proxy into the build providing a snapshot view of the package repo.

    When the REPO_SNAPSHOT_STAMP variable is set, the auto/build script will attempt
    to launch a transparent HTTP proxy on port 8080, and insert an iptables rule to
    redirect all outgoing HTTP requests to this proxy.

    The proxy, contained in the `magic-proxy` Python script, examines each request
    and silently overrides those pointing to InRelease files or files that are
    listed in InRelease files. It will instead provide the contents of the requested
    file as it was at REPO_SNAPSHOT_STAMP, by downloading the corresponding asset
    "by hash".

* Use series files with dependency handling to generate hook symlinks dynamically

    This patch currently only applies to the "ubuntu-cpc" project.

    More and more logic has been going into the hook scripts to decide
    under which conditions they should run or not. As we are moving
    to parallelized builds of image sets, this will get even more
    complicated. Base hooks will have to know which image sets they
    belong to and modification of the dependency chain between scripts
    will become more complicated and prone to errors, as the number of
    image sets grows.

    This patch introduces explicit ordering and dependency handling for
    scripts through the use of `series` files and an explicit syntax
    for dependency specification.
2019-05-21 17:06:59 -05:00
Colin Watson
8414b699da Drop code to handle buildd images for != xenial 2019-02-05 14:23:10 +00:00
Colin Watson
6c9fc6f3ec Move buildd image building to binary hooks 2019-01-16 12:53:33 +00:00
Colin Watson
6e9d7f35ca Add a LXD image to builds for the buildd subproject 2019-01-16 12:53:33 +00:00
Colin Watson
aec5f3666a Add a buildd subproject 2019-01-16 12:53:30 +00:00
Cody Shepherd
1f05fbea69 Backport adding snaps to image manifests (LP: #1805497) 2018-11-27 11:53:59 -08:00
Steve Langasek
fef73e9a90 Merge lp:~rcj/livecd-rootfs/xenial-proposed 2018-11-16 08:37:10 -08:00
Łukasz 'sil2100' Zemczak
f64e3c9981 As Steve pointed out, the auto/build PREFIX change was a move, not an addition. 2018-10-29 17:57:43 +01:00
Robert C Jennings
91ba932fec Disable checksum generation (LP: #1799773) 2018-10-24 14:20:01 -05:00
Łukasz 'sil2100' Zemczak
872d4f6e7f For the pc model, the name changed so we need to special case it a bit. 2018-10-11 17:13:35 +02:00
Łukasz 'sil2100' Zemczak
3291e971de The model assertions for 18 don't actually use series=18 because that would be too logical. 2018-10-10 21:59:36 +02:00
Łukasz 'sil2100' Zemczak
706685a5a2 Backport support for building core images with ubuntu-image. 2018-10-04 19:33:10 +02:00
Francis Ginther
aadb032e68 Update unminimize script text and install ubuntu-standard when unminimizing a minimal image (LP: #1778777) 2018-07-02 16:43:35 -05:00
Robert C Jennings
d6c5d54dfa Fix unbound variable in config/binary and zero UEFI partition
* Zero fill space in UEFI partitions, too
* Set LB_ISO_PREPARER to livecd-rootfs to avoid unbound variable in default string
2018-06-08 09:12:22 -07:00
Robert C Jennings
8e53c77a11 snap: Alternate fix for snap pre-seeding (LP: #1775710)
* Backport: Refactor functions out of ubuntu-cpc and ubuntu-server hooks.
  * Backport: Add dependency on distro-info for snap preseeding
2018-06-07 17:35:12 -07:00
Robert C Jennings
c7878bdc76 snaps: Fixes for snap pre-seeding (LP: #1775710)
* Add dependency on distro-info for snap preseeding
* Move snap-related functions to avoid conflicts with ubuntu-cpc functions
2018-06-07 14:54:23 -07:00
Mathieu Trudel-Lapierre
f4424e223e Backport snap preseeding functions from bionic. (LP: #1771177) 2018-06-07 14:53:22 -07:00
Michael Hudson-Doyle
4fe56fe700 prefer tabs for indentation 2018-05-09 10:20:49 +12:00
Michael Hudson-Doyle
0c41250141 add a word 2018-05-09 10:09:03 +12:00
Michael Hudson-Doyle
18c8049a23 Set the default locale to C.UTF-8 in minimized cloud images.
(LP: #1759003)
2018-05-09 09:37:18 +12:00
Christopher Glass
1198bb65d4 ubuntu-cpc: When performing a minimized build make sure the
/etc/cloud/build.info file says "minimal" (LP: #1759519)
2018-03-28 14:19:50 +02: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
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
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
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
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