forked from warewulf/warewulf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
warewulf.spec.in
173 lines (137 loc) · 4.37 KB
/
warewulf.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
%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
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
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
make
%install
export OFFLINE_BUILD=1
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 <[email protected]> - 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 <[email protected]> - 4.2.0-1
- Add license install
- Updates for RH and SUSE RPM guidelines
* Sat Jan 15 2022 Gregory Kurtzer <[email protected]> - 4.2.0-1
- Integrated genconfig Make options
- Cleaned up SPEC to use default RPM macros
* Tue Jan 11 2022 Jeremy Siadal <[email protected]> - 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 <[email protected]> - 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 <[email protected]> - 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 <[email protected]> - 4.0.0
- Initial release