forked from pool/warewulf4
Accepting request 1146281 from 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 (forwarded request 1146236 from eeich) OBS-URL: https://build.opensuse.org/request/show/1146281 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/warewulf4?expand=0&rev=15
This commit is contained in:
commit
c4c9e988f3
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
# Configure warewulf with the primary network of the host
|
# Configure warewulf with the primary network of the host
|
||||||
WW4CONF=/etc/warewulf/warewulf.conf
|
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.
|
# 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
|
if [[ ${ip_address_octets[3]} -lt ${ip_start_octets[3]} || ${ip_address_octets[3]} -gt ${ip_end_octets[3]} ]]; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
# if we reach this point, the ip address is in the range.
|
# if we reach this point, the ip address is in the range.
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "-- WW4 CONFIGURAION $* --"
|
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
|
# we can configure dhcpd correctly
|
||||||
IP4CIDR=`ip addr | awk '/scope global/ {print $2;exit}'`
|
IP4CIDR=`ip addr | awk '/scope global/ {print $2;exit}'`
|
||||||
IP4=${IP4CIDR%/*}
|
IP4=${IP4CIDR%/*}
|
||||||
@ -85,9 +85,9 @@ fi
|
|||||||
if [ -e $WW4CONF ] ; then
|
if [ -e $WW4CONF ] ; then
|
||||||
test -n $IP4 && sed -i 's/^ipaddr:.*/ipaddr: '$IP4'/' $WW4CONF
|
test -n $IP4 && sed -i 's/^ipaddr:.*/ipaddr: '$IP4'/' $WW4CONF
|
||||||
test -n $IP4MASK && sed -i 's/^netmask:.*/netmask: '$IP4MASK'/' $WW4CONF
|
test -n $IP4MASK && sed -i 's/^netmask:.*/netmask: '$IP4MASK'/' $WW4CONF
|
||||||
test -n $IP4NET && sed -i 's/^network:.*/network: '$IP4NET'/' $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 $DYNSTART && sed -i 's/^ range start:.*/ range start: '$DYNSTART'/' $WW4CONF
|
||||||
test -n $DYNEND && sed -i 's/^ range end:.*/ range end: '$DYNEND'/' $WW4CONF
|
test -n $DYNEND && sed -i 's/^ range end:.*/ range end: '$DYNEND'/' $WW4CONF
|
||||||
cat << EOF
|
cat << EOF
|
||||||
ipaddr: $IP4
|
ipaddr: $IP4
|
||||||
netmask: $IP4MASK
|
netmask: $IP4MASK
|
||||||
|
@ -3,11 +3,18 @@
|
|||||||
# compute nodes
|
# compute nodes
|
||||||
addFilter("hidden-file-or-dir /var/lib/warewulf/overlays/,*")
|
addFilter("hidden-file-or-dir /var/lib/warewulf/overlays/,*")
|
||||||
addFilter("non-executable-script /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
|
# 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
|
# go binaries are hard to strip
|
||||||
addFilter("unstripped-binary-or-object.*")
|
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
|
# ignore the binary in /usr/share as this binary will to the nodes and not run on
|
||||||
# the host where the rpm is installed
|
# the host where the rpm is installed.
|
||||||
addFilter("arch-dependent-file-in-usr-share")
|
# addFilter("arch-dependent-file-in-usr-share")
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Feb 7 08:55:00 UTC 2024 - Egbert Eich <eich@suse.com>
|
||||||
|
|
||||||
|
- 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 <cgoll@suse.com>
|
Wed Jan 24 14:31:17 UTC 2024 - Christian Goll <cgoll@suse.com>
|
||||||
|
|
||||||
@ -7,7 +16,7 @@ Wed Jan 24 14:31:17 UTC 2024 - Christian Goll <cgoll@suse.com>
|
|||||||
Fri Jan 19 13:45:18 UTC 2024 - Christian Goll <cgoll@suse.com>
|
Fri Jan 19 13:45:18 UTC 2024 - Christian Goll <cgoll@suse.com>
|
||||||
|
|
||||||
- moved to git archive hash as source in order to be reproducible
|
- 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
|
- removed grub-boot.patch as incorporated upstreams
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
|
@ -37,6 +37,7 @@ Source10: config-ww4.sh
|
|||||||
Source20: README.dnsmasq
|
Source20: README.dnsmasq
|
||||||
Patch12: clean-warewulf-conf.patch
|
Patch12: clean-warewulf-conf.patch
|
||||||
Patch15: dnsmasq-template-move.patch
|
Patch15: dnsmasq-template-move.patch
|
||||||
|
#Conflicts: warewulf4-slurm < %version
|
||||||
|
|
||||||
# no firewalld in sle12
|
# no firewalld in sle12
|
||||||
%if 0%{?sle_version} >= 150000 || 0%{?suse_version} > 1500
|
%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
|
Contains the binaries for the access of warewulf through a rest API and from
|
||||||
the commandline from an external host.
|
the commandline from an external host.
|
||||||
|
|
||||||
%package doc
|
%package man
|
||||||
Requires: %{name}
|
Supplements: %{name}
|
||||||
Summary: Contains the documentation for warewulf
|
Provides: warewulf4-doc = %version
|
||||||
|
Obsoletes: warewulf4-doc < %version
|
||||||
|
Summary: Warewulf4 Man Pages
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
%description doc
|
%description man
|
||||||
Documention and man pages for warewulf.
|
Man pages for warewulf4.
|
||||||
|
|
||||||
%package slurm
|
%package overlay-slurm
|
||||||
Summary: Configuration template for slurm
|
Summary: Configuration template for slurm
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
Requires: slurm
|
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
|
This package install the necessary configuration files in order to run a slurm
|
||||||
cluster on the configured warewulf nodes.
|
cluster on the configured warewulf nodes.
|
||||||
|
|
||||||
@ -165,7 +172,6 @@ ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcwarewulfd
|
|||||||
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
|
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
|
||||||
mv -v %{buildroot}%{_sysconfdir}/bash_completion.d/wwctl \
|
mv -v %{buildroot}%{_sysconfdir}/bash_completion.d/wwctl \
|
||||||
%{buildroot}%{_datadir}/bash-completion/completions/wwctl
|
%{buildroot}%{_datadir}/bash-completion/completions/wwctl
|
||||||
#rm -r %{buildroot}%{_datadir}/doc/warewulf
|
|
||||||
# copy the LICESNSE.md via %%doc
|
# copy the LICESNSE.md via %%doc
|
||||||
rm -f %{buildroot}/usr/share/doc/packages/warewulf/LICENSE.md
|
rm -f %{buildroot}/usr/share/doc/packages/warewulf/LICENSE.md
|
||||||
cp %{S:20} .
|
cp %{S:20} .
|
||||||
@ -179,7 +185,7 @@ yq e '
|
|||||||
.["container mounts"] += {"source": "/etc/SUSEConnect", "dest": "/etc/SUSEConnect", "readonly": true} |
|
.["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}' \
|
.["container mounts"] += {"source": "/etc/zypp/credentials.d/SCCcredentials", "dest": "/etc/zypp/credentials.d/SCCcredentials", "readonly": true}' \
|
||||||
-i %{buildroot}%{_sysconfdir}/warewulf/warewulf.conf
|
-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
|
# 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
|
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
|
rmdir %{buildroot}%{_localstatedir}/lib/warewulf/overlays/host/etc/dhcp
|
||||||
@ -238,7 +244,7 @@ EOF
|
|||||||
%{_sysusersdir}/system-user-%{name}.conf
|
%{_sysusersdir}/system-user-%{name}.conf
|
||||||
%{_datadir}/warewulf
|
%{_datadir}/warewulf
|
||||||
|
|
||||||
%files doc
|
%files man
|
||||||
%{_mandir}/man1/wwctl*1.gz
|
%{_mandir}/man1/wwctl*1.gz
|
||||||
%{_mandir}/man5/*conf*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/slurm
|
||||||
%exclude %{_localstatedir}/lib/warewulf/overlays/generic/etc/munge
|
%exclude %{_localstatedir}/lib/warewulf/overlays/generic/etc/munge
|
||||||
|
|
||||||
%files slurm
|
%files overlay-slurm
|
||||||
%dir %{_localstatedir}/lib/warewulf/overlays/host/etc/slurm
|
%dir %{_localstatedir}/lib/warewulf/overlays/host/etc/slurm
|
||||||
%{_localstatedir}/lib/warewulf/overlays/host/etc/slurm/slurm.conf.ww
|
%{_localstatedir}/lib/warewulf/overlays/host/etc/slurm/slurm.conf.ww
|
||||||
%dir %{_localstatedir}/lib/warewulf/overlays/generic/etc/slurm
|
%dir %{_localstatedir}/lib/warewulf/overlays/generic/etc/slurm
|
||||||
|
Loading…
Reference in New Issue
Block a user