You are not logged in.

#1 2010-08-23 06:10:49

BlackIkeEagle
Package Maintainer (PM)
From: Belgium
Registered: 2008-09-24
Posts: 78

[solved] kernel version when building inside git tree

i keep my pkgbuilds versioned, and moved from svn to git,

since then i have problems with the versioning of the kernel
if i run $(make kernelrelease), now i get 2.6.35-SLK+ in stead of 2.6.35-SLK

so since the move to git i have a 'plus' added

someone some idea how or where to fix it,

i found several locations where the localversion is set, but if i change them manually it doesnt work

Last edited by BlackIkeEagle (2010-08-24 06:02:51)


- Arch64 / Arch32 -- Desktops & Mediacenters & Laptops & home Servers
- MyAUR
- MyArchWiki
- pgp key: 0x796CA067

Offline

#2 2010-08-23 07:00:08

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: [solved] kernel version when building inside git tree

I've got a workaround for it, look at the PKGBUILD for kernel26-ice (kernel26-rt-ice has an older hack but that stopped working on the 2.6.35 series). Basically I modify setlocalversion itself.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2010-08-23 07:02:54

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,222
Website

Re: [solved] kernel version when building inside git tree

Set CONFIG_LOCALVERSION_AUTO to 'no'

Offline

#4 2010-08-23 07:26:49

BlackIkeEagle
Package Maintainer (PM)
From: Belgium
Registered: 2008-09-24
Posts: 78

Re: [solved] kernel version when building inside git tree

@ngonee :: its not exactly what i expected because now the output is:
$ make kernelrelease
2.6.35

@fukawi2 :: tried that before but then you get the 'plus', else you get 2.6.35-SLK-(somehash)


- Arch64 / Arch32 -- Desktops & Mediacenters & Laptops & home Servers
- MyAUR
- MyArchWiki
- pgp key: 0x796CA067

Offline

#5 2010-08-23 07:44:27

BlackIkeEagle
Package Maintainer (PM)
From: Belgium
Registered: 2008-09-24
Posts: 78

Re: [solved] kernel version when building inside git tree

@ngonee :: thanx for pointing out where to look, now i have found a simple solution i think:

echo "" > ${srcdir}/linux-${_basekernel}/.scmversion


- Arch64 / Arch32 -- Desktops & Mediacenters & Laptops & home Servers
- MyAUR
- MyArchWiki
- pgp key: 0x796CA067

Offline

#6 2010-08-23 16:09:00

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: [solved] kernel version when building inside git tree

Just noticed this too, with a 2.6.35.2 build.  I fixed it by setting CONFIG_LOCALVERSION_AUTO=n and passing "LOCALVERSION=" to make.

Offline

#7 2010-08-24 06:10:54

BlackIkeEagle
Package Maintainer (PM)
From: Belgium
Registered: 2008-09-24
Posts: 78

Re: [solved] kernel version when building inside git tree

summary:

thanks to all smile

- solution 1: tested and ok

echo "" > ${srcdir}/linux-${_basekernel}/.scmversion

- solution 2: tested and ok

change CONFIG_LOCALVERSION_AUTO to n ( explicit don't leave it as not set )
and add LOCALVERSION= to make

- solution 3: tried but in my config CONFIG_LOCALVERSION_AUTO was commented ( is not set ) and i didnt get the correct result

was: during test so maybe not the correct way
sed 's/head=$(git rev-parse --verify --short HEAD 2>\/dev\/null)/0/' \
${srcdir}/linux-$pkgver/scripts/setlocalversion \
> ${srcdir}/linux-$pkgver/scripts/setlocalversion

Nicky726 states in the kernel26-ice comments that following should work:
sed -i -e "s/head=\`git rev-parse --verify --short HEAD 2>\/dev\/null\`/0/" \
${srcdir}/linux-${_basekernel}/scripts/setlocalversion

personally i think the .scmversion thingy is the easiest

Last edited by BlackIkeEagle (2010-08-24 06:15:46)


- Arch64 / Arch32 -- Desktops & Mediacenters & Laptops & home Servers
- MyAUR
- MyArchWiki
- pgp key: 0x796CA067

Offline

#8 2010-09-11 10:26:38

archman-cro
Member
From: Croatia
Registered: 2010-04-04
Posts: 943
Website

Re: [solved] kernel version when building inside git tree

I have a similar problem here. This is my PKGBUILD:
http://pastebin.com/PyZXtGuF
Tried adding a "n" to localversion auto in config, but it still does the 2.6.35-zen2-am instead of 2.6.35-am (am being my custom name).
It adds zen2 cause of the patch?

Nvm, guys, solved it by adding this line:

sed -i 's|^EXTRAVERSION = .*$|EXTRAVERSION =|g' Makefile

Now I'm happy, I got a kernel I can maintain when I want, and learn new things! Cheers!

Last edited by archman-cro (2010-09-11 12:03:50)

Offline

Board footer

Powered by FluxBB