From: "'Felix Moessbauer' via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH 1/6] rootfs: add feature to clean isar generated dpkg config
Date: Thu, 24 Sep 2026 09:38:06 +0200 [thread overview]
Message-ID: <20260924073811.4058349-2-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <20260924073811.4058349-1-felix.moessbauer@siemens.com>
It depends on the use-case if the isar generated dpkg config should be
preserved or not. At least for the image is should not be preserved, but
for other rootfs (like the sbuild ones) it should be.
We now add a rootfs feature to model this.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
meta/classes-recipe/image.bbclass | 1 +
meta/classes-recipe/rootfs.bbclass | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass
index d17d1860..290d6d5c 100644
--- a/meta/classes-recipe/image.bbclass
+++ b/meta/classes-recipe/image.bbclass
@@ -100,6 +100,7 @@ ROOTFS_FEATURES += "\
populate-systemd-preset \
generate-sbom \
clean-apt-credentials \
+ clean-dpkg-config \
"
ROOTFS_PACKAGES += "${IMAGE_PREINSTALL} ${@isar_multiarch_packages('IMAGE_INSTALL', d)}"
ROOTFS_VARDEPS += "IMAGE_INSTALL"
diff --git a/meta/classes-recipe/rootfs.bbclass b/meta/classes-recipe/rootfs.bbclass
index d3b0d471..f7822351 100644
--- a/meta/classes-recipe/rootfs.bbclass
+++ b/meta/classes-recipe/rootfs.bbclass
@@ -40,6 +40,7 @@ ROOTFS_BASE_DISTRO ?= "${BASE_DISTRO}"
# 'clean-log-files' - delete log files that are not owned by packages
# 'populate-systemd-preset' - enable systemd units according to systemd presets
# 'clean-apt-credentials' - remove apt auth credentials written by ISAR_APT_CREDS
+# 'clean-dpkg-config' - remove ISAR-specific dpkg configuration files from the rootfs
# convenience variable to enable all features needed for a reproducible rootfs build
ROOTFS_FEATURES_REPRODUCIBLE = " \
@@ -577,6 +578,11 @@ rootfs_postprocess_clean_apt_credentials() {
run_privileged rm -f "${ROOTFSDIR}/etc/apt/auth.conf.d/isar.conf"
}
+ROOTFS_POSTPROCESS_COMMAND += "${@bb.utils.contains('ROOTFS_FEATURES', 'clean-dpkg-config', 'rootfs_postprocess_clean_dpkg_config', '', d)}"
+rootfs_postprocess_clean_dpkg_config() {
+ run_privileged find "${ROOTFSDIR}/etc/dpkg/dpkg.cfg.d" -type f -name '*isar*.cfg' -delete
+}
+
ROOTFS_POSTPROCESS_COMMAND += "${@bb.utils.contains('ROOTFS_FEATURES', 'clean-pycache', 'rootfs_postprocess_clean_pycache', '', d)}"
rootfs_postprocess_clean_pycache() {
run_privileged find ${ROOTFSDIR}/usr -type f -name '*.pyc' -delete -print
--
2.55.0
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20260924073811.4058349-2-felix.moessbauer%40siemens.com.
next prev parent reply other threads:[~2026-09-24 7:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 7:38 [PATCH 0/6] Model isar-exclude-docs as rootfs feature 'Felix Moessbauer' via isar-users
2026-09-24 7:38 ` 'Felix Moessbauer' via isar-users [this message]
2026-09-24 7:38 ` [PATCH 2/6] image: add IMAGE_ROOTFS_FEATURES to set rootfs features of the image 'Felix Moessbauer' via isar-users
2026-09-24 7:38 ` [PATCH 3/6] isar-exclude-docs: model via rootfs feature 'Felix Moessbauer' via isar-users
2026-09-24 7:38 ` [PATCH 4/6] rootfs: also purge package changelogs on exclude-docs 'Felix Moessbauer' via isar-users
2026-09-24 7:38 ` [PATCH 5/6] kas: port isar-exclude-docs to rootfs feature 'Felix Moessbauer' via isar-users
2026-09-24 7:38 ` [PATCH 6/6] testsuite: replace isar-exclude-docs by " 'Felix Moessbauer' via isar-users
2026-10-02 8:06 ` [PATCH 0/6] Model isar-exclude-docs as " 'MOESSBAUER, Felix' via isar-users
2026-10-02 8:12 ` Zhihang Wei
2026-10-02 10:03 ` 'MOESSBAUER, Felix' via isar-users
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260924073811.4058349-2-felix.moessbauer@siemens.com \
--to=isar-users@googlegroups.com \
--cc=felix.moessbauer@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox