Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 242 lines (221 sloc) 8.351 kb
3db5def Kirill Kolyshkin .spec cleanup: some path defines changed
kolyshkin authored
1 %define _initddir %_sysconfdir/init.d
684802f Changed directory structure.
Igor Sukhih authored
2 %define _vzdir /vz
673cf04 Strip trailing whitespaces
Dmitry V. Levin authored
3 %define _lockdir %{_vzdir}/lock
4 %define _dumpdir %{_vzdir}/dump
49e6b5d Package /vz/private and /vz/root
Dmitry V. Levin authored
5 %define _privdir %{_vzdir}/private
6 %define _rootdir %{_vzdir}/root
673cf04 Strip trailing whitespaces
Dmitry V. Levin authored
7 %define _cachedir %{_vzdir}/template/cache
8 %define _veipdir /var/lib/vzctl/veip
71324a2 Kirill Kolyshkin vzctl.spec: fix to compile vzctl on 64-bit platform
kolyshkin authored
9 %define _pkglibdir %_libdir/vzctl
3db5def Kirill Kolyshkin .spec cleanup: some path defines changed
kolyshkin authored
10 %define _configdir %_sysconfdir/vz
11 %define _scriptdir /usr/share/vzctl/scripts
12 %define _vpsconfdir %_sysconfdir/sysconfig/vz-scripts
13 %define _netdir %_sysconfdir/sysconfig/network-scripts
14 %define _logrdir %_sysconfdir/logrotate.d
684802f Changed directory structure.
Igor Sukhih authored
15 %define _distconfdir %{_configdir}/dists
673cf04 Strip trailing whitespaces
Dmitry V. Levin authored
16 %define _namesdir %{_configdir}/names
c685a07 Initial version
OpenVZ team authored
17 %define _distscriptdir %{_distconfdir}/scripts
3db5def Kirill Kolyshkin .spec cleanup: some path defines changed
kolyshkin authored
18 %define _udevrulesdir %_sysconfdir/udev/rules.d
3e59709 Kirill Kolyshkin Fixed 'make install' for bash-completion script, added to spec
kolyshkin authored
19 %define _bashcdir %_sysconfdir/bash_completion.d
d1153cb Kirill Kolyshkin .spec cleanup: remove %_mandir define
kolyshkin authored
20
c685a07 Initial version
OpenVZ team authored
21
e0e65aa Kirill Kolyshkin vzctl.spec: VE->container, mention OpenVZ
kolyshkin authored
22 Summary: OpenVZ containers control utility
c685a07 Initial version
OpenVZ team authored
23 Name: vzctl
436a003 Kirill Kolyshkin Released vzctl-3.0.30
kolyshkin authored
24 Version: 3.0.30
157de53 Kirill Kolyshkin vzctl.spec: move release to a separate define
kolyshkin authored
25 %define rel 1
26 Release: %{rel}%{?dist}
7682708 Changed license agreement from QPL to GPL
Igor Sukhih authored
27 License: GPL
c685a07 Initial version
OpenVZ team authored
28 Group: System Environment/Kernel
b5fa3cd vzctl.spec: fixed according to Fedora Packaging Guidelines
Andy Shevchenko authored
29 Source: http://download.openvz.org/utils/%{name}/%{version}/src/%{name}-%{version}.tar.bz2
c685a07 Initial version
OpenVZ team authored
30 ExclusiveOS: Linux
b5fa3cd vzctl.spec: fixed according to Fedora Packaging Guidelines
Andy Shevchenko authored
31 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
7c03389 Removed strict vzkernel version requirement - left only vzkernel
Dmitry Mishin authored
32 Requires: vzkernel
4cc6257 Kirill Kolyshkin vzeventd: initial implementation
kolyshkin authored
33 Requires: vzeventmod
b5fa3cd vzctl.spec: fixed according to Fedora Packaging Guidelines
Andy Shevchenko authored
34 URL: http://openvz.org/
c685a07 Initial version
OpenVZ team authored
35 # these reqs are for vz helper scripts
36 Requires: bash
37 Requires: gawk
38 Requires: sed
39 Requires: grep
40 Requires: /sbin/chkconfig
41 Requires: vzquota >= 2.7.0-4
42 Requires: fileutils
43 Requires: vzctl-lib = %{version}-%{release}
44 Requires: tar
45
0af3849 Added vzmigrate script
Igor Sukhih authored
46 # requires for vzmigrate purposes
47 Requires: rsync
7740e8b Fixed requires for ssh & awk
Igor Sukhih authored
48 Requires: gawk
49 Requires: openssh
0af3849 Added vzmigrate script
Igor Sukhih authored
50
f8c9157 Kirill Kolyshkin vzctl.spec: add vzkernel-install provides
kolyshkin authored
51 # Virtual provides for newer RHEL6 kernel
cb79f9a Kirill Kolyshkin Fixed virtual-kernel-install provides for new RHEL6 kernel
kolyshkin authored
52 Provides: virtual-vzkernel-install = 2.0.0
f8c9157 Kirill Kolyshkin vzctl.spec: add vzkernel-install provides
kolyshkin authored
53
c685a07 Initial version
OpenVZ team authored
54 %description
e0e65aa Kirill Kolyshkin vzctl.spec: VE->container, mention OpenVZ
kolyshkin authored
55 This utility allows system administator to control OpenVZ containers,
d5400e0 Kirill Kolyshkin Global VPS -> VE renaming madness.
kolyshkin authored
56 i.e. create, start, shutdown, set various options and limits etc.
c685a07 Initial version
OpenVZ team authored
57
58 %prep
de619e1 Switched to new versioning scheme
Igor Sukhih authored
59 %setup
9d4e2df Kirill Kolyshkin Made vzctl.spec working.
kolyshkin authored
60
c685a07 Initial version
OpenVZ team authored
61 %build
9d4e2df Kirill Kolyshkin Made vzctl.spec working.
kolyshkin authored
62 CFLAGS="$RPM_OPT_FLAGS" %configure \
63 --enable-bashcomp \
64 --enable-logrotate \
65 --disable-static
04cd9e1 Kirill Kolyshkin vzctl.spec: use %_smp_mflags to speed up rpm build
kolyshkin authored
66 make %{?_smp_mflags}
c685a07 Initial version
OpenVZ team authored
67
68 %install
69 rm -rf $RPM_BUILD_ROOT
17f19a3 Kirill Kolyshkin Add ARP records for containers' IPs on network interface up
kolyshkin authored
70 make DESTDIR=$RPM_BUILD_ROOT vpsconfdir=%{_vpsconfdir} \
71 install install-redhat-from-spec
3db5def Kirill Kolyshkin .spec cleanup: some path defines changed
kolyshkin authored
72 ln -s ../sysconfig/vz-scripts $RPM_BUILD_ROOT/%{_configdir}/conf
684802f Changed directory structure.
Igor Sukhih authored
73 ln -s ../vz/vz.conf $RPM_BUILD_ROOT/etc/sysconfig/vz
e816ee0 Kirill Kolyshkin vzctl.spec: add /etc/sysconfig/vzeventd as %ghost
kolyshkin authored
74 # Needed for %ghost in %files section below
75 touch $RPM_BUILD_ROOT/etc/sysconfig/vzeventd
9d4e2df Kirill Kolyshkin Made vzctl.spec working.
kolyshkin authored
76 # This could go to vzctl-lib-devel, but since we don't have it...
77 rm -f $RPM_BUILD_ROOT/%_libdir/libvzctl.{la,so}
c685a07 Initial version
OpenVZ team authored
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
81
82 %files
83 %defattr(-,root,root)
22cfbfa Kirill Kolyshkin init.d/vzfunctions: moved to $vzlibdir/initd-functions
kolyshkin authored
84 %dir %{_pkglibdir}/scripts
85 %attr(755,root,root) %{_pkglibdir}/scripts/initd-functions
c685a07 Initial version
OpenVZ team authored
86 %attr(755,root,root) %{_initddir}/vz
4cc6257 Kirill Kolyshkin vzeventd: initial implementation
kolyshkin authored
87 %attr(755,root,root) %{_initddir}/vzeventd
684802f Changed directory structure.
Igor Sukhih authored
88 %dir %attr(755,root,root) %{_lockdir}
89 %dir %attr(755,root,root) %{_dumpdir}
49e6b5d Package /vz/private and /vz/root
Dmitry V. Levin authored
90 %dir %attr(700,root,root) %{_privdir}
91 %dir %attr(700,root,root) %{_rootdir}
684802f Changed directory structure.
Igor Sukhih authored
92 %dir %attr(755,root,root) %{_cachedir}
93 %dir %attr(755,root,root) %{_veipdir}
94 %dir %attr(755,root,root) %{_configdir}
2ee6384 Added VPS name support
Igor Sukhih authored
95 %dir %attr(755,root,root) %{_namesdir}
684802f Changed directory structure.
Igor Sukhih authored
96 %dir %attr(755,root,root) %{_vpsconfdir}
97 %dir %attr(755,root,root) %{_distconfdir}
98 %dir %attr(755,root,root) %{_distscriptdir}
99 %dir %attr(755,root,root) %{_vzdir}
c685a07 Initial version
OpenVZ team authored
100 %attr(755,root,root) %{_sbindir}/vzctl
4cc6257 Kirill Kolyshkin vzeventd: initial implementation
kolyshkin authored
101 %attr(755,root,root) %{_sbindir}/vzeventd
c685a07 Initial version
OpenVZ team authored
102 %attr(755,root,root) %{_sbindir}/arpsend
dfaf3a7 Added ipv6 support
Igor Sukhih authored
103 %attr(755,root,root) %{_sbindir}/ndsend
c685a07 Initial version
OpenVZ team authored
104 %attr(755,root,root) %{_sbindir}/vzsplit
105 %attr(755,root,root) %{_sbindir}/vzlist
106 %attr(755,root,root) %{_sbindir}/vzmemcheck
107 %attr(755,root,root) %{_sbindir}/vzcpucheck
142c892 Changed path to vznetcfg script
Thorsten Schifferdecker authored
108 %attr(755,root,root) %{_sbindir}/vznetcfg
e712094 Kirill Kolyshkin vzctl.spec: add forgotten vznetaddbr script
kolyshkin authored
109 %attr(755,root,root) %{_sbindir}/vznetaddbr
c685a07 Initial version
OpenVZ team authored
110 %attr(755,root,root) %{_sbindir}/vzcalc
111 %attr(755,root,root) %{_sbindir}/vzpid
112 %attr(755,root,root) %{_sbindir}/vzcfgvalidate
0af3849 Added vzmigrate script
Igor Sukhih authored
113 %attr(755,root,root) %{_sbindir}/vzmigrate
17f19a3 Kirill Kolyshkin Add ARP records for containers' IPs on network interface up
kolyshkin authored
114 %attr(755,root,root) %{_sbindir}/vzifup-post
0a58846 Kirill Kolyshkin Add vzubc - a tool to show beancounters in a human-readable format
kolyshkin authored
115 %attr(755,root,root) %{_sbindir}/vzubc
c685a07 Initial version
OpenVZ team authored
116 %attr(644,root,root) %{_logrdir}/vzctl
117 %attr(644,root,root) %{_distconfdir}/distribution.conf-template
118 %attr(644,root,root) %{_distconfdir}/default
119 %attr(755,root,root) %{_distscriptdir}/*.sh
120 %attr(644,root,root) %{_distscriptdir}/functions
121 %attr(755,root,root) %{_netdir}/ifup-venet
122 %attr(755,root,root) %{_netdir}/ifdown-venet
123 %attr(644,root,root) %{_netdir}/ifcfg-venet0
124 %attr(644, root, root) %{_mandir}/man8/vzctl.8.*
746cbf0 man/vzeventd.8: add
Thorsten Schifferdecker authored
125 %attr(644, root, root) %{_mandir}/man8/vzeventd.8.*
9c2cb9e Fixed vzmigrate.8 man page installation
Igor Sukhih authored
126 %attr(644, root, root) %{_mandir}/man8/vzmigrate.8.*
c685a07 Initial version
OpenVZ team authored
127 %attr(644, root, root) %{_mandir}/man8/arpsend.8.*
5d9bd5f Add man page for ndsend
Thorsten Schifferdecker authored
128 %attr(644, root, root) %{_mandir}/man8/ndsend.8.*
c685a07 Initial version
OpenVZ team authored
129 %attr(644, root, root) %{_mandir}/man8/vzsplit.8.*
130 %attr(644, root, root) %{_mandir}/man8/vzcfgvalidate.8.*
131 %attr(644, root, root) %{_mandir}/man8/vzmemcheck.8.*
132 %attr(644, root, root) %{_mandir}/man8/vzcalc.8.*
133 %attr(644, root, root) %{_mandir}/man8/vzpid.8.*
134 %attr(644, root, root) %{_mandir}/man8/vzcpucheck.8.*
07b371a Kirill Kolyshkin vzubc: add a man page
kolyshkin authored
135 %attr(644, root, root) %{_mandir}/man8/vzubc.8.*
c685a07 Initial version
OpenVZ team authored
136 %attr(644, root, root) %{_mandir}/man8/vzlist.8.*
17f19a3 Kirill Kolyshkin Add ARP records for containers' IPs on network interface up
kolyshkin authored
137 %attr(644, root, root) %{_mandir}/man8/vzifup-post.8.*
7725ca7 Kirill Kolyshkin man: vps.conf(5) renamed to ctid.conf(5)
kolyshkin authored
138 %attr(644, root, root) %{_mandir}/man5/ctid.conf.5.*
684802f Changed directory structure.
Igor Sukhih authored
139 %attr(644, root, root) %{_mandir}/man5/vz.conf.5.*
3db5def Kirill Kolyshkin .spec cleanup: some path defines changed
kolyshkin authored
140 %attr(644, root, root) %{_udevrulesdir}/*
3e59709 Kirill Kolyshkin Fixed 'make install' for bash-completion script, added to spec
kolyshkin authored
141 %attr(644, root, root) %{_bashcdir}/*
c685a07 Initial version
OpenVZ team authored
142
684802f Changed directory structure.
Igor Sukhih authored
143 %config(noreplace) %{_configdir}/vz.conf
f0a858d Kirill Kolyshkin vzctl start/runscript: add ability to set per-CT osrelease
kolyshkin authored
144 %config(noreplace) %{_configdir}/osrelease.conf
93d7f8c Kirill Kolyshkin scripts/vps-download: add config file
kolyshkin authored
145 %config(noreplace) %{_configdir}/download.conf
c685a07 Initial version
OpenVZ team authored
146 %config(noreplace) %{_distconfdir}/*.conf
57595c3 Kirill Kolyshkin Rename sample config file 'vps.basic' to 'basic'
kolyshkin authored
147 %config %{_vpsconfdir}/ve-basic.conf-sample
684802f Changed directory structure.
Igor Sukhih authored
148 %config %{_vpsconfdir}/ve-light.conf-sample
71ad397 Kirill Kolyshkin vzctl.spec: add unlimited CT config
kolyshkin authored
149 %config %{_vpsconfdir}/ve-unlimited.conf-sample
b1b77d8 Kirill Kolyshkin etc/conf: add vswap configs
kolyshkin authored
150 %config %{_vpsconfdir}/ve-vswap-256m.conf-sample
151 %config %{_vpsconfdir}/ve-vswap-512m.conf-sample
152 %config %{_vpsconfdir}/ve-vswap-1024m.conf-sample
fff2985 Kirill Kolyshkin etc/conf/ve-vswap-1g.conf-sample: added as alias to 1024m
kolyshkin authored
153 %config %{_vpsconfdir}/ve-vswap-1g.conf-sample
a00a0b4 Kirill Kolyshkin etc/conf: add vswap configs for 2GB and 4GB RAM
kolyshkin authored
154 %config %{_vpsconfdir}/ve-vswap-2g.conf-sample
155 %config %{_vpsconfdir}/ve-vswap-4g.conf-sample
5543be3 Added VE0 UB setup functionality:
Igor Sukhih authored
156 %config %{_vpsconfdir}/0.conf
684802f Changed directory structure.
Igor Sukhih authored
157
158 %attr(777, root, root) /etc/vz/conf
159 %config /etc/sysconfig/vz
e816ee0 Kirill Kolyshkin vzctl.spec: add /etc/sysconfig/vzeventd as %ghost
kolyshkin authored
160 %ghost %config(missingok) /etc/sysconfig/vzeventd
c685a07 Initial version
OpenVZ team authored
161
162 %post
163 /bin/rm -rf /dev/vzctl
99ddb02 Create /dev/vzctl with -m 600
Igor Sukhih authored
164 /bin/mknod -m 600 /dev/vzctl c 126 0
684802f Changed directory structure.
Igor Sukhih authored
165 if [ -f %{_configdir}/vz.conf ]; then
166 if ! grep "IPTABLES=" %{_configdir}/vz.conf >/dev/null 2>&1; then
167 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
c685a07 Initial version
OpenVZ team authored
168 fi
169 fi
684802f Changed directory structure.
Igor Sukhih authored
170 /sbin/chkconfig --add vz > /dev/null 2>&1
4cc6257 Kirill Kolyshkin vzeventd: initial implementation
kolyshkin authored
171 /sbin/chkconfig --add vzeventd > /dev/null 2>&1
c685a07 Initial version
OpenVZ team authored
172
db641a4 Fixed network sturtup under SuSE
Igor Sukhih authored
173 if [ -f /etc/SuSE-release ]; then
174 NET_CFG='ifdown-venet ifup-venet'
673cf04 Strip trailing whitespaces
Dmitry V. Levin authored
175 if ! grep -q -E "^alias venet0" /etc/modprobe.conf; then
db641a4 Fixed network sturtup under SuSE
Igor Sukhih authored
176 echo "alias venet0 vznet" >> /etc/modprobe.conf
177 fi
178 ln -f /etc/sysconfig/network-scripts/ifcfg-venet0 /etc/sysconfig/network/ifcfg-venet0
179 for file in ${NET_CFG}; do
180 ln -sf /etc/sysconfig/network-scripts/${file} /etc/sysconfig/network/scripts/${file}
181 done
182 fi
17f19a3 Kirill Kolyshkin Add ARP records for containers' IPs on network interface up
kolyshkin authored
183 # Install a symlink to vzifup-post
184 if [ -f /etc/SuSE-release ]; then
185 ln -sf %{_sbindir}/vzifup-post /etc/sysconfig/network/if-up.d/
186 else # RedHat/Fedora/CentOS case
187 if [ ! -e /sbin/ifup-local ]; then
188 ln -sf %{_sbindir}/vzifup-post /sbin/ifup-local
9cadfac Kirill Kolyshkin install-redhat: fix case when ifup-local is already set up
kolyshkin authored
189 elif readlink /sbin/ifup-local |
190 fgrep -q %{_sbindir}/vzifup-post; then
191 : # Nothing to do, symlink already points to our script
17f19a3 Kirill Kolyshkin Add ARP records for containers' IPs on network interface up
kolyshkin authored
192 else
193 echo " WARNING: file /sbin/ifup-local is present!"
194 echo " You have to manually edit the above file so that"
195 echo " it calls %{_sbindir}/vzifup-post"
196 fi
197 fi
db641a4 Fixed network sturtup under SuSE
Igor Sukhih authored
198
3bf6216 Kirill Kolyshkin vzctl.spec: make sure to start vzdaemon after upgrade
kolyshkin authored
199 # (Upgrading from <= vzctl-3.0.24)
200 # If vz is running and vzeventd is not, start it
948f416 Kirill Kolyshkin vzctl.spec: fix shell redirection in %post
kolyshkin authored
201 if %{_initddir}/vz status >/dev/null 2>&1; then
202 if ! %{_initddir}/vzeventd status >/dev/null 2>&1; then
3bf6216 Kirill Kolyshkin vzctl.spec: make sure to start vzdaemon after upgrade
kolyshkin authored
203 %{_initddir}/vzeventd start
204 fi
205 fi
206 exit 0
207
c685a07 Initial version
OpenVZ team authored
208 %preun
673cf04 Strip trailing whitespaces
Dmitry V. Levin authored
209 if [ $1 = 0 ]; then
684802f Changed directory structure.
Igor Sukhih authored
210 /sbin/chkconfig --del vz >/dev/null 2>&1
4cc6257 Kirill Kolyshkin vzeventd: initial implementation
kolyshkin authored
211 /sbin/chkconfig --del vzeventd >/dev/null 2>&1
c685a07 Initial version
OpenVZ team authored
212 fi
213
214 %package lib
e0e65aa Kirill Kolyshkin vzctl.spec: VE->container, mention OpenVZ
kolyshkin authored
215 Summary: Containers control API library
c685a07 Initial version
OpenVZ team authored
216 Group: System Environment/Kernel
217
218 %description lib
e0e65aa Kirill Kolyshkin vzctl.spec: VE->container, mention OpenVZ
kolyshkin authored
219 Containers control API library
c685a07 Initial version
OpenVZ team authored
220
221 %files lib
222 %defattr(-,root,root)
9d4e2df Kirill Kolyshkin Made vzctl.spec working.
kolyshkin authored
223 %attr(755,root,root) %{_libdir}/libvzctl-*.so
75b3d92 Kirill Kolyshkin Specfile modified to work with new autotools-based build/install system
kolyshkin authored
224 %dir %{_pkglibdir}
225 %dir %{_pkglibdir}/scripts
226 %attr(755,root,root) %{_pkglibdir}/scripts/vps-functions
227 %attr(755,root,root) %{_pkglibdir}/scripts/vps-net_add
228 %attr(755,root,root) %{_pkglibdir}/scripts/vps-net_del
229 %attr(755,root,root) %{_pkglibdir}/scripts/vps-create
73ad8f7 Kirill Kolyshkin vzctl create: add ability to auto-download template cache
kolyshkin authored
230 %attr(755,root,root) %{_pkglibdir}/scripts/vps-download
4cc6257 Kirill Kolyshkin vzeventd: initial implementation
kolyshkin authored
231 %attr(755,root,root) %{_pkglibdir}/scripts/vzevent-stop
232 %attr(755,root,root) %{_pkglibdir}/scripts/vzevent-reboot
115195e Andrew Vagin Add vps-pci script
avagin authored
233 %attr(755,root,root) %{_pkglibdir}/scripts/vps-pci
b5fa3cd vzctl.spec: fixed according to Fedora Packaging Guidelines
Andy Shevchenko authored
234
235 %changelog
236 * Wed Jun 13 2007 Andy Shevchenko <andriy@asplinux.com.ua> - 3.0.17-1
237 - fixed according to Fedora Packaging Guidelines:
238 - use dist tag
239 - added URL tag
240 - use full url for source
241 - changed BuildRoot tag
Something went wrong with that request. Please try again.