From: Prarit Bhargava on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2095
The redhat/ directory contains a bunch of scripts. These can be moved around and cleaned up.
Signed-off-by: Prarit Bhargava prarit@redhat.com
--- redhat/scripts/ci/ark-update-configs.sh | 2 +- redhat/scripts/download_cross.sh => redhat/scripts/cross-compile/download_cross.sh | 0 redhat/scripts/generate-cross-report.sh => redhat/scripts/cross-compile/generate-cross-report.sh | 0 redhat/scripts/x86_rngd.sh => redhat/scripts/cross-compile/x86_rngd.sh | 0 redhat/gating.yaml => redhat/scripts/gating/gating.yaml | 0 redhat/rpminspect.yaml => redhat/scripts/gating/rpminspect.yaml | 0 redhat/commit_template => redhat/scripts/genspec/commit_template | 0 redhat/gen_config_patches.sh => redhat/scripts/genspec/gen_config_patches.sh | 2 +- redhat/genlog.py => redhat/scripts/genspec/genlog.py | 0 redhat/genlog.sh => redhat/scripts/genspec/genlog.sh | 2 +- redhat/genspec.sh => redhat/scripts/genspec/genspec.sh | 0 redhat/cpupower.config => redhat/scripts/kernel-tools/cpupower.config | 0 redhat/cpupower.service => redhat/scripts/kernel-tools/cpupower.service | 0 redhat/kvm_stat.logrotate => redhat/scripts/kernel-tools/kvm_stat.logrotate | 0 redhat/mod-denylist.sh => redhat/scripts/mod/mod-denylist.sh | 0 redhat/mod-internal.list => redhat/scripts/mod/mod-internal.list | 0 redhat/mod-partner.list => redhat/scripts/mod/mod-partner.list | 0 redhat/mod-sign.sh => redhat/scripts/mod/mod-sign.sh | 0 redhat/update_scripts.sh => redhat/scripts/update_scripts.sh | 0 redhat/self-test/1006-verify-SPEC-variables.bats | 4 +- redhat/Makefile | 23 +++--- redhat/Makefile.cross | 34 +++++----- 22 files changed, 34 insertions(+), 33 deletions(-)
From: Prarit Bhargava prarit@redhat.com
redhat: Move mod-* scripts into their own directory
The redhat/ dir is messy and this is just a cleanup.
Move the mod-* scripts into their own directory.
Signed-off-by: Prarit Bhargava prarit@redhat.com
diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -632,10 +632,10 @@ sources-rh: $(TARBALL) generate-testpatch-tmp setup-source dist-configs-check gating.yaml \ update_scripts.sh \ kvm_stat.logrotate \ - mod-denylist.sh \ - mod-internal.list \ - mod-partner.list \ - mod-sign.sh \ + scripts/mod/mod-denylist.sh \ + scripts/mod/mod-internal.list \ + scripts/mod/mod-partner.list \ + scripts/mod/mod-sign.sh \ configs/flavors \ configs/generate_all_configs.sh \ configs/merge.pl \ diff --git a/redhat/mod-denylist.sh b/redhat/scripts/mod/mod-denylist.sh rename from redhat/mod-denylist.sh rename to redhat/scripts/mod/mod-denylist.sh index blahblah..blahblah 100755 --- a/redhat/mod-denylist.sh +++ b/redhat/scripts/mod/mod-denylist.sh diff --git a/redhat/mod-internal.list b/redhat/scripts/mod/mod-internal.list rename from redhat/mod-internal.list rename to redhat/scripts/mod/mod-internal.list index blahblah..blahblah 100644 --- a/redhat/mod-internal.list +++ b/redhat/scripts/mod/mod-internal.list diff --git a/redhat/mod-partner.list b/redhat/scripts/mod/mod-partner.list rename from redhat/mod-partner.list rename to redhat/scripts/mod/mod-partner.list index blahblah..blahblah 100644 --- a/redhat/mod-partner.list +++ b/redhat/scripts/mod/mod-partner.list diff --git a/redhat/mod-sign.sh b/redhat/scripts/mod/mod-sign.sh rename from redhat/mod-sign.sh rename to redhat/scripts/mod/mod-sign.sh index blahblah..blahblah 100755 --- a/redhat/mod-sign.sh +++ b/redhat/scripts/mod/mod-sign.sh
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2095
From: Prarit Bhargava prarit@redhat.com
redhat: Move gen-* scripts into their own directory
The redhat/ dir is messy and this is just a cleanup.
Move the gen-* scripts, and the commit_template into their own directory.
Signed-off-by: Prarit Bhargava prarit@redhat.com
diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -600,7 +600,7 @@ _setup-source: dist-git-version-check echo "Error: PATCHLIST_URL must be set (to 'none' or any URL)"; \ exit 1; \ fi - @$(REDHAT)/genspec.sh + @$(REDHAT)/scripts/genspec/genspec.sh @cp $(SOURCES)/$(SPECFILE) $(SOURCES)/../SPECS/
setup-source: dist-clean-sources _setup-source @@ -703,7 +703,7 @@ dist-release-finish: setup-source dist-release-changed: @CLOGF="$$(mktemp)"; \ trap 'rm -f "$$CLOGF"' SIGHUP SIGINT SIGTERM EXIT; \ - $(REDHAT)/genlog.sh "$$CLOGF"; \ + $(REDHAT)/scripts/genspec/genlog.sh "$$CLOGF"; \ if [ "$(MARKER)" == "$$(cat $(REDHAT)/marker)" ] && \ [ "$$(wc -l $$CLOGF | cut -d ' ' -f 1)" -le 3 ]; then \ echo "Nothing changed, skipping updates"; \ diff --git a/redhat/scripts/ci/ark-update-configs.sh b/redhat/scripts/ci/ark-update-configs.sh index blahblah..blahblah 100755 --- a/redhat/scripts/ci/ark-update-configs.sh +++ b/redhat/scripts/ci/ark-update-configs.sh @@ -61,7 +61,7 @@ new_head="$(git rev-parse HEAD)" # configs/<date>/<config> branch. These commits are used for Merge # Requests. if [ "$old_head" != "$new_head" ]; then - ./redhat/gen_config_patches.sh + ./redhat/scripts/genspec/gen_config_patches.sh else printf "No new configuration values exposed from merging %s into $BRANCH\n" "$UPSTREAM_REF" fi diff --git a/redhat/commit_template b/redhat/scripts/genspec/commit_template rename from redhat/commit_template rename to redhat/scripts/genspec/commit_template index blahblah..blahblah 100644 --- a/redhat/commit_template +++ b/redhat/scripts/genspec/commit_template diff --git a/redhat/gen_config_patches.sh b/redhat/scripts/genspec/gen_config_patches.sh rename from redhat/gen_config_patches.sh rename to redhat/scripts/genspec/gen_config_patches.sh index blahblah..blahblah 100755 --- a/redhat/gen_config_patches.sh +++ b/redhat/scripts/genspec/gen_config_patches.sh @@ -103,7 +103,7 @@ for f in "$config_bundles_dir"/*; do echo "[redhat] New configs in $_f" > "$tmpdir"/commit echo "" >> "$tmpdir"/commit # And the boiler plate - cat redhat/commit_template >> "$tmpdir"/commit + cat redhat/scripts/genspec/commit_template >> "$tmpdir"/commit # This loop actually grabs the help text to put in the commit while read -r line; do # last line is the actual config we need to put in the dir diff --git a/redhat/genlog.py b/redhat/scripts/genspec/genlog.py rename from redhat/genlog.py rename to redhat/scripts/genspec/genlog.py index blahblah..blahblah 100755 --- a/redhat/genlog.py +++ b/redhat/scripts/genspec/genlog.py diff --git a/redhat/genlog.sh b/redhat/scripts/genspec/genlog.sh rename from redhat/genlog.sh rename to redhat/scripts/genspec/genlog.sh index blahblah..blahblah 100755 --- a/redhat/genlog.sh +++ b/redhat/scripts/genspec/genlog.sh @@ -32,7 +32,7 @@ cversion="[$DISTBASEVERSION]"; echo "* $cdate $cname $cversion" > "$clogf"
git log --topo-order --no-merges -z "$GIT_NOTES" "$GIT_FORMAT" \ - ^"${UPSTREAM}" "$lasttag".. -- ':!/redhat/rhdocs' | "${0%/*}"/genlog.py >> "$clogf" + ^"${UPSTREAM}" "$lasttag".. -- ':!/redhat/rhdocs' | "${0%/*}"/scripts/genspec/genlog.py >> "$clogf"
if [ "$HIDE_REDHAT" = "1" ]; then grep -v -e "^- [redhat]" "$clogf" | diff --git a/redhat/genspec.sh b/redhat/scripts/genspec/genspec.sh rename from redhat/genspec.sh rename to redhat/scripts/genspec/genspec.sh index blahblah..blahblah 100755 --- a/redhat/genspec.sh +++ b/redhat/scripts/genspec/genspec.sh diff --git a/redhat/self-test/1006-verify-SPEC-variables.bats b/redhat/self-test/1006-verify-SPEC-variables.bats index blahblah..blahblah 100644 --- a/redhat/self-test/1006-verify-SPEC-variables.bats +++ b/redhat/self-test/1006-verify-SPEC-variables.bats @@ -1,6 +1,6 @@ #!/usr/bin/env bats # Purpose: This test looks at the spec file variable replacement code in -# redhat/genspec.sh and confirms that each variable begins with "SPEC". +# redhat/scripts/genspec/genspec.sh and confirms that each variable begins with "SPEC".
load test-lib.bash
@@ -9,7 +9,7 @@ _verify_SPEC_variables() { # any whitespace and entry entries beginning with valid "%%SPEC" or $"SPEC". # "$SOURCES" lines are also okay as it is used to point to the changelog and # the specfile. -awk '/# self-test begin/, /# self-test end/' $BATS_TEST_DIRNAME/../genspec.sh | grep -v "^#" | tr "/" "\n" | tr -d """ | sed -r '/^\s*$/d' | grep -v "%%SPEC" | grep -v "$SPEC" | grep -v "$SOURCES" | while read LINE +awk '/# self-test begin/, /# self-test end/' $BATS_TEST_DIRNAME/../scripts/genspec/genspec.sh | grep -v "^#" | tr "/" "\n" | tr -d """ | sed -r '/^\s*$/d' | grep -v "%%SPEC" | grep -v "$SPEC" | grep -v "$SOURCES" | while read LINE do echo $LINE case $(echo $LINE | xargs) in
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2095
From: Prarit Bhargava prarit@redhat.com
redhat: Move kernel-tools scripts into their own directory
The redhat/ dir is messy and this is just a cleanup.
Move the kernel-tools scripts into their own directory.
Signed-off-by: Prarit Bhargava prarit@redhat.com
diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -624,14 +624,15 @@ sources-rh: $(TARBALL) generate-testpatch-tmp setup-source dist-configs-check @sed -e "s/%%SPECKVERSION%%/$(SPECKVERSION)/" \ -e "s/%%SPECKPATCHLEVEL%%/$(SPECKPATCHLEVEL)/" \ rpminspect.yaml > $(SOURCES)/rpminspect.yaml - @cp cpupower.* \ + @cp scripts/kernel-tools/cpupower.config \ + scripts/kernel-tools/cpupower.service \ + scripts/kernel-tools/kvm_stat.logrotate \ keys/rhel*.x509 \ kabi/check-kabi \ configs/$(PACKAGE_NAME)-*.config \ configs/partial*.config \ gating.yaml \ update_scripts.sh \ - kvm_stat.logrotate \ scripts/mod/mod-denylist.sh \ scripts/mod/mod-internal.list \ scripts/mod/mod-partner.list \ diff --git a/redhat/cpupower.config b/redhat/scripts/kernel-tools/cpupower.config rename from redhat/cpupower.config rename to redhat/scripts/kernel-tools/cpupower.config index blahblah..blahblah 100644 --- a/redhat/cpupower.config +++ b/redhat/scripts/kernel-tools/cpupower.config diff --git a/redhat/cpupower.service b/redhat/scripts/kernel-tools/cpupower.service rename from redhat/cpupower.service rename to redhat/scripts/kernel-tools/cpupower.service index blahblah..blahblah 100644 --- a/redhat/cpupower.service +++ b/redhat/scripts/kernel-tools/cpupower.service diff --git a/redhat/kvm_stat.logrotate b/redhat/scripts/kernel-tools/kvm_stat.logrotate rename from redhat/kvm_stat.logrotate rename to redhat/scripts/kernel-tools/kvm_stat.logrotate index blahblah..blahblah 100644 --- a/redhat/kvm_stat.logrotate +++ b/redhat/scripts/kernel-tools/kvm_stat.logrotate
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2095
From: Prarit Bhargava prarit@redhat.com
redhat: Move update_scripts.sh into redhat/scripts
The redhat/scripts dir is messy and this is just a cleanup.
Move upate_scripts.sh into redhat/scripts.
Signed-off-by: Prarit Bhargava prarit@redhat.com
diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -632,7 +632,7 @@ sources-rh: $(TARBALL) generate-testpatch-tmp setup-source dist-configs-check configs/$(PACKAGE_NAME)-*.config \ configs/partial*.config \ gating.yaml \ - update_scripts.sh \ + scripts/update_scripts.sh \ scripts/mod/mod-denylist.sh \ scripts/mod/mod-internal.list \ scripts/mod/mod-partner.list \ diff --git a/redhat/update_scripts.sh b/redhat/scripts/update_scripts.sh rename from redhat/update_scripts.sh rename to redhat/scripts/update_scripts.sh index blahblah..blahblah 100755 --- a/redhat/update_scripts.sh +++ b/redhat/scripts/update_scripts.sh
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2095
From: Prarit Bhargava prarit@redhat.com
redhat: Move yaml files into their own directory
The redhat/scripts dir is messy and this is just a cleanup.
Move the yaml files into their own directory.
Signed-off-by: Prarit Bhargava prarit@redhat.com
diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -623,7 +623,7 @@ sources-rh: $(TARBALL) generate-testpatch-tmp setup-source dist-configs-check @cat configs/flavors | while read flavor; do echo "Copying sources for $${flavor}"; [ -e $${flavor}_files ] && cp $${flavor}_files/* $(SOURCES); done @sed -e "s/%%SPECKVERSION%%/$(SPECKVERSION)/" \ -e "s/%%SPECKPATCHLEVEL%%/$(SPECKPATCHLEVEL)/" \ - rpminspect.yaml > $(SOURCES)/rpminspect.yaml + scripts/gating/rpminspect.yaml > $(SOURCES)/rpminspect.yaml @cp scripts/kernel-tools/cpupower.config \ scripts/kernel-tools/cpupower.service \ scripts/kernel-tools/kvm_stat.logrotate \ @@ -631,7 +631,7 @@ sources-rh: $(TARBALL) generate-testpatch-tmp setup-source dist-configs-check kabi/check-kabi \ configs/$(PACKAGE_NAME)-*.config \ configs/partial*.config \ - gating.yaml \ + scripts/gating/gating.yaml \ scripts/update_scripts.sh \ scripts/mod/mod-denylist.sh \ scripts/mod/mod-internal.list \ diff --git a/redhat/gating.yaml b/redhat/scripts/gating/gating.yaml rename from redhat/gating.yaml rename to redhat/scripts/gating/gating.yaml index blahblah..blahblah 100644 --- a/redhat/gating.yaml +++ b/redhat/scripts/gating/gating.yaml diff --git a/redhat/rpminspect.yaml b/redhat/scripts/gating/rpminspect.yaml rename from redhat/rpminspect.yaml rename to redhat/scripts/gating/rpminspect.yaml index blahblah..blahblah 100644 --- a/redhat/rpminspect.yaml +++ b/redhat/scripts/gating/rpminspect.yaml
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2095
From: Prarit Bhargava prarit@redhat.com
redhat: Move cross-compile scripts into their own directory
The redhat/scripts dir is messy and this is just a cleanup.
Move the cross-compile scripts into their own directory.
Signed-off-by: Prarit Bhargava prarit@redhat.com
diff --git a/redhat/Makefile.cross b/redhat/Makefile.cross index blahblah..blahblah 100644 --- a/redhat/Makefile.cross +++ b/redhat/Makefile.cross @@ -22,50 +22,50 @@ dist-cross-download: exit 1; \ fi; @ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) \ - $(REDHAT)/scripts/download_cross.sh $(CROSS_PACKAGE_LIST) + $(REDHAT)/scripts/cross-compile/download_cross.sh $(CROSS_PACKAGE_LIST)
dist-cross-aarch64-rpms: dist-cross-download dist-sources - $(REDHAT)/scripts/x86_rngd.sh + $(REDHAT)/scripts/cross_compile/x86_rngd.sh $(CROSS_RPMFLAGS) --target aarch64 --with cross -ba $(RPM)/SOURCES/$(SPECFILE) - $(REDHAT)/scripts/generate-cross-report.sh "aarch64" + $(REDHAT)/scripts/cross-compile/generate-cross-report.sh "aarch64"
dist-cross-ppc64-rpms: dist-cross-download dist-sources - $(REDHAT)/scripts/x86_rngd.sh + $(REDHAT)/scripts/cross_compile/x86_rngd.sh $(CROSS_RPMFLAGS) --target ppc64 --with cross -ba $(RPM)/SOURCES/$(SPECFILE) - $(REDHAT)/scripts/generate-cross-report.sh "ppc64" + $(REDHAT)/scripts/cross-compile/generate-cross-report.sh "ppc64"
dist-cross-s390x-rpms: dist-cross-download dist-sources - $(REDHAT)/scripts/x86_rngd.sh + $(REDHAT)/scripts/cross_compile/x86_rngd.sh $(CROSS_RPMFLAGS) --target s390x --with cross -ba $(RPM)/SOURCES/$(SPECFILE) - $(REDHAT)/scripts/generate-cross-report.sh "s390x" + $(REDHAT)/scripts/cross-compile/generate-cross-report.sh "s390x"
dist-cross-all-rpms: dist-cross-download dist-sources - $(REDHAT)/scripts/x86_rngd.sh + $(REDHAT)/scripts/cross_compile/x86_rngd.sh $(CROSS_RPMFLAGS) --target aarch64 --with cross -ba $(RPM)/SOURCES/$(SPECFILE) $(CROSS_RPMFLAGS) --target ppc64 --with cross -ba $(RPM)/SOURCES/$(SPECFILE) $(CROSS_RPMFLAGS) --target s390x --with cross -ba $(RPM)/SOURCES/$(SPECFILE) $(CROSS_RPMFLAGS) -ba $(RPM)/SOURCES/$(SPECFILE) - $(REDHAT)/scripts/generate-cross-report.sh "aarch64 ppc64 s390x x86_64" + $(REDHAT)/scripts/cross-compile/generate-cross-report.sh "aarch64 ppc64 s390x x86_64"
dist-cross-aarch64-build: dist-cross-download dist-sources - $(REDHAT)/scripts/x86_rngd.sh + $(REDHAT)/scripts/cross_compile/x86_rngd.sh $(CROSS_RPMFLAGS) --target aarch64 --with cross --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE) - $(REDHAT)/scripts/generate-cross-report.sh "aarch64" + $(REDHAT)/scripts/cross-compile/generate-cross-report.sh "aarch64"
dist-cross-ppc64-build: dist-cross-download dist-sources - $(REDHAT)/scripts/x86_rngd.sh + $(REDHAT)/scripts/cross_compile/x86_rngd.sh $(CROSS_RPMFLAGS) --target ppc64 --with cross --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE) - $(REDHAT)/scripts/generate-cross-report.sh "ppc64" + $(REDHAT)/scripts/cross-compile/generate-cross-report.sh "ppc64"
dist-cross-s390x-build: dist-cross-download dist-sources - $(REDHAT)/scripts/x86_rngd.sh + $(REDHAT)/scripts/cross_compile/x86_rngd.sh $(CROSS_RPMFLAGS) --target s390x --with cross --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE) - $(REDHAT)/scripts/generate-cross-report.sh "s390x" + $(REDHAT)/scripts/cross-compile/generate-cross-report.sh "s390x"
dist-cross-all-builds: dist-cross-download dist-sources - $(REDHAT)/scripts/x86_rngd.sh + $(REDHAT)/scripts/cross_compile/x86_rngd.sh $(CROSS_RPMFLAGS) --target aarch64 --with cross --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE) $(CROSS_RPMFLAGS) --target ppc64 --with cross --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE) $(CROSS_RPMFLAGS) --target s390x --with cross --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE) $(CROSS_RPMFLAGS) --without debuginfo -bc $(RPM)/SOURCES/$(SPECFILE) - $(REDHAT)/scripts/generate-cross-report.sh "aarch64 ppc64 s390x x86_64" + $(REDHAT)/scripts/cross-compile/generate-cross-report.sh "aarch64 ppc64 s390x x86_64" diff --git a/redhat/scripts/download_cross.sh b/redhat/scripts/cross-compile/download_cross.sh rename from redhat/scripts/download_cross.sh rename to redhat/scripts/cross-compile/download_cross.sh index blahblah..blahblah 100755 --- a/redhat/scripts/download_cross.sh +++ b/redhat/scripts/cross-compile/download_cross.sh diff --git a/redhat/scripts/generate-cross-report.sh b/redhat/scripts/cross-compile/generate-cross-report.sh rename from redhat/scripts/generate-cross-report.sh rename to redhat/scripts/cross-compile/generate-cross-report.sh index blahblah..blahblah 100755 --- a/redhat/scripts/generate-cross-report.sh +++ b/redhat/scripts/cross-compile/generate-cross-report.sh diff --git a/redhat/scripts/x86_rngd.sh b/redhat/scripts/cross-compile/x86_rngd.sh rename from redhat/scripts/x86_rngd.sh rename to redhat/scripts/cross-compile/x86_rngd.sh index blahblah..blahblah 100755 --- a/redhat/scripts/x86_rngd.sh +++ b/redhat/scripts/cross-compile/x86_rngd.sh
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2095
From: Jarod Wilson on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2095#note_1154732...
LGTM now, thank you for that change.
kernel@lists.fedoraproject.org