From afb01ca4e5d7bfad760f2d2edfe6a4d0a76e559d Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Wed, 16 Mar 2011 15:18:03 -0400 Subject: [PATCH] move bash script out of the makefile. Also do not set CONFIG_SYSFS_DEPRECATED if underlying distro is SL6 --- Makefile | 8 ++------ modify_rh_config.sh | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 6 deletions(-) create mode 100755 modify_rh_config.sh diff --git a/Makefile b/Makefile index 0bcb0bf10..4149dee2b 100644 --- a/Makefile +++ b/Makefile @@ -89,12 +89,8 @@ srpm: sources cp ../$(notdir $(SPECFILE)) . ; cp ../linux-*.patch .; cp ../config-vserver . ; cp ../config-planetlab .; \ for downloaded in $(SOURCEFILES) ; do cp ../$$downloaded . ; done ; \ cat config-vserver >> config-generic ; \ - cat config-planetlab >> config-generic ; \ - sed -i -e "s,CONFIG_IPV6=m,CONFIG_IPV6=y,g" config-generic ;\ - sed -i -e "s,# CONFIG_SYSFS_DEPRECATED is not set,CONFIG_SYSFS_DEPRECATED=y,g" config-generic ;\ - sed -i -e "s,# CONFIG_SYSFS_DEPRECATED_V2 is not set,CONFIG_SYSFS_DEPRECATED_V2=y,g" config-generic ;\ - sed -i -e "s,CONFIG_MODULE_SIG=y,CONFIG_MODULE_SIG=n,g" config-generic-rhel ;\ - sed -i -e "/\# CONFIG_KVM is not set/d" config-x86-generic-rhel) + cat config-planetlab >> config-generic) + ./modify_rh_config.sh ./rpmmacros.sh export HOME=$(shell pwd) ; rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bs $(SPECFILE) diff --git a/modify_rh_config.sh b/modify_rh_config.sh new file mode 100755 index 000000000..e26c77a79 --- /dev/null +++ b/modify_rh_config.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +pushd SOURCES > /dev/null + +sed -i -e "s,CONFIG_IPV6=m,CONFIG_IPV6=y,g" config-generic +sed -i -e "/\# CONFIG_KVM is not set/d" config-x86-generic-rhel +sed -i -e "s,CONFIG_MODULE_SIG=y,CONFIG_MODULE_SIG=n,g" config-generic-rhel + +# Do not enable CONFIG_SYSFS_DEPRECATED options for Scientific Linux +if ! grep -q Scientific /etc/redhat-release; then + sed -i -e "s,# CONFIG_SYSFS_DEPRECATED is not set,CONFIG_SYSFS_DEPRECATED=y,g" config-generic + sed -i -e "s,# CONFIG_SYSFS_DEPRECATED_V2 is not set,CONFIG_SYSFS_DEPRECATED_V2=y,g" config-generic +fi + +popd -- 2.43.0