File tree Expand file tree Collapse file tree 4 files changed +11
-6
lines changed Expand file tree Collapse file tree 4 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ modules.order
7878# RPM spec file (make rpm-pkg)
7979#
8080/* .spec
81+ /rpmbuild /
8182
8283#
8384# Debian directory (make deb-pkg)
Original file line number Diff line number Diff line change @@ -1605,7 +1605,7 @@ MRPROPER_FILES += include/config include/generated \
16051605 certs/signing_key.pem \
16061606 certs/x509.genkey \
16071607 vmlinux-gdb.py \
1608- *.spec \
1608+ *.spec rpmbuild \
16091609 rust/libmacros.so
16101610
16111611# clean - Delete most, but leave enough to build external modules
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ PHONY += srcrpm-pkg
8989srcrpm-pkg: linux.tar.gz
9090 $(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec
9191 +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE)-linux -bs kernel.spec \
92- --define='_smp_mflags %{nil}' --define='_sourcedir . ' --define='_srcrpmdir .'
92+ --define='_smp_mflags %{nil}' --define='_sourcedir rpmbuild/SOURCES ' --define='_srcrpmdir .'
9393
9494# binrpm-pkg
9595# ---------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -15,15 +15,19 @@ if [ "$1" = prebuilt ]; then
1515 MAKE=" $MAKE -f $srctree /Makefile"
1616else
1717 S=
18+
19+ mkdir -p rpmbuild/SOURCES
20+ cp linux.tar.gz rpmbuild/SOURCES
21+ cp " ${KCONFIG_CONFIG} " rpmbuild/SOURCES/config
1822fi
1923
20- if grep -q CONFIG_MODULES=y . config; then
24+ if grep -q CONFIG_MODULES=y include/ config/auto.conf ; then
2125 M=
2226else
2327 M=DEL
2428fi
2529
26- if grep -q CONFIG_DRM=y . config; then
30+ if grep -q CONFIG_DRM=y include/ config/auto.conf ; then
2731 PROVIDES=kernel-drm
2832fi
2933
@@ -48,7 +52,7 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
4852 Vendor: The Linux Community
4953 URL: https://www.kernel.org
5054$S Source0: linux.tar.gz
51- $S Source1: . config
55+ $S Source1: config
5256 Provides: $PROVIDES
5357$S BuildRequires: bc binutils bison dwarves
5458$S BuildRequires: (elfutils-libelf-devel or libelf-devel) flex
@@ -85,7 +89,7 @@ $S$M against the $__KERNELRELEASE kernel package.
8589$S$M
8690$S %prep
8791$S %setup -q -n linux
88- $S cp %{SOURCE1} .
92+ $S cp %{SOURCE1} .config
8993$S
9094$S %build
9195$S $MAKE %{?_smp_mflags} KERNELRELEASE=$KERNELRELEASE KBUILD_BUILD_VERSION=%{release}
You can’t perform that action at this time.
0 commit comments