[OS-BUILD PATCHv6 1/11] redhat/configs/generate_all_configs.sh: Use Makefile variables

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

 



From: Prarit Bhargava <prarit@xxxxxxxxxx>

redhat/configs/generate_all_configs.sh: Use Makefile variables

Use Makefile variables in generate_all_configs.sh.

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
@@ -344,11 +344,11 @@ dist-kabi-dw-check: dist-kabi
 	@rm -rf $(KABIDW)/base/$(CURARCH).tmp
 
 dist-configs-commit: dist-configs-prep
-	+@cd $(REDHAT)/configs; VERSION=$(KVERSION) ./generate_all_configs.sh "$(FLAVOR)" 1; \
+	+@cd $(REDHAT)/configs; ./generate_all_configs.sh 1;\
 	./process_configs.sh -z "$(PACKAGE_NAME)" "$(KVERSION)" "" "$(FLAVOR)" "$(RHJOBS)"
 
 dist-configs: dist-configs-prep
-	+@cd $(REDHAT)/configs; VERSION=$(KVERSION) ./generate_all_configs.sh "$(FLAVOR)" 1; \
+	+@cd $(REDHAT)/configs; ./generate_all_configs.sh 1;\
 	./process_configs.sh $(PROCESS_CONFIGS_OPTS) "$(PACKAGE_NAME)" "$(KVERSION)" "" "" "$(RHJOBS)"
 
 dist-fedora-configs: FLAVOR = fedora
diff --git a/redhat/configs/generate_all_configs.sh b/redhat/configs/generate_all_configs.sh
index blahblah..blahblah 100755
--- a/redhat/configs/generate_all_configs.sh
+++ b/redhat/configs/generate_all_configs.sh
@@ -1,30 +1,24 @@
 #!/bin/sh
 
 # Adjusts the configuration options to build the variants correctly
-#
-# arg1: configuration to go in the primary variant
-# arg2: are we only generating debug configs
 
-
-PRIMARY=$1
-DEBUGBUILDSENABLED=$2
-
-if [ -z "$2" ]; then
+DEBUGBUILDSENABLED=$1
+if [ -z "$DEBUGBUILDSENABLED" ]; then
 	exit 1
 fi
 
-if [ -z "$PRIMARY" ]; then
-	PRIMARY=rhel
+if [ -z "$FLAVOR" ]; then
+	FLAVOR=rhel
 fi
 
-if [ "$PRIMARY" = "fedora" ]; then
+if [ "$FLAVOR" = "fedora" ]; then
 	SECONDARY=rhel
 else
 	SECONDARY=fedora
 fi
 
-for i in kernel-*-"$PRIMARY".config; do
-	NEW=kernel-"$VERSION"-$(echo "$i" | cut -d - -f2- | sed s/-"$PRIMARY"//)
+for i in kernel-*-"$FLAVOR".config; do
+	NEW=kernel-"$KVERSION"-$(echo "$i" | cut -d - -f2- | sed s/-"$FLAVOR"//)
 	#echo $NEW
 	mv "$i" "$NEW"
 done
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100755
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -1447,7 +1447,7 @@ cp %{SOURCE80} .
 cp %{SOURCE3000} .
 # kernel-local
 cp %{SOURCE3001} .
-VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled}
+FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
 
 # Merge in any user-provided local config option changes
 %ifnarch %nobuildarches
diff --git a/redhat/self-test/data/centos-2585cf9dfaad.el7.spec b/redhat/self-test/data/centos-2585cf9dfaad.el7.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/centos-2585cf9dfaad.el7.spec
+++ b/redhat/self-test/data/centos-2585cf9dfaad.el7.spec
@@ -1451,7 +1451,7 @@ cp %{SOURCE80} .
 cp %{SOURCE3000} .
 # kernel-local
 cp %{SOURCE3001} .
-VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled}
+FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
 
 # Merge in any user-provided local config option changes
 %ifnarch %nobuildarches
diff --git a/redhat/self-test/data/centos-2585cf9dfaad.fc25.spec b/redhat/self-test/data/centos-2585cf9dfaad.fc25.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/centos-2585cf9dfaad.fc25.spec
+++ b/redhat/self-test/data/centos-2585cf9dfaad.fc25.spec
@@ -1451,7 +1451,7 @@ cp %{SOURCE80} .
 cp %{SOURCE3000} .
 # kernel-local
 cp %{SOURCE3001} .
-VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled}
+FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
 
 # Merge in any user-provided local config option changes
 %ifnarch %nobuildarches
diff --git a/redhat/self-test/data/centos-78e36f3b0dae.el7.spec b/redhat/self-test/data/centos-78e36f3b0dae.el7.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/centos-78e36f3b0dae.el7.spec
+++ b/redhat/self-test/data/centos-78e36f3b0dae.el7.spec
@@ -1451,7 +1451,7 @@ cp %{SOURCE80} .
 cp %{SOURCE3000} .
 # kernel-local
 cp %{SOURCE3001} .
-VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled}
+FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
 
 # Merge in any user-provided local config option changes
 %ifnarch %nobuildarches
diff --git a/redhat/self-test/data/centos-78e36f3b0dae.fc25.spec b/redhat/self-test/data/centos-78e36f3b0dae.fc25.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/centos-78e36f3b0dae.fc25.spec
+++ b/redhat/self-test/data/centos-78e36f3b0dae.fc25.spec
@@ -1451,7 +1451,7 @@ cp %{SOURCE80} .
 cp %{SOURCE3000} .
 # kernel-local
 cp %{SOURCE3001} .
-VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled}
+FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
 
 # Merge in any user-provided local config option changes
 %ifnarch %nobuildarches
diff --git a/redhat/self-test/data/centos-df0cc57e057f.el7.spec b/redhat/self-test/data/centos-df0cc57e057f.el7.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/centos-df0cc57e057f.el7.spec
+++ b/redhat/self-test/data/centos-df0cc57e057f.el7.spec
@@ -1451,7 +1451,7 @@ cp %{SOURCE80} .
 cp %{SOURCE3000} .
 # kernel-local
 cp %{SOURCE3001} .
-VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled}
+FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
 
 # Merge in any user-provided local config option changes
 %ifnarch %nobuildarches
diff --git a/redhat/self-test/data/centos-df0cc57e057f.fc25.spec b/redhat/self-test/data/centos-df0cc57e057f.fc25.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/centos-df0cc57e057f.fc25.spec
+++ b/redhat/self-test/data/centos-df0cc57e057f.fc25.spec
@@ -1451,7 +1451,7 @@ cp %{SOURCE80} .
 cp %{SOURCE3000} .
 # kernel-local
 cp %{SOURCE3001} .
-VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled}
+FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
 
 # Merge in any user-provided local config option changes
 %ifnarch %nobuildarches
diff --git a/redhat/self-test/data/centos-fce15c45d3fb.el7.spec b/redhat/self-test/data/centos-fce15c45d3fb.el7.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/centos-fce15c45d3fb.el7.spec
+++ b/redhat/self-test/data/centos-fce15c45d3fb.el7.spec
@@ -1451,7 +1451,7 @@ cp %{SOURCE80} .
 cp %{SOURCE3000} .
 # kernel-local
 cp %{SOURCE3001} .
-VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled}
+FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
 
 # Merge in any user-provided local config option changes
 %ifnarch %nobuildarches
diff --git a/redhat/self-test/data/centos-fce15c45d3fb.fc25.spec b/redhat/self-test/data/centos-fce15c45d3fb.fc25.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/centos-fce15c45d3fb.fc25.spec
+++ b/redhat/self-test/data/centos-fce15c45d3fb.fc25.spec
@@ -1451,7 +1451,7 @@ cp %{SOURCE80} .
 cp %{SOURCE3000} .
 # kernel-local
 cp %{SOURCE3001} .
-VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled}
+FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
 
 # Merge in any user-provided local config option changes
 %ifnarch %nobuildarches
diff --git a/redhat/self-test/data/fedora-2585cf9dfaad.el7.spec b/redhat/self-test/data/fedora-2585cf9dfaad.el7.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/fedora-2585cf9dfaad.el7.spec
+++ b/redhat/self-test/data/fedora-2585cf9dfaad.el7.spec
@@ -1451,7 +1451,7 @@ cp %{SOURCE80} .
 cp %{SOURCE3000} .
 # kernel-local
 cp %{SOURCE3001} .
-VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled}
+FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
 
 # Merge in any user-provided local config option changes
 %ifnarch %nobuildarches
diff --git a/redhat/self-test/data/fedora-2585cf9dfaad.fc25.spec b/redhat/self-test/data/fedora-2585cf9dfaad.fc25.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/fedora-2585cf9dfaad.fc25.spec
+++ b/redhat/self-test/data/fedora-2585cf9dfaad.fc25.spec
@@ -1451,7 +1451,7 @@ cp %{SOURCE80} .
 cp %{SOURCE3000} .
 # kernel-local
 cp %{SOURCE3001} .
-VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled}
+FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
 
 # Merge in any user-provided local config option changes
 %ifnarch %nobuildarches
diff --git a/redhat/self-test/data/fedora-78e36f3b0dae.el7.spec b/redhat/self-test/data/fedora-78e36f3b0dae.el7.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/fedora-78e36f3b0dae.el7.spec
+++ b/redhat/self-test/data/fedora-78e36f3b0dae.el7.spec
@@ -1451,7 +1451,7 @@ cp %{SOURCE80} .
 cp %{SOURCE3000} .
 # kernel-local
 cp %{SOURCE3001} .
-VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled}
+FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
 
 # Merge in any user-provided local config option changes
 %ifnarch %nobuildarches
diff --git a/redhat/self-test/data/fedora-78e36f3b0dae.fc25.spec b/redhat/self-test/data/fedora-78e36f3b0dae.fc25.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/fedora-78e36f3b0dae.fc25.spec
+++ b/redhat/self-test/data/fedora-78e36f3b0dae.fc25.spec
@@ -1451,7 +1451,7 @@ cp %{SOURCE80} .
 cp %{SOURCE3000} .
 # kernel-local
 cp %{SOURCE3001} .
-VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled}
+FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
 
 # Merge in any user-provided local config option changes
 %ifnarch %nobuildarches
diff --git a/redhat/self-test/data/fedora-df0cc57e057f.el7.spec b/redhat/self-test/data/fedora-df0cc57e057f.el7.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/fedora-df0cc57e057f.el7.spec
+++ b/redhat/self-test/data/fedora-df0cc57e057f.el7.spec
@@ -1451,7 +1451,7 @@ cp %{SOURCE80} .
 cp %{SOURCE3000} .
 # kernel-local
 cp %{SOURCE3001} .
-VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled}
+FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
 
 # Merge in any user-provided local config option changes
 %ifnarch %nobuildarches
diff --git a/redhat/self-test/data/fedora-df0cc57e057f.fc25.spec b/redhat/self-test/data/fedora-df0cc57e057f.fc25.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/fedora-df0cc57e057f.fc25.spec
+++ b/redhat/self-test/data/fedora-df0cc57e057f.fc25.spec
@@ -1451,7 +1451,7 @@ cp %{SOURCE80} .
 cp %{SOURCE3000} .
 # kernel-local
 cp %{SOURCE3001} .
-VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled}
+FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
 
 # Merge in any user-provided local config option changes
 %ifnarch %nobuildarches
diff --git a/redhat/self-test/data/fedora-fce15c45d3fb.el7.spec b/redhat/self-test/data/fedora-fce15c45d3fb.el7.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/fedora-fce15c45d3fb.el7.spec
+++ b/redhat/self-test/data/fedora-fce15c45d3fb.el7.spec
@@ -1451,7 +1451,7 @@ cp %{SOURCE80} .
 cp %{SOURCE3000} .
 # kernel-local
 cp %{SOURCE3001} .
-VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled}
+FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
 
 # Merge in any user-provided local config option changes
 %ifnarch %nobuildarches
diff --git a/redhat/self-test/data/fedora-fce15c45d3fb.fc25.spec b/redhat/self-test/data/fedora-fce15c45d3fb.fc25.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/fedora-fce15c45d3fb.fc25.spec
+++ b/redhat/self-test/data/fedora-fce15c45d3fb.fc25.spec
@@ -1451,7 +1451,7 @@ cp %{SOURCE80} .
 cp %{SOURCE3000} .
 # kernel-local
 cp %{SOURCE3001} .
-VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled}
+FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
 
 # Merge in any user-provided local config option changes
 %ifnarch %nobuildarches
diff --git a/redhat/self-test/data/rhel-2585cf9dfaad.el7.spec b/redhat/self-test/data/rhel-2585cf9dfaad.el7.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/rhel-2585cf9dfaad.el7.spec
+++ b/redhat/self-test/data/rhel-2585cf9dfaad.el7.spec
@@ -1451,7 +1451,7 @@ cp %{SOURCE80} .
 cp %{SOURCE3000} .
 # kernel-local
 cp %{SOURCE3001} .
-VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled}
+FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
 
 # Merge in any user-provided local config option changes
 %ifnarch %nobuildarches

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1647
_______________________________________________
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 on the list, report it: https://pagure.io/fedora-infrastructure




[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