From 614131b7bfc37a6fe66180409cac43e24569f9b7 Mon Sep 17 00:00:00 2001 From: David C <47948262+d-k-bo@users.noreply.github.com> Date: Wed, 17 Apr 2024 03:05:54 +0200 Subject: [PATCH] fix(os): detect Fedora IoT Edition as immutable Fedora variant (#774) Without this change, it is detected as a regular Fedora variant and updating fails because neither `dnf` nor `yum` is found. --- src/steps/os/linux.rs | 2 ++ src/steps/os/os_release/fedoraiot | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 src/steps/os/os_release/fedoraiot diff --git a/src/steps/os/linux.rs b/src/steps/os/linux.rs index 6e8b2bd8..4a814d59 100644 --- a/src/steps/os/linux.rs +++ b/src/steps/os/linux.rs @@ -62,6 +62,7 @@ impl Distribution { || variant.contains(&"Kinoite") || variant.contains(&"Sericea") || variant.contains(&"Onyx") + || variant.contains(&"IoT") { Ok(Distribution::FedoraImmutable) } else { @@ -1142,6 +1143,7 @@ mod tests { test_template(include_str!("os_release/fedorakinoite"), Distribution::FedoraImmutable); test_template(include_str!("os_release/fedoraonyx"), Distribution::FedoraImmutable); test_template(include_str!("os_release/fedorasericea"), Distribution::FedoraImmutable); + test_template(include_str!("os_release/fedoraiot"), Distribution::FedoraImmutable); } #[test] diff --git a/src/steps/os/os_release/fedoraiot b/src/steps/os/os_release/fedoraiot new file mode 100644 index 00000000..12b874b0 --- /dev/null +++ b/src/steps/os/os_release/fedoraiot @@ -0,0 +1,22 @@ +NAME="Fedora Linux" +VERSION="39.20240415.0 (IoT Edition)" +ID=fedora +VERSION_ID=39 +VERSION_CODENAME="" +PLATFORM_ID="platform:f39" +PRETTY_NAME="Fedora Linux 39.20240415.0 (IoT Edition)" +ANSI_COLOR="0;38;2;60;110;180" +LOGO=fedora-logo-icon +CPE_NAME="cpe:/o:fedoraproject:fedora:39" +HOME_URL="https://fedoraproject.org/" +DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f39/system-administrators-guide/" +SUPPORT_URL="https://ask.fedoraproject.org/" +BUG_REPORT_URL="https://bugzilla.redhat.com/" +REDHAT_BUGZILLA_PRODUCT="Fedora" +REDHAT_BUGZILLA_PRODUCT_VERSION=39 +REDHAT_SUPPORT_PRODUCT="Fedora" +REDHAT_SUPPORT_PRODUCT_VERSION=39 +SUPPORT_END=2024-11-12 +VARIANT="IoT Edition" +VARIANT_ID=iot +OSTREE_VERSION='39.20240415.0'