]>
Commit | Line | Data |
---|---|---|
c4036d6e AM |
1 | Summary: Linux virtual server utilities |
2 | Name: util-vserver | |
3 | Version: 0.24 | |
4 | Release: 1 | |
5 | Epoch: 0 | |
6 | License: GPL | |
7 | Group: Base | |
8 | URL: http://savannah.nongnu.org/projects/util-vserver/ | |
9 | Source0: http://savannah.nongnu.org/download/util-vserver/stable.pkg/%version/%name-%version.tar.bz2 | |
10 | # Source0-md5: 625d6c9bc5a4d2e44eafdf0f619c2153 | |
11 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
12 | ||
13 | %description | |
14 | This package provides the components and a framework to setup virtual | |
15 | servers. A virtual server runs inside a linux server. It is | |
16 | nevertheless highly independent. As such, you can run various services | |
17 | with normal configuration. The various vservers can't interact with | |
18 | each other and can't interact with services in the main server. | |
19 | ||
20 | This requires a special kernel supporting the new new_s_context and | |
21 | set_ipv4root system call. | |
22 | ||
23 | %prep | |
24 | %setup -q | |
25 | ||
26 | %build | |
27 | %configure \ | |
28 | --with-kerneldir=%{_kernelsrcdir} | |
29 | %{__make} | |
30 | ||
31 | ||
32 | %install | |
33 | rm -rf $RPM_BUILD_ROOT | |
34 | ||
35 | %{__make} install \ | |
36 | DESTDIR=$RPM_BUILD_ROOT | |
37 | ||
38 | %clean | |
39 | rm -rf $RPM_BUILD_ROOT | |
40 | ||
41 | %define v_services httpd named portmap sendmail smb sshd xinetd | |
42 | %post | |
43 | /sbin/chkconfig --add vservers | |
44 | /sbin/chkconfig --add rebootmgr | |
45 | ||
46 | for i in %v_services; do | |
47 | /sbin/chkconfig --add v_$i | |
48 | done | |
49 | ||
50 | ||
51 | %preun | |
52 | test "$1" != 0 || for i in %v_services; do | |
53 | /sbin/chkconfig --del v_$i | |
54 | done | |
55 | ||
56 | test "$1" != 0 || %{_initrddir}/rebootmgr stop &>/dev/null || : | |
57 | test "$1" != 0 || /sbin/chkconfig --del rebootmgr | |
58 | test "$1" != 0 || /sbin/chkconfig --del vservers | |
59 | ||
60 | ||
61 | %postun | |
62 | test "$1" = 0 || %{_initrddir}/rebootmgr condrestart >/dev/null || : | |
63 | ||
64 | ||
65 | %files | |
66 | %defattr(644,root,root,755) | |
67 | %doc AUTHORS COPYING ChangeLog NEWS README THANKS | |
68 | %doc doc/FAQ.txt | |
69 | %{_sbindir}/* | |
70 | %{_libdir}/%name | |
71 | %{_includedir}/vserver.h | |
72 | %{_libdir}/libvserver.a | |
73 | %{_mandir}/man8/* | |
74 | /etc/rc.d/init.d/* | |
75 | %config(noreplace) %{_sysconfdir}/vservers.conf | |
76 | %attr(0,root,root) %dir /vservers | |
77 | %exclude %_sbindir/newvserver | |
78 | %exclude %_mandir/man8/newvserver* |