Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/lxc/files/
Date: Wed, 24 Aug 2016 10:38:19
Message-Id: 1472035066.59d319d160b3d02d6ab0845bec8823589927f232.pacho@gentoo
1 commit: 59d319d160b3d02d6ab0845bec8823589927f232
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 24 10:30:12 2016 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 24 10:37:46 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59d319d1
7
8 app-emulation/lxc: Drop old
9
10 Package-Manager: portage-2.3.0
11
12 .../lxc/files/lxc-1.1.0-fix-gentoo-template.patch | 35 ------
13 app-emulation/lxc/files/lxc-1.1.1-shm-tmpfs.patch | 31 ------
14 .../lxc-1.1.2-fix-gentoo-moresecure-template.patch | 33 ------
15 .../lxc/files/lxc-1.1.3-bash-completion.patch | 35 ------
16 .../lxc/files/lxc-2.0.1-bash-completion.patch | 31 ------
17 .../lxc/files/lxc-2.0.1-omit-sysconfig.patch | 5 -
18 app-emulation/lxc/files/lxc.initd.4 | 119 ---------------------
19 app-emulation/lxc/files/lxc_at.service.2 | 14 ---
20 app-emulation/lxc/files/lxc_at.service.3 | 15 ---
21 9 files changed, 318 deletions(-)
22
23 diff --git a/app-emulation/lxc/files/lxc-1.1.0-fix-gentoo-template.patch b/app-emulation/lxc/files/lxc-1.1.0-fix-gentoo-template.patch
24 deleted file mode 100644
25 index 3514186..00000000
26 --- a/app-emulation/lxc/files/lxc-1.1.0-fix-gentoo-template.patch
27 +++ /dev/null
28 @@ -1,35 +0,0 @@
29 -From 425aa66d33e1833cfa47b988785def8b42b72f1a Mon Sep 17 00:00:00 2001
30 -From: Markos Chandras <hwoarang@g.o>
31 -Date: Sun, 22 Feb 2015 01:25:36 +0200
32 -Subject: [PATCH] templates/lxc-gentoo.in: Fix stage3 autodetection code
33 -
34 -The latest-stage3-$variant.txt files list both the tarball name
35 -and the released date but we only need to pass the stage3 tarball
36 -name to the subsequent wget command otherwise we end up with 404
37 -errors.
38 -
39 -Signed-off-by: Markos Chandras <hwoarang@g.o>
40 ----
41 -Different patches have been posted to the mailing lists or github so this is
42 -likely to be fixed upstream really soon
43 ----
44 - templates/lxc-gentoo.in | 3 ++-
45 - 1 file changed, 2 insertions(+), 1 deletion(-)
46 -
47 -diff --git a/templates/lxc-gentoo.in b/templates/lxc-gentoo.in
48 -index 5a87866..464c948 100644
49 ---- a/templates/lxc-gentoo.in
50 -+++ b/templates/lxc-gentoo.in
51 -@@ -160,7 +160,8 @@ cache_stage3()
52 - printf "Determining path to latest Gentoo %s (%s) stage3 archive...\n" "${arch}" "${variant}"
53 - printf " => downloading and processing %s\n" "${stage3_pointer}"
54 -
55 -- local stage3_latest_tarball=$(wget -q -O - "${stage3_pointer}" | tail -n1 ) \
56 -+ local stage3_latest_tarball=$(wget -q -O - "${stage3_pointer}" | \
57 -+ tail -n1 | cut -d " " -f 1) \
58 - || die 6 "Error: unable to fetch\n"
59 -
60 - printf " => Got: %s\n" "${stage3_latest_tarball}"
61 ---
62 -2.3.0
63 -
64
65 diff --git a/app-emulation/lxc/files/lxc-1.1.1-shm-tmpfs.patch b/app-emulation/lxc/files/lxc-1.1.1-shm-tmpfs.patch
66 deleted file mode 100644
67 index 7c8f595..00000000
68 --- a/app-emulation/lxc/files/lxc-1.1.1-shm-tmpfs.patch
69 +++ /dev/null
70 @@ -1,31 +0,0 @@
71 -From 7ed54c6155982bd8376fdb88bed79c664d5e111f Mon Sep 17 00:00:00 2001
72 -From: Markos Chandras <hwoarang@g.o>
73 -Date: Thu, 12 Mar 2015 20:52:11 +0000
74 -Subject: [PATCH] templates: gentoo.common: Add /dev/shm tmpfs mount entry
75 -
76 -/dev/shm needs to be mounted as tmpfs. It's needed by python
77 -and possibly other packages.
78 -
79 -Signed-off-by: Markos Chandras <hwoarang@g.o>
80 ----
81 -Applied in master but not in 1.1.1. It will probably make it
82 -to 1.1.2
83 ----
84 - config/templates/gentoo.common.conf.in | 4 ++++
85 - 1 file changed, 4 insertions(+)
86 -
87 -diff --git a/config/templates/gentoo.common.conf.in b/config/templates/gentoo.common.conf.in
88 -index ca3ffc1..49cd411 100644
89 ---- a/config/templates/gentoo.common.conf.in
90 -+++ b/config/templates/gentoo.common.conf.in
91 -@@ -21,3 +21,7 @@ lxc.cgroup.devices.allow = c 10:232 rwm
92 - ## To use loop devices, copy the following line to the container's
93 - ## configuration file (uncommented).
94 - #lxc.cgroup.devices.allow = b 7:* rwm
95 -+
96 -+# /dev/shm needs to be mounted as tmpfs. It's needed by python (bug #496328)
97 -+# and possibly other packages.
98 -+lxc.mount.entry = none dev/shm tmpfs rw,nosuid,nodev,create=dir
99 ---
100 -2.3.2
101 -
102
103 diff --git a/app-emulation/lxc/files/lxc-1.1.2-fix-gentoo-moresecure-template.patch b/app-emulation/lxc/files/lxc-1.1.2-fix-gentoo-moresecure-template.patch
104 deleted file mode 100644
105 index 86a4144..00000000
106 --- a/app-emulation/lxc/files/lxc-1.1.2-fix-gentoo-moresecure-template.patch
107 +++ /dev/null
108 @@ -1,33 +0,0 @@
109 -Patch from https://github.com/lxc/lxc/pull/563 didn't make it to stable-1.1
110 -yes so lets just include it here in case it doesn't end up in 1.1.X in the
111 -future.
112 -
113 -Signed-off-by: Markos Chandras <hwoarang@g.o>
114 -
115 -From bc19636d587fbabfbc2252f1bf4887fee87bb247 Mon Sep 17 00:00:00 2001
116 -From: Dennis Schridde <devurandom@×××.net>
117 -Date: Thu, 11 Jun 2015 15:21:19 +0200
118 -Subject: [PATCH] Fix creation of dev/mqueue and dev/shm on Gentoo
119 -
120 -The dev/mqueue and dev/shm directories do not exist when using lxc.autodev, thus they have to be created upon mount.
121 -
122 -Signed-off-by: Dennis Schridde <devurandom@×××.net>
123 ----
124 - config/templates/gentoo.moresecure.conf.in | 4 ++--
125 - 1 file changed, 2 insertions(+), 2 deletions(-)
126 -
127 -diff --git a/config/templates/gentoo.moresecure.conf.in b/config/templates/gentoo.moresecure.conf.in
128 -index 270e9df..f827ad2 100644
129 ---- a/config/templates/gentoo.moresecure.conf.in
130 -+++ b/config/templates/gentoo.moresecure.conf.in
131 -@@ -8,8 +8,8 @@ lxc.include = @LXCTEMPLATECONFIG@/common.conf
132 - # Container user ? see gentoo.common.conf
133 -
134 - # do not mount sysfs, see http://blog.bofh.it/debian/id_413
135 --lxc.mount.entry=mqueue dev/mqueue mqueue rw,nodev,noexec,nosuid 0 0
136 --lxc.mount.entry=shm dev/shm tmpfs rw,nosuid,nodev,noexec,relatime 0 0
137 -+lxc.mount.entry=mqueue dev/mqueue mqueue rw,nodev,noexec,nosuid,create=dir 0 0
138 -+lxc.mount.entry=shm dev/shm tmpfs rw,nosuid,nodev,noexec,relatime,create=dir 0 0
139 - lxc.mount.entry=run run tmpfs rw,nosuid,nodev,relatime,mode=755 0 0
140 -
141 - # this part is based on 'linux capabilities', see: man 7 capabilities
142
143 diff --git a/app-emulation/lxc/files/lxc-1.1.3-bash-completion.patch b/app-emulation/lxc/files/lxc-1.1.3-bash-completion.patch
144 deleted file mode 100644
145 index 3bcb40c..00000000
146 --- a/app-emulation/lxc/files/lxc-1.1.3-bash-completion.patch
147 +++ /dev/null
148 @@ -1,35 +0,0 @@
149 -Index: lxc-lxc-1.1.3/config/bash/Makefile.am
150 -===================================================================
151 ---- lxc-lxc-1.1.3.orig/config/bash/Makefile.am
152 -+++ lxc-lxc-1.1.3/config/bash/Makefile.am
153 -@@ -2,12 +2,12 @@ EXTRA_DIST = lxc
154 -
155 - if ENABLE_BASH
156 - install-bash:
157 -- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/bash_completion.d/
158 -- $(INSTALL_DATA) lxc $(DESTDIR)$(sysconfdir)/bash_completion.d/
159 -+ $(MKDIR_P) $(DESTDIR)$(datarootdir)/bash-completion/completions//
160 -+ $(INSTALL_DATA) lxc $(DESTDIR)$(datarootdir)/bash-completion/completions/
161 -
162 - uninstall-bash:
163 -- rm -f $(DESTDIR)$(sysconfdir)/bash_completion.d/lxc
164 -- rmdir $(DESTDIR)$(sysconfdir)/bash_completion.d/ || :
165 -+ rm -f $(DESTDIR)$(datarootdir)/bash-completion/completions/lxc
166 -+ rmdir $(DESTDIR)$(datarootdir)/bash-completion/ || :
167 -
168 - install-data-local: install-bash
169 - uninstall-local: uninstall-bash
170 -Index: lxc-lxc-1.1.3/config/bash/lxc.in
171 -===================================================================
172 ---- lxc-lxc-1.1.3.orig/config/bash/lxc.in
173 -+++ lxc-lxc-1.1.3/config/bash/lxc.in
174 -@@ -1,4 +1,3 @@
175 --have lxc-start && {
176 - _lxc_names() {
177 - COMPREPLY=( $( compgen -W "$( lxc-ls )" "$cur" ) )
178 - }
179 -@@ -100,4 +99,3 @@ have lxc-start && {
180 -
181 - complete -o default -F _lxc_generic_o lxc-clone
182 - complete -o default -F _lxc_generic_o lxc-start-ephemeral
183 --}
184
185 diff --git a/app-emulation/lxc/files/lxc-2.0.1-bash-completion.patch b/app-emulation/lxc/files/lxc-2.0.1-bash-completion.patch
186 deleted file mode 100644
187 index 9ef6013..00000000
188 --- a/app-emulation/lxc/files/lxc-2.0.1-bash-completion.patch
189 +++ /dev/null
190 @@ -1,31 +0,0 @@
191 ---- lxc-lxc-2.0.1/config/bash/Makefile.am.orig 2016-05-18 20:40:42.238487678 +0000
192 -+++ lxc-lxc-2.0.1/config/bash/Makefile.am 2016-05-18 20:43:02.163497779 +0000
193 -@@ -2,12 +2,12 @@
194 -
195 - if ENABLE_BASH
196 - install-bash:
197 -- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/bash_completion.d/
198 -- $(INSTALL_DATA) lxc $(DESTDIR)$(sysconfdir)/bash_completion.d/
199 -+ $(MKDIR_P) $(DESTDIR)$(datarootdir)/bash-completion/completions/
200 -+ $(INSTALL_DATA) lxc $(DESTDIR)$(datarootdir)/bash-completion/completions/
201 -
202 - uninstall-bash:
203 -- rm -f $(DESTDIR)$(sysconfdir)/bash_completion.d/lxc
204 -- rmdir $(DESTDIR)$(sysconfdir)/bash_completion.d/ || :
205 -+ rm -f $(DESTDIR)$(datarootdir)/bash-completion/completions/lxc
206 -+ rmdir $(DESTDIR)$(datarootdir)/bash-completion/completions/ || :
207 -
208 - install-data-local: install-bash
209 - uninstall-local: uninstall-bash
210 ---- lxc-lxc-2.0.1/config/bash/lxc.in.orig 2016-05-18 20:40:51.079488316 +0000
211 -+++ lxc-lxc-2.0.1/config/bash/lxc.in 2016-05-18 20:45:03.506506538 +0000
212 -@@ -1,4 +1,3 @@
213 --_have lxc-start && {
214 - _lxc_names() {
215 - COMPREPLY=( $( compgen -W "$( lxc-ls )" "$cur" ) )
216 - }
217 -@@ -100,4 +99,3 @@
218 -
219 - complete -o default -F _lxc_generic_o lxc-copy
220 - complete -o default -F _lxc_generic_o lxc-start-ephemeral
221 --}
222
223 diff --git a/app-emulation/lxc/files/lxc-2.0.1-omit-sysconfig.patch b/app-emulation/lxc/files/lxc-2.0.1-omit-sysconfig.patch
224 deleted file mode 100644
225 index 9b83a3b..00000000
226 --- a/app-emulation/lxc/files/lxc-2.0.1-omit-sysconfig.patch
227 +++ /dev/null
228 @@ -1,5 +0,0 @@
229 ---- lxc-lxc-2.0.1/config/Makefile.am.orig 2016-05-19 02:56:11.891113982 +0000
230 -+++ lxc-lxc-2.0.1/config/Makefile.am 2016-05-19 02:56:32.596115476 +0000
231 -@@ -1 +1 @@
232 --SUBDIRS = apparmor bash etc init selinux templates yum sysconfig
233 -+SUBDIRS = apparmor bash etc init selinux templates yum
234
235 diff --git a/app-emulation/lxc/files/lxc.initd.4 b/app-emulation/lxc/files/lxc.initd.4
236 deleted file mode 100644
237 index c8325bc..00000000
238 --- a/app-emulation/lxc/files/lxc.initd.4
239 +++ /dev/null
240 @@ -1,119 +0,0 @@
241 -#!/sbin/runscript
242 -# Copyright 1999-2015 Gentoo Foundation
243 -# Distributed under the terms of the GNU General Public License v2
244 -# $Id$
245 -
246 -CONTAINER=${SVCNAME#*.}
247 -
248 -LXC_PATH=`lxc-config lxc.lxcpath`
249 -
250 -lxc_get_configfile() {
251 - if [ -f "${LXC_PATH}/${CONTAINER}.conf" ]; then
252 - echo "${LXC_PATH}/${CONTAINER}.conf"
253 - elif [ -f "${LXC_PATH}/${CONTAINER}/config" ]; then
254 - echo "${LXC_PATH}/${CONTAINER}/config"
255 - else
256 - eerror "Unable to find a suitable configuration file."
257 - eerror "If you set up the container in a non-standard"
258 - eerror "location, please set the CONFIGFILE variable."
259 - return 1
260 - fi
261 -}
262 -
263 -[ $CONTAINER != $SVCNAME ] && CONFIGFILE=${CONFIGFILE:-$(lxc_get_configfile)}
264 -
265 -lxc_get_var() {
266 - awk 'BEGIN { FS="[ \t]*=[ \t]*" } $1 == "'$1'" { print $2; exit }' ${CONFIGFILE}
267 -}
268 -
269 -lxc_get_net_link_type() {
270 - awk 'BEGIN { FS="[ \t]*=[ \t]*"; _link=""; _type="" }
271 - $1 == "lxc.network.type" {_type=$2;}
272 - $1 == "lxc.network.link" {_link=$2;}
273 - {if(_link != "" && _type != ""){
274 - printf("%s:%s\n", _link, _type );
275 - _link=""; _type="";
276 - }; }' <${CONFIGFILE}
277 -}
278 -
279 -checkconfig() {
280 - if [ ${CONTAINER} = ${SVCNAME} ]; then
281 - eerror "You have to create an init script for each container:"
282 - eerror " ln -s lxc /etc/init.d/lxc.container"
283 - return 1
284 - fi
285 -
286 - # no need to output anything, the function takes care of that.
287 - [ -z "${CONFIGFILE}" ] && return 1
288 -
289 - utsname=$(lxc_get_var lxc.utsname)
290 - if [ ${CONTAINER} != ${utsname} ]; then
291 - eerror "You should use the same name for the service and the"
292 - eerror "container. Right now the container is called ${utsname}"
293 - return 1
294 - fi
295 -}
296 -
297 -depend() {
298 - # be quiet, since we have to run depend() also for the
299 - # non-muxed init script, unfortunately.
300 - checkconfig 2>/dev/null || return 0
301 -
302 - config ${CONFIGFILE}
303 - need localmount
304 - use lxcfs
305 -
306 - local _x _if
307 - for _x in $(lxc_get_net_link_type); do
308 - _if=${_x%:*}
309 - case "${_x##*:}" in
310 - # when the network type is set to phys, we can make use of a
311 - # network service (for instance to set it up before we disable
312 - # the net_admin capability), but we might also not set it up
313 - # at all on the host and leave the net_admin capable service
314 - # to take care of it.
315 - phys) use net.${_if} ;;
316 - *) need net.${_if} ;;
317 - esac
318 - done
319 -}
320 -
321 -start() {
322 - checkconfig || return 1
323 - rm -f /var/log/lxc/${CONTAINER}.log
324 -
325 - rootpath=$(lxc_get_var lxc.rootfs)
326 -
327 - # Check the format of our init and the chroot's init, to see
328 - # if we have to use linux32 or linux64; always use setarch
329 - # when required, as that makes it easier to deal with
330 - # x32-based containers.
331 - case $(scanelf -BF '%a#f' ${rootpath}/sbin/init) in
332 - EM_X86_64) setarch=linux64;;
333 - EM_386) setarch=linux32;;
334 - esac
335 -
336 - ebegin "Starting ${CONTAINER}"
337 - env -i ${setarch} $(which lxc-start) -l WARN -n ${CONTAINER} -f ${CONFIGFILE} -d -o /var/log/lxc/${CONTAINER}.log
338 - sleep 0.5
339 -
340 - # lxc-start -d will _always_ report a correct startup, even if it
341 - # failed, so rather than trust that, check that the cgroup exists.
342 - [ -d /sys/fs/cgroup/cpuset/lxc/${CONTAINER} ]
343 - eend $?
344 -}
345 -
346 -stop() {
347 - checkconfig || return 1
348 -
349 -
350 - if ! [ -d /sys/fs/cgroup/cpuset/lxc/${CONTAINER} ]; then
351 - ewarn "${CONTAINER} doesn't seem to be started."
352 - return 0
353 - fi
354 -
355 - # 10s should be enough to shut everything down
356 - ebegin "Stopping ${CONTAINER}"
357 - lxc-stop -t 10 -n ${CONTAINER}
358 - eend $?
359 -}
360
361 diff --git a/app-emulation/lxc/files/lxc_at.service.2 b/app-emulation/lxc/files/lxc_at.service.2
362 deleted file mode 100644
363 index 82306a0..00000000
364 --- a/app-emulation/lxc/files/lxc_at.service.2
365 +++ /dev/null
366 @@ -1,14 +0,0 @@
367 -[Unit]
368 -Description=Linux Container %I
369 -After=network.target
370 -
371 -[Service]
372 -Restart=always
373 -ExecStartPre=/usr/libexec/lxc/lxc-devsetup
374 -ExecStart=/usr/bin/lxc-start -n %i -F
375 -ExecReload=/usr/bin/lxc-restart -n %i
376 -ExecStop=/usr/bin/lxc-stop -n %i
377 -Delegate=yes
378 -
379 -[Install]
380 -WantedBy=multi-user.target
381
382 diff --git a/app-emulation/lxc/files/lxc_at.service.3 b/app-emulation/lxc/files/lxc_at.service.3
383 deleted file mode 100644
384 index 6726414..00000000
385 --- a/app-emulation/lxc/files/lxc_at.service.3
386 +++ /dev/null
387 @@ -1,15 +0,0 @@
388 -[Unit]
389 -Description=Linux Container %I
390 -After=network.target
391 -Wants=lxcfs.service
392 -
393 -[Service]
394 -Restart=always
395 -ExecStartPre=/usr/libexec/lxc/lxc-devsetup
396 -ExecStart=/usr/bin/lxc-start -n %i -F
397 -ExecReload=/usr/bin/lxc-restart -n %i
398 -ExecStop=/usr/bin/lxc-stop -n %i
399 -Delegate=yes
400 -
401 -[Install]
402 -WantedBy=multi-user.target