forked from warewulf/warewulf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
warewulf.spec.in
154 lines (119 loc) · 3.66 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
%define debug_package %{nil}
%if 0%{?sle_version}
%global tftpdir /srv/tftpboot
%global srvdir /srv
%else
# Assume Fedora-based OS if not SUSE-based
%global tftpdir /var/lib/tftpboot
%global srvdir %{_sharedstatedir}
%endif
%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
BuildRequires: make
%if 0%{?sle_version}
BuildRequires: systemd-rpm-macros
BuildRequires: go
BuildRequires: firewall-macros
Requires: tftp
Requires: nfs-kernel-server
%else
BuildRequires: systemd
BuildRequires: golang
BuildRequires: firewalld-filesystem
Requires: tftp-server
Requires: nfs-utils
%endif
%if 0%{?rhel} >= 8 || 0%{?sle_version}
Requires: dhcp-server
%else
# rhel < 8
Requires: dhcp
%endif
%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}
%build
# Install to sharedstatedir by redirecting LOCALSTATEDIR
make genconfig \
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
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/*
%config(noreplace) %attr(0640,-,-) %{_sysconfdir}/warewulf/nodes.conf
%{_sysconfdir}/bash_completion.d/warewulf
%dir %{_sharedstatedir}/warewulf
%{_sharedstatedir}/warewulf/chroots
%{_sharedstatedir}/warewulf/overlays
%{srvdir}/warewulf
%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) %{_datadir}/warewulf
%license %{_docdir}/warewulf/LICENSE.md
%changelog
* 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