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

Contents of /app-emulation/lxc/lxc-0.8.0_rc1-r4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Thu Jun 7 12:59:28 2012 UTC (11 months, 2 weeks ago) by flameeyes
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Update init script to better handle x32 containers.

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

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-r4.ebuild,v 1.3 2012/05/31 23:03:11 zmedico 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 )"
43
44 CONFIG_CHECK="~CGROUPS ~CGROUP_DEVICE
45 ~CPUSETS ~CGROUP_CPUACCT
46 ~RESOURCE_COUNTERS ~CGROUP_MEM_RES_CTLR
47 ~CGROUP_SCHED
48
49 ~NAMESPACES
50 ~IPC_NS ~USER_NS ~PID_NS
51
52 ~DEVPTS_MULTIPLE_INSTANCES
53 ~CGROUP_FREEZER
54 ~UTS_NS ~NET_NS
55 ~VETH ~MACVLAN
56
57 ~POSIX_MQUEUE
58 ~!NETPRIO_CGROUP
59
60 ~!GRKERNSEC_CHROOT_MOUNT
61 ~!GRKERNSEC_CHROOT_DOUBLE
62 ~!GRKERNSEC_CHROOT_PIVOT
63 ~!GRKERNSEC_CHROOT_CHMOD
64 ~!GRKERNSEC_CHROOT_CAPS
65 "
66
67 ERROR_DEVPTS_MULTIPLE_INSTANCES="CONFIG_DEVPTS_MULTIPLE_INSTANCES: needed for pts inside container"
68
69 ERROR_CGROUP_FREEZER="CONFIG_CGROUP_FREEZER: needed to freeze containers"
70
71 ERROR_UTS_NS="CONFIG_UTS_NS: needed to unshare hostnames and uname info"
72 ERROR_NET_NS="CONFIG_NET_NS: needed for unshared network"
73
74 ERROR_VETH="CONFIG_VETH: needed for internal (host-to-container) networking"
75 ERROR_MACVLAN="CONFIG_MACVLAN: needed for internal (inter-container) networking"
76
77 ERROR_POSIX_MQUEUE="CONFIG_POSIX_MQUEUE: needed for lxc-execute command"
78
79 ERROR_NETPRIO_CGROUP="CONFIG_NETPRIO_CGROUP: as of kernel 3.3 and lxc 0.8.0_rc1 this causes LXCs to fail booting."
80
81 ERROR_GRKERNSEC_CHROOT_MOUNT=":CONFIG_GRKERNSEC_CHROOT_MOUNT some GRSEC features make LXC unusable see postinst notes"
82 ERROR_GRKERNSEC_CHROOT_DOUBLE=":CONFIG_GRKERNSEC_CHROOT_DOUBLE some GRSEC features make LXC unusable see postinst notes"
83 ERROR_GRKERNSEC_CHROOT_PIVOT=":CONFIG_GRKERNSEC_CHROOT_PIVOT some GRSEC features make LXC unusable see postinst notes"
84 ERROR_GRKERNSEC_CHROOT_CHMOD=":CONFIG_GRKERNSEC_CHROOT_CHMOD some GRSEC features make LXC unusable see postinst notes"
85 ERROR_GRKERNSEC_CHROOT_CAPS=":CONFIG_GRKERNSEC_CHROOT_CAPS some GRSEC features make LXC unusable see postinst notes"
86
87 DOCS=(AUTHORS CONTRIBUTING MAINTAINERS TODO README doc/FAQ.txt)
88
89 src_prepare() {
90 if [[ -n ${BACKPORTS} ]]; then
91 epatch "${S}"/patches/*
92 eautoreconf
93 fi
94 }
95
96 src_configure() {
97 append-flags -fno-strict-aliasing
98
99 econf \
100 --localstatedir=/var \
101 --bindir=/usr/sbin \
102 --docdir=/usr/share/doc/${PF} \
103 --with-config-path=/etc/lxc \
104 --with-rootfs-path=/usr/lib/lxc/rootfs \
105 --enable-doc \
106 $(use_enable examples)
107 }
108
109 src_install() {
110 default
111
112 rm -r "${D}"/usr/sbin/lxc-{setcap,ls} \
113 "${D}"/usr/share/man/man1/lxc-ls.1 \
114 || die "unable to remove extraenous content"
115
116 keepdir /etc/lxc /usr/lib/lxc/rootfs
117
118 find "${D}" -name '*.la' -delete
119
120 use vanilla && return 0
121
122 # Gentoo-specific additions!
123 newinitd "${FILESDIR}/${PN}.initd.2" ${PN}
124 keepdir /var/log/lxc
125 }
126
127 pkg_postinst() {
128 if ! use vanilla; then
129 elog "There is an init script provided with the package now; no documentation"
130 elog "is currently available though, so please check out /etc/init.d/lxc ."
131 elog "You _should_ only need to symlink it to /etc/init.d/lxc.configname"
132 elog "to start the container defined into /etc/lxc/configname.conf ."
133 elog "For further information about LXC development see"
134 elog "http://blog.flameeyes.eu/tag/lxc" # remove once proper doc is available
135 elog ""
136 fi
137 ewarn "With version 0.7.4, the mountpoint syntax came back to the one used by 0.7.2"
138 ewarn "and previous versions. This means you'll have to use syntax like the following"
139 ewarn ""
140 ewarn " lxc.rootfs = /container"
141 ewarn " lxc.mount.entry = /usr/portage /container/usr/portage none bind 0 0"
142 ewarn ""
143 ewarn "To use the Fedora, Debian and (various) Ubuntu auto-configuration scripts, you"
144 ewarn "will need sys-apps/yum or dev-util/debootstrap."
145 ewarn ""
146 ewarn "Some GrSecurity settings in relation to chroot security will cause LXC not to"
147 ewarn "work, while others will actually make it much more secure. Please refer to"
148 ewarn "Diego Elio Pettenò's weblog at http://blog.flameeyes.eu/tag/lxc for further"
149 ewarn "details."
150 }

  ViewVC Help
Powered by ViewVC 1.1.13