[RFC PATCH 2/3] kbuild: rpm-pkg: hard-code ARCH in RPM SPEC file
The kernel source package contains the .config, which is ARCH-specific. Obviously, the target architecture is specified when you create a source package, instead of build-time. Record ARCH= in the spec file in order to avoid uncertainty about what ARCH should be given for building. Add 'ExclusiveArch' tag to stop building immediately in case a user tries to build it for an unintended architecture. Signed-off-by: Masahiro Yamada --- scripts/package/mkspec | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/scripts/package/mkspec b/scripts/package/mkspec index e05646d..f72c46a 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -26,6 +26,14 @@ if grep -q CONFIG_DRM=y .config; then PROVIDES=kernel-drm fi +if [ "$ARCH" = ia64 ]; then + INSTALL_IMAGE="mkdir -p %{buildroot}/boot/efi + cp $KBUILD_IMAGE %{buildroot}/boot/efi/vmlinuz-$KERNELRELEASE + ln -s efi/vmlinuz-$KERNELRELEASE %{buildroot}/boot/" +else + INSTALL_IMAGE="cp $KBUILD_IMAGE %{buildroot}/boot/vmlinuz-$KERNELRELEASE" +fi + PROVIDES="$PROVIDES kernel-$KERNELRELEASE" __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g") EXCLUDES="$RCS_TAR_IGNORE --exclude=.tmp_versions --exclude=*vmlinux* \ @@ -47,6 +55,7 @@ sed -e '/^DEL/d' -e 's/^\t*//'
[RFC PATCH 2/3] kbuild: rpm-pkg: hard-code ARCH in RPM SPEC file
The kernel source package contains the .config, which is ARCH-specific. Obviously, the target architecture is specified when you create a source package, instead of build-time. Record ARCH= in the spec file in order to avoid uncertainty about what ARCH should be given for building. Add 'ExclusiveArch' tag to stop building immediately in case a user tries to build it for an unintended architecture. Signed-off-by: Masahiro Yamada --- scripts/package/mkspec | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/scripts/package/mkspec b/scripts/package/mkspec index e05646d..f72c46a 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -26,6 +26,14 @@ if grep -q CONFIG_DRM=y .config; then PROVIDES=kernel-drm fi +if [ "$ARCH" = ia64 ]; then + INSTALL_IMAGE="mkdir -p %{buildroot}/boot/efi + cp $KBUILD_IMAGE %{buildroot}/boot/efi/vmlinuz-$KERNELRELEASE + ln -s efi/vmlinuz-$KERNELRELEASE %{buildroot}/boot/" +else + INSTALL_IMAGE="cp $KBUILD_IMAGE %{buildroot}/boot/vmlinuz-$KERNELRELEASE" +fi + PROVIDES="$PROVIDES kernel-$KERNELRELEASE" __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g") EXCLUDES="$RCS_TAR_IGNORE --exclude=.tmp_versions --exclude=*vmlinux* \ @@ -47,6 +55,7 @@ sed -e '/^DEL/d' -e 's/^\t*//'