File tree Expand file tree Collapse file tree 4 files changed +8
-27
lines changed Expand file tree Collapse file tree 4 files changed +8
-27
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export KDEB_SOURCENAME
3232TAR_CONTENT := Documentation LICENSES arch block certs crypto drivers fs \
3333 include init io_uring ipc kernel lib mm net rust \
3434 samples scripts security sound tools usr virt \
35- .config .scmversion Makefile \
35+ .config Makefile \
3636 Kbuild Kconfig COPYING $(wildcard localversion*)
3737MKSPEC := $(srctree)/scripts/package/mkspec
3838
@@ -47,10 +47,8 @@ if test "$(objtree)" != "$(srctree)"; then \
4747 echo >&2; \
4848 false; \
4949fi ; \
50- $(srctree)/scripts/setlocalversion --save-scmversion; \
5150tar -I $(KGZIP) -c $(RCS_TAR_IGNORE) -f $(2).tar.gz \
52- --transform 's:^:$(2)/:S' $(TAR_CONTENT) $(3); \
53- rm -f $(objtree)/.scmversion
51+ --transform 's:^:$(2)/:S' $(TAR_CONTENT) $(3)
5452
5553# rpm-pkg
5654# ---------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -33,8 +33,6 @@ EXCLUDES="$RCS_TAR_IGNORE --exclude=*vmlinux* --exclude=*.mod \
3333--exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation \
3434--exclude=.config.old --exclude=.missing-syscalls.d --exclude=*.s"
3535
36- test -n " $LOCALVERSION " && MAKE=" $MAKE LOCALVERSION=$LOCALVERSION "
37-
3836# We can label the here-doc lines for conditional output to the spec file
3937#
4038# Labels:
@@ -90,7 +88,7 @@ $S rm -f scripts/basic/fixdep scripts/kconfig/conf
9088$S rm -f tools/objtool/{fixdep,objtool}
9189$S
9290$S %build
93- $S $MAKE %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release}
91+ $S $MAKE %{?_smp_mflags} KERNELRELEASE= $KERNELRELEASE KBUILD_BUILD_VERSION=%{release}
9492$S
9593 %install
9694 mkdir -p %{buildroot}/boot
10199 %else
102100 cp \$ ($MAKE -s image_name) %{buildroot}/boot/vmlinuz-$KERNELRELEASE
103101 %endif
104- $M $MAKE %{?_smp_mflags} INSTALL_MOD_PATH=%{buildroot} modules_install
105- $MAKE %{?_smp_mflags} INSTALL_HDR_PATH=%{buildroot}/usr headers_install
102+ $M $MAKE %{?_smp_mflags} KERNELRELEASE= $KERNELRELEASE INSTALL_MOD_PATH=%{buildroot} modules_install
103+ $MAKE %{?_smp_mflags} KERNELRELEASE= $KERNELRELEASE INSTALL_HDR_PATH=%{buildroot}/usr headers_install
106104 cp System.map %{buildroot}/boot/System.map-$KERNELRELEASE
107105 cp .config %{buildroot}/boot/config-$KERNELRELEASE
108106$S$M rm -f %{buildroot}/lib/modules/$KERNELRELEASE /build
Original file line number Diff line number Diff line change @@ -31,3 +31,5 @@ rm -f scripts/kconfig/[gmnq]conf-cfg
3131rm -f rust/target.json
3232
3333rm -f scripts/bin2c
34+
35+ rm -f .scmversion
Original file line number Diff line number Diff line change 1111#
1212
1313usage () {
14- echo " Usage: $0 [--save-scmversion] [ srctree]" >&2
14+ echo " Usage: $0 [srctree]" >&2
1515 exit 1
1616}
1717
18- scm_only=false
1918srctree=.
20- if test " $1 " = " --save-scmversion" ; then
21- scm_only=true
22- shift
23- fi
2419if test $# -gt 0; then
2520 srctree=$1
2621 shift
@@ -35,10 +30,6 @@ scm_version()
3530 short=false
3631
3732 cd " $srctree "
38- if test -e .scmversion; then
39- cat .scmversion
40- return
41- fi
4233 if test " $1 " = " --short" ; then
4334 short=true
4435 fi
@@ -103,14 +94,6 @@ collect_files()
10394 echo " $res "
10495}
10596
106- if $scm_only ; then
107- if test ! -e .scmversion; then
108- res=$( scm_version)
109- echo " $res " > .scmversion
110- fi
111- exit
112- fi
113-
11497if ! test -e include/config/auto.conf; then
11598 echo " Error: kernelrelease not valid - run 'make prepare' to update it" >&2
11699 exit 1
You can’t perform that action at this time.
0 commit comments