SDB:SUSE and openSUSE Products Version Outputs

Jump to: navigation, search

SUSE and openSUSE Product Version Outputs

SUSE and openSUSE Products Version Outputs. This article will be helpful for third-part software developers, who wish to add SUSE and openSUSE distros compatibility into their software.


Preamble

As you, probably, know, software distribution can be provided via binary packages (RPM-based and DEB-based), via source code and via developer's installation scripts (something like install.sh), which make user's life more easy.

But in case of such installation scripts one issue becomes actual -- what to do and how to start to bring openSUSE/SUSE support out-of-the-box?


Deal

Q:

- How to check the SUSE OS version to install software correctly via my installation script?

A:

- Check SUSE OS version via its standard features. For example, by parsing different information fields in /usr/lib/os-release file. And this is the most obvious way. See also SDB:Find_openSUSE_version.

Q:

- But there are huge pile of different SUSE product versions?! Should I install all of them to find out information I need?

A:

- Well... in general way -- yes! But do not worry here: we've prepared the brief summarizing list to make your work easy. :)

Q:

- Can I use lsb-release and/or lsb_release output variations as an alternative?

A:

- You shouldn't any more. The lsb-release package is NOT installed by default in SUSE/openSUSE. You should install it manually with zypper install lsb-release command if you really want to use it.

Also keep in mind, that zypper install lsb-release command won't work for SUSE's cloud-specific projects: openSUSE Tumbleweed Kubic and SUSE CaaSP because of read-only root filesystem partition (/).

In article lsb-release -a/lsb_release -a (-a means all) is given.

For particular lsb-release/lsb_release options see man lsb-release information.

Q:

- Can I use /etc/SuSE-release output as an alternative?

A:

- No, because /etc/SuSE-release is has been removed since the release of openSUSE Leap & SLE 15

openSUSE Leap

cat /usr/lib/os-release

NAME="openSUSE Leap"
VERSION="15.0"
ID="opensuse-leap"
ID_LIKE="suse opensuse"
VERSION_ID="15.0"
PRETTY_NAME="openSUSE Leap 15.0"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:15.0"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"

openSUSE Tumbleweed

cat /usr/lib/os-release

NAME="openSUSE Tumbleweed"
# VERSION="20180530"
ID="opensuse-tumbleweed"
ID_LIKE="suse opensuse"
VERSION_ID="20180530"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20180530"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"

As you can see, VERSION_ID= field matches the date of openSUSE Tumbleweed snapshot.

openSUSE Tumbleweed Kubic

cat /usr/lib/os-release

NAME="openSUSE Tumbleweed Kubic"
# VERSION="20180320"
ID="opensuse-tumbleweed-kubic"
ID_LIKE="suse opensuse"
VERSION_ID="20180320"
PRETTY_NAME="openSUSE Tumbleweed Kubic"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed-kubic:20180320"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org"

As you can see, VERSION_ID= fields mean date of openSUSE Tumbleweed Kubic snapshot.

SUSE Linux Enterprise Server (SLES)

cat /usr/lib/os-release

NAME="SLES"
VERSION="12-SP3"
VERSION_ID="12.3"
PRETTY_NAME="SUSE Linux Enterprise Server 12 SP3"
ID="sles"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:12:sp3"

SUSE Linux Enterprise Desktop (SLED)

cat /usr/lib/os-release

NAME="SLED"
VERSION="12-SP3"
VERSION_ID="12.3"
PRETTY_NAME="SUSE Linux Enterprise Desktop 12 SP3"
ID="sled"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sled:12:sp3"

As you can see, the only difference is substring SLED/sled instead of SLES/sles in NAME= and ID= fields here respectively. All other stuff is the same to SLES output.

SUSE Container as a Service Platform (SUSE CaaSP)

cat /usr/lib/os-release

NAME="CAASP"
VERSION="2.0"
VERSION_ID="2.0"
PRETTY_NAME="SUSE Container as a Service Platform 2.0"
ID="caasp"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:caasp:2.0"

Summary

We hope, this list will help you on your way to add SUSE products support to your software installation scripts. Thank you and have a nice experience of using SUSE!