From a96684b79112d4a24f37bb1a194dd438b453f0863020c63d6c6628a8c807709a Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Mon, 27 May 2024 17:31:04 +0000 Subject: [PATCH 1/2] - added wwctl-configure-all-calls-SSH-keys.patch to fix (bsc#1225402) OBS-URL: https://build.opensuse.org/package/show/network:cluster/warewulf4?expand=0&rev=76 --- warewulf4.changes | 6 +++ wwctl-configure-all-calls-SSH-keys.patch | 47 ++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 wwctl-configure-all-calls-SSH-keys.patch diff --git a/warewulf4.changes b/warewulf4.changes index bafda5e..8a8a5f1 100644 --- a/warewulf4.changes +++ b/warewulf4.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon May 27 17:21:53 UTC 2024 - Christian Goll + +- added wwctl-configure-all-calls-SSH-keys.patch to fix + (bsc#1225402) + ------------------------------------------------------------------- Tue May 14 09:01:13 UTC 2024 - Christian Goll diff --git a/wwctl-configure-all-calls-SSH-keys.patch b/wwctl-configure-all-calls-SSH-keys.patch new file mode 100644 index 0000000..4faf16d --- /dev/null +++ b/wwctl-configure-all-calls-SSH-keys.patch @@ -0,0 +1,47 @@ +From 0096e0c37fa1a199f16945b6d99c69761257f27a Mon Sep 17 00:00:00 2001 +From: Christian Goll +Date: Mon, 27 May 2024 19:15:25 +0200 +Subject: [PATCH] wwctl configure --all calls SSH(keys) + +Signed-off-by: Christian Goll +--- + CHANGELOG.md | 1 + + internal/app/wwctl/configure/main.go | 3 ++- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/CHANGELOG.md b/CHANGELOG.md +index 31ed0088..0526f6dd 100644 +--- a/CHANGELOG.md ++++ b/CHANGELOG.md +@@ -34,6 +34,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + `/sys/firmware/devicetree/base/serial-number` + - Replace slice in templates with sprig substr. #1093 + - Block unprivileged requests for arbitrary overlays in secure mode. ++- Create ssh key also when calling `wwctl configure --all` #1250 + + ## v4.5.2, 2024-05-13 + +diff --git a/internal/app/wwctl/configure/main.go b/internal/app/wwctl/configure/main.go +index c663dc71..fad8c4af 100644 +--- a/internal/app/wwctl/configure/main.go ++++ b/internal/app/wwctl/configure/main.go +@@ -4,6 +4,7 @@ import ( + "os" + + "github.com/spf13/cobra" ++ warewulfconf "github.com/warewulf/warewulf/internal/pkg/config" + "github.com/warewulf/warewulf/internal/pkg/configure" + "github.com/warewulf/warewulf/internal/pkg/wwlog" + ) +@@ -23,7 +24,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error { + os.Exit(1) + } + +- err = configure.SSH() ++ err = configure.SSH(warewulfconf.Get().SSH.KeyTypes...) + if err != nil { + wwlog.Error("%s", err) + os.Exit(1) +-- +2.43.0 + From 0be0f338173e395fee9ab3b0f7ab5338cd61bee54f769384db3c39b658217cf3 Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Tue, 28 May 2024 08:44:25 +0000 Subject: [PATCH 2/2] with right specfile OBS-URL: https://build.opensuse.org/package/show/network:cluster/warewulf4?expand=0&rev=77 --- warewulf4.spec | 1 + wwctl-configure-all-calls-SSH-keys.patch | 26 ------------------------ 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/warewulf4.spec b/warewulf4.spec index c6325f4..2226165 100644 --- a/warewulf4.spec +++ b/warewulf4.spec @@ -35,6 +35,7 @@ Source5: warewulf4-rpmlintrc Source10: config-ww4.sh Source11: adjust_overlays.sh Source20: README.dnsmasq +Patch1: wwctl-configure-all-calls-SSH-keys.patch # no firewalld in sle12 %if 0%{?sle_version} >= 150000 || 0%{?suse_version} > 1500 diff --git a/wwctl-configure-all-calls-SSH-keys.patch b/wwctl-configure-all-calls-SSH-keys.patch index 4faf16d..beaa69c 100644 --- a/wwctl-configure-all-calls-SSH-keys.patch +++ b/wwctl-configure-all-calls-SSH-keys.patch @@ -1,26 +1,3 @@ -From 0096e0c37fa1a199f16945b6d99c69761257f27a Mon Sep 17 00:00:00 2001 -From: Christian Goll -Date: Mon, 27 May 2024 19:15:25 +0200 -Subject: [PATCH] wwctl configure --all calls SSH(keys) - -Signed-off-by: Christian Goll ---- - CHANGELOG.md | 1 + - internal/app/wwctl/configure/main.go | 3 ++- - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/CHANGELOG.md b/CHANGELOG.md -index 31ed0088..0526f6dd 100644 ---- a/CHANGELOG.md -+++ b/CHANGELOG.md -@@ -34,6 +34,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - `/sys/firmware/devicetree/base/serial-number` - - Replace slice in templates with sprig substr. #1093 - - Block unprivileged requests for arbitrary overlays in secure mode. -+- Create ssh key also when calling `wwctl configure --all` #1250 - - ## v4.5.2, 2024-05-13 - diff --git a/internal/app/wwctl/configure/main.go b/internal/app/wwctl/configure/main.go index c663dc71..fad8c4af 100644 --- a/internal/app/wwctl/configure/main.go @@ -42,6 +19,3 @@ index c663dc71..fad8c4af 100644 if err != nil { wwlog.Error("%s", err) os.Exit(1) --- -2.43.0 -