From 9827a00f26d8c0f0af2afd41dcf62b92ebf5a447 Mon Sep 17 00:00:00 2001 From: Matthew Westphall Date: Tue, 17 Oct 2023 17:23:12 -0500 Subject: [PATCH] SOFTWARE-5721: Explicitly include cpio from the stage1 build artifacts into the stage2 tarball --- osg-stage1-el8-include.lst | 1 + osg-stage1-el9-include.lst | 1 + stage1.py | 11 ++++++++--- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 osg-stage1-el8-include.lst create mode 100644 osg-stage1-el9-include.lst diff --git a/osg-stage1-el8-include.lst b/osg-stage1-el8-include.lst new file mode 100644 index 0000000..e5fb179 --- /dev/null +++ b/osg-stage1-el8-include.lst @@ -0,0 +1 @@ +./usr/bin/cpio diff --git a/osg-stage1-el9-include.lst b/osg-stage1-el9-include.lst new file mode 100644 index 0000000..e5fb179 --- /dev/null +++ b/osg-stage1-el9-include.lst @@ -0,0 +1 @@ +./usr/bin/cpio diff --git a/stage1.py b/stage1.py index 35e4696..6656fcd 100755 --- a/stage1.py +++ b/stage1.py @@ -112,11 +112,16 @@ def install_stage1_packages(stage1_root, repofile, dver, basearch, pkglist_file) _install_stage1_packages(yum, dver, stage1_root, stage1_packages) -def make_stage1_filelist(stage_dir): +def make_stage1_filelist(stage_dir, pkglist_file): oldwd = os.getcwd() + includes_file = pkglist_file.replace('.lst','-include.lst') + if not os.path.exists(includes_file): + includes_file = '/dev/null' try: os.chdir(stage_dir) - os.system('find . -not -type d > stage1_filelist') + os.system('find . -not -type d | sort > stage1_filelist_tmp') + os.system('comm -2 -3 stage1_filelist_tmp ' + includes_file + ' > stage1_filelist') + finally: os.chdir(oldwd) @@ -150,7 +155,7 @@ def _statusmsg(msg): install_stage1_packages(stage1_root, repofile, dver, basearch, pkglist_file) _statusmsg("Making file list") - make_stage1_filelist(stage_dir) + make_stage1_filelist(stage_dir, pkglist_file) _statusmsg("Making rpm list") make_stage1_rpmlist(stage_dir, stage1_root)