From bedb25ff1fe3b942d2d8b83d6856c3fecc9ef152 Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Thu, 24 Oct 2024 11:33:39 -0700 Subject: [PATCH 1/3] Capture all fedora atomic variants in install script Signed-off-by: Derek Nola --- install.sh | 6 ++++-- install.sh.sha256sum | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index df20ce4e117a..8e6e034bd1a4 100755 --- a/install.sh +++ b/install.sh @@ -579,7 +579,8 @@ setup_selinux() { rpm_site_infix=slemicro package_installer=zypper fi - elif [ "${ID_LIKE:-}" = coreos ] || [ "${VARIANT_ID:-}" = coreos ] || [ "${VARIANT_ID:-}" = "iot" ]; then + elif [ "${ID_LIKE:-}" = coreos ] || [ "${VARIANT_ID:-}" = coreos ] || [ "${VARIANT_ID:-}" = "iot" ] || \ + { [ "${ID:-}" = "fedora" ] && [ -n "${OSTREE_VERSION:-}" ]; }; then rpm_target=coreos rpm_site_infix=coreos package_installer=rpm-ostree @@ -629,7 +630,8 @@ setup_selinux() { $policy_error "Failed to apply container_runtime_exec_t to ${BIN_DIR}/k3s, ${policy_hint}" fi elif [ ! -f /usr/share/selinux/packages/k3s.pp ]; then - if [ -x /usr/sbin/transactional-update ] || [ "${ID_LIKE:-}" = coreos ] || [ "${VARIANT_ID:-}" = coreos ] || [ "${VARIANT_ID:-}" = iot ]; then + if [ -x /usr/sbin/transactional-update ] || [ "${ID_LIKE:-}" = coreos ] || \ + { [ "${ID:-}" = fedora ] && [ -n "${OSTREE_VERSION:-}" ]; }; then warn "Please reboot your machine to activate the changes and avoid data loss." else $policy_error "Failed to find the k3s-selinux policy, ${policy_hint}" diff --git a/install.sh.sha256sum b/install.sh.sha256sum index a6c5e68b4773..0ca631e5aa35 100644 --- a/install.sh.sha256sum +++ b/install.sh.sha256sum @@ -1 +1 @@ -e0fbc48a74045ae279bde25bf6ac5502b256017d4d648b53750050993d4b71e6 install.sh +389af49719e833ca28405d4b32e8e332f94de08f1d4c738c1cb2a0548b22cd32 install.sh From 6f1078c057955cccd07c8a9e2300366c0ccb7f68 Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Fri, 25 Oct 2024 08:53:47 -0700 Subject: [PATCH 2/3] Cover bluefin and other "fedora-like" OS as well Signed-off-by: Derek Nola --- install.sh | 2 +- install.sh.sha256sum | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 8e6e034bd1a4..e13cc7d819e7 100755 --- a/install.sh +++ b/install.sh @@ -580,7 +580,7 @@ setup_selinux() { package_installer=zypper fi elif [ "${ID_LIKE:-}" = coreos ] || [ "${VARIANT_ID:-}" = coreos ] || [ "${VARIANT_ID:-}" = "iot" ] || \ - { [ "${ID:-}" = "fedora" ] && [ -n "${OSTREE_VERSION:-}" ]; }; then + { { [ "${ID:-}" = fedora ] || [ "${ID_LIKE:-}" = fedora ]; } && [ -n "${OSTREE_VERSION:-}" ]; }; then rpm_target=coreos rpm_site_infix=coreos package_installer=rpm-ostree diff --git a/install.sh.sha256sum b/install.sh.sha256sum index 0ca631e5aa35..a79fc4237611 100644 --- a/install.sh.sha256sum +++ b/install.sh.sha256sum @@ -1 +1 @@ -389af49719e833ca28405d4b32e8e332f94de08f1d4c738c1cb2a0548b22cd32 install.sh +677d447eb2d226578186f02a054e99de10cb49260f67dcef94594187f98d1afb install.sh From 991183e533508364a07ecb7cd03512ad112a683c Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Fri, 25 Oct 2024 09:51:10 -0700 Subject: [PATCH 3/3] Also cover reboot warning Signed-off-by: Derek Nola --- install.sh | 2 +- install.sh.sha256sum | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index e13cc7d819e7..358f7dc7cb62 100755 --- a/install.sh +++ b/install.sh @@ -631,7 +631,7 @@ setup_selinux() { fi elif [ ! -f /usr/share/selinux/packages/k3s.pp ]; then if [ -x /usr/sbin/transactional-update ] || [ "${ID_LIKE:-}" = coreos ] || \ - { [ "${ID:-}" = fedora ] && [ -n "${OSTREE_VERSION:-}" ]; }; then + { { [ "${ID:-}" = fedora ] || [ "${ID_LIKE:-}" = fedora ]; } && [ -n "${OSTREE_VERSION:-}" ]; }; then warn "Please reboot your machine to activate the changes and avoid data loss." else $policy_error "Failed to find the k3s-selinux policy, ${policy_hint}" diff --git a/install.sh.sha256sum b/install.sh.sha256sum index a79fc4237611..92b7f5609c88 100644 --- a/install.sh.sha256sum +++ b/install.sh.sha256sum @@ -1 +1 @@ -677d447eb2d226578186f02a054e99de10cb49260f67dcef94594187f98d1afb install.sh +afacec791f66d92cec11880479c42b9e261912e0d97d3e3a3de21315b6ac49f3 install.sh