Compare commits

..

No commits in common. "ubuntu/master" and "26.04.24" have entirely different histories.

70 changed files with 277 additions and 304 deletions

33
debian/changelog vendored
View File

@ -1,36 +1,3 @@
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
(for at least ubuntu and some ubuntu-cpc configurations).
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Fri, 20 Mar 2026 06:47:44 +1300
livecd-rootfs (26.04.24) resolute; urgency=medium livecd-rootfs (26.04.24) resolute; urgency=medium
[ Allen Abraham ] [ Allen Abraham ]

View File

@ -1 +0,0 @@
0xffffff

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
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

View File

@ -1 +0,0 @@
acquire send receive

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
1.2

View File

@ -1 +0,0 @@
create read write exec append mmap_exec link lock

View File

@ -1 +0,0 @@
sqpoll override_creds

View File

@ -1 +0,0 @@
create read write open delete setattr getattr label

View File

@ -1 +0,0 @@
mount umount pivot_root

View File

@ -1 +0,0 @@
detached

View File

@ -1 +0,0 @@
userns_create

View File

@ -1 +0,0 @@
no

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
pciu&

View File

@ -1 +0,0 @@
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

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
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

View File

@ -1 +0,0 @@
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

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
0x000001

View File

@ -1 +0,0 @@
file tags

View File

@ -1 +0,0 @@
0x000001

View File

@ -1 +0,0 @@
allow deny subtree cond kill complain prompt audit quiet hide xindex tag label

View File

@ -1 +0,0 @@
0x000003

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
0x000001

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
read trace

View File

@ -1 +0,0 @@
yes

View File

@ -1 +0,0 @@
allow deny audit quiet

View File

@ -1 +0,0 @@
cpu fsize data stack core rss nproc nofile memlock as locks sigpending msgqueue nice rtprio rttime

View File

@ -1 +0,0 @@
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

View File

@ -424,12 +424,7 @@ case $LB_INITRAMFS in
;; ;;
esac esac
# For MAKE_ISO=yes builds, most artifacts (squashfs, kernel, initrd) are for OUTPUT in ext2 ext3 ext4 manifest manifest-remove size squashfs; do
# 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 [ -e "binary/$INITFS/filesystem.$OUTPUT" ] || continue
ln "binary/$INITFS/filesystem.$OUTPUT" "$PREFIX.$OUTPUT" ln "binary/$INITFS/filesystem.$OUTPUT" "$PREFIX.$OUTPUT"
chmod 644 "$PREFIX.$OUTPUT" chmod 644 "$PREFIX.$OUTPUT"
@ -456,6 +451,12 @@ if [ "${MAKE_ISO}" != "yes" ]; then
cp -a binary-tar.tar.gz "$PREFIX.rootfs.tar.gz" cp -a binary-tar.tar.gz "$PREFIX.rootfs.tar.gz"
fi 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 # If a .filelist is present, use it as the filelist for the image by
# symlinking with expected name and updating permissions # symlinking with expected name and updating permissions
if [ -e "binary/$INITFS/filesystem.filelist" ]; then if [ -e "binary/$INITFS/filesystem.filelist" ]; then
@ -471,6 +472,13 @@ if [ "${MAKE_ISO}" != "yes" ]; then
fi fi
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 for FLAVOUR in $LB_LINUX_FLAVOURS; do
if [ -z "$LB_LINUX_FLAVOURS" ] || [ "$LB_LINUX_FLAVOURS" = "none" ]; then if [ -z "$LB_LINUX_FLAVOURS" ] || [ "$LB_LINUX_FLAVOURS" = "none" ]; then
continue continue
@ -554,24 +562,6 @@ if [ "${MAKE_ISO}" != "yes" ]; then
cp $PREFIX.kernel $UBOOT_BOOT/vmlinuz || true cp $PREFIX.kernel $UBOOT_BOOT/vmlinuz || true
;; ;;
esac 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"
chmod 644 "$PREFIX.manifest"
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
# 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 case $PROJECT in
ubuntu-cpc) ubuntu-cpc)
@ -579,19 +569,25 @@ case $PROJECT in
esac esac
if [ "${MAKE_ISO}" = "yes" ]; then if [ "${MAKE_ISO}" = "yes" ]; then
# For non-layered builds, create squashfs with cdrom.sources directly # Link build artifacts with "for-iso." prefix for isobuild to consume.
# in casper/. Layered builds already handle this in lb_binary_layered. # Layered builds create squashfs via lb_binary_layered (which already
if [ -z "$PASSES" ] && [ "$PROJECT" != "ubuntu-mini-iso" ]; then # creates for-iso.*.squashfs files). Single-pass builds only have
if [ -n "${POOL_SEED_NAME}" ]; then # ${PREFIX}.squashfs, which does not contain cdrom.sources, so we
# create a for-iso.filesystem.squashfs that does.
if [ -z "$PASSES" ]; then
isobuild generate-sources --mountpoint=/cdrom > chroot/etc/apt/sources.list.d/cdrom.sources 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 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 done
fi isobuild add-live-filesystem --artifact-prefix for-iso.
isobuild extract-casper-uuids
isobuild make-bootable --project "${PROJECT}" --capproject "$(cat config/iso-ids/capproject)" \ isobuild make-bootable --project "${PROJECT}" --capproject "$(cat config/iso-ids/capproject)" \
${SUBARCH:+--subarch "${SUBARCH}"} ${SUBARCH:+--subarch "${SUBARCH}"}
isobuild make-iso --volid "$(cat config/iso-ids/vol-id)" --dest ${PREFIX}.iso isobuild make-iso --volid "$(cat config/iso-ids/vol-id)" --dest ${PREFIX}.iso

View File

@ -41,7 +41,7 @@ if [ -z "$MIRROR" ]; then
;; ;;
*) *)
case $ARCH in case $ARCH in
i386|amd64|arm64) MIRROR=http://archive.ubuntu.com/ubuntu/ ;; i386|amd64) MIRROR=http://archive.ubuntu.com/ubuntu/ ;;
*) MIRROR=http://ports.ubuntu.com/ubuntu-ports/ ;; *) MIRROR=http://ports.ubuntu.com/ubuntu-ports/ ;;
esac esac
;; ;;
@ -49,9 +49,7 @@ if [ -z "$MIRROR" ]; then
fi fi
mkdir -p config mkdir -p config
echo "LIVECD_ROOTFS_ROOT=\"$LIVECD_ROOTFS_ROOT\"" > config/functions cp -af ${LIVECD_ROOTFS_ROOT}/live-build/functions config/functions
chmod --reference=${LIVECD_ROOTFS_ROOT}/live-build/functions config/functions
cat ${LIVECD_ROOTFS_ROOT}/live-build/functions >> config/functions
cp -af ${LIVECD_ROOTFS_ROOT}/live-build/lb_*_layered config/ cp -af ${LIVECD_ROOTFS_ROOT}/live-build/lb_*_layered config/
cp -af ${LIVECD_ROOTFS_ROOT}/live-build/snap-seed-parse.py config/snap-seed-parse cp -af ${LIVECD_ROOTFS_ROOT}/live-build/snap-seed-parse.py config/snap-seed-parse
cp -af ${LIVECD_ROOTFS_ROOT}/live-build/snap-seed-missing-providers.py config/snap-seed-missing-providers cp -af ${LIVECD_ROOTFS_ROOT}/live-build/snap-seed-missing-providers.py config/snap-seed-missing-providers
@ -1183,7 +1181,6 @@ case $PROJECT in
KERNEL_FLAVOURS=none KERNEL_FLAVOURS=none
BINARY_REMOVE_LINUX=false BINARY_REMOVE_LINUX=false
MAKE_ISO=yes MAKE_ISO=yes
POOL_SEED_NAME=
add_package install mini-iso-tools linux-generic add_package install mini-iso-tools linux-generic
case $ARCH in case $ARCH in

View File

@ -573,7 +573,7 @@ _snap_post_process() {
# If the 'core' snap is not present, assume we are coreXX-only and # If the 'core' snap is not present, assume we are coreXX-only and
# install the snapd snap. # install the snapd snap.
channel=stable channel=stable
if [ "$SUBPROJECT" = "dangerous" ]; then if [ "$PROJECT" = "ubuntu" -o "$SUBPROJECT" = "dangerous" ]; then
channel=edge channel=edge
fi fi
if [ ! -f ${snaps_dir}/core_[0-9]*.snap ]; then if [ ! -f ${snaps_dir}/core_[0-9]*.snap ]; then
@ -1456,17 +1456,3 @@ gpt_root_partition_uuid() {
isobuild () { isobuild () {
PYTHONPATH=${LIVECD_ROOTFS_ROOT}/live-build/ ${LIVECD_ROOTFS_ROOT}/live-build/isobuild --workdir config/iso-dir "$@" 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) 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"
}

View File

@ -39,9 +39,10 @@
# Generate an apt deb822 source for the pool, assuming it is mounted at the # Generate an apt deb822 source for the pool, assuming it is mounted at the
# passed mountpoint, and output it on stdout. # passed mountpoint, and output it on stdout.
# #
# $ isobuild --work-dir "" extract-casper-uuids # $ isobuild --work-dir "" add-live-filesystem --artifact-prefix ""
# #
# Extract casper UUID files from the initrds in the casper directory. # Copy the relevant artifacts to the casper directory (and extract the uuids
# from the initrds)
# #
# $ isobuild --work-dir "" make-bootable --project "" --capitalized-project "" # $ isobuild --work-dir "" make-bootable --project "" --capitalized-project ""
# --subarch "" # --subarch ""
@ -168,9 +169,14 @@ def generate_sources(builder, mountpoint: str):
builder.generate_sources(mountpoint) builder.generate_sources(mountpoint)
@click.option(
"--artifact-prefix",
type=click.Path(dir_okay=False, resolve_path=True, path_type=pathlib.Path),
required=True,
)
@subcommand @subcommand
def extract_casper_uuids(builder): def add_live_filesystem(builder, artifact_prefix: pathlib.Path):
builder.extract_casper_uuids() builder.add_live_filesystem(artifact_prefix)
@click.option( @click.option(

View File

@ -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). # Extract UUID files from initrd images for casper (the live boot system).
# Each initrd contains a conf/uuid.conf with a unique identifier that # Each initrd contains a conf/uuid.conf with a unique identifier that
# casper uses at boot time to locate the correct root filesystem. These # casper uses at boot time to locate the correct root filesystem. These
@ -255,6 +255,43 @@ class ISOBuilder:
uuid_conf.rename(dot_disk.joinpath(f"casper-uuid-{suffix}")) uuid_conf.rename(dot_disk.joinpath(f"casper-uuid-{suffix}"))
shutil.rmtree(initrddir) 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): def make_bootable(self, project: str, capproject: str, subarch: str):
configurator = make_boot_configurator_for_arch( configurator = make_boot_configurator_for_arch(
self.arch, self.arch,

View File

@ -61,7 +61,7 @@ build_layered_squashfs () {
# Building squashfs filesystem & manifest # Building squashfs filesystem & manifest
local overlay_dir="overlay.${pass}" local overlay_dir="overlay.${pass}"
base="${PWD}/${CASPER_DIR}/${pass}" base="${PWD}/livecd.${PROJECT_FULL}.${pass}"
squashfs_f="${base}.squashfs" squashfs_f="${base}.squashfs"
# We have already treated that pass # We have already treated that pass
@ -91,20 +91,6 @@ build_layered_squashfs () {
# Copy initrd and vmlinuz outside of chroot and remove them from the layer squashfs # Copy initrd and vmlinuz outside of chroot and remove them from the layer squashfs
if $(is_live_layer "$pass"); then 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 ${*} lb binary_linux-image ${*}
rm -f chroot/boot/initrd.img-* chroot/boot/vmlinu{x,z}-* rm -f chroot/boot/initrd.img-* chroot/boot/vmlinu{x,z}-*
fi fi
@ -130,13 +116,32 @@ build_layered_squashfs () {
create_manifest "chroot" "${squashfs_f_manifest}.full" create_manifest "chroot" "${squashfs_f_manifest}.full"
# Delta manifest # Delta manifest
diff -NU0 ${PWD}/${CASPER_DIR}/$(get_parent_pass $pass).manifest.full ${squashfs_f_manifest}.full|grep -v ^@ > $squashfs_f_manifest || true diff -NU0 ${PWD}/livecd.${PROJECT_FULL}.$(get_parent_pass $pass).manifest.full ${squashfs_f_manifest}.full|grep -v ^@ > $squashfs_f_manifest || true
echo "Delta manifest:" echo "Delta manifest:"
cat $squashfs_f_manifest cat $squashfs_f_manifest
squashfs_f_size="${base}.size" squashfs_f_size="${base}.size"
du -B 1 -s "overlay.${pass}/" | cut -f1 > "${squashfs_f_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 if [ -n "$lowerdirs" ]; then
# Although the current chroot was created as an overlay over # Although the current chroot was created as an overlay over
# the previous layer, many operations can result in redundant # the previous layer, many operations can result in redundant
@ -178,17 +183,23 @@ build_layered_squashfs () {
${LIVECD_ROOTFS_ROOT}/sync-mtime chroot "$overlay_dir" ${LIVECD_ROOTFS_ROOT}/sync-mtime chroot "$overlay_dir"
fi fi
# For the root layer when building with a pool, include create_squashfs "${overlay_dir}" ${squashfs_f}
# cdrom.sources so casper can access the ISO's package repository. # 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.
if [ -n "${POOL_SEED_NAME}" ] && $(is_root_layer $pass); then if [ -n "${POOL_SEED_NAME}" ] && $(is_root_layer $pass); then
isobuild generate-sources --mountpoint=/cdrom > ${overlay_dir}/etc/apt/sources.list.d/cdrom.sources 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 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 if [ -f config/$pass.catalog-in.yaml ]; then
echo "Expanding catalog entry template for $pass" echo "Expanding catalog entry template for $pass"
usc_opts="--output ${CASPER_DIR}/install-sources.yaml \ usc_opts="--output livecd.${PROJECT_FULL}.install-sources.yaml \
--template config/$pass.catalog-in.yaml \ --template config/$pass.catalog-in.yaml \
--size $(du -B 1 -s chroot/ | cut -f1) --squashfs ${pass}.squashfs \ --size $(du -B 1 -s chroot/ | cut -f1) --squashfs ${pass}.squashfs \
--translations config/catalog-translations" --translations config/catalog-translations"
@ -214,11 +225,25 @@ do
build_layered_squashfs "${_PASS}" ${*} build_layered_squashfs "${_PASS}" ${*}
done done
if [ -n "$DEFAULT_KERNEL" -a -f ${CASPER_DIR}/install-sources.yaml ]; then if [ -n "$DEFAULT_KERNEL" -a -f livecd.${PROJECT_FULL}.install-sources.yaml ]; then
write_kernel_yaml "$DEFAULT_KERNEL" "$BRIDGE_KERNEL_REASONS" write_kernel_yaml "$DEFAULT_KERNEL" "$BRIDGE_KERNEL_REASONS"
${LIVECD_ROOTFS_ROOT}/update-source-catalog merge \ ${LIVECD_ROOTFS_ROOT}/update-source-catalog merge \
--output ${CASPER_DIR}/install-sources.yaml \ --output livecd.${PROJECT_FULL}.install-sources.yaml \
--template config/kernel.yaml --template config/kernel.yaml
fi fi
chmod 644 ${CASPER_DIR}/*.squashfs ${CASPER_DIR}/*.manifest* ${CASPER_DIR}/*.size # 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

View File

@ -76,7 +76,7 @@ system_info:
templates_dir: /etc/cloud/templates/ templates_dir: /etc/cloud/templates/
upstart_dir: /etc/init/ upstart_dir: /etc/init/
package_mirrors: package_mirrors:
- arches: [i386, amd64, arm64] - arches: [i386, amd64]
failsafe: failsafe:
primary: http://archive.ubuntu.com/ubuntu primary: http://archive.ubuntu.com/ubuntu
security: http://security.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://%(availability_zone)s.clouds.archive.ubuntu.com/ubuntu/
- http://%(region)s.clouds.archive.ubuntu.com/ubuntu/ - http://%(region)s.clouds.archive.ubuntu.com/ubuntu/
security: [] security: []
- arches: [armel, armhf] - arches: [arm64, armel, armhf]
failsafe: failsafe:
primary: http://ports.ubuntu.com/ubuntu-ports primary: http://ports.ubuntu.com/ubuntu-ports
security: http://ports.ubuntu.com/ubuntu-ports security: http://ports.ubuntu.com/ubuntu-ports

View File

@ -1,11 +1,11 @@
#!/bin/sh #!/bin/sh
# Install kernel/initrd directly into the ISO casper directory. # 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}.
set -eu set -eu
. config/functions
case $ARCH in case $ARCH in
amd64) amd64)
;; ;;
@ -14,4 +14,7 @@ case $ARCH in
;; ;;
esac esac
iso_install_kernel generic chroot/boot/vmlinuz chroot/boot/initrd.img PREFIX="livecd.${PROJECT}"
cp chroot/boot/vmlinuz "${PREFIX}.kernel-generic"
cp chroot/boot/initrd.img "${PREFIX}.initrd-generic"

View File

@ -0,0 +1,21 @@
#!/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

View File

@ -21,8 +21,6 @@ case $PASS in
;; ;;
esac esac
. config/functions
set -eux set -eux
# Extract the flavor from the pass name # Extract the flavor from the pass name
@ -31,14 +29,8 @@ flavor=${flavor##*.}
PROJECT=$PROJECT${SUBARCH:+-$SUBARCH} PROJECT=$PROJECT${SUBARCH:+-$SUBARCH}
# Read kernel/initrd from the ISO casper directory where iso_install_kernel KERNEL=${PWD}/livecd.${PROJECT}.kernel-$flavor
# placed them. INITRD=${PWD}/livecd.${PROJECT}.initrd-$flavor
kernel_name=vmlinuz
case $ARCH in ppc64el) 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 mkdir -p tarball/$ARCH

View File

@ -76,7 +76,7 @@ system_info:
templates_dir: /etc/cloud/templates/ templates_dir: /etc/cloud/templates/
upstart_dir: /etc/init/ upstart_dir: /etc/init/
package_mirrors: package_mirrors:
- arches: [i386, amd64, arm64] - arches: [i386, amd64]
failsafe: failsafe:
primary: http://archive.ubuntu.com/ubuntu primary: http://archive.ubuntu.com/ubuntu
security: http://security.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://%(availability_zone)s.clouds.archive.ubuntu.com/ubuntu/
- http://%(region)s.clouds.archive.ubuntu.com/ubuntu/ - http://%(region)s.clouds.archive.ubuntu.com/ubuntu/
security: [] security: []
- arches: [armel, armhf] - arches: [arm64, armel, armhf]
failsafe: failsafe:
primary: http://ports.ubuntu.com/ubuntu-ports primary: http://ports.ubuntu.com/ubuntu-ports
security: http://ports.ubuntu.com/ubuntu-ports security: http://ports.ubuntu.com/ubuntu-ports

View File

@ -76,7 +76,7 @@ system_info:
templates_dir: /etc/cloud/templates/ templates_dir: /etc/cloud/templates/
upstart_dir: /etc/init/ upstart_dir: /etc/init/
package_mirrors: package_mirrors:
- arches: [i386, amd64, arm64] - arches: [i386, amd64]
failsafe: failsafe:
primary: http://archive.ubuntu.com/ubuntu primary: http://archive.ubuntu.com/ubuntu
security: http://security.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://%(availability_zone)s.clouds.archive.ubuntu.com/ubuntu/
- http://%(region)s.clouds.archive.ubuntu.com/ubuntu/ - http://%(region)s.clouds.archive.ubuntu.com/ubuntu/
security: [] security: []
- arches: [armel, armhf] - arches: [arm64, armel, armhf]
failsafe: failsafe:
primary: http://ports.ubuntu.com/ubuntu-ports primary: http://ports.ubuntu.com/ubuntu-ports
security: http://ports.ubuntu.com/ubuntu-ports security: http://ports.ubuntu.com/ubuntu-ports