[OS-BUILD PATCHv5 2/6] redhat: Move gen-* scripts into their own directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Prarit Bhargava <prarit@xxxxxxxxxx>

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@xxxxxxxxxx>

diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -597,7 +597,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
@@ -700,7 +700,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
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux