]>
Commit | Line | Data |
---|---|---|
9bdf81e9 TP |
1 | Summary: OpenVZ containers control utility |
2 | Summary(pl.UTF-8): Narzędzie do zarządzania środowiskiem wirtualnym OpenVZ | |
5bce3792 | 3 | Name: vzctl |
9bdf81e9 | 4 | Version: 3.0.25.1 |
82e58e2a | 5 | Release: 1 |
5bce3792 SP |
6 | License: GPL |
7 | Group: Base/Kernel | |
8 | Source0: http://download.openvz.org/utils/vzctl/%{version}/src/%{name}-%{version}.tar.bz2 | |
cbf91aa9 | 9 | # Source0-md5: 5798ea88d06afff1d6d1bbbfc45899f1 |
88d20d00 TP |
10 | Source1: pld.conf |
11 | Source2: pld-add_ip.sh | |
12 | Source3: pld-del_ip.sh | |
13 | Source4: pld-set_hostname.sh | |
14 | Source5: vz-pld.in | |
15 | Source6: vzeventd-pld.in | |
16 | Patch0: %{name}-pld.patch | |
5bce3792 | 17 | URL: http://openvz.org/ |
88d20d00 TP |
18 | BuildRequires: autoconf |
19 | BuildRequires: automake | |
7975b809 | 20 | BuildRequires: libtool |
ee16b02c | 21 | Requires: %{name}-lib = %{version}-%{release} |
82e58e2a TP |
22 | Requires(post,preun): /sbin/chkconfig |
23 | Requires: rc-scripts | |
5bce3792 | 24 | # these reqs are for vz helper scripts |
5bce3792 SP |
25 | Requires: bash |
26 | Requires: ed | |
27 | Requires: fileutils | |
28 | Requires: gawk | |
29 | Requires: grep | |
30 | Requires: sed | |
31 | Requires: tar | |
5bce3792 | 32 | Requires: vzquota >= 2.7.0-4 |
5bce3792 | 33 | # requires for vzmigrate purposes |
cbf91aa9 TP |
34 | Suggests: gawk |
35 | Suggests: openssh | |
36 | Suggests: rsync | |
ee16b02c | 37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
5bce3792 | 38 | |
82e58e2a TP |
39 | %define _configdir %{_sysconfdir}/vz |
40 | %define _distconfdir %{_configdir}/dists | |
41 | %define _distscriptdir %{_distconfdir}/scripts | |
42 | ||
5bce3792 | 43 | %description |
9bdf81e9 TP |
44 | This utility allows system administator to control OpenVZ containers, |
45 | i.e. create, start, shutdown, set various options and limits etc. | |
46 | ||
47 | %description -l pl.UTF-8 | |
48 | Narzędzia vztcl pozwalają kontrolować środowisko wirtualne (kontener) | |
49 | OpenVZ, jak na przykład: utworzenie, zatrzymanie, wyłączenie kontenera | |
50 | oraz umożliwia ustawienie opcji i limitów dotyczących kontenera. | |
5bce3792 | 51 | |
ee16b02c | 52 | %package lib |
9bdf81e9 | 53 | Summary: OpenVZ containers control API library |
82e58e2a | 54 | Group: Libraries |
ee16b02c ER |
55 | |
56 | %description lib | |
9bdf81e9 | 57 | OpenVZ containers control API library. |
ee16b02c | 58 | |
5bce3792 SP |
59 | %prep |
60 | %setup -q | |
88d20d00 TP |
61 | %patch0 -p1 |
62 | install %{SOURCE1} etc/dists | |
63 | install %{SOURCE2} %{SOURCE3} %{SOURCE4} etc/dists/scripts | |
64 | install %{SOURCE5} %{SOURCE6} etc/init.d | |
5bce3792 SP |
65 | |
66 | %build | |
7975b809 | 67 | %{__libtoolize} |
88d20d00 | 68 | %{__aclocal} |
45139e8b | 69 | %{__autoconf} |
88d20d00 | 70 | %{__automake} |
ee16b02c | 71 | %configure \ |
5bce3792 SP |
72 | --enable-bashcomp \ |
73 | --enable-logrotate \ | |
74 | --disable-static | |
ee16b02c | 75 | |
7975b809 | 76 | %{__make} |
5bce3792 SP |
77 | |
78 | %install | |
79 | rm -rf $RPM_BUILD_ROOT | |
88d20d00 | 80 | install -d $RPM_BUILD_ROOT/etc/{cron.d,rc.d/init.d,sysconfig/interfaces} |
82e58e2a | 81 | |
88d20d00 TP |
82 | %{__make} install install-pld \ |
83 | vpsconfdir=/etc/sysconfig/vz-scripts \ | |
ee16b02c ER |
84 | DESTDIR=$RPM_BUILD_ROOT |
85 | ||
88d20d00 TP |
86 | %{__mv} $RPM_BUILD_ROOT/etc/init.d/vz* $RPM_BUILD_ROOT/etc/rc.d/init.d |
87 | %{__mv} $RPM_BUILD_ROOT/etc/sysconfig/{network-scripts,interfaces}/ifcfg-venet0 | |
88 | ||
5bce3792 SP |
89 | ln -s ../sysconfig/vz-scripts $RPM_BUILD_ROOT%{_configdir}/conf |
90 | ln -s ../vz/vz.conf $RPM_BUILD_ROOT/etc/sysconfig/vz | |
dfc54135 | 91 | |
82e58e2a | 92 | :> $RPM_BUILD_ROOT/etc/cron.d/vz |
5bce3792 | 93 | |
cbf91aa9 TP |
94 | # .so could go to vzctl-lib-devel, but since we don't have it... |
95 | rm -f $RPM_BUILD_ROOT%{_libdir}/libvzctl.{la,so} | |
96 | ||
5bce3792 SP |
97 | %clean |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
3bb7aa75 SP |
100 | %post |
101 | /bin/rm -rf /dev/vzctl | |
102 | /bin/mknod -m 600 /dev/vzctl c 126 0 | |
103 | if [ -f %{_configdir}/vz.conf ]; then | |
6efca13b | 104 | if ! grep -q "IPTABLES=" %{_configdir}/vz.conf 2>/dev/null; then |
3bb7aa75 SP |
105 | echo 'IPTABLES="ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length"' >> %{_configdir}/vz.conf |
106 | fi | |
107 | fi | |
ee16b02c | 108 | /sbin/chkconfig --add vz |
82e58e2a TP |
109 | /sbin/chkconfig --add vzeventd |
110 | %service vzeventd restart "vzeventd service" | |
3bb7aa75 SP |
111 | |
112 | %preun | |
113 | if [ $1 = 0 ]; then | |
ee16b02c | 114 | /sbin/chkconfig --del vz |
82e58e2a | 115 | /sbin/chkconfig --del vzeventd |
3bb7aa75 SP |
116 | fi |
117 | ||
dfc54135 TP |
118 | %post lib -p /sbin/ldconfig |
119 | ||
5bce3792 SP |
120 | %files |
121 | %defattr(644,root,root,755) | |
cbf91aa9 | 122 | %doc ChangeLog |
82e58e2a TP |
123 | %config(noreplace) /etc/bash_completion.d/%{name}.sh |
124 | %attr(640,root,root) %ghost /etc/cron.d/vz | |
88d20d00 | 125 | %attr(754,root,root) /etc/rc.d/init.d/vz* |
82e58e2a TP |
126 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name} |
127 | %attr(755,root,root) /etc/sysconfig/network-scripts/if*-venet | |
82e58e2a TP |
128 | %attr(640,root,root) %config(noreplace,missingok) %verify(not md5 mtime size) /etc/sysconfig/interfaces/ifcfg-venet0 |
129 | %dir /etc/sysconfig/vz-scripts | |
130 | %config(missingok) /etc/sysconfig/vz-scripts/ve-*.conf-sample | |
131 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vz-scripts/0.conf | |
132 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vz | |
133 | %config(noreplace) /etc/udev/rules.d/*-%{name}.rules | |
5bce3792 | 134 | %dir %{_configdir} |
5bce3792 | 135 | %dir %{_distconfdir} |
82e58e2a TP |
136 | %config(noreplace) %verify(not md5 mtime size) %{_distconfdir}/default |
137 | %config(noreplace) %{_distconfdir}/distribution.conf-template | |
88d20d00 | 138 | %config(noreplace) %{_distconfdir}/*.conf |
5bce3792 | 139 | %dir %{_distscriptdir} |
82e58e2a TP |
140 | %attr(755,root,root) %config(noreplace) %{_distscriptdir}/*.sh |
141 | %config(noreplace) %{_distscriptdir}/functions | |
142 | %{_configdir}/names | |
88d20d00 TP |
143 | %config(noreplace) %verify(not md5 mtime size) %{_configdir}/*conf |
144 | %attr(755,root,root) /sbin/ifup-local | |
9bdf81e9 TP |
145 | %attr(755,root,root) %{_sbindir}/*send |
146 | %attr(755,root,root) %{_sbindir}/vz* | |
82e58e2a TP |
147 | %dir /vz |
148 | /vz/[dlt]* | |
149 | %attr(700,root,root) %dir /vz/[pr]* | |
6efca13b | 150 | /var/lib/vzctl |
9bdf81e9 TP |
151 | %{_mandir}/man5/*.5* |
152 | %{_mandir}/man8/*.8* | |
5bce3792 | 153 | |
5bce3792 SP |
154 | %files lib |
155 | %defattr(644,root,root,755) | |
156 | %attr(755,root,root) %{_libdir}/libvzctl-*.so | |
dfc54135 | 157 | %attr(755,root,root) %{_libdir}/vzctl |