Skip to content

Commit

Permalink
Merge pull request #353 from Yestercafe/master
Browse files Browse the repository at this point in the history
Add support for openSUSE Tumbleweed
  • Loading branch information
stanislav-tkach authored Oct 15, 2023
2 parents 128967d + 01eddb9 commit 8de3030
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
12 changes: 12 additions & 0 deletions os_info/src/linux/file_release.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ static DISTRIBUTIONS: [ReleaseInfo; 6] = [
"ol" => Some(Type::OracleLinux),
"opensuse" => Some(Type::openSUSE),
"opensuse-leap" => Some(Type::openSUSE),
"opensuse-tumbleweed" => Some(Type::openSUSE),
//"rancheros" => RancherOS
//"raspbian" => Raspbian
// note XBian also uses "raspbian"
Expand Down Expand Up @@ -490,6 +491,17 @@ mod tests {
assert_eq!(info.codename, None);
}

#[test]
fn opensuse_tumbleweed_os_release() {
let root = "src/linux/tests/openSUSE_Tumbleweed";

let info = retrieve(&DISTRIBUTIONS, root).unwrap();
assert_eq!(info.os_type(), Type::openSUSE);
assert_eq!(info.version, Version::Semantic(20230816, 0, 0));
assert_eq!(info.edition, None);
assert_eq!(info.codename, None);
}

#[test]
fn oracle_linux_os_release() {
let root = "src/linux/tests/OracleLinux";
Expand Down
13 changes: 13 additions & 0 deletions os_info/src/linux/tests/openSUSE_Tumbleweed/etc/os-release
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
NAME="openSUSE Tumbleweed"
# VERSION="20230816"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20230816"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20230816"
BUG_REPORT_URL="https://bugzilla.opensuse.org"
SUPPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org"
DOCUMENTATION_URL="https://en.opensuse.org/Portal:Tumbleweed"
LOGO="distributor-logo-Tumbleweed"

0 comments on commit 8de3030

Please sign in to comment.