Package: base-files
Version: 6.5
Severity: wishlist

One of the new files in /etc recommended by systemd is /etc/os-release,
which is documented at
<http://www.freedesktop.org/software/systemd/man/os-release.html>
and is intended to replace/supersede /etc/redhat-release,
/etc/debian_version, /etc/SuSE-release and so on. Like /etc/debian_version,
but unlike the /etc/lsb_release requested in #444678, the file itself is
"API" (for faster results - particularly if used during boot for a
"welcome to..." message, as systemd does - you're meant to read it directly,
rather than starting a tool like lsb-release).

It seems like a good idea to have this file regardless of whether we
ship with systemd or not, since it's informative and easy to parse.
It consists of shell assignments, but does not allow other shell syntax.
I've opened https://bugs.freedesktop.org/show_bug.cgi?id=46021 requesting
some clarification on the exact subset of shell syntax that it allows, but
the examples in the man page use double-quoted strings, so those are certainly
allowed.

Here's what I'd suggest for its contents, if I'm reading the docs correctly.
In the versionless testing/unstable (and rolling, if that happens), something
like this:

    PRETTY_NAME="Debian GNU/Linux wheezy/sid"
    NAME="Debian GNU/Linux"
    ID=debian
    ANSI_COLOR="1;31"

and in the wheezy release, something like this:

    PRETTY_NAME="Debian GNU/Linux 7.0 (wheezy)"
    NAME="Debian GNU/Linux"
    VERSION="7.0 (wheezy)"
    ID=debian
    VERSION_ID=7.0
    ANSI_COLOR="1;31"

The documentation of the format specifically says that VERSION and VERSION_ID
are optional, to accommodate rolling releases.

ANSI_COLOR is an optional "branding" colour suitable for substituting into
"\033[${ANSI_COLOR}m" on an ANSI terminal: I'm assuming that bright red
is most appropriate for Debian (0;31 would be dark red).

Those names are obviously Linux-specific: to accomodate GNU/kFreeBSD, either
the contents would have to be different between kernels (Architecture: any?
Generated at install time? Copied from /usr/share at install time? ...), or
the name in this file could just be "Debian" instead of "Debian GNU/Linux".

os-release is extensible, with a request to prefix non-standard keys with the
distro name: we could have DEBIAN_CODENAME=wheezy if desired, for instance.

Regards,
    S

-- System Information:
Debian Release: wheezy/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), 
(500, 'stable'), (101, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages base-files depends on:
ii  gawk [awk]  1:3.1.8+dfsg-0.1
ii  mawk [awk]  1.3.3-16

base-files recommends no packages.

base-files suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to