290 lines
8.3 KiB
RPMSpec
290 lines
8.3 KiB
RPMSpec
%global debug_package %{nil}
|
|
|
|
%global api 0
|
|
|
|
%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
|
|
|
|
%if 0%{?fedora}
|
|
%define _build_id_links none
|
|
%endif
|
|
|
|
|
|
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%{?suse_version} || 0%{?sle_version}
|
|
BuildRequires: distribution-release
|
|
BuildRequires: systemd-rpm-macros
|
|
BuildRequires: go >= 1.16
|
|
BuildRequires: firewall-macros
|
|
BuildRequires: firewalld
|
|
BuildRequires: tftp
|
|
BuildRequires: yq
|
|
Requires: tftp
|
|
Requires: nfs-kernel-server
|
|
Requires: firewalld
|
|
Requires: ipxe-bootimgs
|
|
%else
|
|
# Assume Red Hat/Fedora build
|
|
BuildRequires: system-release
|
|
BuildRequires: systemd
|
|
BuildRequires: golang >= 1.16
|
|
BuildRequires: firewalld-filesystem
|
|
Requires: tftp-server
|
|
Requires: nfs-utils
|
|
%if 0%{?rhel} < 8
|
|
Requires: ipxe-bootimgs
|
|
%else
|
|
Requires: ipxe-bootimgs-x86
|
|
Requires: ipxe-bootimgs-aarch64
|
|
%endif
|
|
%endif
|
|
|
|
%if 0%{?rhel} >= 8 || 0%{?suse_version} || 0%{?fedora}
|
|
Requires: dhcp-server
|
|
%else
|
|
# rhel < 8
|
|
Requires: dhcp
|
|
%endif
|
|
|
|
BuildRequires: git
|
|
BuildRequires: make
|
|
%if %{api}
|
|
BuildRequires: libassuan-devel gpgme-devel
|
|
%endif
|
|
|
|
Recommends: logrotate
|
|
|
|
%description
|
|
Warewulf is a stateless and diskless container operating system provisioning
|
|
system for large clusters of bare metal and/or virtual systems.
|
|
|
|
%package dracut
|
|
Summary: dracut module for loading a Warewulf container image
|
|
BuildArch: noarch
|
|
|
|
Requires: dracut
|
|
%if 0%{?suse_version}
|
|
%else
|
|
Requires: dracut-network
|
|
%endif
|
|
Requires: curl
|
|
Requires: cpio
|
|
Requires: dmidecode
|
|
|
|
%description dracut
|
|
Warewulf is a stateless and diskless container operating system 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 container image from a
|
|
Warewulf server.
|
|
|
|
%prep
|
|
%setup -q -n %{name}-%{version} -b0 %if %{?with_offline:-a2}
|
|
|
|
|
|
%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 \
|
|
CACHEDIR=%{_localstatedir}/cache
|
|
make
|
|
%if %{api}
|
|
make api
|
|
%endif
|
|
|
|
|
|
%install
|
|
export OFFLINE_BUILD=1
|
|
export NO_BRP_STALE_LINK_ERROR=yes
|
|
make install \
|
|
DESTDIR=%{buildroot}
|
|
%if %{api}
|
|
make installapi \
|
|
DESTDIR=%{buildroot}
|
|
%endif
|
|
|
|
%if 0%{?suse_version} || 0%{?sle_version}
|
|
yq e '
|
|
.tftp.ipxe."00:00" = "undionly.kpxe" |
|
|
.tftp.ipxe."00:07" = "ipxe-x86_64.efi" |
|
|
.tftp.ipxe."00:09" = "ipxe-x86_64.efi" |
|
|
.tftp.ipxe."00:0B" = "snp-arm64.efi" ' \
|
|
-i %{buildroot}%{_sysconfdir}/warewulf/warewulf.conf
|
|
%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
|
|
%dir %{_sysconfdir}/bash_completion.d
|
|
%dir %{_sysconfdir}/logrotate.d
|
|
|
|
%defattr(-, root, %{wwgroup})
|
|
%dir %{_sysconfdir}/warewulf
|
|
%config(noreplace) %{_sysconfdir}/warewulf/warewulf.conf
|
|
%config(noreplace) %{_sysconfdir}/warewulf/examples
|
|
%config(noreplace) %{_sysconfdir}/warewulf/ipxe
|
|
%config(noreplace) %{_sysconfdir}/warewulf/grub
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/warewulfd.conf
|
|
%config(noreplace) %attr(0640,-,-) %{_sysconfdir}/warewulf/nodes.conf
|
|
|
|
%{_sysconfdir}/bash_completion.d/wwctl
|
|
|
|
%dir %{_sharedstatedir}/warewulf
|
|
%dir %{_sharedstatedir}/warewulf/chroots
|
|
%dir %{_sharedstatedir}/warewulf/overlays
|
|
%dir %{_sharedstatedir}/warewulf/overlays/*
|
|
%dir %{_sharedstatedir}/warewulf/overlays/*/rootfs
|
|
%attr(-, root, root) %{_sharedstatedir}/warewulf/overlays/NetworkManager/rootfs/*
|
|
%attr(-, root, root) %{_sharedstatedir}/warewulf/overlays/debian.interfaces/rootfs/*
|
|
%attr(-, root, root) %{_sharedstatedir}/warewulf/overlays/debug/rootfs/*
|
|
%attr(-, root, root) %{_sharedstatedir}/warewulf/overlays/fstab/rootfs/*
|
|
%attr(-, root, root) %{_sharedstatedir}/warewulf/overlays/host/rootfs/*
|
|
%attr(-, root, root) %{_sharedstatedir}/warewulf/overlays/hostname/rootfs/*
|
|
%attr(-, root, root) %{_sharedstatedir}/warewulf/overlays/hosts/rootfs/*
|
|
%attr(-, root, root) %{_sharedstatedir}/warewulf/overlays/ifcfg/rootfs/*
|
|
%attr(-, root, root) %{_sharedstatedir}/warewulf/overlays/ignition/rootfs/*
|
|
%attr(-, root, root) %{_sharedstatedir}/warewulf/overlays/issue/rootfs/*
|
|
%attr(-, root, root) %{_sharedstatedir}/warewulf/overlays/resolv/rootfs/*
|
|
%attr(700, root, root) %{_sharedstatedir}/warewulf/overlays/ssh.authorized_keys/rootfs/*
|
|
%attr(-, root, root) %{_sharedstatedir}/warewulf/overlays/ssh.host_keys/rootfs/*
|
|
%attr(-, root, root) %{_sharedstatedir}/warewulf/overlays/syncuser/rootfs/*
|
|
%attr(-, root, root) %{_sharedstatedir}/warewulf/overlays/systemd.netname/rootfs/*
|
|
%attr(-, root, root) %{_sharedstatedir}/warewulf/overlays/udev.netname/rootfs/*
|
|
%attr(-, root, root) %{_sharedstatedir}/warewulf/overlays/wicked/rootfs/*
|
|
%attr(-, root, root) %{_sharedstatedir}/warewulf/overlays/wwclient/rootfs/*
|
|
%attr(-, root, root) %{_sharedstatedir}/warewulf/overlays/wwinit/rootfs/*
|
|
|
|
%attr(-, root, root) %{_bindir}/wwctl
|
|
%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
|
|
|
|
%if %{api}
|
|
%attr(-, root, root) %{_bindir}/wwapi*
|
|
%config(noreplace) %{_sysconfdir}/warewulf/wwapi*.conf
|
|
%endif
|
|
|
|
|
|
%files dracut
|
|
%defattr(-, root, root)
|
|
%dir %{_prefix}/lib/dracut/modules.d/90wwinit
|
|
%{_prefix}/lib/dracut/modules.d/90wwinit/*.sh
|
|
|
|
|
|
%changelog
|
|
* 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
|