Accepting request 1147628 from home:mslacken:pr
- updated to 4.5.0rc1 from upstream with following change: * all overlays reside now under a `rootfs` diretory e.g. the host overlays reside now under /var/lib/warewulf/host/rootfs This has the advantage that the `rootfs` can be under a version control, without the effect that the meta files e.g. `.git` will show up in the rendered overlays - removed patches: * clean-warewulf-conf.patch * dnsmasq-template-move.patch * removed vendor.tar.gz OBS-URL: https://build.opensuse.org/request/show/1147628 OBS-URL: https://build.opensuse.org/package/show/network:cluster/warewulf4?expand=0&rev=59
This commit is contained in:
parent
2f61868847
commit
ea12dd2b2f
@ -1,238 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index e85ac05b..466faf19 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -106,7 +106,8 @@ install: build docs
|
||||
install -d -m 0755 $(DESTDIR)$(SYSTEMDDIR)
|
||||
install -d -m 0755 $(DESTDIR)$(IPXESOURCE)
|
||||
install -d -m 0755 $(DESTDIR)$(DATADIR)/warewulf
|
||||
- test -f $(DESTDIR)$(WWCONFIGDIR)/warewulf.conf || install -m 0644 etc/warewulf.conf $(DESTDIR)$(WWCONFIGDIR)
|
||||
+ # wwctl genconfig to get the compiled in paths to warewulf.conf
|
||||
+ test -f $(DESTDIR)$(WWCONFIGDIR)/warewulf.conf || ./wwctl --warewulfconf etc/warewulf.conf genconfig warewulfconf print> $(DESTDIR)$(WWCONFIGDIR)/warewulf.conf
|
||||
test -f $(DESTDIR)$(WWCONFIGDIR)/nodes.conf || install -m 0644 etc/nodes.conf $(DESTDIR)$(WWCONFIGDIR)
|
||||
test -f $(DESTDIR)$(WWCONFIGDIR)/wwapic.conf || install -m 0644 etc/wwapic.conf $(DESTDIR)$(WWCONFIGDIR)
|
||||
test -f $(DESTDIR)$(WWCONFIGDIR)/wwapid.conf || install -m 0644 etc/wwapid.conf $(DESTDIR)$(WWCONFIGDIR)
|
||||
diff --git a/internal/pkg/config/buildconfig.go.in b/internal/pkg/config/buildconfig.go.in
|
||||
index 125f192f..6f761cc1 100644
|
||||
--- a/internal/pkg/config/buildconfig.go.in
|
||||
+++ b/internal/pkg/config/buildconfig.go.in
|
||||
@@ -5,17 +5,44 @@ var ConfigFile = "@SYSCONFDIR@/warewulf/warewulf.conf"
|
||||
type BuildConfig struct {
|
||||
Bindir string `default:"@BINDIR@"`
|
||||
Sysconfdir string `default:"@SYSCONFDIR@"`
|
||||
- Datadir string `default:"@DATADIR@"`
|
||||
Localstatedir string `default:"@LOCALSTATEDIR@"`
|
||||
Ipxesource string `default:"@IPXESOURCE@"`
|
||||
Srvdir string `default:"@SRVDIR@"`
|
||||
- Tftpdir string `default:"@TFTPDIR@"`
|
||||
Firewallddir string `default:"@FIREWALLDDIR@"`
|
||||
Systemddir string `default:"@SYSTEMDDIR@"`
|
||||
WWOverlaydir string `default:"@WWOVERLAYDIR@"`
|
||||
WWChrootdir string `default:"@WWCHROOTDIR@"`
|
||||
WWProvisiondir string `default:"@WWPROVISIONDIR@"`
|
||||
- Version string `default:"@VERSION@"`
|
||||
- Release string `default:"@RELEASE@"`
|
||||
WWClientdir string `default:"@WWCLIENTDIR@"`
|
||||
+ version string `default:"@VERSION@"`
|
||||
+ release string `default:"@RELEASE@"`
|
||||
+}
|
||||
+
|
||||
+func (conf BuildConfig) Version() string {
|
||||
+ return conf.version
|
||||
+}
|
||||
+
|
||||
+func (conf BuildConfig) Release() string {
|
||||
+ return conf.release
|
||||
+}
|
||||
+
|
||||
+type TFTPConf struct {
|
||||
+ Enabled bool `yaml:"enabled" default:"true"`
|
||||
+ TftpRoot string `yaml:"tftproot" default:"@TFTPDIR@"`
|
||||
+ SystemdName string `yaml:"systemd name" default:"tftp"`
|
||||
+
|
||||
+ IpxeBinaries map[string]string `yaml:"ipxe" default:"{\"00:09\": \"ipxe-snponly-x86_64.efi\",\"00:00\": \"undionly.kpxe\",\"00:0B\": \"arm64-efi/snponly.efi\",\"00:07\": \"ipxe-snponly-x86_64.efi\"}"`
|
||||
+}
|
||||
+
|
||||
+// WarewulfConf adds additional Warewulf-specific configuration to
|
||||
+// BaseConf.
|
||||
+type WarewulfConf struct {
|
||||
+ Port int `yaml:"port" default:"9983"`
|
||||
+ Secure bool `yaml:"secure" default:"true"`
|
||||
+ UpdateInterval int `yaml:"update interval" default:"60"`
|
||||
+ AutobuildOverlays bool `yaml:"autobuild overlays" default:"true"`
|
||||
+ EnableHostOverlay bool `yaml:"host overlay" default:"true"`
|
||||
+ Syslog bool `yaml:"syslog" default:"false"`
|
||||
+ DataStore string `yaml:"datastore" default:"@DATADIR@"`
|
||||
+ GrubBoot bool `yaml:"grubboot" default:"false"`
|
||||
}
|
||||
diff --git a/internal/pkg/config/mounts.go b/internal/pkg/config/mounts.go
|
||||
index daf38c0a..2eb5060b 100644
|
||||
--- a/internal/pkg/config/mounts.go
|
||||
+++ b/internal/pkg/config/mounts.go
|
||||
@@ -3,8 +3,8 @@ package config
|
||||
// A MountEntry represents a bind mount that is applied to a container
|
||||
// during exec and shell.
|
||||
type MountEntry struct {
|
||||
- Source string `yaml:"source" default:"/etc/resolv.conf"`
|
||||
- Dest string `yaml:"dest,omitempty" default:"/etc/resolv.conf"`
|
||||
- ReadOnly bool `yaml:"readonly,omitempty" default:"false"`
|
||||
+ Source string `yaml:"source"`
|
||||
+ Dest string `yaml:"dest,omitempty"`
|
||||
+ ReadOnly bool `yaml:"readonly,omitempty"`
|
||||
Options string `yaml:"options,omitempty"` // ignored at the moment
|
||||
}
|
||||
diff --git a/internal/pkg/config/root_test.go b/internal/pkg/config/root_test.go
|
||||
index f8c9a697..d57d1557 100644
|
||||
--- a/internal/pkg/config/root_test.go
|
||||
+++ b/internal/pkg/config/root_test.go
|
||||
@@ -43,10 +43,9 @@ func TestDefaultRootConf(t *testing.T) {
|
||||
|
||||
assert.NotEmpty(t, conf.Paths.Bindir)
|
||||
assert.NotEmpty(t, conf.Paths.Sysconfdir)
|
||||
- assert.NotEmpty(t, conf.Paths.Datadir)
|
||||
+ assert.NotEmpty(t, conf.Warewulf.DataStore)
|
||||
assert.NotEmpty(t, conf.Paths.Localstatedir)
|
||||
assert.NotEmpty(t, conf.Paths.Srvdir)
|
||||
- assert.NotEmpty(t, conf.Paths.Tftpdir)
|
||||
assert.NotEmpty(t, conf.Paths.Firewallddir)
|
||||
assert.NotEmpty(t, conf.Paths.Systemddir)
|
||||
assert.NotEmpty(t, conf.Paths.WWOverlaydir)
|
||||
diff --git a/internal/pkg/config/tftp.go b/internal/pkg/config/tftp.go
|
||||
deleted file mode 100644
|
||||
index cd5260df..00000000
|
||||
--- a/internal/pkg/config/tftp.go
|
||||
+++ /dev/null
|
||||
@@ -1,11 +0,0 @@
|
||||
-package config
|
||||
-
|
||||
-// TFTPConf represents that configuration for the TFTP service that
|
||||
-// Warewulf will configure.
|
||||
-type TFTPConf struct {
|
||||
- Enabled bool `yaml:"enabled" default:"true"`
|
||||
- TftpRoot string `yaml:"tftproot" default:"/var/lib/tftpboot"`
|
||||
- SystemdName string `yaml:"systemd name" default:"tftp"`
|
||||
-
|
||||
- IpxeBinaries map[string]string `yaml:"ipxe" default:"{\"00:09\": \"ipxe-snponly-x86_64.efi\",\"00:00\": \"undionly.kpxe\",\"00:0B\": \"arm64-efi/snponly.efi\",\"00:07\": \"ipxe-snponly-x86_64.efi\"}"`
|
||||
-}
|
||||
diff --git a/internal/pkg/config/warewulf.go b/internal/pkg/config/warewulf.go
|
||||
deleted file mode 100644
|
||||
index 9a0dc3f4..00000000
|
||||
--- a/internal/pkg/config/warewulf.go
|
||||
+++ /dev/null
|
||||
@@ -1,14 +0,0 @@
|
||||
-package config
|
||||
-
|
||||
-// WarewulfConf adds additional Warewulf-specific configuration to
|
||||
-// BaseConf.
|
||||
-type WarewulfConf struct {
|
||||
- Port int `yaml:"port" default:"9983"`
|
||||
- Secure bool `yaml:"secure" default:"true"`
|
||||
- UpdateInterval int `yaml:"update interval" default:"60"`
|
||||
- AutobuildOverlays bool `yaml:"autobuild overlays" default:"true"`
|
||||
- EnableHostOverlay bool `yaml:"host overlay" default:"true"`
|
||||
- Syslog bool `yaml:"syslog" default:"false"`
|
||||
- DataStore string `yaml:"datastore" default:"/var/lib/warewulf"`
|
||||
- GrubBoot bool `yaml:"grubboot" default:"false"`
|
||||
-}
|
||||
diff --git a/internal/pkg/configure/tftp.go b/internal/pkg/configure/tftp.go
|
||||
index 058ca059..ab71429d 100644
|
||||
--- a/internal/pkg/configure/tftp.go
|
||||
+++ b/internal/pkg/configure/tftp.go
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
func TFTP() error {
|
||||
controller := warewulfconf.Get()
|
||||
- var tftpdir string = path.Join(controller.Paths.Tftpdir, "warewulf")
|
||||
+ var tftpdir string = path.Join(controller.TFTP.TftpRoot, "warewulf")
|
||||
|
||||
err := os.MkdirAll(tftpdir, 0755)
|
||||
if err != nil {
|
||||
diff --git a/internal/pkg/node/constructors.go b/internal/pkg/node/constructors.go
|
||||
index 857f93cf..1ddf9274 100644
|
||||
--- a/internal/pkg/node/constructors.go
|
||||
+++ b/internal/pkg/node/constructors.go
|
||||
@@ -49,7 +49,7 @@ func New() (NodeYaml, error) {
|
||||
ConfigFile = path.Join(conf.Paths.Sysconfdir, "warewulf/nodes.conf")
|
||||
}
|
||||
if DefaultConfig == "" {
|
||||
- DefaultConfig = path.Join(conf.Paths.Datadir, "warewulf/defaults.conf")
|
||||
+ DefaultConfig = path.Join(conf.Warewulf.DataStore, "warewulf/defaults.conf")
|
||||
}
|
||||
wwlog.Verbose("Opening node configuration file: %s", ConfigFile)
|
||||
data, err := os.ReadFile(ConfigFile)
|
||||
diff --git a/internal/pkg/testenv/testenv.go b/internal/pkg/testenv/testenv.go
|
||||
index 7303d326..6ddbeeca 100644
|
||||
--- a/internal/pkg/testenv/testenv.go
|
||||
+++ b/internal/pkg/testenv/testenv.go
|
||||
@@ -68,10 +68,10 @@ func New(t *testing.T) (env *TestEnv) {
|
||||
|
||||
conf.Paths.Sysconfdir = env.GetPath(Sysconfdir)
|
||||
conf.Paths.Bindir = env.GetPath(Bindir)
|
||||
- conf.Paths.Datadir = env.GetPath(Datadir)
|
||||
+ conf.Warewulf.DataStore = env.GetPath(Datadir)
|
||||
conf.Paths.Localstatedir = env.GetPath(Localstatedir)
|
||||
conf.Paths.Srvdir = env.GetPath(Srvdir)
|
||||
- conf.Paths.Tftpdir = env.GetPath(Tftpdir)
|
||||
+ conf.TFTP.TftpRoot = env.GetPath(Tftpdir)
|
||||
conf.Paths.Firewallddir = env.GetPath(Firewallddir)
|
||||
conf.Paths.Systemddir = env.GetPath(Systemddir)
|
||||
conf.Paths.WWOverlaydir = env.GetPath(WWOverlaydir)
|
||||
@@ -82,10 +82,10 @@ func New(t *testing.T) (env *TestEnv) {
|
||||
for _, confPath := range []string{
|
||||
conf.Paths.Sysconfdir,
|
||||
conf.Paths.Bindir,
|
||||
- conf.Paths.Datadir,
|
||||
+ conf.Warewulf.DataStore,
|
||||
conf.Paths.Localstatedir,
|
||||
conf.Paths.Srvdir,
|
||||
- conf.Paths.Tftpdir,
|
||||
+ conf.TFTP.TftpRoot,
|
||||
conf.Paths.Firewallddir,
|
||||
conf.Paths.Systemddir,
|
||||
conf.Paths.WWOverlaydir,
|
||||
diff --git a/internal/pkg/version/version.go b/internal/pkg/version/version.go
|
||||
index d4b5fb85..6231e4fc 100644
|
||||
--- a/internal/pkg/version/version.go
|
||||
+++ b/internal/pkg/version/version.go
|
||||
@@ -12,7 +12,7 @@ Return the version of wwctl
|
||||
*/
|
||||
func GetVersion() string {
|
||||
conf := warewulfconf.Get()
|
||||
- return fmt.Sprintf("%s-%s", conf.Paths.Version, conf.Paths.Release)
|
||||
+ return fmt.Sprintf("%s-%s", conf.Paths.Version(), conf.Paths.Release())
|
||||
}
|
||||
|
||||
/*
|
||||
diff --git a/internal/pkg/warewulfd/copyshim.go b/internal/pkg/warewulfd/copyshim.go
|
||||
index 44ea45f4..0b295175 100644
|
||||
--- a/internal/pkg/warewulfd/copyshim.go
|
||||
+++ b/internal/pkg/warewulfd/copyshim.go
|
||||
@@ -24,22 +24,22 @@ func CopyShimGrub() (err error) {
|
||||
if shimPath == "" {
|
||||
return fmt.Errorf("no shim found on the host os")
|
||||
}
|
||||
- err = util.CopyFile(shimPath, path.Join(conf.Paths.Tftpdir, "warewulf", "shim.efi"))
|
||||
+ err = util.CopyFile(shimPath, path.Join(conf.TFTP.TftpRoot, "warewulf", "shim.efi"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
- _ = os.Chmod(path.Join(conf.Paths.Tftpdir, "warewulf", "shim.efi"), 0o755)
|
||||
+ _ = os.Chmod(path.Join(conf.TFTP.TftpRoot, "warewulf", "shim.efi"), 0o755)
|
||||
grubPath := container.GrubFind("")
|
||||
if grubPath == "" {
|
||||
return fmt.Errorf("no grub found on host os")
|
||||
}
|
||||
- err = util.CopyFile(grubPath, path.Join(conf.Paths.Tftpdir, "warewulf", "grub.efi"))
|
||||
+ err = util.CopyFile(grubPath, path.Join(conf.TFTP.TftpRoot, "warewulf", "grub.efi"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
- _ = os.Chmod(path.Join(conf.Paths.Tftpdir, "warewulf", "grub.efi"), 0o755)
|
||||
- err = util.CopyFile(grubPath, path.Join(conf.Paths.Tftpdir, "warewulf", "grubx64.efi"))
|
||||
- _ = os.Chmod(path.Join(conf.Paths.Tftpdir, "warewulf", "grubx64.efi"), 0o755)
|
||||
+ _ = os.Chmod(path.Join(conf.TFTP.TftpRoot, "warewulf", "grub.efi"), 0o755)
|
||||
+ err = util.CopyFile(grubPath, path.Join(conf.TFTP.TftpRoot, "warewulf", "grubx64.efi"))
|
||||
+ _ = os.Chmod(path.Join(conf.TFTP.TftpRoot, "warewulf", "grubx64.efi"), 0o755)
|
||||
|
||||
return
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
diff --git a/overlays/host/dnsmasq.d/ww4-hosts.conf.ww b/overlays/host/etc/dnsmasq.d/ww4-hosts.conf.ww
|
||||
similarity index 57%
|
||||
rename from overlays/host/dnsmasq.d/ww4-hosts.conf.ww
|
||||
rename to overlays/host/etc/dnsmasq.d/ww4-hosts.conf.ww
|
||||
index a9d6d66f..951a1596 100644
|
||||
--- a/overlays/host/dnsmasq.d/ww4-hosts.conf.ww
|
||||
+++ b/overlays/host/etc/dnsmasq.d/ww4-hosts.conf.ww
|
||||
@@ -4,14 +4,30 @@
|
||||
# Source {{.BuildSource}}
|
||||
{{ nobackup }}
|
||||
# select the x86 hosts which will get the iXPE binary
|
||||
+dhcp-match=set:bios,option:client-arch,0 #legacy boot
|
||||
dhcp-match=set:x86PC,option:client-arch, 7 #EFI x86-64
|
||||
dhcp-match=set:x86PC,option:client-arch, 6 #EFI x86-64
|
||||
dhcp-match=set:x86PC,option:client-arch, 9 #EFI x86-64
|
||||
-{{ with (index $.Tftp.IpxeBinaries "00:07" ) }}dhcp-boot=tag:x86PC,"/warewulf/{{ index $.Tftp.IpxeBinaries "00:07" }}"{{ end }}
|
||||
-dhcp-no-override
|
||||
-# iPXE binary will get the following configuration file
|
||||
+dhcp-match=set:aarch64,option:client-arch, 11 #EFI aarch64
|
||||
+dhcp-match=set:iPXE,77,"iPXE"
|
||||
dhcp-userclass=set:iPXE,iPXE
|
||||
+dhcp-vendorclass=set:efi-http,HTTPClient:Arch:00016
|
||||
+dhcp-option-force=tag:efi-http,60,HTTPClient
|
||||
+# for http boot always use shim/grub
|
||||
+dhcp-boot=tag:efi-http,"http://{{$.Ipaddr}}:{{$.Warewulf.Port}}/efiboot/shim.efi"
|
||||
+# iPXE binary will get the following configuration file
|
||||
dhcp-boot=tag:iPXE,"http://{{$.Ipaddr}}:{{$.Warewulf.Port}}/ipxe/${mac:hexhyp}"
|
||||
+{{- if $.Warewulf.GrubBoot }}
|
||||
+dhcp-boot=tag:x86PC,"warewulf/shim.efi"
|
||||
+{{- else }}
|
||||
+{{- with (index $.Tftp.IpxeBinaries "00:07" ) }}
|
||||
+dhcp-boot=tag:x86PC,"/warewulf/{{ index $.Tftp.IpxeBinaries "00:07" }}"
|
||||
+{{- end }}
|
||||
+{{- with (index $.Tftp.IpxeBinaries "00:0B" ) }}
|
||||
+dhcp-boot=tag:aarch64,"/warewulf/{{ index $.Tftp.IpxeBinaries "00:0B" }}"
|
||||
+{{- end }}
|
||||
+{{- end }}
|
||||
+dhcp-no-override
|
||||
{{- if $.Tftp.Enabled }}
|
||||
# also act as tftp server
|
||||
tftp-root={{ $.Tftp.TftpRoot }}
|
||||
@@ -24,7 +40,7 @@ dhcp-range={{$.Dhcp.RangeStart}},{{$.Dhcp.RangeEnd}},{{$.Netmask}},6h
|
||||
{{- if $netdev.Ipaddr.Defined}} {{/* if we have an ip address on this network device */}}
|
||||
{{- if $netdev.Hwaddr.Defined }}
|
||||
dhcp-host={{$netdev.Hwaddr.Get}},set:warewulf,{{$node.Id.Get}},{{$netdev.Ipaddr.Get}},infinite
|
||||
-{{- end}} {{/* end if Hwaddr */}}
|
||||
-{{- end}} {{/* end if ip */}}
|
||||
-{{- end}} {{/* end for each network device */}}
|
||||
-{{- end}} {{/* end for each node */}}
|
||||
+{{- end}}{{/* end if Hwaddr */}}
|
||||
+{{- end}}{{/* end if ip */}}
|
||||
+{{- end}}{{/* end for each network device */}}
|
||||
+{{- end}}{{/* end for each node */}}
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:482f13f9cd5bb0193aed6380022341d7ebd35dc6fbe2152cc804b010cf405069
|
||||
size 5800023
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3b13cd5bcb740391cbb21420ebe54acbd2e0aad627d896d9887018bc3118e7d0
|
||||
size 10978414
|
3
warewulf4-v4.5.0~rc1.tar.gz
Normal file
3
warewulf4-v4.5.0~rc1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:933e3b97c877736071ea38d7b7cfab54d8bd5f74b151c96ca712aea723bb2bb7
|
||||
size 16915084
|
@ -1,3 +1,19 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 19 15:45:20 UTC 2024 - Christian Goll <cgoll@suse.com>
|
||||
|
||||
- updated to 4.5.0rc1 from upstream with following change:
|
||||
* all overlays reside now under a `rootfs` diretory e.g.
|
||||
the host overlays reside now under
|
||||
/var/lib/warewulf/host/rootfs
|
||||
This has the advantage that the `rootfs` can be under a version
|
||||
control, without the effect that the meta files e.g. `.git` will
|
||||
show up in the rendered overlays
|
||||
- removed patches:
|
||||
* clean-warewulf-conf.patch
|
||||
* dnsmasq-template-move.patch
|
||||
* removed vendor.tar.gz
|
||||
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 19 11:43:45 UTC 2024 - Egbert Eich <eich@suse.com>
|
||||
|
||||
|
@ -16,27 +16,31 @@
|
||||
#
|
||||
|
||||
|
||||
%define rls_cndt rc0
|
||||
%global vers 4.5.0
|
||||
%global rls_cndt rc1
|
||||
%if "0%{?rls_cndt}" != "0"
|
||||
%global rls_char ~
|
||||
%endif
|
||||
%global tftpdir /srv/tftpboot
|
||||
%global srvdir %{_sharedstatedir}
|
||||
%global githash 5b0de8ea5397ca42584335517fd4959d7ffe3da5
|
||||
#%%global githash 5b0de8ea5397ca42584335517fd4959d7ffe3da5
|
||||
|
||||
ExclusiveArch: x86_64 aarch64
|
||||
|
||||
Name: warewulf4
|
||||
Version: 4.5.0~%{?rls_cndt}
|
||||
Version: %{vers}%{?rls_char}%{?rls_cndt}
|
||||
Release: 0
|
||||
Summary: A suite of tools for clustering
|
||||
License: BSD-3-Clause
|
||||
Group: Productivity/Clustering/Computing
|
||||
URL: https://warewulf.org
|
||||
Source0: https://github.com/hpcng/warewulf/archive/%{githash}.tar.gz#/warewulf4-v%{version}.tar.gz
|
||||
Source1: vendor.tar.gz
|
||||
Source0: https://github.com/warewulf/warewulf/releases/download/v%{vers}%{?rls_cndt}/warewulf-%{vers}%{rls_cndt}.tar.gz#/warewulf4-v%{version}.tar.gz
|
||||
#Source1: vendor.tar.gz
|
||||
Source5: warewulf4-rpmlintrc
|
||||
Source10: config-ww4.sh
|
||||
Source20: README.dnsmasq
|
||||
Patch12: clean-warewulf-conf.patch
|
||||
Patch15: dnsmasq-template-move.patch
|
||||
#Patch12: clean-warewulf-conf.patch
|
||||
#Patch15: dnsmasq-template-move.patch
|
||||
#Conflicts: warewulf4-slurm < %version
|
||||
|
||||
# no firewalld in sle12
|
||||
@ -107,7 +111,7 @@ Summary: Configuration template for slurm
|
||||
Requires: %{name} = %{version}
|
||||
Requires: slurm
|
||||
BuildArch: noarch
|
||||
Obsoletes: warewulf4-slurm < 4.5.0
|
||||
Obsoletes: warewulf4-slurm < 4.4.0
|
||||
Provides: warewulf4-slurm = %version
|
||||
|
||||
%description overlay-slurm
|
||||
@ -115,9 +119,9 @@ This package install the necessary configuration files in order to run a slurm
|
||||
cluster on the configured warewulf nodes.
|
||||
|
||||
%prep
|
||||
%setup -q -n warewulf-%{githash}
|
||||
%setup -q -n warewulf-%{vers}%{rls_cndt}
|
||||
%autopatch -p1
|
||||
tar xzf %{S:1}
|
||||
# tar xzf %{S:1}
|
||||
|
||||
%build
|
||||
export OFFLINE_BUILD=1
|
||||
@ -187,8 +191,8 @@ yq e '
|
||||
-i %{buildroot}%{_sysconfdir}/warewulf/warewulf.conf
|
||||
#sed -i -e 's@\(^\s*\)\(.*:.*\):@\1"\2":@' %%{buildroot}%%{_sysconfdir}/warewulf/warewulf.conf
|
||||
# fix dhcp for SUSE
|
||||
mv %{buildroot}%{_localstatedir}/lib/warewulf/overlays/host/etc/dhcp/dhcpd.conf.ww %{buildroot}%{_localstatedir}/lib/warewulf/overlays/host/etc/dhcpd.conf.ww
|
||||
rmdir %{buildroot}%{_localstatedir}/lib/warewulf/overlays/host/etc/dhcp
|
||||
mv %{buildroot}%{_localstatedir}/lib/warewulf/overlays/host/rootfs/etc/dhcp/dhcpd.conf.ww %{buildroot}%{_localstatedir}/lib/warewulf/overlays/host/rootfs/etc/dhcpd.conf.ww
|
||||
rmdir %{buildroot}%{_localstatedir}/lib/warewulf/overlays/host/rootfs/etc/dhcp
|
||||
|
||||
# create systemuser
|
||||
echo "u warewulf -" > system-user-%{name}.conf
|
||||
@ -198,15 +202,15 @@ install -D -m 644 system-user-%{name}.conf %{buildroot}%{_sysusersdir}/system-us
|
||||
install -D -m 755 %{S:10} %{buildroot}%{_datadir}/warewulf/scripts/config-warewulf.sh
|
||||
|
||||
# get the slurm package ready
|
||||
mkdir -p %{buildroot}%{_localstatedir}/lib/warewulf/overlays/host/etc/slurm
|
||||
mv %{buildroot}%{_sysconfdir}/warewulf/examples/slurm.conf.ww %{buildroot}%{_localstatedir}/lib/warewulf/overlays/host/etc/slurm
|
||||
mkdir -p %{buildroot}%{_localstatedir}/lib/warewulf/overlays/generic/etc/munge
|
||||
cat > %{buildroot}%{_localstatedir}/lib/warewulf/overlays/generic/etc/munge/munge.key.ww <<EOF
|
||||
mkdir -p %{buildroot}%{_localstatedir}/lib/warewulf/overlays/host/rootfs/etc/slurm
|
||||
mv %{buildroot}%{_sysconfdir}/warewulf/examples/slurm.conf.ww %{buildroot}%{_localstatedir}/lib/warewulf/overlays/host/rootfs/etc/slurm
|
||||
mkdir -p %{buildroot}%{_localstatedir}/lib/warewulf/overlays/generic/rootfs/etc/munge
|
||||
cat > %{buildroot}%{_localstatedir}/lib/warewulf/overlays/generic/rootfs/etc/munge/munge.key.ww <<EOF
|
||||
{{ Include "/etc/munge/munge.key" -}}
|
||||
EOF
|
||||
chmod 600 %{buildroot}%{_localstatedir}/lib/warewulf/overlays/generic/etc/munge/munge.key.ww
|
||||
mkdir -p %{buildroot}%{_localstatedir}/lib/warewulf/overlays/generic/etc/slurm
|
||||
cat > %{buildroot}%{_localstatedir}/lib/warewulf/overlays/generic/etc/slurm/slurm.conf.ww <<EOF
|
||||
chmod 600 %{buildroot}%{_localstatedir}/lib/warewulf/overlays/generic/rootfs/etc/munge/munge.key.ww
|
||||
mkdir -p %{buildroot}%{_localstatedir}/lib/warewulf/overlays/generic/rootfs/etc/slurm
|
||||
cat > %{buildroot}%{_localstatedir}/lib/warewulf/overlays/generic/rootfs/etc/slurm/slurm.conf.ww <<EOF
|
||||
{{ Include "/etc/slurm/slurm.conf" }}
|
||||
EOF
|
||||
# move the other example templates for client overlays to package documentation
|
||||
@ -266,18 +270,18 @@ mv %{buildroot}/%{_sysconfdir}/warewulf/examples %{buildroot}%{_defaultdocdir}/%
|
||||
%{_localstatedir}/lib/warewulf/overlays
|
||||
%dir %{_localstatedir}/lib/warewulf
|
||||
%config(noreplace) %{_localstatedir}/lib/warewulf/overlays
|
||||
%exclude %{_localstatedir}/lib/warewulf/overlays/host/etc/slurm
|
||||
%exclude %{_localstatedir}/lib/warewulf/overlays/generic/etc/slurm
|
||||
%exclude %{_localstatedir}/lib/warewulf/overlays/generic/etc/munge
|
||||
%exclude %{_localstatedir}/lib/warewulf/overlays/host/rootfs/etc/slurm
|
||||
%exclude %{_localstatedir}/lib/warewulf/overlays/generic/rootfs/etc/slurm
|
||||
%exclude %{_localstatedir}/lib/warewulf/overlays/generic/rootfs/etc/munge
|
||||
|
||||
%files overlay-slurm
|
||||
%dir %{_localstatedir}/lib/warewulf/overlays/host/etc/slurm
|
||||
%{_localstatedir}/lib/warewulf/overlays/host/etc/slurm/slurm.conf.ww
|
||||
%dir %{_localstatedir}/lib/warewulf/overlays/generic/etc/slurm
|
||||
%{_localstatedir}/lib/warewulf/overlays/generic/etc/slurm/slurm.conf.ww
|
||||
%dir %{_localstatedir}/lib/warewulf/overlays/generic/etc/munge
|
||||
%{_localstatedir}/lib/warewulf/overlays/generic/etc/munge/munge.key.ww
|
||||
%dir %attr(0700,munge,munge) %{_localstatedir}/lib/warewulf/overlays/generic/etc/munge
|
||||
%attr(0600,munge,munge) %config(noreplace) %{_localstatedir}/lib/warewulf/overlays/generic/etc/munge/munge.key.ww
|
||||
%dir %{_localstatedir}/lib/warewulf/overlays/host/rootfs/etc/slurm
|
||||
%{_localstatedir}/lib/warewulf/overlays/host/rootfs/etc/slurm/slurm.conf.ww
|
||||
%dir %{_localstatedir}/lib/warewulf/overlays/generic/rootfs/etc/slurm
|
||||
%{_localstatedir}/lib/warewulf/overlays/generic/rootfs/etc/slurm/slurm.conf.ww
|
||||
%dir %{_localstatedir}/lib/warewulf/overlays/generic/rootfs/etc/munge
|
||||
%{_localstatedir}/lib/warewulf/overlays/generic/rootfs/etc/munge/munge.key.ww
|
||||
%dir %attr(0700,munge,munge) %{_localstatedir}/lib/warewulf/overlays/generic/rootfs/etc/munge
|
||||
%attr(0600,munge,munge) %config(noreplace) %{_localstatedir}/lib/warewulf/overlays/generic/rootfs/etc/munge/munge.key.ww
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user