2467 Commits

Author SHA1 Message Date
Jean-Baptiste Lallement
38bb0b3301 Fix grub divert for multilayer images
grub-probe must not be called during image build so grub is diverted. In
multilayer image the chroot is always the tip of the filesystem, so we
divert grub at the beginning of each pass and undivdert it as the end.
For flat images, it's diverted just before building the chroot and
undiverted after.
2019-03-18 09:33:07 +01:00
Steve Langasek
41c342ebe2 releasing package livecd-rootfs version 2.569 2.569 2019-03-14 10:05:54 -07:00
Steve Langasek
e5e1c8dc96 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:30 -07:00
Steve Langasek
4ca92b04a7 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:47:01 -07:00
Steve Langasek
8deb87f037 releasing package livecd-rootfs version 2.568 2.568 2019-03-11 18:14:53 -07:00
Steve Langasek
ea5f01942f divert grub when calling into lb chroot
UbuntuStudio image builds have recently begun failing as a result of adding a
grub theme customization to their flavor, which they then try to apply by
running update-grub from their maintainer scripts.  This fails with:

  Setting up plymouth-theme-ubuntustudio (0.57) ...
  update-alternatives: using /usr/share/plymouth/themes/ubuntustudio-logo/ubuntustudio-logo.plymouth to provide /usr/share/plymouth/themes/default.plymouth (default.plymouth) in auto mode
  update-alternatives: using /usr/share/plymouth/themes/ubuntustudio-text/ubuntustudio-text.plymouth to provide /usr/share/plymouth/themes/text.plymouth (text.plymouth) in auto mode
  update-initramfs: diverted by livecd-rootfs (will be called later)
  /usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
  dpkg: error processing package plymouth-theme-ubuntustudio (--configure):
   installed plymouth-theme-ubuntustudio package post-installation script subprocess returned error exit status 1

Packages providing grub themes should be able to call update-grub from their
maintainer scripts, and they should be able to be installed under
livecd-rootfs.  It's surprising to me that this hasn't been a problem before
now for any flavors.

We know that grub-probe should not be called as part of an image build, so
just use our standard helper function to divert it before running the chroot
stage and undivert it after.
2019-03-09 20:08:29 +00:00
Tobias Koch
3cebce2fb9 snap-tool: exit non-zero if problem occurred 2019-02-27 10:17:38 +01:00
Julian Andres Klode
d8962ee22f releasing package livecd-rootfs version 2.567 2.567 2019-02-27 09:02:17 +01:00
Julian Andres Klode
b0684bbeee Fix change to ignore ubiquity packages, it failed to mark anything as automatic. 2019-02-27 09:02:10 +01:00
Julian Andres Klode
57d23cf034
releasing package livecd-rootfs version 2.566 2.566 2019-02-26 08:57:23 +01:00
Tobias Koch
3a294f5b50 magic-proxy: return 404 when InRelease file cannot be found "by hash"
When the magic-proxy script could not find a valid InRelease file for the
configured timestamp, it would fall back to serving the canonical version
of it. This meant that builds would succeed, even though snap-shotting the
repository failed.

This update makes the script return HTTP 404 when an InRelease by-hash
link for a given combination of mirror, suite and timestamp cannot be
found.
2019-02-26 08:43:34 +01:00
Julian Andres Klode
b2db5bf365 Do not mark direct dependencies of ubiquity as auto installed
This caused cryptsetup to remain auto on the installed system

LP: #1801629
2019-02-22 11:00:14 +01:00
Steve Langasek
e8f064324b releasing package livecd-rootfs version 2.565 2.565 2019-02-20 08:26:22 +01:00
Steve Langasek
1053349a32 Drop python3-minimal alternate dependency; nothing should depend on python3-minimal. 2019-02-20 08:26:11 +01:00
Steve Langasek
d314a8c9b1 Also drop dependency on python. 2019-02-20 08:24:46 +01:00
Steve Langasek
5e6f65e374 releasing package livecd-rootfs version 2.564 2.564 2019-02-19 08:28:59 +01:00
Steve Langasek
7e4a2627ed Use python3 vmdkstream exclusively; we should not fall back to python2. 2019-02-18 18:06:01 +01:00
Colin Watson
b5ff7a0618 releasing package livecd-rootfs version 2.563 2.563 2019-02-18 15:58:19 +00:00
Colin Watson
3b22ad381a Make sure buildd images have a /usr/sbin/policy-rc.d symlink
Installing policyrcd-script-zg2 doesn't quite do this because of the way
that live-build installs its own temporary version of policy-rc.d.  The
only remotely sensible way I can see to deal with this is to create the
symlink manually.
2019-02-18 14:58:59 +00:00
Dimitri John Ledkov
5376c013a7
releasing package livecd-rootfs version 2.562 2.562 2019-02-18 12:01:55 +01:00
Dimitri John Ledkov
a77ec4a9df
Add python3 vmdkstream support 2019-02-18 12:01:25 +01:00
Dimitri John Ledkov
89dee6610d
subiquity: make subiqutiy_config.mount optional 2019-02-18 10:27:16 +01:00
Dimitri John Ledkov
37d9b77b95
subiquity: make subiqutiy_config.mount optional
Remove wants from local-fs.target, add wants from the uuid device instead.

Tested by applying these changes from pre-pivot-root by modifying
/root files in place whilst booting with break=bottom.
2019-02-18 10:26:08 +01:00
Łukasz 'sil2100' Zemczak
cd6a85cfde releasing package livecd-rootfs version 2.561 2.561 2019-02-07 12:40:44 +01:00
Łukasz 'sil2100' Zemczak
8c8b7164d4 Support building pi3-arm64 core18 images. At the same time, make sure we still use the right gadget tree repository for the classic arm64 pi3 image. 2019-02-06 18:11:27 +01:00
Balint Reczey
039ed8ec31 Merge fixing minimized text spacing 2019-02-06 17:55:10 +07:00
Balint Reczey
3cf7de97cc Update changelog 2.560 2019-02-05 19:51:38 +07:00
Balint Reczey
0182d380ca Nicely separate motd text about minimizing from texts above 2019-02-05 17:24:09 +07:00
Balint Reczey
8a78ab4021 Merge make-rprivate-before-umount 2019-02-05 17:10:49 +07:00
Balint Reczey
96cc185813 Merge feature/parallelization-snap-version-fixing 2019-02-05 17:06:24 +07:00
Balint Reczey
9f532ad4cf Update changelog 2019-02-05 17:04:08 +07:00
Didier Roche
1c435c03d2 Fix customized images with multiple brand/models
Some customized images are built from the same chroot, but need to
override brands and models.
2019-02-05 10:13:37 +01:00
Tobias Koch
eabe867003 Bugfix: specify channel when requesting snap info 2019-02-05 10:05:15 +01:00
Tobias Koch
654fcae467 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.
2019-02-05 10:04:40 +01:00
Balint Reczey
33c5ad0b19 live-build/functions: Always use mount --make-private before umount
Util-linux 2.33 fixed mount --rbind --make-rslave which did not pass MS_REC
with MS_BIND and livecd-rootfs did only --bind --make-rslave effectively with
prior mount versions.
While mount --rbind --rslave are properly passed the flags to mount()
unmounting did not work cleanly with --make-rslave.

To clearly stop propagation of umount, --make-private is used instead of
--make-rslave and it is always set before umounts. Umount -R is replaced
with a simple umount since submounts are tore down in teardown_mountpoint()
earlier.

LP: #1813730
2019-02-05 07:54:37 +07:00
Balint Reczey
a06d208871 Merge branch feature/parallelization-pkg-version-fixing 2019-02-04 23:03:56 +07:00
Colin Watson
305d5cef50 Drop code to handle buildd images for <disco
We'll deal with those in stable updates instead.
2019-02-01 18:07:58 +00:00
Colin Watson
36af2769dc Disable merged /usr in buildd images
Otherwise we might end up building packages with hardcoded paths that
assume a merged /usr.
2019-02-01 18:03:20 +00:00
Colin Watson
fe59f6fce8 Add ubuntu-base:buildd: to ALL_TRIPLETS 2019-02-01 18:03:15 +00:00
Tobias Koch
5b70d86f5c 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".
2019-02-01 11:26:20 +01:00
Didier Roche
7d42c3f4b4 releasing package livecd-rootfs version 2.559 2.559 2019-02-01 08:05:48 +01:00
Michael Hudson-Doyle
211213216d Merge branch 'jibel-layers' into ubuntu/master 2019-02-01 17:22:35 +13:00
Michael Hudson-Doyle
ae04fee7c2 changelog entry 2019-02-01 17:22:25 +13:00
Michael Hudson-Doyle
a9991a908e revert change to ubuntu-server:live snap seeding 2019-02-01 17:22:25 +13:00
Jean-Baptiste Lallement
3dce125d72 Remove inidrd and vmlinuz from live layers after they've been moved to casper 2019-01-31 12:16:07 +01:00
Jean-Baptiste Lallement
f5d3233c64 Fixed wonky indentation 2019-01-31 09:39:22 +01:00
Jean-Baptiste Lallement
f84d92d76f Calculate total size of the image + typos 2019-01-30 12:29:57 +01:00
Jean-Baptiste Lallement
3db920c40c Fixed quoting of subproject variable 2019-01-30 12:29:57 +01:00
Jean-Baptiste Lallement
52d9bd3ead Run live specific scripts on non live layers
Allow execution of lb_binary_linux-image and lb_chroot_live-packages on
any layer by setting LIVE_PASSES.
2019-01-30 12:29:56 +01:00
Jean-Baptiste Lallement
d1a2e24c41 Adds reduce_pass_size
Adds a function reduce_pass_size which removes duplicated files between
layers. A duplicate file is a file with same path, size, mode, owners
and content on 2 related layers.
2019-01-30 12:29:56 +01:00