mirror of
https://git.launchpad.net/livecd-rootfs
synced 2026-04-18 15:11:02 +00:00
Compare commits
57 Commits
26.04.25
...
ubuntu/mas
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b0b18a273 | ||
|
|
558772b76b | ||
|
|
481697772b | ||
|
|
b18389e00b | ||
|
|
57eae14ef2 | ||
|
|
fa24747150 | ||
|
|
7c7b1b7c28 | ||
|
|
445e2c8664 | ||
|
|
2f12636aa5 | ||
|
|
86849598e0 | ||
|
|
c698479689 | ||
|
|
a68ab81199 | ||
|
|
0d7a22dd26 | ||
|
|
29baaee6b0 | ||
|
|
621eb44506 | ||
|
|
d7615a2237 | ||
|
|
4a0c43b28a | ||
|
|
55ac901ace | ||
|
|
f63cae6452 | ||
|
|
51d2b8b649 | ||
|
|
5c832654a7 | ||
|
|
7b5b77ff68 | ||
|
|
170f595da5 | ||
|
|
f1df4aeef1 | ||
|
|
57bf691d9d | ||
|
|
f0f48eaffe | ||
|
|
9d10c80865 | ||
|
|
06fe6a52fa | ||
|
|
503957e278 | ||
|
|
cbd0149281 | ||
|
|
db9f7564b8 | ||
|
|
da0b48e2bd | ||
|
|
7ac1f7ceb2 | ||
|
|
7126d85e23 | ||
|
|
5b043a05e2 | ||
|
|
b77fefbbba | ||
|
|
344a43bb0c | ||
|
|
f340ef5416 | ||
|
|
34ed622949 | ||
|
|
c563ba5bf2 | ||
|
|
2e501bc3a9 | ||
|
|
8b3805065d | ||
|
|
b156e2c6ad | ||
|
|
93c96af216 | ||
|
|
ace1c5f700 | ||
|
|
f432528b70 | ||
|
|
24af8f137c | ||
|
|
94963d8070 | ||
|
|
cd968f5717 | ||
|
|
6d331d4d0b | ||
|
|
edec1f4a3f | ||
|
|
51fa2b9b92 | ||
|
|
eaef671f74 | ||
|
|
816eaed015 | ||
|
|
51624c1b44 | ||
|
|
1975bbd52b | ||
|
|
916b693130 |
106
README.local
Normal file
106
README.local
Normal file
@ -0,0 +1,106 @@
|
||||
# Running livecd-rootfs builds locally
|
||||
|
||||
`livecd-rootfs` is notoriously known to be... difficult?
|
||||
One question that often comes back is "how do I run that locally?".
|
||||
Brace yourself, here is a short guide to help you through this.
|
||||
|
||||
## Where to run?
|
||||
|
||||
While you could do that directly on your host machine, likely your development
|
||||
laptop, that would mean installing all the needed dependencies, and running
|
||||
livecd-rootfs as root (because of some `mount` steps, `chroot`, etc...).
|
||||
Not ideal.
|
||||
What you more likely want, and is documented here, is to run that in a LXD VM
|
||||
instead.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
You need to have LXD installed and configured: https://canonical.com/lxd/install
|
||||
A clone of this repository, that will be used directly in the VM so that
|
||||
you can iterate and test changes easily before submitting them:
|
||||
```
|
||||
git clone https://git.launchpad.net/livecd-rootfs
|
||||
```
|
||||
|
||||
## Build images
|
||||
|
||||
All the magic is done by the `./live-build/build-livefs-lxd` script. It will
|
||||
basically perform the following actions for you:
|
||||
* Launch (or re-start) a LXD VM on the `series` you're targetting.
|
||||
* Install in there `livecd-rootfs` from the archive, to make sure all
|
||||
dependencies are here and ready to use.
|
||||
* Mount the `livecd-rootfs` sources in `/srv/livecd-rootfs`.
|
||||
* Run `./live-build/build-livefs` with all the additional arguments you give.
|
||||
That's what will build the ISO for you, take a lot of time, and bring your
|
||||
machine down.
|
||||
|
||||
Depending on what you want to work on, the iteration time can be quite long.
|
||||
Fortunately `livecd-rootfs` provides many different projects to work with,
|
||||
providing various experiences in terms of load, space, bandwidth and running
|
||||
time.
|
||||
|
||||
Very fast and lightweight "fake" ISO:
|
||||
```
|
||||
❯ ./live-build/build-livefs-lxd --suite resolute --arch amd64 --project ubuntu-test-iso
|
||||
```
|
||||
|
||||
Ubuntu Desktop, the main flagship, and probably most complex ISO:
|
||||
```
|
||||
❯ ./live-build/build-livefs-lxd --suite resolute --arch amd64 --project ubuntu
|
||||
```
|
||||
|
||||
Ubuntu Server Live, lighter ISO:
|
||||
```
|
||||
❯ ./live-build/build-livefs-lxd --suite resolute --arch amd64 --project ubuntu-server --subproject live
|
||||
```
|
||||
|
||||
Xubuntu Minimal, lighter desktop ISO:
|
||||
```
|
||||
❯ ./live-build/build-livefs-lxd --suite resolute --arch amd64 --project xubuntu --subproject minimal
|
||||
```
|
||||
|
||||
## Fetching the image
|
||||
|
||||
Obviously, the image has been built inside the LXD VM, so you then need to extract it. Examples:
|
||||
```
|
||||
❯ lxc file pull livefs-builder-resolute/root/livecd.ubuntu-test-iso.iso my_ubuntu-test-iso.iso
|
||||
❯ lxc file pull livefs-builder-resolute/root/livecd.ubuntu.iso my_ubuntu.iso
|
||||
❯ lxc file pull livefs-builder-resolute/root/livecd.ubuntu-server.iso my_ubuntu-server.iso
|
||||
❯ lxc file pull livefs-builder-resolute/root/livecd.xubuntu.iso my_xubuntu.iso
|
||||
```
|
||||
|
||||
The fetched ISO should normally boot and work just fine. For example with QEMU:
|
||||
```
|
||||
❯ kvm -m 3G -smp 2 -cdrom ./my_xubuntu.iso
|
||||
```
|
||||
|
||||
## Clean up
|
||||
|
||||
This will leave you with a running VM eating some precious 8GB from your host.
|
||||
You can stop and/or delete that VM with these:
|
||||
```
|
||||
❯ lxc stop livefs-builder-resolute
|
||||
❯ lxc delete livefs-builder-resolute
|
||||
```
|
||||
|
||||
## Speeding things up with `apt-cacher-ng`
|
||||
|
||||
All the previous steps work just fine, but when iterating, it's often very
|
||||
useful to cache all the package downloads, which can speed things up a lot,
|
||||
particularly if you don't live in one of Canonical's datacenters.
|
||||
|
||||
Basically, on your host:
|
||||
```
|
||||
❯ sudo apt install apt-cacher-ng
|
||||
❯ cat ~/.config/livecd-rootfs/build-livefs.conf
|
||||
[defaults]
|
||||
mirror = http://192.168.0.42:3142/archive.ubuntu.com/ubuntu
|
||||
```
|
||||
|
||||
`~/.config/livecd-rootfs/build-livefs.conf` is indeed stored on your host, but
|
||||
will be copied automatically at the right place if it exists.
|
||||
|
||||
There, `192.168.0.42` is your local network IP, reachable from the LXD VM, on
|
||||
which `apt-cacher-ng` is listening.
|
||||
Other `apt` caching solutions might be working, but are untested.
|
||||
|
||||
94
debian/changelog
vendored
94
debian/changelog
vendored
@ -1,3 +1,97 @@
|
||||
livecd-rootfs (26.04.34) resolute; urgency=medium
|
||||
|
||||
* Set build type to Release for final ISO builds.
|
||||
|
||||
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Sat, 18 Apr 2026 08:21:53 +1200
|
||||
|
||||
livecd-rootfs (26.04.33) resolute; urgency=medium
|
||||
|
||||
[ Matthew Stepan ]
|
||||
* Hyper-V: Migrate .pkla files to .rules files following the removal of the
|
||||
polkit-pkla package from the archive.
|
||||
* Hyper-V: Add dracut `hostonly=no` config to fix image boot hanging while
|
||||
trying to find the rootfs.
|
||||
* Hyper-V: Fix sed to correctly set GDM `InitialSetupEnable=false`.
|
||||
|
||||
[ Michael Hudson-Doyle ]
|
||||
* Do not run 03-initramfs-enforcement.chroot for kubuntu, which is not a
|
||||
layered build.
|
||||
|
||||
[ Denis Lalaj ]
|
||||
* feat(buildd): Set dracut as the default initrd generator
|
||||
|
||||
-- Florent 'Skia' Jacquet <skia@ubuntu.com> Fri, 17 Apr 2026 12:22:45 +0200
|
||||
|
||||
livecd-rootfs (26.04.32) resolute; urgency=medium
|
||||
|
||||
[ Alfonso Sanchez-Beato ]
|
||||
* Add support for building Ubuntu Core 26 images.
|
||||
|
||||
[ Valentin Haudiquet ]
|
||||
* Make sure kernel is 'vmlinux' on riscv64, and not 'vmlinuz'
|
||||
|
||||
[ Michael Hudson-Doyle & Simon Poirier ]
|
||||
* Add a hook 03-initramfs-enforcement.chroot to many ISO builds to ensure
|
||||
that the live layer gets an initramfs built with casper and
|
||||
initramfs-tools. (LP: #2146567)
|
||||
|
||||
[ Aaron Rainbolt ]
|
||||
* Disable Apparmor restrictions in the live environment for Kubuntu and
|
||||
Ubuntu Unity. (LP: #2146196, #2146369)
|
||||
|
||||
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Thu, 16 Apr 2026 09:23:08 +1200
|
||||
|
||||
livecd-rootfs (26.04.31) resolute; urgency=medium
|
||||
|
||||
[ Ryan Hill ]
|
||||
* Add additional 7.0 kernel apparmor features for
|
||||
successful image preseeding.
|
||||
|
||||
-- Chloé 'kajiya' Smith <chloe.smith@canonical.com> Mon, 13 Apr 2026 15:45:19 +0100
|
||||
|
||||
livecd-rootfs (26.04.30) resolute; urgency=medium
|
||||
|
||||
[ Florent 'Skia' Jacquet]
|
||||
* Pick a better manifest by using the live pass for layered images (LP: #2147921)
|
||||
|
||||
[ Dan Bungert ]
|
||||
* Exclude boot/grub/i386-pc/eltorito.img from md5sum.txt, as it is expected
|
||||
to change in xorriso output. (LP: #2147162)
|
||||
|
||||
-- Florent 'Skia' Jacquet <skia@ubuntu.com> Mon, 13 Apr 2026 15:16:01 +0200
|
||||
|
||||
livecd-rootfs (26.04.29) resolute; urgency=medium
|
||||
|
||||
* Make sure to produce a manifest for all images (LP: #2147522)
|
||||
|
||||
-- Florent 'Skia' Jacquet <skia@ubuntu.com> Wed, 08 Apr 2026 16:12:59 +0200
|
||||
|
||||
livecd-rootfs (26.04.28) resolute; urgency=medium
|
||||
|
||||
* Switch arm64 mirror from ports to archive. (LP: #2147101)
|
||||
|
||||
-- Utkarsh Gupta <utkarsh@ubuntu.com> Thu, 02 Apr 2026 18:34:10 +0530
|
||||
|
||||
livecd-rootfs (26.04.27) resolute; urgency=medium
|
||||
|
||||
[ Michael Hudson-Doyle ]
|
||||
* Only publish the ISOs, not the other bits, now that we are publishing the
|
||||
ISOs on cdimage.
|
||||
* Fix mini iso to not contain a pool or squashfs.
|
||||
|
||||
[ Ryan Hill ]
|
||||
* add 7.0 kernel apparmor features preseeds
|
||||
|
||||
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Thu, 02 Apr 2026 15:59:29 +1300
|
||||
|
||||
livecd-rootfs (26.04.26) resolute; urgency=medium
|
||||
|
||||
* Ensure snapd tracks stable and not edge anymore.
|
||||
We did remove it from multiple places, but this one was left and as a
|
||||
consequence, the latest iso was still having snapd edge.
|
||||
|
||||
-- Didier Roche-Tolomelli <didrocks@ubuntu.com> Fri, 27 Mar 2026 15:31:21 +0100
|
||||
|
||||
livecd-rootfs (26.04.25) resolute; urgency=medium
|
||||
|
||||
* bake LIVECD_ROOTFS_ROOT into config/functions, fixing some build failures
|
||||
|
||||
1
live-build/apparmor/7.0/capability
Normal file
1
live-build/apparmor/7.0/capability
Normal file
@ -0,0 +1 @@
|
||||
0xffffff
|
||||
1
live-build/apparmor/7.0/caps/extended
Normal file
1
live-build/apparmor/7.0/caps/extended
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/caps/mask
Normal file
1
live-build/apparmor/7.0/caps/mask
Normal file
@ -0,0 +1 @@
|
||||
chown dac_override dac_read_search fowner fsetid kill setgid setuid setpcap linux_immutable net_bind_service net_broadcast net_admin net_raw ipc_lock ipc_owner sys_module sys_rawio sys_chroot sys_ptrace sys_pacct sys_admin sys_boot sys_nice sys_resource sys_time sys_tty_config mknod lease audit_write audit_control setfcap mac_override mac_admin syslog wake_alarm block_suspend audit_read perfmon bpf checkpoint_restore
|
||||
1
live-build/apparmor/7.0/dbus/mask
Normal file
1
live-build/apparmor/7.0/dbus/mask
Normal file
@ -0,0 +1 @@
|
||||
acquire send receive
|
||||
1
live-build/apparmor/7.0/domain/attach_conditions/xattr
Normal file
1
live-build/apparmor/7.0/domain/attach_conditions/xattr
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/domain/change_hat
Normal file
1
live-build/apparmor/7.0/domain/change_hat
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/domain/change_hatv
Normal file
1
live-build/apparmor/7.0/domain/change_hatv
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/domain/change_onexec
Normal file
1
live-build/apparmor/7.0/domain/change_onexec
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/domain/change_profile
Normal file
1
live-build/apparmor/7.0/domain/change_profile
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/domain/computed_longest_left
Normal file
1
live-build/apparmor/7.0/domain/computed_longest_left
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/domain/disconnected.ipc
Normal file
1
live-build/apparmor/7.0/domain/disconnected.ipc
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/domain/disconnected.path
Normal file
1
live-build/apparmor/7.0/domain/disconnected.path
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/domain/fix_binfmt_elf_mmap
Normal file
1
live-build/apparmor/7.0/domain/fix_binfmt_elf_mmap
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/domain/interruptible
Normal file
1
live-build/apparmor/7.0/domain/interruptible
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/domain/kill.signal
Normal file
1
live-build/apparmor/7.0/domain/kill.signal
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/domain/post_nnp_subset
Normal file
1
live-build/apparmor/7.0/domain/post_nnp_subset
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/domain/stack
Normal file
1
live-build/apparmor/7.0/domain/stack
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/domain/version
Normal file
1
live-build/apparmor/7.0/domain/version
Normal file
@ -0,0 +1 @@
|
||||
1.2
|
||||
1
live-build/apparmor/7.0/file/mask
Normal file
1
live-build/apparmor/7.0/file/mask
Normal file
@ -0,0 +1 @@
|
||||
create read write exec append mmap_exec link lock
|
||||
1
live-build/apparmor/7.0/io_uring/mask
Normal file
1
live-build/apparmor/7.0/io_uring/mask
Normal file
@ -0,0 +1 @@
|
||||
sqpoll override_creds
|
||||
1
live-build/apparmor/7.0/ipc/posix_mqueue
Normal file
1
live-build/apparmor/7.0/ipc/posix_mqueue
Normal file
@ -0,0 +1 @@
|
||||
create read write open delete setattr getattr label
|
||||
1
live-build/apparmor/7.0/mount/mask
Normal file
1
live-build/apparmor/7.0/mount/mask
Normal file
@ -0,0 +1 @@
|
||||
mount umount pivot_root
|
||||
1
live-build/apparmor/7.0/mount/move_mount
Normal file
1
live-build/apparmor/7.0/mount/move_mount
Normal file
@ -0,0 +1 @@
|
||||
detached
|
||||
1
live-build/apparmor/7.0/namespaces/mask
Normal file
1
live-build/apparmor/7.0/namespaces/mask
Normal file
@ -0,0 +1 @@
|
||||
userns_create
|
||||
1
live-build/apparmor/7.0/namespaces/pivot_root
Normal file
1
live-build/apparmor/7.0/namespaces/pivot_root
Normal file
@ -0,0 +1 @@
|
||||
no
|
||||
1
live-build/apparmor/7.0/namespaces/profile
Normal file
1
live-build/apparmor/7.0/namespaces/profile
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/namespaces/userns_create
Normal file
1
live-build/apparmor/7.0/namespaces/userns_create
Normal file
@ -0,0 +1 @@
|
||||
pciu&
|
||||
1
live-build/apparmor/7.0/network/af_mask
Normal file
1
live-build/apparmor/7.0/network/af_mask
Normal file
@ -0,0 +1 @@
|
||||
unspec unix inet ax25 ipx appletalk netrom bridge atmpvc x25 inet6 rose netbeui security key netlink packet ash econet atmsvc rds sna irda pppox wanpipe llc ib mpls can tipc bluetooth iucv rxrpc isdn phonet ieee802154 caif alg nfc vsock kcm qipcrtr smc xdp mctp
|
||||
1
live-build/apparmor/7.0/network/af_unix
Normal file
1
live-build/apparmor/7.0/network/af_unix
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/network_v8/af_inet
Normal file
1
live-build/apparmor/7.0/network_v8/af_inet
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/network_v8/af_mask
Normal file
1
live-build/apparmor/7.0/network_v8/af_mask
Normal file
@ -0,0 +1 @@
|
||||
unspec unix inet ax25 ipx appletalk netrom bridge atmpvc x25 inet6 rose netbeui security key netlink packet ash econet atmsvc rds sna irda pppox wanpipe llc ib mpls can tipc bluetooth iucv rxrpc isdn phonet ieee802154 caif alg nfc vsock kcm qipcrtr smc xdp mctp
|
||||
1
live-build/apparmor/7.0/network_v9/af_mask
Normal file
1
live-build/apparmor/7.0/network_v9/af_mask
Normal file
@ -0,0 +1 @@
|
||||
unspec unix inet ax25 ipx appletalk netrom bridge atmpvc x25 inet6 rose netbeui security key netlink packet ash econet atmsvc rds sna irda pppox wanpipe llc ib mpls can tipc bluetooth iucv rxrpc isdn phonet ieee802154 caif alg nfc vsock kcm qipcrtr smc xdp mctp
|
||||
1
live-build/apparmor/7.0/network_v9/af_unix
Normal file
1
live-build/apparmor/7.0/network_v9/af_unix
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/network_v9_skb/af_mask
Normal file
1
live-build/apparmor/7.0/network_v9_skb/af_mask
Normal file
@ -0,0 +1 @@
|
||||
inet inet6
|
||||
1
live-build/apparmor/7.0/network_v9_skb/iface
Normal file
1
live-build/apparmor/7.0/network_v9_skb/iface
Normal file
@ -0,0 +1 @@
|
||||
receive connect, secmark_postroute
|
||||
1
live-build/apparmor/7.0/network_v9_skb/localout
Normal file
1
live-build/apparmor/7.0/network_v9_skb/localout
Normal file
@ -0,0 +1 @@
|
||||
secmark_set
|
||||
1
live-build/apparmor/7.0/network_v9_skb/postroute
Normal file
1
live-build/apparmor/7.0/network_v9_skb/postroute
Normal file
@ -0,0 +1 @@
|
||||
secmark_send
|
||||
1
live-build/apparmor/7.0/network_v9_skb/rcv_skb
Normal file
1
live-build/apparmor/7.0/network_v9_skb/rcv_skb
Normal file
@ -0,0 +1 @@
|
||||
secmark_receive
|
||||
1
live-build/apparmor/7.0/network_v9_skb/relabel
Normal file
1
live-build/apparmor/7.0/network_v9_skb/relabel
Normal file
@ -0,0 +1 @@
|
||||
setcred
|
||||
1
live-build/apparmor/7.0/policy/metadata_tagging_version
Normal file
1
live-build/apparmor/7.0/policy/metadata_tagging_version
Normal file
@ -0,0 +1 @@
|
||||
0x000001
|
||||
1
live-build/apparmor/7.0/policy/notify/user
Normal file
1
live-build/apparmor/7.0/policy/notify/user
Normal file
@ -0,0 +1 @@
|
||||
file tags
|
||||
1
live-build/apparmor/7.0/policy/notify_versions/v3
Normal file
1
live-build/apparmor/7.0/policy/notify_versions/v3
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/policy/notify_versions/v5
Normal file
1
live-build/apparmor/7.0/policy/notify_versions/v5
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/policy/outofband
Normal file
1
live-build/apparmor/7.0/policy/outofband
Normal file
@ -0,0 +1 @@
|
||||
0x000001
|
||||
1
live-build/apparmor/7.0/policy/permstable32
Normal file
1
live-build/apparmor/7.0/policy/permstable32
Normal file
@ -0,0 +1 @@
|
||||
allow deny subtree cond kill complain prompt audit quiet hide xindex tag label
|
||||
1
live-build/apparmor/7.0/policy/permstable32_version
Normal file
1
live-build/apparmor/7.0/policy/permstable32_version
Normal file
@ -0,0 +1 @@
|
||||
0x000003
|
||||
1
live-build/apparmor/7.0/policy/set_load
Normal file
1
live-build/apparmor/7.0/policy/set_load
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/policy/state32
Normal file
1
live-build/apparmor/7.0/policy/state32
Normal file
@ -0,0 +1 @@
|
||||
0x000001
|
||||
@ -0,0 +1 @@
|
||||
yes
|
||||
@ -0,0 +1 @@
|
||||
1
|
||||
@ -0,0 +1 @@
|
||||
1
|
||||
1
live-build/apparmor/7.0/policy/versions/v5
Normal file
1
live-build/apparmor/7.0/policy/versions/v5
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/policy/versions/v6
Normal file
1
live-build/apparmor/7.0/policy/versions/v6
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/policy/versions/v7
Normal file
1
live-build/apparmor/7.0/policy/versions/v7
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/policy/versions/v8
Normal file
1
live-build/apparmor/7.0/policy/versions/v8
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/policy/versions/v9
Normal file
1
live-build/apparmor/7.0/policy/versions/v9
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/ptrace/mask
Normal file
1
live-build/apparmor/7.0/ptrace/mask
Normal file
@ -0,0 +1 @@
|
||||
read trace
|
||||
1
live-build/apparmor/7.0/query/label/data
Normal file
1
live-build/apparmor/7.0/query/label/data
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/query/label/multi_transaction
Normal file
1
live-build/apparmor/7.0/query/label/multi_transaction
Normal file
@ -0,0 +1 @@
|
||||
yes
|
||||
1
live-build/apparmor/7.0/query/label/perms
Normal file
1
live-build/apparmor/7.0/query/label/perms
Normal file
@ -0,0 +1 @@
|
||||
allow deny audit quiet
|
||||
1
live-build/apparmor/7.0/rlimit/mask
Normal file
1
live-build/apparmor/7.0/rlimit/mask
Normal file
@ -0,0 +1 @@
|
||||
cpu fsize data stack core rss nproc nofile memlock as locks sigpending msgqueue nice rtprio rttime
|
||||
1
live-build/apparmor/7.0/signal/mask
Normal file
1
live-build/apparmor/7.0/signal/mask
Normal file
@ -0,0 +1 @@
|
||||
hup int quit ill trap abrt bus fpe kill usr1 segv usr2 pipe alrm term stkflt chld cont stop stp ttin ttou urg xcpu xfsz vtalrm prof winch io pwr sys emt lost
|
||||
@ -424,7 +424,12 @@ case $LB_INITRAMFS in
|
||||
;;
|
||||
esac
|
||||
|
||||
for OUTPUT in ext2 ext3 ext4 manifest manifest-remove size squashfs; do
|
||||
# For MAKE_ISO=yes builds, most artifacts (squashfs, kernel, initrd) are
|
||||
# placed directly into the ISO tree by lb_binary_layered and binary hooks.
|
||||
# Only create livecd.* intermediate artifacts for non-ISO builds; the manifest
|
||||
# is created unconditionally below.
|
||||
if [ "${MAKE_ISO}" != "yes" ]; then
|
||||
for OUTPUT in ext2 ext3 ext4 manifest-remove size squashfs; do
|
||||
[ -e "binary/$INITFS/filesystem.$OUTPUT" ] || continue
|
||||
ln "binary/$INITFS/filesystem.$OUTPUT" "$PREFIX.$OUTPUT"
|
||||
chmod 644 "$PREFIX.$OUTPUT"
|
||||
@ -451,12 +456,6 @@ elif [ -e binary-tar.tar.gz ]; then
|
||||
cp -a binary-tar.tar.gz "$PREFIX.rootfs.tar.gz"
|
||||
fi
|
||||
|
||||
# '--initramfs none' produces different manifest names.
|
||||
if [ -e "binary/$INITFS/filesystem.packages" ]; then
|
||||
ln "binary/$INITFS/filesystem.packages" "$PREFIX.manifest"
|
||||
chmod 644 "$PREFIX.manifest"
|
||||
fi
|
||||
|
||||
# If a .filelist is present, use it as the filelist for the image by
|
||||
# symlinking with expected name and updating permissions
|
||||
if [ -e "binary/$INITFS/filesystem.filelist" ]; then
|
||||
@ -472,13 +471,6 @@ if [ -e "binary/$INITFS/filesystem.packages-remove" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Since snaps are now Ubuntu first-class citizen, so always try fetching the
|
||||
# list of seeded snaps into the manifest. In case of layered images we skip
|
||||
# this step, as we assume they're doing it on their own at some earlier stage.
|
||||
if [ -z "$PASSES" ] && [ -e "$PREFIX.manifest" ]; then
|
||||
./config/snap-seed-parse "chroot/" "$PREFIX.manifest"
|
||||
fi
|
||||
|
||||
for FLAVOUR in $LB_LINUX_FLAVOURS; do
|
||||
if [ -z "$LB_LINUX_FLAVOURS" ] || [ "$LB_LINUX_FLAVOURS" = "none" ]; then
|
||||
continue
|
||||
@ -562,6 +554,27 @@ case $SUBARCH in
|
||||
cp $PREFIX.kernel $UBOOT_BOOT/vmlinuz || true
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Create manifest unconditionally (needed for both ISO and non-ISO builds).
|
||||
if [ -e "binary/$INITFS/filesystem.manifest" ]; then
|
||||
ln "binary/$INITFS/filesystem.manifest" "$PREFIX.manifest"
|
||||
elif [ -e "binary/$INITFS/filesystem.packages" ]; then
|
||||
# '--initramfs none' produces different manifest names.
|
||||
ln "binary/$INITFS/filesystem.packages" "$PREFIX.manifest"
|
||||
elif [ -n "$LIVE_PASSES" ]; then
|
||||
# For layered images, keep the manifest of the last (only?) live pass
|
||||
for _PASS in $LIVE_PASSES; do
|
||||
ln -f "${CASPER_DIR}/$_PASS.manifest.full" "$PREFIX.manifest"
|
||||
done
|
||||
fi
|
||||
chmod 644 "$PREFIX.manifest"
|
||||
# Since snaps are now Ubuntu first-class citizen, so always try fetching the
|
||||
# list of seeded snaps into the manifest. In case of layered images we skip
|
||||
# this step, as we assume they're doing it on their own at some earlier stage.
|
||||
if [ -z "$PASSES" ] && [ -e "$PREFIX.manifest" ]; then
|
||||
./config/snap-seed-parse "chroot/" "$PREFIX.manifest"
|
||||
fi
|
||||
|
||||
case $PROJECT in
|
||||
ubuntu-cpc)
|
||||
@ -569,25 +582,19 @@ case $PROJECT in
|
||||
esac
|
||||
|
||||
if [ "${MAKE_ISO}" = "yes" ]; then
|
||||
# Link build artifacts with "for-iso." prefix for isobuild to consume.
|
||||
# Layered builds create squashfs via lb_binary_layered (which already
|
||||
# creates for-iso.*.squashfs files). Single-pass builds only have
|
||||
# ${PREFIX}.squashfs, which does not contain cdrom.sources, so we
|
||||
# create a for-iso.filesystem.squashfs that does.
|
||||
if [ -z "$PASSES" ]; then
|
||||
# For non-layered builds, create squashfs with cdrom.sources directly
|
||||
# in casper/. Layered builds already handle this in lb_binary_layered.
|
||||
if [ -z "$PASSES" ] && [ "$PROJECT" != "ubuntu-mini-iso" ]; then
|
||||
if [ -n "${POOL_SEED_NAME}" ]; then
|
||||
isobuild generate-sources --mountpoint=/cdrom > chroot/etc/apt/sources.list.d/cdrom.sources
|
||||
create_squashfs chroot ${PWD}/for-iso.filesystem.squashfs
|
||||
fi
|
||||
# Link kernel and initrd files. The ${thing#${PREFIX}} expansion strips
|
||||
# the PREFIX, so "livecd.ubuntu-server.kernel-generic" becomes
|
||||
# "for-iso.kernel-generic".
|
||||
for thing in ${PREFIX}.kernel-* ${PREFIX}.initrd-*; do
|
||||
for_iso_path=for-iso${thing#${PREFIX}}
|
||||
if [ ! -f $for_iso_path ]; then
|
||||
ln -v $thing $for_iso_path
|
||||
fi
|
||||
create_squashfs chroot ${PWD}/${CASPER_DIR}/filesystem.squashfs
|
||||
rm chroot/etc/apt/sources.list.d/cdrom.sources
|
||||
for flavor in $LB_LINUX_FLAVOURS; do
|
||||
iso_install_kernel "$flavor" binary/${INITFS}/vmlinu?-* binary/${INITFS}/initrd.img-*
|
||||
done
|
||||
isobuild add-live-filesystem --artifact-prefix for-iso.
|
||||
fi
|
||||
isobuild extract-casper-uuids
|
||||
isobuild make-bootable --project "${PROJECT}" --capproject "$(cat config/iso-ids/capproject)" \
|
||||
${SUBARCH:+--subarch "${SUBARCH}"}
|
||||
isobuild make-iso --volid "$(cat config/iso-ids/vol-id)" --dest ${PREFIX}.iso
|
||||
|
||||
@ -41,7 +41,7 @@ if [ -z "$MIRROR" ]; then
|
||||
;;
|
||||
*)
|
||||
case $ARCH in
|
||||
i386|amd64) MIRROR=http://archive.ubuntu.com/ubuntu/ ;;
|
||||
i386|amd64|arm64) MIRROR=http://archive.ubuntu.com/ubuntu/ ;;
|
||||
*) MIRROR=http://ports.ubuntu.com/ubuntu-ports/ ;;
|
||||
esac
|
||||
;;
|
||||
@ -491,31 +491,23 @@ case $IMAGEFORMAT in
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
# Ubuntu Core 24
|
||||
# Ubuntu Core 26
|
||||
# For now we stick to updating this by hand, but a more tasteful solution
|
||||
# will follow
|
||||
CORE_MAJOR=24
|
||||
CORE_MAJOR=26
|
||||
|
||||
# Currently uc24 assertions do not support global channel overrides,
|
||||
# instead we have per-channel models
|
||||
# For UC26+ we build only images using stable channels,
|
||||
# for either signed or dangerous grade.
|
||||
case $CHANNEL in
|
||||
stable)
|
||||
MODEL="ubuntu-core-${CORE_MAJOR}-${MODEL#pc-}"
|
||||
;;
|
||||
candidate|beta|edge|dangerous)
|
||||
MODEL="ubuntu-core-${CORE_MAJOR}-${MODEL#pc-}-${CHANNEL}"
|
||||
;;
|
||||
dangerous-*)
|
||||
# That being said, the dangerous grade *does*
|
||||
# support channel overrides, so we can use the
|
||||
# dangerous model assertion and override the channel
|
||||
# freely.
|
||||
dangerous-stable)
|
||||
MODEL="ubuntu-core-${CORE_MAJOR}-${MODEL#pc-}-dangerous"
|
||||
CHANNEL=${CHANNEL#dangerous-}
|
||||
UBUNTU_IMAGE_ARGS="$UBUNTU_IMAGE_ARGS -c $CHANNEL"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown CHANNEL ${CHANNEL} specification for ${SUITE}"
|
||||
echo "Unsupported CHANNEL ${CHANNEL} specification for ${SUITE}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@ -525,7 +517,7 @@ case $IMAGEFORMAT in
|
||||
EXTRA_SNAPS="$EXTRA_SNAPS core bluez alsa-utils"
|
||||
;;
|
||||
*)
|
||||
# For all Ubuntu Core 24 reference images, add console-conf
|
||||
# For all Ubuntu Core reference images, add console-conf
|
||||
EXTRA_SNAPS="$EXTRA_SNAPS console-conf"
|
||||
;;
|
||||
esac
|
||||
@ -1183,6 +1175,7 @@ case $PROJECT in
|
||||
KERNEL_FLAVOURS=none
|
||||
BINARY_REMOVE_LINUX=false
|
||||
MAKE_ISO=yes
|
||||
POOL_SEED_NAME=
|
||||
|
||||
add_package install mini-iso-tools linux-generic
|
||||
case $ARCH in
|
||||
@ -1567,7 +1560,8 @@ case $PROJECT:${SUBPROJECT:-} in
|
||||
ubuntu-cpc:*|ubuntu-server:live|ubuntu:desktop-preinstalled| \
|
||||
ubuntu-wsl:*|ubuntu-mini-iso:*|ubuntu-test-iso:*|ubuntu:|ubuntu:dangerous|ubuntu-oem:*| \
|
||||
ubuntustudio:*|edubuntu:*|ubuntu-budgie:*|ubuntucinnamon:*|xubuntu:*| \
|
||||
ubuntukylin:*|ubuntu-mate:*|ubuntu-core-installer:*|lubuntu:*)
|
||||
ubuntukylin:*|ubuntu-mate:*|ubuntu-core-installer:*|lubuntu:*|kubuntu:*| \
|
||||
ubuntu-unity:*)
|
||||
# Ensure that most things e.g. includes.chroot are copied as is
|
||||
for entry in ${LIVECD_ROOTFS_ROOT}/live-build/${PROJECT}/*; do
|
||||
case $entry in
|
||||
@ -1737,9 +1731,12 @@ EOF
|
||||
fi
|
||||
|
||||
if [ "${MAKE_ISO}" = "yes" ]; then
|
||||
# XXX should pass --build-type here.
|
||||
# XXX --build-type should be passed via build args once
|
||||
# https://code.launchpad.net/~mwhudson/launchpad-buildd/+git/launchpad-buildd/+merge/497089
|
||||
# is merged.
|
||||
${LIVECD_ROOTFS_ROOT}/live-build/gen-iso-ids \
|
||||
--project $PROJECT ${SUBPROJECT:+--subproject $SUBPROJECT} \
|
||||
--build-type Release \
|
||||
--arch $ARCH ${SUBARCH:+--subarch $SUBARCH} ${NOW+--serial $NOW} \
|
||||
--output-dir config/iso-ids/
|
||||
fi
|
||||
|
||||
@ -50,7 +50,7 @@ env DEBIAN_FRONTEND=noninteractive chroot "$mount_d" apt-get \
|
||||
|
||||
# Install dependencies
|
||||
env DEBIAN_FRONTEND=noninteractive chroot "$mount_d" apt-get \
|
||||
install -y lsb-release locales initramfs-tools busybox-initramfs \
|
||||
install -y lsb-release locales dracut busybox-initramfs \
|
||||
udev dbus netplan.io cloud-init openssh-server sudo snapd \
|
||||
lxd-agent-loader
|
||||
|
||||
|
||||
1
live-build/edubuntu/hooks/03-initramfs-enforcement.chroot
Symbolic link
1
live-build/edubuntu/hooks/03-initramfs-enforcement.chroot
Symbolic link
@ -0,0 +1 @@
|
||||
../../xubuntu/hooks/03-initramfs-enforcement.chroot
|
||||
@ -573,7 +573,7 @@ _snap_post_process() {
|
||||
# If the 'core' snap is not present, assume we are coreXX-only and
|
||||
# install the snapd snap.
|
||||
channel=stable
|
||||
if [ "$PROJECT" = "ubuntu" -o "$SUBPROJECT" = "dangerous" ]; then
|
||||
if [ "$SUBPROJECT" = "dangerous" ]; then
|
||||
channel=edge
|
||||
fi
|
||||
if [ ! -f ${snaps_dir}/core_[0-9]*.snap ]; then
|
||||
@ -1456,3 +1456,17 @@ gpt_root_partition_uuid() {
|
||||
isobuild () {
|
||||
PYTHONPATH=${LIVECD_ROOTFS_ROOT}/live-build/ ${LIVECD_ROOTFS_ROOT}/live-build/isobuild --workdir config/iso-dir "$@"
|
||||
}
|
||||
|
||||
CASPER_DIR=config/iso-dir/iso-root/casper
|
||||
|
||||
# Install kernel+initrd into the ISO casper directory.
|
||||
# Usage: iso_install_kernel <flavor> <kernel-path> <initrd-path>
|
||||
iso_install_kernel() {
|
||||
local flavor=$1 kernel=$2 initrd=$3
|
||||
local kernel_name=vmlinuz
|
||||
case $ARCH in ppc64el|riscv64) kernel_name=vmlinux ;; esac
|
||||
local prefix=""
|
||||
case $flavor in *-hwe) prefix="hwe-" ;; esac
|
||||
cp "$kernel" "$CASPER_DIR/${prefix}${kernel_name}"
|
||||
cp "$initrd" "$CASPER_DIR/${prefix}initrd"
|
||||
}
|
||||
|
||||
@ -39,10 +39,9 @@
|
||||
# Generate an apt deb822 source for the pool, assuming it is mounted at the
|
||||
# passed mountpoint, and output it on stdout.
|
||||
#
|
||||
# $ isobuild --work-dir "" add-live-filesystem --artifact-prefix ""
|
||||
# $ isobuild --work-dir "" extract-casper-uuids
|
||||
#
|
||||
# Copy the relevant artifacts to the casper directory (and extract the uuids
|
||||
# from the initrds)
|
||||
# Extract casper UUID files from the initrds in the casper directory.
|
||||
#
|
||||
# $ isobuild --work-dir "" make-bootable --project "" --capitalized-project ""
|
||||
# --subarch ""
|
||||
@ -169,14 +168,9 @@ def generate_sources(builder, mountpoint: str):
|
||||
builder.generate_sources(mountpoint)
|
||||
|
||||
|
||||
@click.option(
|
||||
"--artifact-prefix",
|
||||
type=click.Path(dir_okay=False, resolve_path=True, path_type=pathlib.Path),
|
||||
required=True,
|
||||
)
|
||||
@subcommand
|
||||
def add_live_filesystem(builder, artifact_prefix: pathlib.Path):
|
||||
builder.add_live_filesystem(artifact_prefix)
|
||||
def extract_casper_uuids(builder):
|
||||
builder.extract_casper_uuids()
|
||||
|
||||
|
||||
@click.option(
|
||||
|
||||
@ -218,7 +218,7 @@ class ISOBuilder:
|
||||
)
|
||||
)
|
||||
|
||||
def _extract_casper_uuids(self):
|
||||
def extract_casper_uuids(self):
|
||||
# Extract UUID files from initrd images for casper (the live boot system).
|
||||
# Each initrd contains a conf/uuid.conf with a unique identifier that
|
||||
# casper uses at boot time to locate the correct root filesystem. These
|
||||
@ -255,43 +255,6 @@ class ISOBuilder:
|
||||
uuid_conf.rename(dot_disk.joinpath(f"casper-uuid-{suffix}"))
|
||||
shutil.rmtree(initrddir)
|
||||
|
||||
def add_live_filesystem(self, artifact_prefix: pathlib.Path):
|
||||
casper_dir = self.iso_root.joinpath("casper")
|
||||
artifact_dir = artifact_prefix.parent
|
||||
filename_prefix = artifact_prefix.name
|
||||
|
||||
def link(src: pathlib.Path, target_name: str):
|
||||
target = casper_dir.joinpath(target_name)
|
||||
self.logger.log(
|
||||
f"creating link from $ISOROOT/casper/{target_name} to $src/{src.name}"
|
||||
)
|
||||
target.hardlink_to(src)
|
||||
|
||||
kernel_name = "vmlinuz"
|
||||
if self.arch in ("ppc64el", "riscv64"):
|
||||
kernel_name = "vmlinux"
|
||||
|
||||
with self.logger.logged(
|
||||
f"linking artifacts from {casper_dir} to {artifact_dir}"
|
||||
):
|
||||
for ext in "squashfs", "squashfs.gpg", "size", "manifest", "yaml":
|
||||
for path in artifact_dir.glob(f"{filename_prefix}*.{ext}"):
|
||||
newname = path.name[len(filename_prefix) :]
|
||||
link(path, newname)
|
||||
|
||||
for kernel_path in artifact_dir.glob(f"{filename_prefix}kernel*"):
|
||||
suffix = kernel_path.name[len(filename_prefix) + len("kernel") :]
|
||||
prefix = "hwe-" if suffix.endswith("-hwe") else ""
|
||||
link(
|
||||
artifact_dir.joinpath(f"{filename_prefix}kernel{suffix}"),
|
||||
f"{prefix}{kernel_name}",
|
||||
)
|
||||
link(
|
||||
artifact_dir.joinpath(f"{filename_prefix}initrd{suffix}"),
|
||||
f"{prefix}initrd",
|
||||
)
|
||||
self._extract_casper_uuids()
|
||||
|
||||
def make_bootable(self, project: str, capproject: str, subarch: str):
|
||||
configurator = make_boot_configurator_for_arch(
|
||||
self.arch,
|
||||
@ -310,11 +273,14 @@ class ISOBuilder:
|
||||
def checksum(self):
|
||||
# Generate md5sum.txt for ISO integrity verification.
|
||||
# - Symlinks are excluded because their targets are already checksummed
|
||||
# - eltorito.img is excluded because xorriso will modify it in output ISO
|
||||
# - Files are sorted for deterministic, reproducible output across builds
|
||||
# - Paths use "./" prefix and we run md5sum from iso_root so the output
|
||||
# matches what users get when they verify with "md5sum -c" from the ISO
|
||||
all_files = []
|
||||
exclusions = ["eltorito.img"]
|
||||
for dirpath, dirnames, filenames in self.iso_root.walk():
|
||||
filenames = [fn for fn in filenames if fn not in exclusions]
|
||||
filepaths = [dirpath.joinpath(filename) for filename in filenames]
|
||||
all_files.extend(
|
||||
"./" + str(filepath.relative_to(self.iso_root))
|
||||
|
||||
11
live-build/kubuntu/hooks/020-kubuntu-live.chroot_early
Normal file
11
live-build/kubuntu/hooks/020-kubuntu-live.chroot_early
Normal file
@ -0,0 +1,11 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
cat <<EOF > /etc/sysctl.d/20-apparmor.conf
|
||||
# AppArmor restrictions of unprivileged user namespaces
|
||||
|
||||
# Disables AppArmor user namespace restrictions on the live ISO.
|
||||
kernel.apparmor_restrict_unprivileged_userns = 0
|
||||
kernel.apparmor_restrict_unprivileged_unconfined = 1
|
||||
EOF
|
||||
@ -61,7 +61,7 @@ build_layered_squashfs () {
|
||||
|
||||
# Building squashfs filesystem & manifest
|
||||
local overlay_dir="overlay.${pass}"
|
||||
base="${PWD}/livecd.${PROJECT_FULL}.${pass}"
|
||||
base="${PWD}/${CASPER_DIR}/${pass}"
|
||||
squashfs_f="${base}.squashfs"
|
||||
|
||||
# We have already treated that pass
|
||||
@ -91,6 +91,20 @@ build_layered_squashfs () {
|
||||
|
||||
# Copy initrd and vmlinuz outside of chroot and remove them from the layer squashfs
|
||||
if $(is_live_layer "$pass"); then
|
||||
# For *.live passes (desktop builds), the kernel flavor comes from
|
||||
# LB_LINUX_FLAVOURS. For other live passes (server installer passes
|
||||
# like "...installer.generic-hwe"), the flavor is encoded as the
|
||||
# final dot-separated component of the pass name.
|
||||
case "$pass" in
|
||||
*.live)
|
||||
for flavor in $LB_LINUX_FLAVOURS; do
|
||||
iso_install_kernel "$flavor" chroot/boot/vmlinu?-* chroot/boot/initrd.img-*
|
||||
done
|
||||
;;
|
||||
*)
|
||||
iso_install_kernel "${pass##*.}" chroot/boot/vmlinu?-* chroot/boot/initrd.img-*
|
||||
;;
|
||||
esac
|
||||
lb binary_linux-image ${*}
|
||||
rm -f chroot/boot/initrd.img-* chroot/boot/vmlinu{x,z}-*
|
||||
fi
|
||||
@ -116,32 +130,13 @@ build_layered_squashfs () {
|
||||
create_manifest "chroot" "${squashfs_f_manifest}.full"
|
||||
|
||||
# Delta manifest
|
||||
diff -NU0 ${PWD}/livecd.${PROJECT_FULL}.$(get_parent_pass $pass).manifest.full ${squashfs_f_manifest}.full|grep -v ^@ > $squashfs_f_manifest || true
|
||||
diff -NU0 ${PWD}/${CASPER_DIR}/$(get_parent_pass $pass).manifest.full ${squashfs_f_manifest}.full|grep -v ^@ > $squashfs_f_manifest || true
|
||||
echo "Delta manifest:"
|
||||
cat $squashfs_f_manifest
|
||||
|
||||
squashfs_f_size="${base}.size"
|
||||
du -B 1 -s "overlay.${pass}/" | cut -f1 > "${squashfs_f_size}"
|
||||
|
||||
# We take first live pass for "global" ISO properties (used by installers and checkers):
|
||||
# Prepare initrd + kernel
|
||||
# Main manifest and size files
|
||||
prefix="livecd.$PROJECT_FULL"
|
||||
if [ ! -e "${prefix}.manifest" ] && $(is_live_layer "$pass"); then
|
||||
totalsize=$(cat ${squashfs_f_size})
|
||||
curpass="$pass"
|
||||
while :; do
|
||||
curpass=$(get_parent_pass $curpass)
|
||||
# We climbed up the tree to the root layer, we are done
|
||||
[ -z "$curpass" ] && break
|
||||
|
||||
totalsize=$(expr $totalsize + $(cat "${PWD}/livecd.${PROJECT_FULL}.${curpass}.size"))
|
||||
done
|
||||
echo ${totalsize} > "${prefix}.size"
|
||||
|
||||
cp "${squashfs_f_manifest}.full" "${prefix}.manifest"
|
||||
fi
|
||||
|
||||
if [ -n "$lowerdirs" ]; then
|
||||
# Although the current chroot was created as an overlay over
|
||||
# the previous layer, many operations can result in redundant
|
||||
@ -183,23 +178,17 @@ build_layered_squashfs () {
|
||||
${LIVECD_ROOTFS_ROOT}/sync-mtime chroot "$overlay_dir"
|
||||
fi
|
||||
|
||||
create_squashfs "${overlay_dir}" ${squashfs_f}
|
||||
# Create a "for-iso" variant of the squashfs for ISO builds. For
|
||||
# the root layer (the base system) when building with a pool, we
|
||||
# need to include cdrom.sources so casper can access the ISO's
|
||||
# package repository. This requires regenerating the squashfs with
|
||||
# that file included, then removing it (so it doesn't pollute the
|
||||
# regular squashfs). Non-root layers (desktop environment, etc.)
|
||||
# and builds without pools can just hardlink to the regular squashfs.
|
||||
# For the root layer when building with a pool, include
|
||||
# cdrom.sources so casper can access the ISO's package repository.
|
||||
if [ -n "${POOL_SEED_NAME}" ] && $(is_root_layer $pass); then
|
||||
isobuild generate-sources --mountpoint=/cdrom > ${overlay_dir}/etc/apt/sources.list.d/cdrom.sources
|
||||
create_squashfs "${overlay_dir}" ${PWD}/for-iso.${pass}.squashfs
|
||||
rm ${overlay_dir}/etc/apt/sources.list.d/cdrom.sources
|
||||
fi
|
||||
create_squashfs "${overlay_dir}" ${squashfs_f}
|
||||
rm -f ${overlay_dir}/etc/apt/sources.list.d/cdrom.sources
|
||||
|
||||
if [ -f config/$pass.catalog-in.yaml ]; then
|
||||
echo "Expanding catalog entry template for $pass"
|
||||
usc_opts="--output livecd.${PROJECT_FULL}.install-sources.yaml \
|
||||
usc_opts="--output ${CASPER_DIR}/install-sources.yaml \
|
||||
--template config/$pass.catalog-in.yaml \
|
||||
--size $(du -B 1 -s chroot/ | cut -f1) --squashfs ${pass}.squashfs \
|
||||
--translations config/catalog-translations"
|
||||
@ -225,25 +214,11 @@ do
|
||||
build_layered_squashfs "${_PASS}" ${*}
|
||||
done
|
||||
|
||||
if [ -n "$DEFAULT_KERNEL" -a -f livecd.${PROJECT_FULL}.install-sources.yaml ]; then
|
||||
if [ -n "$DEFAULT_KERNEL" -a -f ${CASPER_DIR}/install-sources.yaml ]; then
|
||||
write_kernel_yaml "$DEFAULT_KERNEL" "$BRIDGE_KERNEL_REASONS"
|
||||
${LIVECD_ROOTFS_ROOT}/update-source-catalog merge \
|
||||
--output livecd.${PROJECT_FULL}.install-sources.yaml \
|
||||
--output ${CASPER_DIR}/install-sources.yaml \
|
||||
--template config/kernel.yaml
|
||||
fi
|
||||
|
||||
# Ubiquity-compatible removal manifest for ISO not using a layered-aware installer
|
||||
if [ -n "$(ls livecd.${PROJECT_FULL}.*install.live.manifest.full 2>/dev/null)" ] && \
|
||||
[ -n "$(ls livecd.${PROJECT_FULL}.*install.manifest.full 2>/dev/null)" ]; then
|
||||
echo "$(diff livecd.${PROJECT_FULL}.*install.live.manifest.full livecd.${PROJECT_FULL}.*install.manifest.full | awk '/^< / { print $2 }')" > livecd.${PROJECT_FULL}-manifest-remove
|
||||
fi
|
||||
|
||||
chmod 644 *.squashfs *.manifest* *.size
|
||||
|
||||
prefix=livecd.${PROJECT_FULL}
|
||||
for artifact in ${prefix}.*; do
|
||||
for_iso_path=for-iso${artifact#${prefix}}
|
||||
if [ ! -f $for_iso_path ]; then
|
||||
ln -v $artifact $for_iso_path
|
||||
fi
|
||||
done
|
||||
chmod 644 ${CASPER_DIR}/*.squashfs ${CASPER_DIR}/*.manifest* ${CASPER_DIR}/*.size
|
||||
|
||||
1
live-build/lubuntu/hooks/03-initramfs-enforcement.chroot
Symbolic link
1
live-build/lubuntu/hooks/03-initramfs-enforcement.chroot
Symbolic link
@ -0,0 +1 @@
|
||||
../../xubuntu/hooks/03-initramfs-enforcement.chroot
|
||||
1
live-build/ubuntu-budgie/hooks/03-initramfs-enforcement.chroot
Symbolic link
1
live-build/ubuntu-budgie/hooks/03-initramfs-enforcement.chroot
Symbolic link
@ -0,0 +1 @@
|
||||
../../xubuntu/hooks/03-initramfs-enforcement.chroot
|
||||
@ -76,7 +76,7 @@ system_info:
|
||||
templates_dir: /etc/cloud/templates/
|
||||
upstart_dir: /etc/init/
|
||||
package_mirrors:
|
||||
- arches: [i386, amd64]
|
||||
- arches: [i386, amd64, arm64]
|
||||
failsafe:
|
||||
primary: http://archive.ubuntu.com/ubuntu
|
||||
security: http://security.ubuntu.com/ubuntu
|
||||
@ -86,7 +86,7 @@ system_info:
|
||||
- http://%(availability_zone)s.clouds.archive.ubuntu.com/ubuntu/
|
||||
- http://%(region)s.clouds.archive.ubuntu.com/ubuntu/
|
||||
security: []
|
||||
- arches: [arm64, armel, armhf]
|
||||
- arches: [armel, armhf]
|
||||
failsafe:
|
||||
primary: http://ports.ubuntu.com/ubuntu-ports
|
||||
security: http://ports.ubuntu.com/ubuntu-ports
|
||||
|
||||
1
live-build/ubuntu-mate/hooks/03-initramfs-enforcement.chroot
Symbolic link
1
live-build/ubuntu-mate/hooks/03-initramfs-enforcement.chroot
Symbolic link
@ -0,0 +1 @@
|
||||
../../xubuntu/hooks/03-initramfs-enforcement.chroot
|
||||
@ -1,11 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Create kernel/initrd artifacts for isobuilder to consume.
|
||||
# The standard MAKE_ISO flow in auto/build expects files named
|
||||
# ${PREFIX}.kernel-${flavour} and ${PREFIX}.initrd-${flavour}.
|
||||
# Install kernel/initrd directly into the ISO casper directory.
|
||||
|
||||
set -eu
|
||||
|
||||
. config/functions
|
||||
|
||||
case $ARCH in
|
||||
amd64)
|
||||
;;
|
||||
@ -14,7 +14,4 @@ case $ARCH in
|
||||
;;
|
||||
esac
|
||||
|
||||
PREFIX="livecd.${PROJECT}"
|
||||
|
||||
cp chroot/boot/vmlinuz "${PREFIX}.kernel-generic"
|
||||
cp chroot/boot/initrd.img "${PREFIX}.initrd-generic"
|
||||
iso_install_kernel generic chroot/boot/vmlinuz chroot/boot/initrd.img
|
||||
|
||||
@ -1,21 +0,0 @@
|
||||
#!/bin/bash -eux
|
||||
# vi: ts=4 noexpandtab
|
||||
|
||||
case $PASS in
|
||||
ubuntu-server-minimal.ubuntu-server.installer.*.*)
|
||||
exit 0
|
||||
;;
|
||||
ubuntu-server-minimal.ubuntu-server.installer.*)
|
||||
flavor=${PASS##*.}
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
PROJECT=$PROJECT${SUBARCH:+-$SUBARCH}
|
||||
|
||||
# Fish out generated kernel image and initrd
|
||||
mv chroot/boot/initrd.img-* ${PWD}/livecd.${PROJECT}.initrd-$flavor
|
||||
mv chroot/boot/vmlinu?-* ${PWD}/livecd.${PROJECT}.kernel-$flavor
|
||||
chmod a+r ${PWD}/livecd.${PROJECT}.initrd-$flavor ${PWD}/livecd.${PROJECT}.kernel-$flavor
|
||||
@ -21,6 +21,8 @@ case $PASS in
|
||||
;;
|
||||
esac
|
||||
|
||||
. config/functions
|
||||
|
||||
set -eux
|
||||
|
||||
# Extract the flavor from the pass name
|
||||
@ -29,8 +31,14 @@ flavor=${flavor##*.}
|
||||
|
||||
PROJECT=$PROJECT${SUBARCH:+-$SUBARCH}
|
||||
|
||||
KERNEL=${PWD}/livecd.${PROJECT}.kernel-$flavor
|
||||
INITRD=${PWD}/livecd.${PROJECT}.initrd-$flavor
|
||||
# Read kernel/initrd from the ISO casper directory where iso_install_kernel
|
||||
# placed them.
|
||||
kernel_name=vmlinuz
|
||||
case $ARCH in ppc64el|riscv64) kernel_name=vmlinux ;; esac
|
||||
casper_prefix=""
|
||||
case $flavor in *-hwe) casper_prefix="hwe-" ;; esac
|
||||
KERNEL=${CASPER_DIR}/${casper_prefix}${kernel_name}
|
||||
INITRD=${CASPER_DIR}/${casper_prefix}initrd
|
||||
|
||||
mkdir -p tarball/$ARCH
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ system_info:
|
||||
templates_dir: /etc/cloud/templates/
|
||||
upstart_dir: /etc/init/
|
||||
package_mirrors:
|
||||
- arches: [i386, amd64]
|
||||
- arches: [i386, amd64, arm64]
|
||||
failsafe:
|
||||
primary: http://archive.ubuntu.com/ubuntu
|
||||
security: http://security.ubuntu.com/ubuntu
|
||||
@ -86,7 +86,7 @@ system_info:
|
||||
- http://%(availability_zone)s.clouds.archive.ubuntu.com/ubuntu/
|
||||
- http://%(region)s.clouds.archive.ubuntu.com/ubuntu/
|
||||
security: []
|
||||
- arches: [arm64, armel, armhf]
|
||||
- arches: [armel, armhf]
|
||||
failsafe:
|
||||
primary: http://ports.ubuntu.com/ubuntu-ports
|
||||
security: http://ports.ubuntu.com/ubuntu-ports
|
||||
|
||||
@ -1,16 +1,5 @@
|
||||
# AppArmor restrictions of unprivileged user namespaces
|
||||
|
||||
# Allows to restrict the use of unprivileged user namespaces to applications
|
||||
# which have an AppArmor profile loaded which specifies the userns
|
||||
# permission. All other applications (whether confined by AppArmor or not) will
|
||||
# be denied the use of unprivileged user namespaces.
|
||||
#
|
||||
# See
|
||||
# https://gitlab.com/apparmor/apparmor/-/wikis/unprivileged_userns_restriction
|
||||
# https://gitlab.com/apparmor/apparmor/-/wikis/unprivileged_unconfined
|
||||
#
|
||||
# If it is desired to disable this restriction, it is preferable to create an
|
||||
# additional file named /etc/sysctl.d/20-apparmor.conf which will override this
|
||||
# current file and sets this value to 0 rather than editing this current file
|
||||
# Disables AppArmor user namespace restrictions on the live ISO.
|
||||
kernel.apparmor_restrict_unprivileged_userns = 0
|
||||
kernel.apparmor_restrict_unprivileged_unconfined = 1
|
||||
|
||||
@ -0,0 +1,11 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
cat <<EOF > /etc/sysctl.d/20-apparmor.conf
|
||||
# AppArmor restrictions of unprivileged user namespaces
|
||||
|
||||
# Disables AppArmor user namespace restrictions on the live ISO.
|
||||
kernel.apparmor_restrict_unprivileged_userns = 0
|
||||
kernel.apparmor_restrict_unprivileged_unconfined = 1
|
||||
EOF
|
||||
@ -18,18 +18,7 @@ EOF
|
||||
cat <<EOF > /etc/sysctl.d/20-apparmor.conf
|
||||
# AppArmor restrictions of unprivileged user namespaces
|
||||
|
||||
# Allows to restrict the use of unprivileged user namespaces to applications
|
||||
# which have an AppArmor profile loaded which specifies the userns
|
||||
# permission. All other applications (whether confined by AppArmor or not) will
|
||||
# be denied the use of unprivileged user namespaces.
|
||||
#
|
||||
# See
|
||||
# https://gitlab.com/apparmor/apparmor/-/wikis/unprivileged_userns_restriction
|
||||
# https://gitlab.com/apparmor/apparmor/-/wikis/unprivileged_unconfined
|
||||
#
|
||||
# If it is desired to disable this restriction, it is preferable to create an
|
||||
# additional file named /etc/sysctl.d/20-apparmor.conf which will override this
|
||||
# current file and sets this value to 0 rather than editing this current file
|
||||
# Disables AppArmor user namespace restrictions on the live ISO.
|
||||
kernel.apparmor_restrict_unprivileged_userns = 0
|
||||
kernel.apparmor_restrict_unprivileged_unconfined = 1
|
||||
EOF
|
||||
|
||||
@ -44,9 +44,13 @@ trap cleanup_hyperv EXIT
|
||||
# use it if they want.
|
||||
touch "${scratch_d}/etc/cloud/cloud-init.disabled"
|
||||
|
||||
mkdir -p "${scratch_d}/etc/dracut.conf.d"
|
||||
cat > "${scratch_d}/etc/dracut.conf.d/hyperv.conf" << EOF
|
||||
hostonly=no
|
||||
EOF
|
||||
|
||||
chroot "${scratch_d}" apt-get update -y
|
||||
chroot "${scratch_d}" apt-get -y install xrdp linux-azure linux-tools-azure linux-cloud-tools-azure polkitd-pkla oem-config-gtk language-pack-en-base oem-config-slideshow-ubuntu
|
||||
chroot "${scratch_d}" apt-get -y install xrdp linux-azure linux-tools-azure linux-cloud-tools-azure oem-config-gtk language-pack-en-base oem-config-slideshow-ubuntu
|
||||
|
||||
cat > ${scratch_d}/etc/modules-load.d/hyperv.conf << EOF
|
||||
${IMAGE_STR}
|
||||
@ -99,23 +103,30 @@ blacklist vmw_vsock_vmci_transport
|
||||
EOF
|
||||
|
||||
# Configure the policy xrdp session
|
||||
cat > ${scratch_d}/etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla << EOF
|
||||
${IMAGE_STR}
|
||||
[Allow Colord all Users]
|
||||
Identity=unix-user:*
|
||||
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
|
||||
ResultAny=no
|
||||
ResultInactive=no
|
||||
ResultActive=yes
|
||||
cat > ${scratch_d}/etc/polkit-1/rules.d/45-allow-colord.rules << EOF
|
||||
// ${IMAGE_STR}
|
||||
// Allow Colord all Users
|
||||
polkit.addRule(function(action, subject) {
|
||||
if ((action.id == "org.freedesktop.color-manager.create-device" ||
|
||||
action.id == "org.freedesktop.color-manager.create-profile" ||
|
||||
action.id == "org.freedesktop.color-manager.delete-device" ||
|
||||
action.id == "org.freedesktop.color-manager.delete-profile" ||
|
||||
action.id == "org.freedesktop.color-manager.modify-device" ||
|
||||
action.id == "org.freedesktop.color-manager.modify-profile") &&
|
||||
subject.active) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
EOF
|
||||
|
||||
cat >${scratch_d}/etc/polkit-1/localauthority/50-local.d/46-allow-update-repo.pkla <<EOF
|
||||
[Allow Package Management all Users]
|
||||
Identity=unix-user:*
|
||||
Action=org.freedesktop.packagekit.system-sources-refresh
|
||||
ResultAny=yes
|
||||
ResultInactive=yes
|
||||
ResultActive=yes
|
||||
cat >${scratch_d}/etc/polkit-1/rules.d/46-allow-update-repo.rules <<EOF
|
||||
// ${IMAGE_STR}
|
||||
// Allow Package Management all Users
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "org.freedesktop.packagekit.system-sources-refresh") {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
EOF
|
||||
|
||||
sed -i${CHANGED_FILE_SUFFIX} -e 's|After=|ConditionPathExists=!/var/lib/oem-config/run\nAfter=|g' "${scratch_d}/lib/systemd/system/xrdp.service"
|
||||
@ -123,7 +134,7 @@ sed -i${CHANGED_FILE_SUFFIX} -e 's|After=|ConditionPathExists=!/var/lib/oem-conf
|
||||
# End xrdp customisation
|
||||
|
||||
# Don't run gnome-initial-setup from gdm
|
||||
sed -i${CHANGED_FILE_SUFFIX} "s|#WaylandEnable=false|#WaylandEnable=false\nInitialSetupEnable=false|" "${scratch_d}/etc/gdm3/custom.conf"
|
||||
sed -i${CHANGED_FILE_SUFFIX} "s|\[daemon\]|[daemon]\nInitialSetupEnable=false|" "${scratch_d}/etc/gdm3/custom.conf"
|
||||
chroot "${scratch_d}" /usr/sbin/useradd -d /home/oem -m -N -u 29999 oem
|
||||
chroot "${scratch_d}" /usr/sbin/oem-config-prepare --quiet
|
||||
touch "${scratch_d}/var/lib/oem-config/run"
|
||||
|
||||
@ -76,7 +76,7 @@ system_info:
|
||||
templates_dir: /etc/cloud/templates/
|
||||
upstart_dir: /etc/init/
|
||||
package_mirrors:
|
||||
- arches: [i386, amd64]
|
||||
- arches: [i386, amd64, arm64]
|
||||
failsafe:
|
||||
primary: http://archive.ubuntu.com/ubuntu
|
||||
security: http://security.ubuntu.com/ubuntu
|
||||
@ -86,7 +86,7 @@ system_info:
|
||||
- http://%(availability_zone)s.clouds.archive.ubuntu.com/ubuntu/
|
||||
- http://%(region)s.clouds.archive.ubuntu.com/ubuntu/
|
||||
security: []
|
||||
- arches: [arm64, armel, armhf]
|
||||
- arches: [armel, armhf]
|
||||
failsafe:
|
||||
primary: http://ports.ubuntu.com/ubuntu-ports
|
||||
security: http://ports.ubuntu.com/ubuntu-ports
|
||||
|
||||
1
live-build/ubuntucinnamon/hooks/03-initramfs-enforcement.chroot
Symbolic link
1
live-build/ubuntucinnamon/hooks/03-initramfs-enforcement.chroot
Symbolic link
@ -0,0 +1 @@
|
||||
../../xubuntu/hooks/03-initramfs-enforcement.chroot
|
||||
1
live-build/ubuntukylin/hooks/03-initramfs-enforcement.chroot
Symbolic link
1
live-build/ubuntukylin/hooks/03-initramfs-enforcement.chroot
Symbolic link
@ -0,0 +1 @@
|
||||
../../xubuntu/hooks/03-initramfs-enforcement.chroot
|
||||
1
live-build/ubuntustudio/hooks/03-initramfs-enforcement.chroot
Symbolic link
1
live-build/ubuntustudio/hooks/03-initramfs-enforcement.chroot
Symbolic link
@ -0,0 +1 @@
|
||||
../../xubuntu/hooks/03-initramfs-enforcement.chroot
|
||||
34
live-build/xubuntu/hooks/03-initramfs-enforcement.chroot
Executable file
34
live-build/xubuntu/hooks/03-initramfs-enforcement.chroot
Executable file
@ -0,0 +1,34 @@
|
||||
#!/bin/bash -e
|
||||
# vi: ts=4 noexpandtab
|
||||
|
||||
# In a kernel layer, we need a freshly updated initrd (to ensure it
|
||||
# has been casperized with an appropriate config). A binary hook will
|
||||
# pull this out to be a separate build artifact to eventually end up
|
||||
# in /casper on the generated ISO.
|
||||
|
||||
# In all lower layers, having an initrd just wastes space, as curtin
|
||||
# will always call update-initramfs after the layer has been copied to
|
||||
# the target system.
|
||||
|
||||
# The netboot "layers" are not made into squashfses so there's no need
|
||||
# to do anything in those.
|
||||
|
||||
. /root/config/common
|
||||
. /root/config/functions
|
||||
|
||||
set -x
|
||||
|
||||
if ! is_live_layer "${PASS}"; then
|
||||
rm -f /boot/initrd.img-*
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cat <<EOF > /etc/initramfs-tools/conf.d/casperize.conf
|
||||
export CASPER_GENERATE_UUID=1
|
||||
EOF
|
||||
cat <<EOF > /etc/initramfs-tools/conf.d/default-layer.conf
|
||||
LAYERFS_PATH=${PASS}.squashfs
|
||||
EOF
|
||||
# As this hook has deleted the initrds from lower layers we need to
|
||||
# pass -c -k all to update-initramfs here (-u will do nothing)
|
||||
update-initramfs -c -k all
|
||||
Loading…
x
Reference in New Issue
Block a user