Bug #14847

lsbmajdistrelease.rb gives wrong major for Ubuntu

Added by Klavs Klavsen about 1 year ago. Updated 7 months ago.

Status:RejectedStart date:06/06/2012
Priority:NormalDue date:
Assignee:Klavs Klavsen% Done:

0%

Category:-
Target version:-
Keywords:operatingsystemrelease lsbmajdistrelease lsbdistrelease Affected Facter version:
Branch:

Description

Currently lsbmajdistrelease is set to 12 (on Ubuntu 12.04) – and this becomes a problem, when running on 12.10 – because this is actually a new major release of Ubuntu in the normal understanding of the word major:

My (and wikipedias) definition of major is: In principle, in subsequent releases, the major number is increased when there are significant jumps in functionality, the minor number is incremented when only minor features or significant fixes have been added

For Ubuntu – the lsbmajdistrelease value should be 12.04 (and the minor is the third from 12.04.01 – ie 01, 02 etc.).

History

#1 Updated by Klavs Klavsen about 1 year ago

  • Target version set to 2.7.15

#2 Updated by Kelsey Hightower about 1 year ago

  • Status changed from Unreviewed to Needs More Information
  • Assignee set to Klavs Klavsen

Are you running into this issue when using facter?

#3 Updated by Klavs Klavsen about 1 year ago

This is ofcourse a facter issue – since this fact comes from facter (and rpm also reveals that lsbmajdistrelease.rb belongs to the facter package.

I can’t seem to move the bug to that project- is that possible?

#4 Updated by James Turnbull about 1 year ago

  • Project changed from Puppet to Facter
  • Target version deleted (2.7.15)

#5 Updated by James Turnbull about 1 year ago

Moved.

#6 Updated by Stephan Adig 11 months ago

The information in /etc/lsb-release doesn’t give you the whole release number at all. Only the description reveals e.g. 12.04.1

The same issue is arising with using operatingsystemrelease.rb facter. I added a patch to fix this on github and added a pull request

https://github.com/puppetlabs/facter/pull/278

REgards,

\sh

#7 Updated by Jeff McCune 7 months ago

  • Status changed from Needs More Information to Rejected
  • Keywords set to operatingsystemrelease lsbmajdistrelease lsbdistrelease

Stephan Adig wrote:

The information in /etc/lsb-release doesn’t give you the whole release number at all. Only the description reveals e.g. 12.04.1

The same issue is arising with using operatingsystemrelease.rb facter. I added a patch to fix this on github and added a pull request

https://github.com/puppetlabs/facter/pull/278

In an effort to preserve backwards compatiblity, we can’t change the operatingsystemrelease fact value to be anything except the first two elements of the version string. Using semantic versioning terminology, this is the major and minor number. I’ve added a spec test to ensure operatingsystemrelease meets this expectation.

Regarding what to do about lsbmajdistrelease, again we need to preserve backwards compatibility so I’m going to say this must stay at only the major version (again, using semver terminology). Please use operatingsystemrelease if you want the actual identifier of 10.04, 12.04, 12.10, etc…

Regarding what to do about the patch version… I suggest submitting a pull request that adds a new fact name that provides the exact version you’re looking for.

Unfortunately, we cannot change the current behavior of operatingsystemrelease. Furthermore, lsbdistrelease, and lsbmajdistrelease directly delegate to the lsb_release -r -s, so we treat that command as the source of truth. If the output of lsb_release -r -s changes output, then we’ll honor the new output, but this is not a bug in Facter.

Hope this helps, -Jeff

Also available in: Atom PDF