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: Mon, 29 Jun 2020 06:09:20
Message-Id: 1593410937.7957d655295b302e80f808fa621921575a948723.juippis@gentoo
1 commit: 7957d655295b302e80f808fa621921575a948723
2 Author: Joonas Niilola <juippis <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 29 06:08:14 2020 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 29 06:08:57 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7957d655
7
8 app-emulation/lxc: 4.0.3 release
9
10 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
11
12 app-emulation/lxc/Manifest | 1 +
13 app-emulation/lxc/lxc-4.0.3.ebuild | 160 +++++++++++++++++++++++++++++++++++++
14 2 files changed, 161 insertions(+)
15
16 diff --git a/app-emulation/lxc/Manifest b/app-emulation/lxc/Manifest
17 index f8760f06bb4..22458719259 100644
18 --- a/app-emulation/lxc/Manifest
19 +++ b/app-emulation/lxc/Manifest
20 @@ -1 +1,2 @@
21 DIST lxc-4.0.2.tar.gz 1352667 BLAKE2B 2ecc076bacb9bb1c2a808422f7b2e0cbfc74bf3bec6ca89ea58eb6ef4a414353c2e58163bff17b3304beb39f4980d10f54365f739645c1581bfca9f6079bf57c SHA512 0de6c1f9649d161579b45fc28a735f703c4498eff9c588462b838220aeab73f91921db628f77bc461eff38c7583cac10a38951263181956e2d33412a406f3ef3
22 +DIST lxc-4.0.3.tar.gz 1368461 BLAKE2B 861bd8f3736ecda9075c57338845d386811ae3aeceb72cd054023a25a9758d5d7c9ceec917fc634c118a13f8fb142b28bd93f27138b9ee1d0817f8360fda88da SHA512 a5d45626b1f26c0f098f6f0f5852472ea065f65f9918b972826e087a9a71a34253c85dd6f1b6b6837ca97303f8d43478a66595057d65a6e72a72334a3257ef88
23
24 diff --git a/app-emulation/lxc/lxc-4.0.3.ebuild b/app-emulation/lxc/lxc-4.0.3.ebuild
25 new file mode 100644
26 index 00000000000..9f71458a5e7
27 --- /dev/null
28 +++ b/app-emulation/lxc/lxc-4.0.3.ebuild
29 @@ -0,0 +1,160 @@
30 +# Copyright 1999-2020 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +
35 +inherit autotools bash-completion-r1 linux-info flag-o-matic pam readme.gentoo-r1 systemd
36 +
37 +DESCRIPTION="LinuX Containers userspace utilities"
38 +HOMEPAGE="https://linuxcontainers.org/ https://github.com/lxc/lxc"
39 +SRC_URI="https://linuxcontainers.org/downloads/lxc/${P}.tar.gz"
40 +
41 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
42 +
43 +LICENSE="LGPL-3"
44 +SLOT="0"
45 +IUSE="apparmor +caps doc examples libressl pam seccomp selinux +ssl +templates +tools"
46 +
47 +RDEPEND="app-misc/pax-utils
48 + sys-apps/util-linux
49 + sys-libs/libcap
50 + virtual/awk
51 + caps? ( sys-libs/libcap )
52 + pam? ( sys-libs/pam )
53 + seccomp? ( sys-libs/libseccomp )
54 + selinux? ( sys-libs/libselinux )
55 + ssl? (
56 + !libressl? ( dev-libs/openssl:0= )
57 + libressl? ( dev-libs/libressl:0= )
58 + )"
59 +DEPEND="${RDEPEND}
60 + >=app-text/docbook-sgml-utils-0.6.14-r2
61 + >=sys-kernel/linux-headers-3.2
62 + apparmor? ( sys-apps/apparmor )"
63 +BDEPEND="doc? ( app-doc/doxygen )"
64 +PDEPEND="templates? ( app-emulation/lxc-templates )"
65 +
66 +CONFIG_CHECK="~CGROUPS ~CGROUP_DEVICE
67 + ~CPUSETS ~CGROUP_CPUACCT
68 + ~CGROUP_SCHED
69 +
70 + ~NAMESPACES
71 + ~IPC_NS ~USER_NS ~PID_NS
72 +
73 + ~CGROUP_FREEZER
74 + ~UTS_NS ~NET_NS
75 + ~VETH ~MACVLAN
76 +
77 + ~POSIX_MQUEUE
78 + ~!NETPRIO_CGROUP"
79 +
80 +ERROR_CGROUP_FREEZER="CONFIG_CGROUP_FREEZER: needed to freeze containers"
81 +ERROR_UTS_NS="CONFIG_UTS_NS: needed to unshare hostnames and uname info"
82 +ERROR_NET_NS="CONFIG_NET_NS: needed for unshared network"
83 +ERROR_VETH="CONFIG_VETH: needed for internal (host-to-container) networking"
84 +ERROR_MACVLAN="CONFIG_MACVLAN: needed for internal (inter-container) networking"
85 +ERROR_POSIX_MQUEUE="CONFIG_POSIX_MQUEUE: needed for lxc-execute command"
86 +ERROR_NETPRIO_CGROUP="CONFIG_NETPRIO_CGROUP: as of kernel 3.3 and lxc 0.8.0_rc1 this causes LXCs to fail booting."
87 +
88 +DOCS=( AUTHORS CONTRIBUTING MAINTAINERS NEWS README doc/FAQ.txt )
89 +
90 +pkg_setup() {
91 + linux-info_pkg_setup
92 +}
93 +
94 +PATCHES=(
95 + "${FILESDIR}"/${PN}-3.0.0-bash-completion.patch
96 + "${FILESDIR}"/${PN}-2.0.5-omit-sysconfig.patch # bug 558854
97 +)
98 +
99 +src_prepare() {
100 + default
101 + eautoreconf
102 +}
103 +
104 +src_configure() {
105 + append-flags -fno-strict-aliasing
106 +
107 + # --enable-doc is for manpages which is why we don't link it to a "doc"
108 + # USE flag. We always want man pages.
109 + local myeconfargs=(
110 + --bindir=/usr/bin
111 + --localstatedir=/var
112 + --sbindir=/usr/bin
113 +
114 + --with-config-path=/var/lib/lxc
115 + --with-distro=gentoo
116 + --with-init-script=systemd
117 + --with-rootfs-path=/var/lib/lxc/rootfs
118 + --with-runtime-path=/run
119 + --with-systemdsystemunitdir=$(systemd_get_systemunitdir)
120 +
121 + --disable-asan
122 + --disable-coverity-build
123 + --disable-dlog
124 + --disable-mutex-debugging
125 + --disable-rpath
126 + --disable-tests
127 + --disable-ubsan
128 + --disable-werror
129 +
130 + --enable-bash
131 + --enable-commands
132 + --enable-doc
133 + --enable-memfd-rexec
134 + --enable-thread-safety
135 +
136 + $(use_enable apparmor)
137 + $(use_enable caps capabilities)
138 + $(use_enable doc api-docs)
139 + $(use_enable examples)
140 + $(use_enable pam)
141 + $(use_enable seccomp)
142 + $(use_enable selinux)
143 + $(use_enable ssl openssl)
144 + $(use_enable tools)
145 +
146 + $(use_with pam pamdir $(getpam_mod_dir))
147 + )
148 +
149 + econf "${myeconfargs[@]}"
150 +}
151 +
152 +src_install() {
153 + default
154 +
155 + mv "${ED}"/usr/share/bash-completion/completions/${PN} "${ED}"/$(get_bashcompdir)/${PN}-start || die
156 + bashcomp_alias ${PN}-start \
157 + ${PN}-{attach,cgroup,copy,console,create,destroy,device,execute,freeze,info,monitor,snapshot,stop,unfreeze,wait}
158 +
159 + keepdir /etc/lxc /var/lib/lxc/rootfs /var/log/lxc
160 + rmdir "${D}"/var/cache/lxc "${D}"/var/cache || die "rmdir failed"
161 +
162 + find "${D}" -name '*.la' -delete -o -name '*.a' -delete || die
163 +
164 + # Gentoo-specific additions!
165 + newinitd "${FILESDIR}/${PN}.initd.8" ${PN}
166 +
167 + # Remember to compare our systemd unit file with the upstream one
168 + # config/init/systemd/lxc.service.in
169 + systemd_newunit "${FILESDIR}"/${PN}_at.service.4.0.0 "lxc@.service"
170 +
171 + DOC_CONTENTS="
172 + For openrc, there is an init script provided with the package.
173 + You _should_ only need to symlink /etc/init.d/lxc to
174 + /etc/init.d/lxc.configname to start the container defined in
175 + /etc/lxc/configname.conf.
176 +
177 + Correspondingly, for systemd a service file lxc@.service is installed.
178 + Enable and start lxc@configname in order to start the container defined
179 + in /etc/lxc/configname.conf.
180 +
181 + If you want checkpoint/restore functionality, please install criu
182 + (sys-process/criu)."
183 + DISABLE_AUTOFORMATTING=true
184 + readme.gentoo_create_doc
185 +}
186 +
187 +pkg_postinst() {
188 + readme.gentoo_print_elog
189 +}