Bugzilla – Bug 960501
lsb_release returns wrong release number if lsb is installed
Last modified: 2017-08-21 10:00:44 UTC
If the lsb package is installed, the lsb_release command returns wrong release number. lsb is not rebuilt for each snapshot? Steps to reproduce: 1. Install the 'lsb' package 2. Run 'lsb_release -r' Expected results: the actual release number ('Release: 20151229') Actual results: 'Release: 20151124'
(In reply to Antoine Belvire from comment #0) > If the lsb package is installed, the lsb_release command returns wrong > release number. > > lsb is not rebuilt for each snapshot? Of course not, lsb_release does not contain any hardcoded informations, this is all read from a configuration file (/etc/os-release in this case). > Steps to reproduce: > 1. Install the 'lsb' package > 2. Run 'lsb_release -r' > > Expected results: the actual release number ('Release: 20151229') > > Actual results: 'Release: 20151124' So your /etc/os-release has the wrong release number and did not got updated.
> So your /etc/os-release has the wrong release number and did not got updated. Of course not :) The lsb package contains the /etc/lsb-release file: > antoine@antoine-laptop:~> cat /etc/lsb-release > LSB_VERSION="core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64" > DISTRIB_ID="openSUSE" > DISTRIB_RELEASE="20151124" > DISTRIB_CODENAME="Tumbleweed" > DISTRIB_DESCRIPTION="openSUSE Tumbleweed (20151124) (x86_64)" > antoine@antoine-laptop:~> And the /usr/bin/lsb_release script (owned by the lsb-release package) checks this /etc/lsb-release file *before* /etc/os-release: > antoine@antoine-laptop:~> cat /etc/os-release > NAME=openSUSE > VERSION="Tumbleweed" > VERSION_ID="20160116" > PRETTY_NAME="openSUSE Tumbleweed (20160116) (x86_64)" > ID=opensuse > ANSI_COLOR="0;32" > CPE_NAME="cpe:/o:opensuse:opensuse:20160116" > BUG_REPORT_URL="https://bugs.opensuse.org" > HOME_URL="https://www.opensuse.org/" > ID_LIKE="suse" > antoine@antoine-laptop:~> So if you have /etc/lsb-release (lsb package), /etc/os-release is ignored by the /usr/bin/lsb_release (lsb-release package). Clearing needinfo.
What exactly needs to be fixed for this one? 1.5y later this is again the same situation: ➜ ~ cat /etc/lsb-release LSB_VERSION="core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64" DISTRIB_ID="openSUSE Tumbleweed" DISTRIB_RELEASE="20170712" DISTRIB_CODENAME="" DISTRIB_DESCRIPTION="openSUSE Tumbleweed" ➜ ~ cat /etc/os-release NAME="openSUSE Tumbleweed" # VERSION="20170804" ID=opensuse ID_LIKE="suse" VERSION_ID="20170804" PRETTY_NAME="openSUSE Tumbleweed" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:opensuse:tumbleweed:20170804" BUG_REPORT_URL="https://bugs.opensuse.org" HOME_URL="https://www.opensuse.org/" ➜ ~ zypper info lsb-release Information for package lsb-release: ------------------------------------ Repository : openSUSE:Factory Name : lsb-release Version : 2.0-27.1 ... ➜ ~ sudo zypper rm lsb-release Loading repository data... Reading installed packages... Resolving package dependencies... The following application is going to be REMOVED: "GNOME System Monitor" The following 5 packages are going to be REMOVED: gnome-system-monitor gnome-system-monitor-lang lsb lsb-release mumble 5 packages to remove. After the operation, 8.8 MiB will be freed.
For example: - Rebuild lsb package for each snapshot: Such information of lsb are just read from /etc/os-release at compile time… /etc/os-release belongs to openSUSE-release but the "BuildRequires: openSUSE-release" does not trigger the rebuild here. - Do not fill lsb package with information that are in /etc/os-release, let /usr/bin/lsb_release script read them from /etc/os-release at runtime. - Make distribution info (/etc/os-release) take precedence over LSB info (/etc/lsb-release) in /usr/bin/lsb_release script. - What else?
Adding people that contributed to the lsb package and in particular in https://build.opensuse.org/request/show/345047.
the rebuilds in openSUSE:Factory are triggered manually, perhaps it can be made indirect dependency of whatever does the snapshot triggers. cc dimstar. for lsb_release reading it directly.... would be a fix in the lsb package
This works everywhere else except on Tumbleweed, because somebody broke it explicit on and only on Tumbleweed in November 2015 by duplicating the fields from /etc/os-release to /etc/lsb-release. This change is nowhere else. I have this now reverted.
This is an autogenerated message for OBS integration: This bug (960501) was mentioned in https://build.opensuse.org/request/show/517872 Factory / lsb