* [isar-cip-core][PATCH 1/1] fix(sid): copy immutable dpkg db
@ 2024-03-27 14:15 Felix Moessbauer
2024-04-08 17:24 ` Jan Kiszka
0 siblings, 1 reply; 2+ messages in thread
From: Felix Moessbauer @ 2024-03-27 14:15 UTC (permalink / raw)
To: cip-dev; +Cc: jan.kiszka, quirin.gylstorff, Felix Moessbauer
The immutable copy of the dpkg db is not supported on pre-bookworm.
However, the logic only made it available on bookworm but not on any
later release.
This patch fixes this by inverting the logic: We always enable it and
just exclude buster and bullseye.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
classes/read-only-rootfs.bbclass | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/classes/read-only-rootfs.bbclass b/classes/read-only-rootfs.bbclass
index bb8ab9a..fa56b2e 100644
--- a/classes/read-only-rootfs.bbclass
+++ b/classes/read-only-rootfs.bbclass
@@ -18,9 +18,13 @@ IMAGE_INSTALL += "home-fs"
IMAGE_INSTALL += "tmp-fs"
# For pre bookworm images, empty /var is not usable
-IMAGE_INSTALL:append:bookworm = " immutable-rootfs"
+IMAGE_INSTALL:append = " immutable-rootfs"
+IMAGE_INSTALL:remove:buster = " immutable-rootfs"
+IMAGE_INSTALL:remove:bullseye = " immutable-rootfs"
-ROOTFS_POSTPROCESS_COMMAND:append:bookworm =" copy_dpkg_state"
+ROOTFS_POSTPROCESS_COMMAND:append =" copy_dpkg_state"
+ROOTFS_POSTPROCESS_COMMAND:remove:buster =" copy_dpkg_state"
+ROOTFS_POSTPROCESS_COMMAND:remove:bullseye =" copy_dpkg_state"
copy_dpkg_state() {
IMMUTABLE_VAR_LIB="${ROOTFSDIR}/usr/share/immutable-data/var/lib"
sudo mkdir -p "$IMMUTABLE_VAR_LIB"
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [isar-cip-core][PATCH 1/1] fix(sid): copy immutable dpkg db
2024-03-27 14:15 [isar-cip-core][PATCH 1/1] fix(sid): copy immutable dpkg db Felix Moessbauer
@ 2024-04-08 17:24 ` Jan Kiszka
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2024-04-08 17:24 UTC (permalink / raw)
To: Felix Moessbauer, cip-dev; +Cc: quirin.gylstorff
On 27.03.24 15:15, Felix Moessbauer wrote:
> The immutable copy of the dpkg db is not supported on pre-bookworm.
> However, the logic only made it available on bookworm but not on any
> later release.
>
> This patch fixes this by inverting the logic: We always enable it and
> just exclude buster and bullseye.
>
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
> classes/read-only-rootfs.bbclass | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/classes/read-only-rootfs.bbclass b/classes/read-only-rootfs.bbclass
> index bb8ab9a..fa56b2e 100644
> --- a/classes/read-only-rootfs.bbclass
> +++ b/classes/read-only-rootfs.bbclass
> @@ -18,9 +18,13 @@ IMAGE_INSTALL += "home-fs"
> IMAGE_INSTALL += "tmp-fs"
>
> # For pre bookworm images, empty /var is not usable
> -IMAGE_INSTALL:append:bookworm = " immutable-rootfs"
> +IMAGE_INSTALL:append = " immutable-rootfs"
> +IMAGE_INSTALL:remove:buster = " immutable-rootfs"
> +IMAGE_INSTALL:remove:bullseye = " immutable-rootfs"
>
> -ROOTFS_POSTPROCESS_COMMAND:append:bookworm =" copy_dpkg_state"
> +ROOTFS_POSTPROCESS_COMMAND:append =" copy_dpkg_state"
> +ROOTFS_POSTPROCESS_COMMAND:remove:buster =" copy_dpkg_state"
> +ROOTFS_POSTPROCESS_COMMAND:remove:bullseye =" copy_dpkg_state"
> copy_dpkg_state() {
> IMMUTABLE_VAR_LIB="${ROOTFSDIR}/usr/share/immutable-data/var/lib"
> sudo mkdir -p "$IMMUTABLE_VAR_LIB"
Thanks, applied.
Jan
--
Siemens AG, Technology
Linux Expert Center
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-08 17:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-27 14:15 [isar-cip-core][PATCH 1/1] fix(sid): copy immutable dpkg db Felix Moessbauer
2024-04-08 17:24 ` Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).