2 %define version @VERSION@
3 %define release 1.planetlab%{?date:.%{date}}
6 Packager: PlanetLab Central <support@planet-lab.org>
7 Distribution: PlanetLab 3.0
8 URL: http://www.planet-lab.org
10 %define __chattr /usr/bin/chattr
12 Summary: Linux virtual server utilities
18 Group: System Environment/Base
19 Source0: http://savannah.nongnu.org/download/util-vserver/stable.pkg/%version/%name-%version.tar.bz2
20 Provides: %name-devel = %epoch:%version-%release
21 BuildRoot: %_tmppath/%name-%version-%release-root
22 Provides: vserver = %epoch:%version-%release
23 Conflicts: vserver < %epoch:%version-%release
24 Conflicts: vserver > %epoch:%version-%release
25 BuildRequires: e2fsprogs-devel
26 Requires(post): %__chattr
29 Summary: Linuxconf administration modules for vservers
30 Group: Applications/System
31 Requires: %name = %epoch:%version-%release
32 Provides: vserver-admin = %epoch:%version-%release
33 Conflicts: vserver-admin < %epoch:%version-%release
34 Conflicts: vserver-admin > %epoch:%version-%release
37 This package provides the components and a framework to setup virtual
38 servers. A virtual server runs inside a linux server. It is nevertheless
39 highly independent. As such, you can run various services with normal
40 configuration. The various vservers can't interact with each other and
41 can't interact with services in the main server.
43 This requires a special kernel supporting the new new_s_context and
44 set_ipv4root system call.
47 %description linuxconf
48 This package provides the components to setup virtual servers with
56 automake --add-missing
57 # bootstrap to avoid BuildRequires of kernel-source
58 for linux in $RPM_BUILD_DIR/linux-* /lib/modules/`uname -r`/build ; do
59 [[ -d $linux/include ]] && %configure --with-kerneldir=$linux --enable-linuxconf && break
67 rm -rf $RPM_BUILD_ROOT
68 %__make DESTDIR=$RPM_BUILD_ROOT install
70 mkdir -p $RPM_BUILD_ROOT/vservers
71 test "%_initrddir" = %_sysconfdir/init.d || {
72 mkdir -p ${RPM_BUILD_ROOT}%_initrddir
73 mv ${RPM_BUILD_ROOT}%_sysconfdir/init.d/* ${RPM_BUILD_ROOT}%_initrddir/
77 rm -rf $RPM_BUILD_ROOT
79 %define services vcached vservers
82 # 1 = install, 2 = upgrade/reinstall
83 if [ $1 -eq 2 ] ; then
84 for i in %{services} ; do
85 [ "`/sbin/runlevel`" = "unknown" ] || service $i stop || :
90 # 1 = install, 2 = upgrade/reinstall
91 if [ $1 -eq 1 ] ; then
92 for i in %{services} ; do
97 for i in %{services} ; do
98 [ "`/sbin/runlevel`" = "unknown" ] || service $i start
100 if [ ! -f /etc/shells ] || ! grep -q '^/bin/vsh$' /etc/shells ; then
101 echo /bin/vsh >> /etc/shells
103 ln -f /usr/sbin/vsh /bin/vsh
105 %__chattr +t /vservers || :
109 # 0 = erase, 1 = upgrade
110 if [ "$1" = 0 ] ; then
111 perl -i -n -e 'next if /^\/bin\/vsh$/; print' /etc/shells
113 rm -f /usr/sbin/vsh /bin/vsh
116 # 0 = erase, 1 = upgrade
117 if [ $1 -eq 0 ] ; then
118 for i in %{services} ; do
119 [ "`/sbin/runlevel`" = "unknown" ] || service $i stop || :
126 %defattr(-,root,root)
127 %doc AUTHORS COPYING ChangeLog NEWS README THANKS
130 %_includedir/vserver.h
131 %_libdir/libvserver.a
133 %config %_initrddir/*
134 %config(noreplace) /etc/vservers.conf
135 %config(noreplace) /etc/vcached.conf
137 %attr(0,root,root) %dir /vservers
138 %attr(4755,root,root) /usr/sbin/vsh
139 %attr(4755,root,root) /bin/vsh
141 %exclude %_sbindir/newvserver
142 %exclude %_mandir/man8/newvserver*
145 %defattr(-,root,root)
146 %config(noreplace) /etc/vservers/newvserver.defaults
148 %_mandir/man8/newvserver*
151 * Mon Oct 11 2004 Marc E. Fiuczynski <mef@cs.princeton.edu> 0.1-1.planetlab
154 * Wed Aug 11 2004 Mark Huang <mlhuang@cs.princeton.edu> 0.29-1.planetlab
155 - initial PlanetLab 3.0 build.
157 * Thu Mar 18 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.3-0
158 - removed '%%doc doc/FAQ.txt' since file does not exist anymore
160 * Fri Sep 26 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.4-1