1 |
commit: 7ff4458b663f7af03854c75f020e4fb60b68ab09 |
2 |
Author: Erik Mackdanz <stasibear <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 4 15:28:43 2016 +0000 |
4 |
Commit: Erik Mackdanz <stasibear <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 4 15:29:40 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ff4458b |
7 |
|
8 |
app-emulation/lxc: bump to 2.0.4 |
9 |
|
10 |
EAPI=6. Also add a condition around a removed kernel |
11 |
config option. |
12 |
|
13 |
Package-Manager: portage-2.3.0 |
14 |
|
15 |
app-emulation/lxc/Manifest | 1 + |
16 |
.../lxc/files/lxc-2.0.4-bash-completion.patch | 31 ++++ |
17 |
.../lxc/files/lxc-2.0.4-omit-sysconfig.patch | 5 + |
18 |
app-emulation/lxc/lxc-2.0.4.ebuild | 201 +++++++++++++++++++++ |
19 |
4 files changed, 238 insertions(+) |
20 |
|
21 |
diff --git a/app-emulation/lxc/Manifest b/app-emulation/lxc/Manifest |
22 |
index 3260e04..fe865f9 100644 |
23 |
--- a/app-emulation/lxc/Manifest |
24 |
+++ b/app-emulation/lxc/Manifest |
25 |
@@ -1,3 +1,4 @@ |
26 |
DIST lxc-1.0.7.tar.gz 564985 SHA256 a0b1b09592e076e270dcb3ba004616d9ac3147f9de0b78ca39a30f8956b0a8f2 SHA512 e6ff42a7b41177e1be0d2cd47d4c554565c7fc35355f3aa8aeba00d4adc7a0f364ecd060ddb6c97b2fe5968329c4e4c4b3cb022bffd2da145f30880f077264a8 WHIRLPOOL f07e5e9efb8ff394aa9cdd6c3e725b453c8137ec221399cbf910d57dbc9268fc84e7227273567792821415dc14e774942b76a58a1a478de57d5c82e545702000 |
27 |
DIST lxc-1.0.8.tar.gz 575127 SHA256 399ac3eb4e0a89d657fb2e2a57f686ed061d3f1ea4733e7521b1539e9906c7ee SHA512 f552a4f48bb47d26c6b9ddaf8221a439c0848e3f54ec41b77d54717c21bddd56193941046cc96c699790e8265e762a926469c25ee687adcf7795f2906b1c260a WHIRLPOOL 72cd0b8b0345692dd9a3ed8785ee27f5e575794a96c515db1f1d073c29be4c06ae8c1ee24fa375a5ede2bba2494704916710b2e8814ed991d43330a40dff3d56 |
28 |
DIST lxc-2.0.3.tar.gz 772448 SHA256 635afa330088fea57883018da326fc72f85460b5a6c7802ad68044381aff14f3 SHA512 df714f189ec7aa681710fbd58405b8958740102032c0130d8a0eaaae0341a9bc91a215136203c404ad79773800f620bf6f71f811b3effe559aed66efa4f34fef WHIRLPOOL 89ce2f6762c7279e24658c1154b5c2960d3db32e0ec3724b338f5d30da77cc0b33a2376e5eebe6d9c356bdd34c2aa9da1e2434aecd7e428fa4b729389e35b862 |
29 |
+DIST lxc-2.0.4.tar.gz 775634 SHA256 57d40234aeecf5b60fb29d563e5a09d6a04c89e1267eb22a6704388ac8573e7b SHA512 3f985bba5aaa8a70f0329316ea4f42ab135d58c47611154c62e103718212a4b2c5e4f25fd45c372424db1fbf40afdc8269ae98655fb3bc8e31085a5d948f702b WHIRLPOOL b001c75d67d676e75b203d789cf2c0643ba9a47aa31965441340b66f28e18371415b9d44ce752e35102bc8677688eec6e586d800a33a2a965c8a046c091ebc06 |
30 |
|
31 |
diff --git a/app-emulation/lxc/files/lxc-2.0.4-bash-completion.patch b/app-emulation/lxc/files/lxc-2.0.4-bash-completion.patch |
32 |
new file mode 100644 |
33 |
index 00000000..6feb4c2 |
34 |
--- /dev/null |
35 |
+++ b/app-emulation/lxc/files/lxc-2.0.4-bash-completion.patch |
36 |
@@ -0,0 +1,31 @@ |
37 |
+--- /config/bash/Makefile.am.orig 2016-05-18 20:40:42.238487678 +0000 |
38 |
++++ /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 |
+--- /config/bash/lxc.in.orig 2016-05-18 20:40:51.079488316 +0000 |
57 |
++++ /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.4-omit-sysconfig.patch b/app-emulation/lxc/files/lxc-2.0.4-omit-sysconfig.patch |
70 |
new file mode 100644 |
71 |
index 00000000..3ec8135 |
72 |
--- /dev/null |
73 |
+++ b/app-emulation/lxc/files/lxc-2.0.4-omit-sysconfig.patch |
74 |
@@ -0,0 +1,5 @@ |
75 |
+--- /config/Makefile.am.orig 2016-05-19 02:56:11.891113982 +0000 |
76 |
++++ /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.4.ebuild b/app-emulation/lxc/lxc-2.0.4.ebuild |
82 |
new file mode 100644 |
83 |
index 00000000..452f249 |
84 |
--- /dev/null |
85 |
+++ b/app-emulation/lxc/lxc-2.0.4.ebuild |
86 |
@@ -0,0 +1,201 @@ |
87 |
+# Copyright 1999-2016 Gentoo Foundation |
88 |
+# Distributed under the terms of the GNU General Public License v2 |
89 |
+# $Id$ |
90 |
+ |
91 |
+EAPI="6" |
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 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 |
+ ~CGROUP_FREEZER |
138 |
+ ~UTS_NS ~NET_NS |
139 |
+ ~VETH ~MACVLAN |
140 |
+ |
141 |
+ ~POSIX_MQUEUE |
142 |
+ ~!NETPRIO_CGROUP |
143 |
+ |
144 |
+ ~!GRKERNSEC_CHROOT_MOUNT |
145 |
+ ~!GRKERNSEC_CHROOT_DOUBLE |
146 |
+ ~!GRKERNSEC_CHROOT_PIVOT |
147 |
+ ~!GRKERNSEC_CHROOT_CHMOD |
148 |
+ ~!GRKERNSEC_CHROOT_CAPS |
149 |
+ ~!GRKERNSEC_PROC |
150 |
+ ~!GRKERNSEC_SYSFS_RESTRICT |
151 |
+" |
152 |
+ |
153 |
+ERROR_DEVPTS_MULTIPLE_INSTANCES="CONFIG_DEVPTS_MULTIPLE_INSTANCES: needed for pts inside container" |
154 |
+ |
155 |
+ERROR_CGROUP_FREEZER="CONFIG_CGROUP_FREEZER: needed to freeze containers" |
156 |
+ |
157 |
+ERROR_UTS_NS="CONFIG_UTS_NS: needed to unshare hostnames and uname info" |
158 |
+ERROR_NET_NS="CONFIG_NET_NS: needed for unshared network" |
159 |
+ |
160 |
+ERROR_VETH="CONFIG_VETH: needed for internal (host-to-container) networking" |
161 |
+ERROR_MACVLAN="CONFIG_MACVLAN: needed for internal (inter-container) networking" |
162 |
+ |
163 |
+ERROR_NETLINK_DIAG="CONFIG_NETLINK_DIAG: needed for lxc-checkpoint" |
164 |
+ERROR_PACKET_DIAG="CONFIG_PACKET_DIAG: needed for lxc-checkpoint" |
165 |
+ERROR_INET_UDP_DIAG="CONFIG_INET_UDP_DIAG: needed for lxc-checkpoint" |
166 |
+ERROR_INET_TCP_DIAG="CONFIG_INET_TCP_DIAG: needed for lxc-checkpoint" |
167 |
+ERROR_UNIX_DIAG="CONFIG_UNIX_DIAG: needed for lxc-checkpoint" |
168 |
+ERROR_CHECKPOINT_RESTORE="CONFIG_CHECKPOINT_RESTORE: needed for lxc-checkpoint" |
169 |
+ |
170 |
+ERROR_POSIX_MQUEUE="CONFIG_POSIX_MQUEUE: needed for lxc-execute command" |
171 |
+ |
172 |
+ERROR_NETPRIO_CGROUP="CONFIG_NETPRIO_CGROUP: as of kernel 3.3 and lxc 0.8.0_rc1 this causes LXCs to fail booting." |
173 |
+ |
174 |
+ERROR_GRKERNSEC_CHROOT_MOUNT="CONFIG_GRKERNSEC_CHROOT_MOUNT: some GRSEC features make LXC unusable see postinst notes" |
175 |
+ERROR_GRKERNSEC_CHROOT_DOUBLE="CONFIG_GRKERNSEC_CHROOT_DOUBLE: some GRSEC features make LXC unusable see postinst notes" |
176 |
+ERROR_GRKERNSEC_CHROOT_PIVOT="CONFIG_GRKERNSEC_CHROOT_PIVOT: some GRSEC features make LXC unusable see postinst notes" |
177 |
+ERROR_GRKERNSEC_CHROOT_CHMOD="CONFIG_GRKERNSEC_CHROOT_CHMOD: some GRSEC features make LXC unusable see postinst notes" |
178 |
+ERROR_GRKERNSEC_CHROOT_CAPS="CONFIG_GRKERNSEC_CHROOT_CAPS: some GRSEC features make LXC unusable see postinst notes" |
179 |
+ERROR_GRKERNSEC_PROC="CONFIG_GRKERNSEC_PROC: this GRSEC feature is incompatible with unprivileged containers" |
180 |
+ERROR_GRKERNSEC_SYSFS_RESTRICT="CONFIG_GRKERNSEC_SYSFS_RESTRICT: this GRSEC feature is incompatible with unprivileged containers" |
181 |
+ |
182 |
+DOCS=(AUTHORS CONTRIBUTING MAINTAINERS NEWS README doc/FAQ.txt) |
183 |
+ |
184 |
+S="${WORKDIR}/${PN}-${MY_P}" |
185 |
+ |
186 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
187 |
+ |
188 |
+pkg_setup() { |
189 |
+ kernel_is -lt 4 7 && CONFIG_CHECK="${CONFIG_CHECK} ~DEVPTS_MULTIPLE_INSTANCES" |
190 |
+ linux-info_pkg_setup |
191 |
+} |
192 |
+ |
193 |
+src_prepare() { |
194 |
+ eapply "${FILESDIR}"/${P}-bash-completion.patch |
195 |
+ #558854 |
196 |
+ eapply "${FILESDIR}"/${P}-omit-sysconfig.patch |
197 |
+ eapply_user |
198 |
+ eautoreconf |
199 |
+} |
200 |
+ |
201 |
+src_configure() { |
202 |
+ append-flags -fno-strict-aliasing |
203 |
+ |
204 |
+ if use python; then |
205 |
+ #541932 |
206 |
+ python_setup "python3*" |
207 |
+ export PKG_CONFIG_PATH="${T}/${EPYTHON}/pkgconfig:${PKG_CONFIG_PATH}" |
208 |
+ fi |
209 |
+ |
210 |
+ # I am not sure about the --with-rootfs-path |
211 |
+ # /var/lib/lxc is probably more appropriate than |
212 |
+ # /usr/lib/lxc. |
213 |
+ econf \ |
214 |
+ --localstatedir=/var \ |
215 |
+ --bindir=/usr/bin \ |
216 |
+ --sbindir=/usr/bin \ |
217 |
+ --with-config-path=/var/lib/lxc \ |
218 |
+ --with-rootfs-path=/var/lib/lxc/rootfs \ |
219 |
+ --with-distro=gentoo \ |
220 |
+ --with-runtime-path=/run \ |
221 |
+ --disable-apparmor \ |
222 |
+ $(use_enable cgmanager) \ |
223 |
+ $(use_enable doc) \ |
224 |
+ $(use_enable examples) \ |
225 |
+ $(use_enable lua) \ |
226 |
+ $(use_enable python) \ |
227 |
+ $(use_enable seccomp) |
228 |
+} |
229 |
+ |
230 |
+python_compile() { |
231 |
+ distutils-r1_python_compile build_ext -I ../ -L ../${PN} |
232 |
+} |
233 |
+ |
234 |
+src_compile() { |
235 |
+ default |
236 |
+ |
237 |
+ if use python; then |
238 |
+ pushd "${S}/src/python-${PN}" > /dev/null |
239 |
+ distutils-r1_src_compile |
240 |
+ popd > /dev/null |
241 |
+ fi |
242 |
+} |
243 |
+ |
244 |
+src_install() { |
245 |
+ default |
246 |
+ |
247 |
+ mv "${ED}"/usr/share/bash-completion/completions/${PN} "${ED}"/$(get_bashcompdir)/${PN}-start || die |
248 |
+ # start-ephemeral is no longer a command but removing it here |
249 |
+ # generates QA warnings (still in upstream completion script) |
250 |
+ bashcomp_alias ${PN}-start \ |
251 |
+ ${PN}-{attach,cgroup,copy,console,create,destroy,device,execute,freeze,info,monitor,snapshot,start-ephemeral,stop,unfreeze,wait} |
252 |
+ |
253 |
+ if use python; then |
254 |
+ pushd "${S}/src/python-lxc" > /dev/null |
255 |
+ # Unset DOCS. This has been handled by the default target |
256 |
+ unset DOCS |
257 |
+ distutils-r1_src_install |
258 |
+ popd > /dev/null |
259 |
+ fi |
260 |
+ |
261 |
+ keepdir /etc/lxc /var/lib/lxc/rootfs /var/log/lxc |
262 |
+ |
263 |
+ find "${D}" -name '*.la' -delete |
264 |
+ |
265 |
+ # Gentoo-specific additions! |
266 |
+ newinitd "${FILESDIR}/${PN}.initd.5" ${PN} |
267 |
+ |
268 |
+ # Remember to compare our systemd unit file with the upstream one |
269 |
+ # config/init/systemd/lxc.service.in |
270 |
+ systemd_newunit "${FILESDIR}"/${PN}_at.service.4 "lxc@.service" |
271 |
+} |
272 |
+ |
273 |
+pkg_postinst() { |
274 |
+ elog "" |
275 |
+ elog "Starting from version ${PN}-1.1.0-r3, the default lxc path has been" |
276 |
+ elog "moved from /etc/lxc to /var/lib/lxc. If you still want to use /etc/lxc" |
277 |
+ elog "please add the following to your /etc/lxc/default.conf" |
278 |
+ elog "lxc.lxcpath = /etc/lxc" |
279 |
+ elog "" |
280 |
+ elog "There is an init script provided with the package now; no documentation" |
281 |
+ elog "is currently available though, so please check out /etc/init.d/lxc ." |
282 |
+ elog "You _should_ only need to symlink it to /etc/init.d/lxc.configname" |
283 |
+ elog "to start the container defined into /etc/lxc/configname.conf ." |
284 |
+ elog "For further information about LXC development see" |
285 |
+ elog "http://blog.flameeyes.eu/tag/lxc" # remove once proper doc is available |
286 |
+ elog "" |
287 |
+} |