Gentoo Archives: gentoo-commits

From: Erik Mackdanz <stasibear@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/lxc/files/, app-emulation/lxc/
Date: Mon, 11 Jul 2016 00:28:33
Message-Id: 1468196894.d004d537f8e5963a898d482d3e072a19d8a5c4c8.stasibear@gentoo
1 commit: d004d537f8e5963a898d482d3e072a19d8a5c4c8
2 Author: Erik Mackdanz <stasibear <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 11 00:28:14 2016 +0000
4 Commit: Erik Mackdanz <stasibear <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 11 00:28:14 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d004d537
7
8 app-emulation/lxc: Bump to 2.0.3
9
10 removes devsetup script
11
12 Package-Manager: portage-2.3.0
13
14 app-emulation/lxc/Manifest | 1 +
15 .../lxc/files/lxc-2.0.3-bash-completion.patch | 31 ++++
16 .../lxc/files/lxc-2.0.3-omit-sysconfig.patch | 5 +
17 app-emulation/lxc/lxc-2.0.3.ebuild | 197 +++++++++++++++++++++
18 app-emulation/lxc/metadata.xml | 3 +
19 5 files changed, 237 insertions(+)
20
21 diff --git a/app-emulation/lxc/Manifest b/app-emulation/lxc/Manifest
22 index ef86569..575cd3e 100644
23 --- a/app-emulation/lxc/Manifest
24 +++ b/app-emulation/lxc/Manifest
25 @@ -8,3 +8,4 @@ DIST lxc-1.1.3.tar.gz 599889 SHA256 b75fb8e376d3313e152f31fb7372b68f33a953a12191
26 DIST lxc-1.1.4.tar.gz 604167 SHA256 b087baf5ac4b94618388e6e759d9cdafcf5c98ed67bf9012ee9660076f9fb0d1 SHA512 b239c285b68ddb25c165e998307d69b368bb802e89c1e26de9daab956ffc05cb8e80bf7c796233552b08a57d1cc37c22777bb7a7469db111582184ee13272c93 WHIRLPOOL 2d69d0540c15274627cdbd0f1944a119b601e1298b9328ba336beae0aa6bffd62dfdf85af82f54c3926489e19b4cee7eaa6c35bcfb72e4b3904f85102055ae85
27 DIST lxc-1.1.5.tar.gz 607219 SHA256 eefce4cc679656cb8636bf0849f3ba6981c48167884e13dbcb377820a717c09c SHA512 e48ab549f1317afcb5f7768ab988ba27a3e9f1458504e1d70b2e27c502233e7b3538b8ce0b79940140a59a37681bcd8e459416e814f9e4814a4ed86b89e8df1c WHIRLPOOL 0d65ec400913b3298517ba0cb50e064b894d8b26cbd331662e11caee285a37aa1e0d1e4623b69e75585c4369544ca02ff97db90d5127c697cd53fde87d2bc968
28 DIST lxc-2.0.1.tar.gz 772083 SHA256 543b927e0be6df256562afe05281552645c78c4a9c0881bf313e31ae13679a29 SHA512 f64cc7167bfed1cc74689bf7d9a5b1ad5b957d5791529c8319c55d2cc671dbd00df9c08fb8f10f73c0d77465a54eb4c98c980e66dd888f52c7670640c6bbf78f WHIRLPOOL a4d25a6733200fcc488b90c34715af8d5d9cd53632f8c82085e5dfe0216500c4714414b616bddda82f4ee014525fd222604d9d46d385658147e411060632f748
29 +DIST lxc-2.0.3.tar.gz 772448 SHA256 635afa330088fea57883018da326fc72f85460b5a6c7802ad68044381aff14f3 SHA512 df714f189ec7aa681710fbd58405b8958740102032c0130d8a0eaaae0341a9bc91a215136203c404ad79773800f620bf6f71f811b3effe559aed66efa4f34fef WHIRLPOOL 89ce2f6762c7279e24658c1154b5c2960d3db32e0ec3724b338f5d30da77cc0b33a2376e5eebe6d9c356bdd34c2aa9da1e2434aecd7e428fa4b729389e35b862
30
31 diff --git a/app-emulation/lxc/files/lxc-2.0.3-bash-completion.patch b/app-emulation/lxc/files/lxc-2.0.3-bash-completion.patch
32 new file mode 100644
33 index 0000000..9ef6013
34 --- /dev/null
35 +++ b/app-emulation/lxc/files/lxc-2.0.3-bash-completion.patch
36 @@ -0,0 +1,31 @@
37 +--- lxc-lxc-2.0.1/config/bash/Makefile.am.orig 2016-05-18 20:40:42.238487678 +0000
38 ++++ lxc-lxc-2.0.1/config/bash/Makefile.am 2016-05-18 20:43:02.163497779 +0000
39 +@@ -2,12 +2,12 @@
40 +
41 + if ENABLE_BASH
42 + install-bash:
43 +- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/bash_completion.d/
44 +- $(INSTALL_DATA) lxc $(DESTDIR)$(sysconfdir)/bash_completion.d/
45 ++ $(MKDIR_P) $(DESTDIR)$(datarootdir)/bash-completion/completions/
46 ++ $(INSTALL_DATA) lxc $(DESTDIR)$(datarootdir)/bash-completion/completions/
47 +
48 + uninstall-bash:
49 +- rm -f $(DESTDIR)$(sysconfdir)/bash_completion.d/lxc
50 +- rmdir $(DESTDIR)$(sysconfdir)/bash_completion.d/ || :
51 ++ rm -f $(DESTDIR)$(datarootdir)/bash-completion/completions/lxc
52 ++ rmdir $(DESTDIR)$(datarootdir)/bash-completion/completions/ || :
53 +
54 + install-data-local: install-bash
55 + uninstall-local: uninstall-bash
56 +--- lxc-lxc-2.0.1/config/bash/lxc.in.orig 2016-05-18 20:40:51.079488316 +0000
57 ++++ lxc-lxc-2.0.1/config/bash/lxc.in 2016-05-18 20:45:03.506506538 +0000
58 +@@ -1,4 +1,3 @@
59 +-_have lxc-start && {
60 + _lxc_names() {
61 + COMPREPLY=( $( compgen -W "$( lxc-ls )" "$cur" ) )
62 + }
63 +@@ -100,4 +99,3 @@
64 +
65 + complete -o default -F _lxc_generic_o lxc-copy
66 + complete -o default -F _lxc_generic_o lxc-start-ephemeral
67 +-}
68
69 diff --git a/app-emulation/lxc/files/lxc-2.0.3-omit-sysconfig.patch b/app-emulation/lxc/files/lxc-2.0.3-omit-sysconfig.patch
70 new file mode 100644
71 index 0000000..9b83a3b
72 --- /dev/null
73 +++ b/app-emulation/lxc/files/lxc-2.0.3-omit-sysconfig.patch
74 @@ -0,0 +1,5 @@
75 +--- lxc-lxc-2.0.1/config/Makefile.am.orig 2016-05-19 02:56:11.891113982 +0000
76 ++++ lxc-lxc-2.0.1/config/Makefile.am 2016-05-19 02:56:32.596115476 +0000
77 +@@ -1 +1 @@
78 +-SUBDIRS = apparmor bash etc init selinux templates yum sysconfig
79 ++SUBDIRS = apparmor bash etc init selinux templates yum
80
81 diff --git a/app-emulation/lxc/lxc-2.0.3.ebuild b/app-emulation/lxc/lxc-2.0.3.ebuild
82 new file mode 100644
83 index 0000000..291b2d4
84 --- /dev/null
85 +++ b/app-emulation/lxc/lxc-2.0.3.ebuild
86 @@ -0,0 +1,197 @@
87 +# Copyright 1999-2016 Gentoo Foundation
88 +# Distributed under the terms of the GNU General Public License v2
89 +# $Id$
90 +
91 +EAPI="5"
92 +
93 +MY_P="${P/_/-}"
94 +PYTHON_COMPAT=( python{3_3,3_4,3_5} )
95 +DISTUTILS_OPTIONAL=1
96 +
97 +inherit autotools bash-completion-r1 distutils-r1 eutils linux-info versionator flag-o-matic systemd
98 +
99 +DESCRIPTION="LinuX Containers userspace utilities"
100 +HOMEPAGE="https://linuxcontainers.org/"
101 +SRC_URI="https://github.com/lxc/lxc/archive/${MY_P}.tar.gz"
102 +
103 +KEYWORDS="~amd64 ~arm ~arm64"
104 +
105 +LICENSE="LGPL-3"
106 +SLOT="0"
107 +IUSE="cgmanager doc examples lua python seccomp"
108 +
109 +RDEPEND="net-libs/gnutls
110 + sys-libs/libcap
111 + cgmanager? ( app-admin/cgmanager )
112 + lua? ( >=dev-lang/lua-5.1:= )
113 + python? ( ${PYTHON_DEPS} )
114 + seccomp? ( sys-libs/libseccomp )"
115 +
116 +DEPEND="${RDEPEND}
117 + doc? ( app-text/docbook-sgml-utils )
118 + >=sys-kernel/linux-headers-3.2"
119 +
120 +RDEPEND="${RDEPEND}
121 + sys-process/criu
122 + sys-apps/util-linux
123 + app-misc/pax-utils
124 + virtual/awk"
125 +
126 +CONFIG_CHECK="~CGROUPS ~CGROUP_DEVICE
127 + ~CPUSETS ~CGROUP_CPUACCT
128 + ~CGROUP_SCHED
129 +
130 + ~NAMESPACES
131 + ~IPC_NS ~USER_NS ~PID_NS
132 +
133 + ~NETLINK_DIAG ~PACKET_DIAG
134 + ~INET_UDP_DIAG ~INET_TCP_DIAG
135 + ~UNIX_DIAG ~CHECKPOINT_RESTORE
136 +
137 + ~DEVPTS_MULTIPLE_INSTANCES
138 + ~CGROUP_FREEZER
139 + ~UTS_NS ~NET_NS
140 + ~VETH ~MACVLAN
141 +
142 + ~POSIX_MQUEUE
143 + ~!NETPRIO_CGROUP
144 +
145 + ~!GRKERNSEC_CHROOT_MOUNT
146 + ~!GRKERNSEC_CHROOT_DOUBLE
147 + ~!GRKERNSEC_CHROOT_PIVOT
148 + ~!GRKERNSEC_CHROOT_CHMOD
149 + ~!GRKERNSEC_CHROOT_CAPS
150 + ~!GRKERNSEC_PROC
151 + ~!GRKERNSEC_SYSFS_RESTRICT
152 +"
153 +
154 +ERROR_DEVPTS_MULTIPLE_INSTANCES="CONFIG_DEVPTS_MULTIPLE_INSTANCES: needed for pts inside container"
155 +
156 +ERROR_CGROUP_FREEZER="CONFIG_CGROUP_FREEZER: needed to freeze containers"
157 +
158 +ERROR_UTS_NS="CONFIG_UTS_NS: needed to unshare hostnames and uname info"
159 +ERROR_NET_NS="CONFIG_NET_NS: needed for unshared network"
160 +
161 +ERROR_VETH="CONFIG_VETH: needed for internal (host-to-container) networking"
162 +ERROR_MACVLAN="CONFIG_MACVLAN: needed for internal (inter-container) networking"
163 +
164 +ERROR_NETLINK_DIAG="CONFIG_NETLINK_DIAG: needed for lxc-checkpoint"
165 +ERROR_PACKET_DIAG="CONFIG_PACKET_DIAG: needed for lxc-checkpoint"
166 +ERROR_INET_UDP_DIAG="CONFIG_INET_UDP_DIAG: needed for lxc-checkpoint"
167 +ERROR_INET_TCP_DIAG="CONFIG_INET_TCP_DIAG: needed for lxc-checkpoint"
168 +ERROR_UNIX_DIAG="CONFIG_UNIX_DIAG: needed for lxc-checkpoint"
169 +ERROR_CHECKPOINT_RESTORE="CONFIG_CHECKPOINT_RESTORE: needed for lxc-checkpoint"
170 +
171 +ERROR_POSIX_MQUEUE="CONFIG_POSIX_MQUEUE: needed for lxc-execute command"
172 +
173 +ERROR_NETPRIO_CGROUP="CONFIG_NETPRIO_CGROUP: as of kernel 3.3 and lxc 0.8.0_rc1 this causes LXCs to fail booting."
174 +
175 +ERROR_GRKERNSEC_CHROOT_MOUNT="CONFIG_GRKERNSEC_CHROOT_MOUNT: some GRSEC features make LXC unusable see postinst notes"
176 +ERROR_GRKERNSEC_CHROOT_DOUBLE="CONFIG_GRKERNSEC_CHROOT_DOUBLE: some GRSEC features make LXC unusable see postinst notes"
177 +ERROR_GRKERNSEC_CHROOT_PIVOT="CONFIG_GRKERNSEC_CHROOT_PIVOT: some GRSEC features make LXC unusable see postinst notes"
178 +ERROR_GRKERNSEC_CHROOT_CHMOD="CONFIG_GRKERNSEC_CHROOT_CHMOD: some GRSEC features make LXC unusable see postinst notes"
179 +ERROR_GRKERNSEC_CHROOT_CAPS="CONFIG_GRKERNSEC_CHROOT_CAPS: some GRSEC features make LXC unusable see postinst notes"
180 +ERROR_GRKERNSEC_PROC="CONFIG_GRKERNSEC_PROC: this GRSEC feature is incompatible with unprivileged containers"
181 +ERROR_GRKERNSEC_SYSFS_RESTRICT="CONFIG_GRKERNSEC_SYSFS_RESTRICT: this GRSEC feature is incompatible with unprivileged containers"
182 +
183 +DOCS=(AUTHORS CONTRIBUTING MAINTAINERS NEWS README doc/FAQ.txt)
184 +
185 +S="${WORKDIR}/${PN}-${MY_P}"
186 +
187 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
188 +
189 +src_prepare() {
190 + epatch "${FILESDIR}"/${P}-bash-completion.patch
191 + #558854
192 + epatch "${FILESDIR}"/${P}-omit-sysconfig.patch
193 + eautoreconf
194 +}
195 +
196 +src_configure() {
197 + append-flags -fno-strict-aliasing
198 +
199 + if use python; then
200 + #541932
201 + python_setup "python3*"
202 + export PKG_CONFIG_PATH="${T}/${EPYTHON}/pkgconfig:${PKG_CONFIG_PATH}"
203 + fi
204 +
205 + # I am not sure about the --with-rootfs-path
206 + # /var/lib/lxc is probably more appropriate than
207 + # /usr/lib/lxc.
208 + econf \
209 + --localstatedir=/var \
210 + --bindir=/usr/bin \
211 + --sbindir=/usr/bin \
212 + --docdir=/usr/share/doc/${PF} \
213 + --with-config-path=/var/lib/lxc \
214 + --with-rootfs-path=/var/lib/lxc/rootfs \
215 + --with-distro=gentoo \
216 + --with-runtime-path=/run \
217 + --disable-apparmor \
218 + $(use_enable cgmanager) \
219 + $(use_enable doc) \
220 + $(use_enable examples) \
221 + $(use_enable lua) \
222 + $(use_enable python) \
223 + $(use_enable seccomp)
224 +}
225 +
226 +python_compile() {
227 + distutils-r1_python_compile build_ext -I ../ -L ../${PN}
228 +}
229 +
230 +src_compile() {
231 + default
232 +
233 + if use python; then
234 + pushd "${S}/src/python-${PN}" > /dev/null
235 + distutils-r1_src_compile
236 + popd > /dev/null
237 + fi
238 +}
239 +
240 +src_install() {
241 + default
242 +
243 + mv "${ED}"/usr/share/bash-completion/completions/${PN} "${ED}"/$(get_bashcompdir)/${PN}-start || die
244 + # start-ephemeral is no longer a command but removing it here
245 + # generates QA warnings (still in upstream completion script)
246 + bashcomp_alias ${PN}-start \
247 + ${PN}-{attach,cgroup,copy,console,create,destroy,device,execute,freeze,info,monitor,snapshot,start-ephemeral,stop,unfreeze,wait}
248 +
249 + if use python; then
250 + pushd "${S}/src/python-lxc" > /dev/null
251 + # Unset DOCS. This has been handled by the default target
252 + unset DOCS
253 + distutils-r1_src_install
254 + popd > /dev/null
255 + fi
256 +
257 + keepdir /etc/lxc /var/lib/lxc/rootfs /var/log/lxc
258 +
259 + find "${D}" -name '*.la' -delete
260 +
261 + # Gentoo-specific additions!
262 + newinitd "${FILESDIR}/${PN}.initd.4" ${PN}
263 +
264 + # Remember to compare our systemd unit file with the upstream one
265 + # config/init/systemd/lxc.service.in
266 + systemd_newunit "${FILESDIR}"/${PN}_at.service.3 "lxc@.service"
267 +}
268 +
269 +pkg_postinst() {
270 + elog ""
271 + elog "Starting from version ${PN}-1.1.0-r3, the default lxc path has been"
272 + elog "moved from /etc/lxc to /var/lib/lxc. If you still want to use /etc/lxc"
273 + elog "please add the following to your /etc/lxc/default.conf"
274 + elog "lxc.lxcpath = /etc/lxc"
275 + elog ""
276 + elog "There is an init script provided with the package now; no documentation"
277 + elog "is currently available though, so please check out /etc/init.d/lxc ."
278 + elog "You _should_ only need to symlink it to /etc/init.d/lxc.configname"
279 + elog "to start the container defined into /etc/lxc/configname.conf ."
280 + elog "For further information about LXC development see"
281 + elog "http://blog.flameeyes.eu/tag/lxc" # remove once proper doc is available
282 + elog ""
283 +}
284
285 diff --git a/app-emulation/lxc/metadata.xml b/app-emulation/lxc/metadata.xml
286 index a1fcb3d..69aeae8 100644
287 --- a/app-emulation/lxc/metadata.xml
288 +++ b/app-emulation/lxc/metadata.xml
289 @@ -10,6 +10,9 @@
290 <maintainer type="person">
291 <email>hwoarang@g.o</email>
292 </maintainer>
293 + <maintainer type="person">
294 + <email>stasibear@g.o</email>
295 + </maintainer>
296 <maintainer type="project">
297 <email>virtualization@g.o</email>
298 <name>Gentoo Virtualization Project</name>