From e1287eb891e326ea8451b03ba1f9b0d66abdb13d Mon Sep 17 00:00:00 2001 From: Arun Sharma Date: Wed, 4 May 2011 13:48:11 -0700 Subject: Replace '-' in kernel version with '_' Removing the '-' results in hard to read filenames such as: kernel-2.6.35.2000042g76e4caf-28.x86_64.rpm kernel-2.6.35.2_000042_g76e4caf-28.x86_64.rpm is easier to read. Signed-off-by: Arun Sharma Signed-off-by: Michal Marek --- scripts/package/Makefile | 2 +- scripts/package/mkspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/package') diff --git a/scripts/package/Makefile b/scripts/package/Makefile index a834b935f536..1b7eaea83123 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile @@ -26,7 +26,7 @@ RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \ else echo rpm; fi) # Remove hyphens since they have special meaning in RPM filenames -KERNELPATH := kernel-$(subst -,,$(KERNELRELEASE)) +KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE)) MKSPEC := $(srctree)/scripts/package/mkspec PREV := set -e; cd ..; diff --git a/scripts/package/mkspec b/scripts/package/mkspec index e1c1d5b8ca70..ed8b6a8b4b8e 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -22,7 +22,7 @@ if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then fi PROVIDES="$PROVIDES kernel-$KERNELRELEASE" -__KERNELRELEASE=`echo $KERNELRELEASE | sed -e "s/-//g"` +__KERNELRELEASE=`echo $KERNELRELEASE | sed -e "s/-/_/g"` echo "Name: kernel" echo "Summary: The Linux Kernel" -- cgit v1.2.3-58-ga151 From 857c7e438769c0f251092a20b587d6e743ee489d Mon Sep 17 00:00:00 2001 From: Michal Marek Date: Thu, 5 May 2011 00:37:13 +0200 Subject: rpm-pkg: Fix when current directory is a symlink The better fix would be to stop using the parent directory (principle of least surprise), but as long as we use it, use it consistently. Signed-off-by: Michal Marek --- scripts/package/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/package') diff --git a/scripts/package/Makefile b/scripts/package/Makefile index 1b7eaea83123..006960ebbce9 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile @@ -28,7 +28,7 @@ RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \ # Remove hyphens since they have special meaning in RPM filenames KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE)) MKSPEC := $(srctree)/scripts/package/mkspec -PREV := set -e; cd ..; +PREV := set -e; cd -P ..; # rpm-pkg # --------------------------------------------------------------------------- -- cgit v1.2.3-58-ga151 From 0bd41dfc9fbbcf174d5336c1c9fc5ba917519761 Mon Sep 17 00:00:00 2001 From: Arun Sharma Date: Tue, 17 May 2011 10:36:16 -0700 Subject: kbuild: Create a kernel-headers RPM To compile binaries which depend on new kernel interfaces, we need a kernel-headers RPM Signed-off-by: Arun Sharma Signed-off-by: Michal Marek --- scripts/package/mkspec | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'scripts/package') diff --git a/scripts/package/mkspec b/scripts/package/mkspec index ed8b6a8b4b8e..4bf17ddf7c7f 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -47,6 +47,18 @@ echo "" echo "%description" echo "The Linux Kernel, the operating system core itself" echo "" +echo "%package headers" +echo "Summary: Header files for the Linux kernel for use by glibc" +echo "Group: Development/System" +echo "Obsoletes: kernel-headers" +echo "Provides: kernel-headers = %{version}" +echo "%description headers" +echo "Kernel-headers includes the C header files that specify the interface" +echo "between the Linux kernel and userspace libraries and programs. The" +echo "header files define structures and constants that are needed for" +echo "building most standard programs and are also needed for rebuilding the" +echo "glibc package." +echo "" if ! $PREBUILT; then echo "%prep" @@ -83,6 +95,7 @@ echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" echo "%endif" echo "%endif" +echo 'make %{?_smp_mflags} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr headers_install' echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE" echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE" @@ -105,3 +118,7 @@ echo "/lib/modules/$KERNELRELEASE" echo "/lib/firmware" echo "/boot/*" echo "" +echo "%files headers" +echo '%defattr (-, root, root)' +echo "/usr/include" +echo "" -- cgit v1.2.3-58-ga151