[opensuse-factory] /etc/os-release inconsistency
Hi, Tumbleweed and Leap currently use /etc/os-release inconsistently: TW: NAME=openSUSE VERSION="Tumbleweed" VERSION_ID="20160724" PRETTY_NAME="openSUSE Tumbleweed (20160724) (x86_64)" Leap: NAME="openSUSE Leap" VERSION="42.1" VERSION_ID="42.1" PRETTY_NAME="openSUSE Leap 42.1 (x86_64)" There are of course multiple ways to change that. Here's my proposal: ID="opensuse" NAME="Tumbleweed" VERSION="20160724" VERSION_ID="20160724" PRETTY_NAME="openSUSE Tumbleweed" and ID="opensuse" NAME="Leap" VERSION="42.1" VERSION_ID="42.1" PRETTY_NAME="openSUSE Leap 42.1" According to the specification¹ VERSION and VERSION_ID may even be omitted for rolling distros but IMO it's still useful to find out how old a TW installation is. Any objections? cu Ludwig [1] https://www.freedesktop.org/software/systemd/man/os-release.html -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.com/ SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Tuesday 02 August 2016 13:19:14 Ludwig Nussel wrote:
Hi,
Tumbleweed and Leap currently use /etc/os-release inconsistently:
TW:
NAME=openSUSE VERSION="Tumbleweed" VERSION_ID="20160724" PRETTY_NAME="openSUSE Tumbleweed (20160724) (x86_64)"
Leap:
NAME="openSUSE Leap" VERSION="42.1" VERSION_ID="42.1" PRETTY_NAME="openSUSE Leap 42.1 (x86_64)"
There are of course multiple ways to change that. Here's my proposal:
ID="opensuse" NAME="Tumbleweed" VERSION="20160724" VERSION_ID="20160724" PRETTY_NAME="openSUSE Tumbleweed"
and
ID="opensuse" NAME="Leap" VERSION="42.1" VERSION_ID="42.1" PRETTY_NAME="openSUSE Leap 42.1"
According to the specification¹ VERSION and VERSION_ID may even be omitted for rolling distros but IMO it's still useful to find out how old a TW installation is.
Any objections?
From the spec I understand that ID and NAME should describe the same but ID in lowercase and more "machine readable", and NAME being more descriptive.
My proposal therefore: ID="opensuse" NAME="openSUSE Tumbleweed" VERSION="20160724" VERSION_ID="20160724" PRETTY_NAME="openSUSE Tumbleweed (20160724)" and ID="opensuse" NAME="openSUSE Leap" VERSION="42.1" VERSION_ID="42.1" PRETTY_NAME="openSUSE Leap 42.1" -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Tue, 02 Aug 2016 14:21:48 +0200, Oliver Kurz
On Tuesday 02 August 2016 13:19:14 Ludwig Nussel wrote:
Hi,
Tumbleweed and Leap currently use /etc/os-release inconsistently:
TW:
NAME=openSUSE VERSION="Tumbleweed" VERSION_ID="20160724" PRETTY_NAME="openSUSE Tumbleweed (20160724) (x86_64)"
Leap:
NAME="openSUSE Leap" VERSION="42.1" VERSION_ID="42.1" PRETTY_NAME="openSUSE Leap 42.1 (x86_64)"
There are of course multiple ways to change that. Here's my proposal:
ID="opensuse" NAME="Tumbleweed" VERSION="20160724" VERSION_ID="20160724" PRETTY_NAME="openSUSE Tumbleweed"
and
ID="opensuse" NAME="Leap" VERSION="42.1" VERSION_ID="42.1" PRETTY_NAME="openSUSE Leap 42.1"
According to the specification¹ VERSION and VERSION_ID may even be omitted for rolling distros but IMO it's still useful to find out how old a TW installation is.
Any objections?
From the spec I understand that ID and NAME should describe the same but ID in lowercase and more "machine readable", and NAME being more descriptive.
My proposal therefore:
ID="opensuse" NAME="openSUSE Tumbleweed" VERSION="20160724" VERSION_ID="20160724" PRETTY_NAME="openSUSE Tumbleweed (20160724)"
and
ID="opensuse" NAME="openSUSE Leap" VERSION="42.1" VERSION_ID="42.1" PRETTY_NAME="openSUSE Leap 42.1"
I collect that info for the perl module System::Info Feel free to browse all collected stuff to compare https://github.com/Tux/System-Info/tree/master/t/etc centos-5.10 dsm-4.3 openelec-6.95.3 suse-12.1 centos-6.4 dsm-5.0 oracle-5.9 suse-12.2 centos-6.5 dsm-5.1 oracle-7.0 suse-12.3 centos-6.6 dsm-5.2 rasbian-8 suse-13.1 centos-7.1 dsm-6.0 rhel-4.2 suse-13.2 centos-7.2 fedora-14 rhel-5.7 suse-42.1 debian-jessie-8 fedora-19 rhel-6.2 ubuntu-10.04 debian-jessie-si fedora-20 rhel-6.4 ubuntu-11.04 debian-lenny fedora-23 rhel-6.6 ubuntu-12.04 debian-squeeze mageia-4 scient-6.4 ubuntu-13.04 debian-wheezy-7. netbsd-6.99.24 suse-11.2 ubuntu-13.10 debian-wheezy-7. netbsd-7.99.4 suse-11.3 ubuntu-15.04 dsm-4.2 nixos-16.09 suse-11.4 which reminds me I still have to add TW -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using perl5.00307 .. 5.23 porting perl5 on HP-UX, AIX, and openSUSE http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
Oliver Kurz schrieb:
On Tuesday 02 August 2016 13:19:14 Ludwig Nussel wrote:
Tumbleweed and Leap currently use /etc/os-release inconsistently:
[...] There are of course multiple ways to change that. Here's my proposal:
ID="opensuse" NAME="Tumbleweed" VERSION="20160724" VERSION_ID="20160724" PRETTY_NAME="openSUSE Tumbleweed"
and
ID="opensuse" NAME="Leap" VERSION="42.1" VERSION_ID="42.1" PRETTY_NAME="openSUSE Leap 42.1"
According to the specification¹ VERSION and VERSION_ID may even be omitted for rolling distros but IMO it's still useful to find out how old a TW installation is.
Any objections?
From the spec I understand that ID and NAME should describe the same but ID in lowercase and more "machine readable", and NAME being more descriptive.
My proposal therefore:
ID="opensuse" NAME="openSUSE Tumbleweed" VERSION="20160724" VERSION_ID="20160724" PRETTY_NAME="openSUSE Tumbleweed (20160724)"
and
ID="opensuse" NAME="openSUSE Leap" VERSION="42.1" VERSION_ID="42.1" PRETTY_NAME="openSUSE Leap 42.1"
So mainly a question of having openSUSE in the name or not. Does anyone maintain a package that reads os-release that could give us a hint whether we should put openSUSE there or not? cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.com/ SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Thu, 2016-08-04 at 14:55 +0200, Ludwig Nussel wrote:
So mainly a question of having openSUSE in the name or not. Does anyone maintain a package that reads os-release that could give us a hint whether we should put openSUSE there or not?
I only know of the 'lsb' package directly reading /etc/os-release during build time We worked actually rather hard to no longer use this, as everything that relied on openSUSE-release was a potential candidate for a daily rebuild. Cheers, Dominique
On Thu, Aug 4, 2016 at 3:55 PM, Ludwig Nussel
Oliver Kurz schrieb:
On Tuesday 02 August 2016 13:19:14 Ludwig Nussel wrote:
Tumbleweed and Leap currently use /etc/os-release inconsistently:
[...]
There are of course multiple ways to change that. Here's my proposal:
ID="opensuse" NAME="Tumbleweed" VERSION="20160724" VERSION_ID="20160724" PRETTY_NAME="openSUSE Tumbleweed"
and
ID="opensuse" NAME="Leap" VERSION="42.1" VERSION_ID="42.1" PRETTY_NAME="openSUSE Leap 42.1"
According to the specification¹ VERSION and VERSION_ID may even be omitted for rolling distros but IMO it's still useful to find out how old a TW installation is.
Any objections?
From the spec I understand that ID and NAME should describe the same but ID in lowercase and more "machine readable", and NAME being more descriptive.
My proposal therefore:
ID="opensuse" NAME="openSUSE Tumbleweed" VERSION="20160724" VERSION_ID="20160724" PRETTY_NAME="openSUSE Tumbleweed (20160724)"
and
ID="opensuse" NAME="openSUSE Leap" VERSION="42.1" VERSION_ID="42.1" PRETTY_NAME="openSUSE Leap 42.1"
So mainly a question of having openSUSE in the name or not. Does anyone maintain a package that reads os-release that could give us a hint whether we should put openSUSE there or not?
GRUB is using "$NAME $VERSION" as default for menu titles. I believe there was even bug report regarding this. With your proposal we get "openSUSE Tumebleweed 20160724" which sounds wrong as menu is changed much less frequently than snapshot. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Thu, 04 Aug 2016 15:02:22 +0200, Dominique Leuenberger / DimStar
On Thu, 2016-08-04 at 14:55 +0200, Ludwig Nussel wrote:
So mainly a question of having openSUSE in the name or not. Does anyone maintain a package that reads os-release that could give us a hint whether we should put openSUSE there or not?
I only know of the 'lsb' package directly reading /etc/os-release during build time
We worked actually rather hard to no longer use this, as everything that relied on openSUSE-release was a potential candidate for a daily rebuild.
Cheers, Dominique
System-Info/t/etc > find * -type f | xargs grep '^NAME=' | perl -pe's{^([^/]+)/([^:]+):}{sprintf"%-18s /etc/%-14s ",$1,$2}e' centos-7.1 /etc/os-release NAME="CentOS Linux" centos-7.2 /etc/os-release NAME="CentOS Linux" debian-jessie-8 /etc/os-release NAME="Debian GNU/Linux" debian-jessie-sid /etc/os-release NAME="Debian GNU/Linux" debian-wheezy-7.2 /etc/os-release NAME="Debian GNU/Linux" debian-wheezy-7.8 /etc/os-release NAME="Debian GNU/Linux" fedora-19 /etc/os-release NAME=Fedora fedora-20 /etc/os-release NAME=Fedora fedora-23 /etc/os-release NAME=Fedora mageia-4 /etc/os-release NAME="Mageia" nixos-16.09 /etc/os-release NAME=NixOS openelec-6.95.3 /etc/os-release NAME="OpenELEC" oracle-7.0 /etc/os-release NAME="Oracle Linux Server" rasbian-8 /etc/os-release NAME="Raspbian GNU/Linux" suse-12.1 /etc/os-release NAME=openSUSE suse-12.2 /etc/os-release NAME=openSUSE suse-12.3 /etc/os-release NAME=openSUSE suse-13.1 /etc/os-release NAME=openSUSE suse-13.2 /etc/os-release NAME=openSUSE suse-42.1 /etc/os-release NAME="openSUSE Leap" ubuntu-12.04 /etc/os-release NAME="Ubuntu" ubuntu-13.04 /etc/os-release NAME="Ubuntu" ubuntu-13.10 /etc/os-release NAME="Ubuntu" ubuntu-15.04 /etc/os-release NAME="Ubuntu" -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using perl5.00307 .. 5.23 porting perl5 on HP-UX, AIX, and openSUSE http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
Andrei Borzenkov schrieb:
[...] GRUB is using "$NAME $VERSION" as default for menu titles. I believe there was even bug report regarding this. With your proposal we get "openSUSE Tumebleweed 20160724" which sounds wrong as menu is changed much less frequently than snapshot.
It should use $PRETTY_NAME instead then. We can omit the version from that one. cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.com/ SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Thu, Aug 4, 2016 at 5:06 PM, Ludwig Nussel
Andrei Borzenkov schrieb:
[...] GRUB is using "$NAME $VERSION" as default for menu titles. I believe there was even bug report regarding this. With your proposal we get "openSUSE Tumebleweed 20160724" which sounds wrong as menu is changed much less frequently than snapshot.
It should use $PRETTY_NAME instead then. We can omit the version from that one.
Under some conditions `(on /dev/XXX)` is added. This will give "openSUSE Leap 42.1 (x86_64) (on /dev/sda3)". What problem are you trying to solve? What requires changing current scheme? -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 04.08.16 14:55 Ludwig Nussel wrote:
So mainly a question of having openSUSE in the name or not. Does anyone maintain a package that reads os-release that could give us a hint whether we should put openSUSE there or not?
Please be aware that changes to os-release might confuse tools like ansible, puppet etc. I am not sure how e.g. ansible gathers its ansible_os_family variables. But making this consistent (Leap with TW) and in line with older releases might be worth the hassle. Johannes
participants (6)
-
Andrei Borzenkov
-
Dominique Leuenberger / DimStar
-
H.Merijn Brand
-
Johannes Kastl
-
Ludwig Nussel
-
Oliver Kurz