From b82a2db283d1c951558bdab6e5d93687dd78b087 Mon Sep 17 00:00:00 2001 From: Andrew Walker Date: Fri, 3 Jan 2025 15:09:10 -0600 Subject: [PATCH] Handle audit plugin changes --- scale_build/image/update.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scale_build/image/update.py b/scale_build/image/update.py index 3dd940fb..c5e6b345 100644 --- a/scale_build/image/update.py +++ b/scale_build/image/update.py @@ -40,6 +40,14 @@ def build_rootfs_image(): # Remove the audit file generation script os.unlink(gencmd) + # Copy over audit plugins configuration + conf_plugins_dir = os.path.join(CHROOT_BASEDIR, 'conf', 'audit_plugins') + audit_plugins = os.path.join(CHROOT_BASEDIR, 'etc', 'audit', 'plugins.d') + for plugin in os.listdir(conf_plugins_dir): + src = os.path.join(conf_plugins_dir, plugin) + dst = os.path.join(audit_plugins, plugin) + shutil.copyfile(src, dst) + # Generate mtree of relevant root filesystem directories mtree_file = generate_mtree(CHROOT_BASEDIR, version) shutil.copyfile(mtree_file, os.path.join(CHROOT_BASEDIR, 'conf', 'rootfs.mtree'))