[Bug 1088306] New: Mess in /etc/os-release files for different openSUSE branches
http://bugzilla.opensuse.org/show_bug.cgi?id=1088306 Bug ID: 1088306 Summary: Mess in /etc/os-release files for different openSUSE branches Classification: openSUSE Product: openSUSE Distribution Version: Leap 42.3 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: mikhail.kasimov@gmail.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Hello! Found some mess in /etc/os-release naming scheme. Cosmetic mess, but, anyway, it's desirable to fix it to have unified /etc/os-release items-style. Not sure of Component section to file this report, in particular, because it is applicable both for Leap and Tumbleweed branches. Feel free to move report, if needed. Deal: ===== The mess is in ID= and ID_LIKE= fields for Leap and Tumbleweed branches. For example on Leap 42.3/15.0/Tumbleweed: ================================ cat /etc/os-release ... ID=opensuse <-- missed double-quotes ID_LIKE="suse" ... ================================ At the same time Tumbleweed Kubic: ================================ ... ID="opensuse-tumbleweed-kubic" <-- why not "opensuse" as it is done for Tumbleweed? ID_LIKE="suse opensuse" <-- why not also "suse" as it is done for Leap/Tumbleweed? ... ================================ Solution to have: ================================ 1. For Leap branch: ID="opensuse-leap" ID_LIKE="suse" 2. For Tumbleweed branch: ID="opensuse-tumbleweed" ID_LIKE="suse" 3. For Tumbleweed-based projects (like it is done for Kubic) ID="opensuse-tumbleweed-%project_name%" ID_LIKE="suse" 4. For Leap-based projects (to be reserved) ID="opensuse-leap-%project_name%" ID_LIKE="suse" ================================ If you take a look on SLES/SLED/CaaSP branches, you'll see, that all of them have clearly defined ID= fields: ID="sles" ID="sled" ID="caasp" respectively. And note, double-quotes for ID= field are present everywhere, except of Leap branch. So, let's have clearly defined mess-free/unified ID= fields for openSUSE branches too. Thanks! -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1088306 http://bugzilla.opensuse.org/show_bug.cgi?id=1088306#c6 --- Comment #6 from Mikhail Kasimov <mikhail.kasimov@gmail.com> --- Keep on thing about this... BTW: "The whole design of os-release means they SHOULD check "if ID=$foo || ID_LIKE~=$foo"" (c) Richard Brown Due to cat /etc/os-release for commercial version of SUSE (SLES, SLED, CaaSP): https://en.opensuse.org/SDB:SUSE_and_openSUSE_Products_Version_Outputs No ID_LIKE= field is present for them, ID= only instead of non-commercial versions. I'm not aware of reasons for that, but, personally, this makes an additional mess. Let's have just simple and nice scheme here, based on principle 'once invented works hundreds of years': 1) To add ID_LIKE= field in /etc/os-release also for commercial version of SUSE (SLES, SLED, CaaSP). This can give possible to make such granulation: 2) For commercial versions of SUSE (SLES, SLED, CaaSP): ID_LIKE="suse" For non-commercial versions of SUSE (Leap, TW, Leap-based projects, TW-base projects): ID_LIKE="opensuse" Advantages: =========== A. This will annihilate the mess we have nowadays: here we have ID_LIKE="suse", there -- "opensuse suse", something elsewhere -- "suse opensuse suse mega-super-duper-something-else". B. Simple and nice way for external developers to parse OS type to install their software. C. With scheme from "Solution to have:" paragraph for ID= fields, we can have: C1. For non-commercial versions: ID="opensuse-leap" | "opensuse-tumbleweed" | "opensuse-leap-%projectname%" | "opensuse-tumbleweed-%projectname%" ID_LIKE="opensuse" C2. For commercial versions: ID="sles" | "sled" | "caasp" | "sles-%projectname%" | "sled-%projectname%" | "caasp-%projectname%" ID_LIKE="suse" I think, it is applicable. As an additional advantage for external developers, this will give possibility to detect SUSE cloud-specific projects immediately and to avoid meaningless attempts to install their software on read-only filesystem partitions. Something like for ID= field parsing: ================================== if [-z "os" = "opensuse-tumbleweed-kubic" -o "os" = "caasp"] then echo "SUSE cloud-specific project is detected. Exit." exit 0 else echo "SUSE OS type is OK to install our software" ... ================================== Something like for ID_LIKE= field parsing: ================================== if [-z "oslike" = "opensuse" -a "os" = "kubic"] then echo "openSUSE cloud-specific project is detected. Exit." exit 0 else echo "SUSE OS type is OK to install our software" ... ================================== Something like for ID_LIKE= field parsing: ================================== if [-z "oslike" = "suse" -a "os" = "caasp"] then echo "SUSE cloud-specific project is detected. Exit." exit 0 else echo "SUSE OS type is OK to install our software" ... ================================== -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1088306 http://bugzilla.opensuse.org/show_bug.cgi?id=1088306#c7 --- Comment #7 from Mikhail Kasimov <mikhail.kasimov@gmail.com> ---
From ML: "We only have few days left to define what is in /etc/os-release for 15 in case it's suboptimal." (c)
So, short summary to discuss and to work out the final decision: Solution to have for ID= field: ================================ ID="opensuse-leap" | "opensuse-tumbleweed" | "opensuse-leap-%projectname%" | "opensuse-tumbleweed-%projectname%" ID="sles" | "sled" | "caasp" | "sles-%projectname%" | "sled-%projectname%" | "caasp-%projectname%" ================================ Solution to have for ID_LIKE= field: ===================================== 2.1. To add ID_LIKE= field into /etc/os-release file for all commercial SUSE products versions: SLES, SLED. CaaSP and so on to be synchronized with non-commercial ones. 2.2. For all non-commercial SUSE products versions to define: ID_LIKE="opensuse" 2.2. For all commercial SUSE products versions to define: ID_LIKE="suse" ===================================== Richard, Ludwig,..., -- any reaction, suggestion, decision? Thanks! -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1088306 http://bugzilla.opensuse.org/show_bug.cgi?id=1088306#c8 Richard Brown <rbrown@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |behlert@suse.com, | |fcrozat@suse.com Flags| |needinfo?(fcrozat@suse.com) | |, | |needinfo?(behlert@suse.com) --- Comment #8 from Richard Brown <rbrown@suse.com> --- (In reply to Mikhail Kasimov from comment #7)
From ML: "We only have few days left to define what is in /etc/os-release for 15 in case it's suboptimal." (c)
So, short summary to discuss and to work out the final decision:
Solution to have for ID= field: ================================
ID="opensuse-leap" | "opensuse-tumbleweed" | "opensuse-leap-%projectname%" | "opensuse-tumbleweed-%projectname%"
ID="sles" | "sled" | "caasp" | "sles-%projectname%" | "sled-%projectname%" | "caasp-%projectname%" ================================
Solution to have for ID_LIKE= field: ===================================== 2.1. To add ID_LIKE= field into /etc/os-release file for all commercial SUSE products versions: SLES, SLED. CaaSP and so on to be synchronized with non-commercial ones.
2.2. For all non-commercial SUSE products versions to define:
ID_LIKE="opensuse"
2.2. For all commercial SUSE products versions to define:
ID_LIKE="suse" =====================================
Richard, Ludwig,..., -- any reaction, suggestion, decision? Thanks!
I think it's unreasonable to expect SUSE to change their use of os-release this late in their development process. Stefan, Frederic, do I mis-read the situation? Ideally this is something we probably should tidy up, as it will dramatically ease a lot of painpoints for tools like Saltstack. Regardless of the situation in SLE*, I give my +1 to the proposed openSUSE changes, though I would prefer ID_LIKE="suse opensuse" because ID_LIKE="suse" would allow us to provide a single global match for "all *SUSE distros" (including SLE*), assuming SLE adopt this approach in this future. However even then we may well need a more restrictive match for "all openSUSE distros" (excluding SLE*), which would be fulfilled by ID_LIKE="opensuse" Given the os-release standard allows multiple values in this field, we might as well use it. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1088306 http://bugzilla.opensuse.org/show_bug.cgi?id=1088306#c9 --- Comment #9 from Mikhail Kasimov <mikhail.kasimov@gmail.com> --- (In reply to Richard Brown from comment #8)
(In reply to Mikhail Kasimov from comment #7)
From ML: "We only have few days left to define what is in /etc/os-release for 15 in case it's suboptimal." (c)
So, short summary to discuss and to work out the final decision:
Solution to have for ID= field: ================================
ID="opensuse-leap" | "opensuse-tumbleweed" | "opensuse-leap-%projectname%" | "opensuse-tumbleweed-%projectname%"
ID="sles" | "sled" | "caasp" | "sles-%projectname%" | "sled-%projectname%" | "caasp-%projectname%" ================================
Solution to have for ID_LIKE= field: ===================================== 2.1. To add ID_LIKE= field into /etc/os-release file for all commercial SUSE products versions: SLES, SLED. CaaSP and so on to be synchronized with non-commercial ones.
2.2. For all non-commercial SUSE products versions to define:
ID_LIKE="opensuse"
2.2. For all commercial SUSE products versions to define:
ID_LIKE="suse" =====================================
Richard, Ludwig,..., -- any reaction, suggestion, decision? Thanks!
I think it's unreasonable to expect SUSE to change their use of os-release this late in their development process.
That sounds sane. Indeed, ML-message bumped me up. :)
Stefan, Frederic, do I mis-read the situation? Ideally this is something we probably should tidy up, as it will dramatically ease a lot of painpoints for tools like Saltstack.
Regardless of the situation in SLE*, I give my +1 to the proposed openSUSE changes, though I would prefer ID_LIKE="suse opensuse"
because ID_LIKE="suse" would allow us to provide a single global match for "all *SUSE distros" (including SLE*), assuming SLE adopt this approach in this future. However even then we may well need a more restrictive match for "all openSUSE distros" (excluding SLE*), which would be fulfilled by ID_LIKE="opensuse"
Given the os-release standard allows multiple values in this field, we might as well use it.
I also was thinking about CPE_NAME= field to parse, but external developers will pay their attention on the most obvious and generic variations, like ID= and ID_LIKE= fields, I suppose. And parsing CPE_NAME= field is extremely lame method, personally, (e.g. cat /etc/os-release | grep '^CPE_NAME=' | awk -F= '{print $2}' | awk -F: '{print $3,$4,$5,$6}' | sed 's/\"//g'), although CPE_NAME= gives much better possibilities to match distro. And it is present both in SLE-based and openSUSE-based distros instead of ID_LIKE= field (see 2.1). -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com