app-emulation/libvirt: removed old ebuilds

This commit is contained in:
Sandino Araico Sanchez 2023-05-02 04:10:41 -06:00
parent bb03aab37f
commit bc9bcbbfff
20 changed files with 0 additions and 2533 deletions

View file

@ -1,27 +0,0 @@
AUX README.gentoo-r3 2062 BLAKE2B bf45e0f63182dbff31982581045389c5510d5c3e648de34982ea9861923833a024681072ecf4f76b2ca025da30ed4a5a0f1273c85b4c0beb08189f80ce54de3e SHA512 6c54bd70a8521fcfe7eb21df87466c1df0026c569700f3d1b14c76cef4c1e68a56aa13d66b5214ae35a4c24bca58350d07d3e54ca3204ad336be618f51b00984
AUX libvirt-6.0.0-fix_paths_in_libvirt-guests_sh.patch 1281 BLAKE2B 631f813ad29db29a6eb537ecd7b9d12aed097c5e0e01c07161adac1dec8a6f129bc098172fe6de4e78a2fbe5e67052005a7c5d1d17cbbb63ad27025662b9fa34 SHA512 dc80c9fc459207dd1ff77548054ea5a51c41a2d36e1b8917eca5f69293a86168af3da47466d8ff954a8b2e0ead9f28ed7d6c2c3671cf67d0ebb4039003a0dde2
AUX libvirt-6.7.0-do-not-use-sysconfig.patch 5001 BLAKE2B 65e6dfacc598ba771fccc1c45c504aadcc83d0d8df211e70721dd0d7e3653c2c4d44a892ece19ee7e22d95552950e21f9d9e0a4ff960d66ebd2f9999c4cd52d1 SHA512 7dd3e4cf03dd8351a644a1669be70fcc6397b27983c0ec7b716dde61c92cf7dc9c46fc841cead5ae616897d9ed60209b03d5d78a4247215f4e79d11282da91ad
AUX libvirt-6.7.0-fix-paths-for-apparmor.patch 1974 BLAKE2B b5e9a151aa6bfbccf76ef0d6638b00cfbc3f8c4d5a722ba83699d29a32ef2f9a7d9eb678c1f61a128b0fee958a3349a4b843be08cec940f7d1e22757bc66bb95 SHA512 f81627e9c3d6c117e76a7a30af162a8ff8fafa191313155ceecf39bae2c457417152a0380d06cd3a4958b52a6ba410730cf66cd912072f7ec951b507c0a83f96
AUX libvirt-8.1.0-docs-Fix-template-matching-in-page.xsl.patch 2214 BLAKE2B f36e1e3fecb846834d09699a914e1e79afd8f283cdef1ce1085574d1ec5b573075af26854be2e3002db49aad87d005995606bc1cb501476209ed6eba5c514928 SHA512 24f49141cfe21eee27bc9cd4c3766bca4dec10afb8e2249198e083f5f3980d157c84aa59816f448993bf6ed30d4fe2795714adf16066e8fd185df87f363a18d8
AUX libvirt-8.2.0-do-not-use-sysconfig.patch 8420 BLAKE2B 37856003bc58b69531be6b55fcc3304b71558b7a5306c2da3fbad2d5eac006ca3ebb54bd56f8e761363311a5c865d2cd072c418794fcb605562fc32f997c88a9 SHA512 84a693b870aebe0f87f518473d28d97e613b6069f497e6e49c3e8feffc96c2e709d0a7a3530c52d4d034c6b0bc7374ab61f40ddd2f071735c5baacdebcfca8b6
AUX libvirt-8.2.0-fix-paths-for-apparmor.patch 3006 BLAKE2B 641c8942d28b8f3050f67809f332b76acb9d46ccfba30387603a7f3a60f80162a290b0b3ba3dac51c488ba14ac457ecc49526e98251380eb1fd3aaf293f444c2 SHA512 1b267df41892dcf5791720a9e7cd819b65024eaa3469d7b9496b86fc67d89d90dcebddcb5baf627fdde3277400fbc6611d056267a0aa4baa4083da3f532679ec
AUX libvirt-guests.confd 2430 BLAKE2B 9d56477c9377e02503782e6d653579c6d149b292c43f37926f4646374e8aae05ca812b6a3a561811482861f8fe67dfdbe63851963326ddbbf2f4644c85411120 SHA512 78f419a89de7aabaad860903c24f1c070786fc1296d987e61dd537705b0e7f71a46c315888028f3826c3417e42861ca8471788be4ec5695e98427c5f18ae63fc
AUX libvirt-guests.init-r4 5591 BLAKE2B e745692a7ea706c8367cdb7ee2114565770bda5be5675ba3a541555659d17875f7996ff7028bf415224d095b49b71205a3d77f420464d5579ccc189def5e434d SHA512 ec2bc46d72afa61513983b777e2d49da618a35a4687bc75674b3a49ababd4e2e387661010d342fee86c7a73d259644985a263a6c2976e29a436d88921bb040b0
AUX libvirtd.confd-r5 740 BLAKE2B 74a069f4902dd1352f06029c886200615a35870ff88496c91956d23a3172db0789086622422f545498e92b7f8de41225022185fe291dd580cbacdeb783163f4b SHA512 98f935589dbc5f2a99329f77fdf84c563fa0dc99404b7476603679478d68ce8dbea2c88645251d3c28f59e7bcae124ae632972146e8a8c3e0e9fcbfb27296f91
AUX libvirtd.init-r19 1114 BLAKE2B a69f5a07e0b946a3167ac4509611d08a8b848e7337677cce36f0eff8e2f646fb03d92279eb3c4427b25649210c8acf280cb9877e0c5c363f1f358b211b208d9d SHA512 6192888e5dbf384cfecab2c1e55fb9a2ceba83390aa71cd8c0be0526a7cc3f9c2a9d7a71d4fe6bbb528871e8e7bc5c73e385ef56eec2366bcc75eb361e7d1894
AUX libvirtd.tmpfiles.conf 36 BLAKE2B fa0e1dac4117dcb2a2e826c82c4c63e20156db47abf4088167484f1f3149a4998840cf1aba745621851d7e2653df5c7f7268d8d61be3a3731ea053a88f35c13b SHA512 2b1c3c64dd6fa03d8c2ae24e7ce4aa7d754913214542a68a4e99f10fbc251fd23ee26e297a957d7b4b70eec8ef028c41fc915da3a85fbbd16143bb92d1de3aed
AUX virtlockd.init-r2 573 BLAKE2B 83bbd228bd59fa29f1d974bc5eec8af0b701328a0a64bbb9e2d9cb918d5d0b3c0d5e791afa18f47ffa2c429082083912fda3f2401c3c5b3d8d85ea8b7cacf440 SHA512 11bf7208e8da8cf7b907049100d095f4d6b5d215a0955fa620e50d6d541d3ecd9d779a7903c64feb25d17545c45491d52441e14a04f2c793f3b03dee7784c482
AUX virtlogd.init-r2 572 BLAKE2B e6a86e34eda78fc032df17e1bd94095e357770f4036e19fff895266b58df7e31774f6004fec56fad9e69bf7d1afa5d898bdebe018013877f8844d05b3a46d509 SHA512 d5d83edee8a4bdf0dac79abc129ff7ec11573aa580e32963d7c7d47133e276a4427d8653683fc8b0a6c1c2aba631e5875c73454d6fef3bcac6dcaca542e69f34
DIST libvirt-7.7.0.tar.xz 8670212 BLAKE2B 93c72117941b0a74484c7510c8437054e66fc3ad20c02cead3ce917a38868da2acff9b1e70bbb823122ba647763a3682aaa0da04d82fa75e1acc67449301ae8c SHA512 a0d585c9ac46be08d2865d66456d681b7233291d17f6e0ed2564d0f29dc38ea7afc846ab382f58a193d3cd9acaf25fcc526feb3c98e12a6b4b8ae5aa4aec2f3e
DIST libvirt-7.7.0.tar.xz.asc 833 BLAKE2B 86a77bf461e353776d79f31f1d0c82fa13e28348bd9c6ae7cb653b98886c7e070d67ed0db55f5e1f3b5e5bd2a3861a5cb08dbf95799b14df1037139f8001b030 SHA512 d5f8cd6accd3bfaebfb7c8761e321aaa9a090c7705256785c5507aa88d985f78a788047dc881f37ea6f64a4634c65c9718d8b1ee0a24744acc3ad5ed6e517bdf
DIST libvirt-8.2.0.tar.xz 8871236 BLAKE2B 85c4fd7323f4ea0564e6fcb37dffe643d0ff54f228a695476c1b24c78022402a86cf967503e40fad003d82528f24a02bef79466e38c133c5ad37cbcd5783f01d SHA512 fbdc2953e86117643aafb3198a3d9327188d94abfd155eae4439ee0e722737a57ee44dbb2929746c0a28e10e275c35f4a8190e99668e4cba4025555358591544
DIST libvirt-8.2.0.tar.xz.asc 833 BLAKE2B 3dba2fe7dc76052307ab8b1d7f2a61445759ed15e130615ca2a6325e981ae5c1a7143e7d78ee67f2bf9001cdf82126dff89f4f1eb3b39b77620721a5b75f4cfa SHA512 33ecc465da1b7e4b53733611255d01414f8c1081c96fdcb0a9f1a0e194823872b7f9f9032938527f6d1d8bbebc3b61f2dc393875b8d11fdd47bec40e9408475b
DIST libvirt-8.4.0.tar.xz 8846528 BLAKE2B 479d7d47a9d711e0240da09eb295f1a644bc4cfddbe544908f2011eb45dff9cf9ffdfff87ba63ded96f5b69024c65832326f9fb0837c5338114ad5dbbada7af1 SHA512 e9dcaa489f162e3a26fe1ca7bb83a22e3f1952594c3541ddd2a7f8e8a0e6ad37e193fb89421df1efe3d2a4d9bb7cf5455c7b7a0b59e133eb6c0ff3cbbd8403b6
DIST libvirt-8.4.0.tar.xz.asc 833 BLAKE2B 7bfbfc05ce7d95018c07e92d475bc0fddbb0b396132c12defd0205638d22534ba83fea8180345635b9f59b8a10fd3177b1a84ad748f1ddb9e533e11700bd4cbd SHA512 5d85ce4764dc36d940033c5feda59b9cff64844a52e3a25b1b8d0278adbc2378978a7dbe6f577f82bc760d617edc75c4a6ab8e1325a38847e1d40e3bf7c9684b
DIST libvirt-8.7.0.tar.xz 8937316 BLAKE2B 131d46206662627e952b6daa3ceeab187321ff5fb1984980bc2816dfedf730c6ccd4b5a1cbfb46f33cc9e84508621e2625fa661f06b9e35561e8de52906824e5 SHA512 35d33d0e0dab525e8f0a8a592d286e9d17fc5c5d1ff2fab5af5c40b85248481dd17b5c3daf64e8c6e1b8a93328eebee6ece3e95edacff208a81d8b78dc102d7a
DIST libvirt-8.7.0.tar.xz.asc 833 BLAKE2B ebea1430670bcb44e9ffb4460388b2ab41e8b409d1513d09ac56b12f379621f5ad39af0dba9691b36220bbed5634ad24b2efda8315b41bb2e7f3f6a65e9b028c SHA512 5ac09b10de74283c474fb80cfe600a171d6b49039df73113702cda565889f6c6919e99aff6ce60538ee7fda52287ef035ee15e8f47e5f724384c6ec474e6bed8
EBUILD libvirt-7.7.0-r102.ebuild 8777 BLAKE2B c7b1ccac569aac29d5b52c36e455caa850aef62f4fe93979b1fd9e2b893dd0cc7b30632d9b1a192560e5be193c65e16a4cb06f898702810b3a8a32e08838214f SHA512 b348bc56c5aebad3de0018a4b92a3f1cd322bf441d936a8b592eaac9944d2b22060701af2158f852d1eed94e995ed32f5dd5ce954027e328d52fae48ab3a0afb
EBUILD libvirt-8.2.0-r100.ebuild 8840 BLAKE2B 015f9a30dd0e06a7f1cf16ef0c0cf36cdc2a673d5ac07bd5f145981c214e80e88ee280f57f0a48d94cffdec2ad399a5b5edaafcc9c93b3c79f586b23b2a67b4d SHA512 e7e4c273230e04775e13730eb92fbbaffcf83f560598b34493feb75f535d131019df04bef0422457d1389f3f677e9c54c8b9aad121a15d66e8b0bd522a76f07f
EBUILD libvirt-8.4.0-r100.ebuild 8971 BLAKE2B 74a1f124a3013e13a8138de20b1be37f524911847c571be90d54cb0635e3fe031746d677491b6bea3f313d44c663cb308b540b81b4e7804dc8e1e5f2b1cb089d SHA512 dffe807b6c0abf44c14088f5f66cbfefe7a6abf9314eb75441ecb9b21b88308fb06323ee23754c21a868ef225ffe2baad2acae4b451bdd9fc9d3d948731fc778
EBUILD libvirt-8.7.0-r100.ebuild 8953 BLAKE2B a927c7c89252672ccb993d158dc9badd5f2638313fe7f9a51059c601db5bd6a1f4c9d6a8f3f3e1172fdcaff01f21ff4cd2c470615e1ad223275f893c40152691 SHA512 9042af159fe2a6f2fd8f5a03118fde41df131bb98ecffe3227e1de19bb51f94ae8e25c034952bf69ffc85d78247ba740f3c76a0469429847968de5cacfc1a203
MISC metadata.xml 3328 BLAKE2B e7fa41cec946e6bb6888e335b463719b82a0ee9fe320eb48c03d400812d11c18ac94e9332f895c504563ad36dbb561e8ad165332433c02df6aef68957ea282f1 SHA512 1d68aaf6ea120da3407cf287f4cf6bc3eb091a155c78b4d6a731232e6f4d18238dfdbf1d7c4134a5641a3ee5f8ebaf3541b7a992ea61e5c1512dc7135a5bb02d

View file

@ -1,58 +0,0 @@
Important: The openrc libvirtd init script is now broken up into two
separate services: libvirtd, that solely handles the daemon, and
libvirt-guests, that takes care of clients during shutdown/restart of the
host. In order to reenable client handling, edit /etc/conf.d/libvirt-guests
and enable the service and start it:
$ rc-update add libvirt-guests
$ service libvirt-guests start
For the basic networking support (bridged and routed networks) you don't
need any extra software. For more complex network modes including but not
limited to NATed network, you can enable the 'virt-network' USE flag. It
will pull in required runtime dependencies
If you are using dnsmasq on your system, you will have to configure
/etc/dnsmasq.conf to enable the following settings:
bind-interfaces
interface or except-interface
Otherwise you might have issues with your existing DNS server.
For openrc users:
Please use /etc/conf.d/libvirtd to control the '--listen' parameter for
libvirtd.
Use /etc/init.d/libvirt-guests to manage clients on restart/shutdown of
the host. The default configuration will suspend and resume running kvm
guests with 'managedsave'. This behavior can be changed under
/etc/conf.d/libvirt-guests
For systemd users:
The '--listen' parameter is unavailable when libvirtd is run as a
systemd unit.
The configuration for the 'libvirt-guests.service' is found under
/etc/libvirt/libvirt-guests.conf"
If you have built libvirt with policykit support, a new group "libvirt" has
been created. Simply add a user to the libvirt group in order to grant
administrative access to libvirtd. Alternatively, drop a custom policykit
rule into /etc/polkit-1/rules.d.
If you have built libvirt without policykit support (USE=-policykit), you
must change the unix sock group and/or perms in /etc/libvirt/libvirtd.conf
in order to allow normal users to connect to libvirtd.
If libvirt is built with USE=caps, libvirt will now start qemu/kvm VMs
with non-root privileges. Ensure any resources your VMs use are accessible
by qemu:qemu.

View file

@ -1,35 +0,0 @@
From e97700d867ffa949c97f8a635a76b9ce510e806f Mon Sep 17 00:00:00 2001
Message-Id: <e97700d867ffa949c97f8a635a76b9ce510e806f.1580460243.git.mprivozn@redhat.com>
In-Reply-To: <5965f20fe0275b324c9b84ab7f48dd7db0494495.1580460243.git.mprivozn@redhat.com>
References: <5965f20fe0275b324c9b84ab7f48dd7db0494495.1580460243.git.mprivozn@redhat.com>
From: Michal Privoznik <mprivozn@redhat.com>
Date: Fri, 31 Jan 2020 09:42:14 +0100
Subject: [PATCH 2/3] Fix paths in libvirt-guests.sh.in
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
tools/libvirt-guests.sh.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/libvirt-guests.sh.in b/tools/libvirt-guests.sh.in
index a881f6266e..79d38b3e9a 100644
--- a/tools/libvirt-guests.sh.in
+++ b/tools/libvirt-guests.sh.in
@@ -39,11 +39,11 @@ START_DELAY=0
BYPASS_CACHE=0
SYNC_TIME=0
-test -f "$sysconfdir"/sysconfig/libvirt-guests &&
- . "$sysconfdir"/sysconfig/libvirt-guests
+test -f "$sysconfdir"/libvirt/libvirt-guests.conf &&
+ . "$sysconfdir"/libvirt/libvirt-guests.conf
LISTFILE="$localstatedir"/lib/libvirt/libvirt-guests
-VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests
+VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/libvirt-guests
RETVAL=0
--
2.24.1

View file

@ -1,169 +0,0 @@
--- a/src/interface/virtinterfaced.service.in
+++ b/src/interface/virtinterfaced.service.in
@@ -13,7 +13,6 @@
[Service]
Type=notify
-EnvironmentFile=-@sysconfdir@/sysconfig/virtinterfaced
ExecStart=@sbindir@/virtinterfaced $VIRTINTERFACED_ARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
--- a/src/libxl/virtxend.service.in
+++ b/src/libxl/virtxend.service.in
@@ -17,7 +17,6 @@
[Service]
Type=notify
-EnvironmentFile=-@sysconfdir@/sysconfig/virtxend
ExecStart=@sbindir@/virtxend $VIRTXEND_ARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
--- a/src/locking/virtlockd.service.in
+++ b/src/locking/virtlockd.service.in
@@ -7,8 +7,7 @@
Documentation=https://libvirt.org
[Service]
-EnvironmentFile=-@sysconfdir@/sysconfig/virtlockd
-ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS
+ExecStart=@sbindir@/virtlockd
ExecReload=/bin/kill -USR1 $MAINPID
# Loosing the locks is a really bad thing that will
# cause the machine to be fenced (rebooted), so make
--- a/src/logging/virtlogd.service.in
+++ b/src/logging/virtlogd.service.in
@@ -7,8 +7,7 @@
Documentation=https://libvirt.org
[Service]
-EnvironmentFile=-@sysconfdir@/sysconfig/virtlogd
-ExecStart=@sbindir@/virtlogd $VIRTLOGD_ARGS
+ExecStart=@sbindir@/virtlogd
ExecReload=/bin/kill -USR1 $MAINPID
# Loosing the logs is a really bad thing that will
# cause the machine to be fenced (rebooted), so make
--- a/src/lxc/virtlxcd.service.in
+++ b/src/lxc/virtlxcd.service.in
@@ -18,7 +18,6 @@
[Service]
Type=notify
-EnvironmentFile=-@sysconfdir@/sysconfig/virtlxcd
ExecStart=@sbindir@/virtlxcd $VIRTLXCD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
--- a/src/network/virtnetworkd.service.in
+++ b/src/network/virtnetworkd.service.in
@@ -16,7 +16,6 @@
[Service]
Type=notify
-EnvironmentFile=-@sysconfdir@/sysconfig/virtnetworkd
ExecStart=@sbindir@/virtnetworkd $VIRTNETWORKD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
--- a/src/node_device/virtnodedevd.service.in
+++ b/src/node_device/virtnodedevd.service.in
@@ -13,7 +13,6 @@
[Service]
Type=notify
-EnvironmentFile=-@sysconfdir@/sysconfig/virtnodedevd
ExecStart=@sbindir@/virtnodedevd $VIRTNODEDEVD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
--- a/src/nwfilter/virtnwfilterd.service.in
+++ b/src/nwfilter/virtnwfilterd.service.in
@@ -13,7 +13,6 @@
[Service]
Type=notify
-EnvironmentFile=-@sysconfdir@/sysconfig/virtnwfilterd
ExecStart=@sbindir@/virtnwfilterd $VIRTNWFILTERD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
--- a/src/qemu/virtqemud.service.in
+++ b/src/qemu/virtqemud.service.in
@@ -18,7 +18,6 @@
[Service]
Type=notify
-EnvironmentFile=-@sysconfdir@/sysconfig/virtqemud
ExecStart=@sbindir@/virtqemud $VIRTQEMUD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
--- a/src/remote/libvirtd.service.in
+++ b/src/remote/libvirtd.service.in
@@ -28,8 +28,7 @@
[Service]
Type=notify
-EnvironmentFile=-@sysconfdir@/sysconfig/libvirtd
-ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
+ExecStart=@sbindir@/libvirtd
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
--- a/src/remote/virtproxyd.service.in
+++ b/src/remote/virtproxyd.service.in
@@ -13,7 +13,6 @@
[Service]
Type=notify
-EnvironmentFile=-@sysconfdir@/sysconfig/virtproxyd
ExecStart=@sbindir@/virtproxyd $VIRTPROXYD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
--- a/src/secret/virtsecretd.service.in
+++ b/src/secret/virtsecretd.service.in
@@ -13,7 +13,6 @@
[Service]
Type=notify
-EnvironmentFile=-@sysconfdir@/sysconfig/virtsecretd
ExecStart=@sbindir@/virtsecretd $VIRTSECRETD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
--- a/src/storage/virtstoraged.service.in
+++ b/src/storage/virtstoraged.service.in
@@ -15,7 +15,6 @@
[Service]
Type=notify
-EnvironmentFile=-@sysconfdir@/sysconfig/virtstoraged
ExecStart=@sbindir@/virtstoraged $VIRTSTORAGED_ARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
--- a/src/vbox/virtvboxd.service.in
+++ b/src/vbox/virtvboxd.service.in
@@ -14,7 +14,6 @@
[Service]
Type=notify
-EnvironmentFile=-@sysconfdir@/sysconfig/virtvboxd
ExecStart=@sbindir@/virtvboxd $VIRTVBOXD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
--- a/tools/libvirt-guests.service.in
+++ b/tools/libvirt-guests.service.in
@@ -10,7 +10,7 @@
Documentation=https://libvirt.org
[Service]
-EnvironmentFile=-@sysconfdir@/sysconfig/libvirt-guests
+EnvironmentFile=-/etc/libvirt/libvirt-guests.conf
# Hack just call traditional service until we factor
# out the code
ExecStart=@libexecdir@/libvirt-guests.sh start
--- a/tools/libvirt-guests.sysconf
+++ b/tools/libvirt-guests.sysconf
@@ -1,3 +1,9 @@
+#
+# Warning: This configuration file is only sourced by the systemd
+# libvirt-guests.service unit. The coresponding openrc facility is in
+# /etc/init.d/libvirtd and /etc/conf.d/libvirtd
+#
+
# Customizations for the libvirt-guests.service systemd unit
# URIs to check for running guests

View file

@ -1,51 +0,0 @@
diff --git a/src/security/apparmor/libvirt-qemu b/src/security/apparmor/libvirt-qemu
index 80986ae..d550d8c 100644
--- a/src/security/apparmor/libvirt-qemu
+++ b/src/security/apparmor/libvirt-qemu
@@ -88,6 +88,7 @@
/usr/share/sgabios/** r,
/usr/share/slof/** r,
/usr/share/vgabios/** r,
+ /usr/share/seavgabios/** r,
# pki for libvirt-vnc and libvirt-spice (LP: #901272, #1690140)
/etc/pki/CA/ r,
--- a/src/security/apparmor/meson.build 2020-10-06 17:45:18.590000000 +0100
+++ b/src/security/apparmor/meson.build 2020-10-06 17:45:07.044000000 +0100
@@ -1,5 +1,5 @@
apparmor_gen_profiles = [
- 'usr.lib.libvirt.virt-aa-helper',
+ 'usr.libexec.libvirt.virt-aa-helper',
'usr.sbin.libvirtd',
]
@@ -32,7 +32,7 @@ install_data(
)
install_data(
- 'usr.lib.libvirt.virt-aa-helper.local',
+ 'usr.libexec.libvirt.virt-aa-helper.local',
install_dir: apparmor_dir / 'local',
- rename: 'usr.lib.libvirt.virt-aa-helper',
+ rename: 'usr.libexec.libvirt.virt-aa-helper',
)
diff --git a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in b/src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.in
similarity index 97%
rename from src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in
rename to src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.in
index dd18c8a..d06f9cb 100644
--- a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in
+++ b/src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.in
@@ -69,5 +69,5 @@ profile virt-aa-helper @libexecdir@/virt-aa-helper {
/**.[iI][sS][oO] r,
/**/disk{,.*} r,
- #include <local/usr.lib.libvirt.virt-aa-helper>
+ #include <local/usr.libexec.libvirt.virt-aa-helper>
}
diff --git a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.local b/src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.local
similarity index 100%
rename from src/security/apparmor/usr.lib.libvirt.virt-aa-helper.local
rename to src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.local

View file

@ -1,62 +0,0 @@
From 54814c87f3706cc8eb894634ebef0f9cf7dabae6 Mon Sep 17 00:00:00 2001
Message-Id: <54814c87f3706cc8eb894634ebef0f9cf7dabae6.1645458252.git.mprivozn@redhat.com>
From: Martin Kletzander <mkletzan@redhat.com>
Date: Mon, 21 Feb 2022 09:26:13 +0100
Subject: [PATCH] docs: Fix template matching in page.xsl
Our last default template had a match of "node()" which incidentally matched
everything, including text nodes. Since this has the same priority according to
the XSLT spec, section 5.5:
https://www.w3.org/TR/1999/REC-xslt-19991116#conflict
this is an error. Also according to the same spec section, the XSLT processor
may signal the error or pick the last rule.
This was uncovered with libxslt 1.1.35 which contains the following commit:
https://gitlab.gnome.org/GNOME/libxslt/-/commit/b0074eeca3c6b21b4da14fdf712b853900c51635
which makes the build fail with:
runtime error: file ../docs/page.xsl line 223 element element
xsl:element: The effective name '' is not a valid QName.
because our last rule also matches text nodes and we are trying to extract the
node name out of them.
To fix this we change the match to "*" which only matches elements and not all
the nodes, and to avoid any possible errors with different XSLT processors we
also bump the priority of the match="text()" rule a little higher, just in case
someone needs to use an XSLT processor that chooses signalling the error instead
of the optional recovery.
https://bugs.gentoo.org/833586
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
docs/page.xsl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/page.xsl b/docs/page.xsl
index fd67918d3b..72a6fa0842 100644
--- a/docs/page.xsl
+++ b/docs/page.xsl
@@ -215,11 +215,11 @@
</xsl:element>
</xsl:template>
- <xsl:template match="text()" mode="copy">
+ <xsl:template match="text()" mode="copy" priority="0">
<xsl:value-of select="."/>
</xsl:template>
- <xsl:template match="node()" mode="copy">
+ <xsl:template match="*" mode="copy">
<xsl:element name="{name()}">
<xsl:copy-of select="./@*"/>
<xsl:apply-templates mode="copy" />
--
2.34.1

View file

@ -1,211 +0,0 @@
From 10d65f10a76c7478c4ec0c65ffeec7f4b18929f9 Mon Sep 17 00:00:00 2001
Message-Id: <10d65f10a76c7478c4ec0c65ffeec7f4b18929f9.1646212419.git.mprivozn@redhat.com>
From: Michal Privoznik <mprivozn@redhat.com>
Date: Wed, 2 Mar 2022 10:01:04 +0100
Subject: [PATCH] libvirt-8.2.0-do-not-use-sysconfig.patch
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
src/interface/virtinterfaced.service.in | 1 -
src/libxl/virtxend.service.in | 1 -
src/locking/virtlockd.service.in | 1 -
src/logging/virtlogd.service.in | 3 +--
src/lxc/virtlxcd.service.in | 1 -
src/network/virtnetworkd.service.in | 1 -
src/node_device/virtnodedevd.service.in | 1 -
src/nwfilter/virtnwfilterd.service.in | 1 -
src/qemu/virtqemud.service.in | 1 -
src/remote/libvirtd.service.in | 1 -
src/remote/virtproxyd.service.in | 1 -
src/secret/virtsecretd.service.in | 1 -
src/storage/virtstoraged.service.in | 1 -
src/vbox/virtvboxd.service.in | 1 -
tools/libvirt-guests.service.in | 2 +-
15 files changed, 2 insertions(+), 16 deletions(-)
diff --git a/src/interface/virtinterfaced.service.in b/src/interface/virtinterfaced.service.in
index cb860ff1c4..090b198ac7 100644
--- a/src/interface/virtinterfaced.service.in
+++ b/src/interface/virtinterfaced.service.in
@@ -14,7 +14,6 @@ Documentation=https://libvirt.org
[Service]
Type=notify
Environment=VIRTINTERFACED_ARGS="--timeout 120"
-EnvironmentFile=-@sysconfdir@/sysconfig/virtinterfaced
ExecStart=@sbindir@/virtinterfaced $VIRTINTERFACED_ARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
diff --git a/src/libxl/virtxend.service.in b/src/libxl/virtxend.service.in
index 6b083c414f..597f5d1905 100644
--- a/src/libxl/virtxend.service.in
+++ b/src/libxl/virtxend.service.in
@@ -19,7 +19,6 @@ ConditionPathExists=/proc/xen/capabilities
[Service]
Type=notify
Environment=VIRTXEND_ARGS="--timeout 120"
-EnvironmentFile=-@sysconfdir@/sysconfig/virtxend
ExecStart=@sbindir@/virtxend $VIRTXEND_ARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in
index 19271d1e7d..87193952cb 100644
--- a/src/locking/virtlockd.service.in
+++ b/src/locking/virtlockd.service.in
@@ -8,7 +8,6 @@ Documentation=https://libvirt.org
[Service]
Environment=VIRTLOCKD_ARGS=
-EnvironmentFile=-@sysconfdir@/sysconfig/virtlockd
ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS
ExecReload=/bin/kill -USR1 $MAINPID
# Losing the locks is a really bad thing that will
diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in
index 8ab5478517..fe5c58b8ed 100644
--- a/src/logging/virtlogd.service.in
+++ b/src/logging/virtlogd.service.in
@@ -7,8 +7,7 @@ Documentation=man:virtlogd(8)
Documentation=https://libvirt.org
[Service]
-EnvironmentFile=-@sysconfdir@/sysconfig/virtlogd
-ExecStart=@sbindir@/virtlogd $VIRTLOGD_ARGS
+ExecStart=@sbindir@/virtlogd
ExecReload=/bin/kill -USR1 $MAINPID
# Losing the logs is a really bad thing that will
# cause the machine to be fenced (rebooted), so make
diff --git a/src/lxc/virtlxcd.service.in b/src/lxc/virtlxcd.service.in
index 334c34db44..1b9689017e 100644
--- a/src/lxc/virtlxcd.service.in
+++ b/src/lxc/virtlxcd.service.in
@@ -19,7 +19,6 @@ Documentation=https://libvirt.org
[Service]
Type=notify
Environment=VIRTLXCD_ARGS="--timeout 120"
-EnvironmentFile=-@sysconfdir@/sysconfig/virtlxcd
ExecStart=@sbindir@/virtlxcd $VIRTLXCD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
diff --git a/src/network/virtnetworkd.service.in b/src/network/virtnetworkd.service.in
index 05ce672b73..ee4cd9bca1 100644
--- a/src/network/virtnetworkd.service.in
+++ b/src/network/virtnetworkd.service.in
@@ -17,7 +17,6 @@ Documentation=https://libvirt.org
[Service]
Type=notify
Environment=VIRTNETWORKD_ARGS="--timeout 120"
-EnvironmentFile=-@sysconfdir@/sysconfig/virtnetworkd
ExecStart=@sbindir@/virtnetworkd $VIRTNETWORKD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
diff --git a/src/node_device/virtnodedevd.service.in b/src/node_device/virtnodedevd.service.in
index cd9de362fd..7693aa52c4 100644
--- a/src/node_device/virtnodedevd.service.in
+++ b/src/node_device/virtnodedevd.service.in
@@ -14,7 +14,6 @@ Documentation=https://libvirt.org
[Service]
Type=notify
Environment=VIRTNODEDEVD_ARGS="--timeout 120"
-EnvironmentFile=-@sysconfdir@/sysconfig/virtnodedevd
ExecStart=@sbindir@/virtnodedevd $VIRTNODEDEVD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
diff --git a/src/nwfilter/virtnwfilterd.service.in b/src/nwfilter/virtnwfilterd.service.in
index ab65419e0c..16d8b377b0 100644
--- a/src/nwfilter/virtnwfilterd.service.in
+++ b/src/nwfilter/virtnwfilterd.service.in
@@ -14,7 +14,6 @@ Documentation=https://libvirt.org
[Service]
Type=notify
Environment=VIRTNWFILTERD_ARGS="--timeout 120"
-EnvironmentFile=-@sysconfdir@/sysconfig/virtnwfilterd
ExecStart=@sbindir@/virtnwfilterd $VIRTNWFILTERD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
diff --git a/src/qemu/virtqemud.service.in b/src/qemu/virtqemud.service.in
index 5ad968ace9..c63147d31f 100644
--- a/src/qemu/virtqemud.service.in
+++ b/src/qemu/virtqemud.service.in
@@ -21,7 +21,6 @@ Documentation=https://libvirt.org
[Service]
Type=notify
Environment=VIRTQEMUD_ARGS="--timeout 120"
-EnvironmentFile=-@sysconfdir@/sysconfig/virtqemud
ExecStart=@sbindir@/virtqemud $VIRTQEMUD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in
index 5d4d412fcc..27cfc34b90 100644
--- a/src/remote/libvirtd.service.in
+++ b/src/remote/libvirtd.service.in
@@ -29,7 +29,6 @@ Documentation=https://libvirt.org
[Service]
Type=notify
Environment=LIBVIRTD_ARGS="--timeout 120"
-EnvironmentFile=-@sysconfdir@/sysconfig/libvirtd
ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
diff --git a/src/remote/virtproxyd.service.in b/src/remote/virtproxyd.service.in
index f9bb6b84a9..0eddf5ee93 100644
--- a/src/remote/virtproxyd.service.in
+++ b/src/remote/virtproxyd.service.in
@@ -14,7 +14,6 @@ Documentation=https://libvirt.org
[Service]
Type=notify
Environment=VIRTPROXYD_ARGS="--timeout 120"
-EnvironmentFile=-@sysconfdir@/sysconfig/virtproxyd
ExecStart=@sbindir@/virtproxyd $VIRTPROXYD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
diff --git a/src/secret/virtsecretd.service.in b/src/secret/virtsecretd.service.in
index 6d298c5334..92e54f175f 100644
--- a/src/secret/virtsecretd.service.in
+++ b/src/secret/virtsecretd.service.in
@@ -14,7 +14,6 @@ Documentation=https://libvirt.org
[Service]
Type=notify
Environment=VIRTSECRETD_ARGS="--timeout 120"
-EnvironmentFile=-@sysconfdir@/sysconfig/virtsecretd
ExecStart=@sbindir@/virtsecretd $VIRTSECRETD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
diff --git a/src/storage/virtstoraged.service.in b/src/storage/virtstoraged.service.in
index eda4d86d37..abe91e3d80 100644
--- a/src/storage/virtstoraged.service.in
+++ b/src/storage/virtstoraged.service.in
@@ -16,7 +16,6 @@ Documentation=https://libvirt.org
[Service]
Type=notify
Environment=VIRTSTORAGED_ARGS="--timeout 120"
-EnvironmentFile=-@sysconfdir@/sysconfig/virtstoraged
ExecStart=@sbindir@/virtstoraged $VIRTSTORAGED_ARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
diff --git a/src/vbox/virtvboxd.service.in b/src/vbox/virtvboxd.service.in
index 6f447276e9..54fbd0be4a 100644
--- a/src/vbox/virtvboxd.service.in
+++ b/src/vbox/virtvboxd.service.in
@@ -15,7 +15,6 @@ Documentation=https://libvirt.org
[Service]
Type=notify
Environment=VIRTVBOXD_ARGS="--timeout 120"
-EnvironmentFile=-@sysconfdir@/sysconfig/virtvboxd
ExecStart=@sbindir@/virtvboxd $VIRTVBOXD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in
index 3cf6476196..5668009ae4 100644
--- a/tools/libvirt-guests.service.in
+++ b/tools/libvirt-guests.service.in
@@ -20,7 +20,7 @@ Documentation=man:libvirt-guests(8)
Documentation=https://libvirt.org
[Service]
-EnvironmentFile=-@sysconfdir@/sysconfig/libvirt-guests
+EnvironmentFile=-/etc/libvirt/libvirt-guests.conf
# Hack just call traditional service until we factor
# out the code
ExecStart=@libexecdir@/libvirt-guests.sh start
--
2.34.1

View file

@ -1,70 +0,0 @@
From 52ecc3247d72e2a5ffc390093d803f59e20087f6 Mon Sep 17 00:00:00 2001
Message-Id: <52ecc3247d72e2a5ffc390093d803f59e20087f6.1647318231.git.mprivozn@redhat.com>
From: Michal Privoznik <mprivozn@redhat.com>
Date: Tue, 15 Mar 2022 05:23:29 +0100
Subject: [PATCH] libvirt-8.2.0-fix-paths-for-apparmor.patch
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
src/security/apparmor/libvirt-qemu | 1 +
src/security/apparmor/meson.build | 6 +++---
...t-aa-helper.in => usr.libexec.libvirt.virt-aa-helper.in} | 2 +-
...elper.local => usr.libexec.libvirt.virt-aa-helper.local} | 0
4 files changed, 5 insertions(+), 4 deletions(-)
rename src/security/apparmor/{usr.lib.libvirt.virt-aa-helper.in => usr.libexec.libvirt.virt-aa-helper.in} (97%)
rename src/security/apparmor/{usr.lib.libvirt.virt-aa-helper.local => usr.libexec.libvirt.virt-aa-helper.local} (100%)
diff --git a/src/security/apparmor/libvirt-qemu b/src/security/apparmor/libvirt-qemu
index 250ba4ea58..1599289932 100644
--- a/src/security/apparmor/libvirt-qemu
+++ b/src/security/apparmor/libvirt-qemu
@@ -95,6 +95,7 @@
/usr/share/sgabios/** r,
/usr/share/slof/** r,
/usr/share/vgabios/** r,
+ /usr/share/seavgabios/** r,
# pki for libvirt-vnc and libvirt-spice (LP: #901272, #1690140)
/etc/pki/CA/ r,
diff --git a/src/security/apparmor/meson.build b/src/security/apparmor/meson.build
index 990f00b4f3..2a2235c89a 100644
--- a/src/security/apparmor/meson.build
+++ b/src/security/apparmor/meson.build
@@ -1,5 +1,5 @@
apparmor_gen_profiles = [
- 'usr.lib.libvirt.virt-aa-helper',
+ 'usr.libexec.libvirt.virt-aa-helper',
'usr.sbin.libvirtd',
'usr.sbin.virtqemud',
'usr.sbin.virtxend',
@@ -34,7 +34,7 @@ install_data(
)
install_data(
- 'usr.lib.libvirt.virt-aa-helper.local',
+ 'usr.libexec.libvirt.virt-aa-helper.local',
install_dir: apparmor_dir / 'local',
- rename: 'usr.lib.libvirt.virt-aa-helper',
+ rename: 'usr.libexec.libvirt.virt-aa-helper',
)
diff --git a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in b/src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.in
similarity index 97%
rename from src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in
rename to src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.in
index ff1d46bebe..4f2679de7b 100644
--- a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in
+++ b/src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.in
@@ -71,5 +71,5 @@ profile virt-aa-helper @libexecdir@/virt-aa-helper {
/**.[iI][sS][oO] r,
/**/disk{,.*} r,
- #include <local/usr.lib.libvirt.virt-aa-helper>
+ #include <local/usr.libexec.libvirt.virt-aa-helper>
}
diff --git a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.local b/src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.local
similarity index 100%
rename from src/security/apparmor/usr.lib.libvirt.virt-aa-helper.local
rename to src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.local
--
2.34.1

View file

@ -1,68 +0,0 @@
# /etc/conf.d/libvirtd
# LIBVIRT_URIS
# space separated list of libvirt URIs to communicate with to start/stop guests
# Valid values are anything that can be passed to 'virsh connect'
#LIBVIRT_URIS="qemu:///system"
# LIBVIRT_SHUTDOWN
# Valid options:
# * managedsave - Performs a state save external to the VM (for hypervisors
# supporting this operation). qemu-kvm will stop the CPU
# and save off all state to a separate file. When the
# machine is started again, it will resume like nothing
# ever happened. This is guarenteed to always successfully
# stop your machine and restart it.
#
# * shutdown - Sends an ACPI shutdown (think of this as a request to
# your guest to shutdown). There is no way to distinguish
# between guests that are ignoring the shutdown request or
# are stuck or are taking a long time to shutdown. We will
# wait LIBVIRT_MAXWAIT seconds before yanking the power
# out.
#
# * destroy - Immediately stop all running guests. Use with caution as
# this can leave the guest in a corrupted state and might
# lead to data loss.
#
#LIBVIRT_SHUTDOWN="managedsave"
# LIBVIRT_MAXWAIT
# Timeout in seconds until stopping a guest and "pulling the plug" on the
# guest
# Valid values are any integer over 0
#LIBVIRT_MAXWAIT="500"
# LIBVIRT_START
# If this value is set to 'no', then guests and networks that were shutdown
# by this script when it was stopped will not be started when it is started
# back up.
# Valid values are yes or no
#LIBVIRT_START="yes"
# LIBVIRT_IGNORE_AUTOSTART
# If the VM is marked for autostart in its XML configuration then we won't
# save its start when the init script is stopped. The result is that when
# the init script starts back up, no attempt will be made to start the VM or
# confirm it is started.
# Valid values are yes or no
#LIBVIRT_IGNORE_AUTOSTART="no"
# LIBVIRT_NET_SHUTDOWN
# If libvirtd created networks for you (e.g. NATed networks) then this init
# script will shut them down for you if this is set to 'yes'. Otherwise,
# the networks will be left running. For this option to be useful you must
# have enabled the 'virt-network' USE flag and have had libvirt create a
# NATed network for you. Valid values: 'yes' or 'no'
#LIBVIRT_NET_SHUTDOWN="yes"

View file

@ -1,237 +0,0 @@
#!/sbin/openrc-run
description="Virtual Machine Management (libvirt) Guests"
depend() {
use libvirtd
}
# set the default to QEMU
[ -z "${LIBVIRT_URIS}" ] && LIBVIRT_URIS="qemu:///system"
# default to suspending the VM via managedsave
case "${LIBVIRT_SHUTDOWN}" in
managedsave|shutdown|destroy) ;;
*) LIBVIRT_SHUTDOWN="managedsave" ;;
esac
# default to 500 seconds
[ -z ${LIBVIRT_MAXWAIT} ] && LIBVIRT_MAXWAIT=500
gueststatefile="/var/lib/libvirt/libvirt-guests.state"
netstatefile="/var/lib/libvirt/libvirt-net.state"
do_virsh() {
local hvuri=$1
shift
# if unset, default to qemu
[ -z ${hvuri} ] && hvuri="qemu:///system"
# if only qemu was supplied then correct the value
[ "xqemu" = x${hvuri} ] && hvuri="qemu:///system"
# Silence errors because virsh always throws an error about
# not finding the hypervisor version when connecting to libvirtd
# lastly strip the blank line at the end
LC_ALL=C virsh -c ${hvuri} "$@" 2>/dev/null | head -n -1
}
libvirtd_dom_list() {
# Only work with domains by their UUIDs
local hvuri=$1
shift
# The grep is to remove dom0 for xen domains. Otherwise we never hit 0
do_virsh "${hvuri}" list --uuid $@ | grep -v 00000000-0000-0000-0000-000000000000
}
libvirtd_dom_count() {
local hvuri=$1
shift
libvirtd_dom_list "${hvuri}" $@ | wc -l
}
libvirtd_net_list() {
# Only work with networks by their UUIDs
local hvuri=$1
shift
do_virsh "${hvuri}" net-list --uuid $@
}
libvirtd_net_count() {
local hvuri=$1
shift
libvirtd_net_list "${hvuri}" $@ | wc -l
}
libvirtd_dom_stop() {
# stops all persistent or transient domains for a given URI
# $1 - uri
# $2 - persisent/transient
local uri=$1
local persist=$2
local shutdown_type=${LIBVIRT_SHUTDOWN}
local counter=${LIBVIRT_MAXWAIT}
local dom_name=
local dom_as=
local dom_ids=
local uuid=
local dom_count=
[ "${persist}" = "--transient" ] && shutdown_type="shutdown"
[ -n "${counter}" ] || counter=500
einfo " Shutting down domain(s) ..."
# grab all persistent or transient domains running
dom_ids=$(libvirtd_dom_list ${uri} ${persist})
for uuid in ${dom_ids}; do
# Get the name
dom_name=$(do_virsh ${uri} domname ${uuid})
einfo " ${dom_name}"
# Get autostart state
dom_as=$(do_virsh ${uri} dominfo ${uuid} | \
awk '$1 == "Autostart:" { print $2 }')
if [ "${persist}" = "--persistent" ]; then
# Save our running state only if LIBVIRT_IGNORE_AUTOSTART != yes
if [ "x${LIBVIRT_IGNORE_AUTOSTART}" = "xyes" ] && \
[ ${dom_as} = "enabled" ]; then
:
else
echo "${uri} ${uuid}" >> ${gueststatefile}
fi
fi
# Now let's stop it
do_virsh "${uri}" ${shutdown_type} ${uuid} > /dev/null
done
dom_count="$(libvirtd_dom_count ${uri} ${persist})"
while [ ${dom_count} -gt 0 ] && [ ${counter} -gt 0 ] ; do
dom_count="$(libvirtd_dom_count ${uri} ${persist})"
sleep 1
if [ "${shutdown_type}" = "shutdown" ]; then
counter=$((${counter} - 1))
fi
printf "."
done
if [ "${shutdown_type}" = "shutdown" ]; then
# grab all domains still running
dom_ids=$(libvirtd_dom_list ${uri} ${persist})
for uuid in ${dom_ids}; do
dom_name=$(do_virsh ${uri} domname ${uuid})
eerror " ${dom_name} forcibly stopped"
do_virsh "${uri}" destroy ${uuid} > /dev/null
done
fi
}
libvirtd_net_stop() {
# stops all persistent or transient domains for a given URI
# $1 - uri
# $2 - persisent/transient
local uri=$1
local persist=$2
local uuid=
local net_name=
if [ "${LIBVIRT_NET_SHUTDOWN}" != "no" ]; then
einfo " Shutting down network(s):"
for uuid in $(libvirtd_net_list ${uri} ${persist}); do
net_name=$(do_virsh ${uri} net-name ${uuid})
einfo " ${net_name}"
if [ "${persist}" = "--persistent" ]; then
# Save our running state
echo "${uri} ${uuid}" >> ${netstatefile}
fi
# Actually stop the network
do_virsh qemu net-destroy ${uuid} > /dev/null
done
fi
}
start() {
local uri=
local uuid=
local name=
for uri in ${LIBVIRT_URIS}; do
do_virsh "${uri}" connect
if [ $? -ne 0 ]; then
eerror "Failed to connect to '${uri}'. Domains may not start."
fi
done
[ ! -e "${netstatefile}" ] && touch "${netstatefile}"
[ ! -e "${gueststatefile}" ] && touch "${gueststatefile}"
# if the user didn't want to start any guests up then respect their wish
[ "x${LIBVIRT_START}" = "xno" ] && return 0
# start networks
ebegin "Starting libvirt networks"
while read -r uri uuid
do
# ignore trash
[ -z "${uri}" ] || [ -z "${uuid}" ] && continue
name=$(do_virsh "${uri}" net-name ${uuid})
einfo " ${name}"
do_virsh "${uri}" net-start ${uuid} > /dev/null
done <"${netstatefile}"
eend 0
# start domains
ebegin "Starting libvirt domains"
while read -r uri uuid
do
# ignore trash
[ -z "${uri}" ] || [ -z "${uuid}" ] && continue
name=$(do_virsh "${uri}" domname ${uuid})
einfo " ${name}"
do_virsh "${uri}" start ${uuid} > /dev/null
do_virsh "${uri}" domtime --sync ${uuid} > /dev/null
done <"${gueststatefile}"
eend 0
}
stop() {
local counter=
local dom_name=
local net_name=
local dom_ids=
local uuid=
local dom_count=
rm -f "${gueststatefile}"
[ $? -ne 0 ] && eerror "Unable to save domain state"
rm -f "${netstatefile}"
[ $? -ne 0 ] && eerror "Unable to save net state"
for uri in ${LIBVIRT_URIS}; do
einfo "Stopping libvirt domains and networks for ${uri}"
libvirtd_dom_stop "${uri}" "--persistent"
libvirtd_dom_stop "${uri}" "--transient"
libvirtd_net_stop "${uri}" "--persistent"
libvirtd_net_stop "${uri}" "--transient"
einfo "Done stopping domains and networks for ${uri}"
done
}

View file

@ -1,18 +0,0 @@
# /etc/conf.d/libvirtd
# Startup dependency
# libvirtd typically requires all networks to be up and settled which
# is what rc_need="net" provides. However if you only use specific networks
# for libvirtd, you may override this. Or if you only use libvirtd locally.
rc_need="net"
# The termination timeout (start-stop-daemon parameter "retry") ensures
# that the service will be terminated within a given time (25 + 5 seconds
# per default) when you are stopping the service.
#LIBVIRTD_TERMTIMEOUT="TERM/25/KILL/5"
# LIBVIRTD_OPTS
# You may want to add '--listen' to have libvirtd listen for tcp/ip connections
# if you want to use libvirt for remote control
# Please consult 'libvirtd --help' for more options
#LIBVIRTD_OPTS="--listen"

View file

@ -1,33 +0,0 @@
#!/sbin/openrc-run
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
description="Virtual Machine Management daemon (libvirt)"
LIBVIRTD_OPTS=${LIBVIRTD_OPTS:-"${LIBVIRTD_OPTS}"}
LIBVIRTD_TIMEOUT=${LIBVIRTD_TERMTIMEOUT:-"TERM/25/KILL/5"}
command="/usr/sbin/libvirtd"
command_args="${LIBVIRTD_OPTS}"
start_stop_daemon_args="-b --env KRB5_KTNAME=/etc/libvirt/krb5.tab"
pidfile="/run/libvirtd.pid"
retry="${LIBVIRTD_TERMTIMEOUT}"
depend() {
need virtlogd
use ceph dbus iscsid virtlockd
after cgconfig corosync ebtables iptables ip6tables nfs nfsmount ntp-client ntpdportmap rpc.statd sanlock xenconsoled
USE_FLAG_FIREWALLD
}
start_pre() {
# Test configuration directories in /etc/libvirt/ to be either not
# present or a directory, i.e. not a regular file, bug #532892
checkpath --directory /etc/libvirt/lxc || return 1
checkpath --directory /etc/libvirt/nwfilter || return 1
[ -L /etc/libvirt/qemu ] ||
checkpath --directory /etc/libvirt/qemu || return 1
[ -L /etc/libvirt/storage ] ||
checkpath --directory /etc/libvirt/storage || return 1
}

View file

@ -1 +0,0 @@
d /run/libvirt/lxc 0755 root root -

View file

@ -1,23 +0,0 @@
#!/sbin/openrc-run
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
description="libvirt virtual machine lock manager"
command="/usr/sbin/virtlockd"
start_stop_daemon_args="-b"
pidfile="/run/virtlockd.pid"
extra_started_commands="reload"
description_reload="re-exec the daemon, while maintaining locks and clients"
depend() {
after ntp-client ntpd nfs nfsmount corosync
}
reload() {
ebegin "re-exec() virtlockd"
start-stop-daemon --signal SIGUSR1 \
--exec "${command}" --pidfile "${pidfile}"
}

View file

@ -1,23 +0,0 @@
#!/sbin/openrc-run
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
description="libvirt virtual machine logging manager"
command="/usr/sbin/virtlogd"
start_stop_daemon_args="-b"
pidfile="/run/virtlogd.pid"
extra_started_commands="reload"
description_reload="re-exec the daemon, while maintaining open connections"
depend() {
after ntp-client ntpd nfs nfsmount corosync
}
reload() {
ebegin "re-exec() virtlogd"
start-stop-daemon --signal SIGUSR1 \
--exec "${command}" --pidfile "${pidfile}"
}

View file

@ -1,338 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7,8,9} )
inherit meson bash-completion-r1 linux-info python-any-r1 readme.gentoo-r1 tmpfiles verify-sig
if [[ ${PV} = *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://gitlab.com/libvirt/libvirt.git"
EGIT_BRANCH="master"
SRC_URI=""
SLOT="0"
else
SRC_URI="https://libvirt.org/sources/${P}.tar.xz
verify-sig? ( https://libvirt.org/sources/${P}.tar.xz.asc )"
KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
SLOT="0/${PV}"
fi
DESCRIPTION="C toolkit to manipulate virtual machines"
HOMEPAGE="https://www.libvirt.org/ https://gitlab.com/libvirt/libvirt/"
LICENSE="LGPL-2.1"
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/libvirt.org.asc
IUSE="
apparmor audit bash-completion +caps dtrace firewalld fuse glusterfs
iscsi iscsi-direct +libvirtd lvm libssh lxc nfs nls numa openvz
parted pcap policykit +qemu rbd sasl selinux +udev
virtualbox +virt-network wireshark-plugins xen zfs
"
REQUIRED_USE="
firewalld? ( virt-network )
libvirtd? ( || ( lxc openvz qemu virtualbox xen ) )
lxc? ( caps libvirtd )
openvz? ( libvirtd )
qemu? ( libvirtd )
virt-network? ( libvirtd )
virtualbox? ( libvirtd )
xen? ( libvirtd )"
BDEPEND="
app-text/xhtml1
dev-lang/perl
dev-libs/libxslt
dev-perl/XML-XPath
dev-python/docutils
virtual/pkgconfig
bash-completion? ( >=app-shells/bash-completion-2.0 )
verify-sig? ( sec-keys/openpgp-keys-libvirt )"
# gettext.sh command is used by the libvirt command wrappers, and it's
# non-optional, so put it into RDEPEND.
# We can use both libnl:1.1 and libnl:3, but if you have both installed, the
# package will use 3 by default. Since we don't have slot pinning in an API,
# we must go with the most recent
RDEPEND="
acct-user/qemu
app-misc/scrub
>=dev-libs/glib-2.48.0
dev-libs/libgcrypt:0
dev-libs/libnl:3
>=dev-libs/libxml2-2.7.6
>=net-analyzer/openbsd-netcat-1.105-r1
>=net-libs/gnutls-1.0.25:0=
net-libs/libssh2
net-libs/libtirpc
net-libs/rpcsvc-proto
>=net-misc/curl-7.18.0
sys-apps/dbus
sys-apps/dmidecode
sys-devel/gettext
sys-libs/ncurses:0=
sys-libs/readline:=
virtual/acl
apparmor? ( sys-libs/libapparmor )
audit? ( sys-process/audit )
caps? ( sys-libs/libcap-ng )
dtrace? ( dev-util/systemtap )
firewalld? ( >=net-firewall/firewalld-0.6.3 )
fuse? ( sys-fs/fuse:0= )
glusterfs? ( >=sys-cluster/glusterfs-3.4.1 )
iscsi? ( sys-block/open-iscsi )
iscsi-direct? ( >=net-libs/libiscsi-1.18.0 )
libssh? ( net-libs/libssh )
lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] )
lxc? ( !sys-apps/systemd[cgroup-hybrid(-)] )
nfs? ( net-fs/nfs-utils )
numa? (
>sys-process/numactl-2.0.2
sys-process/numad
)
parted? (
>=sys-block/parted-1.8[device-mapper]
sys-fs/lvm2[-device-mapper-only(-)]
)
pcap? ( >=net-libs/libpcap-1.0.0 )
policykit? (
acct-group/libvirt
>=sys-auth/polkit-0.9
)
qemu? (
>=app-emulation/qemu-2.11
dev-libs/yajl
)
rbd? ( sys-cluster/ceph )
sasl? ( dev-libs/cyrus-sasl )
selinux? ( >=sys-libs/libselinux-2.0.85 )
virt-network? (
net-dns/dnsmasq[dhcp,ipv6(+),script]
net-firewall/ebtables
>=net-firewall/iptables-1.4.10[ipv6(+)]
net-misc/radvd
sys-apps/iproute2[-minimal]
)
wireshark-plugins? ( <net-analyzer/wireshark-3.6.0:= )
xen? (
>=app-emulation/xen-4.9.0
app-emulation/xen-tools:=
)
udev? (
virtual/libudev
>=x11-libs/libpciaccess-0.10.9
)
zfs? ( sys-fs/zfs )"
DEPEND="${BDEPEND}
${RDEPEND}
${PYTHON_DEPS}"
PATCHES=(
"${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch
"${FILESDIR}"/${PN}-6.7.0-do-not-use-sysconfig.patch
"${FILESDIR}"/${PN}-6.7.0-fix-paths-for-apparmor.patch
"${FILESDIR}"/${PN}-8.1.0-docs-Fix-template-matching-in-page.xsl.patch
)
pkg_setup() {
# Check kernel configuration:
CONFIG_CHECK=""
use fuse && CONFIG_CHECK+="
~FUSE_FS"
use lvm && CONFIG_CHECK+="
~BLK_DEV_DM
~DM_MULTIPATH
~DM_SNAPSHOT"
use lxc && CONFIG_CHECK+="
~BLK_CGROUP
~CGROUP_CPUACCT
~CGROUP_DEVICE
~CGROUP_FREEZER
~CGROUP_NET_PRIO
~CGROUP_PERF
~CGROUPS
~CGROUP_SCHED
~CPUSETS
~IPC_NS
~MACVLAN
~NAMESPACES
~NET_CLS_CGROUP
~NET_NS
~PID_NS
~POSIX_MQUEUE
~SECURITYFS
~USER_NS
~UTS_NS
~VETH
~!GRKERNSEC_CHROOT_MOUNT
~!GRKERNSEC_CHROOT_DOUBLE
~!GRKERNSEC_CHROOT_PIVOT
~!GRKERNSEC_CHROOT_CHMOD
~!GRKERNSEC_CHROOT_CAPS"
kernel_is lt 4 7 && use lxc && CONFIG_CHECK+="
~DEVPTS_MULTIPLE_INSTANCES"
use virt-network && CONFIG_CHECK+="
~BRIDGE_EBT_MARK_T
~BRIDGE_NF_EBTABLES
~NETFILTER_ADVANCED
~NETFILTER_XT_CONNMARK
~NETFILTER_XT_MARK
~NETFILTER_XT_TARGET_CHECKSUM
~IP_NF_FILTER
~IP_NF_MANGLE
~IP_NF_NAT
~IP_NF_TARGET_MASQUERADE
~IP6_NF_FILTER
~IP6_NF_MANGLE
~IP6_NF_NAT"
# Bandwidth Limiting Support
use virt-network && CONFIG_CHECK+="
~BRIDGE_EBT_T_NAT
~IP_NF_TARGET_REJECT
~NET_ACT_POLICE
~NET_CLS_FW
~NET_CLS_U32
~NET_SCH_HTB
~NET_SCH_INGRESS
~NET_SCH_SFQ"
ERROR_USER_NS="Optional depending on LXC configuration."
if [[ -n ${CONFIG_CHECK} ]]; then
linux-info_pkg_setup
fi
python-any-r1_pkg_setup
}
src_prepare() {
touch "${S}/.mailmap" || die
default
python_fix_shebang .
# Skip fragile tests which relies on pristine environment
# (Breaks because of sandbox environment variables)
# bug #802876
sed -i -e "/commandtest/d" tests/meson.build || die
# Tweak the init script:
cp "${FILESDIR}/libvirtd.init-r19" "${S}/libvirtd.init" || die
sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \
-i "${S}/libvirtd.init" || die "sed failed"
}
src_configure() {
local emesonargs=(
$(meson_feature apparmor)
$(meson_feature apparmor apparmor_profiles)
$(meson_feature audit)
$(meson_feature caps capng)
$(meson_feature dtrace)
$(meson_feature firewalld)
$(meson_feature fuse)
$(meson_feature glusterfs)
$(meson_feature glusterfs storage_gluster)
$(meson_feature iscsi storage_iscsi)
$(meson_feature iscsi-direct storage_iscsi_direct)
$(meson_feature libvirtd driver_libvirtd)
$(meson_feature libssh)
$(meson_feature lvm storage_lvm)
$(meson_feature lvm storage_mpath)
$(meson_feature lxc driver_lxc)
$(meson_feature nls)
$(meson_feature numa numactl)
$(meson_feature numa numad)
$(meson_feature openvz driver_openvz)
$(meson_feature parted storage_disk)
$(meson_feature pcap libpcap)
$(meson_feature policykit polkit)
$(meson_feature qemu driver_qemu)
$(meson_feature qemu yajl)
$(meson_feature rbd storage_rbd)
$(meson_feature sasl)
$(meson_feature selinux)
$(meson_feature udev)
$(meson_feature virt-network driver_network)
$(meson_feature virtualbox driver_vbox)
$(meson_feature wireshark-plugins wireshark_dissector)
$(meson_feature xen driver_libxl)
$(meson_feature zfs storage_zfs)
-Dnetcf=disabled
-Dsanlock=disabled
-Ddriver_esx=enabled
-Dinit_script=systemd
-Dqemu_user=$(usex caps qemu root)
-Dqemu_group=$(usex caps qemu root)
-Ddriver_remote=enabled
-Dstorage_fs=enabled
-Ddriver_vmware=enabled
-Ddriver_ch=disabled
--localstatedir="${EPREFIX}/var"
-Drunstatedir="${EPREFIX}/run"
-Ddocdir="${EPREFIX}/usr/share/doc/${PF}"
)
meson_src_configure
}
src_test() {
export VIR_TEST_DEBUG=1
# Don't run the syntax check tests, they're fragile and not relevant
# to us downstream anyway.
# We also crank up the timeout (as Fedora does) just to preempt failures
# on slower arches.
meson_src_test --no-suite syntax-check --timeout-multiplier 10
}
src_install() {
meson_src_install
# Depending on configuration option, libvirt will create some bogus
# directoreis. They are either not used, or libvirtd is able to create
# them on demand, so let's remove them.
#
# Note, we are using -f here so that rm does not fail or warn if the
# directory is nonexistent.
rm -rf "${D}"/etc/sysconfig
rm -rf "${D}"/var
rm -rf "${D}"/run
use libvirtd || return 0
# From here, only libvirtd-related instructions, be warned!
newtmpfiles "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf
newinitd "${S}/libvirtd.init" libvirtd
newinitd "${FILESDIR}/libvirt-guests.init-r4" libvirt-guests
newinitd "${FILESDIR}/virtlockd.init-r2" virtlockd
newinitd "${FILESDIR}/virtlogd.init-r2" virtlogd
newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd
newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests
DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r3")
DISABLE_AUTOFORMATTING=true
readme.gentoo_create_doc
}
pkg_postinst() {
if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml || die
fi
use libvirtd || return 0
# From here, only libvirtd-related instructions, be warned!
tmpfiles_process libvirtd.conf
readme.gentoo_print_elog
}

View file

@ -1,336 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Please bump with dev-python/libvirt-python!
PYTHON_COMPAT=( python3_{8..10} )
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/libvirt.org.asc
inherit meson bash-completion-r1 linux-info python-any-r1 readme.gentoo-r1 tmpfiles verify-sig
if [[ ${PV} = *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://gitlab.com/libvirt/libvirt.git"
EGIT_BRANCH="master"
else
SRC_URI="https://libvirt.org/sources/${P}.tar.xz
verify-sig? ( https://libvirt.org/sources/${P}.tar.xz.asc )"
KEYWORDS="amd64 arm64 ~ppc64 x86"
fi
DESCRIPTION="C toolkit to manipulate virtual machines"
HOMEPAGE="https://www.libvirt.org/ https://gitlab.com/libvirt/libvirt/"
LICENSE="LGPL-2.1"
SLOT="0/${PV}"
IUSE="
apparmor audit bash-completion +caps dtrace firewalld fuse glusterfs
iscsi iscsi-direct +libvirtd lvm libssh libssh2 lxc nfs nls numa openvz
parted pcap policykit +qemu rbd sasl selinux +udev
virtualbox +virt-network wireshark-plugins xen zfs
"
REQUIRED_USE="
firewalld? ( virt-network )
libvirtd? ( || ( lxc openvz qemu virtualbox xen ) )
lxc? ( caps libvirtd )
openvz? ( libvirtd )
qemu? ( libvirtd )
virt-network? ( libvirtd )
virtualbox? ( libvirtd )
xen? ( libvirtd )"
BDEPEND="
app-text/xhtml1
dev-lang/perl
dev-libs/libxslt
dev-perl/XML-XPath
dev-python/docutils
virtual/pkgconfig
net-libs/rpcsvc-proto
bash-completion? ( >=app-shells/bash-completion-2.0 )
verify-sig? ( sec-keys/openpgp-keys-libvirt )"
# gettext.sh command is used by the libvirt command wrappers, and it's
# non-optional, so put it into RDEPEND.
# We can use both libnl:1.1 and libnl:3, but if you have both installed, the
# package will use 3 by default. Since we don't have slot pinning in an API,
# we must go with the most recent
RDEPEND="
acct-user/qemu
app-misc/scrub
>=dev-libs/glib-2.56.0
dev-libs/libgcrypt
dev-libs/libnl:3
>=dev-libs/libxml2-2.9.1
>=net-analyzer/openbsd-netcat-1.105-r1
>=net-libs/gnutls-3.2.0:=
net-libs/libtirpc:=
>=net-misc/curl-7.18.0
sys-apps/dbus
sys-apps/dmidecode
sys-devel/gettext
>=sys-libs/readline-7.0:=
virtual/acl
apparmor? ( sys-libs/libapparmor )
audit? ( sys-process/audit )
caps? ( sys-libs/libcap-ng )
dtrace? ( dev-util/systemtap )
firewalld? ( >=net-firewall/firewalld-0.6.3 )
fuse? ( sys-fs/fuse:= )
glusterfs? ( >=sys-cluster/glusterfs-3.4.1 )
iscsi? ( >=sys-block/open-iscsi-1.18.0 )
iscsi-direct? ( >=net-libs/libiscsi-1.18.0 )
libssh? ( >=net-libs/libssh-0.7:= )
libssh2? ( >=net-libs/libssh2-1.3 )
lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] )
lxc? ( !sys-apps/systemd[cgroup-hybrid(-)] )
nfs? ( net-fs/nfs-utils )
numa? (
>sys-process/numactl-2.0.2
sys-process/numad
)
parted? (
>=sys-block/parted-1.8[device-mapper]
sys-fs/lvm2[-device-mapper-only(-)]
)
pcap? ( >=net-libs/libpcap-1.8.0 )
policykit? (
acct-group/libvirt
>=sys-auth/polkit-0.9
)
qemu? (
>=app-emulation/qemu-2.11
>=dev-libs/yajl-2.0.3:=
)
rbd? ( sys-cluster/ceph )
sasl? ( >=dev-libs/cyrus-sasl-2.1.26 )
selinux? ( >=sys-libs/libselinux-2.0.85 )
virt-network? (
net-dns/dnsmasq[dhcp,ipv6(+),script]
net-firewall/ebtables
>=net-firewall/iptables-1.4.10[ipv6(+)]
net-misc/radvd
sys-apps/iproute2[-minimal]
)
wireshark-plugins? ( >=net-analyzer/wireshark-2.6.0:= )
xen? (
>=app-emulation/xen-4.9.0
app-emulation/xen-tools:=
)
udev? (
virtual/libudev:=
>=x11-libs/libpciaccess-0.10.9
)
zfs? ( sys-fs/zfs )
kernel_linux? ( sys-apps/util-linux )"
DEPEND="${BDEPEND}
${RDEPEND}
${PYTHON_DEPS}"
PATCHES=(
"${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch
"${FILESDIR}"/${PN}-8.2.0-do-not-use-sysconfig.patch
"${FILESDIR}"/${PN}-8.2.0-fix-paths-for-apparmor.patch
)
pkg_setup() {
# Check kernel configuration:
CONFIG_CHECK=""
use fuse && CONFIG_CHECK+="
~FUSE_FS"
use lvm && CONFIG_CHECK+="
~BLK_DEV_DM
~DM_MULTIPATH
~DM_SNAPSHOT"
use lxc && CONFIG_CHECK+="
~BLK_CGROUP
~CGROUP_CPUACCT
~CGROUP_DEVICE
~CGROUP_FREEZER
~CGROUP_NET_PRIO
~CGROUP_PERF
~CGROUPS
~CGROUP_SCHED
~CPUSETS
~IPC_NS
~MACVLAN
~NAMESPACES
~NET_CLS_CGROUP
~NET_NS
~PID_NS
~POSIX_MQUEUE
~SECURITYFS
~USER_NS
~UTS_NS
~VETH
~!GRKERNSEC_CHROOT_MOUNT
~!GRKERNSEC_CHROOT_DOUBLE
~!GRKERNSEC_CHROOT_PIVOT
~!GRKERNSEC_CHROOT_CHMOD
~!GRKERNSEC_CHROOT_CAPS"
kernel_is lt 4 7 && use lxc && CONFIG_CHECK+="
~DEVPTS_MULTIPLE_INSTANCES"
use virt-network && CONFIG_CHECK+="
~BRIDGE_EBT_MARK_T
~BRIDGE_NF_EBTABLES
~NETFILTER_ADVANCED
~NETFILTER_XT_CONNMARK
~NETFILTER_XT_MARK
~NETFILTER_XT_TARGET_CHECKSUM
~IP_NF_FILTER
~IP_NF_MANGLE
~IP_NF_NAT
~IP_NF_TARGET_MASQUERADE
~IP6_NF_FILTER
~IP6_NF_MANGLE
~IP6_NF_NAT"
# Bandwidth Limiting Support
use virt-network && CONFIG_CHECK+="
~BRIDGE_EBT_T_NAT
~IP_NF_TARGET_REJECT
~NET_ACT_POLICE
~NET_CLS_FW
~NET_CLS_U32
~NET_SCH_HTB
~NET_SCH_INGRESS
~NET_SCH_SFQ"
ERROR_USER_NS="Optional depending on LXC configuration."
if [[ -n ${CONFIG_CHECK} ]]; then
linux-info_pkg_setup
fi
python-any-r1_pkg_setup
}
src_prepare() {
touch "${S}/.mailmap" || die
default
python_fix_shebang .
# Skip fragile tests which relies on pristine environment
# (Breaks because of sandbox environment variables)
# bug #802876
sed -i -e "/commandtest/d" tests/meson.build || die
# Tweak the init script:
cp "${FILESDIR}/libvirtd.init-r19" "${S}/libvirtd.init" || die
sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \
-i "${S}/libvirtd.init" || die "sed failed"
}
src_configure() {
local emesonargs=(
$(meson_feature apparmor)
$(meson_feature apparmor apparmor_profiles)
$(meson_feature audit)
$(meson_feature caps capng)
$(meson_feature dtrace)
$(meson_feature firewalld)
$(meson_feature fuse)
$(meson_feature glusterfs)
$(meson_feature glusterfs storage_gluster)
$(meson_feature iscsi storage_iscsi)
$(meson_feature iscsi-direct storage_iscsi_direct)
$(meson_feature libvirtd driver_libvirtd)
$(meson_feature libssh)
$(meson_feature libssh2)
$(meson_feature lvm storage_lvm)
$(meson_feature lvm storage_mpath)
$(meson_feature lxc driver_lxc)
$(meson_feature nls)
$(meson_feature numa numactl)
$(meson_feature numa numad)
$(meson_feature openvz driver_openvz)
$(meson_feature parted storage_disk)
$(meson_feature pcap libpcap)
$(meson_feature policykit polkit)
$(meson_feature qemu driver_qemu)
$(meson_feature qemu yajl)
$(meson_feature rbd storage_rbd)
$(meson_feature sasl)
$(meson_feature selinux)
$(meson_feature udev)
$(meson_feature virt-network driver_network)
$(meson_feature virtualbox driver_vbox)
$(meson_feature wireshark-plugins wireshark_dissector)
$(meson_feature xen driver_libxl)
$(meson_feature zfs storage_zfs)
-Dnetcf=disabled
-Dsanlock=disabled
-Ddriver_esx=enabled
-Dinit_script=systemd
-Dqemu_user=$(usex caps qemu root)
-Dqemu_group=$(usex caps qemu root)
-Ddriver_remote=enabled
-Dstorage_fs=enabled
-Ddriver_vmware=enabled
-Ddriver_ch=disabled
--localstatedir="${EPREFIX}/var"
-Drunstatedir="${EPREFIX}/run"
-Ddocdir="${EPREFIX}/usr/share/doc/${PF}"
)
meson_src_configure
}
src_test() {
export VIR_TEST_DEBUG=1
# Don't run the syntax check tests, they're fragile and not relevant
# to us downstream anyway.
# We also crank up the timeout (as Fedora does) just to preempt failures
# on slower arches.
meson_src_test --no-suite syntax-check --timeout-multiplier 10
}
src_install() {
meson_src_install
# Depending on configuration option, libvirt will create some bogus
# directoreis. They are either not used, or libvirtd is able to create
# them on demand, so let's remove them.
#
# Note, we are using -f here so that rm does not fail or warn if the
# directory is nonexistent.
rm -rf "${D}"/etc/sysconfig
rm -rf "${D}"/var
rm -rf "${D}"/run
use libvirtd || return 0
# From here, only libvirtd-related instructions, be warned!
newtmpfiles "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf
newinitd "${S}/libvirtd.init" libvirtd
newinitd "${FILESDIR}/libvirt-guests.init-r4" libvirt-guests
newinitd "${FILESDIR}/virtlockd.init-r2" virtlockd
newinitd "${FILESDIR}/virtlogd.init-r2" virtlogd
newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd
newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests
DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r3")
DISABLE_AUTOFORMATTING=true
readme.gentoo_create_doc
}
pkg_postinst() {
if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml || die
fi
use libvirtd || return 0
# From here, only libvirtd-related instructions, be warned!
tmpfiles_process libvirtd.conf
readme.gentoo_print_elog
}

View file

@ -1,341 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Packages which get releases together:
# app-emacs/nxml-libvirt-schemas
# dev-python/libvirt-python
# dev-perl/Sys-Virt
# app-emulation/libvirt
# Please bump them together!
PYTHON_COMPAT=( python3_{8..11} )
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/libvirt.org.asc
inherit meson bash-completion-r1 linux-info python-any-r1 readme.gentoo-r1 tmpfiles verify-sig
if [[ ${PV} = *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://gitlab.com/libvirt/libvirt.git"
EGIT_BRANCH="master"
else
SRC_URI="https://libvirt.org/sources/${P}.tar.xz
verify-sig? ( https://libvirt.org/sources/${P}.tar.xz.asc )"
KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
fi
DESCRIPTION="C toolkit to manipulate virtual machines"
HOMEPAGE="https://www.libvirt.org/ https://gitlab.com/libvirt/libvirt/"
LICENSE="LGPL-2.1"
SLOT="0/${PV}"
IUSE="
apparmor audit bash-completion +caps dtrace firewalld fuse glusterfs
iscsi iscsi-direct +libvirtd lvm libssh libssh2 lxc nfs nls numa openvz
parted pcap policykit +qemu rbd sasl selinux +udev
virtualbox +virt-network wireshark-plugins xen zfs
"
REQUIRED_USE="
firewalld? ( virt-network )
libvirtd? ( || ( lxc openvz qemu virtualbox xen ) )
lxc? ( caps libvirtd )
openvz? ( libvirtd )
qemu? ( libvirtd )
virt-network? ( libvirtd )
virtualbox? ( libvirtd )
xen? ( libvirtd )"
BDEPEND="
app-text/xhtml1
dev-lang/perl
dev-libs/libxslt
dev-perl/XML-XPath
dev-python/docutils
virtual/pkgconfig
net-libs/rpcsvc-proto
bash-completion? ( >=app-shells/bash-completion-2.0 )
verify-sig? ( sec-keys/openpgp-keys-libvirt )"
# gettext.sh command is used by the libvirt command wrappers, and it's
# non-optional, so put it into RDEPEND.
# We can use both libnl:1.1 and libnl:3, but if you have both installed, the
# package will use 3 by default. Since we don't have slot pinning in an API,
# we must go with the most recent
RDEPEND="
acct-user/qemu
app-misc/scrub
>=dev-libs/glib-2.56.0
dev-libs/libgcrypt
dev-libs/libnl:3
>=dev-libs/libxml2-2.9.1
>=net-analyzer/openbsd-netcat-1.105-r1
>=net-libs/gnutls-3.2.0:=
net-libs/libtirpc:=
>=net-misc/curl-7.18.0
sys-apps/dbus
sys-apps/dmidecode
sys-devel/gettext
>=sys-libs/readline-7.0:=
virtual/acl
apparmor? ( sys-libs/libapparmor )
audit? ( sys-process/audit )
caps? ( sys-libs/libcap-ng )
dtrace? ( dev-util/systemtap )
firewalld? ( >=net-firewall/firewalld-0.6.3 )
fuse? ( sys-fs/fuse:= )
glusterfs? ( >=sys-cluster/glusterfs-3.4.1 )
iscsi? ( >=sys-block/open-iscsi-1.18.0 )
iscsi-direct? ( >=net-libs/libiscsi-1.18.0 )
libssh? ( >=net-libs/libssh-0.7:= )
libssh2? ( >=net-libs/libssh2-1.3 )
lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] )
lxc? ( !sys-apps/systemd[cgroup-hybrid(-)] )
nfs? ( net-fs/nfs-utils )
numa? (
>sys-process/numactl-2.0.2
sys-process/numad
)
parted? (
>=sys-block/parted-1.8[device-mapper]
sys-fs/lvm2[-device-mapper-only(-)]
)
pcap? ( >=net-libs/libpcap-1.8.0 )
policykit? (
acct-group/libvirt
>=sys-auth/polkit-0.9
)
qemu? (
>=app-emulation/qemu-2.11
>=dev-libs/yajl-2.0.3:=
)
rbd? ( sys-cluster/ceph )
sasl? ( >=dev-libs/cyrus-sasl-2.1.26 )
selinux? ( >=sys-libs/libselinux-2.0.85 )
virt-network? (
net-dns/dnsmasq[dhcp,ipv6(+),script]
net-firewall/ebtables
>=net-firewall/iptables-1.4.10[ipv6(+)]
net-misc/radvd
sys-apps/iproute2[-minimal]
)
wireshark-plugins? ( >=net-analyzer/wireshark-2.6.0:= )
xen? (
>=app-emulation/xen-4.9.0
app-emulation/xen-tools:=
)
udev? (
virtual/libudev:=
>=x11-libs/libpciaccess-0.10.9
)
zfs? ( sys-fs/zfs )
kernel_linux? ( sys-apps/util-linux )"
DEPEND="${BDEPEND}
${RDEPEND}
${PYTHON_DEPS}"
PATCHES=(
"${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch
"${FILESDIR}"/${PN}-8.2.0-do-not-use-sysconfig.patch
"${FILESDIR}"/${PN}-8.2.0-fix-paths-for-apparmor.patch
)
pkg_setup() {
# Check kernel configuration:
CONFIG_CHECK=""
use fuse && CONFIG_CHECK+="
~FUSE_FS"
use lvm && CONFIG_CHECK+="
~BLK_DEV_DM
~DM_MULTIPATH
~DM_SNAPSHOT"
use lxc && CONFIG_CHECK+="
~BLK_CGROUP
~CGROUP_CPUACCT
~CGROUP_DEVICE
~CGROUP_FREEZER
~CGROUP_NET_PRIO
~CGROUP_PERF
~CGROUPS
~CGROUP_SCHED
~CPUSETS
~IPC_NS
~MACVLAN
~NAMESPACES
~NET_CLS_CGROUP
~NET_NS
~PID_NS
~POSIX_MQUEUE
~SECURITYFS
~USER_NS
~UTS_NS
~VETH
~!GRKERNSEC_CHROOT_MOUNT
~!GRKERNSEC_CHROOT_DOUBLE
~!GRKERNSEC_CHROOT_PIVOT
~!GRKERNSEC_CHROOT_CHMOD
~!GRKERNSEC_CHROOT_CAPS"
kernel_is lt 4 7 && use lxc && CONFIG_CHECK+="
~DEVPTS_MULTIPLE_INSTANCES"
use virt-network && CONFIG_CHECK+="
~BRIDGE_EBT_MARK_T
~BRIDGE_NF_EBTABLES
~NETFILTER_ADVANCED
~NETFILTER_XT_CONNMARK
~NETFILTER_XT_MARK
~NETFILTER_XT_TARGET_CHECKSUM
~IP_NF_FILTER
~IP_NF_MANGLE
~IP_NF_NAT
~IP_NF_TARGET_MASQUERADE
~IP6_NF_FILTER
~IP6_NF_MANGLE
~IP6_NF_NAT"
# Bandwidth Limiting Support
use virt-network && CONFIG_CHECK+="
~BRIDGE_EBT_T_NAT
~IP_NF_TARGET_REJECT
~NET_ACT_POLICE
~NET_CLS_FW
~NET_CLS_U32
~NET_SCH_HTB
~NET_SCH_INGRESS
~NET_SCH_SFQ"
ERROR_USER_NS="Optional depending on LXC configuration."
if [[ -n ${CONFIG_CHECK} ]]; then
linux-info_pkg_setup
fi
python-any-r1_pkg_setup
}
src_prepare() {
touch "${S}/.mailmap" || die
default
python_fix_shebang .
# Skip fragile tests which relies on pristine environment
# (Breaks because of sandbox environment variables)
# bug #802876
sed -i -e "/commandtest/d" tests/meson.build || die
# Tweak the init script:
cp "${FILESDIR}/libvirtd.init-r19" "${S}/libvirtd.init" || die
sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \
-i "${S}/libvirtd.init" || die "sed failed"
}
src_configure() {
local emesonargs=(
$(meson_feature apparmor)
$(meson_feature apparmor apparmor_profiles)
$(meson_feature audit)
$(meson_feature caps capng)
$(meson_feature dtrace)
$(meson_feature firewalld)
$(meson_feature fuse)
$(meson_feature glusterfs)
$(meson_feature glusterfs storage_gluster)
$(meson_feature iscsi storage_iscsi)
$(meson_feature iscsi-direct storage_iscsi_direct)
$(meson_feature libvirtd driver_libvirtd)
$(meson_feature libssh)
$(meson_feature libssh2)
$(meson_feature lvm storage_lvm)
$(meson_feature lvm storage_mpath)
$(meson_feature lxc driver_lxc)
$(meson_feature nls)
$(meson_feature numa numactl)
$(meson_feature numa numad)
$(meson_feature openvz driver_openvz)
$(meson_feature parted storage_disk)
$(meson_feature pcap libpcap)
$(meson_feature policykit polkit)
$(meson_feature qemu driver_qemu)
$(meson_feature qemu yajl)
$(meson_feature rbd storage_rbd)
$(meson_feature sasl)
$(meson_feature selinux)
$(meson_feature udev)
$(meson_feature virt-network driver_network)
$(meson_feature virtualbox driver_vbox)
$(meson_feature wireshark-plugins wireshark_dissector)
$(meson_feature xen driver_libxl)
$(meson_feature zfs storage_zfs)
-Dnetcf=disabled
-Dsanlock=disabled
-Ddriver_esx=enabled
-Dinit_script=systemd
-Dqemu_user=$(usex caps qemu root)
-Dqemu_group=$(usex caps qemu root)
-Ddriver_remote=enabled
-Dstorage_fs=enabled
-Ddriver_vmware=enabled
-Ddriver_ch=disabled
--localstatedir="${EPREFIX}/var"
-Drunstatedir="${EPREFIX}/run"
-Ddocdir="${EPREFIX}/usr/share/doc/${PF}"
)
meson_src_configure
}
src_test() {
export VIR_TEST_DEBUG=1
# Don't run the syntax check tests, they're fragile and not relevant
# to us downstream anyway.
# We also crank up the timeout (as Fedora does) just to preempt failures
# on slower arches.
meson_src_test --no-suite syntax-check --timeout-multiplier 10
}
src_install() {
meson_src_install
# Depending on configuration option, libvirt will create some bogus
# directoreis. They are either not used, or libvirtd is able to create
# them on demand, so let's remove them.
#
# Note, we are using -f here so that rm does not fail or warn if the
# directory is nonexistent.
rm -rf "${D}"/etc/sysconfig
rm -rf "${D}"/var
rm -rf "${D}"/run
use libvirtd || return 0
# From here, only libvirtd-related instructions, be warned!
newtmpfiles "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf
newinitd "${S}/libvirtd.init" libvirtd
newinitd "${FILESDIR}/libvirt-guests.init-r4" libvirt-guests
newinitd "${FILESDIR}/virtlockd.init-r2" virtlockd
newinitd "${FILESDIR}/virtlogd.init-r2" virtlogd
newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd
newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests
DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r3")
DISABLE_AUTOFORMATTING=true
readme.gentoo_create_doc
}
pkg_postinst() {
if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml || die
fi
use libvirtd || return 0
# From here, only libvirtd-related instructions, be warned!
tmpfiles_process libvirtd.conf
readme.gentoo_print_elog
}

View file

@ -1,341 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Packages which get releases together:
# app-emacs/nxml-libvirt-schemas
# dev-python/libvirt-python
# dev-perl/Sys-Virt
# app-emulation/libvirt
# Please bump them together!
PYTHON_COMPAT=( python3_{8..11} )
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/libvirt.org.asc
inherit meson linux-info python-any-r1 readme.gentoo-r1 tmpfiles verify-sig
if [[ ${PV} = *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://gitlab.com/libvirt/libvirt.git"
EGIT_BRANCH="master"
else
SRC_URI="https://libvirt.org/sources/${P}.tar.xz
verify-sig? ( https://libvirt.org/sources/${P}.tar.xz.asc )"
KEYWORDS="amd64 ~arm arm64 ~ppc64 x86"
fi
DESCRIPTION="C toolkit to manipulate virtual machines"
HOMEPAGE="https://www.libvirt.org/ https://gitlab.com/libvirt/libvirt/"
LICENSE="LGPL-2.1"
SLOT="0/${PV}"
IUSE="
apparmor audit bash-completion +caps dtrace firewalld fuse glusterfs
iscsi iscsi-direct +libvirtd lvm libssh libssh2 lxc nfs nls numa openvz
parted pcap policykit +qemu rbd sasl selinux +udev
virtualbox +virt-network wireshark-plugins xen zfs
"
REQUIRED_USE="
firewalld? ( virt-network )
libvirtd? ( || ( lxc openvz qemu virtualbox xen ) )
lxc? ( caps libvirtd )
openvz? ( libvirtd )
qemu? ( libvirtd )
virt-network? ( libvirtd )
virtualbox? ( libvirtd )
xen? ( libvirtd )"
BDEPEND="
app-text/xhtml1
dev-lang/perl
dev-libs/libxslt
dev-perl/XML-XPath
dev-python/docutils
virtual/pkgconfig
net-libs/rpcsvc-proto
bash-completion? ( >=app-shells/bash-completion-2.0 )
verify-sig? ( sec-keys/openpgp-keys-libvirt )"
# gettext.sh command is used by the libvirt command wrappers, and it's
# non-optional, so put it into RDEPEND.
# We can use both libnl:1.1 and libnl:3, but if you have both installed, the
# package will use 3 by default. Since we don't have slot pinning in an API,
# we must go with the most recent
RDEPEND="
acct-user/qemu
app-misc/scrub
>=dev-libs/glib-2.56.0
dev-libs/libgcrypt
dev-libs/libnl:3
>=dev-libs/libxml2-2.9.1
>=net-analyzer/openbsd-netcat-1.105-r1
>=net-libs/gnutls-3.2.0:=
net-libs/libtirpc:=
>=net-misc/curl-7.18.0
sys-apps/dbus
sys-apps/dmidecode
sys-devel/gettext
>=sys-libs/readline-7.0:=
virtual/acl
apparmor? ( sys-libs/libapparmor )
audit? ( sys-process/audit )
caps? ( sys-libs/libcap-ng )
dtrace? ( dev-util/systemtap )
firewalld? ( >=net-firewall/firewalld-0.6.3 )
fuse? ( sys-fs/fuse:= )
glusterfs? ( >=sys-cluster/glusterfs-3.4.1 )
iscsi? ( >=sys-block/open-iscsi-1.18.0 )
iscsi-direct? ( >=net-libs/libiscsi-1.18.0 )
libssh? ( >=net-libs/libssh-0.7:= )
libssh2? ( >=net-libs/libssh2-1.3 )
lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] )
lxc? ( !sys-apps/systemd[cgroup-hybrid(-)] )
nfs? ( net-fs/nfs-utils )
numa? (
>sys-process/numactl-2.0.2
sys-process/numad
)
parted? (
>=sys-block/parted-1.8[device-mapper]
sys-fs/lvm2[-device-mapper-only(-)]
)
pcap? ( >=net-libs/libpcap-1.8.0 )
policykit? (
acct-group/libvirt
>=sys-auth/polkit-0.9
)
qemu? (
>=app-emulation/qemu-4.2
>=dev-libs/yajl-2.0.3:=
)
rbd? ( sys-cluster/ceph )
sasl? ( >=dev-libs/cyrus-sasl-2.1.26 )
selinux? ( >=sys-libs/libselinux-2.0.85 )
virt-network? (
net-dns/dnsmasq[dhcp,ipv6(+),script]
net-firewall/ebtables
>=net-firewall/iptables-1.4.10[ipv6(+)]
net-misc/radvd
sys-apps/iproute2[-minimal]
)
wireshark-plugins? ( >=net-analyzer/wireshark-2.6.0:= )
xen? (
>=app-emulation/xen-4.9.0
app-emulation/xen-tools:=
)
udev? (
virtual/libudev:=
>=x11-libs/libpciaccess-0.10.9
)
zfs? ( sys-fs/zfs )
kernel_linux? ( sys-apps/util-linux )"
DEPEND="${BDEPEND}
${RDEPEND}
${PYTHON_DEPS}"
PATCHES=(
"${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch
"${FILESDIR}"/${PN}-8.2.0-do-not-use-sysconfig.patch
"${FILESDIR}"/${PN}-8.2.0-fix-paths-for-apparmor.patch
)
pkg_setup() {
# Check kernel configuration:
CONFIG_CHECK=""
use fuse && CONFIG_CHECK+="
~FUSE_FS"
use lvm && CONFIG_CHECK+="
~BLK_DEV_DM
~DM_MULTIPATH
~DM_SNAPSHOT"
use lxc && CONFIG_CHECK+="
~BLK_CGROUP
~CGROUP_CPUACCT
~CGROUP_DEVICE
~CGROUP_FREEZER
~CGROUP_NET_PRIO
~CGROUP_PERF
~CGROUPS
~CGROUP_SCHED
~CPUSETS
~IPC_NS
~MACVLAN
~NAMESPACES
~NET_CLS_CGROUP
~NET_NS
~PID_NS
~POSIX_MQUEUE
~SECURITYFS
~USER_NS
~UTS_NS
~VETH
~!GRKERNSEC_CHROOT_MOUNT
~!GRKERNSEC_CHROOT_DOUBLE
~!GRKERNSEC_CHROOT_PIVOT
~!GRKERNSEC_CHROOT_CHMOD
~!GRKERNSEC_CHROOT_CAPS"
kernel_is lt 4 7 && use lxc && CONFIG_CHECK+="
~DEVPTS_MULTIPLE_INSTANCES"
use virt-network && CONFIG_CHECK+="
~BRIDGE_EBT_MARK_T
~BRIDGE_NF_EBTABLES
~NETFILTER_ADVANCED
~NETFILTER_XT_CONNMARK
~NETFILTER_XT_MARK
~NETFILTER_XT_TARGET_CHECKSUM
~IP_NF_FILTER
~IP_NF_MANGLE
~IP_NF_NAT
~IP_NF_TARGET_MASQUERADE
~IP6_NF_FILTER
~IP6_NF_MANGLE
~IP6_NF_NAT"
# Bandwidth Limiting Support
use virt-network && CONFIG_CHECK+="
~BRIDGE_EBT_T_NAT
~IP_NF_TARGET_REJECT
~NET_ACT_POLICE
~NET_CLS_FW
~NET_CLS_U32
~NET_SCH_HTB
~NET_SCH_INGRESS
~NET_SCH_SFQ"
ERROR_USER_NS="Optional depending on LXC configuration."
if [[ -n ${CONFIG_CHECK} ]]; then
linux-info_pkg_setup
fi
python-any-r1_pkg_setup
}
src_prepare() {
touch "${S}/.mailmap" || die
default
python_fix_shebang .
# Skip fragile tests which relies on pristine environment
# (Breaks because of sandbox environment variables)
# bug #802876
sed -i -e "/commandtest/d" tests/meson.build || die
# Tweak the init script:
cp "${FILESDIR}/libvirtd.init-r19" "${S}/libvirtd.init" || die
sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \
-i "${S}/libvirtd.init" || die "sed failed"
}
src_configure() {
local emesonargs=(
$(meson_feature apparmor)
$(meson_feature apparmor apparmor_profiles)
$(meson_feature audit)
$(meson_feature caps capng)
$(meson_feature dtrace)
$(meson_feature firewalld)
$(meson_feature fuse)
$(meson_feature glusterfs)
$(meson_feature glusterfs storage_gluster)
$(meson_feature iscsi storage_iscsi)
$(meson_feature iscsi-direct storage_iscsi_direct)
$(meson_feature libvirtd driver_libvirtd)
$(meson_feature libssh)
$(meson_feature libssh2)
$(meson_feature lvm storage_lvm)
$(meson_feature lvm storage_mpath)
$(meson_feature lxc driver_lxc)
$(meson_feature nls)
$(meson_feature numa numactl)
$(meson_feature numa numad)
$(meson_feature openvz driver_openvz)
$(meson_feature parted storage_disk)
$(meson_feature pcap libpcap)
$(meson_feature policykit polkit)
$(meson_feature qemu driver_qemu)
$(meson_feature qemu yajl)
$(meson_feature rbd storage_rbd)
$(meson_feature sasl)
$(meson_feature selinux)
$(meson_feature udev)
$(meson_feature virt-network driver_network)
$(meson_feature virtualbox driver_vbox)
$(meson_feature wireshark-plugins wireshark_dissector)
$(meson_feature xen driver_libxl)
$(meson_feature zfs storage_zfs)
-Dnetcf=disabled
-Dsanlock=disabled
-Ddriver_esx=enabled
-Dinit_script=systemd
-Dqemu_user=$(usex caps qemu root)
-Dqemu_group=$(usex caps qemu root)
-Ddriver_remote=enabled
-Dstorage_fs=enabled
-Ddriver_vmware=enabled
-Ddriver_ch=disabled
--localstatedir="${EPREFIX}/var"
-Drunstatedir="${EPREFIX}/run"
-Ddocdir="${EPREFIX}/usr/share/doc/${PF}"
)
meson_src_configure
}
src_test() {
export VIR_TEST_DEBUG=1
# Don't run the syntax check tests, they're fragile and not relevant
# to us downstream anyway.
# We also crank up the timeout (as Fedora does) just to preempt failures
# on slower arches.
meson_src_test --no-suite syntax-check --timeout-multiplier 10
}
src_install() {
meson_src_install
# Depending on configuration option, libvirt will create some bogus
# directoreis. They are either not used, or libvirtd is able to create
# them on demand, so let's remove them.
#
# Note, we are using -f here so that rm does not fail or warn if the
# directory is nonexistent.
rm -rf "${D}"/etc/sysconfig
rm -rf "${D}"/var
rm -rf "${D}"/run
use libvirtd || return 0
# From here, only libvirtd-related instructions, be warned!
newtmpfiles "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf
newinitd "${S}/libvirtd.init" libvirtd
newinitd "${FILESDIR}/libvirt-guests.init-r4" libvirt-guests
newinitd "${FILESDIR}/virtlockd.init-r2" virtlockd
newinitd "${FILESDIR}/virtlogd.init-r2" virtlogd
newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd
newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests
DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r3")
DISABLE_AUTOFORMATTING=true
readme.gentoo_create_doc
}
pkg_postinst() {
if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml || die
fi
use libvirtd || return 0
# From here, only libvirtd-related instructions, be warned!
tmpfiles_process libvirtd.conf
readme.gentoo_print_elog
}

View file

@ -1,91 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>tamiko@gentoo.org</email>
<name>Matthias Maier</name>
</maintainer>
<maintainer type="project">
<email>virtualization@gentoo.org</email>
<name>Gentoo Virtualization Project</name>
</maintainer>
<use>
<!-- Pool backend flags -->
<flag name="iscsi-direct">
Allow using libiscsi for iSCSI storage pool backend
</flag>
<flag name="iscsi">
Allow using an iSCSI remote storage server as pool for disk image storage
</flag>
<flag name="lvm">
Allow using the Logical Volume Manager (<pkg>sys-fs/lvm2</pkg>) as pool for disk image
storage
</flag>
<flag name="nfs">
Allow using Network File System mounts as pool for disk image storage
</flag>
<flag name="parted">
Allow using real disk partitions as pool for disk image storage, using
<pkg>sys-block/parted</pkg> to create, resize and delete them.
</flag>
<flag name="rbd">
Enable rados block device support via <pkg>sys-cluster/ceph</pkg>
</flag>
<!-- Virtualisation backends -->
<flag name="lxc">
Support management of Linux Containers virtualisation (<pkg>app-containers/lxc</pkg>)
</flag>
<flag name="openvz">
Support management of OpenVZ virtualisation (openvz-sources)
</flag>
<flag name="qemu">
Support management of QEMU virtualisation (<pkg>app-emulation/qemu</pkg>)
</flag>
<flag name="xen">
Support management of Xen virtualisation (<pkg>app-emulation/xen</pkg>)
</flag>
<flag name="virtualbox">
Support management of VirtualBox virtualisation (<pkg>app-emulation/virtualbox</pkg>)
</flag>
<!-- Miscellaneous flags -->
<flag name="apparmor">Enable AppArmor support</flag>
<flag name="dtrace">Enable dtrace support via <pkg>dev-util/systemtap</pkg></flag>
<flag name="fuse">Allow LXC to use <pkg>sys-fs/fuse</pkg> for mount
points</flag>
<flag name="numa">
Use NUMA for memory segmenting via <pkg>sys-process/numactl</pkg> and
<pkg>sys-process/numad</pkg>
</flag>
<flag name="libvirtd">
Builds the libvirtd daemon as well as the client utilities instead of just the client
utilities
</flag>
<flag name="libssh">
Use <pkg>net-libs/libssh</pkg> to communicate with remote libvirtd hosts,
for example: qemu+libssh://server/system
</flag>
<flag name="pcap">
Support auto learning IP addreses for routing
</flag>
<flag name="virt-network">
Enable virtual networking (NAT) support for guests. Includes all
the dependencies for NATed network mode. Effectively any network
setup that relies on libvirt to setup and configure network
interfaces on your host. This can include bridged and routed
networks ONLY if you are allowing libvirt to create and manage
the underlying devices for you. In some cases this requires
enabling the 'netcf' USE flag (currently unavailable).
</flag>
<flag name="firewalld">DBus interface to iptables/ebtables allowing
for better runtime management of your firewall.</flag>
<flag name="wireshark-plugins">
Build the <pkg>net-analyzer/wireshark</pkg> plugin for the Libvirt RPC protocol
</flag>
<flag name="glusterfs">
Enable GlusterFS support via <pkg>sys-cluster/glusterfs</pkg>
</flag>
<flag name="zfs">
Enable ZFS backend storage <pkg>sys-fs/zfs</pkg>
</flag>
</use>
</pkgmetadata>