From 6eca6136443519e8de143435b312e33ab4879ca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Fri, 18 Aug 2023 17:50:56 +0200 Subject: [PATCH 01/43] Refresh the canary model assertions. --- debian/changelog | 9 +++ .../hooks/020-canary-enhanced-sb.binary | 23 +++---- .../ubuntu/hooks/020-canary-live.binary | 65 +++++++++++++++---- 3 files changed, 74 insertions(+), 23 deletions(-) diff --git a/debian/changelog b/debian/changelog index f2c54dee..4606f14f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +livecd-rootfs (23.10.18) UNRELEASED; urgency=medium + + * Refresh the canary model assertions. The live model now includes all the + snaps of the standard installation (including firefox), as we want to offer + the same experience in the livefs as in the target installation. We also + track other, proper channels for the seeded snaps. + + -- Łukasz 'sil2100' Zemczak Fri, 18 Aug 2023 17:49:09 +0200 + livecd-rootfs (23.10.17) mantic; urgency=medium * Merge the minimal and standard layers on the Ubuntu Desktop images diff --git a/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary b/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary index 10afd496..edd5dab1 100644 --- a/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary +++ b/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary @@ -25,6 +25,7 @@ esac cat < config/classic-model.model type: model authority-id: canonical +revision: 2 series: 16 brand-id: canonical model: ubuntu-classic-2310-amd64 @@ -40,7 +41,7 @@ snaps: name: pc type: gadget - - default-channel: 24-hwe/stable + default-channel: 23.10/stable id: pYVQrBcKmBa0mZ4CCN7ExT6jH8rY1hza name: pc-kernel type: kernel @@ -97,16 +98,16 @@ snaps: timestamp: 2023-07-18T12:00:00.0Z sign-key-sha3-384: 9tydnLa6MTJ-jaQTFUXEwHl1yRx7ZS4K5cyFDhYDcPzhS7uyEkDxdUjg9g08BtNn -AcLBXAQAAQoABgUCZLa6ewAKCRDgT5vottzAEu9jD/9dfuMX8kDWrEaaiv+3g6GB/xEuhHkVStOU -5c+7M9wB19BQrIhKCbYnNNGLJrIJj1DDThwCK+/L43NiiuolEDaTAGbKPxw7BhCMitnX9i3fxkFm -WaAsc667Fi9QVTb7XFKrzUiU7cwmqCI0ZjAn1fx8zXutRPISKw8fQaL8Acv80lNSWL5dyyJ1gtvC -jMGVbD8R45pF+n8u5sNQaRweYayNv+TFAJDquGxP3Cuu0DYiO3SzsBpg8BV9siqByOshO+93DCaM -8Vl3RFPGdY+M+kJsoI3GBHlZ3K+Hl1biVPpfm74T5DXQiLAxzs7iPgfqGC0QwRdzxHsNCETZrVAn -PzRDiagJSQWgAB1/zUVDgHIOw52OmHrTavwK7/p983na/HhVfU0rV3vZ/Ve6XsTryoOZ6Z31ygc4 -NiAtm8z7rRSsehR3JdykrtJziaE26lph9gl3QgdSYnfOGB+IOUt/Y6jf9hcAEIXqCMVKoiL2ynlp -G+nrcV25FfId+FDjezbfvPGe71fsjVZyL4ReQPCZRyCBujcASsn7sitZTuiZzYX8L9Uwl4baO6/a -dRTqQ4onOgta0LnuGFoIg4ifs7OLcyZmuQUoVR8a8IwNvq9/acYZ/uoYBUwWpzkqF2i1Wc8t+zvx -uqvrEaWLoj9oa4E+956QJLGfn+qwSNeURdfkjAoPnA== +AcLBXAQAAQoABgUCZN94uAAKCRDgT5vottzAEsahEAC4oL47eK46gqSIE/enKgWrg1LCg+hP6ebL +fz/JoNduCsLR9JkJtFL4QoqLPqD/KQ+CxpSRUkewvY+QyoeHbJHBa3B9dWM6LGMtvZFIgKNWmqHB +J/lMMlmzlerGOj6Yi2qipW6pS9xU2BEErZGqCUsiR1qaQnqkJjLJm6ygPOEuuOVgdq5H+pv10Wvl +gRTSlUYW9wzs6vt1r9/r2a06m7pYp5zWXRS5+HTAxfnL3iZwvtOlMH+Hwr2ZCZjSMpuz05uuweak +sVtbLqXB5W5zT1s7RH7xZ9Ba4RwyFZZB4omv9aDwc+EtNMKjhGRzIBkAUjU4KQwyiDVXD5dVtWUP +PxTOowURNgnbICtf+p5sVWSYjwl9Z05Q6D/e3humQ/sXkTU5kIGdnI/W9O7A+n/ttBHIQ71EscnH +s5teT1wjbxk4OeHwINuma/ktQt6bMoWrOiRZAm//qW7599lOJKr7TEL3aA3oT/RES0SswQ0XAGEs +j7qO6rAERTYB2zO8OAUnL2vAUoTKa5G+WP3B9brrI1UaLHaDZUWg1kjubZzkeBLNdyoNFna8OInO +YGanAa0HbNj/oM94GMwFKPFTeyNfGgdEprJgqwetDRc5FndSefquUdLRhrQG+ophqKz2ehSRMsZL +OSI99bh1PCSxmNargEoWv/sXFGgLcbLOjd3gv1fTvg== EOF channel="" diff --git a/live-build/ubuntu/hooks/020-canary-live.binary b/live-build/ubuntu/hooks/020-canary-live.binary index 2c661787..fbced2b0 100755 --- a/live-build/ubuntu/hooks/020-canary-live.binary +++ b/live-build/ubuntu/hooks/020-canary-live.binary @@ -25,6 +25,7 @@ esac cat < config/classic-model-installer.model type: model authority-id: canonical +revision: 2 series: 16 brand-id: canonical model: ubuntu-installer-classic-2310-amd64 @@ -46,23 +47,63 @@ snaps: type: snapd - classic: true - default-channel: latest/stable/canary-23.10 + default-channel: latest/stable/ubuntu-23.10 id: rQm0TtMOYOtEslvEXgxQDhgy1JNn38Wz name: ubuntu-desktop-installer type: app -timestamp: 2023-07-18T12:00:00.0Z + - + default-channel: latest/stable + id: DLqre5XGLbDqg9jPtiAhRRjDuPVa5X1q + name: core20 + type: base + - + default-channel: latest/stable + id: EISPgh06mRh1vordZY9OZ34QHdd7OrdR + name: bare + type: base + - + default-channel: latest/stable + id: 3wdHCAVyZEmYsCMFDE9qt92UV8rC8Wdk + name: firefox + type: app + - + default-channel: latest/stable + id: rw36mkAjdIKl13dzfwyxP87cejpyIcct + name: gnome-3-38-2004 + type: app + - + default-channel: latest/stable + id: lATO8HzwVvrAPrlZRAWpfyrJKlAJrZS3 + name: gnome-42-2204 + type: app + - + default-channel: latest/stable + id: jZLfBRzf1cYlYysIjD2bwSzNtngY0qit + name: gtk-common-themes + type: app + - + default-channel: latest/stable + id: gjf3IPXoRiipCu9K0kVu52f0H56fIksg + name: snap-store + type: app + - + default-channel: latest/stable + id: IrwRHakqtzhFRHJOOPxKVPU0Kk7Erhcu + name: snapd-desktop-integration + type: app +timestamp: 2023-08-09T12:00:00.0Z sign-key-sha3-384: 9tydnLa6MTJ-jaQTFUXEwHl1yRx7ZS4K5cyFDhYDcPzhS7uyEkDxdUjg9g08BtNn -AcLBXAQAAQoABgUCZLa6iQAKCRDgT5vottzAEh+hEACxb8nNg/2yznOanHsCY69miFDHvxLf2AGB -qeE+XJ9pyN05/JkvrDhODL0DCknFuvgo5kl+FhrS+mPdviytc3Ppm3kHSnPuwfzuO4t8PM1mRMOZ -8djtgzbStKAzwKyYiK/pon4/Wtu1+6/tTp8Ji/pH12aRoFBub6mtQD81hC/xVxdcKz8KvzGsD5co -H1TLfhKACVQJHZp7ErShkB6Ka6nVQy1c8/4sDPadKb2mqraIVMJmmHlYAHMfGl6f1dElheAjWXmz -0Roz4fh4lvjM0GmYTlsmhEj10F0pdwY/C2jB+6VFBJEZax65mRjs6Jaqxa150a26sOVFcMkS0ifO -pkB+KHrnilJ0/PyXZCoQcL65wTBEnfI0X/nzhvuE+9dXz5EUlusWeMvEhJ4QNOacCPARSd76M7QB -gUhMrz4Vf68V6tlfbXxgoEJFoVJo4i7gymMPnZDg0uAGQFYK+SSVEO/VtLDQvwRBU80IdA0kaIsn -afaqwYP8ACNPWpTztVYd/X6mvpdDz8MsW9pAEmJ4EN6JWcEu4ii5qXlzLK3s3HaCS5XNj+TpPEU+ -9Nh9ePmCfE+KxR0cgfTbxP3KerYSd/xQHxgMLcMAGq20+1i/FmksKD6cSNYJRoqwTPwP+D9p42wF -3qGR3KEYbIij4hk/fZMCNzUEWt41OLLUVKm81oOixg== +AcLBXAQAAQoABgUCZN94uAAKCRDgT5vottzAEvtpEACfnxMEKTBZPbwZxNEXA+W4zUIKLyZKNQ8J +dnS4WoarMLqbAOHLPyWyHK/R5+Q9cxX1M+9SlR7oKwL/yP6eUMl/olsDMfv6+rGqg5VBLijkUSfu +ZoF8Cjev3lQfuuYqSXsZHQnz3SfMdL2RpXWSd0BuHeW96MG7uGLA9NM4sz5vbY+eVZpVC0LxFfeK +njAvCslALtcWChVig1IUTAPz22pEBpkQO6wEkjkccpsZLGwQSvYIpPX1HMLKvMo/LzX9Dxp/Xnlt +gcvwHTRHD1NO0qgrx5eKthXbbFTigxOA8l1hkhMM7p9trTXzHUchsKCjzlx+sdT9GfEzSqJsekH5 +m878xIMaP2UXhBNMZkXr8/vFxHsBdW2FMhJULNT8eyO+5C/I22/DwCFLJESqA5wA/hm8q5PH6tP2 +HOzbN9mxK7Y+J37JUFrLjz76ECxf/IVktTbDrBOvk40lsomlSE9VngFKbzxVHz7wn6m+lnqy4UDt ++1QJr0GlzZYhJPccqqj9skdtkBdgTe2hogty8KsERneUpJ9wtV5UuOr2DU83Plh9yFjYhl4s7XGP +FjN6SMO3hL8nnoF7rANFTNMkyMl2IbyX4wfmi3pjAGubpQPDc00rc5KcwKdNwgAMB9XrvB/dEzKg +v0vszO82HG1XGXT8Em6DGLDTpyn7ABl0MAnjDFmLEw== EOF channel="" From 9d9a68d6bf638ceac5f11f432d72631ca96cdded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Fri, 18 Aug 2023 18:00:24 +0200 Subject: [PATCH 02/43] Fix the 020-canary-* hooks referencing the wrong layer names after changes introduced in 23.10.17. --- debian/changelog | 4 +++- live-build/ubuntu/hooks/020-canary-enhanced-sb.binary | 2 +- live-build/ubuntu/hooks/020-canary-live.binary | 2 +- live-build/ubuntu/hooks/020-canary-live.chroot_early | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4606f14f..3e3f8d7f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,8 +4,10 @@ livecd-rootfs (23.10.18) UNRELEASED; urgency=medium snaps of the standard installation (including firefox), as we want to offer the same experience in the livefs as in the target installation. We also track other, proper channels for the seeded snaps. + * Fix the 020-canary-* hooks referencing the wrong layer names after changes + introduced in 23.10.17. - -- Łukasz 'sil2100' Zemczak Fri, 18 Aug 2023 17:49:09 +0200 + -- Łukasz 'sil2100' Zemczak Fri, 18 Aug 2023 17:58:54 +0200 livecd-rootfs (23.10.17) mantic; urgency=medium diff --git a/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary b/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary index edd5dab1..b14055d3 100644 --- a/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary +++ b/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary @@ -3,7 +3,7 @@ set -eux case ${PASS:-} in - minimal.standard.enhanced-secureboot) + standard.enhanced-secureboot) ;; *) exit 0 diff --git a/live-build/ubuntu/hooks/020-canary-live.binary b/live-build/ubuntu/hooks/020-canary-live.binary index fbced2b0..e8980ea0 100755 --- a/live-build/ubuntu/hooks/020-canary-live.binary +++ b/live-build/ubuntu/hooks/020-canary-live.binary @@ -3,7 +3,7 @@ set -eux case ${PASS:-} in - minimal.standard.live) + standard.live) ;; *) exit 0 diff --git a/live-build/ubuntu/hooks/020-canary-live.chroot_early b/live-build/ubuntu/hooks/020-canary-live.chroot_early index 76846f3b..f5f165a5 100755 --- a/live-build/ubuntu/hooks/020-canary-live.chroot_early +++ b/live-build/ubuntu/hooks/020-canary-live.chroot_early @@ -3,7 +3,7 @@ set -eu case ${PASS:-} in - minimal.standard.live) + standard.live) ;; *) exit 0 From 139234da82086cc5ba87f5372a71dedb93d487dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Fri, 18 Aug 2023 18:00:47 +0200 Subject: [PATCH 03/43] releasing package livecd-rootfs version 23.10.18 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 3e3f8d7f..f64d3351 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (23.10.18) UNRELEASED; urgency=medium +livecd-rootfs (23.10.18) mantic; urgency=medium * Refresh the canary model assertions. The live model now includes all the snaps of the standard installation (including firefox), as we want to offer From 7b1b63147e4744bf42a9d303cffc187242a3e663 Mon Sep 17 00:00:00 2001 From: Utkarsh Gupta Date: Mon, 21 Aug 2023 20:43:42 +0530 Subject: [PATCH 04/43] Add python3-systemd to our minimized builds This package is needed by ubuntu-advantage-tools for cloud images only. u-a-t ultimately will drop this entirely in their next release. (cf: https://github.com/canonical/ubuntu-pro-client/issues/2692) So instead of putting this in the seeds and then having to deal with the seed changes to Mantic (after its release) and SRU of ubuntu-meta, I'd rather have changes in livecd-rootfs done. Once python3-systemd dependency is dropped from u-a-t, we'll drop it from livecd-rootfs in Mantic+, too. --- live-build/auto/config | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/live-build/auto/config b/live-build/auto/config index a2b16429..8cc08676 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -1102,8 +1102,15 @@ case $PROJECT in # or by passing --no-install-recommends to apt-get install. # Apt config is set using `APT_OPTIONS` variable in this script. # This fixes LP: #2031640 + # + # We're also installing python3-systemd for now because it's needed by + # ubuntu-advantage-tools. This will eventually be dropped in the next + # release of u-a-t. This is being discussed and tracked at + # https://github.com/canonical/ubuntu-pro-client/issues/2692. + # Once python3-systemd is dropped from u-a-t, we can remove it + # from here, too. APT_OPTIONS="${APT_OPTIONS:+$APT_OPTIONS }--no-install-recommends" - add_package install ubuntu-cloud-minimal + add_package install ubuntu-cloud-minimal python3-systemd else add_task install minimal standard cloud-image add_package install ubuntu-minimal From 13c3321bb821f85ec803c4ea2ed000f1df46a56a Mon Sep 17 00:00:00 2001 From: Utkarsh Gupta Date: Tue, 22 Aug 2023 14:55:35 +0530 Subject: [PATCH 05/43] Update d/ch for 23.10.19 release --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index f64d3351..9d870283 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (23.10.19) mantic; urgency=medium + + * Add python3-systemd to CPC's minimized builds. + + -- Utkarsh Gupta Tue, 22 Aug 2023 14:54:57 +0530 + livecd-rootfs (23.10.18) mantic; urgency=medium * Refresh the canary model assertions. The live model now includes all the From b1a118f4d72f4b5ce1415109965c6b671455a5d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Tue, 22 Aug 2023 17:15:36 +0200 Subject: [PATCH 06/43] Update canary model assertions.: --- debian/changelog | 7 ++ .../hooks/020-canary-enhanced-sb.binary | 74 ++++++++++++------- .../ubuntu/hooks/020-canary-live.binary | 74 ++++++++++++------- 3 files changed, 101 insertions(+), 54 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9d870283..815d7695 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (23.10.20) UNRELEASED; urgency=medium + + * Update canary model assertions to include all the regular seeded snaps, + using the right channels for all of them. + + -- Łukasz 'sil2100' Zemczak Tue, 22 Aug 2023 17:14:38 +0200 + livecd-rootfs (23.10.19) mantic; urgency=medium * Add python3-systemd to CPC's minimized builds. diff --git a/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary b/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary index b14055d3..e1b41ad8 100644 --- a/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary +++ b/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary @@ -25,7 +25,7 @@ esac cat < config/classic-model.model type: model authority-id: canonical -revision: 2 +revision: 3 series: 16 brand-id: canonical model: ubuntu-classic-2310-amd64 @@ -55,59 +55,79 @@ snaps: id: PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4 name: snapd type: snapd - - - default-channel: latest/stable - id: DLqre5XGLbDqg9jPtiAhRRjDuPVa5X1q - name: core20 - type: base - default-channel: latest/stable id: EISPgh06mRh1vordZY9OZ34QHdd7OrdR name: bare type: base - - default-channel: latest/stable + default-channel: latest/stable/ubuntu-23.10 id: 3wdHCAVyZEmYsCMFDE9qt92UV8rC8Wdk name: firefox type: app - - default-channel: latest/stable - id: rw36mkAjdIKl13dzfwyxP87cejpyIcct - name: gnome-3-38-2004 - type: app - - - default-channel: latest/stable + default-channel: latest/stable/ubuntu-23.10 id: lATO8HzwVvrAPrlZRAWpfyrJKlAJrZS3 name: gnome-42-2204 type: app - - default-channel: latest/stable + default-channel: latest/stable/ubuntu-23.10 id: jZLfBRzf1cYlYysIjD2bwSzNtngY0qit name: gtk-common-themes type: app - - default-channel: latest/stable + default-channel: latest/stable/ubuntu-23.10 id: gjf3IPXoRiipCu9K0kVu52f0H56fIksg name: snap-store type: app - - default-channel: latest/stable + default-channel: latest/stable/ubuntu-23.10 id: IrwRHakqtzhFRHJOOPxKVPU0Kk7Erhcu name: snapd-desktop-integration type: app -timestamp: 2023-07-18T12:00:00.0Z + - + default-channel: latest/stable/ubuntu-23.10 + id: m1eQacDdXCthEwWQrESei3Zao3d5gfJF + name: cups + type: app + - + default-channel: latest/stable/ubuntu-23.10 + id: d1yehor45vFG9GdKjmgdqbnBuKtR0Qa4 + name: ghostscript-printer-app + type: app + - + default-channel: latest/stable/ubuntu-23.10 + id: 3wnSvqxn6OqPBuioytBcdnR2UBaUzvPC + name: gutenprint-printer-app + type: app + - + default-channel: latest/stable/ubuntu-23.10 + id: PPjo7KVjJvmdYUeUt9LqmKRrgmGdWPyM + name: hplip-printer-app + type: app + - + default-channel: latest/stable/ubuntu-23.10 + id: WJKWBUuCDufOFw2p24tvkbbw02plGkbd + name: ipp-usb + type: app + - + default-channel: latest/stable/ubuntu-23.10 + id: 5xUmM1J4qSfki63gfpEDcrr1wU1FdP2k + name: ps-printer-app + type: app +timestamp: 2023-08-22T12:00:00.0Z sign-key-sha3-384: 9tydnLa6MTJ-jaQTFUXEwHl1yRx7ZS4K5cyFDhYDcPzhS7uyEkDxdUjg9g08BtNn -AcLBXAQAAQoABgUCZN94uAAKCRDgT5vottzAEsahEAC4oL47eK46gqSIE/enKgWrg1LCg+hP6ebL -fz/JoNduCsLR9JkJtFL4QoqLPqD/KQ+CxpSRUkewvY+QyoeHbJHBa3B9dWM6LGMtvZFIgKNWmqHB -J/lMMlmzlerGOj6Yi2qipW6pS9xU2BEErZGqCUsiR1qaQnqkJjLJm6ygPOEuuOVgdq5H+pv10Wvl -gRTSlUYW9wzs6vt1r9/r2a06m7pYp5zWXRS5+HTAxfnL3iZwvtOlMH+Hwr2ZCZjSMpuz05uuweak -sVtbLqXB5W5zT1s7RH7xZ9Ba4RwyFZZB4omv9aDwc+EtNMKjhGRzIBkAUjU4KQwyiDVXD5dVtWUP -PxTOowURNgnbICtf+p5sVWSYjwl9Z05Q6D/e3humQ/sXkTU5kIGdnI/W9O7A+n/ttBHIQ71EscnH -s5teT1wjbxk4OeHwINuma/ktQt6bMoWrOiRZAm//qW7599lOJKr7TEL3aA3oT/RES0SswQ0XAGEs -j7qO6rAERTYB2zO8OAUnL2vAUoTKa5G+WP3B9brrI1UaLHaDZUWg1kjubZzkeBLNdyoNFna8OInO -YGanAa0HbNj/oM94GMwFKPFTeyNfGgdEprJgqwetDRc5FndSefquUdLRhrQG+ophqKz2ehSRMsZL -OSI99bh1PCSxmNargEoWv/sXFGgLcbLOjd3gv1fTvg== +AcLBXAQAAQoABgUCZOTCgQAKCRDgT5vottzAEkN9D/9CM4jsP7D6j5CIMM2t4P7A5Hcq+LB/+wEi +h9uqr6CbsJazgPS6Y4nZnu5NRz/irwxFyzWLiqbwqdyNgu7Y+2G0PPzo3MgCzjV93hRkPlOmLXHd +dtDw6XOXThMLBVSriAft8lKLhzYoX2qw2fP7Wys1NUlRIMYHvJMdHdrVQgoAz+W8qAlbSQ9VSTSc +xaMConnt5rtOJ9Aw8Er3NZEx5wfpzriGJ1L7T9qUsijVq6On4W4aCUJtKHplsV2LRsn+HSLLae7h +ULCCpUy88D3uNOoAPBRjY9Vm64/gtvMpYOztqhukT7OMDigH6RD6g0qfgS8aC4x/Ok6OIZpNnP0f +Iy4cx5DepdIR4sMlBtfQhenkG49gkNyUxtbN1XeS1N21cBsNysBL8CSBucR3plPOWYSthrwWgRpD +qv0DA/SIzntFxRUFh34f0ESLSJja/WrmEbSzk7EfloauY/2gWQ7B+NHnddTI/uBKpssi+rhJlUq8 +Hec1La/U+fv0WOWg3tD71lbNqFCQv02vi5az15NfRxI9K2K72rWvmhaUuQQUZPBitBTmTX8rG3pb +Aw00idWo5/hAgSpcOIoEhntkxfgLpoK2s8EX1USPk5XW+9XITEsKFyC3UVBgsRDqRMLWn1Eketyv +ejP1SS6R9LyritULe9w7lcxRlg8f4G+scUYSyBjLDA== EOF channel="" diff --git a/live-build/ubuntu/hooks/020-canary-live.binary b/live-build/ubuntu/hooks/020-canary-live.binary index e8980ea0..a382587f 100755 --- a/live-build/ubuntu/hooks/020-canary-live.binary +++ b/live-build/ubuntu/hooks/020-canary-live.binary @@ -25,7 +25,7 @@ esac cat < config/classic-model-installer.model type: model authority-id: canonical -revision: 2 +revision: 3 series: 16 brand-id: canonical model: ubuntu-installer-classic-2310-amd64 @@ -51,59 +51,79 @@ snaps: id: rQm0TtMOYOtEslvEXgxQDhgy1JNn38Wz name: ubuntu-desktop-installer type: app - - - default-channel: latest/stable - id: DLqre5XGLbDqg9jPtiAhRRjDuPVa5X1q - name: core20 - type: base - default-channel: latest/stable id: EISPgh06mRh1vordZY9OZ34QHdd7OrdR name: bare type: base - - default-channel: latest/stable + default-channel: latest/stable/ubuntu-23.10 id: 3wdHCAVyZEmYsCMFDE9qt92UV8rC8Wdk name: firefox type: app - - default-channel: latest/stable - id: rw36mkAjdIKl13dzfwyxP87cejpyIcct - name: gnome-3-38-2004 - type: app - - - default-channel: latest/stable + default-channel: latest/stable/ubuntu-23.10 id: lATO8HzwVvrAPrlZRAWpfyrJKlAJrZS3 name: gnome-42-2204 type: app - - default-channel: latest/stable + default-channel: latest/stable/ubuntu-23.10 id: jZLfBRzf1cYlYysIjD2bwSzNtngY0qit name: gtk-common-themes type: app - - default-channel: latest/stable + default-channel: latest/stable/ubuntu-23.10 id: gjf3IPXoRiipCu9K0kVu52f0H56fIksg name: snap-store type: app - - default-channel: latest/stable + default-channel: latest/stable/ubuntu-23.10 id: IrwRHakqtzhFRHJOOPxKVPU0Kk7Erhcu name: snapd-desktop-integration type: app -timestamp: 2023-08-09T12:00:00.0Z + - + default-channel: latest/stable/ubuntu-23.10 + id: m1eQacDdXCthEwWQrESei3Zao3d5gfJF + name: cups + type: app + - + default-channel: latest/stable/ubuntu-23.10 + id: d1yehor45vFG9GdKjmgdqbnBuKtR0Qa4 + name: ghostscript-printer-app + type: app + - + default-channel: latest/stable/ubuntu-23.10 + id: 3wnSvqxn6OqPBuioytBcdnR2UBaUzvPC + name: gutenprint-printer-app + type: app + - + default-channel: latest/stable/ubuntu-23.10 + id: PPjo7KVjJvmdYUeUt9LqmKRrgmGdWPyM + name: hplip-printer-app + type: app + - + default-channel: latest/stable/ubuntu-23.10 + id: WJKWBUuCDufOFw2p24tvkbbw02plGkbd + name: ipp-usb + type: app + - + default-channel: latest/stable/ubuntu-23.10 + id: 5xUmM1J4qSfki63gfpEDcrr1wU1FdP2k + name: ps-printer-app + type: app +timestamp: 2023-08-22T12:00:00.0Z sign-key-sha3-384: 9tydnLa6MTJ-jaQTFUXEwHl1yRx7ZS4K5cyFDhYDcPzhS7uyEkDxdUjg9g08BtNn -AcLBXAQAAQoABgUCZN94uAAKCRDgT5vottzAEvtpEACfnxMEKTBZPbwZxNEXA+W4zUIKLyZKNQ8J -dnS4WoarMLqbAOHLPyWyHK/R5+Q9cxX1M+9SlR7oKwL/yP6eUMl/olsDMfv6+rGqg5VBLijkUSfu -ZoF8Cjev3lQfuuYqSXsZHQnz3SfMdL2RpXWSd0BuHeW96MG7uGLA9NM4sz5vbY+eVZpVC0LxFfeK -njAvCslALtcWChVig1IUTAPz22pEBpkQO6wEkjkccpsZLGwQSvYIpPX1HMLKvMo/LzX9Dxp/Xnlt -gcvwHTRHD1NO0qgrx5eKthXbbFTigxOA8l1hkhMM7p9trTXzHUchsKCjzlx+sdT9GfEzSqJsekH5 -m878xIMaP2UXhBNMZkXr8/vFxHsBdW2FMhJULNT8eyO+5C/I22/DwCFLJESqA5wA/hm8q5PH6tP2 -HOzbN9mxK7Y+J37JUFrLjz76ECxf/IVktTbDrBOvk40lsomlSE9VngFKbzxVHz7wn6m+lnqy4UDt -+1QJr0GlzZYhJPccqqj9skdtkBdgTe2hogty8KsERneUpJ9wtV5UuOr2DU83Plh9yFjYhl4s7XGP -FjN6SMO3hL8nnoF7rANFTNMkyMl2IbyX4wfmi3pjAGubpQPDc00rc5KcwKdNwgAMB9XrvB/dEzKg -v0vszO82HG1XGXT8Em6DGLDTpyn7ABl0MAnjDFmLEw== +AcLBXAQAAQoABgUCZOTCgQAKCRDgT5vottzAEvDYD/97aa0ub3eq1zzUpMRDXY+NoHMLOON5zBgA +qLmpZq9ECZtuT0Tsyn/znlx2g15r8erzlgQtg/lS8iLIk0PqmwE/BB4ntdLQ3P56Rxz/YvkoK31B +519vOcpLlXxyVHsG4u3IjsEtPBlm4dmnzuuJodiRF4g4iXlxIQpcCkUm1gTHKof6NUlne7VwNty7 +8GvinPZtoTDVc6i+VftzUAbnqtifSlvxUseDvRkZrYX44FWKfEz7qqGQVdtwmZrP/ab+nc0CA+Nz +p6pn1wBrXk4y3EGw5RWQJvY5PzE5E7fCCirUW6SWpZ15jGK7pKGtXK2TJQlgsILeVp40FhnX5+As +9EnJpCCPYn8ZkKKjL9dCvmBSaKsqC0SVPYeB+T6PG2ANEHooaALvoiSTUVCM4HnBvjMtSXJpOPE7 +FzfyL9z4mKtNF82NmHc9Oms7QfuX70jQ0mgS/NDy6Te+4dhZ5QpLZzkwed/SWGmHGADPPV6Dxhcd +N5sjPPhhAJ6A2EyJQrKY3dOUt/vlu04C1TZCQwz9aQJO5hEaC3E/+ci8IVBRhDAvKJJ4iuTdO/k2 +SRiShTD1s/mua3D01bN2gGoyh2DY4lFKro28by4Ci0QXSBOIVTk+GnWAOwJCnbB636PZD9Ipf29L +ri86PlIOcM1OvSROryexBE+aNuWZYBwvJIo2kMYfVw== EOF channel="" From caedce593b2ffbbabbb4067c322c04d13f72bdb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Tue, 22 Aug 2023 17:16:00 +0200 Subject: [PATCH 07/43] releasing package livecd-rootfs version 23.10.20 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 815d7695..025befe2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (23.10.20) UNRELEASED; urgency=medium +livecd-rootfs (23.10.20) mantic; urgency=medium * Update canary model assertions to include all the regular seeded snaps, using the right channels for all of them. From 6890dfe5ca5ad641e356359c09a0f6265420f428 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Wed, 23 Aug 2023 11:16:23 +1200 Subject: [PATCH 08/43] Deduplicate the layers just before creating the squashfs, to enable deduplication of the result of binary hooks as well. --- debian/changelog | 7 +++++++ live-build/lb_binary_layered | 18 +++++++++++++++++- live-build/lb_chroot_layered | 19 ++++--------------- 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/debian/changelog b/debian/changelog index 025befe2..4c1d50aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (23.10.21) UNRELEASED; urgency=medium + + * Deduplicate the layers just before creating the squashfs, to enable + deduplication of the result of binary hooks as well. + + -- Michael Hudson-Doyle Wed, 23 Aug 2023 11:15:26 +1200 + livecd-rootfs (23.10.20) mantic; urgency=medium * Update canary model assertions to include all the regular seeded snaps, diff --git a/live-build/lb_binary_layered b/live-build/lb_binary_layered index 146978d3..1fb33af9 100755 --- a/live-build/lb_binary_layered +++ b/live-build/lb_binary_layered @@ -142,7 +142,23 @@ build_layered_squashfs () { cp "${squashfs_f_manifest}.full" "${prefix}.manifest" fi - create_squashfs "overlay.${pass}/" ${squashfs_f} + if [ -n "$lowerdirs" ]; then + # Although the current chroot was created as an overlay over + # the previous layer, many operations can result in redundant + # files in the upperdir. Rather than trying to minimize the + # overlay by hand, we rsync the chroot into a fresh overlay, + # rely on rsyncs ability to avoid redundant file operations, + # and take _that_ overlay's upperdir as the content of the + # layer. + mkdir -p chroot-2 "$overlay_dir-2" + mount_overlay "$lowerdirs" "$overlay_dir-2" chroot-2 + rsync -caXHAS --no-t --del chroot/ chroot-2/ + umount chroot-2 + rmdir chroot-2 + overlay_dir="$overlay_dir-2" + fi + + create_squashfs "${overlay_dir}" ${squashfs_f} if [ -f config/$pass.catalog-in.yaml ]; then echo "Expanding catalog entry template for $pass" diff --git a/live-build/lb_chroot_layered b/live-build/lb_chroot_layered index d3173755..eb55131f 100755 --- a/live-build/lb_chroot_layered +++ b/live-build/lb_chroot_layered @@ -131,8 +131,8 @@ create_chroot_pass () { mkdir -p "$overlay_dir/" lowerdirs=$(get_lowerdirs_for_pass $pass) if [ -n "$lowerdirs" ]; then - mkdir -p chroot "${overlay_dir}-initial" - mount_overlay "$lowerdirs" "${overlay_dir}-initial" chroot/ + mkdir -p chroot/ + mount_overlay "$lowerdirs" "$overlay_dir" chroot/ else ln -s "$overlay_dir/" chroot fi @@ -268,19 +268,8 @@ create_chroot_pass () { lb chroot_devpts remove ${*} if [ -n "$lowerdirs" ]; then - # Although the current chroot was created as an overlay over - # the previous layer, many operations can result in redundant - # files in the upperdir. Rather than trying to minimize the - # overlay by hand, we rsync the chroot into a fresh overlay, - # rely on rsyncs ability to avoid redundant file operations, - # and take _that_ overlay's upperdir as the content of the - # layer. - mkdir chroot-2 - mount_overlay "$lowerdirs" "$overlay_dir" chroot-2/ - rsync -aXHAS --del chroot/ chroot-2/ - umount chroot chroot-2 - rmdir chroot chroot-2 - rm -rf ${overlay_dir}-initial + umount chroot + rmdir chroot else rm chroot fi From d3a75c9becfe1db77bc1ba254af9370ce2e40e3f Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Tue, 22 Aug 2023 11:47:59 -0700 Subject: [PATCH 09/43] Consolidate canary layers to merge 'classic' back into 'standard' --- debian/changelog | 4 ++++ live-build/auto/config | 17 ++++------------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4c1d50aa..8b04bb67 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,10 @@ livecd-rootfs (23.10.21) UNRELEASED; urgency=medium * Deduplicate the layers just before creating the squashfs, to enable deduplication of the result of binary hooks as well. + [ Steve Langasek ] + * Deduplicate snaps between squashfs layers on classic: + - Consolidate canary layers to merge 'classic' back into 'standard' + -- Michael Hudson-Doyle Wed, 23 Aug 2023 11:15:26 +1200 livecd-rootfs (23.10.20) mantic; urgency=medium diff --git a/live-build/auto/config b/live-build/auto/config index 8cc08676..c2e969fc 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -723,15 +723,9 @@ case $PROJECT in ;; canary) PASSES_TO_LAYERS="true" - # the standard layer, contains all base common packages for later layers (we're splitting out the snaps) + # the standard layer, contains all base common packages for later layers add_task standard minimal standard ubuntu-desktop ubuntu-desktop-default-languages add_package standard cloud-init - # the classic layer, basically only contains snaps from the standard and minimal tasks - add_pass standard.classic - if [ -e "config/package-lists/livecd-rootfs.snaplist.chroot_standard.full" ]; then - cat config/package-lists/livecd-rootfs.snaplist.chroot_standard.full >>config/package-lists/livecd-rootfs.snaplist.chroot_standard.classic.full - rm config/package-lists/livecd-rootfs.snaplist.chroot_standard.full - fi # the live layer, contains all packages for the live session installer # TODO: we should probably add the kernel per KERNEL_FLAVOURS add_package standard.live linux-generic casper lvm2 mdadm cryptsetup dctrl-tools @@ -742,7 +736,7 @@ case $PROJECT in # language support seeded_langs="$(get_seeded_languages desktop)" echo "$seeded_langs" | tr ' ' ',' > config/seeded-languages - derive_language_layers standard.classic desktop desktop-default-languages "$seeded_langs" + derive_language_layers standard desktop desktop-default-languages "$seeded_langs" derive_language_layers standard.enhanced-secureboot desktop desktop-default-languages "$seeded_langs" # now let's create the neccessary catalog files @@ -755,12 +749,9 @@ case $PROJECT in variant: desktop locale_support: langpack default: yes - EOF - cat <<-EOF > config/standard.classic.catalog-in.yaml - id: ubuntu-desktop variations: - classic: - path: standard.classic.squashfs + standard: + path: standard.squashfs EOF cat <<-EOF > config/standard.enhanced-secureboot.catalog-in.yaml id: ubuntu-desktop From b43e3b84f4c9100379f4686f80699929c7657056 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Tue, 22 Aug 2023 13:16:52 -0700 Subject: [PATCH 10/43] Reset /var/lib/snapd in the upper layers before calling snap prepare-image --- debian/changelog | 2 ++ live-build/functions | 11 +++++++++++ live-build/ubuntu/hooks/020-canary-enhanced-sb.binary | 4 ++++ live-build/ubuntu/hooks/020-canary-live.binary | 4 ++++ 4 files changed, 21 insertions(+) diff --git a/debian/changelog b/debian/changelog index 8b04bb67..cc092c15 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ livecd-rootfs (23.10.21) UNRELEASED; urgency=medium [ Steve Langasek ] * Deduplicate snaps between squashfs layers on classic: - Consolidate canary layers to merge 'classic' back into 'standard' + - Reset /var/lib/snapd in the upper layers before calling snap + prepare-image -- Michael Hudson-Doyle Wed, 23 Aug 2023 11:15:26 +1200 diff --git a/live-build/functions b/live-build/functions index dea971dc..01ea76f8 100644 --- a/live-build/functions +++ b/live-build/functions @@ -1230,3 +1230,14 @@ EOF undivert_grub "${mountpoint}" fi } + +# find all files under /var/lib/snapd in the target directory that aren't +# shipped by the snapd package itself, and remove them +reset_snapd_state() { + rootdir="$1" + + rm -rf "$rootdir/var/lib/snapd" + setup_mountpoint "$rootdir" + chroot "$rootdir" apt-get install --reinstall -y snapd + teardown_mountpoint "$rootdir" +} diff --git a/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary b/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary index e1b41ad8..0beffc23 100644 --- a/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary +++ b/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary @@ -20,6 +20,7 @@ case ${SUBPROJECT:-} in esac . config/binary +. config/functions # env SNAPPY_STORE_NO_CDN=1 snap known --remote model series=16 brand-id=canonical model=ubuntu-classic-2310-amd64 > config/classic-model.model cat < config/classic-model.model @@ -134,6 +135,9 @@ channel="" if [ -n "${CHANNEL:-}" ]; then channel="--channel $CHANNEL" fi + +reset_snapd_state chroot + env SNAPPY_STORE_NO_CDN=1 snap prepare-image \ --classic config/classic-model.model $channel chroot mv chroot/system-seed/systems/* chroot/system-seed/systems/enhanced-secureboot-desktop diff --git a/live-build/ubuntu/hooks/020-canary-live.binary b/live-build/ubuntu/hooks/020-canary-live.binary index a382587f..40e630dd 100755 --- a/live-build/ubuntu/hooks/020-canary-live.binary +++ b/live-build/ubuntu/hooks/020-canary-live.binary @@ -20,6 +20,7 @@ case ${SUBPROJECT:-} in esac . config/binary +. config/functions # env SNAPPY_STORE_NO_CDN=1 snap known --remote model series=16 brand-id=canonical model=ubuntu-installer-classic-2310-amd64 > config/classic-model-installer.model cat < config/classic-model-installer.model @@ -130,6 +131,9 @@ channel="" if [ -n "${CHANNEL:-}" ]; then channel="--channel $CHANNEL" fi + +reset_snapd_state chroot + env SNAPPY_STORE_NO_CDN=1 snap prepare-image \ --classic config/classic-model-installer.model $channel chroot mv chroot/system-seed/systems/* chroot/system-seed/systems/classic-installer From 2b80fdecd2d3528bc9da82a12a84cf05389e644b Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Tue, 22 Aug 2023 11:55:02 -0700 Subject: [PATCH 11/43] No need to use rsync in hooks now to avoid file duplication since layer handling as a whole now uses rsync. --- debian/changelog | 2 ++ live-build/ubuntu/hooks/020-canary-enhanced-sb.binary | 4 ++-- live-build/ubuntu/hooks/020-canary-live.binary | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index cc092c15..0bfdcabc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ livecd-rootfs (23.10.21) UNRELEASED; urgency=medium - Consolidate canary layers to merge 'classic' back into 'standard' - Reset /var/lib/snapd in the upper layers before calling snap prepare-image + - No need to use rsync in hooks now to avoid file duplication since layer + handling as a whole now uses rsync. -- Michael Hudson-Doyle Wed, 23 Aug 2023 11:15:26 +1200 diff --git a/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary b/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary index 0beffc23..8e1f6239 100644 --- a/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary +++ b/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary @@ -141,5 +141,5 @@ reset_snapd_state chroot env SNAPPY_STORE_NO_CDN=1 snap prepare-image \ --classic config/classic-model.model $channel chroot mv chroot/system-seed/systems/* chroot/system-seed/systems/enhanced-secureboot-desktop -rsync -a chroot/system-seed/ chroot/var/lib/snapd/seed -rm -rf chroot/system-seed/ +rm -rf chroot/var/lib/snapd/seed +mv chroot/system-seed chroot/var/lib/snapd/seed diff --git a/live-build/ubuntu/hooks/020-canary-live.binary b/live-build/ubuntu/hooks/020-canary-live.binary index 40e630dd..955e738d 100755 --- a/live-build/ubuntu/hooks/020-canary-live.binary +++ b/live-build/ubuntu/hooks/020-canary-live.binary @@ -137,8 +137,8 @@ reset_snapd_state chroot env SNAPPY_STORE_NO_CDN=1 snap prepare-image \ --classic config/classic-model-installer.model $channel chroot mv chroot/system-seed/systems/* chroot/system-seed/systems/classic-installer -rsync -a chroot/system-seed/ chroot/var/lib/snapd/seed -rm -rf chroot/system-seed/ +rm -rf chroot/var/lib/snapd/seed +mv chroot/system-seed chroot/var/lib/snapd/seed cat < chroot/var/lib/snapd/modeenv mode=run From e992090dcac002f63c8b0589efc669e81430dc15 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Wed, 23 Aug 2023 22:30:44 +1200 Subject: [PATCH 12/43] add an essay about rsync options --- live-build/lb_binary_layered | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/live-build/lb_binary_layered b/live-build/lb_binary_layered index 1fb33af9..6c00f96b 100755 --- a/live-build/lb_binary_layered +++ b/live-build/lb_binary_layered @@ -152,7 +152,23 @@ build_layered_squashfs () { # layer. mkdir -p chroot-2 "$overlay_dir-2" mount_overlay "$lowerdirs" "$overlay_dir-2" chroot-2 - rsync -caXHAS --no-t --del chroot/ chroot-2/ + # rsync takes many, many options. The subset + # we pass here is quite important: + # -a is standard to operate in the basic way required here. + # -X to preserve xattrs + # -H to preserve hardlinks + # -A to preserve ACLs + # -S to preserve sparseness + # --checksum to skip copies based on the content of the file + # (rather than the default which is to skip copies based + # on size + mtime) + # --no-times to not copy mtimes from source to dest (we + # don't care about mtime in the image and want to + # deduplicate files that have indentical contents but + # different mtimes) + # --del because we want to remove files that have been + # deleted in this layer. + rsync -aXHAS --checksum --no-times --del chroot/ chroot-2/ umount chroot-2 rmdir chroot-2 overlay_dir="$overlay_dir-2" From 19c80769669203f9f0e0c918ea7d8b580e2ab64c Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Wed, 23 Aug 2023 10:31:51 -0700 Subject: [PATCH 13/43] releasing package livecd-rootfs version 23.10.21 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0bfdcabc..4d0db9e9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (23.10.21) UNRELEASED; urgency=medium +livecd-rootfs (23.10.21) mantic; urgency=medium * Deduplicate the layers just before creating the squashfs, to enable deduplication of the result of binary hooks as well. @@ -11,7 +11,7 @@ livecd-rootfs (23.10.21) UNRELEASED; urgency=medium - No need to use rsync in hooks now to avoid file duplication since layer handling as a whole now uses rsync. - -- Michael Hudson-Doyle Wed, 23 Aug 2023 11:15:26 +1200 + -- Steve Langasek Wed, 23 Aug 2023 10:31:42 -0700 livecd-rootfs (23.10.20) mantic; urgency=medium From 5456e4e5e65c26b5cf3d443b372718d1a97b3928 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Fri, 25 Aug 2023 11:45:11 +1200 Subject: [PATCH 14/43] Undo preseeding in reset_snapd_state. --- debian/changelog | 6 ++++++ live-build/functions | 1 + 2 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 4d0db9e9..870a8340 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (23.10.22) UNRELEASED; urgency=medium + + * Undo preseeding in reset_snapd_state. + + -- Michael Hudson-Doyle Fri, 25 Aug 2023 11:44:57 +1200 + livecd-rootfs (23.10.21) mantic; urgency=medium * Deduplicate the layers just before creating the squashfs, to enable diff --git a/live-build/functions b/live-build/functions index 01ea76f8..4a97e9c2 100644 --- a/live-build/functions +++ b/live-build/functions @@ -1236,6 +1236,7 @@ EOF reset_snapd_state() { rootdir="$1" + /usr/lib/snapd/snap-preseed --reset $(realpath "$rootdir") || true rm -rf "$rootdir/var/lib/snapd" setup_mountpoint "$rootdir" chroot "$rootdir" apt-get install --reinstall -y snapd From 9b75387648250e31c86a3d05611be8f9f809986f Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Fri, 25 Aug 2023 15:15:02 +1200 Subject: [PATCH 15/43] update-source-catalog: work better when we want a variation to point at the base layer. --- debian/changelog | 2 ++ update-source-catalog | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 870a8340..750991c1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ livecd-rootfs (23.10.22) UNRELEASED; urgency=medium * Undo preseeding in reset_snapd_state. + * update-source-catalog: work better when we want a variation to point + at the base layer. -- Michael Hudson-Doyle Fri, 25 Aug 2023 11:44:57 +1200 diff --git a/update-source-catalog b/update-source-catalog index 0869dd39..fa1d17c1 100755 --- a/update-source-catalog +++ b/update-source-catalog @@ -37,12 +37,18 @@ for entry in output: if 'variations' not in template: print("Non unique id in source catalog but no variations!") sys.exit(1) - for k, variation in template['variations'].items(): + for variation in template['variations'].values(): variation['size'] = int(opts.size) entry.setdefault('variations', {}).update(template['variations']) break else: # No entry with this id found, so add a new one. + + if template['variations']: + for variation in template['variations'].values(): + if variation['path'] == opts.squashfs: + variation['size'] == int(opts.size) + template['size'] = int(opts.size) template['path'] = opts.squashfs From f354d76a838c155a0f9e7e0de25a0fc4385096f4 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Fri, 25 Aug 2023 15:22:02 +1200 Subject: [PATCH 16/43] Stop launching a gnome-terminal at startup of the canary live session. (LP: #2032647) --- debian/changelog | 2 ++ live-build/ubuntu/hooks/020-canary-live.binary | 18 ------------------ 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/debian/changelog b/debian/changelog index 750991c1..368f19a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ livecd-rootfs (23.10.22) UNRELEASED; urgency=medium * Undo preseeding in reset_snapd_state. * update-source-catalog: work better when we want a variation to point at the base layer. + * Stop launching a gnome-terminal at startup of the canary live session. + (LP: #2032647) -- Michael Hudson-Doyle Fri, 25 Aug 2023 11:44:57 +1200 diff --git a/live-build/ubuntu/hooks/020-canary-live.binary b/live-build/ubuntu/hooks/020-canary-live.binary index 955e738d..e0e294e3 100755 --- a/live-build/ubuntu/hooks/020-canary-live.binary +++ b/live-build/ubuntu/hooks/020-canary-live.binary @@ -145,24 +145,6 @@ mode=run recovery_system=classic-installer EOF -# Temporary while we still use the subiquity TUI for the live system -cat > chroot/usr/lib/systemd/user/subiquity-tui.service << EOF -[Unit] -Description=subiquity tui -PartOf=graphical-session.target -After=graphical-session.target - -# Never run in GDM -Conflicts=gnome-session@gnome-login.target - -[Service] -Type=simple -ExecStart=/usr/bin/gnome-terminal --wait -- sudo sh -c 'echo waiting for snapd; snap wait system seed.loaded; sleep 5; snap run subiquity' -Restart=no -EOF -mkdir chroot/etc/systemd/user/graphical-session.target.wants/ -ln -vs /usr/lib/systemd/user/subiquity-tui.service chroot/etc/systemd/user/graphical-session.target.wants/ - mv chroot/boot/initrd.img-* ${PWD}/livecd.${PROJECT}.initrd-generic mv chroot/boot/vmlinu?-* ${PWD}/livecd.${PROJECT}.kernel-generic chmod a+r ${PWD}/livecd.${PROJECT}.initrd-generic ${PWD}/livecd.${PROJECT}.kernel-generic From a945ef83a723686cad2034b5f81ac361c5873831 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Fri, 25 Aug 2023 17:09:03 +1200 Subject: [PATCH 17/43] fix silly typo in update-source-catalog --- update-source-catalog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update-source-catalog b/update-source-catalog index fa1d17c1..158f412e 100755 --- a/update-source-catalog +++ b/update-source-catalog @@ -47,7 +47,7 @@ else: if template['variations']: for variation in template['variations'].values(): if variation['path'] == opts.squashfs: - variation['size'] == int(opts.size) + variation['size'] = int(opts.size) template['size'] = int(opts.size) template['path'] = opts.squashfs From 809fbee16b644134813ea486d2ce689165030891 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Fri, 25 Aug 2023 18:45:15 +1200 Subject: [PATCH 18/43] releasing package livecd-rootfs version 23.10.22 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 368f19a0..e37561c6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (23.10.22) UNRELEASED; urgency=medium +livecd-rootfs (23.10.22) mantic; urgency=medium * Undo preseeding in reset_snapd_state. * update-source-catalog: work better when we want a variation to point @@ -6,7 +6,7 @@ livecd-rootfs (23.10.22) UNRELEASED; urgency=medium * Stop launching a gnome-terminal at startup of the canary live session. (LP: #2032647) - -- Michael Hudson-Doyle Fri, 25 Aug 2023 11:44:57 +1200 + -- Michael Hudson-Doyle Fri, 25 Aug 2023 18:45:03 +1200 livecd-rootfs (23.10.21) mantic; urgency=medium From cb3f3292b2aa98e60d6fcc5c3a298e1b87ed5f6b Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Sat, 26 Aug 2023 15:06:14 -0700 Subject: [PATCH 19/43] i386 foreign-arch support was added for the canary image before 23.04 released, but by mistake it was only added to the squashfs for the live session, and not the squashfs layer used as the source for installation. split the chroot hooks to add this to the standard.squashfs. LP: #2033170. --- debian/changelog | 10 ++++++++++ .../ubuntu/hooks/020-canary-live.chroot_early | 7 ------- .../ubuntu/hooks/020-foreign-arch.chroot_early | 18 ++++++++++++++++++ 3 files changed, 28 insertions(+), 7 deletions(-) create mode 100755 live-build/ubuntu/hooks/020-foreign-arch.chroot_early diff --git a/debian/changelog b/debian/changelog index e37561c6..3d90bead 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +livecd-rootfs (23.10.23) UNRELEASED; urgency=medium + + * i386 foreign-arch support was added for the canary image before 23.04 + released, but by mistake it was only added to the squashfs for the live + session, and not the squashfs layer used as the source for installation. + split the chroot hooks to add this to the standard.squashfs. + LP: #2033170. + + -- Steve Langasek Sat, 26 Aug 2023 15:05:13 -0700 + livecd-rootfs (23.10.22) mantic; urgency=medium * Undo preseeding in reset_snapd_state. diff --git a/live-build/ubuntu/hooks/020-canary-live.chroot_early b/live-build/ubuntu/hooks/020-canary-live.chroot_early index f5f165a5..96b316bb 100755 --- a/live-build/ubuntu/hooks/020-canary-live.chroot_early +++ b/live-build/ubuntu/hooks/020-canary-live.chroot_early @@ -26,10 +26,3 @@ EOF cat < /etc/initramfs-tools/conf.d/default-layer.conf LAYERFS_PATH=${PASS}.squashfs EOF - -if [ "$(dpkg --print-architecture)" = amd64 ]; then - echo "I: Enabling amd64 multiarch support on amd64" - dpkg --add-architecture i386 - - apt-get -y update -fi diff --git a/live-build/ubuntu/hooks/020-foreign-arch.chroot_early b/live-build/ubuntu/hooks/020-foreign-arch.chroot_early new file mode 100755 index 00000000..540cab3b --- /dev/null +++ b/live-build/ubuntu/hooks/020-foreign-arch.chroot_early @@ -0,0 +1,18 @@ +#! /bin/sh + +set -eu + +case ${PASS:-} in + standard) + ;; + *) + exit 0 + ;; +esac + +if [ "$(dpkg --print-architecture)" = amd64 ]; then + echo "I: Enabling amd64 multiarch support on amd64" + dpkg --add-architecture i386 + + apt-get -y update +fi From 21333e988960ba2ad3f88d6813dcd039234d4137 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Sat, 26 Aug 2023 15:12:09 -0700 Subject: [PATCH 20/43] Drop mke2fs.conf override, no longer needed. --- debian/changelog | 1 + live-build/ubuntu/hooks/020-canary-live.chroot_early | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3d90bead..ac37a146 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ livecd-rootfs (23.10.23) UNRELEASED; urgency=medium session, and not the squashfs layer used as the source for installation. split the chroot hooks to add this to the standard.squashfs. LP: #2033170. + * Drop mke2fs.conf override, no longer needed. -- Steve Langasek Sat, 26 Aug 2023 15:05:13 -0700 diff --git a/live-build/ubuntu/hooks/020-canary-live.chroot_early b/live-build/ubuntu/hooks/020-canary-live.chroot_early index 96b316bb..b300b228 100755 --- a/live-build/ubuntu/hooks/020-canary-live.chroot_early +++ b/live-build/ubuntu/hooks/020-canary-live.chroot_early @@ -14,11 +14,6 @@ esac # other then relying on the fact that these hooks are only copied for # an ubuntu:canary build) -# As described in LP: #2025339, an initrd built from a jammy userspace -# (which is what we use for canary builds currently) cannot fsck a -# mantic root filesystem created with the default options. -sed -i -e 's/,orphan_file//' /etc/mke2fs.conf - cat < /etc/initramfs-tools/conf.d/casperize.conf export CASPER_GENERATE_UUID=1 EOF From ac65e0b05ce2eae0603aa74b760768505fdb376b Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Sat, 26 Aug 2023 15:14:08 -0700 Subject: [PATCH 21/43] Remove obsolete comment. We do want this hook executed for non-canary builds! --- live-build/ubuntu/hooks/020-canary-live.chroot_early | 4 ---- 1 file changed, 4 deletions(-) diff --git a/live-build/ubuntu/hooks/020-canary-live.chroot_early b/live-build/ubuntu/hooks/020-canary-live.chroot_early index b300b228..06e2739e 100755 --- a/live-build/ubuntu/hooks/020-canary-live.chroot_early +++ b/live-build/ubuntu/hooks/020-canary-live.chroot_early @@ -10,10 +10,6 @@ case ${PASS:-} in ;; esac -# TODO: Make sure this is only executed for canary builds (in a way -# other then relying on the fact that these hooks are only copied for -# an ubuntu:canary build) - cat < /etc/initramfs-tools/conf.d/casperize.conf export CASPER_GENERATE_UUID=1 EOF From 57fb4b2b043c6d406ad6ea2b6ca1c00961202ae3 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Sat, 26 Aug 2023 16:34:30 -0700 Subject: [PATCH 22/43] releasing package livecd-rootfs version 23.10.23 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index ac37a146..67e73b29 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (23.10.23) UNRELEASED; urgency=medium +livecd-rootfs (23.10.23) mantic; urgency=medium * i386 foreign-arch support was added for the canary image before 23.04 released, but by mistake it was only added to the squashfs for the live @@ -7,7 +7,7 @@ livecd-rootfs (23.10.23) UNRELEASED; urgency=medium LP: #2033170. * Drop mke2fs.conf override, no longer needed. - -- Steve Langasek Sat, 26 Aug 2023 15:05:13 -0700 + -- Steve Langasek Sat, 26 Aug 2023 16:34:27 -0700 livecd-rootfs (23.10.22) mantic; urgency=medium From a83925b8aca6d379a0970895f798fce2628ed787 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Mon, 28 Aug 2023 10:40:53 +1200 Subject: [PATCH 23/43] update-source-catalog: Fix case where a variaton does not point at the base layer (i.e. most builds) (LP: #2033168) --- debian/changelog | 7 +++++++ update-source-catalog | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 67e73b29..7517ebec 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (23.10.24) UNRELEASED; urgency=medium + + * update-source-catalog: Fix case where a variaton does not point at the + base layer (i.e. most builds) (LP: #2033168) + + -- Michael Hudson-Doyle Mon, 28 Aug 2023 10:39:52 +1200 + livecd-rootfs (23.10.23) mantic; urgency=medium * i386 foreign-arch support was added for the canary image before 23.04 diff --git a/update-source-catalog b/update-source-catalog index 158f412e..6de025de 100755 --- a/update-source-catalog +++ b/update-source-catalog @@ -44,7 +44,7 @@ for entry in output: else: # No entry with this id found, so add a new one. - if template['variations']: + if 'variations' in template: for variation in template['variations'].values(): if variation['path'] == opts.squashfs: variation['size'] = int(opts.size) From 3d5fd1120c2141b503506d57bfb825c823616656 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Mon, 28 Aug 2023 10:43:52 +1200 Subject: [PATCH 24/43] Configure universe sources in canary ISO. (LP: #2033109) --- debian/changelog | 1 + live-build/auto/config | 1 + 2 files changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7517ebec..017b3f93 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ livecd-rootfs (23.10.24) UNRELEASED; urgency=medium * update-source-catalog: Fix case where a variaton does not point at the base layer (i.e. most builds) (LP: #2033168) + * Configure universe sources in canary ISO. (LP: #2033109) -- Michael Hudson-Doyle Mon, 28 Aug 2023 10:39:52 +1200 diff --git a/live-build/auto/config b/live-build/auto/config index c2e969fc..c8f13d86 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -722,6 +722,7 @@ case $PROJECT in esac ;; canary) + touch config/universe-enabled PASSES_TO_LAYERS="true" # the standard layer, contains all base common packages for later layers add_task standard minimal standard ubuntu-desktop ubuntu-desktop-default-languages From db6f685b8494a5e6137144d6b741bfd4afc07559 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Mon, 28 Aug 2023 11:30:11 +1200 Subject: [PATCH 25/43] snap-seed-parse.py: Update to allow parsing uc20-style seeds. (LP: #2028984) --- debian/changelog | 2 + live-build/snap-seed-parse.py | 141 +++++++++++++++++++++++++++------- 2 files changed, 117 insertions(+), 26 deletions(-) diff --git a/debian/changelog b/debian/changelog index 017b3f93..d6370350 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ livecd-rootfs (23.10.24) UNRELEASED; urgency=medium * update-source-catalog: Fix case where a variaton does not point at the base layer (i.e. most builds) (LP: #2033168) * Configure universe sources in canary ISO. (LP: #2033109) + * snap-seed-parse.py: Update to allow parsing uc20-style seeds. + (LP: #2028984) -- Michael Hudson-Doyle Mon, 28 Aug 2023 10:39:52 +1200 diff --git a/live-build/snap-seed-parse.py b/live-build/snap-seed-parse.py index 0e47231c..058a3d2c 100755 --- a/live-build/snap-seed-parse.py +++ b/live-build/snap-seed-parse.py @@ -10,6 +10,7 @@ The $chroot_dir argument is optional and will default to the empty string. """ import argparse +import glob import os.path import re import yaml @@ -32,37 +33,125 @@ CHROOT_ROOT = ARGS.chroot FNAME = ARGS.file # Trim any trailing slashes for correct appending +CHROOT_ROOT = CHROOT_ROOT.rstrip('/') log("CHROOT_ROOT: {}".format(CHROOT_ROOT)) -if len(CHROOT_ROOT) > 0 and CHROOT_ROOT[-1] == '/': - CHROOT_ROOT = CHROOT_ROOT[:-1] - -# This is where we expect to find the seed.yaml file -YAML_PATH = CHROOT_ROOT + '/var/lib/snapd/seed/seed.yaml' # Snaps are prepended with this string in the manifest LINE_PREFIX = 'snap:' +# This is where we expect to find the seed.yaml file +YAML_PATH = CHROOT_ROOT + '/var/lib/snapd/seed/seed.yaml' + log("yaml path: {}".format(YAML_PATH)) -if not os.path.isfile(YAML_PATH): - log("WARNING: yaml path not found; no seeded snaps found.") - exit(0) + + +def make_manifest_from_seed_yaml(path): + with open(YAML_PATH, 'r') as fh: + yaml_lines = yaml.safe_load(fh)['snaps'] + + log('Writing manifest to {}'.format(FNAME)) + + with open(FNAME, 'a+') as fh: + for item in yaml_lines: + filestring = item['file'] + # Pull the revision number off the file name + revision = filestring[filestring.rindex('_')+1:] + revision = re.sub(r'[^0-9]', '', revision) + fh.write("{}{}\t{}\t{}\n".format(LINE_PREFIX, + item['name'], + item['channel'], + revision, + )) + + +def look_for_uc20_model(chroot): + modeenv = f"{chroot}/var/lib/snapd/modeenv" + system_name = None + if os.path.isfile(modeenv): + log(f"found modeenv file at {modeenv}") + with open(modeenv) as fh: + for line in fh: + if line.startswith("recovery_system="): + system_name = line.split('=', 1)[1].strip() + log(f"read system name {system_name!r} from modeenv") + break + if system_name is None: + system_names = os.listdir(f"{chroot}/var/lib/snapd/seed/systems") + if len(system_names) == 0: + log("no systems found") + return None + elif len(system_names) > 1: + log("multiple systems found, refusing to guess which to parse") + return None + else: + system_name = system_names[0] + log(f"parsing only system found {system_name}") + system_dir = f"{chroot}/var/lib/snapd/seed/systems/{system_name}" + if not os.path.isdir(system_dir): + log(f"could not find system called {system_name}") + return None + return system_dir + + +def parse_assertion_file(asserts, filename): + # Parse the snapd assertions file 'filename' and store the + # assertions found in 'asserts'. + with open(filename) as fp: + text = fp.read() + + k = '' + + for block in text.split('\n\n'): + if block.startswith('type:'): + this_assert = {} + for line in block.split('\n'): + if line.startswith(' '): + this_assert[k.strip()] += '\n' + line + continue + k, v = line.split(':', 1) + this_assert[k.strip()] = v.strip() + asserts.setdefault(this_assert['type'], []).append(this_assert) + + +def make_manifest_from_system(system_dir): + files = [f"{system_dir}/model"] + glob.glob(f"{system_dir}/assertions/*") + + asserts = {} + for filename in files: + parse_assertion_file(asserts, filename) + + [model] = asserts['model'] + snaps = yaml.safe_load(model['snaps']) + + snap_names = [] + for snap in snaps: + snap_names.append(snap['name']) + snap_names.sort() + + snap_name_to_id = {} + snap_id_to_rev = {} + for decl in asserts['snap-declaration']: + snap_name_to_id[decl['snap-name']] = decl['snap-id'] + for rev in asserts['snap-revision']: + snap_id_to_rev[rev['snap-id']] = rev['snap-revision'] + + log('Writing manifest to {}'.format(FNAME)) + + with open(FNAME, 'a+') as fh: + for snap_name in snap_names: + channel = snap['default-channel'] + rev = snap_id_to_rev[snap_name_to_id[snap_name]] + fh.write(f"{LINE_PREFIX}{snap_name}\t{channel}\t{rev}\n") + + +if os.path.isfile(YAML_PATH): + log(f"seed.yaml found at {YAML_PATH}") + make_manifest_from_seed_yaml(YAML_PATH) else: - log("yaml path found.") - -with open(YAML_PATH, 'r') as fh: - yaml_lines = yaml.safe_load(fh)['snaps'] - -log('Writing manifest to {}'.format(FNAME)) - -with open(FNAME, 'a+') as fh: - for item in yaml_lines: - filestring = item['file'] - # Pull the revision number off the file name - revision = filestring[filestring.rindex('_')+1:] - revision = re.sub(r'[^0-9]', '', revision) - fh.write("{}{}\t{}\t{}\n".format(LINE_PREFIX, - item['name'], - item['channel'], - revision, - )) + system_dir = look_for_uc20_model(CHROOT_ROOT) + if system_dir is None: + log("WARNING: could not find seed.yaml or uc20-style seed") + exit(0) + make_manifest_from_system(system_dir) + log('Manifest output finished.') From 0d35c7645ffba46b28a109cac496824c65276714 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Mon, 28 Aug 2023 12:49:08 +1200 Subject: [PATCH 26/43] releasing package livecd-rootfs version 23.10.24 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index d6370350..cba04b5f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (23.10.24) UNRELEASED; urgency=medium +livecd-rootfs (23.10.24) mantic; urgency=medium * update-source-catalog: Fix case where a variaton does not point at the base layer (i.e. most builds) (LP: #2033168) @@ -6,7 +6,7 @@ livecd-rootfs (23.10.24) UNRELEASED; urgency=medium * snap-seed-parse.py: Update to allow parsing uc20-style seeds. (LP: #2028984) - -- Michael Hudson-Doyle Mon, 28 Aug 2023 10:39:52 +1200 + -- Michael Hudson-Doyle Mon, 28 Aug 2023 12:48:53 +1200 livecd-rootfs (23.10.23) mantic; urgency=medium From b91452e7feb30791e633d023dcefb64f4da1c439 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Mon, 28 Aug 2023 14:02:51 +1200 Subject: [PATCH 27/43] snap-seed-parse.py: fix builds with no snaps. --- debian/changelog | 6 ++++++ live-build/snap-seed-parse.py | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index cba04b5f..30105f58 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (23.10.25) UNRELEASED; urgency=medium + + * snap-seed-parse.py: fix builds with no snaps. + + -- Michael Hudson-Doyle Mon, 28 Aug 2023 14:02:08 +1200 + livecd-rootfs (23.10.24) mantic; urgency=medium * update-source-catalog: Fix case where a variaton does not point at the diff --git a/live-build/snap-seed-parse.py b/live-build/snap-seed-parse.py index 058a3d2c..c8ea8b4f 100755 --- a/live-build/snap-seed-parse.py +++ b/live-build/snap-seed-parse.py @@ -65,6 +65,10 @@ def make_manifest_from_seed_yaml(path): def look_for_uc20_model(chroot): + systems_dir = f"{chroot}/var/lib/snapd/seed/systems" + if not os.path.isdir(systems_dir): + log("no systems directory found") + return None modeenv = f"{chroot}/var/lib/snapd/modeenv" system_name = None if os.path.isfile(modeenv): @@ -76,7 +80,7 @@ def look_for_uc20_model(chroot): log(f"read system name {system_name!r} from modeenv") break if system_name is None: - system_names = os.listdir(f"{chroot}/var/lib/snapd/seed/systems") + system_names = os.listdir(systems_dir) if len(system_names) == 0: log("no systems found") return None From e00e189ad69ee772496e6404218b35b9bbdc848f Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Mon, 28 Aug 2023 14:03:04 +1200 Subject: [PATCH 28/43] releasing package livecd-rootfs version 23.10.25 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 30105f58..3604c163 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -livecd-rootfs (23.10.25) UNRELEASED; urgency=medium +livecd-rootfs (23.10.25) mantic; urgency=medium * snap-seed-parse.py: fix builds with no snaps. - -- Michael Hudson-Doyle Mon, 28 Aug 2023 14:02:08 +1200 + -- Michael Hudson-Doyle Mon, 28 Aug 2023 14:02:56 +1200 livecd-rootfs (23.10.24) mantic; urgency=medium From 6ab6066c05f11a3f3dee5571f3f9cbea382c18e0 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Mon, 28 Aug 2023 21:29:24 +1200 Subject: [PATCH 29/43] Use a traditional seed.yaml style seed for the canary installer's live session. --- debian/changelog | 7 + live-build/auto/config | 1 + .../ubuntu/hooks/020-canary-live.binary | 123 ------------------ 3 files changed, 8 insertions(+), 123 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3604c163..9fc0f79e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (23.10.26) UNRELEASED; urgency=medium + + * Use a traditional seed.yaml style seed for the canary installer's live + session. + + -- Michael Hudson-Doyle Mon, 28 Aug 2023 21:29:00 +1200 + livecd-rootfs (23.10.25) mantic; urgency=medium * snap-seed-parse.py: fix builds with no snaps. diff --git a/live-build/auto/config b/live-build/auto/config index c8f13d86..451a7d61 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -731,6 +731,7 @@ case $PROJECT in # TODO: we should probably add the kernel per KERNEL_FLAVOURS add_package standard.live linux-generic casper lvm2 mdadm cryptsetup dctrl-tools remove_package standard.live ubiquity-frontend-gtk + add_snap standard.live ubuntu-desktop-installer/classic # the enhanced-secureboot layer, contains all packages for the enhanced secureboot install add_package standard.enhanced-secureboot cryptsetup boot-managed-by-snapd diff --git a/live-build/ubuntu/hooks/020-canary-live.binary b/live-build/ubuntu/hooks/020-canary-live.binary index e0e294e3..2e5e014d 100755 --- a/live-build/ubuntu/hooks/020-canary-live.binary +++ b/live-build/ubuntu/hooks/020-canary-live.binary @@ -22,129 +22,6 @@ esac . config/binary . config/functions -# env SNAPPY_STORE_NO_CDN=1 snap known --remote model series=16 brand-id=canonical model=ubuntu-installer-classic-2310-amd64 > config/classic-model-installer.model -cat < config/classic-model-installer.model -type: model -authority-id: canonical -revision: 3 -series: 16 -brand-id: canonical -model: ubuntu-installer-classic-2310-amd64 -architecture: amd64 -base: core22 -classic: true -distribution: ubuntu -grade: signed -snaps: - - - default-channel: latest/stable - id: amcUKQILKXHHTlmSa7NMdnXSx02dNeeT - name: core22 - type: base - - - default-channel: latest/stable - id: PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4 - name: snapd - type: snapd - - - classic: true - default-channel: latest/stable/ubuntu-23.10 - id: rQm0TtMOYOtEslvEXgxQDhgy1JNn38Wz - name: ubuntu-desktop-installer - type: app - - - default-channel: latest/stable - id: EISPgh06mRh1vordZY9OZ34QHdd7OrdR - name: bare - type: base - - - default-channel: latest/stable/ubuntu-23.10 - id: 3wdHCAVyZEmYsCMFDE9qt92UV8rC8Wdk - name: firefox - type: app - - - default-channel: latest/stable/ubuntu-23.10 - id: lATO8HzwVvrAPrlZRAWpfyrJKlAJrZS3 - name: gnome-42-2204 - type: app - - - default-channel: latest/stable/ubuntu-23.10 - id: jZLfBRzf1cYlYysIjD2bwSzNtngY0qit - name: gtk-common-themes - type: app - - - default-channel: latest/stable/ubuntu-23.10 - id: gjf3IPXoRiipCu9K0kVu52f0H56fIksg - name: snap-store - type: app - - - default-channel: latest/stable/ubuntu-23.10 - id: IrwRHakqtzhFRHJOOPxKVPU0Kk7Erhcu - name: snapd-desktop-integration - type: app - - - default-channel: latest/stable/ubuntu-23.10 - id: m1eQacDdXCthEwWQrESei3Zao3d5gfJF - name: cups - type: app - - - default-channel: latest/stable/ubuntu-23.10 - id: d1yehor45vFG9GdKjmgdqbnBuKtR0Qa4 - name: ghostscript-printer-app - type: app - - - default-channel: latest/stable/ubuntu-23.10 - id: 3wnSvqxn6OqPBuioytBcdnR2UBaUzvPC - name: gutenprint-printer-app - type: app - - - default-channel: latest/stable/ubuntu-23.10 - id: PPjo7KVjJvmdYUeUt9LqmKRrgmGdWPyM - name: hplip-printer-app - type: app - - - default-channel: latest/stable/ubuntu-23.10 - id: WJKWBUuCDufOFw2p24tvkbbw02plGkbd - name: ipp-usb - type: app - - - default-channel: latest/stable/ubuntu-23.10 - id: 5xUmM1J4qSfki63gfpEDcrr1wU1FdP2k - name: ps-printer-app - type: app -timestamp: 2023-08-22T12:00:00.0Z -sign-key-sha3-384: 9tydnLa6MTJ-jaQTFUXEwHl1yRx7ZS4K5cyFDhYDcPzhS7uyEkDxdUjg9g08BtNn - -AcLBXAQAAQoABgUCZOTCgQAKCRDgT5vottzAEvDYD/97aa0ub3eq1zzUpMRDXY+NoHMLOON5zBgA -qLmpZq9ECZtuT0Tsyn/znlx2g15r8erzlgQtg/lS8iLIk0PqmwE/BB4ntdLQ3P56Rxz/YvkoK31B -519vOcpLlXxyVHsG4u3IjsEtPBlm4dmnzuuJodiRF4g4iXlxIQpcCkUm1gTHKof6NUlne7VwNty7 -8GvinPZtoTDVc6i+VftzUAbnqtifSlvxUseDvRkZrYX44FWKfEz7qqGQVdtwmZrP/ab+nc0CA+Nz -p6pn1wBrXk4y3EGw5RWQJvY5PzE5E7fCCirUW6SWpZ15jGK7pKGtXK2TJQlgsILeVp40FhnX5+As -9EnJpCCPYn8ZkKKjL9dCvmBSaKsqC0SVPYeB+T6PG2ANEHooaALvoiSTUVCM4HnBvjMtSXJpOPE7 -FzfyL9z4mKtNF82NmHc9Oms7QfuX70jQ0mgS/NDy6Te+4dhZ5QpLZzkwed/SWGmHGADPPV6Dxhcd -N5sjPPhhAJ6A2EyJQrKY3dOUt/vlu04C1TZCQwz9aQJO5hEaC3E/+ci8IVBRhDAvKJJ4iuTdO/k2 -SRiShTD1s/mua3D01bN2gGoyh2DY4lFKro28by4Ci0QXSBOIVTk+GnWAOwJCnbB636PZD9Ipf29L -ri86PlIOcM1OvSROryexBE+aNuWZYBwvJIo2kMYfVw== -EOF - -channel="" -if [ -n "${CHANNEL:-}" ]; then - channel="--channel $CHANNEL" -fi - -reset_snapd_state chroot - -env SNAPPY_STORE_NO_CDN=1 snap prepare-image \ - --classic config/classic-model-installer.model $channel chroot -mv chroot/system-seed/systems/* chroot/system-seed/systems/classic-installer -rm -rf chroot/var/lib/snapd/seed -mv chroot/system-seed chroot/var/lib/snapd/seed - -cat < chroot/var/lib/snapd/modeenv -mode=run -recovery_system=classic-installer -EOF - mv chroot/boot/initrd.img-* ${PWD}/livecd.${PROJECT}.initrd-generic mv chroot/boot/vmlinu?-* ${PWD}/livecd.${PROJECT}.kernel-generic chmod a+r ${PWD}/livecd.${PROJECT}.initrd-generic ${PWD}/livecd.${PROJECT}.kernel-generic From 4a2e30a3b302382889a7118062665f33217b22ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Mon, 28 Aug 2023 12:23:30 +0200 Subject: [PATCH 30/43] Update enhanced-sb layer model assertion. --- debian/changelog | 8 +++ .../hooks/020-canary-enhanced-sb.binary | 54 +++++-------------- 2 files changed, 20 insertions(+), 42 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3604c163..a714d4ce 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +livecd-rootfs (23.10.26) UNRELEASED; urgency=medium + + * Update the enhanced-sb layer model to not preinstall the printing snaps, + per changes to seeds. Live layer model not changed as it will go away + soon per our staged changes. + + -- Łukasz 'sil2100' Zemczak Mon, 28 Aug 2023 12:13:38 +0200 + livecd-rootfs (23.10.25) mantic; urgency=medium * snap-seed-parse.py: fix builds with no snaps. diff --git a/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary b/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary index 8e1f6239..cb86e471 100644 --- a/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary +++ b/live-build/ubuntu/hooks/020-canary-enhanced-sb.binary @@ -26,7 +26,7 @@ esac cat < config/classic-model.model type: model authority-id: canonical -revision: 3 +revision: 4 series: 16 brand-id: canonical model: ubuntu-classic-2310-amd64 @@ -86,49 +86,19 @@ snaps: id: IrwRHakqtzhFRHJOOPxKVPU0Kk7Erhcu name: snapd-desktop-integration type: app - - - default-channel: latest/stable/ubuntu-23.10 - id: m1eQacDdXCthEwWQrESei3Zao3d5gfJF - name: cups - type: app - - - default-channel: latest/stable/ubuntu-23.10 - id: d1yehor45vFG9GdKjmgdqbnBuKtR0Qa4 - name: ghostscript-printer-app - type: app - - - default-channel: latest/stable/ubuntu-23.10 - id: 3wnSvqxn6OqPBuioytBcdnR2UBaUzvPC - name: gutenprint-printer-app - type: app - - - default-channel: latest/stable/ubuntu-23.10 - id: PPjo7KVjJvmdYUeUt9LqmKRrgmGdWPyM - name: hplip-printer-app - type: app - - - default-channel: latest/stable/ubuntu-23.10 - id: WJKWBUuCDufOFw2p24tvkbbw02plGkbd - name: ipp-usb - type: app - - - default-channel: latest/stable/ubuntu-23.10 - id: 5xUmM1J4qSfki63gfpEDcrr1wU1FdP2k - name: ps-printer-app - type: app -timestamp: 2023-08-22T12:00:00.0Z +timestamp: 2023-08-24T12:00:00.0Z sign-key-sha3-384: 9tydnLa6MTJ-jaQTFUXEwHl1yRx7ZS4K5cyFDhYDcPzhS7uyEkDxdUjg9g08BtNn -AcLBXAQAAQoABgUCZOTCgQAKCRDgT5vottzAEkN9D/9CM4jsP7D6j5CIMM2t4P7A5Hcq+LB/+wEi -h9uqr6CbsJazgPS6Y4nZnu5NRz/irwxFyzWLiqbwqdyNgu7Y+2G0PPzo3MgCzjV93hRkPlOmLXHd -dtDw6XOXThMLBVSriAft8lKLhzYoX2qw2fP7Wys1NUlRIMYHvJMdHdrVQgoAz+W8qAlbSQ9VSTSc -xaMConnt5rtOJ9Aw8Er3NZEx5wfpzriGJ1L7T9qUsijVq6On4W4aCUJtKHplsV2LRsn+HSLLae7h -ULCCpUy88D3uNOoAPBRjY9Vm64/gtvMpYOztqhukT7OMDigH6RD6g0qfgS8aC4x/Ok6OIZpNnP0f -Iy4cx5DepdIR4sMlBtfQhenkG49gkNyUxtbN1XeS1N21cBsNysBL8CSBucR3plPOWYSthrwWgRpD -qv0DA/SIzntFxRUFh34f0ESLSJja/WrmEbSzk7EfloauY/2gWQ7B+NHnddTI/uBKpssi+rhJlUq8 -Hec1La/U+fv0WOWg3tD71lbNqFCQv02vi5az15NfRxI9K2K72rWvmhaUuQQUZPBitBTmTX8rG3pb -Aw00idWo5/hAgSpcOIoEhntkxfgLpoK2s8EX1USPk5XW+9XITEsKFyC3UVBgsRDqRMLWn1Eketyv -ejP1SS6R9LyritULe9w7lcxRlg8f4G+scUYSyBjLDA== +AcLBXAQAAQoABgUCZOjUagAKCRDgT5vottzAEgUCD/9ZjBDGZZv7cbIvPWUpqx42XeespLf6xJK6 +iadXGNJD910+RkzMPrxAtoo8tmYYIrrbw2Q9lbNOcMfl2akxV+TJzYez2J6V/6wvaPraCFbIdKhr +d+bI3e1QTxdlejfc3Nu4ImhKlFEsYrYJZIwAcm7btvmoidoQBXSoUxc7lDt5vdv4mN+bVvVOhew9 +/FG7U+G5w4yZzkW5rH1lhBGIZX76D6+/3AVlC/R69mBUPDNDeGj48IUT8iV58cYYprchMbw4LIU6 +l92wqbhl3uQveoWUqirHbQYa8q7D85XnvlukaPb3LQL6rJzuAU1G1jmLPkMz5mqQsRBBuhC9skR4 +UWHK7TWsKSlWmCfZAVn9wZezPZ4M+dQv8QNb7JpCmVNZ4GL/uMOds213FTeNJhowVfqgT1sMv9LP +H8mPIB1COn50+6XpZPUj49i2yiVN+BeuhRG9BDdstDie8gNOMvJgyvh0WmfgmIQcCuRgzheqj/co +0a8WuqYLsmyQCERP1fhuR/27d5+Dxg7DuiwocZwgXjtRkhUJrCnNWJnY//03sVXilFitEdlLVPt7 +WVhBSGHlrIaayLiOmCshvLqKZN5Cum9hXZ+wxWI/liG27eXOwaMDKPg/KeyxsHWNrXyuT5ZrTL7w +eAEuriz8mNgmJtzImEkhymjuAuSTL284F1WpeW/cIg== EOF channel="" From 4c5f394653daeeddf32c9431c2cb57a16b09c3a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Mon, 28 Aug 2023 15:48:38 +0200 Subject: [PATCH 31/43] releasing package livecd-rootfs version 23.10.26 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index cc7324cb..94d6501c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (23.10.26) UNRELEASED; urgency=medium +livecd-rootfs (23.10.26) mantic; urgency=medium [ Łukasz 'sil2100' Zemczak ] * Update the enhanced-sb layer model to not preinstall the printing snaps, From 5a0909dd20cd5174bd3cd9633a294293f7b6a303 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Tue, 29 Aug 2023 10:34:26 -0700 Subject: [PATCH 32/43] Add ubuntu to the list of targets we autopkgtest for on amd64, to ensure coverage of the lb_chroot_layered behavior. --- debian/changelog | 7 +++++++ debian/tests/default-bootstraps | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 94d6501c..004c50c0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (23.10.27) UNRELEASED; urgency=medium + + * Add ubuntu to the list of targets we autopkgtest for on amd64, to ensure + coverage of the lb_chroot_layered behavior. + + -- Steve Langasek Tue, 29 Aug 2023 10:32:35 -0700 + livecd-rootfs (23.10.26) mantic; urgency=medium [ Łukasz 'sil2100' Zemczak ] diff --git a/debian/tests/default-bootstraps b/debian/tests/default-bootstraps index 9d63d7a0..4c0d396f 100755 --- a/debian/tests/default-bootstraps +++ b/debian/tests/default-bootstraps @@ -43,11 +43,17 @@ ALL_TRIPLETS=" xubuntu:: xubuntu:minimal:" +ARCH=$(dpkg --print-architecture) + if [ -z "$SELECTED_TRIPLETS" ]; then SELECTED_TRIPLETS=" ubuntu-base:: ubuntu-cpc::ubuntu-cpc " + if [ "$ARCH" = amd64 ]; then + SELECTED_TRIPLETS="$SELECTED_TRIPLETS +ubuntu::" + fi fi live_build_rootfs() { @@ -55,7 +61,6 @@ live_build_rootfs() { local SUBPROJECT_TMP=${1%:*} SUBPROJECT=${SUBPROJECT_TMP#*:} TEMPLATE=${1##*:} - ARCH=$(dpkg --print-architecture) echo "Building rootfs for project: '$PROJECT' subproject: '$SUBPROJECT' template: '$TEMPLATE' in $PWD" cp -a /usr/share/livecd-rootfs/live-build/auto . if [ -n "$TEMPLATE" ]; then From b30e7e41461089e95fcfb26aa407f9ee3396d98a Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Tue, 29 Aug 2023 10:39:21 -0700 Subject: [PATCH 33/43] lb_chroot_layered: if the unmount of the chroot mountpoint fails, dump mount information for debugging. --- debian/changelog | 2 ++ live-build/lb_chroot_layered | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 004c50c0..b6cc90eb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ livecd-rootfs (23.10.27) UNRELEASED; urgency=medium * Add ubuntu to the list of targets we autopkgtest for on amd64, to ensure coverage of the lb_chroot_layered behavior. + * lb_chroot_layered: if the unmount of the chroot mountpoint fails, dump + mount information for debugging. -- Steve Langasek Tue, 29 Aug 2023 10:32:35 -0700 diff --git a/live-build/lb_chroot_layered b/live-build/lb_chroot_layered index eb55131f..a48dce71 100755 --- a/live-build/lb_chroot_layered +++ b/live-build/lb_chroot_layered @@ -268,7 +268,13 @@ create_chroot_pass () { lb chroot_devpts remove ${*} if [ -n "$lowerdirs" ]; then - umount chroot + res=0 + umount chroot || res=$? + if [ $res -ne 0 ]; then + Echo_message "Unmount failed, current mounts: " + cat /proc/$$/mounts + exit $res + fi rmdir chroot else rm chroot From 6e30df92f2a37181b7b633443141395eaa2f6d2f Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Tue, 29 Aug 2023 10:39:26 -0700 Subject: [PATCH 34/43] releasing package livecd-rootfs version 23.10.27 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index b6cc90eb..0537d7b9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,11 @@ -livecd-rootfs (23.10.27) UNRELEASED; urgency=medium +livecd-rootfs (23.10.27) mantic; urgency=medium * Add ubuntu to the list of targets we autopkgtest for on amd64, to ensure coverage of the lb_chroot_layered behavior. * lb_chroot_layered: if the unmount of the chroot mountpoint fails, dump mount information for debugging. - -- Steve Langasek Tue, 29 Aug 2023 10:32:35 -0700 + -- Steve Langasek Tue, 29 Aug 2023 10:39:23 -0700 livecd-rootfs (23.10.26) mantic; urgency=medium From 0c6e4314e58552157562a836dc247ae8977f256f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Wed, 30 Aug 2023 11:57:04 +0200 Subject: [PATCH 35/43] canary: switch to use the live task, try to use KERNEL_FLAVOURS instead of a manual kernel add_package. --- live-build/auto/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/live-build/auto/config b/live-build/auto/config index 451a7d61..677bf0b6 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -724,12 +724,12 @@ case $PROJECT in canary) touch config/universe-enabled PASSES_TO_LAYERS="true" + KERNEL_FLAVOURS='generic-hwe-22.04' # the standard layer, contains all base common packages for later layers add_task standard minimal standard ubuntu-desktop ubuntu-desktop-default-languages add_package standard cloud-init # the live layer, contains all packages for the live session installer - # TODO: we should probably add the kernel per KERNEL_FLAVOURS - add_package standard.live linux-generic casper lvm2 mdadm cryptsetup dctrl-tools + add_task standard.live ubuntu-live remove_package standard.live ubiquity-frontend-gtk add_snap standard.live ubuntu-desktop-installer/classic # the enhanced-secureboot layer, contains all packages for the enhanced secureboot install From bbf7466695e7c619e2712f92630366fa34610ef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Wed, 30 Aug 2023 12:05:49 +0200 Subject: [PATCH 36/43] Changelog entry. --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 0537d7b9..090aa04f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (23.10.28) UNRELEASED; urgency=medium + + * canary: switch to use the live task, try to use KERNEL_FLAVOURS instead + of a manual kernel add_package. + + -- Łukasz 'sil2100' Zemczak Wed, 30 Aug 2023 11:57:11 +0200 + livecd-rootfs (23.10.27) mantic; urgency=medium * Add ubuntu to the list of targets we autopkgtest for on amd64, to ensure From 47a88df62fe81ab33ab1fdf61b087cddab6cbd4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Wed, 30 Aug 2023 14:25:26 +0200 Subject: [PATCH 37/43] I suppose w don't need the 020-canary-live.binary hook anymore. --- .../ubuntu/hooks/020-canary-live.binary | 27 ------------------- 1 file changed, 27 deletions(-) delete mode 100755 live-build/ubuntu/hooks/020-canary-live.binary diff --git a/live-build/ubuntu/hooks/020-canary-live.binary b/live-build/ubuntu/hooks/020-canary-live.binary deleted file mode 100755 index 2e5e014d..00000000 --- a/live-build/ubuntu/hooks/020-canary-live.binary +++ /dev/null @@ -1,27 +0,0 @@ -#! /bin/sh - -set -eux - -case ${PASS:-} in - standard.live) - ;; - *) - exit 0 - ;; -esac - -case ${SUBPROJECT:-} in - canary) - ;; - *) - echo "We don't run canary hooks for this project." - exit 0 - ;; -esac - -. config/binary -. config/functions - -mv chroot/boot/initrd.img-* ${PWD}/livecd.${PROJECT}.initrd-generic -mv chroot/boot/vmlinu?-* ${PWD}/livecd.${PROJECT}.kernel-generic -chmod a+r ${PWD}/livecd.${PROJECT}.initrd-generic ${PWD}/livecd.${PROJECT}.kernel-generic From 3a715d2fff2545033b64783d5030186e8c862474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Wed, 30 Aug 2023 16:47:21 +0200 Subject: [PATCH 38/43] Don't reset KERNEL_FLAVOURS for canary. --- live-build/auto/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live-build/auto/config b/live-build/auto/config index 677bf0b6..13eb7b45 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -1298,7 +1298,7 @@ case "$ARCH${SUBARCH:++$SUBARCH}" in esac case $PROJECT:${SUBPROJECT:-} in - ubuntu-server:*|ubuntu-base:*|ubuntu-oci:*|ubuntu:canary) + ubuntu-server:*|ubuntu-base:*|ubuntu-oci:*) OPTS="${OPTS:+$OPTS }--linux-packages=none --initramfs=none" KERNEL_FLAVOURS=none BINARY_REMOVE_LINUX=false From 8c3d3087d65a1ff3115943048c2e1114d493b2ab Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Wed, 30 Aug 2023 08:28:51 -0700 Subject: [PATCH 39/43] Allow stderr in the autopkgtest. --- debian/changelog | 6 ++++++ debian/tests/control | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 0537d7b9..b7737170 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (23.10.28) UNRELEASED; urgency=medium + + * Allow stderr in the autopkgtest. + + -- Steve Langasek Wed, 30 Aug 2023 08:27:27 -0700 + livecd-rootfs (23.10.27) mantic; urgency=medium * Add ubuntu to the list of targets we autopkgtest for on amd64, to ensure diff --git a/debian/tests/control b/debian/tests/control index 671e49e9..0747493a 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,6 +1,6 @@ Tests: default-bootstraps Depends: @, lsb-release -Restrictions: needs-root isolation-machine +Restrictions: needs-root isolation-machine allow-stderr Tests: minimized Depends: @, lsb-release From 459665593cb0d7ac7e8d65aea9c79768815e1314 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Wed, 30 Aug 2023 08:28:59 -0700 Subject: [PATCH 40/43] releasing package livecd-rootfs version 23.10.28 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index b7737170..bd9c522b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -livecd-rootfs (23.10.28) UNRELEASED; urgency=medium +livecd-rootfs (23.10.28) mantic; urgency=medium * Allow stderr in the autopkgtest. - -- Steve Langasek Wed, 30 Aug 2023 08:27:27 -0700 + -- Steve Langasek Wed, 30 Aug 2023 08:28:57 -0700 livecd-rootfs (23.10.27) mantic; urgency=medium From 322b822087af49f557e2ba690711b81d99e7ee19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Thu, 31 Aug 2023 15:25:05 +0200 Subject: [PATCH 41/43] releasing package livecd-rootfs version 23.10.29 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index fa1c1c7f..d5fb11e2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (23.10.29) UNRELEASED; urgency=medium +livecd-rootfs (23.10.29) mantic; urgency=medium * canary: switch to use the live task, try to use KERNEL_FLAVOURS instead of a manual kernel add_package. From 78a98c683573a1f7983afae54e2f187eeae127c7 Mon Sep 17 00:00:00 2001 From: Utkarsh Gupta Date: Sat, 2 Sep 2023 00:39:38 +0530 Subject: [PATCH 42/43] Fix unminimize to correctly list packages (LP: #1996489) Prior to dpkg/1.21.0, there was a bug where dpkg -V/--verify couldn't list all the correct packages correctly but with that being fix and in archive since Jammy, this works perfectly but the syntax to report the missing files have changed. It just prints 'missing' now. With that new format, we can now fix the regex to simply list the packages. With this patch, the unminimize script works flawlessly on a minimized image. --- live-build/auto/build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/live-build/auto/build b/live-build/auto/build index d67e5d0e..12cdb1a8 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -252,18 +252,18 @@ if [ -f /etc/dpkg/dpkg.cfg.d/excludes ] || [ -f /etc/dpkg/dpkg.cfg.d/excludes.dp dpkg -S /usr/share/man/ |sed 's|, |\n|g;s|: [^:]*$||' | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y echo "Reinstalling packages with system documentation in /usr/share/doc/ .." # This step processes the packages which still have missing documentation - dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {print $2}' | sed 's|/[^/]*$||' | sort |uniq \ + dpkg --verify --verify-format rpm | awk '$2 ~ /\/usr\/share\/doc/ {print $2}' | sed 's|/[^/]*$||' | sort | uniq \ | xargs dpkg -S | sed 's|, |\n|g;s|: [^:]*$||' | uniq | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y echo "Restoring system translations..." # This step processes the packages which still have missing translations - dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/locale/ {print $2}' | sed 's|/[^/]*$||' | sort |uniq \ + dpkg --verify --verify-format rpm | awk '$2 ~ /\/usr\/share\/locale/ {print $2}' | sed 's|/[^/]*$||' | sort | uniq \ | xargs dpkg -S | sed 's|, |\n|g;s|: [^:]*$||' | uniq | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y - if dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {exit 1}'; then + if dpkg --verify --verify-format rpm | awk '$2 ~ /\/usr\/share\/doc/ {exit 1}'; then echo "Documentation has been restored successfully." rm /etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp else echo "There are still files missing from /usr/share/doc/:" - dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {print " " $2}' + dpkg --verify --verify-format rpm | awk '$2 ~ /\/usr\/share\/doc/ {print " " $2}' echo "You may want to try running this script again or you can remove" echo "/etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp and restore the files manually." fi From 990e66dadd596c808a73f860c519cb5caec8a0a7 Mon Sep 17 00:00:00 2001 From: Utkarsh Gupta Date: Sat, 2 Sep 2023 02:30:13 +0530 Subject: [PATCH 43/43] Update d/ch for 23.10.30 release --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index d5fb11e2..af16d5bf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (23.10.30) mantic; urgency=medium + + * Fix unminimize to correctly list packages. (LP: #1996489) + + -- Utkarsh Gupta Sat, 02 Sep 2023 02:16:03 +0530 + livecd-rootfs (23.10.29) mantic; urgency=medium * canary: switch to use the live task, try to use KERNEL_FLAVOURS instead