Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/lxc/
Date: Wed, 05 May 2021 05:11:08
Message-Id: 1620191454.9454ee6cad81b87891086fe36e737469d69c23da.juippis@gentoo
1 commit: 9454ee6cad81b87891086fe36e737469d69c23da
2 Author: Joonas Niilola <juippis <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 5 05:10:00 2021 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Wed May 5 05:10:54 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9454ee6c
7
8 app-emulation/lxc: bump to 4.0.9
9
10 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
11
12 app-emulation/lxc/Manifest | 2 +
13 app-emulation/lxc/lxc-4.0.9.ebuild | 173 +++++++++++++++++++++++++++++++++++++
14 2 files changed, 175 insertions(+)
15
16 diff --git a/app-emulation/lxc/Manifest b/app-emulation/lxc/Manifest
17 index 4e9ccf760fe..ffdf2edce5d 100644
18 --- a/app-emulation/lxc/Manifest
19 +++ b/app-emulation/lxc/Manifest
20 @@ -2,3 +2,5 @@ DIST lxc-4.0.6.tar.gz 1363162 BLAKE2B e2d9d281cf521575aeecefbcba0c7b7f336ab73193
21 DIST lxc-4.0.6.tar.gz.asc 833 BLAKE2B 04b6bda0ed52a6ab8eebde4d3d5f1f6cb19eea017ae989d47323831d467324f99801b40c3bb70f00d7521753a298e6fa339f0da039c4d72b0163d0efc815d7e7 SHA512 baeafa5b63034e2884d5ab4f11710612bed1c61cd493ac19b9b24b93365b89325518b69878015b4b752f71beda47ecabf774b698e6be9ec9aa86376df2c302db
22 DIST lxc-4.0.8.tar.gz 1488025 BLAKE2B 51bbbf968bc07472214edbad89ed703f54347d5dd78860a2954609d87a1971326a5fcc2254890756d769dcf5e6005e19f6eff34fd923bb594cffcea0b8100ebd SHA512 b2b9887c5c4646fbd873fd15779a563954ac729bfbd546ccc2b9c7e5e283b3b3189290a31cc6c549881201ff29d955b56c084a72c080f48f83240c12b46ce85e
23 DIST lxc-4.0.8.tar.gz.asc 833 BLAKE2B 36e82957f878553b04dffc18aa82b81a55b400f4ceeddc2a47f3c1c28c34356f358626dbbc712dadd72678ef3340028817d5addc011fe5650419acf4bdd4f0f1 SHA512 138a17d971466c7a14f4da40af7163bb752be9008f00f6ce240fdc416ad97bd0b89b181b8565a95592bb2de456fba117e3263fb87eb92ced99ae3d7e984dc9b3
24 +DIST lxc-4.0.9.tar.gz 1500310 BLAKE2B 3796d36b6f76ec595dc28207e66ec9f5a7c1a39f5c5ebc851638c519be35f59b4ec06a71b2866cd8fef0a6140f61fd4b70c900f5a8ffd42d7da7a30d3ff59975 SHA512 4ef9d9efdd4118fdffde8b49c6ae71cf5eb060be51daaa4f4ceb804c743fbf3278e6518e6a694faefc720f2834f98ac48d67842d589a2120b8f7ec4c3b61fa84
25 +DIST lxc-4.0.9.tar.gz.asc 833 BLAKE2B 2d275c968831410d987aa7f8062f4e35ba15043f92f38fd3bdd6bf80964906741d05ccd93789132d421ee1c8778cec6a2e76c4f0eb2165cf0107261495fa6856 SHA512 4c90dfbdba90959ee8df5da8ca8b240f65ab03ab91637833c677e2a73592c09f9c5a55b9a261be6efb0888156c916223ff1aa9003b18d46e667908aaa550c944
26
27 diff --git a/app-emulation/lxc/lxc-4.0.9.ebuild b/app-emulation/lxc/lxc-4.0.9.ebuild
28 new file mode 100644
29 index 00000000000..89a0b2e2b2d
30 --- /dev/null
31 +++ b/app-emulation/lxc/lxc-4.0.9.ebuild
32 @@ -0,0 +1,173 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +inherit autotools bash-completion-r1 linux-info flag-o-matic optfeature pam readme.gentoo-r1 systemd verify-sig
39 +
40 +DESCRIPTION="A userspace interface for the Linux kernel containment features"
41 +HOMEPAGE="https://linuxcontainers.org/ https://github.com/lxc/lxc"
42 +SRC_URI="https://linuxcontainers.org/downloads/lxc/${P}.tar.gz
43 + verify-sig? ( https://linuxcontainers.org/downloads/lxc/${P}.tar.gz.asc )"
44 +
45 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
46 +
47 +LICENSE="LGPL-3"
48 +SLOT="0"
49 +IUSE="apparmor +caps doc man pam selinux +ssl +tools verify-sig"
50 +
51 +RDEPEND="acct-group/lxc
52 + acct-user/lxc
53 + app-misc/pax-utils
54 + sys-apps/util-linux
55 + sys-libs/libcap
56 + sys-libs/libseccomp
57 + virtual/awk
58 + caps? ( sys-libs/libcap )
59 + pam? ( sys-libs/pam )
60 + selinux? ( sys-libs/libselinux )
61 + ssl? (
62 + dev-libs/openssl:0=
63 + )"
64 +DEPEND="${RDEPEND}
65 + >=sys-kernel/linux-headers-4
66 + apparmor? ( sys-apps/apparmor )"
67 +BDEPEND="doc? ( app-doc/doxygen )
68 + man? ( app-text/docbook-sgml-utils )
69 + verify-sig? ( app-crypt/openpgp-keys-linuxcontainers )"
70 +
71 +CONFIG_CHECK="~!NETPRIO_CGROUP
72 + ~CGROUPS
73 + ~CGROUP_CPUACCT
74 + ~CGROUP_DEVICE
75 + ~CGROUP_FREEZER
76 +
77 + ~CGROUP_SCHED
78 + ~CPUSETS
79 + ~IPC_NS
80 + ~MACVLAN
81 +
82 + ~MEMCG
83 + ~NAMESPACES
84 + ~NET_NS
85 + ~PID_NS
86 +
87 + ~POSIX_MQUEUE
88 + ~USER_NS
89 + ~UTS_NS
90 + ~VETH"
91 +
92 +ERROR_CGROUP_FREEZER="CONFIG_CGROUP_FREEZER: needed to freeze containers"
93 +ERROR_MACVLAN="CONFIG_MACVLAN: needed for internal (inter-container) networking"
94 +ERROR_MEMCG="CONFIG_MEMCG: needed for memory resource control in containers"
95 +ERROR_NET_NS="CONFIG_NET_NS: needed for unshared network"
96 +ERROR_POSIX_MQUEUE="CONFIG_POSIX_MQUEUE: needed for lxc-execute command"
97 +ERROR_UTS_NS="CONFIG_UTS_NS: needed to unshare hostnames and uname info"
98 +ERROR_VETH="CONFIG_VETH: needed for internal (host-to-container) networking"
99 +
100 +DOCS=( AUTHORS CONTRIBUTING MAINTAINERS NEWS README doc/FAQ.txt )
101 +
102 +pkg_setup() {
103 + linux-info_pkg_setup
104 +}
105 +
106 +PATCHES=(
107 + "${FILESDIR}"/${PN}-3.0.0-bash-completion.patch
108 + "${FILESDIR}"/${PN}-2.0.5-omit-sysconfig.patch # bug 558854
109 +)
110 +
111 +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/linuxcontainers.asc
112 +
113 +src_prepare() {
114 + default
115 + eautoreconf
116 +}
117 +
118 +src_configure() {
119 + append-flags -fno-strict-aliasing
120 +
121 + local myeconfargs=(
122 + --bindir=/usr/bin
123 + --localstatedir=/var
124 + --sbindir=/usr/bin
125 +
126 + --with-config-path=/var/lib/lxc
127 + --with-distro=gentoo
128 + --with-init-script=systemd
129 + --with-rootfs-path=/var/lib/lxc/rootfs
130 + --with-runtime-path=/run
131 + --with-systemdsystemunitdir=$(systemd_get_systemunitdir)
132 +
133 + --disable-coverity-build
134 + --disable-dlog
135 + --disable-fuzzers
136 + --disable-mutex-debugging
137 + --disable-no-undefined
138 + --disable-rpath
139 + --disable-sanitizers
140 + --disable-tests
141 + --disable-werror
142 +
143 + --enable-bash
144 + --enable-commands
145 + --enable-memfd-rexec
146 + --enable-seccomp
147 + --enable-thread-safety
148 +
149 + $(use_enable apparmor)
150 + $(use_enable caps capabilities)
151 + $(use_enable doc api-docs)
152 + $(use_enable doc examples)
153 + $(use_enable man doc)
154 + $(use_enable pam)
155 + $(use_enable selinux)
156 + $(use_enable ssl openssl)
157 + $(use_enable tools)
158 +
159 + $(use_with pam pamdir $(getpam_mod_dir))
160 + )
161 +
162 + econf "${myeconfargs[@]}"
163 +}
164 +
165 +src_install() {
166 + default
167 +
168 + mv "${ED}"/usr/share/bash-completion/completions/${PN} "${ED}"/$(get_bashcompdir)/${PN}-start || die
169 + bashcomp_alias ${PN}-start \
170 + ${PN}-{attach,cgroup,copy,console,create,destroy,device,execute,freeze,info,monitor,snapshot,stop,unfreeze,wait}
171 +
172 + keepdir /etc/lxc /var/lib/lxc/rootfs /var/log/lxc
173 + rmdir "${D}"/var/cache/lxc "${D}"/var/cache || die "rmdir failed"
174 +
175 + find "${D}" -name '*.la' -delete -o -name '*.a' -delete || die
176 +
177 + # Gentoo-specific additions!
178 + newinitd "${FILESDIR}/${PN}.initd.8" ${PN}
179 +
180 + # Remember to compare our systemd unit file with the upstream one
181 + # config/init/systemd/lxc.service.in
182 + systemd_newunit "${FILESDIR}"/${PN}_at.service.4.0.0 "lxc@.service"
183 +
184 + DOC_CONTENTS="
185 + For openrc, there is an init script provided with the package.
186 + You should only need to symlink /etc/init.d/lxc to
187 + /etc/init.d/lxc.configname to start the container defined in
188 + /etc/lxc/configname.conf.
189 +
190 + Correspondingly, for systemd a service file lxc@.service is installed.
191 + Enable and start lxc@configname in order to start the container defined
192 + in /etc/lxc/configname.conf."
193 + DISABLE_AUTOFORMATTING=true
194 + readme.gentoo_create_doc
195 +}
196 +
197 +pkg_postinst() {
198 + readme.gentoo_print_elog
199 +
200 + elog "Please run 'lxc-checkconfig' to see optional kernel features."
201 + elog
202 + optfeature "automatic template scripts" app-emulation/lxc-templates
203 + optfeature "Debian-based distribution container image support" dev-util/debootstrap
204 + optfeature "snapshot & restore functionality" sys-process/criu
205 +}