1 |
commit: 6c40eb984e49764b0684e1823d2805adaea69c52 |
2 |
Author: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 26 07:54:21 2020 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 26 08:13:01 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c40eb98 |
7 |
|
8 |
app-emulation/lxc: remove old 3.0.3 |
9 |
|
10 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
11 |
|
12 |
app-emulation/lxc/Manifest | 1 - |
13 |
app-emulation/lxc/files/lxc.initd.7 | 124 ----------------------- |
14 |
app-emulation/lxc/files/lxc_at.service.4 | 14 --- |
15 |
app-emulation/lxc/lxc-3.0.3.ebuild | 163 ------------------------------- |
16 |
4 files changed, 302 deletions(-) |
17 |
|
18 |
diff --git a/app-emulation/lxc/Manifest b/app-emulation/lxc/Manifest |
19 |
index 768faa21194..f8760f06bb4 100644 |
20 |
--- a/app-emulation/lxc/Manifest |
21 |
+++ b/app-emulation/lxc/Manifest |
22 |
@@ -1,2 +1 @@ |
23 |
-DIST lxc-3.0.3.tar.gz 1263371 BLAKE2B 77d0f593119654f570ae748d305e86c27117fd4e9ec7bdab1110f5356afb4a00d81c105ae9757d9da5827f6883a4a5d8ddc43b5b6e56a2927ed990e757f7c7b6 SHA512 cdc411364153d7ed494bab604260f5cbdfd5bd7734a59af970b3198c7b3cb340b6736856a2189d5989e169945a817ac8b531bc3ab62217a4285dd63a851f9c8a |
24 |
DIST lxc-4.0.2.tar.gz 1352667 BLAKE2B 2ecc076bacb9bb1c2a808422f7b2e0cbfc74bf3bec6ca89ea58eb6ef4a414353c2e58163bff17b3304beb39f4980d10f54365f739645c1581bfca9f6079bf57c SHA512 0de6c1f9649d161579b45fc28a735f703c4498eff9c588462b838220aeab73f91921db628f77bc461eff38c7583cac10a38951263181956e2d33412a406f3ef3 |
25 |
|
26 |
diff --git a/app-emulation/lxc/files/lxc.initd.7 b/app-emulation/lxc/files/lxc.initd.7 |
27 |
deleted file mode 100644 |
28 |
index 6a42b6aac52..00000000000 |
29 |
--- a/app-emulation/lxc/files/lxc.initd.7 |
30 |
+++ /dev/null |
31 |
@@ -1,124 +0,0 @@ |
32 |
-#!/sbin/openrc-run |
33 |
-# Copyright 1999-2017 Gentoo Foundation |
34 |
-# Distributed under the terms of the GNU General Public License v2 |
35 |
- |
36 |
-CONTAINER=${SVCNAME#*.} |
37 |
- |
38 |
-LXC_PATH=`lxc-config lxc.lxcpath` |
39 |
- |
40 |
-lxc_get_configfile() { |
41 |
- if [ -f "${LXC_PATH}/${CONTAINER}.conf" ]; then |
42 |
- echo "${LXC_PATH}/${CONTAINER}.conf" |
43 |
- elif [ -f "${LXC_PATH}/${CONTAINER}/config" ]; then |
44 |
- echo "${LXC_PATH}/${CONTAINER}/config" |
45 |
- else |
46 |
- eerror "Unable to find a suitable configuration file." |
47 |
- eerror "If you set up the container in a non-standard" |
48 |
- eerror "location, please set the CONFIGFILE variable." |
49 |
- return 1 |
50 |
- fi |
51 |
-} |
52 |
- |
53 |
-[ $CONTAINER != $SVCNAME ] && CONFIGFILE=${CONFIGFILE:-$(lxc_get_configfile)} |
54 |
- |
55 |
-lxc_get_var() { |
56 |
- awk 'BEGIN { FS="[ \t]*=[ \t]*" } $1 == "'$1'" { print $2; exit }' ${CONFIGFILE} |
57 |
-} |
58 |
- |
59 |
-lxc_get_net_link_type() { |
60 |
- awk 'BEGIN { FS="[ \t]*=[ \t]*"; _link=""; _type="" } |
61 |
- $1 == "lxc.network.type" {_type=$2;} |
62 |
- $1 == "lxc.network.link" {_link=$2;} |
63 |
- match($1, /lxc\.net\.[[:digit:]]+\.type/) {_type=$2;} |
64 |
- match($1, /lxc\.net\.[[:digit:]]+\.link/) {_link=$2;} |
65 |
- {if(_link != "" && _type != ""){ |
66 |
- printf("%s:%s\n", _link, _type ); |
67 |
- _link=""; _type=""; |
68 |
- }; }' <${CONFIGFILE} |
69 |
-} |
70 |
- |
71 |
-checkconfig() { |
72 |
- if [ ${CONTAINER} = ${SVCNAME} ]; then |
73 |
- eerror "You have to create an init script for each container:" |
74 |
- eerror " ln -s lxc /etc/init.d/lxc.container" |
75 |
- return 1 |
76 |
- fi |
77 |
- |
78 |
- # no need to output anything, the function takes care of that. |
79 |
- [ -z "${CONFIGFILE}" ] && return 1 |
80 |
- |
81 |
- utsname=$(lxc_get_var lxc.uts.name) |
82 |
- if [ -z "$utsname" ] ; then |
83 |
- utsname=$(lxc_get_var lxc.utsname) |
84 |
- fi |
85 |
- |
86 |
- if [ "${CONTAINER}" != "${utsname}" ]; then |
87 |
- eerror "You should use the same name for the service and the" |
88 |
- eerror "container. Right now the container is called ${utsname}" |
89 |
- return 1 |
90 |
- fi |
91 |
-} |
92 |
- |
93 |
-depend() { |
94 |
- # be quiet, since we have to run depend() also for the |
95 |
- # non-muxed init script, unfortunately. |
96 |
- checkconfig 2>/dev/null || return 0 |
97 |
- |
98 |
- config ${CONFIGFILE} |
99 |
- need localmount |
100 |
- use lxcfs |
101 |
- |
102 |
- local _x _if |
103 |
- for _x in $(lxc_get_net_link_type); do |
104 |
- _if=${_x%:*} |
105 |
- case "${_x##*:}" in |
106 |
- # when the network type is set to phys, we can make use of a |
107 |
- # network service (for instance to set it up before we disable |
108 |
- # the net_admin capability), but we might also not set it up |
109 |
- # at all on the host and leave the net_admin capable service |
110 |
- # to take care of it. |
111 |
- phys) use net.${_if} ;; |
112 |
- *) need net.${_if} ;; |
113 |
- esac |
114 |
- done |
115 |
-} |
116 |
- |
117 |
-start() { |
118 |
- checkconfig || return 1 |
119 |
- rm -f /var/log/lxc/${CONTAINER}.log |
120 |
- |
121 |
- rootpath=$(lxc_get_var lxc.rootfs) |
122 |
- |
123 |
- # Check the format of our init and the chroot's init, to see |
124 |
- # if we have to use linux32 or linux64; always use setarch |
125 |
- # when required, as that makes it easier to deal with |
126 |
- # x32-based containers. |
127 |
- case $(scanelf -BF '%a#f' ${rootpath}/sbin/init) in |
128 |
- EM_X86_64) setarch=linux64;; |
129 |
- EM_386) setarch=linux32;; |
130 |
- esac |
131 |
- |
132 |
- ebegin "Starting ${CONTAINER}" |
133 |
- env -i ${setarch} $(which lxc-start) -l WARN -n ${CONTAINER} -f ${CONFIGFILE} -d -o /var/log/lxc/${CONTAINER}.log |
134 |
- sleep 1 |
135 |
- |
136 |
- # lxc-start -d will _always_ report a correct startup, even if it |
137 |
- # failed, so rather than trust that, check that the cgroup exists. |
138 |
- [ -d /sys/fs/cgroup/cpuset/lxc/${CONTAINER} ] |
139 |
- eend $? |
140 |
-} |
141 |
- |
142 |
-stop() { |
143 |
- checkconfig || return 1 |
144 |
- |
145 |
- |
146 |
- if ! [ -d /sys/fs/cgroup/cpuset/lxc/${CONTAINER} ]; then |
147 |
- ewarn "${CONTAINER} doesn't seem to be started." |
148 |
- return 0 |
149 |
- fi |
150 |
- |
151 |
- # 10s should be enough to shut everything down |
152 |
- ebegin "Stopping ${CONTAINER}" |
153 |
- lxc-stop -t 10 -n ${CONTAINER} |
154 |
- eend $? |
155 |
-} |
156 |
|
157 |
diff --git a/app-emulation/lxc/files/lxc_at.service.4 b/app-emulation/lxc/files/lxc_at.service.4 |
158 |
deleted file mode 100644 |
159 |
index 64ae7457096..00000000000 |
160 |
--- a/app-emulation/lxc/files/lxc_at.service.4 |
161 |
+++ /dev/null |
162 |
@@ -1,14 +0,0 @@ |
163 |
-[Unit] |
164 |
-Description=Linux Container %I |
165 |
-After=network.target |
166 |
-Wants=lxcfs.service |
167 |
- |
168 |
-[Service] |
169 |
-Restart=always |
170 |
-ExecStart=/usr/bin/lxc-start -n %i -F |
171 |
-ExecReload=/usr/bin/lxc-restart -n %i |
172 |
-ExecStop=/usr/bin/lxc-stop -n %i |
173 |
-Delegate=yes |
174 |
- |
175 |
-[Install] |
176 |
-WantedBy=multi-user.target |
177 |
|
178 |
diff --git a/app-emulation/lxc/lxc-3.0.3.ebuild b/app-emulation/lxc/lxc-3.0.3.ebuild |
179 |
deleted file mode 100644 |
180 |
index 136493184f4..00000000000 |
181 |
--- a/app-emulation/lxc/lxc-3.0.3.ebuild |
182 |
+++ /dev/null |
183 |
@@ -1,163 +0,0 @@ |
184 |
-# Copyright 1999-2019 Gentoo Authors |
185 |
-# Distributed under the terms of the GNU General Public License v2 |
186 |
- |
187 |
-EAPI=7 |
188 |
- |
189 |
-inherit autotools bash-completion-r1 linux-info flag-o-matic systemd readme.gentoo-r1 pam |
190 |
- |
191 |
-DESCRIPTION="LinuX Containers userspace utilities" |
192 |
-HOMEPAGE="https://linuxcontainers.org/" |
193 |
-SRC_URI="https://linuxcontainers.org/downloads/lxc/${P}.tar.gz" |
194 |
- |
195 |
-KEYWORDS="amd64 ~arm ~arm64 ppc64 x86" |
196 |
- |
197 |
-LICENSE="LGPL-3" |
198 |
-SLOT="0" |
199 |
-IUSE="apparmor examples pam python seccomp selinux +templates" |
200 |
- |
201 |
-RDEPEND=" |
202 |
- net-libs/gnutls |
203 |
- sys-libs/libcap |
204 |
- pam? ( sys-libs/pam ) |
205 |
- seccomp? ( sys-libs/libseccomp ) |
206 |
- selinux? ( sys-libs/libselinux )" |
207 |
- |
208 |
-DEPEND="${RDEPEND} |
209 |
- >=app-text/docbook-sgml-utils-0.6.14-r2 |
210 |
- >=sys-kernel/linux-headers-3.2" |
211 |
- |
212 |
-RDEPEND="${RDEPEND} |
213 |
- sys-apps/util-linux |
214 |
- app-misc/pax-utils |
215 |
- virtual/awk" |
216 |
- |
217 |
-PDEPEND="templates? ( app-emulation/lxc-templates ) |
218 |
- python? ( dev-python/python3-lxc )" |
219 |
- |
220 |
-CONFIG_CHECK="~CGROUPS ~CGROUP_DEVICE |
221 |
- ~CPUSETS ~CGROUP_CPUACCT |
222 |
- ~CGROUP_SCHED |
223 |
- |
224 |
- ~NAMESPACES |
225 |
- ~IPC_NS ~USER_NS ~PID_NS |
226 |
- |
227 |
- ~CGROUP_FREEZER |
228 |
- ~UTS_NS ~NET_NS |
229 |
- ~VETH ~MACVLAN |
230 |
- |
231 |
- ~POSIX_MQUEUE |
232 |
- ~!NETPRIO_CGROUP |
233 |
- |
234 |
- ~!GRKERNSEC_CHROOT_MOUNT |
235 |
- ~!GRKERNSEC_CHROOT_DOUBLE |
236 |
- ~!GRKERNSEC_CHROOT_PIVOT |
237 |
- ~!GRKERNSEC_CHROOT_CHMOD |
238 |
- ~!GRKERNSEC_CHROOT_CAPS |
239 |
- ~!GRKERNSEC_PROC |
240 |
- ~!GRKERNSEC_SYSFS_RESTRICT |
241 |
- ~!GRKERNSEC_CHROOT_FINDTASK |
242 |
-" |
243 |
- |
244 |
-ERROR_DEVPTS_MULTIPLE_INSTANCES="CONFIG_DEVPTS_MULTIPLE_INSTANCES: needed for pts inside container" |
245 |
- |
246 |
-ERROR_CGROUP_FREEZER="CONFIG_CGROUP_FREEZER: needed to freeze containers" |
247 |
- |
248 |
-ERROR_UTS_NS="CONFIG_UTS_NS: needed to unshare hostnames and uname info" |
249 |
-ERROR_NET_NS="CONFIG_NET_NS: needed for unshared network" |
250 |
- |
251 |
-ERROR_VETH="CONFIG_VETH: needed for internal (host-to-container) networking" |
252 |
-ERROR_MACVLAN="CONFIG_MACVLAN: needed for internal (inter-container) networking" |
253 |
- |
254 |
-ERROR_POSIX_MQUEUE="CONFIG_POSIX_MQUEUE: needed for lxc-execute command" |
255 |
- |
256 |
-ERROR_NETPRIO_CGROUP="CONFIG_NETPRIO_CGROUP: as of kernel 3.3 and lxc 0.8.0_rc1 this causes LXCs to fail booting." |
257 |
- |
258 |
-ERROR_GRKERNSEC_CHROOT_MOUNT="CONFIG_GRKERNSEC_CHROOT_MOUNT: some GRSEC features make LXC unusable see postinst notes" |
259 |
-ERROR_GRKERNSEC_CHROOT_DOUBLE="CONFIG_GRKERNSEC_CHROOT_DOUBLE: some GRSEC features make LXC unusable see postinst notes" |
260 |
-ERROR_GRKERNSEC_CHROOT_PIVOT="CONFIG_GRKERNSEC_CHROOT_PIVOT: some GRSEC features make LXC unusable see postinst notes" |
261 |
-ERROR_GRKERNSEC_CHROOT_CHMOD="CONFIG_GRKERNSEC_CHROOT_CHMOD: some GRSEC features make LXC unusable see postinst notes" |
262 |
-ERROR_GRKERNSEC_CHROOT_CAPS="CONFIG_GRKERNSEC_CHROOT_CAPS: some GRSEC features make LXC unusable see postinst notes" |
263 |
-ERROR_GRKERNSEC_PROC="CONFIG_GRKERNSEC_PROC: this GRSEC feature is incompatible with unprivileged containers" |
264 |
-ERROR_GRKERNSEC_SYSFS_RESTRICT="CONFIG_GRKERNSEC_SYSFS_RESTRICT: this GRSEC feature is incompatible with unprivileged containers" |
265 |
- |
266 |
-DOCS=(AUTHORS CONTRIBUTING MAINTAINERS NEWS README doc/FAQ.txt) |
267 |
- |
268 |
-pkg_setup() { |
269 |
- kernel_is -lt 4 7 && CONFIG_CHECK="${CONFIG_CHECK} ~DEVPTS_MULTIPLE_INSTANCES" |
270 |
- linux-info_pkg_setup |
271 |
-} |
272 |
- |
273 |
-PATCHES=( |
274 |
- "${FILESDIR}"/${PN}-3.0.0-bash-completion.patch |
275 |
- "${FILESDIR}"/${PN}-2.0.5-omit-sysconfig.patch # bug 558854 |
276 |
-) |
277 |
- |
278 |
-src_prepare() { |
279 |
- default |
280 |
- eautoreconf |
281 |
-} |
282 |
- |
283 |
-src_configure() { |
284 |
- append-flags -fno-strict-aliasing |
285 |
- |
286 |
- # --enable-doc is for manpages which is why we don't link it to a "doc" |
287 |
- # USE flag. We always want man pages. |
288 |
- local myeconfargs=( |
289 |
- --localstatedir=/var |
290 |
- --bindir=/usr/bin |
291 |
- --sbindir=/usr/bin |
292 |
- --with-config-path=/var/lib/lxc |
293 |
- --with-rootfs-path=/var/lib/lxc/rootfs |
294 |
- --with-distro=gentoo |
295 |
- --with-runtime-path=/run |
296 |
- --disable-apparmor |
297 |
- --disable-werror |
298 |
- --enable-doc |
299 |
- $(use_enable apparmor) |
300 |
- $(use_enable examples) |
301 |
- $(use_enable pam) |
302 |
- $(use_with pam pamdir $(getpam_mod_dir)) |
303 |
- $(use_enable seccomp) |
304 |
- $(use_enable selinux) |
305 |
- ) |
306 |
- econf "${myeconfargs[@]}" |
307 |
-} |
308 |
- |
309 |
-src_install() { |
310 |
- default |
311 |
- |
312 |
- mv "${ED}"/usr/share/bash-completion/completions/${PN} "${ED}"/$(get_bashcompdir)/${PN}-start || die |
313 |
- bashcomp_alias ${PN}-start \ |
314 |
- ${PN}-{attach,cgroup,copy,console,create,destroy,device,execute,freeze,info,monitor,snapshot,stop,unfreeze,wait} |
315 |
- |
316 |
- keepdir /etc/lxc /var/lib/lxc/rootfs /var/log/lxc |
317 |
- rmdir "${D}"/var/cache/lxc "${D}"/var/cache || die "rmdir failed" |
318 |
- |
319 |
- find "${D}" -name '*.la' -delete |
320 |
- |
321 |
- # Gentoo-specific additions! |
322 |
- newinitd "${FILESDIR}/${PN}.initd.7" ${PN} |
323 |
- |
324 |
- # Remember to compare our systemd unit file with the upstream one |
325 |
- # config/init/systemd/lxc.service.in |
326 |
- systemd_newunit "${FILESDIR}"/${PN}_at.service.4 "lxc@.service" |
327 |
- |
328 |
- DOC_CONTENTS=" |
329 |
- For openrc, there is an init script provided with the package. |
330 |
- You _should_ only need to symlink /etc/init.d/lxc to |
331 |
- /etc/init.d/lxc.configname to start the container defined in |
332 |
- /etc/lxc/configname.conf. |
333 |
- |
334 |
- Correspondingly, for systemd a service file lxc@.service is installed. |
335 |
- Enable and start lxc@configname in order to start the container defined |
336 |
- in /etc/lxc/configname.conf. |
337 |
- |
338 |
- If you want checkpoint/restore functionality, please install criu |
339 |
- (sys-process/criu)." |
340 |
- DISABLE_AUTOFORMATTING=true |
341 |
- readme.gentoo_create_doc |
342 |
-} |
343 |
- |
344 |
-pkg_postinst() { |
345 |
- readme.gentoo_print_elog |
346 |
-} |