full build on centos
[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 14
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: libnl libnl-devel
32 BuildRequires: python python-devel
33 BuildRequires: util-vserver-core util-vserver-devel
34 BuildRequires: autoconf automake libtool
35
36 %description
37 This package contains all PlanetLab extensions to util-vserver.
38
39 %prep
40 %setup -q
41 autoreconf -fi
42
43
44 %build
45 %configure
46 make
47
48
49 %install
50 rm -fr %{buildroot}
51 make DESTDIR=%{buildroot} install
52
53 mkdir %{buildroot}/bin
54 ln -s ..%{_sbindir}/vsh %{buildroot}/bin/vsh
55
56 rm -f %{buildroot}%{python_sitearch}/vserverimpl.a
57 rm -f %{buildroot}%{python_sitearch}/vserverimpl.la
58
59 # Generate file list for python package
60 find "%{buildroot}" -name '*.py' | { while read FILE; do
61         f="${FILE#%{buildroot}}"
62         echo "${f}"
63         # need to touch these files, as they are not produced on FC4 or below
64         touch ${FILE}c
65         touch ${FILE}o
66         echo %%ghost "${f}c"
67         echo %%ghost "${f}o"
68 done } > %name-python.list
69
70
71 %post
72 # add /bin/vsh to list of secure shells
73 if [ ! -f /etc/shells ] || ! grep -q '^/bin/vsh$' /etc/shells ; then
74         echo /bin/vsh >> /etc/shells
75 fi
76
77
78 %postun
79 # 0 = erase, 1 = upgrade
80 if [ "$1" = 0 ] ; then
81         perl -i -n -e 'next if /^\/bin\/vsh$/; print' /etc/shells
82 fi
83
84
85 %clean
86 rm -fr %{buildroot}
87
88
89 %files -f %name-python.list
90 %defattr(-,root,root,-)
91 %{_sbindir}/bwlimit
92 %{_sbindir}/disklimit
93 %{_sbindir}/vuseradd
94 %{_sbindir}/vuserdel
95 %{python_sitearch}/vserverimpl.so
96
97 %attr(4755,root,root) %{_sbindir}/vsh
98 /bin/vsh
99 %{_mandir}/man8/vsh.8*
100
101 %changelog
102 * Tue Sep 23 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.3-14
103 - configure/make check the version of libnl and can cope with either 1.1 or 1.0-pre6
104 - as centos does not have any of these, do build vip6-autod on fedora only
105
106 * Wed Sep 17 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - util-vserver-pl-0.3-13
107 - Remove current bw limit checks before issuing tc.
108
109 * Fri Aug 29 2008 Daniel Hokka Zakrisson <daniel@hozac.com> - util-vserver-pl-0.3-12
110 - libnl 1.1 fixups.
111
112 * Thu Aug 28 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.3-11
113 - reads /etc/vservers/<name>/personality and behaves accordingly
114 - nicer formatting for byte rates
115
116 * Sun Aug 17 2008 Daniel Hokka Zakrisson <daniel@hozac.com> - util-vserver-pl-0.3-10
117 - FUSE support.
118
119 * Fri Aug 01 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - util-vserver-pl-0.3-9
120 - Check running values before issuing set or on.  If same, disregard to save on forks.
121
122 * Fri Jul 25 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - util-vserver-pl-0.3-8
123 - exempt_init shouldn't modify iptables rules.  Instead, only manipulate ipset.  Assume iptables rules are setup properly (now downloaded from nodeconfig/PlanetLabConf for I2 and defaulted to iptables/planetlab-config for all other nodes).
124
125 * Tue Jul 22 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - util-vserver-pl-0.3-7
126 - Init exempt flows into "mangle" table.
127
128 * Fri Jun 27 2008 Daniel Hokka Zakrisson <daniel@hozac.com> - util-vserver-pl-0.3-6
129 - Optimized the case where it's already running.
130
131 * Thu Jun 26 2008 Daniel Hokka Zakrisson <daniel@hozac.com> - util-vserver-pl-0.3-5
132 - Ignore ESRCH for setname.
133 - Always create the home directory, regardless of configuration settings.
134
135 * Fri May 09 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - util-vserver-pl-0.3-4
136
137
138 * Wed Apr 23 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - util-vserver-pl-0.3-3
139 - Added support for vc_{set|get}_vhi_name() via util-vserver-pl.
140 - Adding a tag to include in the 4.2rc2
141
142
143 * Wed Apr 16 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - util-vserver-pl-0.3-2
144
145 - * Can write vcVHI_CONTEXT
146 - * CAP_NET_BIND_SERVICE is special, in all cases. 
147 - * Check if already mounted before mounting fs in vserver
148 - * Optimized 0.0.0.0 case
149 - * Removed vcached.  DEPRECATED
150
151
152 * Fri Nov 30 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.1-1
153 - Initial release