<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/scripts/setlocalversion, branch v5.15.89</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.15.89</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.15.89'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2021-07-18T14:48:14Z</updated>
<entry>
<title>scripts/setlocalversion: fix a bug when LOCALVERSION is empty</title>
<updated>2021-07-18T14:48:14Z</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2021-07-12T19:35:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5df99bec210a2cf89dd91e52f0d0a714bf4cd96a'/>
<id>urn:sha1:5df99bec210a2cf89dd91e52f0d0a714bf4cd96a</id>
<content type='text'>
The commit 042da426f8eb ("scripts/setlocalversion: simplify the short
version part") reduces indentation. Unfortunately, it also changes behavior
in a subtle way - if the user has empty "LOCALVERSION" variable, the plus
sign is appended to the kernel version. It wasn't appended before.

This patch reverts to the old behavior - we append the plus sign only if
the LOCALVERSION variable is not set.

Fixes: 042da426f8eb ("scripts/setlocalversion: simplify the short version part")
Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts/setlocalversion: simplify the short version part</title>
<updated>2021-05-26T19:01:51Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2021-05-23T03:14:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=042da426f8ebde012be9429ff705232af7ad7469'/>
<id>urn:sha1:042da426f8ebde012be9429ff705232af7ad7469</id>
<content type='text'>
Reduce the indentation.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Nico Schottelius &lt;nico-linuxsetlocalversion@schottelius.org&gt;
</content>
</entry>
<entry>
<title>scripts/setlocalversion: factor out 12-chars hash construction</title>
<updated>2021-05-26T19:01:51Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2021-05-23T03:14:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=630ff0faf84eac6448c851961d4865471a792160'/>
<id>urn:sha1:630ff0faf84eac6448c851961d4865471a792160</id>
<content type='text'>
Both of if and else parts append exactly 12 hex chars, but in
different ways.

Factor out the else part because we need to support it without relying
on git-describe. Remove the --abbrev=12 option since we do not use the
hash from git-describe anyway.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Nico Schottelius &lt;nico-linuxsetlocalversion@schottelius.org&gt;
</content>
</entry>
<entry>
<title>scripts/setlocalversion: add more comments to -dirty flag detection</title>
<updated>2021-05-26T19:01:51Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2021-05-23T03:14:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ffaf62a8050b5f7995083ee93526b57d8d79fec4'/>
<id>urn:sha1:ffaf62a8050b5f7995083ee93526b57d8d79fec4</id>
<content type='text'>
This script stumbled on the read-only source tree over again:

 - a2bb90a08cb3 ("kbuild: fix delay in setlocalversion on readonly
   source")

 - cdf2bc632ebc ("scripts/setlocalversion on write-protected source
   tree")

 - 8ef14c2c41d9 ("Revert "scripts/setlocalversion: git: Make -dirty
   check more robust"")

 - ff64dd485730 ("scripts/setlocalversion: Improve -dirty check with
   git-status --no-optional-locks")

Add comments to clarify that this script should never ever try to write
to the source tree.

'git describe --dirty' might look as a simple solution for appending
the -dirty string, but we cannot use it because it creates the
.git/index.lock file.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Nico Schottelius &lt;nico-linuxsetlocalversion@schottelius.org&gt;
</content>
</entry>
<entry>
<title>scripts/setlocalversion: remove workaround for old make-kpkg</title>
<updated>2021-05-26T19:01:51Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2021-05-23T03:14:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a2be76a352f1035a2e5f914a409743d65dc514c5'/>
<id>urn:sha1:a2be76a352f1035a2e5f914a409743d65dc514c5</id>
<content type='text'>
This reverts commit b052ce4c840e ("kbuild: fix false positive -dirty
tag caused by make-kpkg").

If I understand correctly, this problem occurred in very old versions
of make-kpkg. When I tried a newer version, make-kpkg did not touch
scripts/package/Makefile.

Anyway, Debian uses 'make deb-pkg' instead of make-kpkg these days.

Debian handbook [1] mentions it as "the good old days":

 "CULTURE The good old days of kernel-package

  Before the Linux build system gained the ability to build proper
  Debian packages, the recommended way to build such packages was to
  use make-kpkg from the kernel-package package."

[1]: https://debian-handbook.info/browse/stable/sect.kernel-compilation.html

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Nico Schottelius &lt;nico-linuxsetlocalversion@schottelius.org&gt;
</content>
</entry>
<entry>
<title>scripts/setlocalversion: remove mercurial, svn and git-svn supports</title>
<updated>2021-05-26T19:01:51Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2021-05-23T03:14:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2a73cce2dad3b6e0aa705b376bb736358b6b5e8e'/>
<id>urn:sha1:2a73cce2dad3b6e0aa705b376bb736358b6b5e8e</id>
<content type='text'>
The mercurial, svn, git-svn supports were added by the following commits:

 - 3dce174cfcba ("kbuild: support mercurial in setlocalversion")

 - ba3d05fb6369 ("kbuild: add svn revision information to setlocalversion")

 - ff80aa97c9b4 ("setlocalversion: add git-svn support")

They did not explain why they are useful for the kernel source tree.
Let's revert all of them, and see if somebody will complain about it.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Nico Schottelius &lt;nico-linuxsetlocalversion@schottelius.org&gt;
</content>
</entry>
<entry>
<title>kbuild: replace LANG=C with LC_ALL=C</title>
<updated>2021-05-01T15:43:35Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2021-04-30T01:56:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=77a88274dc1a2cf3a775161d9a3242bc798ee680'/>
<id>urn:sha1:77a88274dc1a2cf3a775161d9a3242bc798ee680</id>
<content type='text'>
LANG gives a weak default to each LC_* in case it is not explicitly
defined. LC_ALL, if set, overrides all other LC_* variables.

  LANG  &lt;  LC_CTYPE, LC_COLLATE, LC_MONETARY, LC_NUMERIC, ...  &lt;  LC_ALL

This is why documentation such as [1] suggests to set LC_ALL in build
scripts to get the deterministic result.

LANG=C is not strong enough to override LC_* that may be set by end
users.

[1]: https://reproducible-builds.org/docs/locales/

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Acked-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt; (powerpc)
Reviewed-by: Matthias Maennich &lt;maennich@google.com&gt;
Acked-by: Matthieu Baerts &lt;matthieu.baerts@tessares.net&gt; (mptcp)
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scripts/setlocalversion: make git describe output more reliable</title>
<updated>2020-09-24T17:28:12Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>linux@rasmusvillemoes.dk</email>
</author>
<published>2020-09-17T06:56:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=548b8b5168c90c42e88f70fcf041b4ce0b8e7aa8'/>
<id>urn:sha1:548b8b5168c90c42e88f70fcf041b4ce0b8e7aa8</id>
<content type='text'>
When building for an embedded target using Yocto, we're sometimes
observing that the version string that gets built into vmlinux (and
thus what uname -a reports) differs from the path under /lib/modules/
where modules get installed in the rootfs, but only in the length of
the -gabc123def suffix. Hence modprobe always fails.

The problem is that Yocto has the concept of "sstate" (shared state),
which allows different developers/buildbots/etc. to share build
artifacts, based on a hash of all the metadata that went into building
that artifact - and that metadata includes all dependencies (e.g. the
compiler used etc.). That normally works quite well; usually a clean
build (without using any sstate cache) done by one developer ends up
being binary identical to a build done on another host. However, one
thing that can cause two developers to end up with different builds
[and thus make one's vmlinux package incompatible with the other's
kernel-dev package], which is not captured by the metadata hashing, is
this `git describe`: The output of that can be affected by

(1) git version: before 2.11 git defaulted to a minimum of 7, since
2.11 (git.git commit e6c587) the default is dynamic based on the
number of objects in the repo
(2) hence even if both run the same git version, the output can differ
based on how many remotes are being tracked (or just lots of local
development branches or plain old garbage)
(3) and of course somebody could have a core.abbrev config setting in
~/.gitconfig

So in order to avoid `uname -a` output relying on such random details
of the build environment which are rather hard to ensure are
consistent between developers and buildbots, make sure the abbreviated
sha1 always consists of exactly 12 hex characters. That is consistent
with the current rule for -stable patches, and is almost always enough
to identify the head commit unambigously - in the few cases where it
does not, the v5.4.3-00021- prefix would certainly nail it down.

Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts: setlocalversion: replace backquote to dollar parenthesis</title>
<updated>2019-11-11T11:10:01Z</updated>
<author>
<name>Bhaskar Chowdhury</name>
<email>unixbhaskar@gmail.com</email>
</author>
<published>2019-10-23T01:54:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3c96bdd0ebfaf750a91016433adc7a6ee711a519'/>
<id>urn:sha1:3c96bdd0ebfaf750a91016433adc7a6ee711a519</id>
<content type='text'>
This patch replaces backquote to dollar parenthesis syntax for better
readability.

Signed-off-by: Bhaskar Chowdhury &lt;unixbhaskar@gmail.com&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Acked-by: Nico Schottelius &lt;nico-linuxsetlocalversion@schottelius.org&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>scripts: setlocalversion: fix a bashism</title>
<updated>2019-10-15T14:45:07Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2019-10-05T15:01:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=991b78fbd2231175293bd1d7c0768fb4e4382e14'/>
<id>urn:sha1:991b78fbd2231175293bd1d7c0768fb4e4382e14</id>
<content type='text'>
Fix bashism reported by checkbashisms by using only one '=':

possible bashism in scripts/setlocalversion line 96 (should be 'b = a'):
	if [ "`hg log -r . --template '{latesttagdistance}'`" == "1" ]; then

Fixes: 38b3439d84f4 ("setlocalversion: update mercurial tag parsing")
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Mike Crowe &lt;mcrowe@zipitwireless.com&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
</feed>
