-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathovirt-node.spec.in
371 lines (312 loc) · 14.9 KB
/
ovirt-node.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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
%define product_family oVirt Node
%define beta Beta
%define mgmt_scripts_dir %{_sysconfdir}/node.d
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Summary: The oVirt Node daemons/scripts
Name: ovirt-node
Version: @VERSION@
Release: 0%{?dist}%{?extra_release}
Source0: %{name}-%{version}.tar.gz
License: GPLv2+
Group: Applications/System
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
URL: http://www.ovirt.org/
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
BuildRequires: libvirt-devel >= 0.5.1
BuildRequires: dbus-devel hal-devel
BuildRequires: python-devel
BuildRequires: python-setuptools
Requires: libvirt >= 0.6.3
Requires: augeas >= 0.3.5
Requires: libvirt-qpid >= 0.2.14-3
Requires: hal
Requires: collectd-virt
Requires: wget
Requires: cyrus-sasl-gssapi cyrus-sasl >= 2.1.22
Requires: iscsi-initiator-utils
Requires: ntp
Requires: nfs-utils
Requires: glusterfs-client >= 2.0.1
Requires: krb5-workstation
Requires: bash
Requires: chkconfig
Requires: bind-utils
# Stupid yum dep solver pulls in older 'qemu' to resolve
# /usr/bin/qemu-img dep. This forces it to pick the new
# qemu-img RPM.
Requires: qemu-img
Requires: nc
Requires: grub
Requires: /usr/sbin/crond
Requires: anyterm
Requires: newt-python
Requires: libuser-python >= 0.56.9
Requires: dbus-python
Requires: python-IPy
ExclusiveArch: %{ix86} x86_64
%define app_root %{_datadir}/%{name}
%description
Provides a series of daemons and support utilities for hypervisor distribution.
%package tools
Summary: oVirt Node tools for building and running an oVirt Node image
Group: Applications/System
BuildArch: noarch
BuildRequires: pykickstart >= 1.54
Requires: livecd-tools >= 020-2
%define tools_root %{_datadir}/ovirt-node-tools
%description tools
The oVirt-node-tools package provides recipe (ks files), client tools,
documentation for building and running an oVirt Node image. This package
is not to be installed on the oVirt-Node, however on a development machine
to help in deployment on the node.
%prep
%setup -q
%build
%configure
make %{?ovirt_cache_dir: OVIRT_CACHE_DIR=%{ovirt_cache_dir}} \
%{?ovirt_local_repo: OVIRT_LOCAL_REPO=%{ovirt_local_repo}} \
%{?ovirt_url: OVIRT_URL=%{ovirt_url}}
%install
%{__rm} -rf %{buildroot}
make install DESTDIR=%{buildroot}
%{__install} -d -m0755 %{buildroot}%{app_root}
%{__install} -d -m0755 %{buildroot}%{_initrddir}
%{__install} -d -m0755 %{buildroot}%{_libexecdir}
%{__install} -d -m0755 %{buildroot}%{_sysconfdir}
%{__install} -d -m0755 %{buildroot}%{_sysconfdir}/cron.hourly
%{__install} -d -m0755 %{buildroot}%{_sysconfdir}/sysconfig
%{__install} -d -m0755 %{buildroot}%{mgmt_scripts_dir}
%{__install} -d -m0755 %{buildroot}%{_sysconfdir}/cron.d
%{__install} -d -m0755 %{buildroot}%{_sysconfdir}/logrotate.d
%{__install} -d -m0755 %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0644 nodeadmin/__init__.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0644 nodeadmin/configscreen.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0644 nodeadmin/menuscreen.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0644 nodeadmin/utils.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0755 nodeadmin/nodeadmin.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0644 nodeadmin/mainmenu.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0644 nodeadmin/nodemenu.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0755 nodeadmin/adddomain.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0644 nodeadmin/domainconfig.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0755 nodeadmin/listdomains.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0755 nodeadmin/migratedomain.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0755 nodeadmin/removedomain.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0755 nodeadmin/startdomain.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0755 nodeadmin/stopdomain.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0644 nodeadmin/netmenu.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0644 nodeadmin/networkconfig.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0644 nodeadmin/definenet.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0755 nodeadmin/createnetwork.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0755 nodeadmin/destroynetwork.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0755 nodeadmin/undefinenetwork.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0755 nodeadmin/addhost.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0644 nodeadmin/changehost.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0755 nodeadmin/hostmenu.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0755 nodeadmin/removehost.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0755 nodeadmin/createuser.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0644 nodeadmin/halworker.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0644 nodeadmin/libvirtworker.py %{buildroot}%{python_sitelib}/nodeadmin
%{__install} -p -m0644 nodeadmin/userworker.py %{buildroot}%{python_sitelib}/nodeadmin
# gptsync
#%{__install} -p -m0755 gptsync/gptsync %{buildroot}%{_sbindir}
#%{__install} -p -m0755 gptsync/showpart %{buildroot}%{_sbindir}
# in Makefile now
%{__install} -p -m0755 scripts/node-config %{buildroot}%{_sysconfdir}/sysconfig
%{__install} -p -m0755 scripts/ovirt-awake %{buildroot}%{_initrddir}
%{__install} -p -m0755 scripts/ovirt-early %{buildroot}%{_initrddir}
%{__install} -p -m0755 scripts/ovirt %{buildroot}%{_initrddir}
%{__install} -p -m0755 scripts/ovirt-post %{buildroot}%{_initrddir}
%{__install} -p -m0755 scripts/ovirt-firstboot %{buildroot}%{_initrddir}
%{__install} -p -m0644 scripts/collectd.conf.in %{buildroot}%{_sysconfdir}
%{__install} -p -m0755 kinit/ovirt-kinit %{buildroot}%{_sysconfdir}/cron.hourly
%{__install} -p -m0644 logrotate/ovirt-logrotate %{buildroot}%{_sysconfdir}/cron.d
%{__install} -p -m0644 logrotate/ovirt-logrotate.conf %{buildroot}%{_sysconfdir}/logrotate.d/ovirt-node
# install the admin tools
python nodeadmin/setup.py install --root %{buildroot}
# rm -rf %{buildroot}%{python_sitelib}/nodeadmin-@VERSION@*
echo "oVirt Node release %{version}-%{release}" > %{buildroot}%{_sysconfdir}/ovirt-release
mkdir -p %{buildroot}/%{_sysconfdir}/default
echo "# File where default partitioning info is kept" > %{buildroot}/%{_sysconfdir}/default/ovirt
# ovirt-logos
# should be ifarch i386
mkdir -p %{buildroot}/boot/grub
install -p -m 644 images/grub-splash.xpm.gz %{buildroot}%{app_root}
# end i386 bits
mkdir -p %{buildroot}/usr/lib/anaconda-runtime
install -p -m 644 images/syslinux-vesa-splash.jpg %{buildroot}%{app_root}
# ovirt-logos
# release files
echo "%{product_family} release %{version}%{?beta: %{beta}} (%{release})" > %{buildroot}/etc/ovirt-release
cp %{buildroot}/etc/ovirt-release %{buildroot}/etc/issue
echo "Kernel \r on an \m (\l)" >> %{buildroot}/etc/issue
cp %{buildroot}/etc/issue %{buildroot}/etc/issue.net
echo >> %{buildroot}/etc/issue
ln -s ovirt-release %{buildroot}/etc/redhat-release
ln -s ovirt-release %{buildroot}/etc/system-release
# ovirt-config-boot post-install hooks
%{__install} -d -m0755 %{buildroot}%{_sysconfdir}/ovirt-config-boot.d
# default ovirt-config-setup menu options
%{__install} -d -m0755 %{buildroot}%{_sysconfdir}/ovirt-config-setup.d
%{__ln_s} ../..%{_libexecdir}/ovirt-config-storage %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"00_Disk Partitioning"
%{__ln_s} ../..%{_libexecdir}/ovirt-config-password %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"05_Administrator Password"
%{__ln_s} ../..%{_libexecdir}/ovirt-config-hostname %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"10_Set Hostname"
%{__ln_s} ../..%{_libexecdir}/ovirt-config-iscsi %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"12_iSCSI Initiator Setup"
%{__ln_s} ../..%{_libexecdir}/ovirt-config-networking %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"15_Networking Setup"
%{__ln_s} ../..%{_libexecdir}/ovirt-config-logging %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"30_Logging Setup"
%{__ln_s} ../..%{_libexecdir}/ovirt-config-collectd %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"35_Collectd Setup"
%{__ln_s} ../..%{_libexecdir}/ovirt-config-view-logs %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"90_View logs"
%{__ln_s} ../..%{_libexecdir}/ovirt-config-boot-wrapper %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"98_Local install and reboot"
%{__ln_s} ../..%{_libexecdir}/ovirt-config-uninstall %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"99_Uninstall node"
# ovirt-early vendor hook dir
%{__install} -d -m0755 %{buildroot}%{_sysconfdir}/ovirt-early.d
# ovirt-node-tools
%{__install} -d -m0755 %{buildroot}%{tools_root}
#%{__install} -p -m0644 recipe/*.ks %{buildroot}%{tools_root}
%{__install} -p -m0755 tools/create-ovirt-iso-nodes %{buildroot}%{_sbindir}
%{__install} -p -m0755 tools/edit-livecd %{buildroot}%{_sbindir}
%{__install} -p -m0755 tools/livecd-setauth %{buildroot}%{_sbindir}
%{__install} -p -m0755 tools/livecd-rpms %{buildroot}%{_sbindir}
#%{__install} -p -m0755 tools/get-ovirt-node-image %{buildroot}%{_sbindir}
#%{__install} -p -m0755 tools/generate-ovirt-node-pxe-tree %{buildroot}%{_sbindir}
%clean
%{__rm} -rf %{buildroot}
%post
# Setup basic collectd configuration
sed '/<Plugin network>/,/<\/Plugin>/d' /etc/collectd.conf.in > /etc/collectd.conf
/sbin/chkconfig --add ovirt-awake
/sbin/chkconfig --add ovirt-early
/sbin/chkconfig --add ovirt-firstboot
/sbin/chkconfig --add ovirt
/sbin/chkconfig --add ovirt-post
%preun
if [ $1 = 0 ] ; then
/sbin/service ovirt-early stop >/dev/null 2>&1
/sbin/service ovirt-firstboor stop >/dev/null 2>&1
/sbin/service ovirt stop >/dev/null 2>&1
/sbin/service ovirt-post stop >/dev/null 2>&1
/sbin/chkconfig --del ovirt-awake
/sbin/chkconfig --del ovirt-early
/sbin/chkconfig --del ovirt-firstboot
/sbin/chkconfig --del ovirt
/sbin/chkconfig --del ovirt-post
fi
%files tools
%defattr(0644,root,root,0755)
%doc README COPYING
%{tools_root}/*.ks
%defattr(0755,root,root,0755)
%{_sbindir}/create-ovirt-iso-nodes
%{_sbindir}/edit-livecd
%{_sbindir}/livecd-setauth
%{_sbindir}/livecd-rpms
#%{_sbindir}/get-ovirt-node-image
#%{_sbindir}/generate-ovirt-node-pxe-tree
%files
%defattr(-,root,root)
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/ovirt-release
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/default/ovirt
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/redhat-release
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/system-release
%config(noreplace) %attr(0644,root,root) /etc/issue
%config(noreplace) %attr(0644,root,root) /etc/issue.net
%config(noreplace) %{_sysconfdir}/logrotate.d/ovirt-node
%config(noreplace) %{_sysconfdir}/cron.d/ovirt-logrotate
%{mgmt_scripts_dir}
%{_sysconfdir}/ovirt-config-boot.d
%{_sysconfdir}/ovirt-config-setup.d
%config(noreplace) %{_sysconfdir}/collectd.conf.in
%config(noreplace) %{_sysconfdir}/sysconfig/node-config
%doc COPYING
# should be ifarch i386
%{app_root}/grub-splash.xpm.gz
# end i386 bits
%{app_root}/syslinux-vesa-splash.jpg
%{_libexecdir}/ovirt-functions
%{_libexecdir}/ovirt-config-boot
%{_libexecdir}/ovirt-config-boot-wrapper
%{_libexecdir}/ovirt-config-collectd
%{_libexecdir}/ovirt-config-iscsi
%{_libexecdir}/ovirt-config-hostname
%{_libexecdir}/ovirt-config-logging
%{_libexecdir}/ovirt-config-networking
%{_libexecdir}/ovirt-config-password
%{_libexecdir}/ovirt-config-setup
%{_libexecdir}/ovirt-config-storage
%{_libexecdir}/ovirt-config-uninstall
%{_libexecdir}/ovirt-config-view-logs
%{_sbindir}/ovirt-process-config
%{_sbindir}/ovirt-install-node-stateless
%{_sbindir}/gptsync
%{_sbindir}/showpart
%{_sbindir}/persist
%{_sbindir}/unpersist
%{_initrddir}/ovirt-awake
%{_initrddir}/ovirt-early
%{_initrddir}/ovirt-firstboot
%{_initrddir}/ovirt
%{_initrddir}/ovirt-post
%config %{_sysconfdir}/cron.hourly/ovirt-kinit
%{_sysconfdir}/ovirt-early.d
%{_bindir}/nodeadmin
%{_bindir}/addpool
%{_bindir}/addvm
%{_bindir}/addvolume
%{_bindir}/startvm
%{_bindir}/stopvm
%{_bindir}/rmvm
%{_bindir}/listpools
%{_bindir}/migratevm
%{_bindir}/listvms
%{_bindir}/rmpool
%{_bindir}/rmvolume
%{_bindir}/startpool
%{_bindir}/stoppool
%{_bindir}/definenet
%{_bindir}/createnet
%{_bindir}/destroynet
%{_bindir}/undefinenet
%{_bindir}/listnets
%{_bindir}/createuser
%{python_sitelib}/nodeadmin
%{python_sitelib}/nodeadmin-@VERSION@*
%changelog
* Wed Mar 24 2010 Darryl L. Pierce <[email protected]> - 1.9.1-1
- Update ovirt-process-config to fail configs that are missing the field name or value.
- Updated build system will use Fedora 13 as the rawhide repo.
- Fixed ovirt-config-networking to not report success when network start fails.
- Reboot hangs on /etc [FIXED].
- Multipath translation performance improvements.
- Cleanup ROOTDRIVE when partitioning.
- Fix hang when cleaning dirty storage.
- The order of the oVirt SysVInit scripts has been changed.
- ovirt-early -> ovirt-awake -> ovirt -> ovirt-post
- Fixes to the SysVINit scripts to name lifecycle methods propery.
- Added psmisc package.
- Added default KEYTAB_FILE name to /etc/sysconfig/node-config.
- Fixes to the persist and unpersist commands to handle already persisted files and directories.
- Duplicate NTP/DNS entries are rejected during network setup.
* Wed Oct 07 2009 David Huff <[email protected]> - 1.0.3-4
- Added ovirt-node-tools subpackage
* Thu Jun 23 2009 David Huff <[email protected]> - 1.0.3
- Clean up spec for inclusion in Fedora
- Removed subpackages, stateful, stateless, logos, and selinux
* Thu Dec 11 2008 Perry Myers <[email protected]> - 0.96
- Subpackage stateful/stateless to separate out functionality for
embedded Node and Node running as part of already installed OS
- ovirt-config-* setup scripts for standalone mode
* Thu Sep 11 2008 Chris Lalancette <[email protected]> - 0.92 0.7
- Add the ovirt-install- and ovirt-uninstall-node scripts, and refactor
post to accomodate
* Mon Sep 8 2008 Jim Meyering <[email protected]> - 0.92 0.6
- Update ovirt-identify-node's build rule.
* Fri Aug 22 2008 Chris Lalancette <[email protected]> - 0.92 0.5
- Add the ovirt-listen-awake daemon to the RPM
* Fri Aug 22 2008 Chris Lalancette <[email protected]> - 0.92 0.4
- Re-arrange the directory layout, in preparation for ovirt-listen-awake
* Tue Jul 29 2008 Perry Myers <[email protected]> - 0.92 0.2
- Added /etc/ovirt-release and merged ovirt-setup into spec file
* Wed Jul 02 2008 Darryl Pierce <[email protected]> - 0.92 0.2
- Added log rotation to limit file system writes.
* Mon Jun 30 2008 Perry Myers <[email protected]> - 0.92 0.1
- Add in sections of kickstart post, general cleanup