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-containers/lxc/
Date: Wed, 02 Feb 2022 08:53:17
Message-Id: 1643791986.217d6f6451475d6649fe0697dbb6f5b1fc927c9b.juippis@gentoo
1 commit: 217d6f6451475d6649fe0697dbb6f5b1fc927c9b
2 Author: Joonas Niilola <juippis <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 2 07:05:04 2022 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 2 08:53:06 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=217d6f64
7
8 app-containers/lxc: add 4.0.12
9
10 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
11
12 app-containers/lxc/Manifest | 2 +
13 app-containers/lxc/lxc-4.0.12.ebuild | 184 +++++++++++++++++++++++++++++++++++
14 2 files changed, 186 insertions(+)
15
16 diff --git a/app-containers/lxc/Manifest b/app-containers/lxc/Manifest
17 index e2af36e0fe7a..e1145caad041 100644
18 --- a/app-containers/lxc/Manifest
19 +++ b/app-containers/lxc/Manifest
20 @@ -1,2 +1,4 @@
21 DIST lxc-4.0.11.tar.gz 1543031 BLAKE2B 0309bbb96938e60e4cbe145fa0cc3c0a85d9154282a889d74167128b6166a280bb4d53df266990a529a98935ef2c12e8d2214e9a8f6cb293d47aa5808ebad82f SHA512 23287e468da8939334f4261bfcbb52eadcbe5806bd97896db38c84eb42f32143dc17bb8b9bb7f7f88584b72056553c9edc33ddb693a345ecf88f3177573fa9c0
22 DIST lxc-4.0.11.tar.gz.asc 833 BLAKE2B 68804d1d5ad09e388541b3a95a98ca14202c513ea3544a7389a49f4e13ecffc17715bb023675134fd99047c727cffe09cbd0a89883054b82650ebd23366823a7 SHA512 49a54aaf018772db40e1dadc0a10e7d727a2b14b34c0a3c704fd3f7a12e60082abf4628cc0a489ee620ef2210c7542abbdb6d1432e4297ceef52cdd6b158a5f8
23 +DIST lxc-4.0.12.tar.gz 1565070 BLAKE2B 819b5140b641dbc1ed6cf5f2840bb0ee6d3ab8c687f4f8064e42d347113bdf50fcbb653a6fb26598db0daab0c83ad88fe0d27fd2842fac9d7f5fef73656d7976 SHA512 04437d9c891cd3a22f756c42f05e97398772587175d65aff9d394f0f3e810efc5c1fe7077c39573de3ec259e0605bc2a7ea51093613b2cef908372ae338df19d
24 +DIST lxc-4.0.12.tar.gz.asc 833 BLAKE2B 2fca60b5ac267a893f70875ccdbe39db6b98b5fe51fe396692449e310b6e680e7b142380e193f5d8299f18e796ed2fd0e08cd186859069877fcca6bc26e44717 SHA512 4f2912879e6f3bf5fdbebb902cf16ca6b766b5720b817c4b4996e62098a1d282327d330ffd9768d45d69aeddb50184dc8485b0ef75b046449ce4c544cdc43c9b
25
26 diff --git a/app-containers/lxc/lxc-4.0.12.ebuild b/app-containers/lxc/lxc-4.0.12.ebuild
27 new file mode 100644
28 index 000000000000..002b011a8abf
29 --- /dev/null
30 +++ b/app-containers/lxc/lxc-4.0.12.ebuild
31 @@ -0,0 +1,184 @@
32 +# Copyright 1999-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +inherit autotools bash-completion-r1 linux-info flag-o-matic optfeature pam readme.gentoo-r1 systemd verify-sig
38 +
39 +DESCRIPTION="A userspace interface for the Linux kernel containment features"
40 +HOMEPAGE="https://linuxcontainers.org/ https://github.com/lxc/lxc"
41 +SRC_URI="https://linuxcontainers.org/downloads/lxc/${P}.tar.gz
42 + verify-sig? ( https://linuxcontainers.org/downloads/lxc/${P}.tar.gz.asc )"
43 +
44 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
45 +
46 +LICENSE="GPL-2 LGPL-2.1 LGPL-3"
47 +SLOT="0"
48 +IUSE="apparmor +caps doc io-uring man pam seccomp selinux +ssl +tools verify-sig"
49 +
50 +RDEPEND="acct-group/lxc
51 + acct-user/lxc
52 + app-misc/pax-utils
53 + sys-apps/util-linux
54 + sys-libs/libcap
55 + virtual/awk
56 + caps? ( sys-libs/libcap )
57 + io-uring? ( >=sys-libs/liburing-2:= )
58 + pam? ( sys-libs/pam )
59 + seccomp? ( sys-libs/libseccomp )
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="virtual/pkgconfig
68 + doc? ( app-doc/doxygen[dot] )
69 + man? ( app-text/docbook-sgml-utils )
70 + verify-sig? ( sec-keys/openpgp-keys-linuxcontainers )"
71 +
72 +CONFIG_CHECK="~!NETPRIO_CGROUP
73 + ~CGROUPS
74 + ~CGROUP_CPUACCT
75 + ~CGROUP_DEVICE
76 + ~CGROUP_FREEZER
77 +
78 + ~CGROUP_SCHED
79 + ~CPUSETS
80 + ~IPC_NS
81 + ~MACVLAN
82 +
83 + ~MEMCG
84 + ~NAMESPACES
85 + ~NET_NS
86 + ~PID_NS
87 +
88 + ~POSIX_MQUEUE
89 + ~USER_NS
90 + ~UTS_NS
91 + ~VETH"
92 +
93 +ERROR_CGROUP_FREEZER="CONFIG_CGROUP_FREEZER: needed to freeze containers"
94 +ERROR_MACVLAN="CONFIG_MACVLAN: needed for internal (inter-container) networking"
95 +ERROR_MEMCG="CONFIG_MEMCG: needed for memory resource control in containers"
96 +ERROR_NET_NS="CONFIG_NET_NS: needed for unshared network"
97 +ERROR_POSIX_MQUEUE="CONFIG_POSIX_MQUEUE: needed for lxc-execute command"
98 +ERROR_UTS_NS="CONFIG_UTS_NS: needed to unshare hostnames and uname info"
99 +ERROR_VETH="CONFIG_VETH: needed for internal (host-to-container) networking"
100 +
101 +DOCS=( AUTHORS CONTRIBUTING MAINTAINERS NEWS README doc/FAQ.txt )
102 +
103 +pkg_setup() {
104 + linux-info_pkg_setup
105 +}
106 +
107 +PATCHES=(
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 +
116 + export bashcompdir="/etc/bash_completion.d"
117 + eautoreconf
118 +}
119 +
120 +src_configure() {
121 + append-flags -fno-strict-aliasing
122 +
123 + local myeconfargs=(
124 + --bindir=/usr/bin
125 + --localstatedir=/var
126 + --sbindir=/usr/bin
127 +
128 + --with-config-path=/var/lib/lxc
129 + --with-distro=gentoo
130 + --with-init-script=systemd
131 + --with-rootfs-path=/var/lib/lxc/rootfs
132 + --with-runtime-path=/run
133 + --with-systemdsystemunitdir=$(systemd_get_systemunitdir)
134 +
135 + --disable-coverity-build
136 + --disable-dlog
137 + --disable-fuzzers
138 + --disable-mutex-debugging
139 + --disable-no-undefined
140 + --disable-rpath
141 + --disable-sanitizers
142 + --disable-tests
143 + --disable-werror
144 +
145 + --enable-bash
146 + --enable-commands
147 + --enable-memfd-rexec
148 + --enable-thread-safety
149 +
150 + $(use_enable apparmor)
151 + $(use_enable caps capabilities)
152 + $(use_enable doc api-docs)
153 + $(use_enable doc examples)
154 + $(use_enable io-uring liburing)
155 + $(use_enable man doc)
156 + $(use_enable pam)
157 + $(use_enable seccomp)
158 + $(use_enable selinux)
159 + $(use_enable ssl openssl)
160 + $(use_enable tools)
161 +
162 + $(use_with pam pamdir $(getpam_mod_dir))
163 + )
164 +
165 + econf "${myeconfargs[@]}"
166 +}
167 +
168 +src_install() {
169 + default
170 +
171 + # The main bash-completion file will collide with lxd, need to relocate and update symlinks.
172 + mkdir -p "${ED}"/$(get_bashcompdir) || die "Failed to create bashcompdir."
173 + mv "${ED}"/etc/bash_completion.d/lxc "${ED}"/$(get_bashcompdir)/lxc-start || die "Failed to relocate lxc bash-completion file."
174 + rm -r "${ED}"/etc/bash_completion.d || die "Failed to remove wrong bash_completion.d content."
175 +
176 + if use tools; then
177 + bashcomp_alias lxc-start lxc-{attach,cgroup,copy,console,create,destroy,device,execute,freeze,info,monitor,snapshot,stop,unfreeze,usernsexec,wait}
178 + else
179 + bashcomp_alias lxc-start lxc-usernsexec
180 + fi
181 +
182 + keepdir /etc/lxc /var/lib/lxc/rootfs /var/log/lxc
183 + rmdir "${D}"/var/cache/lxc "${D}"/var/cache || die "rmdir failed"
184 +
185 + find "${D}" -name '*.la' -delete -o -name '*.a' -delete || die
186 +
187 + # Gentoo-specific additions!
188 + newinitd "${FILESDIR}/lxc.initd.8" lxc
189 +
190 + # Remember to compare our systemd unit file with the upstream one
191 + # config/init/systemd/lxc.service.in
192 + systemd_newunit "${FILESDIR}"/lxc_at.service.4.0.0 "lxc@.service"
193 +
194 + DOC_CONTENTS="
195 + For openrc, there is an init script provided with the package.
196 + You should only need to symlink /etc/init.d/lxc to
197 + /etc/init.d/lxc.configname to start the container defined in
198 + /etc/lxc/configname.conf.
199 +
200 + Correspondingly, for systemd a service file lxc@.service is installed.
201 + Enable and start lxc@configname in order to start the container defined
202 + in /etc/lxc/configname.conf."
203 + DISABLE_AUTOFORMATTING=true
204 + readme.gentoo_create_doc
205 +}
206 +
207 +pkg_postinst() {
208 + readme.gentoo_print_elog
209 +
210 + elog "Please run 'lxc-checkconfig' to see optional kernel features."
211 + elog
212 + optfeature "automatic template scripts" app-containers/lxc-templates
213 + optfeature "Debian-based distribution container image support" dev-util/debootstrap
214 + optfeature "snapshot & restore functionality" sys-process/criu
215 +}