]> git.proxmox.com Git - mirror_lxc.git/blame - lxc.spec.in
Give the ability to non-root user to play with the containers. This feature
[mirror_lxc.git] / lxc.spec.in
CommitLineData
5e97c3fc 1#
2# lxc: linux Container library
3#
4# (C) Copyright IBM Corp. 2007, 2008
5#
6# Authors:
7# Daniel Lezcano <dlezcano at fr.ibm.com>
8#
9# This library is free software; you can redistribute it and/or
10# modify it under the terms of the GNU Lesser General Public
11# License as published by the Free Software Foundation; either
12# version 2.1 of the License, or (at your option) any later version.
13#
14# This library is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17# Lesser General Public License for more details.
18#
19# You should have received a copy of the GNU Lesser General Public
20# License along with this library; if not, write to the Free Software
21# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
23%define _unpackaged_files_terminate_build 0
24
25%define RELEASE 1
26%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE: %RELEASE}
27
28#
29# Arguments that can be passed to the rpm builder:
30#
31# --define 'confargs <extra args to configure args>' (def. '')
32#
33
34%{!?confargs: %{expand:%%define confargs ''}}
35
36# What kernel are we building for?
37%{!?kernel: %{expand:%%define kernel %(uname -r)}}
38
39%define _prefix /usr
40
41Name: @PACKAGE@
42Version: @VERSION@
43Release: %{rel}
44Packager: <dlezcano@fr.ibm.com>
45URL: http://lxc.sourceforge.net
46Summary: %name
47Group: Applications/System
48License: LGPL
49Source: %name/%name-%version.tar.gz
50BuildRoot: %_tmppath/%name-%version-root
51
52%description
805415fc 53
54The package "%name" provides the command lines to create and manage
55containers. It contains a full featured container with the isolation
56/ virtualization of the pids, the ipc, the utsname, the mount points,
57/proc, /sys, the network and it takes into account the control groups.
58It is very light, flexible, and provides a set of tools around the
59container like the monitoring with asynchronous events notification,
60or the freeze of the container. This package is useful to create
61Virtual Private Server, or to run isolated applications like bash or
62sshd.
5e97c3fc 63
64%package devel
65Release: %{rel}
66Summary: development library for %{name}
805415fc 67Requires: libcap
5e97c3fc 68Group: Application/System
69
70%description devel
805415fc 71The %{name}-devel package contains header files and library needed for
72development of containers
5e97c3fc 73
74%prep
75%setup -q
76
77%build
78%configure $args
79
80ncpus=`egrep -c "^cpu[0-9]+" /proc/stat || :`
81make -j$ncpus
82
83%install
84rm -rf %{buildroot}
805415fc 85
5e97c3fc 86%makeinstall
87
88%clean
89rm -rf %{buildroot}
90
91%post
805415fc 92if [ -d /var/lxc ]; then
93 for i in $(ls -1 /var/lxc); do
94 chmod -fR go-rwx /var/lxc/$i
95 done
96 mv /var/lxc /var/lxc.rpm-$$
97fi
98
99mkdir -p /var/lxc
100
101if [ -d /var/lxc.rpm-$$ ]; then
102 for i in $(ls -1 /var/lxc.rpm-$$); do
103 cp -a /var/lxc.rpm-$$/$i /var/lxc
104 done
105fi
106
107chmod ugo+w /var/lxc
108
109setcap cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override=ep %{_bindir}/lxc-execute
110setcap cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override=ep %{_bindir}/lxc-start
5e97c3fc 111
112%files
113%defattr(-,root,root)
114%{_sysconfdir}/%{name}/*
c2cc9f0a 115%{_libdir}/*.so*
5e97c3fc 116%{_bindir}/*
117
118%files devel
119%defattr(-,root,root)
120%{_includedir}/%{name}/*
121%{_libdir}/*.a
122
c2cc9f0a 123%post devel
c2cc9f0a 124
5e97c3fc 125%changelog
b4915399 126
b4915399 127* Sun Aug 3 2008 Daniel Lezcano <dlezcano@fr.ibm.com> - Version 0.1.0
5e97c3fc 128- Initial RPM release.
129
130# Local variables:
131# mode: shell-script
132# sh-shell: rpm
133# end: