linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
Cc: Riku Voipio <riku.voipio@linaro.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Michal Marek <mmarek@suse.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] kbuild: (bin)rpm-pkg: fix version number handling
Date: Thu, 21 Sep 2017 00:54:41 +0900	[thread overview]
Message-ID: <CAK7LNASAEwjY6bF8Su5+=uSmsGfks-txxxD1z__RXTKULqyknQ@mail.gmail.com> (raw)
In-Reply-To: <1505912486-30251-1-git-send-email-yamada.masahiro@socionext.com>

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

      reply	other threads:[~2017-09-20 15:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-20 13:01 [PATCH v3] kbuild: (bin)rpm-pkg: fix version number handling Masahiro Yamada
2017-09-20 15:54 ` Masahiro Yamada [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK7LNASAEwjY6bF8Su5+=uSmsGfks-txxxD1z__RXTKULqyknQ@mail.gmail.com' \
    --to=yamada.masahiro@socionext.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.com \
    --cc=riku.voipio@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).