Userland patch level
Alfred Perlstein
bright at mu.org
Sat Oct 5 20:03:42 UTC 2013
On 10/5/13 12:55 PM, Dag-Erling Smørgrav wrote:
> Alfred Perlstein <bright at mu.org> writes:
>> 1) Can we add it as a uname option as well?
> It was intentionally done as a shell script so it can be run from e.g. a
> live CD without having to worry about binary compatibility.
>
>> 2) FreeNAS uses /etc/version as just a file, any point in doing that
>> instead?
> No, /etc belongs to the user, and we can't trust that's it up to date;
> freebsd-update would update it, but make installworld probably wouldn't,
> and expecting the user to run mergemaster or etcupdate adds one more
> point of failure.
>
>> 3) This article has an example of a script that works on many flavors
>> of linux, any way to make it so that it works on FreeBSD as well?
>> http://unix.stackexchange.com/questions/6345/how-can-i-get-distribution-name-and-version-number-in-a-simple-shell-script
> Same reason as above. Plus, I'm pretty sure this does not work;
> /etc/lsb-release on a RHEL 6 desktop looks like this:
>
> LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
>
> which is nothing like what that script expects.
>
> BTW, this grew out of a discussion in the security workgroup at the
> DevSummit (cf. https://wiki.freebsd.org/201309DevSummit/Security) during
> which we touched upon roughly the same points as you raised.
>
> This was initially meant to be little more than "echo X.Y-RELEASE-pZ"
> and to be used only by portaudit / pkg audit / what have you, which is
> why it's hidden away in /libexec, but considering how much it's grown
> from inception to implementation, it might make more sense to put it in
> a more accessible location.
>
> DES
Interesting points to which I can't really poke any holes in.
Having the ability to determine userland is a good bonus.
+1 to this idea and implementation.
-Alfred
--
Alfred Perlstein
More information about the freebsd-arch
mailing list