Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: yann.morin.1998@free.fr, mmayer@broadcom.com, buildroot@buildroot.org
Subject: Re: [Buildroot] [RFC] linux: Make CONFIG_LOCALVERSION_AUTO work with OVERRIDE_SRCDIR
Date: Mon, 18 Jul 2022 15:01:45 +0200	[thread overview]
Message-ID: <20220718150145.4867a519@windsurf> (raw)
In-Reply-To: <20220706210621.284257-1-f.fainelli@gmail.com>

Hello Florian,

On Wed,  6 Jul 2022 14:06:21 -0700
Florian Fainelli <f.fainelli@gmail.com> wrote:

> Linux is able to generate an automic version based upon the git tree
> that is being used which is very useful for making sure that the kernel
> being used is truly the one that we intend to be using.
> 
> When using LINUX_OVERRIDE_SRCDIR however, since we do not rsync the .git
> folder, all of the necessary information for scripts/setlocalversion to
> compute the exact version and git commit id is lost.
> 
> Add a post rsync hook that copies it over in order to allow 'git
> rev-parse' to work and produce an usable version.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Thanks for your patch. What bothers me is that it is a Linux-specific
solution for a problem that isn't Linux-specific. Many other packages
also use Git commands to generate a version string that they embed in
their binaries. So this problem really is global and I'm not sure we
want a Linux-specific fixup for it.

To me the long term solution is to enable out of tree build of
packages. This way, instead of rsync'ing the code, we would directly
build it from its original location. Some initial work was done in this
area, but it's obviously a much larger endeavor than the fixup you are
proposing. A more immediate alternative would be to also rsync the .git
folder instead of excluding it, but do that globally for all packages
that use override-srcdir. The .git directory was explicitly excluded to
reduce the amount of data to rsync.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-07-18 13:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-06 21:06 [Buildroot] [RFC] linux: Make CONFIG_LOCALVERSION_AUTO work with OVERRIDE_SRCDIR Florian Fainelli
2022-07-18 13:01 ` Thomas Petazzoni via buildroot [this message]
2022-07-18 20:21   ` Yann E. MORIN
2022-07-18 23:05     ` Florian Fainelli

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=20220718150145.4867a519@windsurf \
    --to=buildroot@buildroot.org \
    --cc=f.fainelli@gmail.com \
    --cc=mmayer@broadcom.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yann.morin.1998@free.fr \
    /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