public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v2] classes/rootfs: remove content of /dev, /run and vmlinux old
@ 2024-04-25  7:13 Quirin Gylstorff
  2024-04-26  8:55 ` Baurzhan Ismagulov
  0 siblings, 1 reply; 5+ messages in thread
From: Quirin Gylstorff @ 2024-04-25  7:13 UTC (permalink / raw)
  To: felix.moessbauer, isar-users, jan.kiszka

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

`/dev` and `/run` contain artifacts from the ISAR build clean them
up for reproducability.

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
Changes v2:
 - move deletion to do_rootfs_finalize this avoids some race conditions
   during build
 - remove content of  /run
 - remove symblic link /vmlinuz.old
 meta/classes/image.bbclass | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 98741da0..4af0d448 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -427,12 +427,17 @@ do_rootfs_finalize() {
             rmdir --ignore-fail-on-non-empty ${ROOTFSDIR}/base-apt
 
         mountpoint -q '${ROOTFSDIR}/dev' && \
-            umount -l ${ROOTFSDIR}/dev
+            umount -l -R ${ROOTFSDIR}/dev && \
+            rm -rf ${ROOTFSDIR}/dev/*
+
         mountpoint -q '${ROOTFSDIR}/proc' && \
             umount -l ${ROOTFSDIR}/proc
         mountpoint -q '${ROOTFSDIR}/sys' && \
             umount -l ${ROOTFSDIR}/sys
 
+        rm -rf ${ROOTFSDIR}/run/*
+        rm -f ${ROOTFSDIR}/vmlinuz.old
+
         if [ -e "${ROOTFSDIR}/etc/apt/sources-list" ]; then
             mv "${ROOTFSDIR}/etc/apt/sources-list" \
                 "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list"
-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-05-10 15:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-25  7:13 [PATCH v2] classes/rootfs: remove content of /dev, /run and vmlinux old Quirin Gylstorff
2024-04-26  8:55 ` Baurzhan Ismagulov
2024-04-26 12:13   ` MOESSBAUER, Felix
2024-05-02 15:16     ` Baurzhan Ismagulov
2024-05-10 15:29       ` MOESSBAUER, Felix

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox