Bug 5120 - facter does not report correct variable operatingsystem / bug facter num 9929
Summary: facter does not report correct variable operatingsystem / bug facter num 9929
Status: REOPENED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal minor
Target Milestone: ---
Assignee: Shlomi Fish
QA Contact:
URL:
Whiteboard: MGA5TOO
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-26 21:52 CEST by mnaud mnaud
Modified: 2017-07-30 14:13 CEST (History)
4 users (show)

See Also:
Source RPM: facter
CVE:
Status comment:


Attachments

Description mnaud mnaud 2012-03-26 21:52:49 CEST
Description of problem:

facter does not report correctly mageia operatingsystem.

Version-Release number of selected component (if applicable):
mageia 2_b2
facter-1.6.6-1.mga2

How reproducible:

Steps to Reproduce:
1.install facter
2.try 
facter operatingsystem lsbdistid
lsbdistid => Mageia
operatingsystem => Mandriva

lsbdistid is ok
operatingsystem is KO !

a bug was open to puppet labs cf : http://projects.puppetlabs.com/issues/9929

i have recorded this mageia bug to remind that facter rpm package must be update as soon as puppet labs give the correct value (wait for facter 2.x ?)
Comment 1 Marja Van Waes 2012-05-26 13:08:29 CEST
Hi,

This bug was filed against cauldron, but we do not have cauldron at the moment.

Please report whether this bug is still valid for Mageia 2.

Thanks :)

Cheers,
marja

Keywords: (none) => NEEDINFO

roelof Wobben 2013-01-02 19:22:15 CET

Keywords: NEEDINFO => (none)
CC: (none) => r.wobben
Assignee: bugsquad => johnny

Comment 2 roelof Wobben 2013-01-02 19:23:49 CET
Bug is still valid for Mageia 3. 

@johnny : Can you take this bug and take care for the solution.
The bug at puppetlabs is closed a year ago,

Roelof
Comment 3 Johnny A. Solbu 2013-01-02 20:55:21 CET
Interesting. Latest version 1.6.17 came in december, and it still have the error. Meaning it isn't fixed upstream yet.

I'll see if I can patch it for the time beeing.

Status: NEW => ASSIGNED

Johnny A. Solbu 2013-01-02 21:16:39 CET

Whiteboard: (none) => MGA2TOO

Comment 4 Johnny A. Solbu 2013-01-02 21:27:44 CET
Fixed in Cauldron. Preparing an update for mga2.
Comment 5 Johnny A. Solbu 2013-01-02 22:22:30 CET
I have uploaded a patched package for Mageia 2 in core/updates_testing.

Suggested advisory:
========================
When asked about the installed operating system, facter reports Mageia as being Mandriva.
This update fixes this.

========================
Updated noarch packages in core/updates_testing:
facter-1.6.6-1.1.mga2.noarch.rpm

Source RPM:
facter-1.6.6-1.1.mga2.src.rpm

Assignee: johnny => qa-bugs

Johnny A. Solbu 2013-01-02 22:30:59 CET

CC: (none) => johnny

claire robinson 2013-01-02 23:04:44 CET

Version: Cauldron => 2
Source RPM: (none) => facter
Whiteboard: MGA2TOO => (none)

Comment 6 claire robinson 2013-01-02 23:14:51 CET
Thanks Johnny.

Testing complete mga2 32

Before
------
$ facter | grep '^operatingsystem '
operatingsystem => Mandriva


After
-----
$ facter | grep '^operatingsystem '
operatingsystem => Mageia

lsbdist* still reports Mageia however it has thornicroft as lsbdistcodename, AFAIK Mageia doesn't have a codename, maybe we should do! Also it ves architecture as i386 rather than i586, not sure if that's an issue.

Whiteboard: (none) => has_procedure mga2-32-OK

Comment 7 claire robinson 2013-01-03 13:16:25 CET
Testing complete mga2 64

All info displays correctly other than those mentioned in comment 6.

Johnny do you want to look at those now or should we validate and push this one?

Whiteboard: has_procedure mga2-32-OK => has_procedure mga2-32-OK mga2-64-OK

Comment 8 Johnny A. Solbu 2013-01-03 14:29:06 CET
I don't know what to change, and I suspect facter is not to blame. So my opinion is to validate and push it.
Comment 9 Johnny A. Solbu 2013-01-03 14:30:03 CET
Beside, the «lsbdistcodename» issue was not part of the bug. ;-)=
Comment 10 claire robinson 2013-01-03 14:43:40 CET
Have a new bug then :P

Bug 8587 created for lsbdistcodename
Bug 8588 created for architecture

Validating

SRPM and Advisory in comment 5

Could sysadmin please push from core/updates_testing to core/updates

Thanks!

Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 11 Thomas Backlund 2013-01-06 23:07:21 CET
Update pushed:
https://wiki.mageia.org/en/Support/Advisories/MGAA-2013-0001

Status: ASSIGNED => RESOLVED
CC: (none) => tmb
Resolution: (none) => FIXED

Comment 12 Johnny A. Solbu 2017-01-14 01:04:14 CET
And it's back. :-)

===
$ facter operatingsystem lsbdistid
lsbdistid => Mageia
operatingsystem => Mandrake
===

It turns out it is looking at the presense of *.release files in /etc. Just their presense, not the contents. And it seems to pick the first one it finds.

When I moved out of etc the symlinks mandrakelinux-release and mandrake-release, the operatingsystem was reported as Mandriva.
When also moving out mandriva.release, the operatingsystem was reported as Mageia.

Keywords: validated_update => (none)
Status: RESOLVED => REOPENED
Hardware: i586 => All
Version: 2 => Cauldron
Resolution: FIXED => (none)
Assignee: qa-bugs => shlomif
Whiteboard: has_procedure mga2-32-OK mga2-64-OK => MGA5TOO

Comment 13 Johnny A. Solbu 2017-07-30 04:05:05 CEST
And I've found the culprit. The package that triggers this is actually «mageia-release-common».

rpm -ql mageia-release-common |head -5
/etc/mageia-release
/etc/mandrake-release
/etc/mandrakelinux-release
/etc/mandriva-release
/etc/os-release

Meaning, this bug will continue to show up until we stop shipping those old mandrake/mandriva files in the mageia-release package.
Comment 14 Rémi Verschelde 2017-07-30 14:13:27 CEST
It's really facter that should be fixed to resolve symlinks, most distros provide some compat symlinks like that.

Note You need to log in before you can comment on or make changes to this bug.