-
Notifications
You must be signed in to change notification settings - Fork 32
/
ovirt-hosted-engine-setup.spec.in
223 lines (177 loc) · 6.66 KB
/
ovirt-hosted-engine-setup.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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
#
# ovirt-hosted-engine-setup -- ovirt hosted engine setup
# Copyright (C) 2013-2021 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
%global package_version @PACKAGE_VERSION@
%global ovirt_hosted_engine_setup_templates %{_datadir}/%{name}/templates
%global ovirt_hosted_engine_setup_scripts %{_datadir}/%{name}/scripts
%global vdsmhooksdir %{_libexecdir}/vdsm/hooks
%global python_interpreter %{__python3}
%global python38_target_version python38
%global python_target_version python3
%global python_sitelib %{python3_sitelib}
Summary: oVirt Hosted Engine setup tool
Name: @PACKAGE_NAME@
Version: @PACKAGE_RPM_VERSION@
Release: @PACKAGE_RPM_RELEASE@%{?release_suffix}%{?dist}
License: LGPL-2.0-or-later
URL: https://www.ovirt.org/
Source: https://github.com/oVirt/%{name}/releases/download/%{name}-%{package_version}/%{name}-%{package_version}.tar.gz
Group: Applications/System
BuildArch: noarch
# Python dependencies
Requires: %{python_target_version}
%if 0%{?rhel} < 9
# On RHEL 9 it uses Python 3.9 platform support.
Requires: %{python38_target_version}
%endif
Requires: %{python_target_version}-ethtool >= 0.6-3
Requires: %{python_target_version}-ovirt-engine-sdk4 >= 4.3.1
Requires: %{python_target_version}-sanlock
Requires: %{python_target_version}-libselinux
Requires: %{python_target_version}-distro
%if 0%{?rhel} < 9
# undeclared dependency of netaddr in python 3.6 only
Requires: %{python_target_version}-importlib-resources
%endif
Requires: %{python_target_version}-netaddr
Requires: %{python_target_version}-otopi >= 1.9.0
Requires: %{python_target_version}-ovirt-setup-lib >= 1.3.3
Requires: %{python_target_version}-six
BuildRequires: %{python_target_version}-devel
BuildRequires: %{python_target_version}-pytest
BuildRequires: gettext-devel
# Non Python dependencies
Requires: bind-utils
Requires: lsof
Requires: openssh-server
Requires: openssl
Requires: sanlock >= 2.8
Requires: sudo
Requires: libvirt-client >= 6.6.0-9
Requires: virt-install
Requires: ansible-core >= 2.13
Requires: ovirt-ansible-collection >= 3.0.0
# default libvirt network
Requires: libvirt-daemon-config-network
BuildRequires: gettext >= 0.18.2
# gcc is needed by gettext
# TODO: figure out how to configure gettext to not require gcc.
BuildRequires: gcc
%if 0%{?fedora}
Requires: qemu-img
%endif
%if 0%{?centos}
Requires: qemu-img
%else
Requires: qemu-img >= 15:3.1.0-20.module+el8+2888+cdc893a8
%endif
Requires: ovirt-hosted-engine-ha >= 2.4
Requires: glusterfs-cli >= 5.6
Requires: vdsm-python >= 4.50
Requires(post): vdsm-python >= 4.50
Requires: ovirt-host >= 4.5.0
Conflicts: ovirt-engine-appliance < 4.5
Conflicts: ovirt-engine-appliance >= 4.6
%description
Hosted Engine setup tool for oVirt project.
%prep
%setup -q -n %{name}-%{package_version}
%build
%configure \
--docdir="%{_docdir}/%{name}-%{version}" \
--disable-python-syntax-check \
--disable-ansible-syntax-check \
%{?conf}
make %{?_smp_mflags}
%check
make test
%install
make %{?_smp_mflags} install DESTDIR="%{buildroot}"
%find_lang %{name}
%files -f %{name}.lang
%license COPYING
%doc README.md
%doc readme.appliance
%doc readme.rollback
%dir %{_sysconfdir}/ovirt-hosted-engine-setup.env.d
%dir %{_sysconfdir}/ovirt-hosted-engine
%ghost %attr(600, root, root) %{_sysconfdir}/ovirt-hosted-engine/virsh_auth.conf
%dir %attr(700, root, root) %{_localstatedir}/log/ovirt-hosted-engine-setup
%dir %{_localstatedir}/lib/ovirt-hosted-engine-setup
%dir %{_localstatedir}/lib/ovirt-hosted-engine-setup/answers
%{_sbindir}/hosted-engine
%{_sbindir}/ovirt-hosted-engine-setup
%{_sbindir}/ovirt-hosted-engine-cleanup
%{python_sitelib}/ovirt_hosted_engine_setup/
%{_datadir}/%{name}/
%{_mandir}/man8/*
#move to a separate package?
%{vdsmhooksdir}/before_vm_start/
%post
touch %{_sysconfdir}/ovirt-hosted-engine/virsh_auth.conf
chmod 600 %{_sysconfdir}/ovirt-hosted-engine/virsh_auth.conf
%{python_interpreter} -c '
from vdsm.tool.configurators import passwd
print((
"[credentials-vdsm]\n"
"authname={authname}\n"
"password={password}\n\n"
"[auth-libvirt-localhost]\n"
"credentials=vdsm\n"
).format(
authname=passwd.SASL_USERNAME,
password=passwd.libvirt_password(),
))
' > %{_sysconfdir}/ovirt-hosted-engine/virsh_auth.conf
%changelog
* Wed Nov 29 2023 Sandro Bonazzola <[email protected]> - 2.7.2-0.0.master
- 2.7.2-0.0.master
* Wed Nov 29 2023 Sandro Bonazzola <[email protected]> - 2.7.1-1
- 2.7.1-1
* Mon Nov 28 2022 Martin Perina <[email protected]> - 2.7.1-0.0.master
- 2.7.1-0.0.master
* Mon Nov 28 2022 Martin Perina <[email protected]> - 2.7.0-1
- 2.7.0-1
* Thu Oct 27 2022 Lev Veyde <[email protected]> - 2.6.7-0.0.master
- 2.6.7-0.0.master
* Thu Oct 27 2022 Lev Veyde <[email protected]> - 2.6.6-1
- 2.6.6-1
* Sun Jul 24 2022 Asaf Rachmani <[email protected]> - 2.6.6-0.0.master
- 2.6.6-0.0.master
* Sun Jul 24 2022 Asaf Rachmani <[email protected]> - 2.6.5-1
- 2.6.5-1
* Thu Jun 02 2022 Asaf Rachmani <[email protected]> - 2.6.5-0.0.master
- 2.6.5-0.0.master
* Thu Jun 02 2022 Asaf Rachmani <[email protected]> - 2.6.4-1
- 2.6.4-1
* Tue Mar 29 2022 Asaf Rachmani <[email protected]> - 2.6.4-0.0.master
- 2.6.4-0.0.master
* Mon Mar 28 2022 Asaf Rachmani <[email protected]> - 2.6.3-1
- 2.6.3-1
* Thu Mar 24 2022 Yedidyah Bar David <[email protected]> - 2.6.3-0.0.master
- 2.6.3-0.0.master
* Thu Mar 24 2022 Yedidyah Bar David <[email protected]> - 2.6.2-1
- 2.6.2-1
* Tue Jan 25 2022 Asaf Rachmani <[email protected]> - 2.6.2-0.0.master
- 2.6.2-0.0.master
* Mon Jan 24 2022 Asaf Rachmani <[email protected]> - 2.6.1-1
- 2.6.1-1
* Wed Nov 17 2021 Asaf Rachmani <[email protected]> - 2.6.1-0.0.master
- 2.6.1-0.0.master
* Wed Nov 17 2021 Asaf Rachmani <[email protected]> - 2.6.0-1
- 2.6.0-1