lkml.org 
[lkml]   [2017]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3] kbuild: (bin)rpm-pkg: fix version number handling
2017-09-20 22:01 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> 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>
> ---
>
> Changes in v3:
> - add ' 2>/dev/null || echo 1' in case .config is missing for rpm-pkg
>
> Changes in v2:
> - Remove bogus comment in mkspec

Applied to linux-kbuild/fixes.


--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2017-09-20 17:55    [W:0.037 / U:0.412 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site