Make kernel -dirty naming optional
Hi Sam,
Could you consider applying this patch (or indicate me a better way to do it). It can be handy to be able to keep the naming independent of git.
Thanks,
Frederik
scripts/setlocalversion +1 -1
@@ -9,7 +9,7 @@ usage() { cd "${1:-.}" || usage # Check for git and a git repo. -if head=`git rev-parse --verify HEAD 2>/dev/null`; then +if [ -z "${IGNORE_GIT}" ] && head=`git rev-parse --verify HEAD 2>/dev/null`; then # Do we have an untagged version? if git name-rev --tags HEAD | grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then printf '%s%s' -g `echo "$head" | cut -c1-8`
Quoted 3 lines · Frederik Deweerdt
Could you consider applying this patch (or indicate me a better way to do it). It can be handy to be able to keep the naming independent of git.
FWIW, if I enable git name tagging, every kernel I compile is tagged as "dirty", even if I cloned it directly from kernel.org and didn't make any change to the source. That makes the "dirty" tag useless IMHO.
Erik
Signature · 2 lines
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 -- | Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands
Quoted 8 lines · Erik Mouw
Quoted 3 lines · Frederik Deweerdt
Could you consider applying this patch (or indicate me a better way to do it). It can be handy to be able to keep the naming independent of git.
FWIW, if I enable git name tagging, every kernel I compile is tagged as "dirty", even if I cloned it directly from kernel.org and didn't make any change to the source. That makes the "dirty" tag useless IMHO.
make mrproper
make allmodconfig
make prepare
make kernelrelease
2.6.18-ga5fa393b vi MAINTAINERS make prepare make kernelrelease 2.6.18-ga5fa393b-dirty
So it wrks for me.
Can you provice a few more details what steps you do when you see it failing.
Sam
Quoted 9 lines · Sam Ravnborg
Quoted 3 lines · Erik Mouw
FWIW, if I enable git name tagging, every kernel I compile is tagged as "dirty", even if I cloned it directly from kernel.org and didn't make any change to the source. That makes the "dirty" tag useless IMHO.
make mrproper
make allmodconfig
make prepare
make kernelrelease
Quoted 8 lines
2.6.18-ga5fa393b vi MAINTAINERS make prepare make kernelrelease 2.6.18-ga5fa393b-dirtySo it wrks for me.
Can you provice a few more details what steps you do when you see it failing.
make mrproper
cp ../config-2.6 .config
yes no | make oldconfig
fakeroot make targz-pkg
...
Tarball successfully created in /home/erik/git/linux-2.6/linux-2.6.18-g4f5537de-dirty.tar.gz
(I use fakeroot in order to make sure that all files in the tarball are root.root. Otherwise I would have to chown /lib/modules or modprobe would complain.)
Erik
PS: I'm on holiday for a week, so don't expect an immediate reply.
Signature · 3 lines
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 -- | Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands | Data lost? Stay calm and contact Harddisk-recovery.com
Quoted 4 lines · Erik Mouw
make mrproper
cp ../config-2.6 .config
yes no | make oldconfig
fakeroot make targz-pkg
fakeroot makes the working tree files appear to be owned by root.root but does not know git uses the file ownership information recorded in the index and uses it to detect if the working tree is dirty. Because the index says they are owned by you (the one who pulled from the kernel.org and owns the files in the real world not fakeroot world), you get -dirty suffix.
Perhaps "fakeroot -u" would help.
Quoted 7 lines · Junio C Hamano
Quoted 4 lines · Erik Mouw
make mrproper
cp ../config-2.6 .config
yes no | make oldconfig
fakeroot make targz-pkg
Quoted 6 lines
fakeroot makes the working tree files appear to be owned by root.root but does not know git uses the file ownership information recorded in the index and uses it to detect if the working tree is dirty. Because the index says they are owned by you (the one who pulled from the kernel.org and owns the files in the real world not fakeroot world), you get -dirty suffix.
Aha, thanks for the explanation.
Quoted 1 line
Perhaps "fakeroot -u" would help.
Yes, that helps, I just build linux-2.6.18-gd834c165.tar.gz. Thanks!
Erik
Signature · 2 lines
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 -- | Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands
Quoted 5 lines · Frederik Deweerdt
Hi Sam,
Could you consider applying this patch (or indicate me a better way to do it). It can be handy to be able to keep the naming independent of git.
make menuconfig
General setup |
Automatically append version information ...
is used to control if you append such info or not. That should solve it for your case.
Sam