[OS-BUILD PATCHv2 1/4] redhat/Makefile: Fix '*-configs' targets

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

 



From: Prarit Bhargava <prarit@xxxxxxxxxx>

The 'dist-configs' is not working properly as it only creates ELN
configs.  The 'rh-configs' and 'fedora-configs' targets are not
working properly and should be creating ELN and Fedora configs but they
only create some temporary/intermediate build files.  These targets
should output final .config files for each supported arch.

There are several fixes necessary to get the *-configs targets working
properly:

- Fix dist-configs to use a specified flavor instead of only ELN.  By
default, dist-configs will build ELN configs.
- Add a flavor parameter to build_config.sh.  By default build_config.sh
will use still the configs/flavors file, o/w build_config will only build
the flavor specified.
- Silence a warning in generate_all_configs.sh

Fix the '*-configs' targets to output final .config files for each
supported flavor arch.

Cleanup: Remove unused DIST_TARGET and TARGET variables.

v2: Fix 'make dist-configs' by removing the default setting of FLAVOR (jforbes)

Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx>
Reported-by: mleitner@xxxxxxxxxx
Cc: dzickus@xxxxxxxxxx
Cc: jforbes@xxxxxxxxxx
Cc: mleitner@xxxxxxxxxx
Cc: jbenc@xxxxxxxxxx
---
 redhat/Makefile                        | 17 +++++------------
 redhat/configs/build_configs.sh        |  9 ++++++++-
 redhat/configs/generate_all_configs.sh |  2 +-
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/redhat/Makefile b/redhat/Makefile
index 7cdf9e3bd0bf..91497b3249d0 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -20,13 +20,6 @@ else
   endif
 endif
 
-
-ifeq ("$(IS_FEDORA)", "1")
-   DIST_TARGET=fedora
-else
-   DIST_TARGET=rhel
-endif
-
 ifeq ("$(NO_CONFIGCHECKS)","1")
    PROCESS_CONFIGS_OPTS=
    PROCESS_CONFIGS_CHECK_OPTS=
@@ -37,7 +30,7 @@ else
 endif
 
 BUILD_TARGET ?= --scratch $(BUILD_SCRATCH_TARGET)
-FLAVOR ?= rhel
+FLAVOR =
 
 RHGITURL?=$(shell git config rhg.url || git config remote.origin.url)
 RHGITCOMMIT?=$(shell git log -1 --pretty=format:%H)
@@ -138,20 +131,20 @@ dist-configs-commit: dist-configs-prep
 	./process_configs.sh -z $(PACKAGE_NAME) $(KVERSION) "" $(FLAVOR)
 
 dist-configs: dist-configs-prep
-	@cd $(REDHAT)/configs; VERSION=$(KVERSION) ./generate_all_configs.sh rhel 1; \
+	@cd $(REDHAT)/configs; VERSION=$(KVERSION) ./generate_all_configs.sh "$(FLAVOR)" 1; \
 	./process_configs.sh $(PROCESS_CONFIGS_OPTS) $(PACKAGE_NAME) $(KVERSION)
 
-fedora-configs: DIST_TARGET=fedora
+fedora-configs: FLAVOR = fedora
 fedora-configs: dist-configs
 
-rh-configs: DIST_TARGET=rhel
+rh-configs: FLAVOR = rhel
 rh-configs: dist-configs
 
 dist-configs-check: dist-configs-prep
 	cd $(REDHAT)/configs; ./process_configs.sh $(PROCESS_CONFIGS_CHECK_OPTS) $(PACKAGE_NAME)
 
 dist-configs-prep: dist-clean-configs
-	cd $(REDHAT)/configs; TARGET=$(DIST_TARGET) ./build_configs.sh $(PACKAGE_NAME) $(ARCH_MACH)
+	cd $(REDHAT)/configs; ./build_configs.sh "$(PACKAGE_NAME)" "$(ARCH_MACH)" "$(FLAVOR)"
 
 dist-configs-arch: ARCH_MACH = $(MACH)
 dist-configs-arch: dist-configs
diff --git a/redhat/configs/build_configs.sh b/redhat/configs/build_configs.sh
index 18610e1fc097..90f2be85f49d 100755
--- a/redhat/configs/build_configs.sh
+++ b/redhat/configs/build_configs.sh
@@ -10,6 +10,12 @@ SCRIPT="$(readlink -f $0)"
 OUTPUT_DIR="$PWD"
 SCRIPT_DIR="$(dirname $SCRIPT)"
 
+if [ -z "$3" ]; then
+	cat flavors > .flavors
+else
+	echo "$3" > .flavors
+fi
+
 LANG=en_US.UTF-8
 
 # to handle this script being a symlink
@@ -21,6 +27,7 @@ set nounset
 cleanup()
 {
 	rm -f config-*
+	rm -f .flavors
 }
 
 die()
@@ -142,6 +149,6 @@ function build_flavor()
 while read line
 do
 	build_flavor $line
-done < flavors
+done < .flavors
 
 cleanup
diff --git a/redhat/configs/generate_all_configs.sh b/redhat/configs/generate_all_configs.sh
index 14f0f3a24de5..15a39a8fccc8 100755
--- a/redhat/configs/generate_all_configs.sh
+++ b/redhat/configs/generate_all_configs.sh
@@ -25,7 +25,7 @@ for i in kernel-*-$PRIMARY.config; do
 	mv $i $NEW
 done
 
-rm kernel-*-$SECONDARY.config
+rm -f kernel-*-$SECONDARY.config
 
 if [ $DEBUGBUILDSENABLED -eq 0 ]; then
 	for i in kernel-*debug*.config; do
-- 
GitLab
_______________________________________________
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




[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