1 |
commit: 90f4beab1004a26f4ab0957021769ab0a077df07 |
2 |
Author: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 5 06:43:37 2020 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 5 06:43:57 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90f4beab |
7 |
|
8 |
app-emulation/lxc: bump to 4.0.4 |
9 |
|
10 |
- clean kernel config checks, remove some old. |
11 |
|
12 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
13 |
|
14 |
app-emulation/lxc/Manifest | 1 + |
15 |
app-emulation/lxc/lxc-4.0.4.ebuild | 171 +++++++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 172 insertions(+) |
17 |
|
18 |
diff --git a/app-emulation/lxc/Manifest b/app-emulation/lxc/Manifest |
19 |
index ae4ea385e37..814ef80d2ef 100644 |
20 |
--- a/app-emulation/lxc/Manifest |
21 |
+++ b/app-emulation/lxc/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST lxc-4.0.3.tar.gz 1368461 BLAKE2B 861bd8f3736ecda9075c57338845d386811ae3aeceb72cd054023a25a9758d5d7c9ceec917fc634c118a13f8fb142b28bd93f27138b9ee1d0817f8360fda88da SHA512 a5d45626b1f26c0f098f6f0f5852472ea065f65f9918b972826e087a9a71a34253c85dd6f1b6b6837ca97303f8d43478a66595057d65a6e72a72334a3257ef88 |
24 |
+DIST lxc-4.0.4.tar.gz 844684 BLAKE2B 438f9c79787cfab493a159a03dad214519b979c192264cb4acff21174f5642e2c10a899504ed2ac697906ca1ea9ad5cd92e01dbb8c6420651e7130b56022032a SHA512 5c5bb3c474b37284e862cbaf35daab01be7606992eb101cbea7097951ccee81dad8ab8d2624ba5f62279ece17889b1245fd6b2b63e8b17ed728560c5d40309b2 |
25 |
|
26 |
diff --git a/app-emulation/lxc/lxc-4.0.4.ebuild b/app-emulation/lxc/lxc-4.0.4.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..cbd914e7061 |
29 |
--- /dev/null |
30 |
+++ b/app-emulation/lxc/lxc-4.0.4.ebuild |
31 |
@@ -0,0 +1,171 @@ |
32 |
+# Copyright 1999-2020 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 pam readme.gentoo-r1 systemd |
38 |
+ |
39 |
+DESCRIPTION="LinuX Containers userspace utilities" |
40 |
+HOMEPAGE="https://linuxcontainers.org/ https://github.com/lxc/lxc" |
41 |
+SRC_URI="https://linuxcontainers.org/downloads/lxc/${P}.tar.gz |
42 |
+ https://github.com/lxc/lxc/archive/${P}.tar.gz" |
43 |
+ |
44 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" |
45 |
+ |
46 |
+LICENSE="LGPL-3" |
47 |
+SLOT="0" |
48 |
+IUSE="apparmor +caps doc examples libressl pam seccomp selinux +ssl +templates +tools" |
49 |
+ |
50 |
+RDEPEND="app-misc/pax-utils |
51 |
+ sys-apps/util-linux |
52 |
+ sys-libs/libcap |
53 |
+ virtual/awk |
54 |
+ caps? ( sys-libs/libcap ) |
55 |
+ pam? ( sys-libs/pam ) |
56 |
+ seccomp? ( sys-libs/libseccomp ) |
57 |
+ selinux? ( sys-libs/libselinux ) |
58 |
+ ssl? ( |
59 |
+ !libressl? ( dev-libs/openssl:0= ) |
60 |
+ libressl? ( dev-libs/libressl:0= ) |
61 |
+ )" |
62 |
+DEPEND="${RDEPEND} |
63 |
+ >=app-text/docbook-sgml-utils-0.6.14-r2 |
64 |
+ >=sys-kernel/linux-headers-3.2 |
65 |
+ apparmor? ( sys-apps/apparmor )" |
66 |
+BDEPEND="doc? ( app-doc/doxygen )" |
67 |
+PDEPEND="templates? ( app-emulation/lxc-templates )" |
68 |
+ |
69 |
+CONFIG_CHECK="~!NETPRIO_CGROUP |
70 |
+ ~CGROUPS |
71 |
+ ~CGROUP_CPUACCT |
72 |
+ ~CGROUP_DEVICE |
73 |
+ |
74 |
+ ~CGROUP_FREEZER |
75 |
+ ~CGROUP_SCHED |
76 |
+ ~CPUSETS |
77 |
+ ~IPC_NS |
78 |
+ |
79 |
+ ~MACVLAN |
80 |
+ ~MEMCG |
81 |
+ ~NAMESPACES |
82 |
+ ~NET_NS |
83 |
+ |
84 |
+ ~PID_NS |
85 |
+ ~POSIX_MQUEUE |
86 |
+ ~USER_NS |
87 |
+ ~UTS_NS |
88 |
+ |
89 |
+ ~VETH" |
90 |
+ |
91 |
+ERROR_CGROUP_FREEZER="CONFIG_CGROUP_FREEZER: needed to freeze containers" |
92 |
+ERROR_MACVLAN="CONFIG_MACVLAN: needed for internal (inter-container) networking" |
93 |
+ERROR_MEMCG="CONFIG_MEMCG: needed for memory resource control in containers" |
94 |
+ERROR_NET_NS="CONFIG_NET_NS: needed for unshared network" |
95 |
+ERROR_POSIX_MQUEUE="CONFIG_POSIX_MQUEUE: needed for lxc-execute command" |
96 |
+ERROR_UTS_NS="CONFIG_UTS_NS: needed to unshare hostnames and uname info" |
97 |
+ERROR_VETH="CONFIG_VETH: needed for internal (host-to-container) networking" |
98 |
+ |
99 |
+DOCS=( AUTHORS CONTRIBUTING MAINTAINERS NEWS README doc/FAQ.txt ) |
100 |
+ |
101 |
+pkg_setup() { |
102 |
+ linux-info_pkg_setup |
103 |
+} |
104 |
+ |
105 |
+PATCHES=( |
106 |
+ "${FILESDIR}"/${PN}-3.0.0-bash-completion.patch |
107 |
+ "${FILESDIR}"/${PN}-2.0.5-omit-sysconfig.patch # bug 558854 |
108 |
+) |
109 |
+ |
110 |
+S="${WORKDIR}/lxc-${P}" |
111 |
+ |
112 |
+src_prepare() { |
113 |
+ default |
114 |
+ eautoreconf |
115 |
+} |
116 |
+ |
117 |
+src_configure() { |
118 |
+ append-flags -fno-strict-aliasing |
119 |
+ |
120 |
+ # --enable-doc is for manpages which is why we don't link it to a "doc" |
121 |
+ # USE flag. We always want man pages. |
122 |
+ local myeconfargs=( |
123 |
+ --bindir=/usr/bin |
124 |
+ --localstatedir=/var |
125 |
+ --sbindir=/usr/bin |
126 |
+ |
127 |
+ --with-config-path=/var/lib/lxc |
128 |
+ --with-distro=gentoo |
129 |
+ --with-init-script=systemd |
130 |
+ --with-rootfs-path=/var/lib/lxc/rootfs |
131 |
+ --with-runtime-path=/run |
132 |
+ --with-systemdsystemunitdir=$(systemd_get_systemunitdir) |
133 |
+ |
134 |
+ --disable-asan |
135 |
+ --disable-coverity-build |
136 |
+ --disable-dlog |
137 |
+ --disable-mutex-debugging |
138 |
+ --disable-rpath |
139 |
+ --disable-tests |
140 |
+ --disable-ubsan |
141 |
+ --disable-werror |
142 |
+ |
143 |
+ --enable-bash |
144 |
+ --enable-commands |
145 |
+ --enable-doc |
146 |
+ --enable-memfd-rexec |
147 |
+ --enable-thread-safety |
148 |
+ |
149 |
+ $(use_enable apparmor) |
150 |
+ $(use_enable caps capabilities) |
151 |
+ $(use_enable doc api-docs) |
152 |
+ $(use_enable examples) |
153 |
+ $(use_enable pam) |
154 |
+ $(use_enable seccomp) |
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 |
+ |
194 |
+ If you want checkpoint/restore functionality, please install criu |
195 |
+ (sys-process/criu)." |
196 |
+ DISABLE_AUTOFORMATTING=true |
197 |
+ readme.gentoo_create_doc |
198 |
+} |
199 |
+ |
200 |
+pkg_postinst() { |
201 |
+ readme.gentoo_print_elog |
202 |
+} |