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