From 845e52afbc54e4a6edb06c30c9ccc8b31b368b3d Mon Sep 17 00:00:00 2001 From: Jiri Konecny Date: Fri, 9 Aug 2024 14:10:03 +0200 Subject: [PATCH 1/3] infra: Fix git_rev creation in rebuild script This string was hardcoded for that reason it was missed. --- scripts/testing/rebuild_iso | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/testing/rebuild_iso b/scripts/testing/rebuild_iso index a0b310e0b98..1635f85bfe3 100755 --- a/scripts/testing/rebuild_iso +++ b/scripts/testing/rebuild_iso @@ -30,8 +30,7 @@ EOF BOOT_ISO="result/iso/boot.iso" PACKAGES_DIR="result/build/01-rpm-build/" -UPDATED_BOOT_ISO="result/iso/iso.git_rev" -BOOT_ISO_GIT_REVISION="result/iso/boot.iso.git_rev" +BOOT_ISO_GIT_REVISION="result/iso/iso.git_rev" BUILD_TARGET="boot.iso" @@ -55,12 +54,11 @@ sudo true # remove any previous package and relevant iso artifacts rm -rf result/build/ rm -f ${BOOT_ISO} -rm -f ${UPDATED_BOOT_ISO} rm -f ${BOOT_ISO_GIT_REVISION} # make sure the iso folder actually exists mkdir -p result/iso/ # note the Git revision from which we build the boot.iso -git rev-parse HEAD > result/iso/boot.iso.git_rev +git rev-parse HEAD > ${BOOT_ISO_GIT_REVISION} # build the anaconda rpms make -f ./Makefile.am container-rpms-scratch From 68bf85a96519339d3d0fa25df64c2f8fe4d5bd0a Mon Sep 17 00:00:00 2001 From: Jiri Konecny Date: Fri, 9 Aug 2024 14:10:55 +0200 Subject: [PATCH 2/3] infra: Add updates/ directory to .gitignore This will avoid us pushing updates image temp files to the git. --- .gitignore | 1 + .structure-config | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 041dec188c3..c47a093aaee 100644 --- a/.gitignore +++ b/.gitignore @@ -67,6 +67,7 @@ tests/*.trs tests/.coverage.* tests/pylint/.pylint.d tests/test-suite.log* +updates/ updates.img dracut/dd/dd_extract dracut/dd/dd_list diff --git a/.structure-config b/.structure-config index e9717a70275..d16b61df77f 100644 --- a/.structure-config +++ b/.structure-config @@ -8,6 +8,7 @@ INFRASTRUCTURE_FILES=( .coveragerc .shellcheckrc .github/ +.gitignore dockerfile/ scripts/testing/ scripts/jinja-render From f393b541935eecd6b143c6ef572a25fbbb6d89d2 Mon Sep 17 00:00:00 2001 From: Jiri Konecny Date: Fri, 9 Aug 2024 14:54:47 +0200 Subject: [PATCH 3/3] infra: Remove temp files after update_iso The `makeupdates` script was executed with `-k` parameter which will keep `updates` directory after the image is created. In the end it means that next updates image created will contain all the files from previous creation. It wasn't such an issue before rpm unpack was implemented but now it's causing a mess. --- scripts/testing/update_iso | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/testing/update_iso b/scripts/testing/update_iso index d641ad7d8b9..c786da07491 100755 --- a/scripts/testing/update_iso +++ b/scripts/testing/update_iso @@ -88,7 +88,7 @@ def make_updates_image(git_id, rpm_paths): # Create the necessary folder structure os.makedirs(UPDATES_FOLDER, exist_ok=True) # Prepare updates image - cmd = f"./scripts/makeupdates -k -c -t {git_id}{rpm_args}" + cmd = f"./scripts/makeupdates -c -t {git_id}{rpm_args}" print("** Calling:", cmd) os.system(cmd) # Move it next to the ISOs