You are not logged in.

#1 2010-08-19 16:03:24

Nicky726
Member
From: Czech Republic
Registered: 2008-02-15
Posts: 142
Website

[SOLVED] kernel26-selinux "ugly" release string

I am maintainer of kernel26-selinux in AUR. Recently I noticed that built kernel sais (uname -r) 2.6.35-selinux-gd4918f4-dirty instead just 2.6.35-selinux, which I would expect. I found option CONFIG_LOCALVERSION_AUTO which I think should solve it if set to no, but in that case the release string is actualy 2.6.35-selinux+ (note the plus symbol).

Would someone kindly tell me, what to change, so that uname -r would show just 2.6.35-selinux? Or give some arguments why the other way is better, in case it is?

PS Here is link for up-to-date tarball, as AUR doesn't yet support splitpackages: http://profi.edisk.cz/stahnout-soubor/1 … 1.9KB.html

PPS I am quite new to building kernel stuff, so please speak slowly to me.

Last edited by Nicky726 (2010-08-19 17:49:14)


"Although the masters make the rules
For the wise men and the fools
I got nothing, Ma, to live up to."

Offline

#2 2010-08-19 16:31:38

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

Re: [SOLVED] kernel26-selinux "ugly" release string

Check out kernel26-ice. I've contributed to the PKGBUILD before, and still do. I believe one of the issues I helped deal with was this, just need the appropriate sed somewhere.


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-19 16:58:56

Nicky726
Member
From: Czech Republic
Registered: 2008-02-15
Posts: 142
Website

Re: [SOLVED] kernel26-selinux "ugly" release string

Thank you. I guess I found it, building now.


"Although the masters make the rules
For the wise men and the fools
I got nothing, Ma, to live up to."

Offline

#4 2010-08-19 18:01:50

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] kernel26-selinux "ugly" release string

That sort of suffix is appended when you're building below the root of a git repo. The kernel source itself might not be in a repo, but, for example, you may have a repo in ~/ and you're building out of ~/abs. There's no way I know of to limit the "depth" of a git repo, so moving it is the only solution.

Offline

#5 2010-08-20 11:45:15

Nicky726
Member
From: Czech Republic
Registered: 2008-02-15
Posts: 142
Website

Re: [SOLVED] kernel26-selinux "ugly" release string

So that's it. I have a git repository for every AUR package and when I test-build I do it in it.

Bad thing about the hack is that it leaves just 2.6.35, when in fact I would like it to keep the -selinux.


"Although the masters make the rules
For the wise men and the fools
I got nothing, Ma, to live up to."

Offline

#6 2010-08-23 09:09:49

Nicky726
Member
From: Czech Republic
Registered: 2008-02-15
Posts: 142
Website

Re: [SOLVED] kernel26-selinux "ugly" release string

Well the sed line used in kernel26-ice is in fact wrong.

instead of:

sed 's/head=$(git rev-parse --verify --short HEAD 2>\/dev\/null)/0/' \
${srcdir}/linux-${_basekernel}/scripts/setlocalversion > \
${srcdir}/linux-${_basekernel}/scripts/setlocalversion


there should be:

sed -i 's/head=$(git rev-parse --verify --short HEAD 2>\/dev\/null)/0/' \
${srcdir}/linux-${_basekernel}/scripts/setlocalversion

as the former deletes contents of whole file.

EDIT:

And the contents of the if to be changed by the sed did changed too. So hopefully last modification of the hack is:

sed -i -e "s/head=\`git rev-parse --verify --short HEAD 2>\/dev\/null\`/0/" \
${srcdir}/linux-${_basekernel}/scripts/setlocalversion

Last edited by Nicky726 (2010-08-23 13:30:33)


"Although the masters make the rules
For the wise men and the fools
I got nothing, Ma, to live up to."

Offline

#7 2010-08-23 10:28:22

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

Re: [SOLVED] kernel26-selinux "ugly" release string

EDIT: nvm

Last edited by fukawi2 (2010-08-23 10:29:29)

Offline

#8 2010-08-23 14:33:02

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

Re: [SOLVED] kernel26-selinux "ugly" release string

Nicky726 wrote:

Well the sed line used in kernel26-ice is in fact wrong.

instead of:

sed 's/head=$(git rev-parse --verify --short HEAD 2>\/dev\/null)/0/' \
${srcdir}/linux-${_basekernel}/scripts/setlocalversion > \
${srcdir}/linux-${_basekernel}/scripts/setlocalversion


there should be:

sed -i 's/head=$(git rev-parse --verify --short HEAD 2>\/dev\/null)/0/' \
${srcdir}/linux-${_basekernel}/scripts/setlocalversion

as the former deletes contents of whole file.

EDIT:

And the contents of the if to be changed by the sed did changed too. So hopefully last modification of the hack is:

sed -i -e "s/head=\`git rev-parse --verify --short HEAD 2>\/dev\/null\`/0/" \
${srcdir}/linux-${_basekernel}/scripts/setlocalversion

Yes, if you read the comments I commented that I'd already fixed that, but in git. The maintainer just hasn't gotten around to updating my fix to the AUR PKGBUILD.


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

#9 2010-08-23 20:17:57

Nicky726
Member
From: Czech Republic
Registered: 2008-02-15
Posts: 142
Website

Re: [SOLVED] kernel26-selinux "ugly" release string

Ups... guess I should have read them. Went straight for the PKBUILD and reinventing invented... hope will have more luck next time. Thanx.


"Although the masters make the rules
For the wise men and the fools
I got nothing, Ma, to live up to."

Offline

#10 2010-08-25 12:04:48

fr33ke
Member
Registered: 2010-08-21
Posts: 20

Re: [SOLVED] kernel26-selinux "ugly" release string

If you add

LOCALVERSION=

to the make arguments it won't add that annoying plus.

Last edited by fr33ke (2010-08-25 12:05:19)

Offline

Board footer

Powered by FluxBB