summaryrefslogtreecommitdiffstats
path: root/scripts/mkversion
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-09-20 15:01:26 +0200
committerMasahiro Yamada <yamada.masahiro@socionext.com>2017-09-20 17:06:03 +0200
commit25b080bd53f2873785fa049f570ac1b361c11d72 (patch)
tree9787008d10d9cdd076ace1dbbd8f68dcaac50be8 /scripts/mkversion
parentkbuild: deb-pkg: remove firmware package support (diff)
downloadlinux-25b080bd53f2873785fa049f570ac1b361c11d72.tar.xz
linux-25b080bd53f2873785fa049f570ac1b361c11d72.zip
kbuild: rpm-pkg: fix version number handling
The "Release:" field of the spec file is determined based on the .version file. However, the .version file is not copied to the source tar file. So, when we build the kernel from the source package, the UTS_VERSION always indicates #1. This does not match with "rpm -q". The kernel UTS_VERSION and "rpm -q" do not agree for binrpm-pkg, either. Please note the kernel has already been built before the spec file is created. Currently, mkspec invokes mkversion. This script returns an incremented version. So, the "Release:" field of the spec file is greater than the version in the kernel by one. For the source package build (where .version file is missing), we can give KBUILD_BUILD_VERSION=%{release} to the build command. For the binary package build, we can simply read out the .version file because it contains the version number that was used for building the kernel image. We can remove scripts/mkversion because scripts/package/Makefile need not touch the .version file. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/mkversion')
-rw-r--r--scripts/mkversion6
1 files changed, 0 insertions, 6 deletions
diff --git a/scripts/mkversion b/scripts/mkversion
deleted file mode 100644
index c12addc9c7ef..000000000000
--- a/scripts/mkversion
+++ /dev/null
@@ -1,6 +0,0 @@
-if [ ! -f .version ]
-then
- echo 1
-else
- expr 0`cat .version` + 1
-fi