From 7ec233212d837b354b8117936a425b20cc74d02ff4e6628b2902bfd39bf13702 Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Mon, 12 Feb 2024 21:54:08 +0000 Subject: [PATCH] Accepting request 1146236 from home:eeich:branches:network:cluster - Rename: warewulf4-doc -> warewulf4-man. - Rename: warewulf4-slurm -> warewulf4-overlay-slurm - Set warewulf4-man and warewulf4-overlay-slurm to noarch. - Use bash for config-warewulf.sh - Improved rpmlint filters. - added vendor.tar.gz as git hash source doesn't have vendoring OBS-URL: https://build.opensuse.org/request/show/1146236 OBS-URL: https://build.opensuse.org/package/show/network:cluster/warewulf4?expand=0&rev=56 --- config-ww4.sh | 12 ++++++------ warewulf4-rpmlintrc | 15 +++++++++++---- warewulf4.changes | 11 ++++++++++- warewulf4.spec | 28 +++++++++++++++++----------- 4 files changed, 44 insertions(+), 22 deletions(-) diff --git a/config-ww4.sh b/config-ww4.sh index ddb5351..87ad3c9 100644 --- a/config-ww4.sh +++ b/config-ww4.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Configure warewulf with the primary network of the host WW4CONF=/etc/warewulf/warewulf.conf @@ -37,14 +37,14 @@ function is_ip_in_range() { # compare the octets one at a time to see if the ip address is within the range. if [[ ${ip_address_octets[3]} -lt ${ip_start_octets[3]} || ${ip_address_octets[3]} -gt ${ip_end_octets[3]} ]]; then return 1 - fi + fi # if we reach this point, the ip address is in the range. return 0 } echo "-- WW4 CONFIGURAION $* --" -# Make sure that a ip address was defined for out network so that +# Make sure that a ip address was defined for out network so that # we can configure dhcpd correctly IP4CIDR=`ip addr | awk '/scope global/ {print $2;exit}'` IP4=${IP4CIDR%/*} @@ -85,9 +85,9 @@ fi if [ -e $WW4CONF ] ; then test -n $IP4 && sed -i 's/^ipaddr:.*/ipaddr: '$IP4'/' $WW4CONF test -n $IP4MASK && sed -i 's/^netmask:.*/netmask: '$IP4MASK'/' $WW4CONF - test -n $IP4NET && sed -i 's/^network:.*/network: '$IP4NET'/' $WW4CONF - test -n $DYNSTART && sed -i 's/^ range start:.*/ range start: '$DYNSTART'/' $WW4CONF - test -n $DYNEND && sed -i 's/^ range end:.*/ range end: '$DYNEND'/' $WW4CONF + test -n $IP4NET && sed -i 's/^network:.*/network: '$IP4NET'/' $WW4CONF + test -n $DYNSTART && sed -i 's/^ range start:.*/ range start: '$DYNSTART'/' $WW4CONF + test -n $DYNEND && sed -i 's/^ range end:.*/ range end: '$DYNEND'/' $WW4CONF cat << EOF ipaddr: $IP4 netmask: $IP4MASK diff --git a/warewulf4-rpmlintrc b/warewulf4-rpmlintrc index 88f497b..e240abf 100644 --- a/warewulf4-rpmlintrc +++ b/warewulf4-rpmlintrc @@ -3,11 +3,18 @@ # compute nodes addFilter("hidden-file-or-dir /var/lib/warewulf/overlays/,*") addFilter("non-executable-script /var/lib/warewulf/overlays/.*") -# wwclient is called on a compute *before* systemd in +# wwclient is called on a compute node *before* systemd in # order to provision the system, so it *must* be statically linked -addFilter("statically-linked-binary /var/lib/warewulf/overlays/system/default/warewulf/bin/wwclient") +addFilter("statically-linked-binary .*/wwclient") +addFilter("shared-lib-without-dependency-information .*/wwclient") # go binaries are hard to strip addFilter("unstripped-binary-or-object.*") +# Intentional - symlinks will be copied to the client +addFilter("dangling-symlink .*/warewulf/overlays") +# LOL. Not every changelog entry marks a version update. +addFilter("no-version-in-last-changelog") +# C'on, really? We have to build for multiple target version with different rpmlint settings. +addFilter("unused-rpmlintrc-filter") # ignore the binary in /usr/share as this binary will to the nodes and not run on -# the host where the rpm is installed -addFilter("arch-dependent-file-in-usr-share") +# the host where the rpm is installed. +# addFilter("arch-dependent-file-in-usr-share") diff --git a/warewulf4.changes b/warewulf4.changes index 6558839..2d2b933 100644 --- a/warewulf4.changes +++ b/warewulf4.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Feb 7 08:55:00 UTC 2024 - Egbert Eich + +- Rename: warewulf4-doc -> warewulf4-man. +- Rename: warewulf4-slurm -> warewulf4-overlay-slurm +- Set warewulf4-man and warewulf4-overlay-slurm to noarch. +- Use bash for config-warewulf.sh +- Improved rpmlint filters. + ------------------------------------------------------------------- Wed Jan 24 14:31:17 UTC 2024 - Christian Goll @@ -7,7 +16,7 @@ Wed Jan 24 14:31:17 UTC 2024 - Christian Goll Fri Jan 19 13:45:18 UTC 2024 - Christian Goll - moved to git archive hash as source in order to be reproducible -- added vendor.tar.gz as git hash source doesn't have vendoring +- added vendor.tar.gz as git hash source doesn't have vendoring - removed grub-boot.patch as incorporated upstreams ------------------------------------------------------------------- diff --git a/warewulf4.spec b/warewulf4.spec index 4062b7e..a43aaab 100644 --- a/warewulf4.spec +++ b/warewulf4.spec @@ -37,6 +37,7 @@ Source10: config-ww4.sh Source20: README.dnsmasq Patch12: clean-warewulf-conf.patch Patch15: dnsmasq-template-move.patch +#Conflicts: warewulf4-slurm < %version # no firewalld in sle12 %if 0%{?sle_version} >= 150000 || 0%{?suse_version} > 1500 @@ -91,19 +92,25 @@ Conflicts: warewulf-provision-x86_64-initramfs Contains the binaries for the access of warewulf through a rest API and from the commandline from an external host. -%package doc -Requires: %{name} -Summary: Contains the documentation for warewulf +%package man +Supplements: %{name} +Provides: warewulf4-doc = %version +Obsoletes: warewulf4-doc < %version +Summary: Warewulf4 Man Pages +BuildArch: noarch -%description doc -Documention and man pages for warewulf. +%description man +Man pages for warewulf4. -%package slurm +%package overlay-slurm Summary: Configuration template for slurm Requires: %{name} = %{version} Requires: slurm +BuildArch: noarch +Obsoletes: warewulf4-slurm < 4.5.0 +Provides: warewulf4-slurm = %version -%description slurm +%description overlay-slurm This package install the necessary configuration files in order to run a slurm cluster on the configured warewulf nodes. @@ -165,7 +172,6 @@ ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcwarewulfd mkdir -p %{buildroot}%{_datadir}/bash-completion/completions mv -v %{buildroot}%{_sysconfdir}/bash_completion.d/wwctl \ %{buildroot}%{_datadir}/bash-completion/completions/wwctl -#rm -r %{buildroot}%{_datadir}/doc/warewulf # copy the LICESNSE.md via %%doc rm -f %{buildroot}/usr/share/doc/packages/warewulf/LICENSE.md cp %{S:20} . @@ -179,7 +185,7 @@ yq e ' .["container mounts"] += {"source": "/etc/SUSEConnect", "dest": "/etc/SUSEConnect", "readonly": true} | .["container mounts"] += {"source": "/etc/zypp/credentials.d/SCCcredentials", "dest": "/etc/zypp/credentials.d/SCCcredentials", "readonly": true}' \ -i %{buildroot}%{_sysconfdir}/warewulf/warewulf.conf -#sed -i -e 's@\(^\s*\)\(.*:.*\):@\1"\2":@' %{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 @@ -238,7 +244,7 @@ EOF %{_sysusersdir}/system-user-%{name}.conf %{_datadir}/warewulf -%files doc +%files man %{_mandir}/man1/wwctl*1.gz %{_mandir}/man5/*conf*gz @@ -261,7 +267,7 @@ EOF %exclude %{_localstatedir}/lib/warewulf/overlays/generic/etc/slurm %exclude %{_localstatedir}/lib/warewulf/overlays/generic/etc/munge -%files slurm +%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