Gentoo Archives: gentoo-commits

From: Aric Belsito <lluixhi@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: app-emulation/libvirt/files/, app-emulation/libvirt/
Date: Wed, 29 Mar 2017 16:47:45
Message-Id: 1490804897.952620f8f460ca551ddece2543635ee48258795f.lluixhi@gentoo
1 commit: 952620f8f460ca551ddece2543635ee48258795f
2 Author: Rasmus Thomsen <rasmus.thomsen <AT> live <DOT> de>
3 AuthorDate: Wed Mar 29 13:53:58 2017 +0000
4 Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
5 CommitDate: Wed Mar 29 16:28:17 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=952620f8
7
8 app-emulation/libvirt: add fixed ebuild for musl
9
10 app-emulation/libvirt/Manifest | 17 +
11 app-emulation/libvirt/files/README.gentoo-r2 | 58 ++++
12 ...irt-1.2.16-fix_paths_in_libvirt-guests_sh.patch | 19 +
13 .../files/libvirt-1.3.0-do_not_use_sysconf.patch | 114 ++++++
14 .../libvirt/files/libvirt-1.3.4-glibc-2.23.patch | 86 +++++
15 .../libvirt-3.0.0-fix_paths_for_apparmor.patch | 79 +++++
16 .../files/libvirt-3.1.0-musl-fix-includes.patch | 10 +
17 app-emulation/libvirt/files/libvirt-guests.confd | 68 ++++
18 app-emulation/libvirt/files/libvirt-guests.init-r2 | 235 +++++++++++++
19 app-emulation/libvirt/files/libvirtd.confd-r5 | 18 +
20 app-emulation/libvirt/files/libvirtd.init-r16 | 34 ++
21 app-emulation/libvirt/files/libvirtd.service.conf | 10 +
22 app-emulation/libvirt/files/libvirtd.tmpfiles.conf | 1 +
23 app-emulation/libvirt/files/virtlockd.init-r1 | 23 ++
24 app-emulation/libvirt/files/virtlogd.init-r1 | 23 ++
25 app-emulation/libvirt/libvirt-3.1.0.ebuild | 384 +++++++++++++++++++++
26 app-emulation/libvirt/metadata.xml | 102 ++++++
27 17 files changed, 1281 insertions(+)
28
29 diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest
30 new file mode 100644
31 index 0000000..daae42f
32 --- /dev/null
33 +++ b/app-emulation/libvirt/Manifest
34 @@ -0,0 +1,17 @@
35 +AUX README.gentoo-r2 2094 SHA256 e4360cd1a0ab23180fcc4dc97958f043aedb0b7564f2b7172dbe5e8240c3c247 SHA512 595ede7bb574c7f244a15e430b70f828bc4574b409d4cc37261bf38bfb30cdb31edb6091ff63f6517b281cc11a34eee960ea0330a6ea285dd48fe2288dd67196 WHIRLPOOL 820501bc603a28041eab27221024957a428a59c3edc8eebe4209d984b7f81f1c67da1186f7d402c237dc0a8b4c633266edb2d46255e1305fa4708da8a7be2f96
36 +AUX libvirt-1.2.16-fix_paths_in_libvirt-guests_sh.patch 641 SHA256 a8417304d8dfd4d042956d33bfb373d61c7c2c0e8ead8c384300bf32f8acee8e SHA512 df9960b80c7dda852e38d992ab31181d79091bd6e1ba88c0b0c1af8a2f2d1445ee95c957df38ab27b452cd2de01d36b88164e665a867ad69c15ca15c18b1d588 WHIRLPOOL 892bc9d14257929718e29671bea2eb44ed25a8ed5f7f4d8ee72c9d82a4e6a96b5da67f43279de29c06d6abe41ab2792b48515c2dea46aa4a452d76e85ebda973
37 +AUX libvirt-1.3.0-do_not_use_sysconf.patch 4072 SHA256 896d482d3aa9281977e6900e6103848e34a7e4c0479395016fd1d2ff254eb476 SHA512 44428e16cf1998db0bcae1b54d3ba32363a71db3f45f493bd675f6ad7d6bf131667749f33226ab5f40be52e833ec0899bb9202a8f0e150d007c3f7c71a9cf314 WHIRLPOOL 4978b13925c4836d1601217aec9473a62797821275a1c2bab4a7acb80fa3a34a54ed01b3daf91cd78c20622f3be6f6f9214399fc7da63172a5f9e138727b4fcf
38 +AUX libvirt-1.3.4-glibc-2.23.patch 2049 SHA256 8fa125da2a8e6dabf17fc47863597b2b3929d4d4b1e01ace1433a75ac4bc0ba2 SHA512 022b610c2e343c9cb595babcc8b2e5e0e0db1a19d6bfc9babdc817bc1e093ff12ee1c26304c188151fecc32481ffd225d7a3d36324613dd5b4ea7139280629c4 WHIRLPOOL 3cc039820865eafd1ea23eec81c3b4f842fe359e49a85d09925dddd5f8b0228adf62fa908cb345b9df0526ed9eb388f965d70ef99d73edcfaf20c5539fcb4559
39 +AUX libvirt-3.0.0-fix_paths_for_apparmor.patch 2904 SHA256 77ccadc9bf80b029a3105ac7609b759d5b73c40fef03d4eabcb6c6c9bd3334f9 SHA512 be4aba4b9bd44bb2f1b4f269f573caafce746783e0a7c08ff72d03a96b9675261346ededaf1d6b6c89afaa6d2b88fe7fb0d9f120d40fd714179e6f9d209a6724 WHIRLPOOL 917b54d20a1a2567052de25f08b8296b392002292303eee11acfee486eb8437a767695325adc63a08f239edcbdceae9787f63cdebb313631c7e6880c97a54caf
40 +AUX libvirt-3.1.0-musl-fix-includes.patch 221 SHA256 40b1814d2a1d05a987242af46592a74feb612ccb3f064e93984bdad29d9c1fc7 SHA512 876c7dacedcce1d69938779b978b3a23b2f51128f121b4aa53f5f301d7740f90d77f335523210ed492b68b5f7a0b864b25a694ee562fb5e8ab1b6411d3da48e7 WHIRLPOOL d9d7f57cee28f1f6149f6de6f853f08679cbb9b3e82b019ff6046da525c1768ea3f7ef34cf3afa6033e87f80e8f5c74e5f2d129122d8df6edb371e743a3a3af5
41 +AUX libvirt-guests.confd 2430 SHA256 d5f85bb8c1d2010347f23badc422e98046b97a0066254739b5829fce07837d63 SHA512 78f419a89de7aabaad860903c24f1c070786fc1296d987e61dd537705b0e7f71a46c315888028f3826c3417e42861ca8471788be4ec5695e98427c5f18ae63fc WHIRLPOOL 4f06b9319f52b872f14f86da9aeeafecf176c46755955c7773badd0df239fdd76efaff50921565154fa24896d0e4b07df788e785ed6ff5f2308c0ba0e79a9418
42 +AUX libvirt-guests.init-r2 5412 SHA256 f78ced5ebe644522c6ce102b3f6bcf932686243a50629559f988548c570cad3a SHA512 0f46ec5776c61d1776248779fa894b1a6d7b98d0eb8e8374b320c785c25d92468f087e350233b9152eb2cd0680f6b334c3a61684dabc7c5b559d3b55fdcb712d WHIRLPOOL 77ce5c6e615c94b437f13f8bfb2689cea7b8231a4aa227e83944fd66793a3daf0ada8c041c358f38c2f676dfc7fb071880df682dcc759f63e8e20f033e141d39
43 +AUX libvirtd.confd-r5 740 SHA256 4f7fba7e64533868119c0f3355aa22932e163b208397323dc2cd96daadcc4079 SHA512 98f935589dbc5f2a99329f77fdf84c563fa0dc99404b7476603679478d68ce8dbea2c88645251d3c28f59e7bcae124ae632972146e8a8c3e0e9fcbfb27296f91 WHIRLPOOL cc40f10c1ab440efff318f4cac95c0923dfb3309e727d3de4a5dd5cd95181da76a6f1de4ad6740b99d0b65b6bbf5a5128ce24288f77a91268e74d2e8d8e95e49
44 +AUX libvirtd.init-r16 1093 SHA256 1f875e12cc6ecb1b434bfea774893b84f6602072da0218b654d2ecf79cf2d36d SHA512 5ea4c2f9e48faf2aa8fe7077d075841d610da17e28bcc85c79c55565f286e345339f042090b453e25accf5c405e322e76b6cf846fdfb3e90db3e2d0c2fff4c48 WHIRLPOOL 1de3b7c8fab0ec92d1138f6de9f7ba38087de7094908fc9205d91bfa0bc667d11dff2e113cf393f5508b23badf3a2e524c6f81d5a3b817a7b9d198f0b504332a
45 +AUX libvirtd.service.conf 401 SHA256 1cfb6f7dec5746364d9a4cccddb4b63f8ccd0ebf8bfaa000b13a09962ca24fac SHA512 27adbd104ea87e51d423b057392a0c6726692ad8ee9723f73dc4bfe8eb54069725d64883434424ba810d36992d404d1ba4afe6bcefb866d3d3d92dfd161c2b32 WHIRLPOOL d6b960b7d18bdbaf0ff6dc5ecf29e7d10e22fa7d16933a149d6287c007d864a0e0dd67048c25a038dd5f73c9ea911d2cd49bf21c072b0c7eab1e92be35d8b545
46 +AUX libvirtd.tmpfiles.conf 36 SHA256 0102a9bbbb6fc9764c2d49933a89d1661b3999aec53c6a66302cb0f21ce9c9fc SHA512 2b1c3c64dd6fa03d8c2ae24e7ce4aa7d754913214542a68a4e99f10fbc251fd23ee26e297a957d7b4b70eec8ef028c41fc915da3a85fbbd16143bb92d1de3aed WHIRLPOOL c51b2059f4eef0ceaf69e11018a6e51299be5aa21a56741366db4fe43a7998388fa6e5bf15d79c52ab66dd69d64c679003a0904c54033c8bdfc04c16bb5b8e4f
47 +AUX virtlockd.init-r1 570 SHA256 23ddea66fb2d85c17c382daa07abfabe7fa57d62406d2ca5df0c755f5dcc3834 SHA512 65a05d406200da9a534df5caa1b9cb2af97f0b03f64e6b4157322975fa754f59ae74fff9ec8301a6c0510e4b75e2b72a78cddf004a76109e18c375e83527cee5 WHIRLPOOL 7959e426986747165ef074ca52b8049aa4120b0206b7532330346552fe5811a46fa71b58e02fcd37e55b872e099ccc8688fcc3f30b2e2316e01a4220806d49b4
48 +AUX virtlogd.init-r1 569 SHA256 1647c11779fd874bdc115234bae0f0f65278084541473d2825aa9864ad49f939 SHA512 0a3e083e742f9e0d8206ab9a48c63bbd395bdc24e5551e2cbeddffa3fb576a817b73dbafe646c392a35c354d6b65426a9b6f3ce3dcafc30077715e90684968c1 WHIRLPOOL e0fa334c60dac4aa1ff721c3c4e957a688e0a58297cb06249de50dd838c55eee3c1c00fcb4b1c06b74c1fb61c52354889a09bd2793c8623faa120489cac95c3a
49 +DIST libvirt-3.1.0.tar.xz 13906204 SHA256 7879029a0fcac4e58dbeec66f0bc77771565c4b6667212c8f6251eefb03732a9 SHA512 e08c82aa3c06b2ea7615b71937fa16e7ae52cb82350bacaefcac1a872471bbbf993e20b4b14f5bb4d7c539be18c42b377df9100b493d3873b5fd5f1f67449e17 WHIRLPOOL 7fdb068a95575499115eb542342e2d133c3d877df3190f40f97de4f2f0af67fdc722c3d1bcaeea14306dcf94ff4a013bd5e60736e7866de3ae56e662df7c5dc4
50 +EBUILD libvirt-3.1.0.ebuild 9763 SHA256 2859329a71a6bfb26a7566e2cd6bec8ae50fce3fc15090ff1489b58df12057d4 SHA512 cdb8f3c85023f0e3b3ae3202ca62072a17f775bbc2acc820b4f4321df533852b2e10d473a4b266f7f7112257666385eb30fc613d8ba22d97319b9137fd772458 WHIRLPOOL 8d7728abc5a224279042aeaf6c40e91c197a1571d4e47abd1b5771ecca8bec815037a0229579d02a213503caf497f46a656dd84eae5b0e09eb343abdcbc7e57a
51 +MISC metadata.xml 3792 SHA256 e65f6270492daa835d282890334aac82606ab0a1384f7ca2cf4400755c98833b SHA512 e03fbd770aa0ce3ef2c687e23925b0d981f4830afe2a27688c4393108291645bd7a3e58c42dac67ef87125c05e5c0a94186445e414dd5f3014af25d24261d672 WHIRLPOOL e633df8d2ba6c2996cc4d3736e317d83dc00ef6aa36d74bdc8a72dde871c4ffb41fc6d1f8e6a4c12c63a3fb92d7545947117eeee223ab66445d6aad44517b245
52
53 diff --git a/app-emulation/libvirt/files/README.gentoo-r2 b/app-emulation/libvirt/files/README.gentoo-r2
54 new file mode 100644
55 index 0000000..1c086c1
56 --- /dev/null
57 +++ b/app-emulation/libvirt/files/README.gentoo-r2
58 @@ -0,0 +1,58 @@
59 +Important: The openrc libvirtd init script is now broken up into two
60 +separate services: libvirtd, that solely handles the daemon, and
61 +libvirt-guests, that takes care of clients during shutdown/restart of the
62 +host. In order to reenable client handling, edit /etc/conf.d/libvirt-guests
63 +and enable the service and start it:
64 +
65 + $ rc-update add libvirt-guests
66 + $ service libvirt-guests start
67 +
68 +
69 +For the basic networking support (bridged and routed networks) you don't
70 +need any extra software. For more complex network modes including but not
71 +limited to NATed network, you can enable the 'virt-network' USE flag. It
72 +will pull in required runtime dependencies
73 +
74 +
75 +If you are using dnsmasq on your system, you will have to configure
76 +/etc/dnsmasq.conf to enable the following settings:
77 +
78 + bind-interfaces
79 + interface or except-interface
80 +
81 +Otherwise you might have issues with your existing DNS server.
82 +
83 +
84 +For openrc users:
85 +
86 + Please use /etc/conf.d/libvirtd to control the '--listen' parameter for
87 + libvirtd.
88 +
89 + Use /etc/init.d/libvirt-guests to manage clients on restart/shutdown of
90 + the host. The default configuration will suspend and resume running kvm
91 + guests with 'managedsave'. This behavior can be changed under
92 + /etc/conf.d/libvirt-guests
93 +
94 +
95 +For systemd users:
96 +
97 + Please use /etc/systemd/system/libvirtd.service.d/00gentoo.conf
98 + to control the '--listen' parameter for libvirtd.
99 +
100 + The configuration for the 'libvirt-guests.service' is found under
101 + /etc/libvirt/libvirt-guests.conf"
102 +
103 +
104 +If you have built libvirt with policykit support, a new group "libvirt" has
105 +been created. Simply add a user to the libvirt group in order to grant
106 +administrative access to libvirtd. Alternatively, drop a custom policykit
107 +rule into /etc/polkit-1/rules.d.
108 +
109 +If you have built libvirt without policykit support (USE=-policykit), you
110 +must change the unix sock group and/or perms in /etc/libvirt/libvirtd.conf
111 +in order to allow normal users to connect to libvirtd.
112 +
113 +
114 +If libvirtd is built with USE=caps, libvirt will now start qemu/kvm VMs
115 +with non-root privileges. Ensure any resources your VMs use are accessible
116 +by qemu:qemu.
117
118 diff --git a/app-emulation/libvirt/files/libvirt-1.2.16-fix_paths_in_libvirt-guests_sh.patch b/app-emulation/libvirt/files/libvirt-1.2.16-fix_paths_in_libvirt-guests_sh.patch
119 new file mode 100644
120 index 0000000..ddedb1f
121 --- /dev/null
122 +++ b/app-emulation/libvirt/files/libvirt-1.2.16-fix_paths_in_libvirt-guests_sh.patch
123 @@ -0,0 +1,19 @@
124 +diff --git a/tools/libvirt-guests.sh.in b/tools/libvirt-guests.sh.in
125 +index 7f74b85..ea58119 100644
126 +--- a/tools/libvirt-guests.sh.in
127 ++++ b/tools/libvirt-guests.sh.in
128 +@@ -41,11 +41,11 @@ CONNECT_RETRIES=10
129 + RETRIES_SLEEP=1
130 + SYNC_TIME=0
131 +
132 +-test -f "$sysconfdir"/sysconfig/libvirt-guests &&
133 +- . "$sysconfdir"/sysconfig/libvirt-guests
134 ++test -f "$sysconfdir"/libvirt/libvirt-guests.conf &&
135 ++ . "$sysconfdir"/libvirt/libvirt-guests.conf
136 +
137 + LISTFILE="$localstatedir"/lib/libvirt/libvirt-guests
138 +-VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests
139 ++VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/libvirt-guests
140 +
141 + RETVAL=0
142 +
143
144 diff --git a/app-emulation/libvirt/files/libvirt-1.3.0-do_not_use_sysconf.patch b/app-emulation/libvirt/files/libvirt-1.3.0-do_not_use_sysconf.patch
145 new file mode 100644
146 index 0000000..47010c4
147 --- /dev/null
148 +++ b/app-emulation/libvirt/files/libvirt-1.3.0-do_not_use_sysconf.patch
149 @@ -0,0 +1,114 @@
150 +diff --git a/daemon/Makefile.am b/daemon/Makefile.am
151 +index be1b5a9..5ce0e1e 100644
152 +--- a/daemon/Makefile.am
153 ++++ b/daemon/Makefile.am
154 +@@ -385,9 +385,7 @@ uninstall-logrotate:
155 + rmdir $(DESTDIR)$(sysconfdir)/logrotate.d || :
156 +
157 + install-sysconfig:
158 +- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
159 +- $(INSTALL_DATA) $(srcdir)/libvirtd.sysconf \
160 +- $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
161 ++
162 + uninstall-sysconfig:
163 + rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
164 + rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
165 +diff --git a/daemon/libvirtd.service.in b/daemon/libvirtd.service.in
166 +index 608221c..63708f4 100644
167 +--- a/daemon/libvirtd.service.in
168 ++++ b/daemon/libvirtd.service.in
169 +@@ -12,8 +12,7 @@ Documentation=http://libvirt.org
170 +
171 + [Service]
172 + Type=notify
173 +-EnvironmentFile=-/etc/sysconfig/libvirtd
174 +-ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
175 ++ExecStart=@sbindir@/libvirtd
176 + ExecReload=/bin/kill -HUP $MAINPID
177 + KillMode=process
178 + Restart=on-failure
179 +diff --git a/src/Makefile.am b/src/Makefile.am
180 +index 7219f7c..c474a23 100644
181 +--- a/src/Makefile.am
182 ++++ b/src/Makefile.am
183 +@@ -2473,11 +2473,6 @@ EXTRA_DIST += \
184 + logging/virtlogd.sysconf
185 +
186 + install-sysconfig:
187 +- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
188 +- $(INSTALL_DATA) $(srcdir)/locking/virtlockd.sysconf \
189 +- $(DESTDIR)$(sysconfdir)/sysconfig/virtlockd
190 +- $(INSTALL_DATA) $(srcdir)/logging/virtlogd.sysconf \
191 +- $(DESTDIR)$(sysconfdir)/sysconfig/virtlogd
192 +
193 + uninstall-sysconfig:
194 + rm -f $(DESTDIR)$(sysconfdir)/sysconfig/virtlogd
195 +diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in
196 +index 57089b0..ace0c83 100644
197 +--- a/src/locking/virtlockd.service.in
198 ++++ b/src/locking/virtlockd.service.in
199 +@@ -5,8 +5,7 @@ Documentation=man:virtlockd(8)
200 + Documentation=http://libvirt.org
201 +
202 + [Service]
203 +-EnvironmentFile=-/etc/sysconfig/virtlockd
204 +-ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS
205 ++ExecStart=@sbindir@/virtlockd
206 + ExecReload=/bin/kill -USR1 $MAINPID
207 + # Loosing the locks is a really bad thing that will
208 + # cause the machine to be fenced (rebooted), so make
209 +diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in
210 +index a264d3a..b467884 100644
211 +--- a/src/logging/virtlogd.service.in
212 ++++ b/src/logging/virtlogd.service.in
213 +@@ -5,8 +5,7 @@ Documentation=man:virtlogd(8)
214 + Documentation=http://libvirt.org
215 +
216 + [Service]
217 +-EnvironmentFile=-/etc/sysconfig/virtlogd
218 +-ExecStart=@sbindir@/virtlogd $VIRTLOGD_ARGS
219 ++ExecStart=@sbindir@/virtlogd
220 + ExecReload=/bin/kill -USR1 $MAINPID
221 + # Loosing the logs is a really bad thing that will
222 + # cause the machine to be fenced (rebooted), so make
223 +diff --git a/tools/Makefile.am b/tools/Makefile.am
224 +index 9180564..e72d5f4 100644
225 +--- a/tools/Makefile.am
226 ++++ b/tools/Makefile.am
227 +@@ -293,7 +293,7 @@ uninstall-local: uninstall-init uninstall-systemd
228 + install-sysconfig:
229 + $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
230 + $(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
231 +- $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
232 ++ $(DESTDIR)$(sysconfdir)/libvirt/libvirt-guests.conf
233 +
234 + uninstall-sysconfig:
235 + rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
236 +diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in
237 +index c31f663..71cb79d 100644
238 +--- a/tools/libvirt-guests.service.in
239 ++++ b/tools/libvirt-guests.service.in
240 +@@ -5,7 +5,7 @@ Documentation=man:libvirtd(8)
241 + Documentation=http://libvirt.org
242 +
243 + [Service]
244 +-EnvironmentFile=-/etc/sysconfig/libvirt-guests
245 ++EnvironmentFile=-/etc/libvirt/libvirt-guests.conf
246 + # Hack just call traditional service until we factor
247 + # out the code
248 + ExecStart=@libexecdir@/libvirt-guests.sh start
249 +diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf
250 +index 2770056..accd4f5 100644
251 +--- a/tools/libvirt-guests.sysconf
252 ++++ b/tools/libvirt-guests.sysconf
253 +@@ -1,3 +1,10 @@
254 ++#
255 ++# Warning: This configuration file is only sourced by the systemd
256 ++# libvirt-guests.service unit. The coresponding openrc facility is in
257 ++# /etc/init.d/libvirtd and /etc/conf.d/libvirtd
258 ++#
259 ++
260 ++
261 + # URIs to check for running guests
262 + # example: URIS='default xen:/// vbox+tcp://host/system lxc:///'
263 + #URIS=default
264
265 diff --git a/app-emulation/libvirt/files/libvirt-1.3.4-glibc-2.23.patch b/app-emulation/libvirt/files/libvirt-1.3.4-glibc-2.23.patch
266 new file mode 100644
267 index 0000000..adeff5c
268 --- /dev/null
269 +++ b/app-emulation/libvirt/files/libvirt-1.3.4-glibc-2.23.patch
270 @@ -0,0 +1,86 @@
271 +get major/minor macros by using AC_HEADER_MAJOR
272 +
273 +https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Particular-Headers.html#AC_HEADER_MAJOR
274 +
275 +https://bugs.gentoo.org/579960
276 +diff --git a/configure.ac b/configure.ac
277 +index 93d347c..1e7ee51 100644
278 +--- a/configure.ac
279 ++++ b/configure.ac
280 +@@ -282,2 +282,5 @@ AC_CHECK_SIZEOF([long])
281 +
282 ++dnl detect system-specific headers for major()/minor()
283 ++AC_HEADER_MAJOR
284 ++
285 + dnl Availability of various common functions (non-fatal if missing),
286 +diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c
287 +index bd2eeb6..74b2487 100644
288 +--- a/src/conf/domain_audit.c
289 ++++ b/src/conf/domain_audit.c
290 +@@ -28,2 +28,9 @@
291 +
292 ++#ifdef MAJOR_IN_MKDEV
293 ++# include <sys/mkdev.h>
294 ++#endif
295 ++#ifdef MAJOR_IN_SYSMACROS
296 ++# include <sys/sysmacros.h>
297 ++#endif
298 ++
299 + #include "domain_audit.h"
300 +diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
301 +index 76bef82..49c0648 100644
302 +--- a/src/lxc/lxc_controller.c
303 ++++ b/src/lxc/lxc_controller.c
304 +@@ -48,2 +48,9 @@
305 +
306 ++#ifdef MAJOR_IN_MKDEV
307 ++# include <sys/mkdev.h>
308 ++#endif
309 ++#ifdef MAJOR_IN_SYSMACROS
310 ++# include <sys/sysmacros.h>
311 ++#endif
312 ++
313 + #include "virerror.h"
314 +diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
315 +index 3c6c839..983cd21 100644
316 +--- a/src/lxc/lxc_driver.c
317 ++++ b/src/lxc/lxc_driver.c
318 +@@ -38,2 +38,9 @@
319 +
320 ++#ifdef MAJOR_IN_MKDEV
321 ++# include <sys/mkdev.h>
322 ++#endif
323 ++#ifdef MAJOR_IN_SYSMACROS
324 ++# include <sys/sysmacros.h>
325 ++#endif
326 ++
327 + #include "virerror.h"
328 +diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
329 +index 38398fd..4b45458 100644
330 +--- a/src/util/vircgroup.c
331 ++++ b/src/util/vircgroup.c
332 +@@ -31,2 +31,10 @@
333 + #endif
334 ++
335 ++#ifdef MAJOR_IN_MKDEV
336 ++# include <sys/mkdev.h>
337 ++#endif
338 ++#ifdef MAJOR_IN_SYSMACROS
339 ++# include <sys/sysmacros.h>
340 ++#endif
341 ++
342 + #include <fcntl.h>
343 +diff --git a/src/util/virutil.c b/src/util/virutil.c
344 +index bb9604a..9840a9e 100644
345 +--- a/src/util/virutil.c
346 ++++ b/src/util/virutil.c
347 +@@ -68,2 +68,9 @@
348 +
349 ++#ifdef MAJOR_IN_MKDEV
350 ++# include <sys/mkdev.h>
351 ++#endif
352 ++#ifdef MAJOR_IN_SYSMACROS
353 ++# include <sys/sysmacros.h>
354 ++#endif
355 ++
356 + #include "c-ctype.h"
357
358 diff --git a/app-emulation/libvirt/files/libvirt-3.0.0-fix_paths_for_apparmor.patch b/app-emulation/libvirt/files/libvirt-3.0.0-fix_paths_for_apparmor.patch
359 new file mode 100644
360 index 0000000..c9c7eb6
361 --- /dev/null
362 +++ b/app-emulation/libvirt/files/libvirt-3.0.0-fix_paths_for_apparmor.patch
363 @@ -0,0 +1,79 @@
364 +From baad1483ed0a699509f66abac6708797f370f888 Mon Sep 17 00:00:00 2001
365 +From: Matthias Maier <tamiko@××××××××××.org>
366 +Date: Sun, 22 Jan 2017 09:07:57 -0600
367 +Subject: [PATCH] Update paths to Gentoo layout
368 +
369 +---
370 + examples/Makefile.am | 4 ++--
371 + .../{usr.lib.libvirt.virt-aa-helper => usr.libexec.virt-aa-helper} | 4 ++--
372 + examples/apparmor/usr.sbin.libvirtd | 6 ++++--
373 + 3 files changed, 8 insertions(+), 6 deletions(-)
374 + rename examples/apparmor/{usr.lib.libvirt.virt-aa-helper => usr.libexec.virt-aa-helper} (90%)
375 +
376 +diff --git a/examples/Makefile.am b/examples/Makefile.am
377 +index 2956e14..d81e34b 100644
378 +--- a/examples/Makefile.am
379 ++++ b/examples/Makefile.am
380 +@@ -23,7 +23,7 @@ EXTRA_DIST = \
381 + apparmor/TEMPLATE.lxc \
382 + apparmor/libvirt-qemu \
383 + apparmor/libvirt-lxc \
384 +- apparmor/usr.lib.libvirt.virt-aa-helper \
385 ++ apparmor/usr.libexec.virt-aa-helper \
386 + apparmor/usr.sbin.libvirtd \
387 + lxcconvert/virt-lxc-convert \
388 + polkit/libvirt-acl.rules \
389 +@@ -70,7 +70,7 @@ admin_logging_SOURCES = admin/logging.c
390 + if WITH_APPARMOR_PROFILES
391 + apparmordir = $(sysconfdir)/apparmor.d/
392 + apparmor_DATA = \
393 +- apparmor/usr.lib.libvirt.virt-aa-helper \
394 ++ apparmor/usr.libexec.virt-aa-helper \
395 + apparmor/usr.sbin.libvirtd \
396 + $(NULL)
397 +
398 +diff --git a/examples/apparmor/usr.lib.libvirt.virt-aa-helper b/examples/apparmor/usr.libexec.virt-aa-helper
399 +similarity index 90%
400 +rename from examples/apparmor/usr.lib.libvirt.virt-aa-helper
401 +rename to examples/apparmor/usr.libexec.virt-aa-helper
402 +index 4a8f197..a6072f1 100644
403 +--- a/examples/apparmor/usr.lib.libvirt.virt-aa-helper
404 ++++ b/examples/apparmor/usr.libexec.virt-aa-helper
405 +@@ -1,7 +1,7 @@
406 + # Last Modified: Mon Apr 5 15:10:27 2010
407 + #include <tunables/global>
408 +
409 +-profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
410 ++profile virt-aa-helper /usr/libexec/virt-aa-helper {
411 + #include <abstractions/base>
412 +
413 + # needed for searching directories
414 +@@ -20,7 +20,7 @@ profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
415 + /sys/devices/ r,
416 + /sys/devices/** r,
417 +
418 +- /usr/{lib,lib64}/libvirt/virt-aa-helper mr,
419 ++ /usr/libexec/virt-aa-helper mr,
420 + /{usr/,}sbin/apparmor_parser Ux,
421 +
422 + /etc/apparmor.d/libvirt/* r,
423 +diff --git a/examples/apparmor/usr.sbin.libvirtd b/examples/apparmor/usr.sbin.libvirtd
424 +index 8893e75..f0b471c 100644
425 +--- a/examples/apparmor/usr.sbin.libvirtd
426 ++++ b/examples/apparmor/usr.sbin.libvirtd
427 +@@ -59,8 +59,10 @@
428 + audit deny /sys/kernel/security/apparmor/.* rwxl,
429 + /sys/kernel/security/apparmor/profiles r,
430 + /usr/{lib,lib64}/libvirt/* PUxr,
431 +- /usr/{lib,lib64}/libvirt/libvirt_parthelper ix,
432 +- /usr/{lib,lib64}/libvirt/libvirt_iohelper ix,
433 ++ /usr/libexec/virt-aa-helper PUxr,
434 ++ /usr/libexec/libvirt_lxc PUxr,
435 ++ /usr/libexec/libvirt_parthelper ix,
436 ++ /usr/libexec/libvirt_iohelper ix,
437 + /etc/libvirt/hooks/** rmix,
438 + /etc/xen/scripts/** rmix,
439 +
440 +--
441 +2.10.2
442 +
443
444 diff --git a/app-emulation/libvirt/files/libvirt-3.1.0-musl-fix-includes.patch b/app-emulation/libvirt/files/libvirt-3.1.0-musl-fix-includes.patch
445 new file mode 100644
446 index 0000000..70fb168
447 --- /dev/null
448 +++ b/app-emulation/libvirt/files/libvirt-3.1.0-musl-fix-includes.patch
449 @@ -0,0 +1,10 @@
450 +--- a/src/storage/storage_backend_fs.c
451 ++++ b/src/storage/storage_backend_fs.c
452 +@@ -30,6 +30,7 @@
453 + #include <dirent.h>
454 + #include <errno.h>
455 + #include <fcntl.h>
456 ++#include <paths.h>
457 + #include <unistd.h>
458 + #include <string.h>
459 +
460
461 diff --git a/app-emulation/libvirt/files/libvirt-guests.confd b/app-emulation/libvirt/files/libvirt-guests.confd
462 new file mode 100644
463 index 0000000..ed2ce58
464 --- /dev/null
465 +++ b/app-emulation/libvirt/files/libvirt-guests.confd
466 @@ -0,0 +1,68 @@
467 +# /etc/conf.d/libvirtd
468 +
469 +# LIBVIRT_URIS
470 +# space separated list of libvirt URIs to communicate with to start/stop guests
471 +# Valid values are anything that can be passed to 'virsh connect'
472 +
473 +#LIBVIRT_URIS="qemu:///system"
474 +
475 +
476 +# LIBVIRT_SHUTDOWN
477 +# Valid options:
478 +# * managedsave - Performs a state save external to the VM (for hypervisors
479 +# supporting this operation). qemu-kvm will stop the CPU
480 +# and save off all state to a separate file. When the
481 +# machine is started again, it will resume like nothing
482 +# ever happened. This is guarenteed to always successfully
483 +# stop your machine and restart it.
484 +#
485 +# * shutdown - Sends an ACPI shutdown (think of this as a request to
486 +# your guest to shutdown). There is no way to distinguish
487 +# between guests that are ignoring the shutdown request or
488 +# are stuck or are taking a long time to shutdown. We will
489 +# wait LIBVIRT_MAXWAIT seconds before yanking the power
490 +# out.
491 +#
492 +# * destroy - Immediately stop all running guests. Use with caution as
493 +# this can leave the guest in a corrupted state and might
494 +# lead to data loss.
495 +#
496 +
497 +#LIBVIRT_SHUTDOWN="managedsave"
498 +
499 +
500 +# LIBVIRT_MAXWAIT
501 +# Timeout in seconds until stopping a guest and "pulling the plug" on the
502 +# guest
503 +# Valid values are any integer over 0
504 +
505 +#LIBVIRT_MAXWAIT="500"
506 +
507 +
508 +# LIBVIRT_START
509 +# If this value is set to 'no', then guests and networks that were shutdown
510 +# by this script when it was stopped will not be started when it is started
511 +# back up.
512 +# Valid values are yes or no
513 +
514 +#LIBVIRT_START="yes"
515 +
516 +
517 +# LIBVIRT_IGNORE_AUTOSTART
518 +# If the VM is marked for autostart in its XML configuration then we won't
519 +# save its start when the init script is stopped. The result is that when
520 +# the init script starts back up, no attempt will be made to start the VM or
521 +# confirm it is started.
522 +# Valid values are yes or no
523 +
524 +#LIBVIRT_IGNORE_AUTOSTART="no"
525 +
526 +
527 +# LIBVIRT_NET_SHUTDOWN
528 +# If libvirtd created networks for you (e.g. NATed networks) then this init
529 +# script will shut them down for you if this is set to 'yes'. Otherwise,
530 +# the networks will be left running. For this option to be useful you must
531 +# have enabled the 'virt-network' USE flag and have had libvirt create a
532 +# NATed network for you. Valid values: 'yes' or 'no'
533 +
534 +#LIBVIRT_NET_SHUTDOWN="yes"
535
536 diff --git a/app-emulation/libvirt/files/libvirt-guests.init-r2 b/app-emulation/libvirt/files/libvirt-guests.init-r2
537 new file mode 100644
538 index 0000000..9db6d95
539 --- /dev/null
540 +++ b/app-emulation/libvirt/files/libvirt-guests.init-r2
541 @@ -0,0 +1,235 @@
542 +#!/sbin/openrc-run
543 +
544 +description="Virtual Machine Management (libvirt) Guests"
545 +
546 +depend() {
547 + use libvirtd
548 +}
549 +
550 +# set the default to QEMU
551 +[ -z "${LIBVIRT_URIS}" ] && LIBVIRT_URIS="qemu:///system"
552 +
553 +# default to suspending the VM via managedsave
554 +case "${LIBVIRT_SHUTDOWN}" in
555 + managedsave|shutdown|destroy) ;;
556 + *) LIBVIRT_SHUTDOWN="managedsave" ;;
557 +esac
558 +
559 +# default to 500 seconds
560 +[ -z ${LIBVIRT_MAXWAIT} ] && LIBVIRT_MAXWAIT=500
561 +
562 +gueststatefile="/var/lib/libvirt/libvirt-guests.state"
563 +netstatefile="/var/lib/libvirt/libvirt-net.state"
564 +
565 +do_virsh() {
566 + local hvuri=$1
567 + shift
568 +
569 + # if unset, default to qemu
570 + [ -z ${hvuri} ] && hvuri="qemu:///system"
571 + # if only qemu was supplied then correct the value
572 + [ "xqemu" = x${hvuri} ] && hvuri="qemu:///system"
573 +
574 + # Silence errors because virsh always throws an error about
575 + # not finding the hypervisor version when connecting to libvirtd
576 + # lastly strip the blank line at the end
577 + LC_ALL=C virsh -c ${hvuri} "$@" 2>/dev/null | head -n -1
578 +}
579 +
580 +libvirtd_dom_list() {
581 + # Only work with domains by their UUIDs
582 + local hvuri=$1
583 + shift
584 +
585 + do_virsh "${hvuri}" list --uuid $@
586 +}
587 +
588 +libvirtd_dom_count() {
589 + local hvuri=$1
590 + shift
591 +
592 + libvirtd_dom_list "${hvuri}" $@ | wc -l
593 +}
594 +
595 +libvirtd_net_list() {
596 + # Only work with networks by their UUIDs
597 + local hvuri=$1
598 + shift
599 +
600 + do_virsh "${hvuri}" net-list --uuid $@
601 +}
602 +
603 +libvirtd_net_count() {
604 + local hvuri=$1
605 + shift
606 +
607 + libvirtd_net_list "${hvuri}" $@ | wc -l
608 +}
609 +
610 +libvirtd_dom_stop() {
611 + # stops all persistent or transient domains for a given URI
612 + # $1 - uri
613 + # $2 - persisent/transient
614 +
615 + local uri=$1
616 + local persist=$2
617 + local shutdown_type=${LIBVIRT_SHUTDOWN}
618 + local counter=${LIBVIRT_MAXWAIT}
619 + local dom_name=
620 + local dom_as=
621 + local dom_ids=
622 + local uuid=
623 + local dom_count=
624 +
625 + [ "${persist}" = "--transient" ] && shutdown_type="shutdown"
626 + [ -n "${counter}" ] || counter=500
627 +
628 + einfo " Shutting down domain(s) ..."
629 +
630 + # grab all persistent or transient domains running
631 + dom_ids=$(libvirtd_dom_list ${uri} ${persist})
632 +
633 + for uuid in ${dom_ids}; do
634 + # Get the name
635 + dom_name=$(do_virsh ${uri} domname ${uuid})
636 + einfo " ${dom_name}"
637 + # Get autostart state
638 + dom_as=$(do_virsh ${uri} dominfo ${uuid} | \
639 + awk '$1 == "Autostart:" { print $2 }')
640 +
641 + if [ "${persist}" = "--persistent" ]; then
642 + # Save our running state only if LIBVIRT_IGNORE_AUTOSTART != yes
643 + if [ "x${LIBVIRT_IGNORE_AUTOSTART}" = "xyes" ] && \
644 + [ ${dom_as} = "enabled" ]; then
645 + :
646 + else
647 + echo "${uri} ${uuid}" >> ${gueststatefile}
648 + fi
649 +
650 + fi
651 +
652 + # Now let's stop it
653 + do_virsh "${uri}" ${shutdown_type} ${uuid} > /dev/null
654 +
655 + done
656 +
657 + dom_count="$(libvirtd_dom_count ${uri} ${persist})"
658 + while [ ${dom_count} -gt 0 ] && [ ${counter} -gt 0 ] ; do
659 + dom_count="$(libvirtd_dom_count ${uri} ${persist})"
660 + sleep 1
661 + if [ "${shutdown_type}" = "shutdown" ]; then
662 + counter=$((${counter} - 1))
663 + fi
664 + echo -n "."
665 + done
666 +
667 + if [ "${shutdown_type}" = "shutdown" ]; then
668 + # grab all domains still running
669 + dom_ids=$(libvirtd_dom_list ${uri} ${persist})
670 + for uuid in ${dom_ids}; do
671 + dom_name=$(do_virsh ${uri} domname ${uuid})
672 + eerror " ${dom_name} forcibly stopped"
673 + do_virsh "${uri}" destroy ${uuid} > /dev/null
674 + done
675 + fi
676 +}
677 +
678 +libvirtd_net_stop() {
679 + # stops all persistent or transient domains for a given URI
680 + # $1 - uri
681 + # $2 - persisent/transient
682 +
683 + local uri=$1
684 + local persist=$2
685 + local uuid=
686 + local net_name=
687 +
688 + if [ "${LIBVIRT_NET_SHUTDOWN}" != "no" ]; then
689 +
690 + einfo " Shutting down network(s):"
691 + for uuid in $(libvirtd_net_list ${uri} ${persist}); do
692 + net_name=$(do_virsh ${uri} net-name ${uuid})
693 + einfo " ${net_name}"
694 +
695 + if [ "${persist}" = "--persistent" ]; then
696 + # Save our running state
697 + echo "${uri} ${uuid}" >> ${netstatefile}
698 +
699 + fi
700 +
701 + # Actually stop the network
702 + do_virsh qemu net-destroy ${uuid} > /dev/null
703 + done
704 +
705 + fi
706 +}
707 +
708 +start() {
709 + local uri=
710 + local uuid=
711 + local name=
712 +
713 + for uri in ${LIBVIRT_URIS}; do
714 + do_virsh "${uri}" connect
715 + if [ $? -ne 0 ]; then
716 + eerror "Failed to connect to '${uri}'. Domains may not start."
717 + fi
718 + done
719 +
720 + [ ! -e "${netstatefile}" ] && touch "${netstatefile}"
721 + [ ! -e "${gueststatefile}" ] && touch "${gueststatefile}"
722 +
723 + # if the user didn't want to start any guests up then respect their wish
724 + [ "x${LIBVIRT_START}" = "xno" ] && return 0
725 +
726 + # start networks
727 + ebegin "Starting libvirt networks"
728 + while read -r uri uuid
729 + do
730 + # ignore trash
731 + [ -z "${uri}" ] || [ -z "${uuid}" ] && continue
732 +
733 + name=$(do_virsh "${uri}" net-name ${uuid})
734 + einfo " ${name}"
735 + do_virsh "${uri}" net-start ${uuid} > /dev/null
736 + done <"${netstatefile}"
737 + eend 0
738 +
739 + # start domains
740 + ebegin "Starting libvirt domains"
741 + while read -r uri uuid
742 + do
743 + # ignore trash
744 + [ -z "${uri}" ] || [ -z "${uuid}" ] && continue
745 +
746 + name=$(do_virsh "${uri}" domname ${uuid})
747 + einfo " ${name}"
748 + do_virsh "${uri}" start ${uuid} > /dev/null
749 + done <"${gueststatefile}"
750 + eend 0
751 +}
752 +
753 +stop() {
754 + local counter=
755 + local dom_name=
756 + local net_name=
757 + local dom_ids=
758 + local uuid=
759 + local dom_count=
760 +
761 + rm -f "${gueststatefile}"
762 + [ $? -ne 0 ] && eerror "Unable to save domain state"
763 + rm -f "${netstatefile}"
764 + [ $? -ne 0 ] && eerror "Unable to save net state"
765 +
766 + for uri in ${LIBVIRT_URIS}; do
767 + einfo "Stopping libvirt domains and networks for ${uri}"
768 +
769 + libvirtd_dom_stop "${uri}" "--persistent"
770 + libvirtd_dom_stop "${uri}" "--transient"
771 + libvirtd_net_stop "${uri}" "--persistent"
772 + libvirtd_net_stop "${uri}" "--transient"
773 +
774 + einfo "Done stopping domains and networks for ${uri}"
775 + done
776 +}
777
778 diff --git a/app-emulation/libvirt/files/libvirtd.confd-r5 b/app-emulation/libvirt/files/libvirtd.confd-r5
779 new file mode 100644
780 index 0000000..c326531
781 --- /dev/null
782 +++ b/app-emulation/libvirt/files/libvirtd.confd-r5
783 @@ -0,0 +1,18 @@
784 +# /etc/conf.d/libvirtd
785 +
786 +# Startup dependency
787 +# libvirtd typically requires all networks to be up and settled which
788 +# is what rc_need="net" provides. However if you only use specific networks
789 +# for libvirtd, you may override this. Or if you only use libvirtd locally.
790 +rc_need="net"
791 +
792 +# The termination timeout (start-stop-daemon parameter "retry") ensures
793 +# that the service will be terminated within a given time (25 + 5 seconds
794 +# per default) when you are stopping the service.
795 +#LIBVIRTD_TERMTIMEOUT="TERM/25/KILL/5"
796 +
797 +# LIBVIRTD_OPTS
798 +# You may want to add '--listen' to have libvirtd listen for tcp/ip connections
799 +# if you want to use libvirt for remote control
800 +# Please consult 'libvirtd --help' for more options
801 +#LIBVIRTD_OPTS="--listen"
802
803 diff --git a/app-emulation/libvirt/files/libvirtd.init-r16 b/app-emulation/libvirt/files/libvirtd.init-r16
804 new file mode 100644
805 index 0000000..be660e3
806 --- /dev/null
807 +++ b/app-emulation/libvirt/files/libvirtd.init-r16
808 @@ -0,0 +1,34 @@
809 +#!/sbin/openrc-run
810 +# Copyright 1999-2015 Gentoo Foundation
811 +# Distributed under the terms of the GNU General Public License v2
812 +
813 +description="Virtual Machine Management daemon (libvirt)"
814 +
815 +LIBVIRTD_OPTS=${LIBVIRTD_OPTS:-"${LIBVIRTD_OPTS}"}
816 +LIBVIRTD_TIMEOUT=${LIBVIRTD_TERMTIMEOUT:-"TERM/25/KILL/5"}
817 +
818 +command="/usr/sbin/libvirtd"
819 +command_args="-d ${LIBVIRTD_OPTS}"
820 +start_stop_daemon_args="--env KRB5_KTNAME=/etc/libvirt/krb5.tab"
821 +pidfile="/var/run/libvirtd.pid"
822 +retry="${LIBVIRTD_TERMTIMEOUT}"
823 +
824 +depend() {
825 + need virtlogd
826 + use dbus virtlockd
827 + after ntp-client ntpd nfs nfsmount portmap rpc.statd iptables ip6tables ebtables corosync sanlock cgconfig xenconsoled
828 + USE_FLAG_FIREWALLD
829 + USE_FLAG_AVAHI
830 + USE_FLAG_ISCSI
831 + USE_FLAG_RBD
832 +}
833 +
834 +start_pre() {
835 + # Test configuration directories in /etc/libvirt/ to be either not
836 + # present or a directory, i.e. not a regular file, bug #532892
837 +
838 + checkpath --directory /etc/libvirt/lxc || return 1
839 + checkpath --directory /etc/libvirt/nwfilter || return 1
840 + checkpath --directory /etc/libvirt/qemu || return 1
841 + checkpath --directory /etc/libvirt/storage || return 1
842 +}
843
844 diff --git a/app-emulation/libvirt/files/libvirtd.service.conf b/app-emulation/libvirt/files/libvirtd.service.conf
845 new file mode 100644
846 index 0000000..f087922
847 --- /dev/null
848 +++ b/app-emulation/libvirt/files/libvirtd.service.conf
849 @@ -0,0 +1,10 @@
850 +# Uncomment the following three lines to start libvirtd with the '--listen'
851 +# directive such that it listens for TCP/IP connections (honoring the
852 +# listen_tls and listen_tcp settings in /etc/libvirt/libvirtd.conf). If
853 +# libvirtd is started without the '--listen' parameter, network connection
854 +# (for the daemon) is globally disabled:
855 +
856 +# [Service]
857 +# ExecStart=
858 +# ExecStart=/usr/sbin/libvirtd --listen
859 +
860
861 diff --git a/app-emulation/libvirt/files/libvirtd.tmpfiles.conf b/app-emulation/libvirt/files/libvirtd.tmpfiles.conf
862 new file mode 100644
863 index 0000000..c22c23d
864 --- /dev/null
865 +++ b/app-emulation/libvirt/files/libvirtd.tmpfiles.conf
866 @@ -0,0 +1 @@
867 +d /run/libvirt/lxc 0755 root root -
868
869 diff --git a/app-emulation/libvirt/files/virtlockd.init-r1 b/app-emulation/libvirt/files/virtlockd.init-r1
870 new file mode 100644
871 index 0000000..e7c3db2
872 --- /dev/null
873 +++ b/app-emulation/libvirt/files/virtlockd.init-r1
874 @@ -0,0 +1,23 @@
875 +#!/sbin/openrc-run
876 +# Copyright 1999-2015 Gentoo Foundation
877 +# Distributed under the terms of the GNU General Public License v2
878 +
879 +description="libvirt virtual machine lock manager"
880 +command="/usr/sbin/virtlockd"
881 +command_args="-d"
882 +pidfile="/var/run/virtlockd.pid"
883 +
884 +extra_started_commands="reload"
885 +description_reload="re-exec the daemon, while maintaining locks and clients"
886 +
887 +
888 +depend() {
889 + after ntp-client ntpd nfs nfsmount corosync
890 +}
891 +
892 +reload() {
893 + ebegin "re-exec() virtlockd"
894 +
895 + start-stop-daemon --signal SIGUSR1 \
896 + --exec "${command}" --pidfile "${pidfile}"
897 +}
898
899 diff --git a/app-emulation/libvirt/files/virtlogd.init-r1 b/app-emulation/libvirt/files/virtlogd.init-r1
900 new file mode 100644
901 index 0000000..438070e
902 --- /dev/null
903 +++ b/app-emulation/libvirt/files/virtlogd.init-r1
904 @@ -0,0 +1,23 @@
905 +#!/sbin/openrc-run
906 +# Copyright 1999-2015 Gentoo Foundation
907 +# Distributed under the terms of the GNU General Public License v2
908 +
909 +description="libvirt virtual machine logging manager"
910 +command="/usr/sbin/virtlogd"
911 +command_args="-d"
912 +pidfile="/var/run/virtlogd.pid"
913 +
914 +extra_started_commands="reload"
915 +description_reload="re-exec the daemon, while maintaining open connections"
916 +
917 +
918 +depend() {
919 + after ntp-client ntpd nfs nfsmount corosync
920 +}
921 +
922 +reload() {
923 + ebegin "re-exec() virtlogd"
924 +
925 + start-stop-daemon --signal SIGUSR1 \
926 + --exec "${command}" --pidfile "${pidfile}"
927 +}
928
929 diff --git a/app-emulation/libvirt/libvirt-3.1.0.ebuild b/app-emulation/libvirt/libvirt-3.1.0.ebuild
930 new file mode 100644
931 index 0000000..ce2a70a
932 --- /dev/null
933 +++ b/app-emulation/libvirt/libvirt-3.1.0.ebuild
934 @@ -0,0 +1,384 @@
935 +# Copyright 1999-2017 Gentoo Foundation
936 +# Distributed under the terms of the GNU General Public License v2
937 +
938 +EAPI=6
939 +
940 +inherit autotools eutils flag-o-matic user linux-info systemd readme.gentoo-r1
941 +
942 +if [[ ${PV} = *9999* ]]; then
943 + inherit git-r3
944 + EGIT_REPO_URI="git://libvirt.org/libvirt.git"
945 + SRC_URI=""
946 + KEYWORDS=""
947 + SLOT="0"
948 +else
949 + # Versions with 4 numbers are stable updates:
950 + if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then
951 + SRC_URI="http://libvirt.org/sources/stable_updates/${P}.tar.xz"
952 + else
953 + SRC_URI="http://libvirt.org/sources/${P}.tar.xz"
954 + fi
955 + KEYWORDS="~amd64 ~x86"
956 + SLOT="0/${PV}"
957 +fi
958 +
959 +DESCRIPTION="C toolkit to manipulate virtual machines"
960 +HOMEPAGE="http://www.libvirt.org/"
961 +LICENSE="LGPL-2.1"
962 +IUSE="
963 + apparmor audit +caps +dbus firewalld fuse glusterfs iscsi +libvirtd lvm
964 + libssh lxc +macvtap nfs nls numa openvz parted pcap phyp policykit
965 + +qemu rbd sasl selinux +udev uml +vepa virtualbox virt-network
966 + wireshark-plugins xen zeroconf zfs elibc_glibc
967 +"
968 +
969 +REQUIRED_USE="
970 + firewalld? ( virt-network )
971 + libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) )
972 + lxc? ( caps libvirtd )
973 + openvz? ( libvirtd )
974 + policykit? ( dbus )
975 + qemu? ( libvirtd )
976 + uml? ( libvirtd )
977 + vepa? ( macvtap )
978 + virt-network? ( libvirtd )
979 + virtualbox? ( libvirtd )
980 + xen? ( libvirtd )"
981 +
982 +# gettext.sh command is used by the libvirt command wrappers, and it's
983 +# non-optional, so put it into RDEPEND.
984 +# We can use both libnl:1.1 and libnl:3, but if you have both installed, the
985 +# package will use 3 by default. Since we don't have slot pinning in an API,
986 +# we must go with the most recent
987 +RDEPEND="
988 + app-misc/scrub
989 + dev-libs/libgcrypt:0
990 + dev-libs/libnl:3
991 + >=dev-libs/libxml2-2.7.6
992 + || ( >=net-analyzer/netcat6-1.0-r2 >=net-analyzer/openbsd-netcat-1.105-r1 )
993 + >=net-libs/gnutls-1.0.25:0=
994 + net-libs/libssh2
995 + >=net-misc/curl-7.18.0
996 + sys-apps/dmidecode
997 + >=sys-apps/util-linux-2.17
998 + sys-devel/gettext
999 + sys-libs/ncurses:0=
1000 + sys-libs/readline:=
1001 + apparmor? ( sys-libs/libapparmor )
1002 + audit? ( sys-process/audit )
1003 + caps? ( sys-libs/libcap-ng )
1004 + dbus? ( sys-apps/dbus )
1005 + elibc_glibc? ( sys-libs/glibc[rpc(+)] )
1006 + firewalld? ( net-firewall/firewalld )
1007 + fuse? ( >=sys-fs/fuse-2.8.6 )
1008 + glusterfs? ( >=sys-cluster/glusterfs-3.4.1 )
1009 + iscsi? ( sys-block/open-iscsi )
1010 + libssh? ( net-libs/libssh )
1011 + lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] )
1012 + nfs? ( net-fs/nfs-utils )
1013 + numa? (
1014 + >sys-process/numactl-2.0.2
1015 + sys-process/numad
1016 + )
1017 + openvz? ( sys-kernel/openvz-sources:* )
1018 + parted? (
1019 + >=sys-block/parted-1.8[device-mapper]
1020 + sys-fs/lvm2[-device-mapper-only(-)]
1021 + )
1022 + pcap? ( >=net-libs/libpcap-1.0.0 )
1023 + policykit? ( >=sys-auth/polkit-0.9 )
1024 + qemu? (
1025 + >=app-emulation/qemu-0.13.0
1026 + dev-libs/yajl
1027 + )
1028 + rbd? ( sys-cluster/ceph )
1029 + sasl? ( dev-libs/cyrus-sasl )
1030 + selinux? ( >=sys-libs/libselinux-2.0.85 )
1031 + virt-network? (
1032 + net-dns/dnsmasq[script]
1033 + net-firewall/ebtables
1034 + >=net-firewall/iptables-1.4.10[ipv6]
1035 + net-misc/radvd
1036 + sys-apps/iproute2[-minimal]
1037 + )
1038 + virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) )
1039 + wireshark-plugins? ( net-analyzer/wireshark:= )
1040 + xen? (
1041 + app-emulation/xen
1042 + app-emulation/xen-tools:=
1043 + )
1044 + udev? (
1045 + virtual/udev
1046 + >=x11-libs/libpciaccess-0.10.9
1047 + )
1048 + zeroconf? ( >=net-dns/avahi-0.6[dbus] )
1049 + zfs? ( sys-fs/zfs )"
1050 +
1051 +DEPEND="${RDEPEND}
1052 + app-text/xhtml1
1053 + dev-lang/perl
1054 + dev-libs/libxslt
1055 + dev-perl/XML-XPath
1056 + virtual/pkgconfig"
1057 +
1058 +PATCHES=(
1059 + "${FILESDIR}"/${PN}-1.3.0-do_not_use_sysconf.patch
1060 + "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch
1061 + "${FILESDIR}"/${PN}-3.0.0-fix_paths_for_apparmor.patch
1062 + "${FILESDIR}"/${PN}-1.3.4-glibc-2.23.patch
1063 + "${FILESDIR}"/${PN}-3.1.0-musl-fix-includes.patch # bug #609488
1064 +)
1065 +
1066 +pkg_setup() {
1067 + if use qemu; then
1068 + enewgroup qemu 77
1069 + enewuser qemu 77 -1 -1 "qemu,kvm"
1070 + fi
1071 +
1072 + use policykit && enewgroup libvirt
1073 +
1074 + # Check kernel configuration:
1075 + CONFIG_CHECK=""
1076 + use fuse && CONFIG_CHECK+="
1077 + ~FUSE_FS"
1078 +
1079 + use lvm && CONFIG_CHECK+="
1080 + ~BLK_DEV_DM
1081 + ~DM_MULTIPATH
1082 + ~DM_SNAPSHOT"
1083 +
1084 + use lxc && CONFIG_CHECK+="
1085 + ~BLK_CGROUP
1086 + ~CGROUP_CPUACCT
1087 + ~CGROUP_DEVICE
1088 + ~CGROUP_FREEZER
1089 + ~CGROUP_NET_PRIO
1090 + ~CGROUP_PERF
1091 + ~CGROUPS
1092 + ~CGROUP_SCHED
1093 + ~CPUSETS
1094 + ~IPC_NS
1095 + ~MACVLAN
1096 + ~NAMESPACES
1097 + ~NET_CLS_CGROUP
1098 + ~NET_NS
1099 + ~PID_NS
1100 + ~POSIX_MQUEUE
1101 + ~SECURITYFS
1102 + ~USER_NS
1103 + ~UTS_NS
1104 + ~VETH
1105 + ~!GRKERNSEC_CHROOT_MOUNT
1106 + ~!GRKERNSEC_CHROOT_DOUBLE
1107 + ~!GRKERNSEC_CHROOT_PIVOT
1108 + ~!GRKERNSEC_CHROOT_CHMOD
1109 + ~!GRKERNSEC_CHROOT_CAPS"
1110 +
1111 + kernel_is lt 4 7 && use lxc && CONFIG_CHECK+="
1112 + ~DEVPTS_MULTIPLE_INSTANCES"
1113 +
1114 + use macvtap && CONFIG_CHECK+="
1115 + ~MACVTAP"
1116 +
1117 + use virt-network && CONFIG_CHECK+="
1118 + ~BRIDGE_EBT_MARK_T
1119 + ~BRIDGE_NF_EBTABLES
1120 + ~NETFILTER_ADVANCED
1121 + ~NETFILTER_XT_CONNMARK
1122 + ~NETFILTER_XT_MARK
1123 + ~NETFILTER_XT_TARGET_CHECKSUM"
1124 + # Bandwidth Limiting Support
1125 + use virt-network && CONFIG_CHECK+="
1126 + ~BRIDGE_EBT_T_NAT
1127 + ~NET_ACT_POLICE
1128 + ~NET_CLS_FW
1129 + ~NET_CLS_U32
1130 + ~NET_SCH_HTB
1131 + ~NET_SCH_INGRESS
1132 + ~NET_SCH_SFQ"
1133 +
1134 + # Handle specific kernel versions for different features
1135 + kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR"
1136 + if kernel_is ge 3 6; then
1137 + CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP "
1138 + kernel_is lt 4 5 && CONFIG_CHECK+=" ~MEMCG_KMEM "
1139 + fi
1140 +
1141 + ERROR_USER_NS="Optional depending on LXC configuration."
1142 +
1143 + if [[ -n ${CONFIG_CHECK} ]]; then
1144 + linux-info_pkg_setup
1145 + fi
1146 +}
1147 +
1148 +src_prepare() {
1149 + touch "${S}/.mailmap"
1150 +
1151 + default
1152 +
1153 + append-cflags -I/usr/include/tirpc # Build against libtirpc - build fails otherwise on musl
1154 +
1155 + if [[ ${PV} = *9999* ]]; then
1156 + # git checkouts require bootstrapping to create the configure script.
1157 + # Additionally the submodules must be cloned to the right locations
1158 + # bug #377279
1159 + ./bootstrap || die "bootstrap failed"
1160 + (
1161 + git submodule status | sed 's/^[ +-]//;s/ .*//'
1162 + git hash-object bootstrap.conf
1163 + ) >.git-module-status
1164 + fi
1165 +
1166 + # Tweak the init script:
1167 + cp "${FILESDIR}/libvirtd.init-r16" "${S}/libvirtd.init" || die
1168 + sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \
1169 + -e "s/USE_FLAG_AVAHI/$(usex zeroconf 'use avahi-daemon' '')/" \
1170 + -e "s/USE_FLAG_ISCSI/$(usex iscsi 'use iscsid' '')/" \
1171 + -e "s/USE_FLAG_RBD/$(usex rbd 'use ceph' '')/" \
1172 + -i "${S}/libvirtd.init" || die "sed failed"
1173 +
1174 + eautoreconf
1175 +}
1176 +
1177 +src_configure() {
1178 + local myeconfargs=(
1179 + $(use_with apparmor)
1180 + $(use_with apparmor apparmor-profiles)
1181 + $(use_with audit)
1182 + $(use_with caps capng)
1183 + $(use_with dbus)
1184 + $(use_with firewalld)
1185 + $(use_with fuse)
1186 + $(use_with glusterfs)
1187 + $(use_with glusterfs storage-gluster)
1188 + $(use_with iscsi storage-iscsi)
1189 + $(use_with libvirtd)
1190 + $(use_with libssh)
1191 + $(use_with lvm storage-lvm)
1192 + $(use_with lvm storage-mpath)
1193 + $(use_with lxc)
1194 + $(use_with macvtap)
1195 + $(use_enable nls)
1196 + $(use_with numa numactl)
1197 + $(use_with numa numad)
1198 + $(use_with openvz)
1199 + $(use_with parted storage-disk)
1200 + $(use_with pcap libpcap)
1201 + $(use_with phyp)
1202 + $(use_with policykit polkit)
1203 + $(use_with qemu)
1204 + $(use_with qemu yajl)
1205 + $(use_with rbd storage-rbd)
1206 + $(use_with sasl)
1207 + $(use_with selinux)
1208 + $(use_with udev)
1209 + $(use_with uml)
1210 + $(use_with vepa virtualport)
1211 + $(use_with virt-network network)
1212 + $(use_with wireshark-plugins wireshark-dissector)
1213 + $(use_with xen)
1214 + $(use_with xen xen-inotify)
1215 + $(use_with xen libxl)
1216 + $(use_with zeroconf avahi)
1217 + $(use_with zfs storage-zfs)
1218 +
1219 + --without-hal
1220 + --without-netcf
1221 + --without-sanlock
1222 + --without-xenapi
1223 +
1224 + --with-esx
1225 + --with-init-script=systemd
1226 + --with-qemu-group=$(usex caps qemu root)
1227 + --with-qemu-user=$(usex caps qemu root)
1228 + --with-remote
1229 + --with-storage-fs
1230 + --with-vmware
1231 +
1232 + --disable-static
1233 + --disable-werror
1234 +
1235 + --with-html-subdir=${PF}/html
1236 + --localstatedir=/var
1237 + )
1238 +
1239 + if use virtualbox && has_version app-emulation/virtualbox-ose; then
1240 + myeconfargs+=( --with-vbox=/usr/lib/virtualbox-ose/ )
1241 + else
1242 + myeconfargs+=( $(use_with virtualbox vbox) )
1243 + fi
1244 +
1245 + econf "${myeconfargs[@]}"
1246 +
1247 + if [[ ${PV} = *9999* ]]; then
1248 + # Restore gnulib's config.sub and config.guess
1249 + # bug #377279
1250 + (cd .gnulib && git reset --hard > /dev/null)
1251 + fi
1252 +}
1253 +
1254 +src_test() {
1255 + cd "${BUILD_DIR}"
1256 +
1257 + # remove problematic tests, bug #591416, bug #591418
1258 + sed -i -e 's#commandtest$(EXEEXT) # #' \
1259 + -e 's#virfirewalltest$(EXEEXT) # #' \
1260 + -e 's#nwfilterebiptablestest$(EXEEXT) # #' \
1261 + -e 's#nwfilterxml2firewalltest$(EXEEXT)$##' \
1262 + tests/Makefile
1263 +
1264 + export VIR_TEST_DEBUG=1
1265 + HOME="${T}" emake check || die "tests failed"
1266 +}
1267 +
1268 +src_install() {
1269 + emake DESTDIR="${D}" \
1270 + SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" install
1271 +
1272 + find "${D}" -name '*.la' -delete || die
1273 +
1274 + # Remove bogus, empty directories. They are either not used, or
1275 + # libvirtd is able to create them on demand
1276 + rm -rf "${D}"/etc/sysconfig
1277 + rm -rf "${D}"/var/cache
1278 + rm -rf "${D}"/var/run
1279 + rm -rf "${D}"/var/log
1280 +
1281 + use libvirtd || return 0
1282 + # From here, only libvirtd-related instructions, be warned!
1283 +
1284 + systemd_install_serviced \
1285 + "${FILESDIR}"/libvirtd.service.conf libvirtd.service
1286 +
1287 + systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf
1288 +
1289 + newinitd "${S}/libvirtd.init" libvirtd || die
1290 + newinitd "${FILESDIR}/libvirt-guests.init-r2" libvirt-guests || die
1291 + newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die
1292 + newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd || die
1293 +
1294 + newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die
1295 + newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die
1296 +
1297 + DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r2")
1298 + DISABLE_AUTOFORMATTING=true
1299 + readme.gentoo_create_doc
1300 +}
1301 +
1302 +pkg_preinst() {
1303 + # we only ever want to generate this once
1304 + if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
1305 + rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml
1306 + fi
1307 +}
1308 +
1309 +pkg_postinst() {
1310 + if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
1311 + touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml
1312 + fi
1313 +
1314 + use libvirtd || return 0
1315 + # From here, only libvirtd-related instructions, be warned!
1316 +
1317 + readme.gentoo_print_elog
1318 +}
1319
1320 diff --git a/app-emulation/libvirt/metadata.xml b/app-emulation/libvirt/metadata.xml
1321 new file mode 100644
1322 index 0000000..48462a7
1323 --- /dev/null
1324 +++ b/app-emulation/libvirt/metadata.xml
1325 @@ -0,0 +1,102 @@
1326 +<?xml version="1.0" encoding="UTF-8"?>
1327 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
1328 +<pkgmetadata>
1329 +<maintainer type="person">
1330 + <email>tamiko@g.o</email>
1331 + <name>Matthias Maier</name>
1332 +</maintainer>
1333 +<maintainer type="project">
1334 + <email>virtualization@g.o</email>
1335 + <name>Gentoo Virtualization Project</name>
1336 +</maintainer>
1337 +<use>
1338 + <!-- Pool backend flags -->
1339 + <flag name="iscsi">
1340 + Allow using an iSCSI remote storage server as pool for disk image storage
1341 + </flag>
1342 + <flag name="lvm">
1343 + Allow using the Logical Volume Manager (<pkg>sys-fs/lvm2</pkg>) as pool for disk image
1344 + storage
1345 + </flag>
1346 + <flag name="nfs">
1347 + Allow using Network File System mounts as pool for disk image storage
1348 + </flag>
1349 + <flag name="parted">
1350 + Allow using real disk partitions as pool for disk image storage, using
1351 + <pkg>sys-block/parted</pkg> to create, resize and delete them.
1352 + </flag>
1353 + <flag name="rbd">
1354 + Enable rados block device support via <pkg>sys-cluster/ceph</pkg>
1355 + </flag>
1356 + <!-- Virtualisation backends -->
1357 + <flag name="lxc">
1358 + Support management of Linux Containers virtualisation (<pkg>app-emulation/lxc</pkg>)
1359 + </flag>
1360 + <flag name="openvz">
1361 + Support management of OpenVZ virtualisation (see <pkg>sys-kernel/openvz-sources</pkg>)
1362 + </flag>
1363 + <flag name="uml">
1364 + Support management of User Mode Linux virtualisation
1365 + </flag>
1366 + <flag name="qemu">
1367 + Support management of QEMU virtualisation (<pkg>app-emulation/qemu</pkg>)
1368 + </flag>
1369 + <flag name="xen">
1370 + Support management of Xen virtualisation (<pkg>app-emulation/xen</pkg>)
1371 + </flag>
1372 + <flag name="virtualbox">
1373 + Support management of VirtualBox virtualisation (one of <pkg>app-emulation/virtualbox</pkg> or
1374 + <pkg>app-emulation/virtualbox-bin</pkg>)
1375 + </flag>
1376 + <flag name="phyp">
1377 + Support IBM HMC / IVM hypervisor via PHYP protocol
1378 + </flag>
1379 + <!-- Miscellaneous flags -->
1380 + <flag name="apparmor">Enable AppArmor support</flag>
1381 + <flag name="fuse">Allow LXC to use <pkg>sys-fs/fuse</pkg> for mount
1382 + points</flag>
1383 + <flag name="numa">
1384 + Use NUMA for memory segmenting via <pkg>sys-process/numactl</pkg> and
1385 + <pkg>sys-process/numad</pkg>
1386 + </flag>
1387 + <flag name="libvirtd">
1388 + Builds the libvirtd daemon as well as the client utilities instead of just the client
1389 + utilities
1390 + </flag>
1391 + <flag name="libssh">
1392 + Use <pkg>net-libs/libssh</pkg> to communicate with remote libvirtd hosts,
1393 + for example: qemu+libssh://server/system
1394 + </flag>
1395 + <flag name="pcap">
1396 + Support auto learning IP addreses for routing
1397 + </flag>
1398 + <flag name="macvtap">
1399 + Support for MAC-based TAP (macvlan/macvtap). For networking instead
1400 + of the normal TUN/TAP. It has its advantages and disadvantages.
1401 + macvtap support requires very new kernels and is
1402 + currently evolving. Support for this is experimental at best.
1403 + </flag>
1404 + <flag name="vepa">Virtual Ethernet Port Aggregator (VEPA) / 802.1Qbg
1405 + support. Relies on macvtap support.</flag>
1406 + <flag name="virt-network">
1407 + Enable virtual networking (NAT) support for guests. Includes all
1408 + the dependencies for NATed network mode. Effectively any network
1409 + setup that relies on libvirt to setup and configure network
1410 + interfaces on your host. This can include bridged and routed
1411 + networks ONLY if you are allowing libvirt to create and manage
1412 + the underlying devices for you. In some cases this requires
1413 + enabling the 'netcf' USE flag (currently unavailable).
1414 + </flag>
1415 + <flag name="firewalld">DBus interface to iptables/ebtables allowing
1416 + for better runtime management of your firewall.</flag>
1417 + <flag name="wireshark-plugins">
1418 + Build the <pkg>net-analyzer/wireshark</pkg> plugin for the Libvirt RPC protocol
1419 + </flag>
1420 + <flag name="glusterfs">
1421 + Enable GlusterFS support via <pkg>sys-cluster/glusterfs</pkg>
1422 + </flag>
1423 + <flag name="zfs">
1424 + Enable ZFS backend storage <pkg>sys-fs/zfs</pkg>
1425 + </flag>
1426 +</use>
1427 +</pkgmetadata>