/[gentoo-x86]/app-emulation/lxc/lxc-0.8.0_rc2.ebuild
Gentoo

Contents of /app-emulation/lxc/lxc-0.8.0_rc2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sat Jul 21 05:07:14 2012 UTC (10 months ago) by flameeyes
Branch: MAIN
Version bump; also fixes bug #427078 and #427086, thanks to Alexander Zubkov for the report.

(Portage version: 2.2.0_alpha118/cvs/Linux x86_64)

1 flameeyes 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/lxc-0.8.0_rc1-r5.ebuild,v 1.1 2012/06/07 12:59:27 flameeyes Exp $
4    
5     EAPI="4"
6    
7     MY_P="${P/_/-}"
8    
9     BACKPORTS=1
10    
11     inherit eutils linux-info versionator flag-o-matic
12    
13     if [[ -n ${BACKPORTS} ]]; then
14     inherit autotools
15     fi
16    
17     DESCRIPTION="LinuX Containers userspace utilities"
18     HOMEPAGE="http://lxc.sourceforge.net/"
19     SRC_URI="http://lxc.sourceforge.net/download/lxc/${MY_P}.tar.gz
20     ${BACKPORTS:+http://dev.gentoo.org/~flameeyes/${PN}/${MY_P}-backports-${BACKPORTS}.tar.xz}"
21     S="${WORKDIR}/${MY_P}"
22    
23     KEYWORDS="~amd64 ~ppc64 ~x86"
24    
25     LICENSE="LGPL-3"
26     SLOT="0"
27     IUSE="examples vanilla"
28    
29     RDEPEND="sys-libs/libcap"
30    
31     DEPEND="${RDEPEND}
32     app-text/docbook-sgml-utils
33     >=sys-kernel/linux-headers-3.2"
34    
35     # For init script, so protect with vanilla, they are not strictly
36     # needed.
37     RDEPEND="${RDEPEND}
38     !vanilla? (
39     sys-apps/util-linux
40     app-misc/pax-utils
41     >=sys-apps/openrc-0.9.9.1
42     virtual/awk
43     )"
44    
45     CONFIG_CHECK="~CGROUPS ~CGROUP_DEVICE
46     ~CPUSETS ~CGROUP_CPUACCT
47     ~RESOURCE_COUNTERS ~CGROUP_MEM_RES_CTLR
48     ~CGROUP_SCHED
49    
50     ~NAMESPACES
51     ~IPC_NS ~USER_NS ~PID_NS
52    
53     ~DEVPTS_MULTIPLE_INSTANCES
54     ~CGROUP_FREEZER
55     ~UTS_NS ~NET_NS
56     ~VETH ~MACVLAN
57    
58     ~POSIX_MQUEUE
59     ~!NETPRIO_CGROUP
60    
61     ~!GRKERNSEC_CHROOT_MOUNT
62     ~!GRKERNSEC_CHROOT_DOUBLE
63     ~!GRKERNSEC_CHROOT_PIVOT
64     ~!GRKERNSEC_CHROOT_CHMOD
65     ~!GRKERNSEC_CHROOT_CAPS
66     "
67    
68     ERROR_DEVPTS_MULTIPLE_INSTANCES="CONFIG_DEVPTS_MULTIPLE_INSTANCES: needed for pts inside container"
69    
70     ERROR_CGROUP_FREEZER="CONFIG_CGROUP_FREEZER: needed to freeze containers"
71    
72     ERROR_UTS_NS="CONFIG_UTS_NS: needed to unshare hostnames and uname info"
73     ERROR_NET_NS="CONFIG_NET_NS: needed for unshared network"
74    
75     ERROR_VETH="CONFIG_VETH: needed for internal (host-to-container) networking"
76     ERROR_MACVLAN="CONFIG_MACVLAN: needed for internal (inter-container) networking"
77    
78     ERROR_POSIX_MQUEUE="CONFIG_POSIX_MQUEUE: needed for lxc-execute command"
79    
80     ERROR_NETPRIO_CGROUP="CONFIG_NETPRIO_CGROUP: as of kernel 3.3 and lxc 0.8.0_rc1 this causes LXCs to fail booting."
81    
82     ERROR_GRKERNSEC_CHROOT_MOUNT=":CONFIG_GRKERNSEC_CHROOT_MOUNT some GRSEC features make LXC unusable see postinst notes"
83     ERROR_GRKERNSEC_CHROOT_DOUBLE=":CONFIG_GRKERNSEC_CHROOT_DOUBLE some GRSEC features make LXC unusable see postinst notes"
84     ERROR_GRKERNSEC_CHROOT_PIVOT=":CONFIG_GRKERNSEC_CHROOT_PIVOT some GRSEC features make LXC unusable see postinst notes"
85     ERROR_GRKERNSEC_CHROOT_CHMOD=":CONFIG_GRKERNSEC_CHROOT_CHMOD some GRSEC features make LXC unusable see postinst notes"
86     ERROR_GRKERNSEC_CHROOT_CAPS=":CONFIG_GRKERNSEC_CHROOT_CAPS some GRSEC features make LXC unusable see postinst notes"
87    
88     DOCS=(AUTHORS CONTRIBUTING MAINTAINERS TODO README doc/FAQ.txt)
89    
90     src_prepare() {
91     if [[ -n ${BACKPORTS} ]]; then
92     epatch "${WORKDIR}"/patches/*
93     eautoreconf
94     fi
95     }
96    
97     src_configure() {
98     append-flags -fno-strict-aliasing
99    
100     econf \
101     --localstatedir=/var \
102     --bindir=/usr/sbin \
103     --docdir=/usr/share/doc/${PF} \
104     --with-config-path=/etc/lxc \
105     --with-rootfs-path=/usr/lib/lxc/rootfs \
106     --enable-doc \
107     $(use_enable examples)
108     }
109    
110     src_install() {
111     default
112    
113     rm -r "${D}"/usr/sbin/lxc-{setcap,ls} \
114     "${D}"/usr/share/man/man1/lxc-ls.1 \
115     || die "unable to remove extraenous content"
116    
117     keepdir /etc/lxc /usr/lib/lxc/rootfs
118    
119     find "${D}" -name '*.la' -delete
120    
121     use vanilla && return 0
122    
123     # Gentoo-specific additions!
124     newinitd "${FILESDIR}/${PN}.initd.2" ${PN}
125     keepdir /var/log/lxc
126     }
127    
128     pkg_postinst() {
129     if ! use vanilla; then
130     elog "There is an init script provided with the package now; no documentation"
131     elog "is currently available though, so please check out /etc/init.d/lxc ."
132     elog "You _should_ only need to symlink it to /etc/init.d/lxc.configname"
133     elog "to start the container defined into /etc/lxc/configname.conf ."
134     elog "For further information about LXC development see"
135     elog "http://blog.flameeyes.eu/tag/lxc" # remove once proper doc is available
136     elog ""
137     fi
138     ewarn "With version 0.7.4, the mountpoint syntax came back to the one used by 0.7.2"
139     ewarn "and previous versions. This means you'll have to use syntax like the following"
140     ewarn ""
141     ewarn " lxc.rootfs = /container"
142     ewarn " lxc.mount.entry = /usr/portage /container/usr/portage none bind 0 0"
143     ewarn ""
144     ewarn "To use the Fedora, Debian and (various) Ubuntu auto-configuration scripts, you"
145     ewarn "will need sys-apps/yum or dev-util/debootstrap."
146     ewarn ""
147     ewarn "Some GrSecurity settings in relation to chroot security will cause LXC not to"
148     ewarn "work, while others will actually make it much more secure. Please refer to"
149     ewarn "Diego Elio Pettenò's weblog at http://blog.flameeyes.eu/tag/lxc for further"
150     ewarn "details."
151     }

  ViewVC Help
Powered by ViewVC 1.1.13