1257 Commits

Author SHA1 Message Date
Steve Langasek
39f2558b96 Fix the sed script that Tobias had right in the first place and I mangled in the previous upload. 2019-04-13 02:13:17 -07:00
Steve Langasek
f4fa240ed7 Adjust sed command for clarity. 2019-04-12 13:37:02 -07:00
Tobias Koch
79e3123053 Make snapd-explicit-install-stamp a part of the image 2019-04-12 13:37:02 -07:00
Tobias Koch
796211dde7 If image has core18 snaps only, automatically preseed snapd 2019-04-12 13:37:02 -07:00
Tobias Koch
05e71b3840 Do not include any snaps in ubuntu-cpc:minimized builds 2019-04-12 13:37:02 -07:00
Balint Reczey
2d162dd121 Pass --sort=name to tar to make tarballs more reproducible and rsync-friendly 2019-04-10 14:38:35 +02:00
Robert C Jennings
a45342f269
ubuntu-cpc: avoid duplicate snaps listed in qcow manifest
commit a993592 introduced an additional call to create_manifest
(and snap-seed-parse) to write binary/boot/filesystem.packages. This
caused duplicate snap lines in the qcow manifest. This is because the
live-build/auto/binary code assumes that after 'lb binary' is run the
filesystem.packages will only have debs and it calls snap-seed-parse to
add them to the file. The commit changed filesystem.packages in the
ubuntu-cpc uefi binary hook to include debs and snaps.

This patch keeps the intent of the prior patch, updating the
filesystem.packages file for the content of the uefi disk image, but
only writes a listing of debian packages to match the expected content
of filesystem.packages.  The snaps will still be added in generic code
in live-build/auto/build.
2019-03-29 15:39:47 -05:00
Dimitri John Ledkov
036d7d2949
Make serial-subiquity@ use the same codepath as tty1 subiquity.
Such that subiquity runs in the correct environment.
Depends on: https://github.com/CanonicalLtd/subiquity/pull/428
2019-03-21 12:27:15 +00:00
Didier Roche
b20cf752e6 Add languages to live pass
The name of the pass is live and not "ubuntu-live" which is the live pass
default task.
2019-03-20 17:10:05 +01:00
Dimitri John Ledkov
1ab438750d
Revert "subiquity: fix name of mdoules.squashfs to mount"
This reverts commit 98e0b1031d931cbe87f3744613f05557e3bc9acf.
2019-03-20 00:57:41 +00:00
Dimitri John Ledkov
98e0b1031d
subiquity: fix name of mdoules.squashfs to mount
ubuntu-cdimage/debian-cd/tools/add_live_filesystem helpfully adds a
'filesystem.' prefix to the squashfs, hence the name of the file
didn't match what's on disk.
2019-03-18 14:18:27 +00:00
Didier Roche
995f3cf9e0 Ensure default langpacks are removed after installation
Add langpacks to live tasks to have them in the ubiquity diff file and
thus, purged after installation if not selected. (LP: #1818890)
2019-03-18 09:45:47 +01:00
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
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
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
Steve Langasek
7e4a2627ed Use python3 vmdkstream exclusively; we should not fall back to python2. 2019-02-18 18:06:01 +01: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
a77ec4a9df
Add python3 vmdkstream support 2019-02-18 12:01:25 +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
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
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
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
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
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
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
Jean-Baptiste Lallement
402cdd15be Adds is_root_layer
Factored the code to detect if a layer is a root layer in function
is_root_layer and execute lb_chroot_archives only on root layers.
2019-01-30 12:29:56 +01:00
Jean-Baptiste Lallement
283871573d Changed the naming scheme for multi layer images to dot format 2019-01-30 12:29:56 +01:00
Jean-Baptiste Lallement
addef92e23 Decouple from ubuntu-cdimage & debian-cd landings
We don't want to regress the ubuntu desktop traditional image when
livecd-rootfs lands uncordinated with ubuntu-cdimage & debian-cd.
Decoupling enables us to:
- land livecd-rootfs (no change for ubuntu-desktop project,
ubuntu-desktop:ubiquity-ng can be tested once the 2 others branches
lands)
- land ubuntu-cdimage & debian-cd for publishing any arbitrary squashfs
names
- finally, revert that commit and land it in livecd-rootfs to transform
the traditional ubuntu-desktop image to a layered approach.
2019-01-30 12:29:56 +01:00
Jean-Baptiste Lallement
2d2ce6eea4 Rename chroot.$PASS -> overlay.$PASS 2019-01-30 12:29:56 +01:00
Jean-Baptiste Lallement
e0d30dd2d3 Fixed substract -> subtract 2019-01-30 12:29:56 +01:00
Jean-Baptiste Lallement
15cacaee96 configure network manager _after_ installing network-manager 2019-01-30 12:29:56 +01:00
Jean-Baptiste Lallement
41becb0af7 Ensure snaps are available on ubuntu-server live 2019-01-30 12:29:56 +01:00
Jean-Baptiste Lallement
e0ed85c400 Fixed pattern for matching manifest 2019-01-30 12:29:56 +01:00
Jean-Baptiste Lallement
3075d65578 Cleanup and handle manifest-remove files
manifest-remove files are generated in all cases and removed for
projects/subprojects that don't need it like the new ubiquity.
2019-01-30 12:29:56 +01:00
Jean-Baptiste Lallement
9dba350834 Added lb_binary_layered
Created lb_binary_layered based on lb_binary
Factorized several helpers
These helpers are called from lb_chroot
2019-01-30 12:29:56 +01:00
Jean-Baptiste Lallement
43ec452fa0 Moved reusable functions to functions
Moved functions to reuse in lb_binary and lb_chroot to functions
2019-01-30 12:29:56 +01:00