]>
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 |
06ad1919 | 4 | Version: 3.2.1 |
8181d2bf | 5 | Release: 1 |
4735c335 JB |
6 | License: GPL v2+ |
7 | Group: Applications/System | |
5bce3792 | 8 | Source0: http://download.openvz.org/utils/vzctl/%{version}/src/%{name}-%{version}.tar.bz2 |
06ad1919 | 9 | # Source0-md5: 7267693926e3fc9733acddc34518c7fd |
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/ |
4735c335 JB |
18 | BuildRequires: autoconf >= 2.59 |
19 | BuildRequires: automake >= 1:1.9 | |
7975b809 | 20 | BuildRequires: libtool |
4735c335 | 21 | BuildRequires: libxml2-devel >= 1:2.6.16 |
8181d2bf | 22 | BuildRequires: ploop-devel > 1.1-1 |
4735c335 | 23 | Requires: ploop-libs > 1.1-1 |
ee16b02c | 24 | Requires: %{name}-lib = %{version}-%{release} |
82e58e2a TP |
25 | Requires(post,preun): /sbin/chkconfig |
26 | Requires: rc-scripts | |
5bce3792 | 27 | # these reqs are for vz helper scripts |
5bce3792 SP |
28 | Requires: bash |
29 | Requires: ed | |
30 | Requires: fileutils | |
31 | Requires: gawk | |
32 | Requires: grep | |
33 | Requires: sed | |
34 | Requires: tar | |
5bce3792 | 35 | Requires: vzquota >= 2.7.0-4 |
5bce3792 | 36 | # requires for vzmigrate purposes |
cbf91aa9 TP |
37 | Suggests: gawk |
38 | Suggests: openssh | |
39 | Suggests: rsync | |
ee16b02c | 40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
5bce3792 | 41 | |
82e58e2a TP |
42 | %define _configdir %{_sysconfdir}/vz |
43 | %define _distconfdir %{_configdir}/dists | |
44 | %define _distscriptdir %{_distconfdir}/scripts | |
45 | ||
5bce3792 | 46 | %description |
9bdf81e9 TP |
47 | This utility allows system administator to control OpenVZ containers, |
48 | i.e. create, start, shutdown, set various options and limits etc. | |
49 | ||
50 | %description -l pl.UTF-8 | |
4735c335 JB |
51 | Narzędzia vztcl pozwalają administratorowi zarządzać środowiskami |
52 | wirtualnymi (kontenerami) OpenVZ, tzn. tworzyć je, uruchamiać, | |
53 | zatrzymywać, ustawiać różne opcje i limity itp. | |
5bce3792 | 54 | |
ee16b02c | 55 | %package lib |
9bdf81e9 | 56 | Summary: OpenVZ containers control API library |
4735c335 | 57 | Summary(pl.UTF-8): Biblioteka do zarządzania kontenerami OpenVZ |
82e58e2a | 58 | Group: Libraries |
ee16b02c ER |
59 | |
60 | %description lib | |
9bdf81e9 | 61 | OpenVZ containers control API library. |
ee16b02c | 62 | |
4735c335 JB |
63 | %description lib -l pl.UTF-8 |
64 | Biblioteka do zarządzania kontenerami OpenVZ | |
65 | ||
70fd0c05 ER |
66 | %package -n bash-completion-%{name} |
67 | Summary: bash-completion for vzctl | |
4735c335 | 68 | Summary(pl.UTF-8): bashowe uzupełnianie linii poleceń dla vzctl |
70fd0c05 ER |
69 | Group: Applications/Shells |
70 | Requires: bash-completion | |
71 | ||
72 | %description -n bash-completion-%{name} | |
73 | This package provides bash-completion for vzctl. | |
74 | ||
75 | %description -n bash-completion-%{name} -l pl.UTF-8 | |
4735c335 | 76 | Pakiet ten dostarcza bashowe uzupełnianie linii poleceń dla vzctl. |
70fd0c05 | 77 | |
5bce3792 SP |
78 | %prep |
79 | %setup -q | |
88d20d00 | 80 | %patch0 -p1 |
f701420a ER |
81 | cp -p %{SOURCE1} etc/dists |
82 | install -p %{SOURCE2} %{SOURCE3} %{SOURCE4} etc/dists/scripts | |
83 | install -p %{SOURCE5} %{SOURCE6} etc/init.d | |
5bce3792 SP |
84 | |
85 | %build | |
7975b809 | 86 | %{__libtoolize} |
88d20d00 | 87 | %{__aclocal} |
45139e8b | 88 | %{__autoconf} |
88d20d00 | 89 | %{__automake} |
ee16b02c | 90 | %configure \ |
4735c335 | 91 | --disable-silent-rules \ |
5bce3792 | 92 | --enable-bashcomp \ |
4735c335 | 93 | --enable-logrotate |
ee16b02c | 94 | |
7975b809 | 95 | %{__make} |
5bce3792 SP |
96 | |
97 | %install | |
98 | rm -rf $RPM_BUILD_ROOT | |
88d20d00 | 99 | install -d $RPM_BUILD_ROOT/etc/{cron.d,rc.d/init.d,sysconfig/interfaces} |
82e58e2a | 100 | |
88d20d00 TP |
101 | %{__make} install install-pld \ |
102 | vpsconfdir=/etc/sysconfig/vz-scripts \ | |
ee16b02c ER |
103 | DESTDIR=$RPM_BUILD_ROOT |
104 | ||
88d20d00 TP |
105 | %{__mv} $RPM_BUILD_ROOT/etc/init.d/vz* $RPM_BUILD_ROOT/etc/rc.d/init.d |
106 | %{__mv} $RPM_BUILD_ROOT/etc/sysconfig/{network-scripts,interfaces}/ifcfg-venet0 | |
107 | ||
5bce3792 SP |
108 | ln -s ../sysconfig/vz-scripts $RPM_BUILD_ROOT%{_configdir}/conf |
109 | ln -s ../vz/vz.conf $RPM_BUILD_ROOT/etc/sysconfig/vz | |
dfc54135 | 110 | |
82e58e2a | 111 | :> $RPM_BUILD_ROOT/etc/cron.d/vz |
5bce3792 | 112 | |
f701420a ER |
113 | # this could go to vzctl-lib-devel, but since we don't have it... |
114 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvzctl.{la,so} | |
cbf91aa9 | 115 | |
5bce3792 SP |
116 | %clean |
117 | rm -rf $RPM_BUILD_ROOT | |
118 | ||
3bb7aa75 SP |
119 | %post |
120 | /bin/rm -rf /dev/vzctl | |
121 | /bin/mknod -m 600 /dev/vzctl c 126 0 | |
122 | if [ -f %{_configdir}/vz.conf ]; then | |
6efca13b | 123 | if ! grep -q "IPTABLES=" %{_configdir}/vz.conf 2>/dev/null; then |
3bb7aa75 SP |
124 | 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 |
125 | fi | |
126 | fi | |
ee16b02c | 127 | /sbin/chkconfig --add vz |
82e58e2a TP |
128 | /sbin/chkconfig --add vzeventd |
129 | %service vzeventd restart "vzeventd service" | |
3bb7aa75 SP |
130 | |
131 | %preun | |
70fd0c05 | 132 | if [ "$1" = 0 ]; then |
ee16b02c | 133 | /sbin/chkconfig --del vz |
82e58e2a | 134 | /sbin/chkconfig --del vzeventd |
3bb7aa75 SP |
135 | fi |
136 | ||
dfc54135 TP |
137 | %post lib -p /sbin/ldconfig |
138 | ||
5bce3792 SP |
139 | %files |
140 | %defattr(644,root,root,755) | |
cbf91aa9 | 141 | %doc ChangeLog |
82e58e2a | 142 | %attr(640,root,root) %ghost /etc/cron.d/vz |
4735c335 JB |
143 | %attr(754,root,root) /etc/rc.d/init.d/vz |
144 | %attr(754,root,root) /etc/rc.d/init.d/vzeventd | |
82e58e2a | 145 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name} |
244ec0f2 | 146 | %dir /etc/sysconfig/network-scripts |
82e58e2a | 147 | %attr(755,root,root) /etc/sysconfig/network-scripts/if*-venet |
82e58e2a TP |
148 | %attr(640,root,root) %config(noreplace,missingok) %verify(not md5 mtime size) /etc/sysconfig/interfaces/ifcfg-venet0 |
149 | %dir /etc/sysconfig/vz-scripts | |
150 | %config(missingok) /etc/sysconfig/vz-scripts/ve-*.conf-sample | |
151 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vz-scripts/0.conf | |
152 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vz | |
153 | %config(noreplace) /etc/udev/rules.d/*-%{name}.rules | |
5bce3792 | 154 | %dir %{_configdir} |
5bce3792 | 155 | %dir %{_distconfdir} |
82e58e2a TP |
156 | %config(noreplace) %verify(not md5 mtime size) %{_distconfdir}/default |
157 | %config(noreplace) %{_distconfdir}/distribution.conf-template | |
88d20d00 | 158 | %config(noreplace) %{_distconfdir}/*.conf |
5bce3792 | 159 | %dir %{_distscriptdir} |
82e58e2a TP |
160 | %attr(755,root,root) %config(noreplace) %{_distscriptdir}/*.sh |
161 | %config(noreplace) %{_distscriptdir}/functions | |
162 | %{_configdir}/names | |
88d20d00 TP |
163 | %config(noreplace) %verify(not md5 mtime size) %{_configdir}/*conf |
164 | %attr(755,root,root) /sbin/ifup-local | |
4735c335 JB |
165 | %attr(755,root,root) %{_sbindir}/arpsend |
166 | %attr(755,root,root) %{_sbindir}/ndsend | |
9bdf81e9 | 167 | %attr(755,root,root) %{_sbindir}/vz* |
82e58e2a | 168 | %dir /vz |
4735c335 JB |
169 | /vz/dump |
170 | /vz/lock | |
171 | /vz/template | |
172 | %attr(700,root,root) %dir /vz/private | |
173 | %attr(700,root,root) %dir /vz/root | |
6efca13b | 174 | /var/lib/vzctl |
4735c335 JB |
175 | %{_mandir}/man5/ctid.conf.5* |
176 | %{_mandir}/man5/vz.conf.5* | |
177 | %{_mandir}/man8/arpsend.8* | |
178 | %{_mandir}/man8/ndsend.8* | |
179 | %{_mandir}/man8/vz*.8* | |
5bce3792 | 180 | |
5bce3792 SP |
181 | %files lib |
182 | %defattr(644,root,root,755) | |
183 | %attr(755,root,root) %{_libdir}/libvzctl-*.so | |
dfc54135 | 184 | %attr(755,root,root) %{_libdir}/vzctl |
70fd0c05 ER |
185 | |
186 | %files -n bash-completion-%{name} | |
187 | %defattr(644,root,root,755) | |
188 | /etc/bash_completion.d/%{name}.sh |