Tagging module util-vserver-pl - util-vserver-pl-0.3-3
[util-vserver-pl.git] / util-vserver-pl.spec
1 #
2 # $Id$
3 #
4 %define url $URL$
5
6 %define name    util-vserver-pl
7 %define version 0.3
8 %define taglevel 3
9
10 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
11
12 %define python_sitearch %( python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)" )
13
14 Summary: PlanetLab extensions to util-vserver
15 Name: %{name}
16 Version: %{version}
17 Release: %{release}
18 License: GPL
19 Group: System Environment/Base
20 Source0: %{name}-%{version}.tar.bz2
21 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
22
23 Vendor: PlanetLab
24 Packager: PlanetLab Central <support@planet-lab.org>
25 Distribution: PlanetLab %{plrelease}
26 URL: %(echo %{url} | cut -d ' ' -f 2)
27
28 Requires: util-vserver util-vserver-core util-vserver-build util-vserver-sysv
29 Provides: util-vserver-python = %{version}-%{release}
30 Obsoletes: util-vserver-py32 resman
31 BuildRequires: util-vserver-core util-vserver-devel
32 BuildRequires: autoconf automake libtool
33
34 %description
35 This package contains all PlanetLab extensions to util-vserver.
36
37 %prep
38 %setup -q
39 autoreconf -fi
40
41
42 %build
43 %configure
44 make
45
46
47 %install
48 rm -fr %{buildroot}
49 make DESTDIR=%{buildroot} install
50
51 mkdir %{buildroot}/bin
52 ln -s ..%{_sbindir}/vsh %{buildroot}/bin/vsh
53
54 rm -f %{buildroot}%{python_sitearch}/vserverimpl.a
55 rm -f %{buildroot}%{python_sitearch}/vserverimpl.la
56
57 # Generate file list for python package
58 find "%{buildroot}" -name '*.py' | { while read FILE; do
59         f="${FILE#%{buildroot}}"
60         echo "${f}"
61         # need to touch these files, as they are not produced on FC4 or below
62         touch ${FILE}c
63         touch ${FILE}o
64         echo %%ghost "${f}c"
65         echo %%ghost "${f}o"
66 done } > %name-python.list
67
68
69 %post
70 # add /bin/vsh to list of secure shells
71 if [ ! -f /etc/shells ] || ! grep -q '^/bin/vsh$' /etc/shells ; then
72         echo /bin/vsh >> /etc/shells
73 fi
74
75
76 %postun
77 # 0 = erase, 1 = upgrade
78 if [ "$1" = 0 ] ; then
79         perl -i -n -e 'next if /^\/bin\/vsh$/; print' /etc/shells
80 fi
81
82
83 %clean
84 rm -fr %{buildroot}
85
86
87 %files -f %name-python.list
88 %defattr(-,root,root,-)
89 %{_sbindir}/bwlimit
90 %{_sbindir}/disklimit
91 %{_sbindir}/vuseradd
92 %{_sbindir}/vuserdel
93 %{python_sitearch}/vserverimpl.so
94
95 %attr(4755,root,root) %{_sbindir}/vsh
96 /bin/vsh
97 %{_mandir}/man8/vsh.8*
98
99 %{_sbindir}/vip6-autod
100 %{_sysconfdir}/init.d/vip6-autod
101
102 %changelog
103 * Wed Apr 23 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - util-vserver-pl-0.3-3
104 - Added support for vc_{set|get}_vhi_name() via util-vserver-pl.
105 - Adding a tag to include in the 4.2rc2
106
107
108 * Wed Apr 16 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - util-vserver-pl-0.3-2
109
110 - * Can write vcVHI_CONTEXT
111 - * CAP_NET_BIND_SERVICE is special, in all cases. 
112 - * Check if already mounted before mounting fs in vserver
113 - * Optimized 0.0.0.0 case
114 - * Removed vcached.  DEPRECATED
115
116
117 * Fri Nov 30 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.1-1
118 - Initial release