All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/9] kbuild: rpm-pkg: remove ppc64 specific image handling
@ 2017-09-30  1:10 Masahiro Yamada
  2017-09-30  1:10 ` [PATCH 2/9] kbuild: rpm-pkg: install vmlinux.bz2 unconditionally Masahiro Yamada
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Masahiro Yamada @ 2017-09-30  1:10 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Masahiro Yamada, Michal Marek, linux-kernel

This conditional was added by commit 1a0f3d422bb9 ("kbuild: fix
make rpm for powerpc").  Its git-log explains the default kernel
image is zImage, but obviously the current arch/powerpc/Makefile
does not set KBUILD_IMAGE, so the image file is actually vmlinux.

Moreover, since commit 09549aa1baa9 ("deb-pkg: Remove the KBUILD_IMAGE
workaround"), all architectures are supposed to set the full path to
the image in KBUILD_IMAGE.  I see no good reason to differentiate
ppc64 from others.  Rip off the conditional.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 scripts/package/mkspec | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index f47f17a..ef00750 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -92,13 +92,8 @@ echo "%ifarch ia64"
 echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE"
 echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/"
 echo "%else"
-echo "%ifarch ppc64"
-echo "cp vmlinux arch/powerpc/boot"
-echo "cp arch/powerpc/boot/"'$KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE"
-echo "%else"
 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 KBUILD_SRC= headers_install'
 echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE"
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/9] kbuild: rpm-pkg: install vmlinux.bz2 unconditionally
  2017-09-30  1:10 [PATCH 1/9] kbuild: rpm-pkg: remove ppc64 specific image handling Masahiro Yamada
@ 2017-09-30  1:10 ` Masahiro Yamada
  2017-09-30  1:10 ` [PATCH 3/9] kbuild: rpm-pkg: clean up mkspec Masahiro Yamada
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Masahiro Yamada @ 2017-09-30  1:10 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Masahiro Yamada, Michal Marek, linux-kernel

This conditional was added by commit fc370ecfdb37 ("kbuild: add
vmlinux to kernel rpm").  Its git-log mentioned vmlinux.bz2 was
necessary for debugging, but did not explain why ppc64 was an
exception.  I see no problem to copy vmlinux.bz2 all the time.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 scripts/package/mkspec | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index ef00750..a026c08 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -99,11 +99,8 @@ echo 'make %{?_smp_mflags} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr KBUILD_SRC= head
 echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE"
 
 echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE"
-
-echo "%ifnarch ppc64"
 echo 'bzip2 -9 --keep vmlinux'
 echo 'mv vmlinux.bz2 $RPM_BUILD_ROOT'"/boot/vmlinux-$KERNELRELEASE.bz2"
-echo "%endif"
 
 if ! $PREBUILT; then
 echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/build"
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/9] kbuild: rpm-pkg: clean up mkspec
  2017-09-30  1:10 [PATCH 1/9] kbuild: rpm-pkg: remove ppc64 specific image handling Masahiro Yamada
  2017-09-30  1:10 ` [PATCH 2/9] kbuild: rpm-pkg: install vmlinux.bz2 unconditionally Masahiro Yamada
@ 2017-09-30  1:10 ` Masahiro Yamada
  2017-09-30  1:10 ` [PATCH 4/9] kbuild: rpm-pkg: refactor mkspec with here doc Masahiro Yamada
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Masahiro Yamada @ 2017-09-30  1:10 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Masahiro Yamada, Michal Marek, linux-kernel

Clean up the mkspec without changing the behavior.

 - grep CONFIG_DRM=y more simply

 - move "EXCLUDE" out of the "%install" section because it can be
   computed when the spec file is generated

 - remove "BuildRoot:" field, which is now redundant

 - do not mkdir $RPM_BUILD_ROOT/lib/modules explicitly because it
   is automatically created by "make modules_install"

 - exclude "%package devel" from source package spec file because
   it does not make sense where "%files devel" is already excluded

 - exclude "%build" from source package spec file

 - remove unneeded "make clean" because we had already cleaned
   before making tar file

 - merge two %ifarch ia64 conditionals

 - replace KBUILD_IMAGE with direct use of $(make image_name)

 - remove trailing empty line from the spec file

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 scripts/package/mkspec | 44 ++++++++++++++++----------------------------
 1 file changed, 16 insertions(+), 28 deletions(-)

diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index a026c08..97feb60 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -10,19 +10,21 @@
 #
 
 # how we were called determines which rpms we build and how we build them
-if [ "$1" = "prebuilt" ]; then
+if [ "$1" = prebuilt ]; then
 	PREBUILT=true
 else
 	PREBUILT=false
 fi
 
-# starting to output the spec
-if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then
+if grep -q CONFIG_DRM=y .config; then
 	PROVIDES=kernel-drm
 fi
 
 PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
-__KERNELRELEASE=`echo $KERNELRELEASE | sed -e "s/-/_/g"`
+__KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
+EXCLUDES="$RCS_TAR_IGNORE --exclude=.tmp_versions --exclude=*vmlinux* \
+--exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation \
+--exclude=.config.old --exclude=.missing-syscalls.d"
 
 echo "Name: kernel"
 echo "Summary: The Linux Kernel"
@@ -37,7 +39,6 @@ if ! $PREBUILT; then
 echo "Source: kernel-$__KERNELRELEASE.tar.gz"
 fi
 
-echo "BuildRoot: %{_tmppath}/%{name}-%{PACKAGE_VERSION}-root"
 echo "Provides: $PROVIDES"
 echo "%define __spec_install_post /usr/lib/rpm/brp-compress || :"
 echo "%define debug_package %{nil}"
@@ -57,6 +58,8 @@ 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 "%package devel"
 echo "Summary: Development package for building kernel modules to match the $__KERNELRELEASE kernel"
 echo "Group: System Environment/Kernel"
@@ -65,39 +68,26 @@ echo "%description -n kernel-devel"
 echo "This package provides kernel headers and makefiles sufficient to build modules"
 echo "against the $__KERNELRELEASE kernel package."
 echo ""
-
-if ! $PREBUILT; then
 echo "%prep"
 echo "%setup -q"
 echo ""
-fi
-
 echo "%build"
-
-if ! $PREBUILT; then
-echo "make clean && make %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release}"
+echo "make %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release}"
 echo ""
 fi
 
 echo "%install"
-echo 'KBUILD_IMAGE=$(make image_name)'
+echo 'mkdir -p $RPM_BUILD_ROOT/boot'
 echo "%ifarch ia64"
-echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib/modules'
-echo "%else"
-echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib/modules'
-echo "%endif"
-
-echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{?_smp_mflags} KBUILD_SRC= modules_install'
-echo "%ifarch ia64"
-echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE"
+echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi'
+echo 'cp $(make image_name) $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE"
 echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/"
 echo "%else"
-echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE"
+echo 'cp $(make image_name) $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE"
 echo "%endif"
-
+echo 'make %{?_smp_mflags} INSTALL_MOD_PATH=$RPM_BUILD_ROOT KBUILD_SRC= modules_install'
 echo 'make %{?_smp_mflags} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr KBUILD_SRC= headers_install'
 echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE"
-
 echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE"
 echo 'bzip2 -9 --keep vmlinux'
 echo 'mv vmlinux.bz2 $RPM_BUILD_ROOT'"/boot/vmlinux-$KERNELRELEASE.bz2"
@@ -106,8 +96,7 @@ if ! $PREBUILT; then
 echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/build"
 echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/source"
 echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE"
-echo "EXCLUDES=\"$RCS_TAR_IGNORE --exclude .tmp_versions --exclude=*vmlinux* --exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation --exclude .config.old --exclude .missing-syscalls.d\""
-echo "tar "'$EXCLUDES'" -cf- . | (cd "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE;tar xvf -)"
+echo "tar cf - . $EXCLUDES | tar xf - -C "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE"
 echo 'cd $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE"
 echo "ln -sf /usr/src/kernels/$KERNELRELEASE build"
 echo "ln -sf /usr/src/kernels/$KERNELRELEASE source"
@@ -146,12 +135,11 @@ echo ""
 echo "%files headers"
 echo '%defattr (-, root, root)'
 echo "/usr/include"
-echo ""
 if ! $PREBUILT; then
+echo ""
 echo "%files devel"
 echo '%defattr (-, root, root)'
 echo "/usr/src/kernels/$KERNELRELEASE"
 echo "/lib/modules/$KERNELRELEASE/build"
 echo "/lib/modules/$KERNELRELEASE/source"
-echo ""
 fi
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/9] kbuild: rpm-pkg: refactor mkspec with here doc
  2017-09-30  1:10 [PATCH 1/9] kbuild: rpm-pkg: remove ppc64 specific image handling Masahiro Yamada
  2017-09-30  1:10 ` [PATCH 2/9] kbuild: rpm-pkg: install vmlinux.bz2 unconditionally Masahiro Yamada
  2017-09-30  1:10 ` [PATCH 3/9] kbuild: rpm-pkg: clean up mkspec Masahiro Yamada
@ 2017-09-30  1:10 ` Masahiro Yamada
  2017-09-30  1:10 ` [PATCH 5/9] kbuild: rpm-pkg: fix build error when CONFIG_MODULES is disabled Masahiro Yamada
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Masahiro Yamada @ 2017-09-30  1:10 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Masahiro Yamada, Michal Marek, linux-kernel

The repeat of echo is unreadable.  The here-document is a well-known
device for such scripts.  One difficulty is we have a bunch of PREBUILT
conditionals that would split the here-document.

My idea is to add "$S" annotatation to lines only for the source package
spec file, then post-process it by sed.  I hope it will make our life
easier than repeat of "cat <<EOF ..."

I confirmed this commit still produced the same (bin)kernel.spec as
before.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 scripts/package/mkspec | 218 ++++++++++++++++++++++++-------------------------
 1 file changed, 105 insertions(+), 113 deletions(-)

diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 97feb60..f34e3bf 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -11,9 +11,9 @@
 
 # how we were called determines which rpms we build and how we build them
 if [ "$1" = prebuilt ]; then
-	PREBUILT=true
+	S=DEL
 else
-	PREBUILT=false
+	S=
 fi
 
 if grep -q CONFIG_DRM=y .config; then
@@ -26,120 +26,112 @@ EXCLUDES="$RCS_TAR_IGNORE --exclude=.tmp_versions --exclude=*vmlinux* \
 --exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation \
 --exclude=.config.old --exclude=.missing-syscalls.d"
 
-echo "Name: kernel"
-echo "Summary: The Linux Kernel"
-echo "Version: $__KERNELRELEASE"
-echo "Release: $(cat .version 2>/dev/null || echo 1)"
-echo "License: GPL"
-echo "Group: System Environment/Kernel"
-echo "Vendor: The Linux Community"
-echo "URL: http://www.kernel.org"
+# We can label the here-doc lines for conditional output to the spec file
+#
+# Labels:
+#  $S: this line is enabled only when building source package
+sed -e '/^DEL/d' -e's/^\t*//' <<EOF
+	Name: kernel
+	Summary: The Linux Kernel
+	Version: $__KERNELRELEASE
+	Release: $(cat .version 2>/dev/null || 1)
+	License: GPL
+	Group: System Environment/Kernel
+	Vendor: The Linux Community
+	URL: http://www.kernel.org
+$S	Source: kernel-$__KERNELRELEASE.tar.gz
+	Provides: $PROVIDES
+	%define __spec_install_post /usr/lib/rpm/brp-compress || :
+	%define debug_package %{nil}
 
-if ! $PREBUILT; then
-echo "Source: kernel-$__KERNELRELEASE.tar.gz"
-fi
+	%description
+	The Linux Kernel, the operating system core itself
 
-echo "Provides: $PROVIDES"
-echo "%define __spec_install_post /usr/lib/rpm/brp-compress || :"
-echo "%define debug_package %{nil}"
-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 ""
+	%package headers
+	Summary: Header files for the Linux kernel for use by glibc
+	Group: Development/System
+	Obsoletes: kernel-headers
+	Provides: kernel-headers = %{version}
+	%description headers
+	Kernel-headers includes the C header files that specify the interface
+	between the Linux kernel and userspace libraries and programs.  The
+	header files define structures and constants that are needed for
+	building most standard programs and are also needed for rebuilding the
+	glibc package.
 
-if ! $PREBUILT; then
-echo "%package devel"
-echo "Summary: Development package for building kernel modules to match the $__KERNELRELEASE kernel"
-echo "Group: System Environment/Kernel"
-echo "AutoReqProv: no"
-echo "%description -n kernel-devel"
-echo "This package provides kernel headers and makefiles sufficient to build modules"
-echo "against the $__KERNELRELEASE kernel package."
-echo ""
-echo "%prep"
-echo "%setup -q"
-echo ""
-echo "%build"
-echo "make %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release}"
-echo ""
-fi
+$S	%package devel
+$S	Summary: Development package for building kernel modules to match the $__KERNELRELEASE kernel
+$S	Group: System Environment/Kernel
+$S	AutoReqProv: no
+$S	%description -n kernel-devel
+$S	This package provides kernel headers and makefiles sufficient to build modules
+$S	against the $__KERNELRELEASE kernel package.
+$S
+$S	%prep
+$S	%setup -q
+$S
+$S	%build
+$S	make %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release}
+$S
+	%install
+	mkdir -p \$RPM_BUILD_ROOT/boot
+	%ifarch ia64
+	mkdir -p \$RPM_BUILD_ROOT/boot/efi
+	cp \$(make image_name) \$RPM_BUILD_ROOT/boot/efi/vmlinuz-$KERNELRELEASE
+	ln -s efi/vmlinuz-$KERNELRELEASE \$RPM_BUILD_ROOT/boot/
+	%else
+	cp \$(make image_name) \$RPM_BUILD_ROOT/boot/vmlinuz-$KERNELRELEASE
+	%endif
+	make %{?_smp_mflags} INSTALL_MOD_PATH=\$RPM_BUILD_ROOT KBUILD_SRC= modules_install
+	make %{?_smp_mflags} INSTALL_HDR_PATH=\$RPM_BUILD_ROOT/usr KBUILD_SRC= headers_install
+	cp System.map \$RPM_BUILD_ROOT/boot/System.map-$KERNELRELEASE
+	cp .config \$RPM_BUILD_ROOT/boot/config-$KERNELRELEASE
+	bzip2 -9 --keep vmlinux
+	mv vmlinux.bz2 \$RPM_BUILD_ROOT/boot/vmlinux-$KERNELRELEASE.bz2
+$S	rm -f \$RPM_BUILD_ROOT/lib/modules/$KERNELRELEASE/build
+$S	rm -f \$RPM_BUILD_ROOT/lib/modules/$KERNELRELEASE/source
+$S	mkdir -p \$RPM_BUILD_ROOT/usr/src/kernels/$KERNELRELEASE
+$S	tar cf - . $EXCLUDES | tar xf - -C \$RPM_BUILD_ROOT/usr/src/kernels/$KERNELRELEASE
+$S	cd \$RPM_BUILD_ROOT/lib/modules/$KERNELRELEASE
+$S	ln -sf /usr/src/kernels/$KERNELRELEASE build
+$S	ln -sf /usr/src/kernels/$KERNELRELEASE source
 
-echo "%install"
-echo 'mkdir -p $RPM_BUILD_ROOT/boot'
-echo "%ifarch ia64"
-echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi'
-echo 'cp $(make image_name) $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE"
-echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/"
-echo "%else"
-echo 'cp $(make image_name) $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE"
-echo "%endif"
-echo 'make %{?_smp_mflags} INSTALL_MOD_PATH=$RPM_BUILD_ROOT KBUILD_SRC= modules_install'
-echo 'make %{?_smp_mflags} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr KBUILD_SRC= headers_install'
-echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE"
-echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE"
-echo 'bzip2 -9 --keep vmlinux'
-echo 'mv vmlinux.bz2 $RPM_BUILD_ROOT'"/boot/vmlinux-$KERNELRELEASE.bz2"
+	%clean
+	rm -rf \$RPM_BUILD_ROOT
 
-if ! $PREBUILT; then
-echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/build"
-echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/source"
-echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE"
-echo "tar cf - . $EXCLUDES | tar xf - -C "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE"
-echo 'cd $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE"
-echo "ln -sf /usr/src/kernels/$KERNELRELEASE build"
-echo "ln -sf /usr/src/kernels/$KERNELRELEASE source"
-fi
+	%post
+	if [ -x /sbin/installkernel -a -r /boot/vmlinuz-$KERNELRELEASE -a -r /boot/System.map-$KERNELRELEASE ]; then
+	cp /boot/vmlinuz-$KERNELRELEASE /boot/.vmlinuz-$KERNELRELEASE-rpm
+	cp /boot/System.map-$KERNELRELEASE /boot/.System.map-$KERNELRELEASE-rpm
+	rm -f /boot/vmlinuz-$KERNELRELEASE /boot/System.map-$KERNELRELEASE
+	/sbin/installkernel $KERNELRELEASE /boot/.vmlinuz-$KERNELRELEASE-rpm /boot/.System.map-$KERNELRELEASE-rpm
+	rm -f /boot/.vmlinuz-$KERNELRELEASE-rpm /boot/.System.map-$KERNELRELEASE-rpm
+	fi
 
-echo ""
-echo "%clean"
-echo 'rm -rf $RPM_BUILD_ROOT'
-echo ""
-echo "%post"
-echo "if [ -x /sbin/installkernel -a -r /boot/vmlinuz-$KERNELRELEASE -a -r /boot/System.map-$KERNELRELEASE ]; then"
-echo "cp /boot/vmlinuz-$KERNELRELEASE /boot/.vmlinuz-$KERNELRELEASE-rpm"
-echo "cp /boot/System.map-$KERNELRELEASE /boot/.System.map-$KERNELRELEASE-rpm"
-echo "rm -f /boot/vmlinuz-$KERNELRELEASE /boot/System.map-$KERNELRELEASE"
-echo "/sbin/installkernel $KERNELRELEASE /boot/.vmlinuz-$KERNELRELEASE-rpm /boot/.System.map-$KERNELRELEASE-rpm"
-echo "rm -f /boot/.vmlinuz-$KERNELRELEASE-rpm /boot/.System.map-$KERNELRELEASE-rpm"
-echo "fi"
-echo ""
-echo "%preun"
-echo "if [ -x /sbin/new-kernel-pkg ]; then"
-echo "new-kernel-pkg --remove $KERNELRELEASE --rminitrd --initrdfile=/boot/initramfs-$KERNELRELEASE.img"
-echo "fi"
-echo ""
-echo "%postun"
-echo "if [ -x /sbin/update-bootloader ]; then"
-echo "/sbin/update-bootloader --remove $KERNELRELEASE"
-echo "fi"
-echo ""
-echo "%files"
-echo '%defattr (-, root, root)'
-echo "/lib/modules/$KERNELRELEASE"
-echo "%exclude /lib/modules/$KERNELRELEASE/build"
-echo "%exclude /lib/modules/$KERNELRELEASE/source"
-echo "/boot/*"
-echo ""
-echo "%files headers"
-echo '%defattr (-, root, root)'
-echo "/usr/include"
-if ! $PREBUILT; then
-echo ""
-echo "%files devel"
-echo '%defattr (-, root, root)'
-echo "/usr/src/kernels/$KERNELRELEASE"
-echo "/lib/modules/$KERNELRELEASE/build"
-echo "/lib/modules/$KERNELRELEASE/source"
-fi
+	%preun
+	if [ -x /sbin/new-kernel-pkg ]; then
+	new-kernel-pkg --remove $KERNELRELEASE --rminitrd --initrdfile=/boot/initramfs-$KERNELRELEASE.img
+	fi
+
+	%postun
+	if [ -x /sbin/update-bootloader ]; then
+	/sbin/update-bootloader --remove $KERNELRELEASE
+	fi
+
+	%files
+	%defattr (-, root, root)
+	/lib/modules/$KERNELRELEASE
+	%exclude /lib/modules/$KERNELRELEASE/build
+	%exclude /lib/modules/$KERNELRELEASE/source
+	/boot/*
+
+	%files headers
+	%defattr (-, root, root)
+	/usr/include
+$S
+$S	%files devel
+$S	%defattr (-, root, root)
+$S	/usr/src/kernels/$KERNELRELEASE
+$S	/lib/modules/$KERNELRELEASE/build
+$S	/lib/modules/$KERNELRELEASE/source
+EOF
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/9] kbuild: rpm-pkg: fix build error when CONFIG_MODULES is disabled
  2017-09-30  1:10 [PATCH 1/9] kbuild: rpm-pkg: remove ppc64 specific image handling Masahiro Yamada
                   ` (2 preceding siblings ...)
  2017-09-30  1:10 ` [PATCH 4/9] kbuild: rpm-pkg: refactor mkspec with here doc Masahiro Yamada
@ 2017-09-30  1:10 ` Masahiro Yamada
  2017-09-30  1:10 ` [PATCH 6/9] kbuild: rpm-pkg: replace $RPM_BUILD_ROOT with %{buildroot} Masahiro Yamada
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Masahiro Yamada @ 2017-09-30  1:10 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Masahiro Yamada, Michal Marek, linux-kernel

When CONFIG_MODULES is disabled, make rpm-pkg / binrpm-pkg fails
with the following message:

  The present kernel configuration has modules disabled.
  Type 'make config' and enable loadable module support.
  Then build a kernel with module support enabled.

Do not install modules in the case.  Also, omit the devel package.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 scripts/package/mkspec | 57 ++++++++++++++++++++++++++++----------------------
 1 file changed, 32 insertions(+), 25 deletions(-)

diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index f34e3bf..8a9ab85 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -16,6 +16,12 @@ else
 	S=
 fi
 
+if grep -q CONFIG_MODULES=y .config; then
+	M=
+else
+	M=DEL
+fi
+
 if grep -q CONFIG_DRM=y .config; then
 	PROVIDES=kernel-drm
 fi
@@ -30,6 +36,7 @@ EXCLUDES="$RCS_TAR_IGNORE --exclude=.tmp_versions --exclude=*vmlinux* \
 #
 # Labels:
 #  $S: this line is enabled only when building source package
+#  $M: this line is enabled only when CONFIG_MODULES is enabled
 sed -e '/^DEL/d' -e's/^\t*//' <<EOF
 	Name: kernel
 	Summary: The Linux Kernel
@@ -59,14 +66,14 @@ $S	Source: kernel-$__KERNELRELEASE.tar.gz
 	building most standard programs and are also needed for rebuilding the
 	glibc package.
 
-$S	%package devel
-$S	Summary: Development package for building kernel modules to match the $__KERNELRELEASE kernel
-$S	Group: System Environment/Kernel
-$S	AutoReqProv: no
-$S	%description -n kernel-devel
-$S	This package provides kernel headers and makefiles sufficient to build modules
-$S	against the $__KERNELRELEASE kernel package.
-$S
+$S$M	%package devel
+$S$M	Summary: Development package for building kernel modules to match the $__KERNELRELEASE kernel
+$S$M	Group: System Environment/Kernel
+$S$M	AutoReqProv: no
+$S$M	%description -n kernel-devel
+$S$M	This package provides kernel headers and makefiles sufficient to build modules
+$S$M	against the $__KERNELRELEASE kernel package.
+$S$M
 $S	%prep
 $S	%setup -q
 $S
@@ -82,19 +89,19 @@ $S
 	%else
 	cp \$(make image_name) \$RPM_BUILD_ROOT/boot/vmlinuz-$KERNELRELEASE
 	%endif
-	make %{?_smp_mflags} INSTALL_MOD_PATH=\$RPM_BUILD_ROOT KBUILD_SRC= modules_install
+$M	make %{?_smp_mflags} INSTALL_MOD_PATH=\$RPM_BUILD_ROOT KBUILD_SRC= modules_install
 	make %{?_smp_mflags} INSTALL_HDR_PATH=\$RPM_BUILD_ROOT/usr KBUILD_SRC= headers_install
 	cp System.map \$RPM_BUILD_ROOT/boot/System.map-$KERNELRELEASE
 	cp .config \$RPM_BUILD_ROOT/boot/config-$KERNELRELEASE
 	bzip2 -9 --keep vmlinux
 	mv vmlinux.bz2 \$RPM_BUILD_ROOT/boot/vmlinux-$KERNELRELEASE.bz2
-$S	rm -f \$RPM_BUILD_ROOT/lib/modules/$KERNELRELEASE/build
-$S	rm -f \$RPM_BUILD_ROOT/lib/modules/$KERNELRELEASE/source
-$S	mkdir -p \$RPM_BUILD_ROOT/usr/src/kernels/$KERNELRELEASE
-$S	tar cf - . $EXCLUDES | tar xf - -C \$RPM_BUILD_ROOT/usr/src/kernels/$KERNELRELEASE
-$S	cd \$RPM_BUILD_ROOT/lib/modules/$KERNELRELEASE
-$S	ln -sf /usr/src/kernels/$KERNELRELEASE build
-$S	ln -sf /usr/src/kernels/$KERNELRELEASE source
+$S$M	rm -f \$RPM_BUILD_ROOT/lib/modules/$KERNELRELEASE/build
+$S$M	rm -f \$RPM_BUILD_ROOT/lib/modules/$KERNELRELEASE/source
+$S$M	mkdir -p \$RPM_BUILD_ROOT/usr/src/kernels/$KERNELRELEASE
+$S$M	tar cf - . $EXCLUDES | tar xf - -C \$RPM_BUILD_ROOT/usr/src/kernels/$KERNELRELEASE
+$S$M	cd \$RPM_BUILD_ROOT/lib/modules/$KERNELRELEASE
+$S$M	ln -sf /usr/src/kernels/$KERNELRELEASE build
+$S$M	ln -sf /usr/src/kernels/$KERNELRELEASE source
 
 	%clean
 	rm -rf \$RPM_BUILD_ROOT
@@ -120,18 +127,18 @@ $S	ln -sf /usr/src/kernels/$KERNELRELEASE source
 
 	%files
 	%defattr (-, root, root)
-	/lib/modules/$KERNELRELEASE
-	%exclude /lib/modules/$KERNELRELEASE/build
-	%exclude /lib/modules/$KERNELRELEASE/source
+$M	/lib/modules/$KERNELRELEASE
+$M	%exclude /lib/modules/$KERNELRELEASE/build
+$M	%exclude /lib/modules/$KERNELRELEASE/source
 	/boot/*
 
 	%files headers
 	%defattr (-, root, root)
 	/usr/include
-$S
-$S	%files devel
-$S	%defattr (-, root, root)
-$S	/usr/src/kernels/$KERNELRELEASE
-$S	/lib/modules/$KERNELRELEASE/build
-$S	/lib/modules/$KERNELRELEASE/source
+$S$M
+$S$M	%files devel
+$S$M	%defattr (-, root, root)
+$S$M	/usr/src/kernels/$KERNELRELEASE
+$S$M	/lib/modules/$KERNELRELEASE/build
+$S$M	/lib/modules/$KERNELRELEASE/source
 EOF
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 6/9] kbuild: rpm-pkg: replace $RPM_BUILD_ROOT with %{buildroot}
  2017-09-30  1:10 [PATCH 1/9] kbuild: rpm-pkg: remove ppc64 specific image handling Masahiro Yamada
                   ` (3 preceding siblings ...)
  2017-09-30  1:10 ` [PATCH 5/9] kbuild: rpm-pkg: fix build error when CONFIG_MODULES is disabled Masahiro Yamada
@ 2017-09-30  1:10 ` Masahiro Yamada
  2017-09-30  1:10 ` [PATCH 7/9] kbuild: rpm-pkg: fix jobserver unavailable warning Masahiro Yamada
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Masahiro Yamada @ 2017-09-30  1:10 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Masahiro Yamada, Michal Marek, linux-kernel

$RPM_BUILD_ROOT must be escaped to prevent shell from expanding it
when generating the spec file.

%{build_root} is more readable than \$RPM_BUILD_ROOT.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 scripts/package/mkspec | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 8a9ab85..11e07b5 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -81,30 +81,30 @@ $S	%build
 $S	make %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release}
 $S
 	%install
-	mkdir -p \$RPM_BUILD_ROOT/boot
+	mkdir -p %{buildroot}/boot
 	%ifarch ia64
-	mkdir -p \$RPM_BUILD_ROOT/boot/efi
-	cp \$(make image_name) \$RPM_BUILD_ROOT/boot/efi/vmlinuz-$KERNELRELEASE
-	ln -s efi/vmlinuz-$KERNELRELEASE \$RPM_BUILD_ROOT/boot/
+	mkdir -p %{buildroot}/boot/efi
+	cp \$(make image_name) %{buildroot}/boot/efi/vmlinuz-$KERNELRELEASE
+	ln -s efi/vmlinuz-$KERNELRELEASE %{buildroot}/boot/
 	%else
-	cp \$(make image_name) \$RPM_BUILD_ROOT/boot/vmlinuz-$KERNELRELEASE
+	cp \$(make image_name) %{buildroot}/boot/vmlinuz-$KERNELRELEASE
 	%endif
-$M	make %{?_smp_mflags} INSTALL_MOD_PATH=\$RPM_BUILD_ROOT KBUILD_SRC= modules_install
-	make %{?_smp_mflags} INSTALL_HDR_PATH=\$RPM_BUILD_ROOT/usr KBUILD_SRC= headers_install
-	cp System.map \$RPM_BUILD_ROOT/boot/System.map-$KERNELRELEASE
-	cp .config \$RPM_BUILD_ROOT/boot/config-$KERNELRELEASE
+$M	make %{?_smp_mflags} INSTALL_MOD_PATH=%{buildroot} KBUILD_SRC= modules_install
+	make %{?_smp_mflags} INSTALL_HDR_PATH=%{buildroot}/usr KBUILD_SRC= headers_install
+	cp System.map %{buildroot}/boot/System.map-$KERNELRELEASE
+	cp .config %{buildroot}/boot/config-$KERNELRELEASE
 	bzip2 -9 --keep vmlinux
-	mv vmlinux.bz2 \$RPM_BUILD_ROOT/boot/vmlinux-$KERNELRELEASE.bz2
-$S$M	rm -f \$RPM_BUILD_ROOT/lib/modules/$KERNELRELEASE/build
-$S$M	rm -f \$RPM_BUILD_ROOT/lib/modules/$KERNELRELEASE/source
-$S$M	mkdir -p \$RPM_BUILD_ROOT/usr/src/kernels/$KERNELRELEASE
-$S$M	tar cf - . $EXCLUDES | tar xf - -C \$RPM_BUILD_ROOT/usr/src/kernels/$KERNELRELEASE
-$S$M	cd \$RPM_BUILD_ROOT/lib/modules/$KERNELRELEASE
+	mv vmlinux.bz2 %{buildroot}/boot/vmlinux-$KERNELRELEASE.bz2
+$S$M	rm -f %{buildroot}/lib/modules/$KERNELRELEASE/build
+$S$M	rm -f %{buildroot}/lib/modules/$KERNELRELEASE/source
+$S$M	mkdir -p %{buildroot}/usr/src/kernels/$KERNELRELEASE
+$S$M	tar cf - . $EXCLUDES | tar xf - -C %{buildroot}/usr/src/kernels/$KERNELRELEASE
+$S$M	cd %{buildroot}/lib/modules/$KERNELRELEASE
 $S$M	ln -sf /usr/src/kernels/$KERNELRELEASE build
 $S$M	ln -sf /usr/src/kernels/$KERNELRELEASE source
 
 	%clean
-	rm -rf \$RPM_BUILD_ROOT
+	rm -rf %{buildroot}
 
 	%post
 	if [ -x /sbin/installkernel -a -r /boot/vmlinuz-$KERNELRELEASE -a -r /boot/System.map-$KERNELRELEASE ]; then
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 7/9] kbuild: rpm-pkg: fix jobserver unavailable warning
  2017-09-30  1:10 [PATCH 1/9] kbuild: rpm-pkg: remove ppc64 specific image handling Masahiro Yamada
                   ` (4 preceding siblings ...)
  2017-09-30  1:10 ` [PATCH 6/9] kbuild: rpm-pkg: replace $RPM_BUILD_ROOT with %{buildroot} Masahiro Yamada
@ 2017-09-30  1:10 ` Masahiro Yamada
  2017-09-30  1:10 ` [PATCH 8/9] kbuild: rpm-pkg: keep spec file until make mrproper Masahiro Yamada
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Masahiro Yamada @ 2017-09-30  1:10 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Masahiro Yamada, Michal Marek, linux-kernel

If "make rpm-pkg" or "make binrpm-pkg" is run with -j[jobs] option,
the following warning message is displayed.

  warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.

Follow the suggestion.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 scripts/package/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index 73f9f31..b559671 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -50,7 +50,7 @@ rpm-pkg rpm: FORCE
 	$(MAKE) clean
 	$(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec
 	$(call cmd,src_tar,$(KERNELPATH),kernel.spec)
-	rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz
+	+rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz
 	rm $(KERNELPATH).tar.gz kernel.spec
 
 # binrpm-pkg
@@ -58,7 +58,7 @@ rpm-pkg rpm: FORCE
 binrpm-pkg: FORCE
 	$(MAKE) KBUILD_SRC=
 	$(CONFIG_SHELL) $(MKSPEC) prebuilt > $(objtree)/binkernel.spec
-	rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \
+	+rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \
 		$(UTS_MACHINE) -bb $(objtree)/binkernel.spec
 	rm binkernel.spec
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 8/9] kbuild: rpm-pkg: keep spec file until make mrproper
  2017-09-30  1:10 [PATCH 1/9] kbuild: rpm-pkg: remove ppc64 specific image handling Masahiro Yamada
                   ` (5 preceding siblings ...)
  2017-09-30  1:10 ` [PATCH 7/9] kbuild: rpm-pkg: fix jobserver unavailable warning Masahiro Yamada
@ 2017-09-30  1:10 ` Masahiro Yamada
  2017-09-30  1:10 ` [PATCH 9/9] kbuild: rpm-pkg: do not force -jN in submake Masahiro Yamada
  2017-10-09 16:43 ` [PATCH 1/9] kbuild: rpm-pkg: remove ppc64 specific image handling Masahiro Yamada
  8 siblings, 0 replies; 10+ messages in thread
From: Masahiro Yamada @ 2017-09-30  1:10 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Masahiro Yamada, Matthias Kaehlcke, Behan Webster, Michal Marek,
	Vinícius Tinti, linux-kernel

If build fails during (bin)rpm-pkg, the spec file is not cleaned by
anyone until the next successful build of the package.

We do not have to immediately delete the spec file in case somebody
may want to take a look at it.  Instead, make them ignored by git,
and cleaned up by make mrproper.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 .gitignore               | 5 +++++
 scripts/package/Makefile | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 0c39aa2..4f034b8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,6 +54,11 @@ Module.symvers
 /Module.markers
 
 #
+# RPM spec file (make rpm-pkg)
+#
+/*.spec
+
+#
 # Debian directory (make deb-pkg)
 #
 /debian/
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index b559671..70eea1e 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -51,7 +51,6 @@ rpm-pkg rpm: FORCE
 	$(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec
 	$(call cmd,src_tar,$(KERNELPATH),kernel.spec)
 	+rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz
-	rm $(KERNELPATH).tar.gz kernel.spec
 
 # binrpm-pkg
 # ---------------------------------------------------------------------------
@@ -60,7 +59,8 @@ binrpm-pkg: FORCE
 	$(CONFIG_SHELL) $(MKSPEC) prebuilt > $(objtree)/binkernel.spec
 	+rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \
 		$(UTS_MACHINE) -bb $(objtree)/binkernel.spec
-	rm binkernel.spec
+
+clean-files += $(objtree)/*.spec
 
 # Deb target
 # ---------------------------------------------------------------------------
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 9/9] kbuild: rpm-pkg: do not force -jN in submake
  2017-09-30  1:10 [PATCH 1/9] kbuild: rpm-pkg: remove ppc64 specific image handling Masahiro Yamada
                   ` (6 preceding siblings ...)
  2017-09-30  1:10 ` [PATCH 8/9] kbuild: rpm-pkg: keep spec file until make mrproper Masahiro Yamada
@ 2017-09-30  1:10 ` Masahiro Yamada
  2017-10-09 16:43 ` [PATCH 1/9] kbuild: rpm-pkg: remove ppc64 specific image handling Masahiro Yamada
  8 siblings, 0 replies; 10+ messages in thread
From: Masahiro Yamada @ 2017-09-30  1:10 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Masahiro Yamada, Michal Marek, linux-kernel

The spec file always passes %{?_smp_mflags}, but we have two
problems here.

[1] "make -jN rpm-pkg" emits the following warning message:

    make[2]: warning: -jN forced in submake: disabling jobserver mode.

[2] We can not specify the number of jobs that run in parallel.
    Whether we give -jN or not from the top Makefile, the spec file
    always passes ${?_smp_mflags} to the build commands.

${?_smp_mflags} will be useful when we run rpmbuild by hand.  When we
invoke it from Makefile, -jN is propagated down to submake; it should
not be overridden because we want to respect the number of jobs given
by the user.  Set _smp_mflags to empty string in this case.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 scripts/package/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index 70eea1e..9ed96aef 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -50,7 +50,8 @@ rpm-pkg rpm: FORCE
 	$(MAKE) clean
 	$(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec
 	$(call cmd,src_tar,$(KERNELPATH),kernel.spec)
-	+rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz
+	+rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz \
+	--define='_smp_mflags %{nil}'
 
 # binrpm-pkg
 # ---------------------------------------------------------------------------
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/9] kbuild: rpm-pkg: remove ppc64 specific image handling
  2017-09-30  1:10 [PATCH 1/9] kbuild: rpm-pkg: remove ppc64 specific image handling Masahiro Yamada
                   ` (7 preceding siblings ...)
  2017-09-30  1:10 ` [PATCH 9/9] kbuild: rpm-pkg: do not force -jN in submake Masahiro Yamada
@ 2017-10-09 16:43 ` Masahiro Yamada
  8 siblings, 0 replies; 10+ messages in thread
From: Masahiro Yamada @ 2017-10-09 16:43 UTC (permalink / raw)
  To: Linux Kbuild mailing list
  Cc: Masahiro Yamada, Michal Marek, Linux Kernel Mailing List

2017-09-30 10:10 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> This conditional was added by commit 1a0f3d422bb9 ("kbuild: fix
> make rpm for powerpc").  Its git-log explains the default kernel
> image is zImage, but obviously the current arch/powerpc/Makefile
> does not set KBUILD_IMAGE, so the image file is actually vmlinux.
>
> Moreover, since commit 09549aa1baa9 ("deb-pkg: Remove the KBUILD_IMAGE
> workaround"), all architectures are supposed to set the full path to
> the image in KBUILD_IMAGE.  I see no good reason to differentiate
> ppc64 from others.  Rip off the conditional.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---


The series, applied to linux-kbuild/misc.



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-10-09 16:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-30  1:10 [PATCH 1/9] kbuild: rpm-pkg: remove ppc64 specific image handling Masahiro Yamada
2017-09-30  1:10 ` [PATCH 2/9] kbuild: rpm-pkg: install vmlinux.bz2 unconditionally Masahiro Yamada
2017-09-30  1:10 ` [PATCH 3/9] kbuild: rpm-pkg: clean up mkspec Masahiro Yamada
2017-09-30  1:10 ` [PATCH 4/9] kbuild: rpm-pkg: refactor mkspec with here doc Masahiro Yamada
2017-09-30  1:10 ` [PATCH 5/9] kbuild: rpm-pkg: fix build error when CONFIG_MODULES is disabled Masahiro Yamada
2017-09-30  1:10 ` [PATCH 6/9] kbuild: rpm-pkg: replace $RPM_BUILD_ROOT with %{buildroot} Masahiro Yamada
2017-09-30  1:10 ` [PATCH 7/9] kbuild: rpm-pkg: fix jobserver unavailable warning Masahiro Yamada
2017-09-30  1:10 ` [PATCH 8/9] kbuild: rpm-pkg: keep spec file until make mrproper Masahiro Yamada
2017-09-30  1:10 ` [PATCH 9/9] kbuild: rpm-pkg: do not force -jN in submake Masahiro Yamada
2017-10-09 16:43 ` [PATCH 1/9] kbuild: rpm-pkg: remove ppc64 specific image handling Masahiro Yamada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.