344 lines
8.7 KiB
RPMSpec
344 lines
8.7 KiB
RPMSpec
%global debug_package %{nil}
|
|
|
|
# feature macros
|
|
%if 0%{?rhel} >= 10 || 0%{?openEuler}
|
|
%global use_dnsmasq 1
|
|
%else
|
|
%global use_dnsmasq 0
|
|
%endif
|
|
|
|
%if 0%{?suse_version} || 0%{?sle_version}
|
|
%global is_suse 1
|
|
%else
|
|
%global is_suse 0
|
|
%endif
|
|
|
|
# Set tftpdir based on distribution
|
|
%if 0%{?is_suse}
|
|
%global tftpdir /srv/tftpboot
|
|
%else
|
|
%global tftpdir /var/lib/tftpboot
|
|
%endif
|
|
|
|
%global srvdir %{_sharedstatedir}
|
|
|
|
%global wwgroup warewulf
|
|
|
|
%if 0%{?fedora}
|
|
%define _build_id_links none
|
|
%endif
|
|
|
|
%define _overlaydir %{_datadir}/warewulf/overlays
|
|
%global __brp_mangle_shebangs_exclude_from ^%{_overlaydir}/.*$
|
|
|
|
|
|
Name: warewulf
|
|
Summary: A provisioning system for large clusters of bare metal and/or virtual systems
|
|
Version: @VERSION@
|
|
Release: @RELEASE@%{?dist}
|
|
License: BSD-3-Clause
|
|
URL: https://github.com/warewulf/warewulf
|
|
Source: https://github.com/warewulf/warewulf/releases/download/v%{version}/warewulf-%{version}.tar.gz
|
|
|
|
ExclusiveOS: linux
|
|
|
|
Conflicts: warewulf < 4
|
|
Conflicts: warewulf-common
|
|
Conflicts: warewulf-cluster
|
|
Conflicts: warewulf-vnfs
|
|
Conflicts: warewulf-provision
|
|
Conflicts: warewulf-ipmi
|
|
|
|
%if 0%{?is_suse}
|
|
BuildRequires: distribution-release
|
|
BuildRequires: systemd-rpm-macros
|
|
BuildRequires: go >= 1.22
|
|
BuildRequires: firewall-macros
|
|
BuildRequires: firewalld
|
|
Requires: nfs-kernel-server
|
|
Requires: firewalld
|
|
Requires: ipxe-bootimgs
|
|
%else
|
|
# Assume Red Hat/Fedora
|
|
BuildRequires: system-release
|
|
BuildRequires: systemd
|
|
BuildRequires: golang >= 1.22
|
|
BuildRequires: firewalld-filesystem
|
|
Requires: nfs-utils
|
|
%if 0%{?rhel} < 8
|
|
Requires: ipxe-bootimgs
|
|
%else
|
|
Requires: ipxe-bootimgs-x86
|
|
Requires: ipxe-bootimgs-aarch64
|
|
%endif
|
|
%endif
|
|
|
|
# dhcp/tftp requirements
|
|
%if 0%{?is_suse}
|
|
BuildRequires: tftp
|
|
Requires: tftp
|
|
%elif 0%{?use_dnsmasq}
|
|
Requires: dnsmasq
|
|
%else
|
|
# Assume Red Hat/Fedora
|
|
Requires: tftp-server
|
|
%if 0%{?rhel} >= 8 || 0%{?fedora}
|
|
Requires: dhcp-server
|
|
%else
|
|
Requires: dhcp
|
|
%endif
|
|
%endif
|
|
|
|
BuildRequires: git
|
|
BuildRequires: make
|
|
BuildRequires: gpgme-devel
|
|
BuildRequires: python3-devel
|
|
|
|
Recommends: logrotate
|
|
Recommends: ipmitool
|
|
|
|
|
|
%description
|
|
Warewulf is a stateless and diskless provisioning
|
|
system for large clusters of bare metal and/or virtual systems.
|
|
|
|
|
|
%prep
|
|
%setup -q -n %{name}-%{version} -b0
|
|
|
|
|
|
%build
|
|
export OFFLINE_BUILD=1
|
|
make defaults \
|
|
PREFIX=%{_prefix} \
|
|
BINDIR=%{_bindir} \
|
|
SYSCONFDIR=%{_sysconfdir} \
|
|
DATADIR=%{_datadir} \
|
|
LOCALSTATEDIR=%{_sharedstatedir} \
|
|
SHAREDSTATEDIR=%{_sharedstatedir} \
|
|
MANDIR=%{_mandir} \
|
|
INFODIR=%{_infodir} \
|
|
DOCDIR=%{_docdir} \
|
|
SRVDIR=%{srvdir} \
|
|
TFTPDIR=%{tftpdir} \
|
|
SYSTEMDDIR=%{_unitdir} \
|
|
BASHCOMPDIR=/etc/bash_completion.d/ \
|
|
FIREWALLDDIR=/usr/lib/firewalld/services \
|
|
WWCLIENTDIR=/warewulf \
|
|
IPXESOURCE=/usr/share/ipxe \
|
|
DRACUTMODDIR=/usr/lib/dracut/modules.d \
|
|
SOSPLUGINS=%{python3_sitelib}/sos/report/plugins \
|
|
CACHEDIR=%{_localstatedir}/cache
|
|
make build
|
|
|
|
|
|
%install
|
|
export OFFLINE_BUILD=1
|
|
export NO_BRP_STALE_LINK_ERROR=yes
|
|
make install \
|
|
DESTDIR=%{buildroot}
|
|
|
|
%if 0%{?rhel} >= 10 || 0%{?openEuler}
|
|
cp -f etc/warewulf.conf-el10 %{buildroot}%{_sysconfdir}/warewulf/warewulf.conf
|
|
%elif 0%{?is_suse}
|
|
cp -f etc/warewulf.conf-suse %{buildroot}%{_sysconfdir}/warewulf/warewulf.conf
|
|
%endif
|
|
|
|
%if ! 0%{?is_suse}
|
|
make install-sos \
|
|
DESTDIR=%{buildroot}
|
|
%endif
|
|
|
|
%pre
|
|
getent group %{wwgroup} >/dev/null || groupadd -r %{wwgroup}
|
|
# use ipxe images from the distribution
|
|
|
|
|
|
%post
|
|
%systemd_post warewulfd.service
|
|
%firewalld_reload
|
|
|
|
|
|
%preun
|
|
%systemd_preun warewulfd.service
|
|
|
|
|
|
%postun
|
|
%systemd_postun_with_restart warewulfd.service
|
|
%firewalld_reload
|
|
|
|
|
|
%files
|
|
%defattr(-, root, root)
|
|
|
|
%dir %{_sysconfdir}/warewulf
|
|
%config(noreplace) %{_sysconfdir}/warewulf/warewulf.conf
|
|
%config(noreplace) %attr(0640,-,%{wwgroup}) %{_sysconfdir}/warewulf/nodes.conf
|
|
%config(noreplace) %attr(0600,-,-) %{_sysconfdir}/warewulf/auth.conf
|
|
%config(noreplace) %{_sysconfdir}/warewulf/examples
|
|
%config(noreplace) %{_sysconfdir}/warewulf/ipxe
|
|
%config(noreplace) %{_sysconfdir}/warewulf/grub
|
|
%{_sysconfdir}/bash_completion.d
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d
|
|
|
|
%dir %{_sharedstatedir}/warewulf
|
|
%dir %{_sharedstatedir}/warewulf/chroots
|
|
%dir %{_sharedstatedir}/warewulf/overlays
|
|
|
|
%dir %{_datadir}/warewulf
|
|
%{_datadir}/warewulf/bmc
|
|
%dir %{_overlaydir}
|
|
%dir %{_overlaydir}/*
|
|
%dir %{_overlaydir}/*/rootfs
|
|
%{_overlaydir}/NetworkManager/rootfs/*
|
|
%{_overlaydir}/debian.interfaces/rootfs/*
|
|
%{_overlaydir}/debug/rootfs/*
|
|
%{_overlaydir}/fstab/rootfs/*
|
|
%{_overlaydir}/host/rootfs/*
|
|
%{_overlaydir}/hostname/rootfs/*
|
|
%{_overlaydir}/hosts/rootfs/*
|
|
%{_overlaydir}/ifcfg/rootfs/*
|
|
%{_overlaydir}/ifupdown/rootfs/*
|
|
%{_overlaydir}/ignition/rootfs/*
|
|
%{_overlaydir}/issue/rootfs/*
|
|
%{_overlaydir}/netplan/rootfs/*
|
|
%{_overlaydir}/resolv/rootfs/*
|
|
%attr(700, -, -) %{_overlaydir}/ssh.authorized_keys/rootfs/*
|
|
%{_overlaydir}/ssh.host_keys/rootfs/*
|
|
%{_overlaydir}/syncuser/rootfs/*
|
|
%{_overlaydir}/systemd.netname/rootfs/*
|
|
%{_overlaydir}/udev.netname/rootfs/*
|
|
%{_overlaydir}/wicked/rootfs/*
|
|
%{_overlaydir}/wwclient/rootfs/*
|
|
%{_overlaydir}/wwinit/rootfs/*
|
|
%{_overlaydir}/localtime/rootfs/*
|
|
%{_overlaydir}/sfdisk/rootfs/*
|
|
%{_overlaydir}/mkfs/rootfs/*
|
|
%{_overlaydir}/mkswap/rootfs/*
|
|
%{_overlaydir}/systemd.mount/rootfs/*
|
|
%{_overlaydir}/systemd.swap/rootfs/*
|
|
|
|
%{_bindir}/wwctl
|
|
%{_prefix}/lib/firewalld/services/warewulf.xml
|
|
%{_unitdir}/warewulfd.service
|
|
%{_mandir}/man1/wwctl*
|
|
%{_mandir}/man5/*.5*
|
|
|
|
%dir %{_docdir}/warewulf
|
|
%license %{_docdir}/warewulf/LICENSE.md
|
|
|
|
|
|
%package dracut
|
|
Summary: dracut module for loading a Warewulf image
|
|
BuildArch: noarch
|
|
|
|
Requires: dracut
|
|
%if ! 0%{?is_suse}
|
|
Requires: dracut-network
|
|
%endif
|
|
Requires: curl
|
|
Requires: cpio
|
|
Requires: dmidecode
|
|
|
|
%description dracut
|
|
Warewulf is a stateless and diskless provisioning system for large clusters of
|
|
bare metal and/or virtual systems.
|
|
|
|
This subpackage contains a dracut module that can be used to generate an
|
|
initramfs that can fetch and boot a Warewulf node image from a Warewulf server.
|
|
|
|
%files dracut
|
|
%defattr(-, root, root)
|
|
%{_prefix}/lib/dracut/modules.d/90wwinit
|
|
|
|
|
|
%if ! 0%{?is_suse}
|
|
%package sos
|
|
Summary: sos plugin for Warewulf
|
|
BuildArch: noarch
|
|
Requires: sos
|
|
|
|
%description sos
|
|
Warewulf is a stateless and diskless provisioning system for large clusters of
|
|
bare metal and/or virtual systems.
|
|
|
|
This subpackage contains an sos module that can be used to include information
|
|
about Warewulf in an sos report.
|
|
|
|
%files sos
|
|
%{python3_sitelib}/sos/report/plugins/warewulf.py
|
|
%{python3_sitelib}/sos/report/plugins/__pycache__/warewulf.*.pyc
|
|
%endif
|
|
|
|
|
|
%changelog
|
|
* Tue Oct 28 2025 Jonathon Anderson <janderson@ciq.com>
|
|
- Use static variants for warewulf.conf-suse and warewulf.conf-el10
|
|
|
|
* Thu Sep 4 2025 Jonathon Anderson <janderson@ciq.com>
|
|
- Update golang BuildRequires to 1.22
|
|
- Exclude overlay files from brp-mangle-shebangs
|
|
|
|
* Tue Apr 1 2025 Jonathon Anderson <janderson@ciq.com>
|
|
- Remove gRPC API
|
|
|
|
* Thu Feb 20 2025 Stephen Simpson <ssimpson@ciq.com>
|
|
- Added sos plugin
|
|
|
|
* Sat Feb 1 2025 Jonathon Anderson <janderson@ciq.com>
|
|
- Add Recommends: ipmitool
|
|
|
|
* Thu Sep 12 2024 Jonathon Anderson <janderson@ciq.com>
|
|
- Split overlays into separate directories
|
|
|
|
* Tue Jun 18 2024 Josh Burks <jeburks2@asu.edu>
|
|
- Add curl, cpio, and dracut as requires for warewulf-dracut
|
|
|
|
* Thu Apr 18 2024 Jonathon Anderson <janderson@ciq.com>
|
|
- New warewulf-dracut subpackage
|
|
|
|
* Wed Apr 17 2024 Jonathon Anderson <janderson@ciq.com>
|
|
- Don't build the API on EL7
|
|
|
|
* Sat Mar 9 2024 Jonathon Anderson <janderson@ciq.com> - 4.5.0-1
|
|
- Update source to github.com/warewulf
|
|
- Fix ownership of overlay files
|
|
- Add packaging for new grub support
|
|
- Add dependencies on distribution ipxe packages
|
|
- Fix offline builds
|
|
- Accommodate new Makefile behavior
|
|
- Designate config files in /etc/warewulf/ as "noreplace"
|
|
- Updated path to shell completions
|
|
|
|
* Mon Oct 17 2022 Jeremy Siadal <jeremy.c.siadal@intel.com> - 4.4.0-1
|
|
- Add offline build support -- prepping for bcond
|
|
- Add more BuildRequires for new golang vendor modules
|
|
|
|
* Wed Jan 26 2022 Jeremy Siadal <jeremy.c.siadal@intel.com> - 4.2.0-1
|
|
- Add license install
|
|
- Updates for RH and SUSE RPM guidelines
|
|
|
|
* Sat Jan 15 2022 Gregory Kurtzer <gmkurtzer@gmail.com> - 4.2.0-1
|
|
- Integrated genconfig Make options
|
|
- Cleaned up SPEC to use default RPM macros
|
|
|
|
* Tue Jan 11 2022 Jeremy Siadal <jeremy.c.siadal@intel.com> - 4.2.0-1
|
|
- Merge overlay subdirectories
|
|
- Add configuration options to make
|
|
- Relocate tftpboot for OpenSUSE
|
|
- Remove libexecdir macro; changing in OpenSUSE 15.4
|
|
|
|
* Mon Nov 1 2021 Jeremy Siadal <jeremy.c.siadal@intel.com> - 4.2.0-1
|
|
- Add support for OpenSUSE
|
|
- Update file attribs
|
|
- Update license string
|
|
- Make shared store relocatable
|
|
|
|
* Fri Sep 24 2021 Michael L. Young <myoung@ciq.com> - 4.2.0-1
|
|
- Update spec file to use systemd macros
|
|
- Use macros to refer to system paths
|
|
- Update syntax
|
|
|
|
* Tue Jan 26 2021 14:46:24 JST Brian Clemens <bclemens@ciq.com> - 4.0.0
|
|
- Initial release
|