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 %define _localstatedir %_var
15 Summary: Linux virtual server utilities
21 Group: System Environment/Base
22 URL: http://savannah.nongnu.org/projects/util-vserver/
23 Source0: http://savannah.nongnu.org/download/util-vserver/stable.pkg/%version/%name-%version.tar.bz2
24 BuildRoot: %_tmppath/%name-%version-%release-root
26 Requires: %name-core = %epoch:%version-%release
27 Requires: %name-lib = %epoch:%version-%release
28 Requires: diffutils mktemp sed
29 Provides: vserver = %epoch:%version-%release
30 Obsoletes: vserver < %epoch:%version
31 BuildRequires: mount vconfig gawk iproute iptables
32 BuildRequires: gcc-c++ wget
33 BuildRequires: e2fsprogs-devel
34 BuildRequires: doxygen tetex-latex
35 Requires(post): %__chattr
36 Requires(pre): %pkglibdir
37 Requires(postun): %pkglibdir
38 %{!?_without_dietlibc:BuildRequires: dietlibc >= 0:0.24}
39 %{!?_without_xalan:BuildRequires: xalan-j}
42 Summary: Dynamic libraries for util-vserver
43 Group: System Environment/Libraries
46 Summary: The core-utilities for util-vserver
47 Group: Applications/System
51 Summary: Tools which can be used to build vservers
52 Group: Applications/System
53 Requires: rpm apt wget binutils tar e2fsprogs
54 Requires: %name = %epoch:%version-%release
55 Requires(pre): %confdir
56 Requires(postun): %confdir
59 Summary: SysV-initscripts for vserver
60 Group: System Environment/Base
61 Provides: init(%name) = sysv
62 Requires: make diffutils
64 Requires: %name = %epoch:%version-%release
65 Requires(post): %chkconfig
66 Requires(preun): %chkconfig
67 Requires(pre): %_initrddir %pkglibdir
68 requires(postun): %_initrddir %pkglibdir
71 Summary: Legacy utilities for util-vserver
72 Group: Applications/System
73 Requires: %name = %epoch:%version-%release
74 Requires(post): %chkconfig
75 Requires(preun): %chkconfig
76 Requires(pre): %_initrddir %pkglibdir
77 requires(postun): %_initrddir %pkglibdir
80 Summary: Header-files and libraries which are needed to develop vserver based applications
81 Group: Development/Libraries
86 This package provides the components and a framework to setup virtual
87 servers. A virtual server runs inside a linux server. It is nevertheless
88 highly independent. As such, you can run various services with normal
89 configuration. The various vservers can't interact with each other and
90 can't interact with services in the main server.
92 This requires a special kernel supporting the new new_s_context and
93 set_ipv4root system call.
108 %configure --with-initrddir=%_initrddir --enable-release \
109 %{?_without_dietlibc:--disable-dietlibc}
111 %__make %{?_smp_mflags} all
112 %__make %{?_smp_mflags} doc
116 rm -rf $RPM_BUILD_ROOT
117 %__make DESTDIR="$RPM_BUILD_ROOT" install install-distribution
119 rm -f $RPM_BUILD_ROOT/%_libdir/*.la
121 MANIFEST_CONFIG='%config' \
122 MANIFEST_CONFIG_NOREPLACE='%config(noreplace)' \
123 contrib/make-manifest %name $RPM_BUILD_ROOT contrib/manifest.dat
131 rm -rf $RPM_BUILD_ROOT
135 test -d /vservers || mkdir -m0000 /vservers
136 test -d /vservers/.pkg || mkdir -m0755 /vservers/.pkg
138 f="%confdefaultdir/vdirbase"; test -L "$f" -o -e "$f" || ln -s /vservers "$f"
139 f="%confdefaultdir/run.rev"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/run/vservers.rev "$f"
141 %_sbindir/setattr --barrier /vservers || :
144 %post lib -p /sbin/ldconfig
145 %postun lib -p /sbin/ldconfig
149 %chkconfig --add vservers-default
150 %chkconfig --add vprocunhide
155 test "$1" != 0 || %_initrddir/vprocunhide stop &>/dev/null || :
157 test "$1" != 0 || %chkconfig --del vprocunhide
158 test "$1" != 0 || %chkconfig --del vservers-default
162 test "$1" = 0 || %_initrddir/vprocunhide condrestart >/dev/null || :
165 ## Temporary workaround to remove old v_* files; it will conflict
166 ## somehow with the -legacy package but can be fixed by reinstalling
168 ## TODO: remove me in the final .spec file
169 %define v_services httpd named portmap sendmail smb sshd xinetd gated
170 %triggerun sysv -- util-vserver-sysv < 0.30.198
171 for i in %v_services; do
172 %chkconfig --del v_$i || :
177 %chkconfig --add rebootmgr
178 %chkconfig --add vservers-legacy
180 for i in %v_services; do
181 %chkconfig --add v_$i
186 test "$1" != 0 || %_initrddir/rebootmgr stop &>/dev/null || :
188 test "$1" != 0 || for i in %v_services; do
189 %chkconfig --del v_$i
192 test "$1" != 0 || %chkconfig --del rebootmgr
193 test "$1" != 0 || %chkconfig --del vservers-legacy
196 test "$1" = 0 || %_initrddir/rebootmgr condrestart >/dev/null || :
199 %files -f %name-base.list
200 %defattr(-,root,root,-)
201 %doc AUTHORS COPYING ChangeLog NEWS README THANKS
202 %doc doc/*.html doc/*.css
206 %dir %confdefaultdir/apps
207 %dir %confdefaultdir/files
208 %dir %pkglibdir/defaults
209 %ghost %confdefaultdir/vdirbase
210 %ghost %confdefaultdir/run.rev
212 %dir %_localstatedir/run/vservers
213 %dir %_localstatedir/run/vservers.rev
214 %dir %_localstatedir/run/vshelper
217 %files lib -f %name-lib.list
218 %files sysv -f %name-sysv.list
221 %files core -f %name-core.list
222 %defattr(-,root,root,-)
226 %files build -f %name-build.list
227 %defattr(-,root,root,-)
228 %dir %confdir/.distributions
229 %dir %confdir/.distributions/*
230 %dir %confdir/.distributions/*/apt
233 %files legacy -f %name-legacy.list
234 %defattr(-,root,root,-)
235 %dir %pkglibdir/legacy
238 %files devel -f %name-devel.list
239 %defattr(-,root,root,-)
240 %doc lib/apidoc/latex/refman.pdf
245 * Wed Jan 26 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.198-0.3
246 - updated BuildRequires:
247 - use 'setattr --barrier' instead of 'chattr +t' in the %post scriptlet
248 - moved the v_* initscripts to legacy
249 - do not ship the /vservers directory itself; as it is immutable, the
250 extraction will fail else
252 * Thu Sep 9 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.194-0
253 - documented switches for 'rpmbuild'
255 * Wed May 26 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.215-0
256 - (re)added the MANIFEST_* variables which were lost some time ago;
257 this will preserve %%config files...
259 * Mon Mar 15 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.202-0
260 - use file-list for sysv scripts also
262 * Sat Mar 6 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.198-0
263 - added vprocunhide-service support
264 - added doxygen support
267 * Wed Oct 1 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.5-0