From fbda68e3d353cb5a239edf98759c623b75d2947a Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Tue, 6 Aug 2024 11:13:29 -0700 Subject: [PATCH 1/4] Allow Amazon Linux 2023 rpm installs Signed-off-by: Derek Nola Co-Authored-By: ahmedali6 <87921765+ahmedali6@users.noreply.github.com> --- install.sh | 3 ++- install.sh.sha256sum | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 502c46196191..3606e7349f69 100755 --- a/install.sh +++ b/install.sh @@ -637,7 +637,8 @@ setup_selinux() { } install_selinux_rpm() { - if [ -r /etc/redhat-release ] || [ -r /etc/centos-release ] || [ -r /etc/oracle-release ] || [ -r /etc/fedora-release ] || [ "${ID_LIKE%%[ ]*}" = "suse" ]; then + if [ -r /etc/redhat-release ] || [ -r /etc/centos-release ] || [ -r /etc/oracle-release ] || + [ -r /etc/fedora-release ] || [ -r /etc/system-release ] || [ "${ID_LIKE%%[ ]*}" = "suse" ]; then repodir=/etc/yum.repos.d if [ -d /etc/zypp/repos.d ]; then repodir=/etc/zypp/repos.d diff --git a/install.sh.sha256sum b/install.sh.sha256sum index a9299f3af2c2..6f6cbfb93a66 100644 --- a/install.sh.sha256sum +++ b/install.sh.sha256sum @@ -1 +1 @@ -e10b36efb5e7e7692f144582d09f5909a91c5b5996965d643dbe13282befcfc1 install.sh +678e37945882e520533561514c3c1348efd298a3695cd9639934dade96d23c74 install.sh From 53d260c8cded681b288a8c297d9408850e1388e3 Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Tue, 6 Aug 2024 11:29:50 -0700 Subject: [PATCH 2/4] Allow fedora iot rpm installs Signed-off-by: Derek Nola Co-Authored-By: Blayne Campbell <5565939+bcambl@users.noreply.github.com> --- install.sh | 7 ++++--- install.sh.sha256sum | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 3606e7349f69..90070fbe7404 100755 --- a/install.sh +++ b/install.sh @@ -579,7 +579,7 @@ setup_selinux() { rpm_site_infix=slemicro package_installer=zypper fi - elif [ "${ID_LIKE:-}" = coreos ] || [ "${VARIANT_ID:-}" = coreos ]; then + elif [ "${ID_LIKE:-}" = coreos ] || [ "${VARIANT_ID:-}" = coreos ] || [ "${VARIANT_ID:-}" = "iot" ]; then rpm_target=coreos rpm_site_infix=coreos package_installer=rpm-ostree @@ -619,7 +619,8 @@ setup_selinux() { install_selinux_rpm ${rpm_site} ${rpm_channel} ${rpm_target} ${rpm_site_infix} policy_error=fatal - if [ "$INSTALL_K3S_SELINUX_WARN" = true ] || [ "${ID_LIKE:-}" = coreos ] || [ "${VARIANT_ID:-}" = coreos ]; then + if [ "$INSTALL_K3S_SELINUX_WARN" = true ] || [ "${ID_LIKE:-}" = coreos ] || + [ "${VARIANT_ID:-}" = coreos ] || [ "${VARIANT_ID:-}" = iot ]; then policy_error=warn fi @@ -628,7 +629,7 @@ 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 ]; then + if [ -x /usr/sbin/transactional-update ] || [ "${ID_LIKE:-}" = coreos ] || [ "${VARIANT_ID:-}" = coreos ] || [ "${VARIANT_ID:-}" = iot ]; 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 6f6cbfb93a66..338c07c051f8 100644 --- a/install.sh.sha256sum +++ b/install.sh.sha256sum @@ -1 +1 @@ -678e37945882e520533561514c3c1348efd298a3695cd9639934dade96d23c74 install.sh +cc3c773e19d62e318370b01a8e1f166ed7368e6c493fe3ef21c9327052cb3422 install.sh From f285d03b396eaf03b165984a95dca1d2172a5363 Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Tue, 6 Aug 2024 12:04:01 -0700 Subject: [PATCH 3/4] Allow kylin V10 rpm installs Signed-off-by: Derek Nola Co-Authored-By: ErikJang <81848652+erikjang@users.noreply.github.com> --- install.sh | 2 +- install.sh.sha256sum | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 90070fbe7404..71fffa4a5078 100755 --- a/install.sh +++ b/install.sh @@ -587,7 +587,7 @@ setup_selinux() { rpm_target=el7 rpm_site_infix=centos/7 package_installer=yum - elif [ "${VERSION_ID%%.*}" = "8" ] || [ "${VERSION_ID%%.*}" -gt "36" ]; then + elif [ "${VERSION_ID%%.*}" = "8" ] || [ "${VERSION_ID%%.*}" = "V10" ] || [ "${VERSION_ID%%.*}" -gt "36" ]; then rpm_target=el8 rpm_site_infix=centos/8 package_installer=yum diff --git a/install.sh.sha256sum b/install.sh.sha256sum index 338c07c051f8..54a49ea65661 100644 --- a/install.sh.sha256sum +++ b/install.sh.sha256sum @@ -1 +1 @@ -cc3c773e19d62e318370b01a8e1f166ed7368e6c493fe3ef21c9327052cb3422 install.sh +c15d672e6c8e4c2ec418da49202340e9d9824f6556a2509dbfc8a36004ca935a install.sh From 37c1fcfec76719b3ac8e49590ea58b8e938af788 Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Tue, 6 Aug 2024 12:22:39 -0700 Subject: [PATCH 4/4] Allow Amazon Linux 2 rpm installs 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 71fffa4a5078..b19f6cad85ee 100755 --- a/install.sh +++ b/install.sh @@ -583,7 +583,7 @@ setup_selinux() { rpm_target=coreos rpm_site_infix=coreos package_installer=rpm-ostree - elif [ "${VERSION_ID%%.*}" = "7" ]; then + elif [ "${VERSION_ID%%.*}" = "7" ] || ( [ "${ID:-}" = amzn ] && [ "${VERSION_ID%%.*}" = "2" ] ); then rpm_target=el7 rpm_site_infix=centos/7 package_installer=yum diff --git a/install.sh.sha256sum b/install.sh.sha256sum index 54a49ea65661..7a767af64c0f 100644 --- a/install.sh.sha256sum +++ b/install.sh.sha256sum @@ -1 +1 @@ -c15d672e6c8e4c2ec418da49202340e9d9824f6556a2509dbfc8a36004ca935a install.sh +10adf00df73b55e10b0e17dbf423f3b2707b8540c90cfa8b07c34f9688c23a30 install.sh