Michael Vogt
3b3fe0fce8
Run "snap debug validate-seed" to do basic validation of the generated seed.yaml
...
(cherry picked from commit b208ded59ea9e54ad42bd071a39cebe2e4809aa4)
Signed-off-by: Iain Lane <iain.lane@canonical.com>
2019-07-16 11:42:00 +01:00
Tobias Koch
51ef72e5b9
Backport error-checking on determining snap bases
...
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1828500
Signed-off-by: Iain Lane <iain.lane@canonical.com>
2019-07-16 11:38:53 +01:00
Tobias Koch
31e4f4fe02
Backport improvements to snap seeding from trunk.
...
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1831675
Signed-off-by: Steve Langasek <steve.langasek@canonical.com>
2019-06-05 16:37:38 -07:00
Cody Shepherd
00c8b06004
Include snaps in image manifests
2018-11-27 11:16:45 -08:00
Daniel Watkins
42ef796b92
Remove necessarily true conditional
2018-04-18 20:01:40 -04:00
Daniel Watkins
fe76613e69
Require brand:model to be passed to snap_prepare_assertions
...
We only need the default in one place, so remove it from all but the top-level
function.
2018-04-18 20:00:43 -04:00
Daniel Watkins
38518507ec
Generalise other assertion paths
2018-04-18 14:47:41 -04:00
Daniel Watkins
265218c1cb
Don't include model assertion name in FS path (LP: #1764541 )
...
There can only be one model assertion, so we don't need to disambiguate them.
This also brings us in line with the behaviour of `snap prepare-image`, and
consistency is nice.
2018-04-18 12:41:47 -04:00
Daniel Watkins
a09c14c0ab
Fix missing local variables
2018-04-18 10:06:55 -04:00
Daniel Watkins
a844c6f8cd
Fix another unbound variable
2018-04-17 22:01:47 -04:00
Daniel Watkins
ed50ee0e0d
Fix use of unbound variable
2018-04-17 17:35:10 -04:00
Daniel Watkins
d908e89a52
Fix typo
2018-04-17 16:32:44 -04:00
Daniel Watkins
54649b40c3
Allow custom model assertions in snap_prepare_assertions
...
This also splits up the preparation in to two functions, so that images that
want to use a custom model assertion but don't have any snaps to preinstall
don't end up with the core snap installed.
2018-04-17 14:46:56 -04:00
Robert C Jennings
26f31fbd9c
live-build/functions: spelling fix
2018-04-10 16:33:22 -05:00
Robert C Jennings
5f12253791
live-build/functions: Help developers resolve snap download issues
2018-04-10 15:03:23 -05:00
Robert C Jennings
73dba1f31a
snap preseeding: capture Ubuntu snap seeding policy in code
...
When no channel is given for a pre-seeded snap, the channel
should be stable/ubuntu-XX.YY to match Ubuntu policy.
This patch adds the LB_DISTRIBUTION var to config/{binary,chroot}
to have a common way of determining the Ubuntu XX.YY version
number between hooks and auto/build.
2018-04-10 11:59:19 -05:00
Robert C Jennings
cbcb5d3ed8
live-build/functions: reduce scope of snap account variable
...
* Only shell out to set $account when we need to use it.
* Reduce scope of $account to make it local to the function
* Fix indenting within an 'if' block
2018-04-10 10:09:26 -05:00
Robert C Jennings
0dbaf4cc9d
live-build/functions: Drop spurious backslash
2018-04-06 20:14:23 -05:00
Robert C Jennings
936c3dbc79
live-build/functions: Update snap seed.yaml format to comply with yaml spec
2018-04-06 17:05:15 -05:00
Robert C Jennings
829716a6d7
live-build/functions: Change arithmetic to make the file 'sh' friendly
2018-04-06 17:03:27 -05:00
Robert C Jennings
e655aff7b1
live-build/functions: Migrate from generic snap account-id
2018-04-06 12:51:47 -05:00
Robert C Jennings
152adcaa04
live-build/functions: add snap preseeding support
2018-04-03 05:12:22 -05:00
Steve Langasek
8fddc6b469
Merge lp:~vorlon/livecd-rootfs/many-loops
2018-03-06 10:30:25 +01:00
Michael Hudson-Doyle
4407aaf1ae
it is config/common, not config/binary, grr
2018-02-23 14:58:03 +13:00
Michael Hudson-Doyle
27eaa9328a
source config/binary in 032-installer-squashfs.binary
2018-02-23 13:38:15 +13:00
Michael Hudson-Doyle
3e69d30c9e
remove some of the cargo culted scorpions
2018-02-23 09:52:26 +13:00
Michael Hudson-Doyle
4b66f89e56
move skip_lb_stage to config
2018-02-23 09:37:51 +13:00
Michael Hudson-Doyle
416ef912ed
make another possibly more generally useful function
2018-02-23 09:30:29 +13:00
Michael Hudson-Doyle
c85cae9bfe
respond to some review feedback
2018-02-23 09:18:33 +13:00
Balint Reczey
3631c1f778
Zero fill space in UEFI partitions, too
2017-11-23 20:27:16 +01:00
Steve Langasek
1976255e5c
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 09:58:22 -07:00
Steve Langasek
dfaf247193
Properly handle loop device names when there are > 10 devices on the
...
system.
2017-10-21 00:54:02 -07:00
Dimitri John Ledkov
4b9e6e811f
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:23:30 +01:00
Steve Langasek
90e7ee57c3
and the filename was still wrong
2017-10-04 23:50:26 -07:00
Steve Langasek
bc221a8d67
fix a remaining wrong reference to /etc/default/grub.d/40-partuuid
2017-10-04 23:38:22 -07:00
Steve Langasek
a75cbf210b
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-04 22:51:30 -07:00
Steve Langasek
a5e27120c0
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-04 22:33:41 -07:00
Balint Reczey
c5d01a6635
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-27 18:54:09 -04:00
Steve Langasek
3ed1f4fdd1
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-26 22:39:09 -04:00
Balint Reczey
45201111a6
Mount using --make-rslave to ensure safe unmounts for rbind mounts
2017-09-25 11:42:28 -04:00
Steve Langasek
801aad2f77
* 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-13 13:42:28 -07:00
Steve Langasek
c9ef91e262
Restore the call to 'umount -R $mountpoint' from umount_partition,
...
accidentally dropped in previous upload.
2017-09-13 12:50:07 -07:00
Robert C Jennings
83b4f5338c
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:31:12 -05:00
Steve Langasek
a246300940
* live-build/functions: mount tmpfs on /var/cache/apt and var/lib/apt, so
...
we don't have to leave empty space in our derivative images for packages
that have been downloaded/installed/removed. This normally isn't
relevant for the installed system, since the root filesystem will
auto-expand in place on the target disk, but lets us ship smaller
images.
* live-build/functions: also call 'apt-get update' after mounting the
blank /var/lib/apt.
2017-09-12 14:36:50 -07:00
Colin Watson
6a42148b22
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).
2017-09-08 11:48:06 +01:00
Balint Reczey
4d72521491
Fix suppressing kpartx error
2017-08-30 16:46:47 +02:00
Balint Reczey
3b37842219
Use VMDKstream in a more future-proof way
2017-07-24 20:46:51 +02:00
Robert C Jennings
f05a8a238f
live-build/functions: Update path for VMDKstream.py
...
LP: #1706116
2017-07-24 19:20:21 +02:00
Balint Reczey
6c9cf10d72
Depend on pxz and vmdk-stream-converter instead of installing them at runtime
2017-06-14 18:25:15 +02:00
Balint Reczey
aa54a130c3
Depend on packages in main instead of installing them at runtime
2017-06-14 18:25:11 +02:00