Makefile has included a Defaults.mk file to store variable configuration from one run for implicit inclusion in future runs, but the creation of this file has been automatic and opaque, and the state of it managed by a series of PHONY targets (e.g., config, genconfig, rm_config). This commit refactors config to name its files explicitly (so they can be more properly monitored by make) and makes the generation of Defaults.mk explicit so that its behavior is more obvious. Signed-off-by: Jonathon Anderson <janderson@ciq.com>
175 lines
4.5 KiB
RPMSpec
175 lines
4.5 KiB
RPMSpec
%global debug_package %{nil}
|
|
|
|
%if 0%{?suse_version}
|
|
%global tftpdir /srv/tftpboot
|
|
%else
|
|
# Assume Fedora-based OS if not SUSE-based
|
|
%global tftpdir /var/lib/tftpboot
|
|
%endif
|
|
%global srvdir %{_sharedstatedir}
|
|
|
|
%global wwgroup warewulf
|
|
|
|
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/hpcng/warewulf
|
|
Source: https://github.com/hpcng/warewulf/releases/download/v%{version}/warewulf-%{version}.tar.gz
|
|
%{?with_offline:Source2: vendor.tgz}
|
|
|
|
ExclusiveOS: linux
|
|
|
|
Conflicts: warewulf < 4
|
|
Conflicts: warewulf-common
|
|
Conflicts: warewulf-cluster
|
|
Conflicts: warewulf-vnfs
|
|
Conflicts: warewulf-provision
|
|
Conflicts: warewulf-ipmi
|
|
|
|
%if 0%{?suse_version} || 0%{?sle_version}
|
|
BuildRequires: distribution-release
|
|
BuildRequires: systemd-rpm-macros
|
|
BuildRequires: go >= 1.16
|
|
BuildRequires: firewall-macros
|
|
BuildRequires: firewalld
|
|
BuildRequires: tftp
|
|
Requires: tftp
|
|
Requires: nfs-kernel-server
|
|
Requires: firewalld
|
|
%else
|
|
# Assume Red Hat/Fedora build
|
|
BuildRequires: system-release
|
|
BuildRequires: systemd
|
|
BuildRequires: golang >= 1.16
|
|
BuildRequires: firewalld-filesystem
|
|
Requires: tftp-server
|
|
Requires: nfs-utils
|
|
%endif
|
|
|
|
%if 0%{?rhel} >= 8 || 0%{?suse_version}
|
|
Requires: dhcp-server
|
|
%else
|
|
# rhel < 8
|
|
Requires: dhcp
|
|
%endif
|
|
|
|
BuildRequires: git
|
|
BuildRequires: make
|
|
BuildRequires: libassuan-devel gpgme-devel
|
|
|
|
%description
|
|
Warewulf is a stateless and diskless container operating system provisioning
|
|
system for large clusters of bare metal and/or virtual systems.
|
|
|
|
|
|
%prep
|
|
%setup -q -n %{name}-%{version} -b0 %if %{?with_offline:-a2}
|
|
|
|
|
|
%build
|
|
%{?with_offline:OFFLINE_BUILD=1}
|
|
# Install to sharedstatedir by redirecting LOCALSTATEDIR
|
|
make Defaults.mk \
|
|
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
|
|
make
|
|
|
|
|
|
%install
|
|
export NO_BRP_STALE_LINK_ERROR=yes
|
|
make install \
|
|
DESTDIR=%{buildroot}
|
|
|
|
|
|
%pre
|
|
getent group %{wwgroup} >/dev/null || groupadd -r %{wwgroup}
|
|
|
|
|
|
%post
|
|
%systemd_post warewulfd.service
|
|
%firewalld_reload
|
|
|
|
|
|
%preun
|
|
%systemd_preun warewulfd.service
|
|
|
|
|
|
%postun
|
|
%systemd_postun_with_restart warewulfd.service
|
|
%firewalld_reload
|
|
|
|
|
|
%files
|
|
%defattr(-, root, %{wwgroup})
|
|
%dir %{_sysconfdir}/warewulf
|
|
%config(noreplace) %{_sysconfdir}/warewulf/warewulf.conf
|
|
%config(noreplace) %{_sysconfdir}/warewulf/wwapi*.conf
|
|
%config(noreplace) %{_sysconfdir}/warewulf/examples
|
|
%config(noreplace) %{_sysconfdir}/warewulf/ipxe
|
|
%config(noreplace) %attr(0640,-,-) %{_sysconfdir}/warewulf/nodes.conf
|
|
%{_sysconfdir}/bash_completion.d/wwctl
|
|
|
|
%dir %{_sharedstatedir}/warewulf
|
|
%{_sharedstatedir}/warewulf/chroots
|
|
%{_sharedstatedir}/warewulf/overlays
|
|
|
|
%attr(-, root, root) %{_bindir}/wwctl
|
|
%attr(-, root, root) %{_bindir}/wwapi*
|
|
%attr(-, root, root) %{_prefix}/lib/firewalld/services/warewulf.xml
|
|
%attr(-, root, root) %{_unitdir}/warewulfd.service
|
|
%attr(-, root, root) %{_mandir}/man1/wwctl*
|
|
%attr(-, root, root) %{_mandir}/man5/*.5*
|
|
%attr(-, root, root) %{_datadir}/warewulf
|
|
|
|
%dir %{_docdir}/warewulf
|
|
%license %{_docdir}/warewulf/LICENSE.md
|
|
|
|
|
|
%changelog
|
|
* 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.co> - 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@ctrliq.com> - 4.0.0
|
|
- Initial release
|