[OpenAFS] Re: sysname for 3.x linux kernel

Russ Allbery rra@stanford.edu
Wed, 14 Mar 2012 15:00:00 -0700


Bj=C3=B6rn Torkelsson <torkel@hpc2n.umu.se> writes:
> Russ Allbery wrote:

>> I suppose I could do that in Debian.  I'd feel more comfortable doing
>> it if any Debian user had ever indicated a desire for an @sys that
>> identified the Debian stable version (which would be the obvious thing
>> to put in there).

>> If I do that for Debian, though, Ubuntu is going to be a mess.

> We have been using:

> afs_arch=3D`dpkg --print-architecture`
> afs_version=3D`lsb_release -s -r | sed -e 's/\.//g' | tr -d "[a-zA-Z]"`
> afs_dist=3D`lsb_release -s -i|tr "[:upper:]" "[:lower:]"`
> afs_sysname=3D"${afs_arch}_${afs_dist}${afs_version}"

> for years, on ubuntu.

This sort of thing works fine when you rebuild for each new version of the
distribution, but that's not how Debian and Ubuntu package builds normally
work.  Everything is built for sid, which doesn't have a version number,
and then migrates from there.  Ubuntu rebuilds when they import into
Ubuntu, but then doesn't rebuild unless something has changed for the
various Ubuntu releases.

So something like that would give you a sysname of amd64_debiantesting for
all Debian packages in all versions of Debian, unless there was a security
update, at which point the sysname would spontaneously change to be
"correct."  This would be surprising.  :)

My inclination would be to, if we do this anywhere, put this into the init
script and set the sysnames dynamically after boot rather than trying to
compile something into the software.  (Although this has race condition
issues.)

--=20
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>