3 ## This package understands the following switches:
4 ## --without dietlibc ... disable usage of dietlibc
5 ## --without xalan ... do not require/use the xalan xslt processor
7 %define confdir %_sysconfdir/vservers
8 %define confdefaultdir %confdir/.defaults
9 %define pkglibdir %_libdir/%name
10 %define __chattr /usr/bin/chattr
11 %define chkconfig /sbin/chkconfig
13 Summary: Linux virtual server utilities
19 Group: System Environment/Base
20 URL: http://savannah.nongnu.org/projects/util-vserver/
21 Source0: http://savannah.nongnu.org/download/util-vserver/stable.pkg/%version/%name-%version.tar.bz2
22 BuildRoot: %_tmppath/%name-%version-%release-root
24 Requires: %name-core = %epoch:%version-%release
25 Requires: %name-lib = %epoch:%version-%release
26 Requires: diffutils mktemp sed
27 Provides: vserver = %epoch:%version-%release
28 Obsoletes: vserver < %epoch:%version
29 BuildRequires: mount vconfig gawk iproute iptables
30 BuildRequires: gcc-c++ wget
31 BuildRequires: e2fsprogs-devel
32 BuildRequires: doxygen tetex-latex
33 Requires(post): %__chattr
34 Requires(pre): %pkglibdir
35 Requires(postun): %pkglibdir
36 %{!?_without_dietlibc:BuildRequires: dietlibc >= 0:0.24}
37 %{!?_without_xalan:BuildRequires: xalan-j}
40 Summary: Dynamic libraries for util-vserver
41 Group: System Environment/Libraries
44 Summary: The core-utilities for util-vserver
45 Group: Applications/System
49 Summary: Tools which can be used to build vservers
50 Group: Applications/System
51 Requires: rpm apt wget binutils tar e2fsprogs
52 Requires: %name = %epoch:%version-%release
53 Requires(pre): %confdir
54 Requires(postun): %confdir
57 Summary: SysV-initscripts for vserver
58 Group: System Environment/Base
59 Provides: init(%name) = sysv
60 Requires: make diffutils
62 Requires: %name = %epoch:%version-%release
63 Requires(post): %chkconfig
64 Requires(preun): %chkconfig
65 Requires(pre): %_initrddir %pkglibdir
66 requires(postun): %_initrddir %pkglibdir
69 Summary: Legacy utilities for util-vserver
70 Group: Applications/System
71 Requires: %name = %epoch:%version-%release
72 Requires(post): %chkconfig
73 Requires(preun): %chkconfig
74 Requires(pre): %_initrddir %pkglibdir
75 requires(postun): %_initrddir %pkglibdir
78 Summary: Header-files and libraries which are needed to develop vserver based applications
79 Group: Development/Libraries
84 This package provides the components and a framework to setup virtual
85 servers. A virtual server runs inside a linux server. It is nevertheless
86 highly independent. As such, you can run various services with normal
87 configuration. The various vservers can't interact with each other and
88 can't interact with services in the main server.
90 This requires a special kernel supporting the new new_s_context and
91 set_ipv4root system call.
106 %configure --with-initrddir=%_initrddir --enable-release \
107 %{?_without_dietlibc:--disable-dietlibc}
109 %__make %{?_smp_mflags} all
110 %__make %{?_smp_mflags} doc
114 rm -rf $RPM_BUILD_ROOT
115 %__make DESTDIR="$RPM_BUILD_ROOT" install install-distribution
117 rm -f $RPM_BUILD_ROOT/%_libdir/*.la
119 MANIFEST_CONFIG='%config' \
120 MANIFEST_CONFIG_NOREPLACE='%config(noreplace)' \
121 contrib/make-manifest %name $RPM_BUILD_ROOT contrib/manifest.dat
129 rm -rf $RPM_BUILD_ROOT
133 test -d /vservers || mkdir -m0000 /vservers
134 test -d /vservers/.pkg || mkdir -m0755 /vservers/.pkg
136 f="%confdefaultdir/vdirbase"; test -L "$f" -o -e "$f" || ln -s /vservers "$f"
137 f="%confdefaultdir/run.rev"; test -L "$f" -o -e "$f" || ln -s /var/run/vservers.rev "$f"
139 %_sbindir/setattr --barrier /vservers || :
142 %post lib -p /sbin/ldconfig
143 %postun lib -p /sbin/ldconfig
147 %chkconfig --add vservers-default
148 %chkconfig --add vprocunhide
153 test "$1" != 0 || %_initrddir/vprocunhide stop &>/dev/null || :
155 test "$1" != 0 || %chkconfig --del vprocunhide
156 test "$1" != 0 || %chkconfig --del vservers-default
160 test "$1" = 0 || %_initrddir/vprocunhide condrestart >/dev/null || :
163 ## Temporary workaround to remove old v_* files; it will conflict
164 ## somehow with the -legacy package but can be fixed by reinstalling
166 ## TODO: remove me in the final .spec file
167 %define v_services httpd named portmap sendmail smb sshd xinetd gated
168 %triggerun sysv -- util-vserver-sysv < 0.30.198
169 for i in %v_services; do
170 %chkconfig --del v_$i || :
175 %chkconfig --add rebootmgr
176 %chkconfig --add vservers-legacy
178 for i in %v_services; do
179 %chkconfig --add v_$i
184 test "$1" != 0 || %_initrddir/rebootmgr stop &>/dev/null || :
186 test "$1" != 0 || for i in %v_services; do
187 %chkconfig --del v_$i
190 test "$1" != 0 || %chkconfig --del rebootmgr
191 test "$1" != 0 || %chkconfig --del vservers-legacy
194 test "$1" = 0 || %_initrddir/rebootmgr condrestart >/dev/null || :
197 %files -f %name-base.list
198 %defattr(-,root,root,-)
199 %doc AUTHORS COPYING ChangeLog NEWS README THANKS
200 %doc doc/*.html doc/*.css
204 %dir %confdefaultdir/apps
205 %dir %confdefaultdir/files
206 %dir %pkglibdir/defaults
207 %ghost %confdefaultdir/vdirbase
208 %ghost %confdefaultdir/run.rev
210 %dir /var/run/vservers
211 %dir /var/run/vservers.rev
212 %dir /var/run/vshelper
215 %files lib -f %name-lib.list
216 %files sysv -f %name-sysv.list
219 %files core -f %name-core.list
220 %defattr(-,root,root,-)
224 %files build -f %name-build.list
225 %defattr(-,root,root,-)
226 %dir %confdir/.distributions
227 %dir %confdir/.distributions/*
228 %dir %confdir/.distributions/*/apt
231 %files legacy -f %name-legacy.list
232 %defattr(-,root,root,-)
233 %dir %pkglibdir/legacy
236 %files devel -f %name-devel.list
237 %defattr(-,root,root,-)
238 %doc lib/apidoc/latex/refman.pdf
243 * Wed Jan 26 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.198-0.3
244 - updated BuildRequires:
245 - use 'setattr --barrier' instead of 'chattr +t' in the %post scriptlet
246 - moved the v_* initscripts to legacy
247 - do not ship the /vservers directory itself; as it is immutable, the
248 extraction will fail else
250 * Thu Sep 9 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.194-0
251 - documented switches for 'rpmbuild'
253 * Wed May 26 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.215-0
254 - (re)added the MANIFEST_* variables which were lost some time ago;
255 this will preserve %%config files...
257 * Mon Mar 15 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.202-0
258 - use file-list for sysv scripts also
260 * Sat Mar 6 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.198-0
261 - added vprocunhide-service support
262 - added doxygen support
265 * Wed Oct 1 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.5-0