From f5e5104a942ad8037f1df04cb98b88809151ae4c Mon Sep 17 00:00:00 2001 From: Christopher Bock Date: Sat, 28 Dec 2024 05:20:04 +0100 Subject: [PATCH 1/3] Wrong version with 15.6 repository. Remove ssl_verify=no. Consider building a different package for each repository or finally fix /etc/os-release so it could actually be used how it is intended and wouldn't make any problems with OS-Detection from various viewpoints/integrations... https://www.freedesktop.org/software/systemd/man/latest/os-release.html --- common/helpers | 17 ++++++++++++++++- common/repo | 4 ++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/common/helpers b/common/helpers index 67e1707..0681904 100644 --- a/common/helpers +++ b/common/helpers @@ -120,5 +120,20 @@ failonme() distlevel() { - echo "15.5" + ( + if [ -f /etc/os-release ]; then + . /etc/os-release + else + echo "The file /etc/os-release was not found. The distribution cannot be identified." + exit 1 + fi + case $ID in + opensuse*|sles) + echo "$VERSION_ID" + ;; + grommunio-lds|*) + echo "15.6" + ;; + esac + ) } diff --git a/common/repo b/common/repo index fd19446..83e8919 100644 --- a/common/repo +++ b/common/repo @@ -25,7 +25,7 @@ setup_repo() { [grommunio] enabled=1 autorefresh=1 -baseurl=https://${REPO_USER}:${REPO_PASS}@download.grommunio.com/${REPO_PATH}/openSUSE_Leap_$(distlevel)/?ssl_verify=no +baseurl=https://${REPO_USER}:${REPO_PASS}@download.grommunio.com/${REPO_PATH}/openSUSE_Leap_$(distlevel) type=rpm-md EOF else @@ -35,7 +35,7 @@ EOF [grommunio] enabled=1 autorefresh=1 -baseurl=https://download.grommunio.com/${REPO_PATH}/openSUSE_Leap_$(distlevel)/?ssl_verify=no +baseurl=https://download.grommunio.com/${REPO_PATH}/openSUSE_Leap_$(distlevel) type=rpm-md EOF fi From 8e13798947398693576f68f375b56630ceff6b6a Mon Sep 17 00:00:00 2001 From: Christopher Bock Date: Sun, 12 Jan 2025 04:53:49 +0100 Subject: [PATCH 2/3] helpers: hostnamectl workaround --- common/helpers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/helpers b/common/helpers index 0681904..6fa364b 100644 --- a/common/helpers +++ b/common/helpers @@ -132,7 +132,7 @@ distlevel() echo "$VERSION_ID" ;; grommunio-lds|*) - echo "15.6" + hostnamectl |awk '/Operating System:/{print $NF}' ;; esac ) From 6f92878054c8b326d97f32a1614fd3bdad6007a3 Mon Sep 17 00:00:00 2001 From: Christopher Bock Date: Sun, 12 Jan 2025 05:01:57 +0100 Subject: [PATCH 3/3] Revert "helpers: hostnamectl workaround" Ist ja auch kaputt der DRECK! grom-test-1:~ # hostnamectl ... Operating System: grommunio ... This reverts commit 8e13798947398693576f68f375b56630ceff6b6a. --- common/helpers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/helpers b/common/helpers index 6fa364b..0681904 100644 --- a/common/helpers +++ b/common/helpers @@ -132,7 +132,7 @@ distlevel() echo "$VERSION_ID" ;; grommunio-lds|*) - hostnamectl |awk '/Operating System:/{print $NF}' + echo "15.6" ;; esac )