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: Fri, 30 Aug 2019 16:09:38
Message-Id: 1567181364.72d1dfdec1be64f171d45407ae623a86f7465354.tamiko@gentoo
1 commit: 72d1dfdec1be64f171d45407ae623a86f7465354
2 Author: Michal Privoznik <mprivozn <AT> redhat <DOT> com>
3 AuthorDate: Fri Aug 16 14:40:54 2019 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 30 16:09:24 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72d1dfde
7
8 app-emulation/libvirt-9999: Rebase libvirt-5.6.0-do-not-use-sysconf.patch
9
10 The original patch does not apply cleanly, because of upstream
11 commit 5b816e1696.
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.7.0-do-not-use-sysconf.patch | 174 +++++++++++++++++++++
17 app-emulation/libvirt/libvirt-9999.ebuild | 2 +-
18 2 files changed, 175 insertions(+), 1 deletion(-)
19
20 diff --git a/app-emulation/libvirt/files/libvirt-5.7.0-do-not-use-sysconf.patch b/app-emulation/libvirt/files/libvirt-5.7.0-do-not-use-sysconf.patch
21 new file mode 100644
22 index 00000000000..f4850f6ae63
23 --- /dev/null
24 +++ b/app-emulation/libvirt/files/libvirt-5.7.0-do-not-use-sysconf.patch
25 @@ -0,0 +1,174 @@
26 +From eee203f582af1f96e7a9451d447079cf49f47495 Mon Sep 17 00:00:00 2001
27 +Message-Id: <eee203f582af1f96e7a9451d447079cf49f47495.1565963722.git.mprivozn@××××××.com>
28 +From: Michal Privoznik <mprivozn@××××××.com>
29 +Date: Sat, 16 Mar 2019 12:33:00 +0100
30 +Subject: [PATCH] gentoo: do not use sysconf
31 +
32 +Signed-off-by: Michal Privoznik <mprivozn@××××××.com>
33 +---
34 + src/Makefile.am | 21 ++-------------------
35 + src/locking/virtlockd.service.in | 3 +--
36 + src/logging/virtlogd.service.in | 3 +--
37 + src/remote/libvirtd.service.in | 3 +--
38 + tools/Makefile.am | 13 ++-----------
39 + tools/libvirt-guests.service.in | 2 +-
40 + tools/libvirt-guests.sysconf | 7 +++++++
41 + 7 files changed, 15 insertions(+), 37 deletions(-)
42 +
43 +diff --git a/src/Makefile.am b/src/Makefile.am
44 +index 3ae4b87abb..69729d15b4 100644
45 +--- a/src/Makefile.am
46 ++++ b/src/Makefile.am
47 +@@ -666,23 +666,6 @@ libvirt_lxc_la_LIBADD = libvirt.la $(CYGWIN_EXTRA_LIBADD)
48 +
49 + EXTRA_DIST += $(SYSCONF_FILES)
50 +
51 +-install-sysconfig:
52 +- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
53 +- for f in $(SYSCONF_FILES:%.sysconf=%) ; \
54 +- do \
55 +- tgt=`basename $$f`; \
56 +- $(INSTALL_DATA) $(srcdir)/$$f.sysconf \
57 +- $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
58 +- done
59 +-
60 +-uninstall-sysconfig:
61 +- for f in $(SYSCONF_FILES:%.sysconf=%) ; \
62 +- do \
63 +- tgt=`basename $$f`; \
64 +- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
65 +- done
66 +- rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
67 +-
68 + LOGROTATE_FILES := $(LOGROTATE_FILES_IN:remote/%.in=%)
69 +
70 + EXTRA_DIST += $(LOGROTATE_FILES_IN)
71 +@@ -740,14 +723,14 @@ SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
72 + BUILT_SOURCES += $(SYSTEMD_UNIT_FILES)
73 + DISTCLEANFILES += $(SYSTEMD_UNIT_FILES)
74 +
75 +-install-systemd: $(SYSTEMD_UNIT_FILES) install-sysconfig
76 ++install-systemd: $(SYSTEMD_UNIT_FILES)
77 + $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
78 + for f in $(SYSTEMD_UNIT_FILES); \
79 + do \
80 + $(INSTALL_DATA) $$f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ ; \
81 + done
82 +
83 +-uninstall-systemd: uninstall-sysconfig
84 ++uninstall-systemd:
85 + rm -f $(SYSTEMD_UNIT_FILES:%=$(DESTDIR)$(SYSTEMD_UNIT_DIR)/%)
86 + rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
87 +
88 +diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in
89 +index e7f8057c06..2449b201d9 100644
90 +--- a/src/locking/virtlockd.service.in
91 ++++ b/src/locking/virtlockd.service.in
92 +@@ -7,8 +7,7 @@ Documentation=man:virtlockd(8)
93 + Documentation=https://libvirt.org
94 +
95 + [Service]
96 +-EnvironmentFile=-@sysconfdir@/sysconfig/virtlockd
97 +-ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS
98 ++ExecStart=@sbindir@/virtlockd
99 + ExecReload=/bin/kill -USR1 $MAINPID
100 + # Loosing the locks is a really bad thing that will
101 + # cause the machine to be fenced (rebooted), so make
102 +diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in
103 +index daff48e67d..43736191d5 100644
104 +--- a/src/logging/virtlogd.service.in
105 ++++ b/src/logging/virtlogd.service.in
106 +@@ -7,8 +7,7 @@ Documentation=man:virtlogd(8)
107 + Documentation=https://libvirt.org
108 +
109 + [Service]
110 +-EnvironmentFile=-@sysconfdir@/sysconfig/virtlogd
111 +-ExecStart=@sbindir@/virtlogd $VIRTLOGD_ARGS
112 ++ExecStart=@sbindir@/virtlogd
113 + ExecReload=/bin/kill -USR1 $MAINPID
114 + # Loosing the logs is a really bad thing that will
115 + # cause the machine to be fenced (rebooted), so make
116 +diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in
117 +index 4c5b28b478..032ea940fa 100644
118 +--- a/src/remote/libvirtd.service.in
119 ++++ b/src/remote/libvirtd.service.in
120 +@@ -22,12 +22,11 @@ Documentation=https://libvirt.org
121 +
122 + [Service]
123 + Type=notify
124 +-EnvironmentFile=-@sysconfdir@/sysconfig/libvirtd
125 + # libvirtd.service is set to run on boot so that autostart of
126 + # VMs can be performed. We don't want it to stick around if
127 + # unused though, so we set a timeout. The socket activation
128 + # then ensures it gets started again if anything needs it
129 +-ExecStart=@sbindir@/libvirtd --timeout 120 $LIBVIRTD_ARGS
130 ++ExecStart=@sbindir@/libvirtd --timeout 120
131 + ExecReload=/bin/kill -HUP $MAINPID
132 + KillMode=process
133 + Restart=on-failure
134 +diff --git a/tools/Makefile.am b/tools/Makefile.am
135 +index 29fdbfe846..04b21eb54a 100644
136 +--- a/tools/Makefile.am
137 ++++ b/tools/Makefile.am
138 +@@ -360,15 +360,6 @@ install-data-local: install-systemd install-nss \
139 + uninstall-local: uninstall-systemd uninstall-nss \
140 + uninstall-bash-completion
141 +
142 +-install-sysconfig:
143 +- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
144 +- $(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
145 +- $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
146 +-
147 +-uninstall-sysconfig:
148 +- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
149 +- rmdir $(DESTDIR)$(sysconfdir)/sysconfig ||:
150 +-
151 + EXTRA_DIST += libvirt-guests.sh.in
152 +
153 + libvirt-guests.sh: libvirt-guests.sh.in $(top_builddir)/config.status
154 +@@ -388,12 +379,12 @@ EXTRA_DIST += libvirt-guests.service.in
155 + SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
156 +
157 + if LIBVIRT_INIT_SCRIPT_SYSTEMD
158 +-install-systemd: libvirt-guests.service install-sysconfig libvirt-guests.sh
159 ++install-systemd: libvirt-guests.service libvirt-guests.sh
160 + $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
161 + $(INSTALL_DATA) libvirt-guests.service \
162 + $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
163 +
164 +-uninstall-systemd: uninstall-sysconfig
165 ++uninstall-systemd:
166 + rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
167 + rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||:
168 +
169 +diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in
170 +index 10c664016a..f0f417bffb 100644
171 +--- a/tools/libvirt-guests.service.in
172 ++++ b/tools/libvirt-guests.service.in
173 +@@ -10,7 +10,7 @@ Documentation=man:libvirtd(8)
174 + Documentation=https://libvirt.org
175 +
176 + [Service]
177 +-EnvironmentFile=-@sysconfdir@/sysconfig/libvirt-guests
178 ++EnvironmentFile=-/etc/libvirt/libvirt-guests.conf
179 + # Hack just call traditional service until we factor
180 + # out the code
181 + ExecStart=@libexecdir@/libvirt-guests.sh start
182 +diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf
183 +index 669b046507..45b0b9ea46 100644
184 +--- a/tools/libvirt-guests.sysconf
185 ++++ b/tools/libvirt-guests.sysconf
186 +@@ -1,3 +1,10 @@
187 ++#
188 ++# Warning: This configuration file is only sourced by the systemd
189 ++# libvirt-guests.service unit. The coresponding openrc facility is in
190 ++# /etc/init.d/libvirtd and /etc/conf.d/libvirtd
191 ++#
192 ++
193 ++
194 + # URIs to check for running guests
195 + # example: URIS='default xen:///system vbox+tcp://host/system lxc:///system'
196 + #URIS=default
197 +--
198 +2.21.0
199 +
200
201 diff --git a/app-emulation/libvirt/libvirt-9999.ebuild b/app-emulation/libvirt/libvirt-9999.ebuild
202 index 11ae2447b09..d623c5145d1 100644
203 --- a/app-emulation/libvirt/libvirt-9999.ebuild
204 +++ b/app-emulation/libvirt/libvirt-9999.ebuild
205 @@ -123,7 +123,7 @@ DEPEND="${RDEPEND}
206 virtual/pkgconfig"
207
208 PATCHES=(
209 - "${FILESDIR}"/${PN}-5.6.0-do-not-use-sysconf.patch
210 + "${FILESDIR}"/${PN}-5.7.0-do-not-use-sysconf.patch
211 "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch
212 "${FILESDIR}"/${PN}-5.2.0-fix-paths-for-apparmor.patch
213 )