Jira (FACT-2759) Linux Mint 20 os version bug

26 views
Skip to first unread message

Nikita (Jira)

unread,
Aug 25, 2020, 7:23:04 AM8/25/20
to puppe...@googlegroups.com
Nikita created an issue
 
Facter / Bug FACT-2759
Linux Mint 20 os version bug
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2020/08/25 4:22 AM
Environment:

facter 3.14.12

Priority: Normal Normal
Reporter: Nikita

facter os
{
  architecture => "amd64",
  distro => {
    codename => "ulyana",
    description => "Linux Mint 20",
    id => "Linuxmint",
    release => {
      full => "bullseye/sid",
      major => "bullseye/sid"
    }
  },
  family => "Debian",
  hardware => "x86_64",
  name => "Debian",
  release => {
    full => "bullseye/sid",
    major => "bullseye/sid"
  },
  selinux => {
    enabled => false
  }
}

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Nikita (Jira)

unread,
Aug 25, 2020, 7:25:03 AM8/25/20
to puppe...@googlegroups.com
Nikita updated an issue
Change By: Nikita
Acceptance Criteria:  
{code:java}

{
  architecture => "amd64",
  distro => {
    codename => "ulyana",
    description => "Linux Mint 20",
    id => "Linuxmint",
    release => {
      full => "20",
      major => "
0 20 "

    }
  },
  family => "Debian",
  hardware => "x86_64",
  name => "Debian",
  release => {
    full => "20",
    major => "
0 20 "

  },
  selinux => {
    enabled => false
  }
}{code}
 

Nikita (Jira)

unread,
Aug 26, 2020, 2:58:04 AM8/26/20
to puppe...@googlegroups.com
Nikita updated an issue
Change By: Nikita
Environment: facter 3.14. 12 13

Nikita (Jira)

unread,
Aug 26, 2020, 2:59:03 AM8/26/20
to puppe...@googlegroups.com
Nikita updated an issue
{code:java}
facter os

{
  architecture => "amd64",
  distro => {
    codename => "ulyana",
    description => "Linux Mint 20",
    id => "Linuxmint",
    release => {
      full => "bullseye/sid",
      major => "bullseye/sid"
    }
  },
  family => "Debian",
  hardware => "x86_64",
  name => "Debian",
  release => {
    full => "bullseye/sid",
    major => "bullseye/sid"
  },
  selinux => {
    enabled => false
  }
}
lsb_release -a
No LSB modules are available.
Distributor ID: Linuxmint
Description: Linux Mint 20
Release: 20
Codename: ulyana
{code}

Mihai Buzgau (Jira)

unread,
Aug 26, 2020, 3:56:03 AM8/26/20
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR - Triage

Mihai Buzgau (Jira)

unread,
Aug 26, 2020, 3:56:03 AM8/26/20
to puppe...@googlegroups.com
Mihai Buzgau commented on Bug FACT-2759
 
Re: Linux Mint 20 os version bug

Hi Nikita 

Linux Mint is a community-supported platform. We don't have the infrastructure to test any changes for this issue, however, community contributions are highly appreciated.

Mihai Buzgau (Jira)

unread,
Aug 26, 2020, 3:57:03 AM8/26/20
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Team: Night's Watch

Nikita (Jira)

unread,
Aug 26, 2020, 4:35:03 AM8/26/20
to puppe...@googlegroups.com
Nikita commented on Bug FACT-2759
 
Re: Linux Mint 20 os version bug

Mihai Buzgau  It works well on Mint 19. Can you describe the way how facter read a version?

I'll compare the difference in the system.

Mihai Buzgau (Jira)

unread,
Sep 2, 2020, 5:48:03 AM9/2/20
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR NW - Triage 2020-09-16

Mihai Buzgau (Jira)

unread,
Sep 2, 2020, 5:48:03 AM9/2/20
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Story Points: 2

Gabriel Nagy (Jira)

unread,
Sep 3, 2020, 9:24:03 AM9/3/20
to puppe...@googlegroups.com
Gabriel Nagy assigned an issue to Gabriel Nagy
Change By: Gabriel Nagy
Assignee: Gabriel Nagy

Gabriel Nagy (Jira)

unread,
Sep 3, 2020, 10:09:04 AM9/3/20
to puppe...@googlegroups.com
Gabriel Nagy commented on Bug FACT-2759
 
Re: Linux Mint 20 os version bug

Hi,

Unfortunately lsb_release behavior changed between Linux Mint 19 and 20.

On Linux Mint 19, lsb_release reads from /usr/lib/os-release, and then overrides that data with what it finds in /etc/lsb_release.
The ID key in this case is LinuxMint (note the capitalization of the letters).

On Linux Mint 20, the lsb_release command does not read from /etc/lsb_release, only from /usr/lib/os-release which has the ID set to linuxmint (lowercase). The script then prettifies the data so that when executing the lsb_release command you get Linuxmint.

In facter, the OS identifier for Linux Mint is LinuxMint, not Linuxmint (relevant code), which causes this check to fail, and os::debian is always returned.

The best way to fix this would be to do a case insensitive comparison of distro_id (which is Linuxmint) and os::linux_mint (which is LinuxMint) in os_linux.cc, so it will work on both older and newer versions.

I'll open a PR for this.

Gabriel Nagy (Jira)

unread,
Sep 3, 2020, 2:32:03 PM9/3/20
to puppe...@googlegroups.com

Luchian Nemes (Jira)

unread,
Oct 14, 2020, 11:18:04 AM10/14/20
to puppe...@googlegroups.com
Luchian Nemes updated an issue
 
Change By: Luchian Nemes
Fix Version/s: FACT 3.14.14

Claire Cadman (Jira)

unread,
Oct 16, 2020, 3:15:03 AM10/16/20
to puppe...@googlegroups.com
Claire Cadman updated an issue
Change By: Claire Cadman
Labels: doc_reviewed
Reply all
Reply to author
Forward
0 new messages