Gentoo Archives: gentoo-commits

From: Matthias Maier <tamiko@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/, app-emulation/libvirt/
Date: Sun, 13 Jan 2019 02:19:02
Message-Id: 1547345918.ac46cbdeaad72eefe4f8f2d35bc2e3b41c4d11f4.tamiko@gentoo
1 commit: ac46cbdeaad72eefe4f8f2d35bc2e3b41c4d11f4
2 Author: Michal Privoznik <mprivozn <AT> redhat <DOT> com>
3 AuthorDate: Fri Jan 11 09:52:13 2019 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 13 02:18:38 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac46cbde
7
8 app-emulation/libvirt: Rebase patches for 5.0.0 release
9
10 In the upstream repo a few changes were made that rendered our
11 patches inapplicable (mostly a520981740015 and 6ee53e54dcfa3285ed7).
12
13 Signed-off-by: Michal Privoznik <mprivozn <AT> redhat.com>
14 Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>
15
16 .../files/libvirt-5.0.0-do-not-use-sysconf.patch | 216 +++++++++++++++++++++
17 .../libvirt-5.0.0-fix-paths-for-apparmor.patch | 110 +++++++++++
18 app-emulation/libvirt/libvirt-9999.ebuild | 4 +-
19 3 files changed, 328 insertions(+), 2 deletions(-)
20
21 diff --git a/app-emulation/libvirt/files/libvirt-5.0.0-do-not-use-sysconf.patch b/app-emulation/libvirt/files/libvirt-5.0.0-do-not-use-sysconf.patch
22 new file mode 100644
23 index 00000000000..d4e37e4164a
24 --- /dev/null
25 +++ b/app-emulation/libvirt/files/libvirt-5.0.0-do-not-use-sysconf.patch
26 @@ -0,0 +1,216 @@
27 +From 947ef7a44e94989f324e0d533499454d540fdef9 Mon Sep 17 00:00:00 2001
28 +Message-Id: <947ef7a44e94989f324e0d533499454d540fdef9.1547196492.git.mprivozn@××××××.com>
29 +From: Michal Privoznik <mprivozn@××××××.com>
30 +Date: Tue, 26 Jun 2018 06:51:06 +0200
31 +Subject: [PATCH] gentoo: do not use sysconf
32 +
33 +Signed-off-by: Michal Privoznik <mprivozn@××××××.com>
34 +---
35 + src/Makefile.am | 29 ++++++-----------------------
36 + src/locking/virtlockd.service.in | 3 +--
37 + src/logging/virtlogd.service.in | 3 +--
38 + src/remote/libvirtd.service.in | 3 +--
39 + tools/Makefile.am | 17 ++++-------------
40 + tools/libvirt-guests.service.in | 2 +-
41 + tools/libvirt-guests.sysconf | 7 +++++++
42 + 7 files changed, 21 insertions(+), 43 deletions(-)
43 +
44 +diff --git a/src/Makefile.am b/src/Makefile.am
45 +index cd386297ed..52a63885d6 100644
46 +--- a/src/Makefile.am
47 ++++ b/src/Makefile.am
48 +@@ -756,23 +756,6 @@ endif WITH_SETUID_RPC_CLIENT
49 +
50 + EXTRA_DIST += $(SYSCONF_FILES)
51 +
52 +-install-sysconfig:
53 +- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
54 +- for f in $(SYSCONF_FILES:%.sysconf=%) ; \
55 +- do \
56 +- tgt=`basename $$f`; \
57 +- $(INSTALL_DATA) $(srcdir)/$$f.sysconf \
58 +- $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
59 +- done
60 +-
61 +-uninstall-sysconfig:
62 +- for f in $(SYSCONF_FILES:%.sysconf=%) ; \
63 +- do \
64 +- tgt=`basename $$f`; \
65 +- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
66 +- done
67 +- rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
68 +-
69 + SYSVINIT_FILES_IN += \
70 + locking/virtlockd.init.in \
71 + $(NULL)
72 +@@ -816,14 +799,14 @@ if WITH_LIBVIRTD
73 + if LIBVIRT_INIT_SCRIPT_RED_HAT
74 + initdir = $(sysconfdir)/rc.d/init.d
75 +
76 +-install-init:: $(SYSVINIT_FILES) install-sysconfig
77 ++install-init:: $(SYSVINIT_FILES)
78 + $(MKDIR_P) $(DESTDIR)$(initdir)
79 + for f in $(SYSVINIT_FILES:%.init=%) ; \
80 + do \
81 + $(INSTALL_SCRIPT) $$f.init $(DESTDIR)$(initdir)/$$f; \
82 + done
83 +
84 +-uninstall-init:: uninstall-sysconfig
85 ++uninstall-init::
86 + rm -f $(SYSVINIT_FILES:%.init=$(DESTDIR)$(initdir)/%)
87 + rmdir $(DESTDIR)$(initdir) || :
88 +
89 +@@ -862,14 +845,14 @@ SYSTEMD_UNIT_FILES = $(notdir $(SYSTEMD_UNIT_FILES_IN:%.in=%))
90 + BUILT_SOURCES += $(SYSTEMD_UNIT_FILES)
91 + DISTCLEANFILES += $(SYSTEMD_UNIT_FILES)
92 +
93 +-install-systemd: $(SYSTEMD_UNIT_FILES) install-sysconfig
94 ++install-systemd: $(SYSTEMD_UNIT_FILES)
95 + $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
96 + for f in $(SYSTEMD_UNIT_FILES); \
97 + do \
98 + $(INSTALL_DATA) $$f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ ; \
99 + done
100 +
101 +-uninstall-systemd: uninstall-sysconfig
102 ++uninstall-systemd:
103 + rm -f $(SYSTEMD_UNIT_FILES:%=$(DESTDIR)$(SYSTEMD_UNIT_DIR)/%)
104 + rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
105 +
106 +@@ -884,7 +867,7 @@ EXTRA_DIST += $(UPSTART_FILES)
107 + if WITH_LIBVIRTD
108 + if LIBVIRT_INIT_SCRIPT_UPSTART
109 +
110 +-install-upstart: install-sysconfig
111 ++install-upstart:
112 + $(MKDIR_P) $(DESTDIR)$(sysconfdir)/event.d
113 + for f in $(UPSTART_FILES:%.upstart=%); \
114 + do \
115 +@@ -893,7 +876,7 @@ install-upstart: install-sysconfig
116 + $(DESTDIR)$(sysconfdir)/event.d/$$tgt ; \
117 + done
118 +
119 +-uninstall-upstart: uninstall-sysconfig
120 ++uninstall-upstart:
121 + for f in $(UPSTART_FILES:%.upstart=%); \
122 + do \
123 + tgt=`basename $$f` ; \
124 +diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in
125 +index 3c9d587032..2449b201d9 100644
126 +--- a/src/locking/virtlockd.service.in
127 ++++ b/src/locking/virtlockd.service.in
128 +@@ -7,8 +7,7 @@ Documentation=man:virtlockd(8)
129 + Documentation=https://libvirt.org
130 +
131 + [Service]
132 +-EnvironmentFile=-/etc/sysconfig/virtlockd
133 +-ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS
134 ++ExecStart=@sbindir@/virtlockd
135 + ExecReload=/bin/kill -USR1 $MAINPID
136 + # Loosing the locks is a really bad thing that will
137 + # cause the machine to be fenced (rebooted), so make
138 +diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in
139 +index 3d9ae36150..43736191d5 100644
140 +--- a/src/logging/virtlogd.service.in
141 ++++ b/src/logging/virtlogd.service.in
142 +@@ -7,8 +7,7 @@ Documentation=man:virtlogd(8)
143 + Documentation=https://libvirt.org
144 +
145 + [Service]
146 +-EnvironmentFile=-/etc/sysconfig/virtlogd
147 +-ExecStart=@sbindir@/virtlogd $VIRTLOGD_ARGS
148 ++ExecStart=@sbindir@/virtlogd
149 + ExecReload=/bin/kill -USR1 $MAINPID
150 + # Loosing the logs is a really bad thing that will
151 + # cause the machine to be fenced (rebooted), so make
152 +diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in
153 +index 7f689e08a8..239beeced9 100644
154 +--- a/src/remote/libvirtd.service.in
155 ++++ b/src/remote/libvirtd.service.in
156 +@@ -22,8 +22,7 @@ Documentation=https://libvirt.org
157 +
158 + [Service]
159 + Type=notify
160 +-EnvironmentFile=-/etc/sysconfig/libvirtd
161 +-ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
162 ++ExecStart=@sbindir@/libvirtd
163 + ExecReload=/bin/kill -HUP $MAINPID
164 + KillMode=process
165 + Restart=on-failure
166 +diff --git a/tools/Makefile.am b/tools/Makefile.am
167 +index 613c9a77f0..224b511074 100644
168 +--- a/tools/Makefile.am
169 ++++ b/tools/Makefile.am
170 +@@ -339,15 +339,6 @@ install-data-local: install-init install-systemd install-nss \
171 + uninstall-local: uninstall-init uninstall-systemd uninstall-nss \
172 + uninstall-bash-completion
173 +
174 +-install-sysconfig:
175 +- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
176 +- $(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
177 +- $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
178 +-
179 +-uninstall-sysconfig:
180 +- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
181 +- rmdir $(DESTDIR)$(sysconfdir)/sysconfig ||:
182 +-
183 + EXTRA_DIST += libvirt-guests.sh.in libvirt-guests.init.in
184 +
185 + install-initscript: libvirt-guests.init
186 +@@ -362,8 +353,8 @@ uninstall-initscript:
187 +
188 + if LIBVIRT_INIT_SCRIPT_RED_HAT
189 + BUILT_SOURCES += libvirt-guests.init
190 +-install-init: install-sysconfig install-initscript
191 +-uninstall-init: uninstall-sysconfig uninstall-initscript
192 ++install-init: install-initscript
193 ++uninstall-init: uninstall-initscript
194 + else ! LIBVIRT_INIT_SCRIPT_RED_HAT
195 + install-init:
196 + uninstall-init:
197 +@@ -394,12 +385,12 @@ EXTRA_DIST += libvirt-guests.service.in
198 + SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
199 +
200 + if LIBVIRT_INIT_SCRIPT_SYSTEMD
201 +-install-systemd: libvirt-guests.service install-sysconfig libvirt-guests.sh
202 ++install-systemd: libvirt-guests.service libvirt-guests.sh
203 + $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
204 + $(INSTALL_DATA) libvirt-guests.service \
205 + $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
206 +
207 +-uninstall-systemd: uninstall-sysconfig
208 ++uninstall-systemd:
209 + rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
210 + rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||:
211 +
212 +diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in
213 +index 491ca62138..f0f417bffb 100644
214 +--- a/tools/libvirt-guests.service.in
215 ++++ b/tools/libvirt-guests.service.in
216 +@@ -10,7 +10,7 @@ Documentation=man:libvirtd(8)
217 + Documentation=https://libvirt.org
218 +
219 + [Service]
220 +-EnvironmentFile=-/etc/sysconfig/libvirt-guests
221 ++EnvironmentFile=-/etc/libvirt/libvirt-guests.conf
222 + # Hack just call traditional service until we factor
223 + # out the code
224 + ExecStart=@libexecdir@/libvirt-guests.sh start
225 +diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf
226 +index 669b046507..45b0b9ea46 100644
227 +--- a/tools/libvirt-guests.sysconf
228 ++++ b/tools/libvirt-guests.sysconf
229 +@@ -1,3 +1,10 @@
230 ++#
231 ++# Warning: This configuration file is only sourced by the systemd
232 ++# libvirt-guests.service unit. The coresponding openrc facility is in
233 ++# /etc/init.d/libvirtd and /etc/conf.d/libvirtd
234 ++#
235 ++
236 ++
237 + # URIs to check for running guests
238 + # example: URIS='default xen:///system vbox+tcp://host/system lxc:///system'
239 + #URIS=default
240 +--
241 +2.19.2
242 +
243
244 diff --git a/app-emulation/libvirt/files/libvirt-5.0.0-fix-paths-for-apparmor.patch b/app-emulation/libvirt/files/libvirt-5.0.0-fix-paths-for-apparmor.patch
245 new file mode 100644
246 index 00000000000..ca9f952a823
247 --- /dev/null
248 +++ b/app-emulation/libvirt/files/libvirt-5.0.0-fix-paths-for-apparmor.patch
249 @@ -0,0 +1,110 @@
250 +From 563706143779166624812b3faf498d869f5dd383 Mon Sep 17 00:00:00 2001
251 +Message-Id: <563706143779166624812b3faf498d869f5dd383.1547196492.git.mprivozn@××××××.com>
252 +From: Michal Privoznik <mprivozn@××××××.com>
253 +Date: Fri, 11 Jan 2019 09:41:06 +0100
254 +Subject: [PATCH] gentoo: fix paths for apparmor
255 +
256 +Signed-off-by: Michal Privoznik <mprivozn@××××××.com>
257 +---
258 + src/security/Makefile.inc.am | 10 +++++-----
259 + src/security/apparmor/libvirt-qemu | 2 ++
260 + ...bvirt.virt-aa-helper => usr.libexec.virt-aa-helper} | 4 ++--
261 + src/security/apparmor/usr.sbin.libvirtd | 6 ++++--
262 + 4 files changed, 13 insertions(+), 9 deletions(-)
263 + rename src/security/apparmor/{usr.lib.libvirt.virt-aa-helper => usr.libexec.virt-aa-helper} (93%)
264 +
265 +diff --git a/src/security/Makefile.inc.am b/src/security/Makefile.inc.am
266 +index b24cdfd083..ae8e979b84 100644
267 +--- a/src/security/Makefile.inc.am
268 ++++ b/src/security/Makefile.inc.am
269 +@@ -36,7 +36,7 @@ EXTRA_DIST += \
270 + security/apparmor/TEMPLATE.lxc \
271 + security/apparmor/libvirt-qemu \
272 + security/apparmor/libvirt-lxc \
273 +- security/apparmor/usr.lib.libvirt.virt-aa-helper \
274 ++ security/apparmor/usr.libexec.virt-aa-helper \
275 + security/apparmor/usr.sbin.libvirtd \
276 + $(NULL)
277 +
278 +@@ -90,7 +90,7 @@ endif WITH_SECDRIVER_APPARMOR
279 + if WITH_APPARMOR_PROFILES
280 + apparmordir = $(sysconfdir)/apparmor.d/
281 + apparmor_DATA = \
282 +- security/apparmor/usr.lib.libvirt.virt-aa-helper \
283 ++ security/apparmor/usr.libexec.virt-aa-helper \
284 + security/apparmor/usr.sbin.libvirtd \
285 + $(NULL)
286 +
287 +@@ -110,11 +110,11 @@ APPARMOR_LOCAL_DIR = "$(DESTDIR)$(apparmordir)/local"
288 + install-apparmor-local:
289 + $(MKDIR_P) "$(APPARMOR_LOCAL_DIR)"
290 + echo "# Site-specific additions and overrides for \
291 +- 'usr.lib.libvirt.virt-aa-helper'" \
292 +- >"$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper"
293 ++ 'usr.libexec.virt-aa-helper'" \
294 ++ >"$(APPARMOR_LOCAL_DIR)/usr.libexec.virt-aa-helper"
295 +
296 + uninstall-apparmor-local:
297 +- rm -f "$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper"
298 ++ rm -f "$(APPARMOR_LOCAL_DIR)/usr.libexec.virt-aa-helper"
299 + rmdir "$(APPARMOR_LOCAL_DIR)" || :
300 +
301 + INSTALL_DATA_LOCAL += install-apparmor-local
302 +diff --git a/src/security/apparmor/libvirt-qemu b/src/security/apparmor/libvirt-qemu
303 +index eaa5167525..9be50bbbe0 100644
304 +--- a/src/security/apparmor/libvirt-qemu
305 ++++ b/src/security/apparmor/libvirt-qemu
306 +@@ -87,6 +87,8 @@
307 + /usr/share/AAVMF/** r,
308 + /usr/share/qemu-efi/** r,
309 + /usr/share/slof/** r,
310 ++ /usr/share/seavgabios/** r,
311 ++ /usr/share/edk2-ovmf/** r,
312 +
313 + # pki for libvirt-vnc and libvirt-spice (LP: #901272, #1690140)
314 + /etc/pki/CA/ r,
315 +diff --git a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper b/src/security/apparmor/usr.libexec.virt-aa-helper
316 +similarity index 93%
317 +rename from src/security/apparmor/usr.lib.libvirt.virt-aa-helper
318 +rename to src/security/apparmor/usr.libexec.virt-aa-helper
319 +index de9436872c..99ab4ea527 100644
320 +--- a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper
321 ++++ b/src/security/apparmor/usr.libexec.virt-aa-helper
322 +@@ -1,7 +1,7 @@
323 + # Last Modified: Mon Apr 5 15:10:27 2010
324 + #include <tunables/global>
325 +
326 +-profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
327 ++profile virt-aa-helper /usr/libexec/virt-aa-helper {
328 + #include <abstractions/base>
329 +
330 + # needed for searching directories
331 +@@ -33,7 +33,7 @@ profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
332 + deny /dev/mapper/ r,
333 + deny /dev/mapper/* r,
334 +
335 +- /usr/{lib,lib64}/libvirt/virt-aa-helper mr,
336 ++ /usr/libexec/virt-aa-helper mr,
337 + /{usr/,}sbin/apparmor_parser Ux,
338 +
339 + /etc/apparmor.d/libvirt/* r,
340 +diff --git a/src/security/apparmor/usr.sbin.libvirtd b/src/security/apparmor/usr.sbin.libvirtd
341 +index f0ffc53008..8a402bd6ec 100644
342 +--- a/src/security/apparmor/usr.sbin.libvirtd
343 ++++ b/src/security/apparmor/usr.sbin.libvirtd
344 +@@ -98,8 +98,10 @@
345 + audit deny /sys/kernel/security/apparmor/.* rwxl,
346 + /sys/kernel/security/apparmor/profiles r,
347 + /usr/{lib,lib64}/libvirt/* PUxr,
348 +- /usr/{lib,lib64}/libvirt/libvirt_parthelper ix,
349 +- /usr/{lib,lib64}/libvirt/libvirt_iohelper ix,
350 ++ /usr/libexec/virt-aa-helper PUxr,
351 ++ /usr/libexec/libvirt_lxc PUxr,
352 ++ /usr/libexec/libvirt_parthelper ix,
353 ++ /usr/libexec/libvirt_iohelper ix,
354 + /etc/libvirt/hooks/** rmix,
355 + /etc/xen/scripts/** rmix,
356 +
357 +--
358 +2.19.2
359 +
360
361 diff --git a/app-emulation/libvirt/libvirt-9999.ebuild b/app-emulation/libvirt/libvirt-9999.ebuild
362 index c8b391fe438..158a315e310 100644
363 --- a/app-emulation/libvirt/libvirt-9999.ebuild
364 +++ b/app-emulation/libvirt/libvirt-9999.ebuild
365 @@ -124,9 +124,9 @@ DEPEND="${RDEPEND}
366 virtual/pkgconfig"
367
368 PATCHES=(
369 - "${FILESDIR}"/${PN}-4.5.0-do_not_use_sysconf.patch
370 + "${FILESDIR}"/${PN}-5.0.0-do-not-use-sysconf.patch
371 "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch
372 - "${FILESDIR}"/${PN}-3.10.0-r2-fix_paths_for_apparmor.patch
373 + "${FILESDIR}"/${PN}-5.0.0-fix-paths-for-apparmor.patch
374 )
375
376 pkg_setup() {