public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/
@ 2015-08-20  1:13 Matthias Maier
  0 siblings, 0 replies; 20+ messages in thread
From: Matthias Maier @ 2015-08-20  1:13 UTC (permalink / raw
  To: gentoo-commits

commit:     aed11adf8c5bdff71154e1c5e0c375951d237f36
Author:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 18 21:08:56 2015 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Thu Aug 20 01:13:30 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aed11adf

app-emulation/libvirt: break apart OpenRC init script

This breaks apart the startup/shutdown of libvirtd from the
startup/shutdown of the libvirt domains. Additionally this expands out
the domain support to work for all the libvirtd backends instead of just
QEMU.

Signed-off-by: Doug Goldstein <cardoe <AT> gentoo.org>
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 app-emulation/libvirt/files/libvirt-guests.confd |  49 ++++++
 app-emulation/libvirt/files/libvirt-guests.init  | 215 +++++++++++++++++++++++
 app-emulation/libvirt/files/libvirtd.confd-r5    |  13 ++
 app-emulation/libvirt/files/libvirtd.init-r15    |  35 ++++
 4 files changed, 312 insertions(+)

diff --git a/app-emulation/libvirt/files/libvirt-guests.confd b/app-emulation/libvirt/files/libvirt-guests.confd
new file mode 100644
index 0000000..6e98dc2
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-guests.confd
@@ -0,0 +1,49 @@
+# /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_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"

diff --git a/app-emulation/libvirt/files/libvirt-guests.init b/app-emulation/libvirt/files/libvirt-guests.init
new file mode 100644
index 0000000..045f04d
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-guests.init
@@ -0,0 +1,215 @@
+#!/sbin/runscript
+
+description="Virtual Machine Management (libvirt) Guests"
+
+depend() {
+	need 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
+	do_virsh "$1" list --uuid $2
+}
+
+libvirtd_dom_count() {
+	libvirtd_dom_list "$1" $2 | wc -l
+}
+
+libvirtd_net_list() {
+	# Only work with networks by their UUIDs
+	do_virsh "$1" net-list --uuid $2
+}
+
+libvirtd_net_count() {
+	libvirtd_net_list "$1" $2 | 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_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}"
+
+		if [ "${persist}" = "--persistent" ]; then
+			# Save our running state
+			echo "${uri} ${uuid}" >> ${gueststatefile}
+
+		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
+		echo -n "."
+	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}"
+
+	# start networks
+	ebegin "Starting libvirt networks"
+	while read -r line
+	do
+		# tokenize the data
+		read -r uri uuid <<<"${line}"
+		# 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 line
+	do
+		# tokenize the data
+		read -r uri uuid <<<"${line}"
+		# ignore trash
+		[ -z "${uri}" ] || [ -z "${uuid}" ] && continue
+
+		name=$(do_virsh "${uri}" domname ${uuid})
+		einfo "  ${name}"
+		do_virsh "${uri}" start ${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
+}

diff --git a/app-emulation/libvirt/files/libvirtd.confd-r5 b/app-emulation/libvirt/files/libvirtd.confd-r5
new file mode 100644
index 0000000..3463cb9
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirtd.confd-r5
@@ -0,0 +1,13 @@
+# /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"
+
+# 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"

diff --git a/app-emulation/libvirt/files/libvirtd.init-r15 b/app-emulation/libvirt/files/libvirtd.init-r15
new file mode 100644
index 0000000..7b95bd8
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirtd.init-r15
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+
+description="Virtual Machine Management daemon (libvirt)"
+
+depend() {
+	USE_FLAG_FIREWALLD
+	use USE_FLAG_AVAHI USE_FLAG_ISCSI USE_FLAG_RBD dbus virtlockd
+	after ntp-client ntpd nfs nfsmount portmap rpc.statd iptables ip6tables ebtables corosync sanlock cgconfig xenconsoled
+}
+
+start() {
+	# Test configuration directories in /etc/libvirt/ to be either not
+	# present or a directory, i.e. not a regular file, bug #532892
+	for dir in lxc nwfilter qemu storage; do
+		if [ -f /etc/libvirt/$dir ]; then
+			eerror "/etc/libvirt/$dir was created as a regular file. It must be either"
+			eerror "a directory or not present for libvirtd to start up successfully."
+			return 1
+		fi
+	done
+
+	ebegin "Starting libvirtd"
+	start-stop-daemon --start \
+		--env KRB5_KTNAME=/etc/libvirt/krb5.tab \
+		--exec /usr/sbin/libvirtd --pidfile=/var/run/libvirtd.pid \
+		-- -d ${LIBVIRTD_OPTS}
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping libvirtd without shutting down your VMs"
+	start-stop-daemon --stop --quiet --exec \
+		/usr/sbin/libvirtd --pidfile=/var/run/libvirtd.pid
+	eend $?
+}


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/
@ 2015-08-28 13:48 Doug Goldstein
  0 siblings, 0 replies; 20+ messages in thread
From: Doug Goldstein @ 2015-08-28 13:48 UTC (permalink / raw
  To: gentoo-commits

commit:     5ed04d55b9a56c932128d867b596bebc6e3ff4ce
Author:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 28 13:35:39 2015 +0000
Commit:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Fri Aug 28 13:47:55 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ed04d55

app-emulation/libvirt: tweak libvirt-guests init script

After discussing the new init script on bug #558034 there are two tweaks
being added:
* shift the first argument so that future uses can pass in more arguments
  to virsh and the wrapper commands.
* Added LIBVIRT_IGNORE_AUTOSTART to ignore domains that start marked for
  autostart in the libvirt XML.

Signed-off-by: Doug Goldstein <cardoe <AT> gentoo.org>

 app-emulation/libvirt/files/libvirt-guests.confd | 10 +++++++
 app-emulation/libvirt/files/libvirt-guests.init  | 33 +++++++++++++++++++-----
 2 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/app-emulation/libvirt/files/libvirt-guests.confd b/app-emulation/libvirt/files/libvirt-guests.confd
index 6e98dc2..514c8ee 100644
--- a/app-emulation/libvirt/files/libvirt-guests.confd
+++ b/app-emulation/libvirt/files/libvirt-guests.confd
@@ -39,6 +39,16 @@
 #LIBVIRT_MAXWAIT="500"
 
 
+# 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,

diff --git a/app-emulation/libvirt/files/libvirt-guests.init b/app-emulation/libvirt/files/libvirt-guests.init
index 045f04d..2b63dea 100644
--- a/app-emulation/libvirt/files/libvirt-guests.init
+++ b/app-emulation/libvirt/files/libvirt-guests.init
@@ -38,20 +38,32 @@ do_virsh() {
 
 libvirtd_dom_list() {
 	# Only work with domains by their UUIDs
-	do_virsh "$1" list --uuid $2
+	local hvuri=$1
+	shift
+
+	do_virsh "${hvuri}" list --uuid $@
 }
 
 libvirtd_dom_count() {
-	libvirtd_dom_list "$1" $2 | wc -l
+	local hvuri=$1
+	shift
+
+	libvirtd_dom_list "${hvuri}" $@ | wc -l
 }
 
 libvirtd_net_list() {
 	# Only work with networks by their UUIDs
-	do_virsh "$1" net-list --uuid $2
+	local hvuri=$1
+	shift
+
+	do_virsh "${hvuri}" net-list --uuid $@
 }
 
 libvirtd_net_count() {
-	libvirtd_net_list "$1" $2 | wc -l
+	local hvuri=$1
+	shift
+
+	libvirtd_net_list "${hvuri}" $@ | wc -l
 }
 
 libvirtd_dom_stop() {
@@ -64,6 +76,7 @@ libvirtd_dom_stop() {
 	local shutdown_type=${LIBVIRT_SHUTDOWN}
 	local counter=${LIBVIRT_MAXWAIT}
 	local dom_name=
+	local dom_as=
 	local dom_ids=
 	local uuid=
 	local dom_count=
@@ -80,10 +93,18 @@ libvirtd_dom_stop() {
 		# 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
-			echo "${uri} ${uuid}" >> ${gueststatefile}
+			# 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
 


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/
@ 2015-09-02 16:03 Doug Goldstein
  0 siblings, 0 replies; 20+ messages in thread
From: Doug Goldstein @ 2015-09-02 16:03 UTC (permalink / raw
  To: gentoo-commits

commit:     b0afe0c6c4e48467ae3ca48dd453c0206f18461d
Author:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
AuthorDate: Wed Sep  2 15:14:25 2015 +0000
Commit:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Wed Sep  2 16:02:57 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0afe0c6

app-emulation/libvirt: update new init scripts

More updates to the init scripts to allow the user to not have the
networks or VMs started up that were shutdown by the init script based
on requests from tamiko and bug #558034.

 app-emulation/libvirt/files/libvirt-guests.confd | 9 +++++++++
 app-emulation/libvirt/files/libvirt-guests.init  | 3 +++
 2 files changed, 12 insertions(+)

diff --git a/app-emulation/libvirt/files/libvirt-guests.confd b/app-emulation/libvirt/files/libvirt-guests.confd
index 514c8ee..ed2ce58 100644
--- a/app-emulation/libvirt/files/libvirt-guests.confd
+++ b/app-emulation/libvirt/files/libvirt-guests.confd
@@ -39,6 +39,15 @@
 #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

diff --git a/app-emulation/libvirt/files/libvirt-guests.init b/app-emulation/libvirt/files/libvirt-guests.init
index 2b63dea..c38a0f0 100644
--- a/app-emulation/libvirt/files/libvirt-guests.init
+++ b/app-emulation/libvirt/files/libvirt-guests.init
@@ -179,6 +179,9 @@ start() {
 	[ ! -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 line


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/
@ 2015-09-11 14:25 Doug Goldstein
  0 siblings, 0 replies; 20+ messages in thread
From: Doug Goldstein @ 2015-09-11 14:25 UTC (permalink / raw
  To: gentoo-commits

commit:     05d61cc5818612056666915e2e4177ada55c5583
Author:     Thomas D <whissi <AT> whissi <DOT> de>
AuthorDate: Fri Sep 11 13:06:48 2015 +0000
Commit:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Fri Sep 11 14:25:08 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05d61cc5

app-emulation/libvirt: improve new init scripts

Improvement to the new init scripts to use more bits from runscripts
instead of rolling our own.

Signed-off-by: Doug Goldstein <cardoe <AT> gentoo.org>

 app-emulation/libvirt/files/libvirtd.confd-r5 |  5 ++++
 app-emulation/libvirt/files/libvirtd.init-r15 | 33 +++++++++++++++------------
 2 files changed, 23 insertions(+), 15 deletions(-)

diff --git a/app-emulation/libvirt/files/libvirtd.confd-r5 b/app-emulation/libvirt/files/libvirtd.confd-r5
index 3463cb9..c326531 100644
--- a/app-emulation/libvirt/files/libvirtd.confd-r5
+++ b/app-emulation/libvirt/files/libvirtd.confd-r5
@@ -6,6 +6,11 @@
 # 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

diff --git a/app-emulation/libvirt/files/libvirtd.init-r15 b/app-emulation/libvirt/files/libvirtd.init-r15
index 7b95bd8..0c529bd 100644
--- a/app-emulation/libvirt/files/libvirtd.init-r15
+++ b/app-emulation/libvirt/files/libvirtd.init-r15
@@ -1,35 +1,38 @@
 #!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
 
 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="-d ${LIBVIRTD_OPTS}"
+start_stop_daemon_args="--env KRB5_KTNAME=/etc/libvirt/krb5.tab"
+pidfile="/var/run/libvirtd.pid"
+retry="${LIBVIRTD_TERMTIMEOUT}"
+
 depend() {
 	USE_FLAG_FIREWALLD
 	use USE_FLAG_AVAHI USE_FLAG_ISCSI USE_FLAG_RBD dbus virtlockd
 	after ntp-client ntpd nfs nfsmount portmap rpc.statd iptables ip6tables ebtables corosync sanlock cgconfig xenconsoled
 }
 
-start() {
+start_pre() {
 	# Test configuration directories in /etc/libvirt/ to be either not
 	# present or a directory, i.e. not a regular file, bug #532892
+	local has_errors=0
+	ebegin "Checking for suitable directories in \"/etc/libvirt\""
+
 	for dir in lxc nwfilter qemu storage; do
 		if [ -f /etc/libvirt/$dir ]; then
+			has_errors=1
 			eerror "/etc/libvirt/$dir was created as a regular file. It must be either"
 			eerror "a directory or not present for libvirtd to start up successfully."
-			return 1
 		fi
 	done
 
-	ebegin "Starting libvirtd"
-	start-stop-daemon --start \
-		--env KRB5_KTNAME=/etc/libvirt/krb5.tab \
-		--exec /usr/sbin/libvirtd --pidfile=/var/run/libvirtd.pid \
-		-- -d ${LIBVIRTD_OPTS}
-	eend $?
-}
-
-stop() {
-	ebegin "Stopping libvirtd without shutting down your VMs"
-	start-stop-daemon --stop --quiet --exec \
-		/usr/sbin/libvirtd --pidfile=/var/run/libvirtd.pid
-	eend $?
+	eend ${has_errors} "Please correct the error(s) above"
 }


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/
@ 2018-06-29  4:50 Matthias Maier
  0 siblings, 0 replies; 20+ messages in thread
From: Matthias Maier @ 2018-06-29  4:50 UTC (permalink / raw
  To: gentoo-commits

commit:     be4417b793846de3ccc0290888d2666280547462
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 29 04:12:26 2018 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Fri Jun 29 04:12:32 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be4417b7

app-emulation/libvirt: drop old patches

Package-Manager: Portage-2.3.41, Repoman-2.3.9

 .../files/libvirt-4.1.0-do_not_use_sysconf.patch   | 204 ---------------------
 .../files/libvirt-4.1.0-unbreak_my_bridge.patch    |  78 --------
 2 files changed, 282 deletions(-)

diff --git a/app-emulation/libvirt/files/libvirt-4.1.0-do_not_use_sysconf.patch b/app-emulation/libvirt/files/libvirt-4.1.0-do_not_use_sysconf.patch
deleted file mode 100644
index 2c8339a8b51..00000000000
--- a/app-emulation/libvirt/files/libvirt-4.1.0-do_not_use_sysconf.patch
+++ /dev/null
@@ -1,204 +0,0 @@
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 3bf2da5..6b3f37a 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -2165,23 +2165,6 @@ EXTRA_DIST += \
- 	$(SYSCONF_FILES) \
- 	$(NULL)
- 
--install-sysconfig:
--	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
--	for f in $(SYSCONF_FILES:%.sysconf=%) ; \
--	do \
--	  tgt=`basename $$f`; \
--	  $(INSTALL_SCRIPT) $(srcdir)/$$f.sysconf \
--	      $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
--	done
--
--uninstall-sysconfig:
--	for f in $(SYSCONF_FILES:%.sysconf=%) ; \
--	do \
--	  tgt=`basename $$f`; \
--	  rm -f $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
--	done
--	rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
--
- SYSVINIT_FILES_IN = \
- 	locking/virtlockd.init.in \
- 	logging/virtlogd.init.in \
-@@ -2268,14 +2251,14 @@ uninstall-polkit::
- endif ! WITH_POLKIT
- 
- if LIBVIRT_INIT_SCRIPT_RED_HAT
--install-init:: $(SYSVINIT_FILES) install-sysconfig
-+install-init:: $(SYSVINIT_FILES)
- 	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d
- 	for f in $(SYSVINIT_FILES:%.init=%) ; \
- 	do \
- 	  $(INSTALL_SCRIPT) $$f.init $(DESTDIR)$(sysconfdir)/rc.d/init.d/$$f; \
- 	done
- 
--uninstall-init:: uninstall-sysconfig
-+uninstall-init::
- 	rm -f $(SYSVINIT_FILES:%.init=$(DESTDIR)$(sysconfdir)/rc.d/init.d/%)
- 	rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d || :
- 
-diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in
-index 3c9d587..2449b20 100644
---- a/src/locking/virtlockd.service.in
-+++ b/src/locking/virtlockd.service.in
-@@ -7,8 +7,7 @@ Documentation=man:virtlockd(8)
- Documentation=https://libvirt.org
- 
- [Service]
--EnvironmentFile=-/etc/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
-diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in
-index 3d9ae36..4373619 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=-/etc/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
-diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in
-index 769702e..1830c72 100644
---- a/src/remote/libvirtd.service.in
-+++ b/src/remote/libvirtd.service.in
-@@ -21,8 +21,7 @@ Documentation=https://libvirt.org
- 
- [Service]
- Type=notify
--EnvironmentFile=-/etc/sysconfig/libvirtd
--ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
-+ExecStart=@sbindir@/libvirtd
- ExecReload=/bin/kill -HUP $MAINPID
- KillMode=process
- Restart=on-failure
-diff --git a/tools/Makefile.am b/tools/Makefile.am
-index 85e640b..99b9fa1 100644
---- a/tools/Makefile.am
-+++ b/tools/Makefile.am
-@@ -336,15 +336,6 @@ install-data-local: install-init install-systemd install-nss \
- uninstall-local: uninstall-init uninstall-systemd uninstall-nss \
- 	uninstall-bash-completion
- 
--install-sysconfig:
--	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
--	$(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
--	  $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
--
--uninstall-sysconfig:
--	rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
--	rmdir $(DESTDIR)$(sysconfdir)/sysconfig ||:
--
- EXTRA_DIST += libvirt-guests.sh.in libvirt-guests.init.in
- 
- install-initscript: libvirt-guests.init
-@@ -359,8 +350,8 @@ uninstall-initscript:
- 
- if LIBVIRT_INIT_SCRIPT_RED_HAT
- BUILT_SOURCES += libvirt-guests.init
--install-init: install-sysconfig install-initscript
--uninstall-init: uninstall-sysconfig uninstall-initscript
-+install-init: install-initscript
-+uninstall-init: uninstall-initscript
- else ! LIBVIRT_INIT_SCRIPT_RED_HAT
- install-init:
- uninstall-init:
-diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in
-index 491ca62..f0f417b 100644
---- a/tools/libvirt-guests.service.in
-+++ b/tools/libvirt-guests.service.in
-@@ -10,7 +10,7 @@ Documentation=man:libvirtd(8)
- Documentation=https://libvirt.org
- 
- [Service]
--EnvironmentFile=-/etc/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
-diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf
-index 08204ca..2da172b 100644
---- a/tools/libvirt-guests.sysconf
-+++ b/tools/libvirt-guests.sysconf
-@@ -1,3 +1,10 @@
-+#
-+# 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
-+#
-+
-+
- # URIs to check for running guests
- # example: URIS='default xen:/// vbox+tcp://host/system lxc:///'
- #URIS=default
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 6b3f37a..48e7133 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -2417,14 +2417,14 @@ SYSTEMD_UNIT_FILES = $(notdir $(SYSTEMD_UNIT_FILES_IN:%.in=%))
- BUILT_SOURCES += $(SYSTEMD_UNIT_FILES)
- DISTCLEANFILES += $(SYSTEMD_UNIT_FILES)
- 
--install-systemd: $(SYSTEMD_UNIT_FILES) install-sysconfig
-+install-systemd: $(SYSTEMD_UNIT_FILES)
- 	$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
- 	for f in $(SYSTEMD_UNIT_FILES); \
- 	do \
- 	  $(INSTALL_DATA) $$f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ ; \
- 	done
- 
--uninstall-systemd: uninstall-sysconfig
-+uninstall-systemd:
- 	rm -f $(SYSTEMD_UNIT_FILES:%=$(DESTDIR)$(SYSTEMD_UNIT_DIR)/%)
- 	rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
- else ! LIBVIRT_INIT_SCRIPT_SYSTEMD
-@@ -2496,7 +2496,7 @@ EXTRA_DIST += $(UPSTART_FILES)
- if WITH_LIBVIRTD
- if LIBVIRT_INIT_SCRIPT_UPSTART
- 
--install-upstart: install-sysconfig
-+install-upstart:
- 	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/event.d
- 	for f in $(UPSTART_FILES:%.upstart=%); \
- 	do \
-@@ -2505,7 +2505,7 @@ install-upstart: install-sysconfig
- 	      $(DESTDIR)$(sysconfdir)/event.d/$$tgt ; \
- 	done
- 
--uninstall-upstart: uninstall-sysconfig
-+uninstall-upstart:
- 	for f in $(UPSTART_FILES:%.upstart=%); \
- 	do \
- 	  tgt=`basename $$f` ; \
-diff --git a/tools/Makefile.am b/tools/Makefile.am
-index 99b9fa1..37e037c 100644
---- a/tools/Makefile.am
-+++ b/tools/Makefile.am
-@@ -382,12 +382,12 @@ EXTRA_DIST += libvirt-guests.service.in
- SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
- 
- if LIBVIRT_INIT_SCRIPT_SYSTEMD
--install-systemd: libvirt-guests.service install-sysconfig libvirt-guests.sh
-+install-systemd: libvirt-guests.service libvirt-guests.sh
- 	$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
- 	$(INSTALL_DATA) libvirt-guests.service \
- 	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
- 
--uninstall-systemd: uninstall-sysconfig
-+uninstall-systemd:
- 	rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
- 	rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||:
- 

diff --git a/app-emulation/libvirt/files/libvirt-4.1.0-unbreak_my_bridge.patch b/app-emulation/libvirt/files/libvirt-4.1.0-unbreak_my_bridge.patch
deleted file mode 100644
index c4d24ec020b..00000000000
--- a/app-emulation/libvirt/files/libvirt-4.1.0-unbreak_my_bridge.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-[PATCH] conf: avoid reporting errors when network driver is disabled
-
-In previous releases all these methods were a no-op if the network
-driver is disabled. These helper methods are called unconditionally for
-all types of network interface, so must be no-ops if missing. Other code
-will already generate an error if the network driver is disabled and a
-NIC with type=network is used.
-
-Signed-off-by: Daniel P. Berrangé <berrange redhat com>
----
- src/conf/domain_conf.c | 23 +++++++++--------------
- 1 file changed, 9 insertions(+), 14 deletions(-)
-
-diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
-index c8d051fa9f..79d6bd378e 100644
---- a/src/conf/domain_conf.c
-+++ b/src/conf/domain_conf.c
-@@ -28979,10 +28979,13 @@ int
- virDomainNetAllocateActualDevice(virDomainDefPtr dom,
-                                  virDomainNetDefPtr iface)
- {
-+    /* Just silently ignore if network driver isn't present. If something
-+     * has tried to use a NIC with type=network, other code will already
-+     * cause an error. This ensures type=bridge doesn't break when
-+     * network driver is compiled out.
-+     */
-     if (!netAllocate) {
--        virReportError(VIR_ERR_NO_SUPPORT, "%s",
--                       _("Network device allocation not available"));
--        return -1;
-+        return 0;
-     }
- 
-     return netAllocate(dom, iface);
-@@ -28993,8 +28996,6 @@ virDomainNetNotifyActualDevice(virDomainDefPtr dom,
-                                virDomainNetDefPtr iface)
- {
-     if (!netNotify) {
--        virReportError(VIR_ERR_NO_SUPPORT, "%s",
--                       _("Network device notification not available"));
-         return;
-     }
- 
-@@ -29007,9 +29008,7 @@ virDomainNetReleaseActualDevice(virDomainDefPtr dom,
-                                 virDomainNetDefPtr iface)
- {
-     if (!netRelease) {
--        virReportError(VIR_ERR_NO_SUPPORT, "%s",
--                       _("Network device release not available"));
--        return -1;
-+        return 0;
-     }
- 
-     return netRelease(dom, iface);
-@@ -29020,9 +29019,7 @@ virDomainNetBandwidthChangeAllowed(virDomainNetDefPtr iface,
-                                    virNetDevBandwidthPtr newBandwidth)
- {
-     if (!netBandwidthChangeAllowed) {
--        virReportError(VIR_ERR_NO_SUPPORT, "%s",
--                       _("Network device bandwidth change query not available"));
--        return -1;
-+        return 0;
-     }
- 
-     return netBandwidthChangeAllowed(iface, newBandwidth);
-@@ -29033,9 +29030,7 @@ virDomainNetBandwidthUpdate(virDomainNetDefPtr iface,
-                             virNetDevBandwidthPtr newBandwidth)
- {
-     if (!netBandwidthUpdate) {
--        virReportError(VIR_ERR_NO_SUPPORT, "%s",
--                       _("Network device bandwidth update not available"));
--        return -1;
-+        return 0;
-     }
- 
-     return netBandwidthUpdate(iface, newBandwidth);
--- 
-2.14.3


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/
@ 2019-03-26 16:45 Patrice Clement
  0 siblings, 0 replies; 20+ messages in thread
From: Patrice Clement @ 2019-03-26 16:45 UTC (permalink / raw
  To: gentoo-commits

commit:     6070ea7ab02610a1b970815ab790f24f85d82986
Author:     Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Mon Mar 25 18:09:05 2019 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Tue Mar 26 16:45:21 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6070ea7a

app-emulation/libvirt: remove unused patches.

Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11496
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 .../files/libvirt-4.10.0-fix_apparmor_rules.patch  |  14 --
 .../libvirt-4.5.0-fix_typo_in_apparmor_rule.patch  |  13 --
 app-emulation/libvirt/files/libvirt-guests.init-r2 | 235 ---------------------
 3 files changed, 262 deletions(-)

diff --git a/app-emulation/libvirt/files/libvirt-4.10.0-fix_apparmor_rules.patch b/app-emulation/libvirt/files/libvirt-4.10.0-fix_apparmor_rules.patch
deleted file mode 100644
index e561bf42451..00000000000
--- a/app-emulation/libvirt/files/libvirt-4.10.0-fix_apparmor_rules.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/examples/apparmor/usr.lib.libvirt.virt-aa-helper b/examples/apparmor/usr.lib.libvirt.virt-aa-helper
-index de94368..5fbae27 100644
---- a/examples/apparmor/usr.lib.libvirt.virt-aa-helper
-+++ b/examples/apparmor/usr.lib.libvirt.virt-aa-helper
-@@ -39,6 +39,9 @@ profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
-   /etc/apparmor.d/libvirt/* r,
-   /etc/apparmor.d/libvirt/libvirt-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]* rw,
- 
-+  # Gentoo specific path for uefi firmware
-+  /usr/share/edk2-ovmf/* r,
-+
-   # for backingstore -- allow access to non-hidden files in @{HOME} as well
-   # as storage pools
-   audit deny @{HOME}/.* mrwkl,

diff --git a/app-emulation/libvirt/files/libvirt-4.5.0-fix_typo_in_apparmor_rule.patch b/app-emulation/libvirt/files/libvirt-4.5.0-fix_typo_in_apparmor_rule.patch
deleted file mode 100644
index 4d1bfaf5e3b..00000000000
--- a/app-emulation/libvirt/files/libvirt-4.5.0-fix_typo_in_apparmor_rule.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/examples/apparmor/usr.libexec.virt-aa-helper b/examples/apparmor/usr.libexec.virt-aa-helper
-index d21723f..99ab4ea 100644
---- a/examples/apparmor/usr.libexec.virt-aa-helper
-+++ b/examples/apparmor/usr.libexec.virt-aa-helper
-@@ -50,7 +50,7 @@ profile virt-aa-helper /usr/libexec/virt-aa-helper {
-   @{HOME}/** r,
-   /var/lib/libvirt/images/ r,
-   /var/lib/libvirt/images/** r,
--  /var/lib/nova/instances/_base/* r
-+  /var/lib/nova/instances/_base/* r,
-   /{media,mnt,opt,srv}/** r,
-   # For virt-sandbox
-   /{,var/}run/libvirt/**/[sv]d[a-z] r,

diff --git a/app-emulation/libvirt/files/libvirt-guests.init-r2 b/app-emulation/libvirt/files/libvirt-guests.init-r2
deleted file mode 100644
index 84559189949..00000000000
--- a/app-emulation/libvirt/files/libvirt-guests.init-r2
+++ /dev/null
@@ -1,235 +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
-
-	do_virsh "${hvuri}" list --uuid $@
-}
-
-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
-	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
-}


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/
@ 2019-05-19 23:42 Matthias Maier
  0 siblings, 0 replies; 20+ messages in thread
From: Matthias Maier @ 2019-05-19 23:42 UTC (permalink / raw
  To: gentoo-commits

commit:     441d105c0035db3b557d03c66a24db90851af424
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Sun May 19 22:14:34 2019 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Sun May 19 23:42:11 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=441d105c

app-emulation/libvirt: change '/var/run' to '/run' in rc init files

(No revision bump for this minor change - a new revision for libvirt has
to be stabilized for the mds vulnearbilities anyway, so let's just sneak
this in :-))

Closes: https://bugs.gentoo.org/685302
Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 app-emulation/libvirt/files/libvirtd.init-r16 | 4 ++--
 app-emulation/libvirt/files/libvirtd.init-r17 | 2 +-
 app-emulation/libvirt/files/virtlockd.init-r1 | 4 ++--
 app-emulation/libvirt/files/virtlogd.init-r1  | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/app-emulation/libvirt/files/libvirtd.init-r16 b/app-emulation/libvirt/files/libvirtd.init-r16
index be660e35a1d..2a3fb52696a 100644
--- a/app-emulation/libvirt/files/libvirtd.init-r16
+++ b/app-emulation/libvirt/files/libvirtd.init-r16
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 description="Virtual Machine Management daemon (libvirt)"
@@ -10,7 +10,7 @@ LIBVIRTD_TIMEOUT=${LIBVIRTD_TERMTIMEOUT:-"TERM/25/KILL/5"}
 command="/usr/sbin/libvirtd"
 command_args="-d ${LIBVIRTD_OPTS}"
 start_stop_daemon_args="--env KRB5_KTNAME=/etc/libvirt/krb5.tab"
-pidfile="/var/run/libvirtd.pid"
+pidfile="/run/libvirtd.pid"
 retry="${LIBVIRTD_TERMTIMEOUT}"
 
 depend() {

diff --git a/app-emulation/libvirt/files/libvirtd.init-r17 b/app-emulation/libvirt/files/libvirtd.init-r17
index ca3f872e14e..0f89df82db4 100644
--- a/app-emulation/libvirt/files/libvirtd.init-r17
+++ b/app-emulation/libvirt/files/libvirtd.init-r17
@@ -10,7 +10,7 @@ LIBVIRTD_TIMEOUT=${LIBVIRTD_TERMTIMEOUT:-"TERM/25/KILL/5"}
 command="/usr/sbin/libvirtd"
 command_args="-d ${LIBVIRTD_OPTS}"
 start_stop_daemon_args="--env KRB5_KTNAME=/etc/libvirt/krb5.tab"
-pidfile="/var/run/libvirtd.pid"
+pidfile="/run/libvirtd.pid"
 retry="${LIBVIRTD_TERMTIMEOUT}"
 
 depend() {

diff --git a/app-emulation/libvirt/files/virtlockd.init-r1 b/app-emulation/libvirt/files/virtlockd.init-r1
index e7c3db2990e..1e812d870c1 100644
--- a/app-emulation/libvirt/files/virtlockd.init-r1
+++ b/app-emulation/libvirt/files/virtlockd.init-r1
@@ -1,11 +1,11 @@
 #!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 description="libvirt virtual machine lock manager"
 command="/usr/sbin/virtlockd"
 command_args="-d"
-pidfile="/var/run/virtlockd.pid"
+pidfile="/run/virtlockd.pid"
 
 extra_started_commands="reload"
 description_reload="re-exec the daemon, while maintaining locks and clients"

diff --git a/app-emulation/libvirt/files/virtlogd.init-r1 b/app-emulation/libvirt/files/virtlogd.init-r1
index 438070e344d..ff9c2446e8c 100644
--- a/app-emulation/libvirt/files/virtlogd.init-r1
+++ b/app-emulation/libvirt/files/virtlogd.init-r1
@@ -1,11 +1,11 @@
 #!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 description="libvirt virtual machine logging manager"
 command="/usr/sbin/virtlogd"
 command_args="-d"
-pidfile="/var/run/virtlogd.pid"
+pidfile="/run/virtlogd.pid"
 
 extra_started_commands="reload"
 description_reload="re-exec the daemon, while maintaining open connections"


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/
@ 2019-06-18  0:35 Aaron Bauman
  0 siblings, 0 replies; 20+ messages in thread
From: Aaron Bauman @ 2019-06-18  0:35 UTC (permalink / raw
  To: gentoo-commits

commit:     895d8815b57da56d536c5ef5ff4a08ffd9a0317a
Author:     Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Sun Jun  2 13:02:46 2019 +0000
Commit:     Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Tue Jun 18 00:34:59 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=895d8815

app-emulation/libvirt: remove unused patches

Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/12170
Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>

 .../files/libvirt-5.0.0-do-not-use-sysconf.patch   | 216 ---------------------
 .../files/libvirt-5.1.0-do-not-use-sysconf.patch   | 196 -------------------
 2 files changed, 412 deletions(-)

diff --git a/app-emulation/libvirt/files/libvirt-5.0.0-do-not-use-sysconf.patch b/app-emulation/libvirt/files/libvirt-5.0.0-do-not-use-sysconf.patch
deleted file mode 100644
index d4e37e4164a..00000000000
--- a/app-emulation/libvirt/files/libvirt-5.0.0-do-not-use-sysconf.patch
+++ /dev/null
@@ -1,216 +0,0 @@
-From 947ef7a44e94989f324e0d533499454d540fdef9 Mon Sep 17 00:00:00 2001
-Message-Id: <947ef7a44e94989f324e0d533499454d540fdef9.1547196492.git.mprivozn@redhat.com>
-From: Michal Privoznik <mprivozn@redhat.com>
-Date: Tue, 26 Jun 2018 06:51:06 +0200
-Subject: [PATCH] gentoo: do not use sysconf
-
-Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
----
- src/Makefile.am                  | 29 ++++++-----------------------
- src/locking/virtlockd.service.in |  3 +--
- src/logging/virtlogd.service.in  |  3 +--
- src/remote/libvirtd.service.in   |  3 +--
- tools/Makefile.am                | 17 ++++-------------
- tools/libvirt-guests.service.in  |  2 +-
- tools/libvirt-guests.sysconf     |  7 +++++++
- 7 files changed, 21 insertions(+), 43 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index cd386297ed..52a63885d6 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -756,23 +756,6 @@ endif WITH_SETUID_RPC_CLIENT
- 
- EXTRA_DIST += $(SYSCONF_FILES)
- 
--install-sysconfig:
--	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
--	for f in $(SYSCONF_FILES:%.sysconf=%) ; \
--	do \
--	  tgt=`basename $$f`; \
--	  $(INSTALL_DATA) $(srcdir)/$$f.sysconf \
--	      $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
--	done
--
--uninstall-sysconfig:
--	for f in $(SYSCONF_FILES:%.sysconf=%) ; \
--	do \
--	  tgt=`basename $$f`; \
--	  rm -f $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
--	done
--	rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
--
- SYSVINIT_FILES_IN += \
- 	locking/virtlockd.init.in \
- 	$(NULL)
-@@ -816,14 +799,14 @@ if WITH_LIBVIRTD
- if LIBVIRT_INIT_SCRIPT_RED_HAT
- initdir = $(sysconfdir)/rc.d/init.d
- 
--install-init:: $(SYSVINIT_FILES) install-sysconfig
-+install-init:: $(SYSVINIT_FILES)
- 	$(MKDIR_P) $(DESTDIR)$(initdir)
- 	for f in $(SYSVINIT_FILES:%.init=%) ; \
- 	do \
- 	  $(INSTALL_SCRIPT) $$f.init $(DESTDIR)$(initdir)/$$f; \
- 	done
- 
--uninstall-init:: uninstall-sysconfig
-+uninstall-init::
- 	rm -f $(SYSVINIT_FILES:%.init=$(DESTDIR)$(initdir)/%)
- 	rmdir $(DESTDIR)$(initdir) || :
- 
-@@ -862,14 +845,14 @@ SYSTEMD_UNIT_FILES = $(notdir $(SYSTEMD_UNIT_FILES_IN:%.in=%))
- BUILT_SOURCES += $(SYSTEMD_UNIT_FILES)
- DISTCLEANFILES += $(SYSTEMD_UNIT_FILES)
- 
--install-systemd: $(SYSTEMD_UNIT_FILES) install-sysconfig
-+install-systemd: $(SYSTEMD_UNIT_FILES)
- 	$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
- 	for f in $(SYSTEMD_UNIT_FILES); \
- 	do \
- 	  $(INSTALL_DATA) $$f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ ; \
- 	done
- 
--uninstall-systemd: uninstall-sysconfig
-+uninstall-systemd:
- 	rm -f $(SYSTEMD_UNIT_FILES:%=$(DESTDIR)$(SYSTEMD_UNIT_DIR)/%)
- 	rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
- 
-@@ -884,7 +867,7 @@ EXTRA_DIST += $(UPSTART_FILES)
- if WITH_LIBVIRTD
- if LIBVIRT_INIT_SCRIPT_UPSTART
- 
--install-upstart: install-sysconfig
-+install-upstart:
- 	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/event.d
- 	for f in $(UPSTART_FILES:%.upstart=%); \
- 	do \
-@@ -893,7 +876,7 @@ install-upstart: install-sysconfig
- 	      $(DESTDIR)$(sysconfdir)/event.d/$$tgt ; \
- 	done
- 
--uninstall-upstart: uninstall-sysconfig
-+uninstall-upstart:
- 	for f in $(UPSTART_FILES:%.upstart=%); \
- 	do \
- 	  tgt=`basename $$f` ; \
-diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in
-index 3c9d587032..2449b201d9 100644
---- a/src/locking/virtlockd.service.in
-+++ b/src/locking/virtlockd.service.in
-@@ -7,8 +7,7 @@ Documentation=man:virtlockd(8)
- Documentation=https://libvirt.org
- 
- [Service]
--EnvironmentFile=-/etc/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
-diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in
-index 3d9ae36150..43736191d5 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=-/etc/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
-diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in
-index 7f689e08a8..239beeced9 100644
---- a/src/remote/libvirtd.service.in
-+++ b/src/remote/libvirtd.service.in
-@@ -22,8 +22,7 @@ Documentation=https://libvirt.org
- 
- [Service]
- Type=notify
--EnvironmentFile=-/etc/sysconfig/libvirtd
--ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
-+ExecStart=@sbindir@/libvirtd
- ExecReload=/bin/kill -HUP $MAINPID
- KillMode=process
- Restart=on-failure
-diff --git a/tools/Makefile.am b/tools/Makefile.am
-index 613c9a77f0..224b511074 100644
---- a/tools/Makefile.am
-+++ b/tools/Makefile.am
-@@ -339,15 +339,6 @@ install-data-local: install-init install-systemd install-nss \
- uninstall-local: uninstall-init uninstall-systemd uninstall-nss \
- 	uninstall-bash-completion
- 
--install-sysconfig:
--	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
--	$(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
--	  $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
--
--uninstall-sysconfig:
--	rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
--	rmdir $(DESTDIR)$(sysconfdir)/sysconfig ||:
--
- EXTRA_DIST += libvirt-guests.sh.in libvirt-guests.init.in
- 
- install-initscript: libvirt-guests.init
-@@ -362,8 +353,8 @@ uninstall-initscript:
- 
- if LIBVIRT_INIT_SCRIPT_RED_HAT
- BUILT_SOURCES += libvirt-guests.init
--install-init: install-sysconfig install-initscript
--uninstall-init: uninstall-sysconfig uninstall-initscript
-+install-init: install-initscript
-+uninstall-init: uninstall-initscript
- else ! LIBVIRT_INIT_SCRIPT_RED_HAT
- install-init:
- uninstall-init:
-@@ -394,12 +385,12 @@ EXTRA_DIST += libvirt-guests.service.in
- SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
- 
- if LIBVIRT_INIT_SCRIPT_SYSTEMD
--install-systemd: libvirt-guests.service install-sysconfig libvirt-guests.sh
-+install-systemd: libvirt-guests.service libvirt-guests.sh
- 	$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
- 	$(INSTALL_DATA) libvirt-guests.service \
- 	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
- 
--uninstall-systemd: uninstall-sysconfig
-+uninstall-systemd:
- 	rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
- 	rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||:
- 
-diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in
-index 491ca62138..f0f417bffb 100644
---- a/tools/libvirt-guests.service.in
-+++ b/tools/libvirt-guests.service.in
-@@ -10,7 +10,7 @@ Documentation=man:libvirtd(8)
- Documentation=https://libvirt.org
- 
- [Service]
--EnvironmentFile=-/etc/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
-diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf
-index 669b046507..45b0b9ea46 100644
---- a/tools/libvirt-guests.sysconf
-+++ b/tools/libvirt-guests.sysconf
-@@ -1,3 +1,10 @@
-+#
-+# 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
-+#
-+
-+
- # URIs to check for running guests
- # example: URIS='default xen:///system vbox+tcp://host/system lxc:///system'
- #URIS=default
--- 
-2.19.2
-

diff --git a/app-emulation/libvirt/files/libvirt-5.1.0-do-not-use-sysconf.patch b/app-emulation/libvirt/files/libvirt-5.1.0-do-not-use-sysconf.patch
deleted file mode 100644
index ff8bde45f0e..00000000000
--- a/app-emulation/libvirt/files/libvirt-5.1.0-do-not-use-sysconf.patch
+++ /dev/null
@@ -1,196 +0,0 @@
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 8c8dfe3..25ced3a 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -756,23 +756,6 @@ endif WITH_SETUID_RPC_CLIENT
- 
- EXTRA_DIST += $(SYSCONF_FILES)
- 
--install-sysconfig:
--	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
--	for f in $(SYSCONF_FILES:%.sysconf=%) ; \
--	do \
--	  tgt=`basename $$f`; \
--	  $(INSTALL_DATA) $(srcdir)/$$f.sysconf \
--	      $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
--	done
--
--uninstall-sysconfig:
--	for f in $(SYSCONF_FILES:%.sysconf=%) ; \
--	do \
--	  tgt=`basename $$f`; \
--	  rm -f $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
--	done
--	rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
--
- SYSVINIT_FILES_IN += \
- 	locking/virtlockd.init.in \
- 	$(NULL)
-@@ -816,14 +799,14 @@ if WITH_LIBVIRTD
- if LIBVIRT_INIT_SCRIPT_RED_HAT
- initdir = $(sysconfdir)/rc.d/init.d
- 
--install-init: $(SYSVINIT_FILES) install-sysconfig
-+install-init: $(SYSVINIT_FILES)
- 	$(MKDIR_P) $(DESTDIR)$(initdir)
- 	for f in $(SYSVINIT_FILES:%.init=%) ; \
- 	do \
- 	  $(INSTALL_SCRIPT) $$f.init $(DESTDIR)$(initdir)/$$f; \
- 	done
- 
--uninstall-init: uninstall-sysconfig
-+uninstall-init:
- 	rm -f $(SYSVINIT_FILES:%.init=$(DESTDIR)$(initdir)/%)
- 	rmdir $(DESTDIR)$(initdir) || :
- 
-@@ -862,14 +845,14 @@ SYSTEMD_UNIT_FILES = $(notdir $(SYSTEMD_UNIT_FILES_IN:%.in=%))
- BUILT_SOURCES += $(SYSTEMD_UNIT_FILES)
- DISTCLEANFILES += $(SYSTEMD_UNIT_FILES)
- 
--install-systemd: $(SYSTEMD_UNIT_FILES) install-sysconfig
-+install-systemd: $(SYSTEMD_UNIT_FILES)
- 	$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
- 	for f in $(SYSTEMD_UNIT_FILES); \
- 	do \
- 	  $(INSTALL_DATA) $$f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ ; \
- 	done
- 
--uninstall-systemd: uninstall-sysconfig
-+uninstall-systemd:
- 	rm -f $(SYSTEMD_UNIT_FILES:%=$(DESTDIR)$(SYSTEMD_UNIT_DIR)/%)
- 	rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
- 
-@@ -884,7 +867,7 @@ EXTRA_DIST += $(UPSTART_FILES)
- if WITH_LIBVIRTD
- if LIBVIRT_INIT_SCRIPT_UPSTART
- 
--install-upstart: install-sysconfig
-+install-upstart:
- 	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/event.d
- 	for f in $(UPSTART_FILES:%.upstart=%); \
- 	do \
-@@ -893,7 +876,7 @@ install-upstart: install-sysconfig
- 	      $(DESTDIR)$(sysconfdir)/event.d/$$tgt ; \
- 	done
- 
--uninstall-upstart: uninstall-sysconfig
-+uninstall-upstart:
- 	for f in $(UPSTART_FILES:%.upstart=%); \
- 	do \
- 	  tgt=`basename $$f` ; \
-diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in
-index 3c9d587..2449b20 100644
---- a/src/locking/virtlockd.service.in
-+++ b/src/locking/virtlockd.service.in
-@@ -7,8 +7,7 @@ Documentation=man:virtlockd(8)
- Documentation=https://libvirt.org
- 
- [Service]
--EnvironmentFile=-/etc/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
-diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in
-index 3d9ae36..4373619 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=-/etc/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
-diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in
-index 7f689e0..239beec 100644
---- a/src/remote/libvirtd.service.in
-+++ b/src/remote/libvirtd.service.in
-@@ -22,8 +22,7 @@ Documentation=https://libvirt.org
- 
- [Service]
- Type=notify
--EnvironmentFile=-/etc/sysconfig/libvirtd
--ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
-+ExecStart=@sbindir@/libvirtd
- ExecReload=/bin/kill -HUP $MAINPID
- KillMode=process
- Restart=on-failure
-diff --git a/tools/Makefile.am b/tools/Makefile.am
-index f2f84f7..1188d3c 100644
---- a/tools/Makefile.am
-+++ b/tools/Makefile.am
-@@ -339,15 +339,6 @@ install-data-local: install-init install-systemd install-nss \
- uninstall-local: uninstall-init uninstall-systemd uninstall-nss \
- 	uninstall-bash-completion
- 
--install-sysconfig:
--	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
--	$(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
--	  $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
--
--uninstall-sysconfig:
--	rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
--	rmdir $(DESTDIR)$(sysconfdir)/sysconfig ||:
--
- EXTRA_DIST += libvirt-guests.sh.in libvirt-guests.init.in
- 
- install-initscript: libvirt-guests.init
-@@ -362,8 +353,8 @@ uninstall-initscript:
- 
- if LIBVIRT_INIT_SCRIPT_RED_HAT
- BUILT_SOURCES += libvirt-guests.init
--install-init: install-sysconfig install-initscript
--uninstall-init: uninstall-sysconfig uninstall-initscript
-+install-init: install-initscript
-+uninstall-init: uninstall-initscript
- else ! LIBVIRT_INIT_SCRIPT_RED_HAT
- install-init:
- uninstall-init:
-@@ -394,12 +385,12 @@ EXTRA_DIST += libvirt-guests.service.in
- SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
- 
- if LIBVIRT_INIT_SCRIPT_SYSTEMD
--install-systemd: libvirt-guests.service install-sysconfig libvirt-guests.sh
-+install-systemd: libvirt-guests.service libvirt-guests.sh
- 	$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
- 	$(INSTALL_DATA) libvirt-guests.service \
- 	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
- 
--uninstall-systemd: uninstall-sysconfig
-+uninstall-systemd:
- 	rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
- 	rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||:
- 
-diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in
-index 491ca62..f0f417b 100644
---- a/tools/libvirt-guests.service.in
-+++ b/tools/libvirt-guests.service.in
-@@ -10,7 +10,7 @@ Documentation=man:libvirtd(8)
- Documentation=https://libvirt.org
- 
- [Service]
--EnvironmentFile=-/etc/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
-diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf
-index 669b046..45b0b9e 100644
---- a/tools/libvirt-guests.sysconf
-+++ b/tools/libvirt-guests.sysconf
-@@ -1,3 +1,10 @@
-+#
-+# 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
-+#
-+
-+
- # URIs to check for running guests
- # example: URIS='default xen:///system vbox+tcp://host/system lxc:///system'
- #URIS=default


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/
@ 2019-07-03  8:09 Matthias Maier
  0 siblings, 0 replies; 20+ messages in thread
From: Matthias Maier @ 2019-07-03  8:09 UTC (permalink / raw
  To: gentoo-commits

commit:     3f4f2848e4367278a8866d8fc189cc8159280fa0
Author:     Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Tue Jul  2 17:55:24 2019 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Wed Jul  3 08:09:11 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f4f2848

app-emulation/libvirt: remove unused patches

Closes: https://github.com/gentoo/gentoo/pull/12379
Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 .../libvirt-3.10.0-r2-fix_paths_for_apparmor.patch |  77 --------
 .../files/libvirt-4.5.0-do_not_use_sysconf.patch   | 216 ---------------------
 2 files changed, 293 deletions(-)

diff --git a/app-emulation/libvirt/files/libvirt-3.10.0-r2-fix_paths_for_apparmor.patch b/app-emulation/libvirt/files/libvirt-3.10.0-r2-fix_paths_for_apparmor.patch
deleted file mode 100644
index f1360ae4e4e..00000000000
--- a/app-emulation/libvirt/files/libvirt-3.10.0-r2-fix_paths_for_apparmor.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-diff --git a/examples/Makefile.am b/examples/Makefile.am
-index ef2f79db3..d8cdb9b3f 100644
---- a/examples/Makefile.am
-+++ b/examples/Makefile.am
-@@ -23,7 +23,7 @@ EXTRA_DIST = \
- 	apparmor/TEMPLATE.lxc \
- 	apparmor/libvirt-qemu \
- 	apparmor/libvirt-lxc \
--	apparmor/usr.lib.libvirt.virt-aa-helper \
-+	apparmor/usr.libexec.virt-aa-helper \
- 	apparmor/usr.sbin.libvirtd \
- 	lxcconvert/virt-lxc-convert \
- 	polkit/libvirt-acl.rules \
-@@ -70,7 +70,7 @@ admin_logging_SOURCES = admin/logging.c
- if WITH_APPARMOR_PROFILES
- apparmordir = $(sysconfdir)/apparmor.d/
- apparmor_DATA = \
--	apparmor/usr.lib.libvirt.virt-aa-helper \
-+	apparmor/usr.libexec.virt-aa-helper \
- 	apparmor/usr.sbin.libvirtd \
- 	$(NULL)
- 
-diff --git a/examples/apparmor/libvirt-qemu b/examples/apparmor/libvirt-qemu
-index d4fad85a1..0b22009e5 100644
---- a/examples/apparmor/libvirt-qemu
-+++ b/examples/apparmor/libvirt-qemu
-@@ -86,6 +86,8 @@
-   /usr/share/AAVMF/** r,
-   /usr/share/qemu-efi/** r,
-   /usr/share/slof/** r,
-+  /usr/share/seavgabios/** r,
-+  /usr/share/edk2-ovmf/** r,
- 
-   # access PKI infrastructure
-   /etc/pki/libvirt-vnc/** r,
-diff --git a/examples/apparmor/usr.lib.libvirt.virt-aa-helper b/examples/apparmor/usr.libexec.virt-aa-helper
-similarity index 92%
-rename from examples/apparmor/usr.lib.libvirt.virt-aa-helper
-rename to examples/apparmor/usr.libexec.virt-aa-helper
-index bd6181d00..4086f140a 100644
---- a/examples/apparmor/usr.lib.libvirt.virt-aa-helper
-+++ b/examples/apparmor/usr.libexec.virt-aa-helper
-@@ -1,7 +1,7 @@
- # Last Modified: Mon Apr  5 15:10:27 2010
- #include <tunables/global>
- 
--profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
-+profile virt-aa-helper /usr/libexec/virt-aa-helper {
-   #include <abstractions/base>
- 
-   # needed for searching directories
-@@ -32,7 +32,7 @@ profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
-   deny /dev/mapper/ r,
-   deny /dev/mapper/* r,
- 
--  /usr/{lib,lib64}/libvirt/virt-aa-helper mr,
-+  /usr/libexec/virt-aa-helper mr,
-   /{usr/,}sbin/apparmor_parser Ux,
- 
-   /etc/apparmor.d/libvirt/* r,
-diff --git a/examples/apparmor/usr.sbin.libvirtd b/examples/apparmor/usr.sbin.libvirtd
-index 8d61d154e..656a5595b 100644
---- a/examples/apparmor/usr.sbin.libvirtd
-+++ b/examples/apparmor/usr.sbin.libvirtd
-@@ -84,8 +84,10 @@
-   audit deny /sys/kernel/security/apparmor/.* rwxl,
-   /sys/kernel/security/apparmor/profiles r,
-   /usr/{lib,lib64}/libvirt/* PUxr,
--  /usr/{lib,lib64}/libvirt/libvirt_parthelper ix,
--  /usr/{lib,lib64}/libvirt/libvirt_iohelper ix,
-+  /usr/libexec/virt-aa-helper PUxr,
-+  /usr/libexec/libvirt_lxc PUxr,
-+  /usr/libexec/libvirt_parthelper ix,
-+  /usr/libexec/libvirt_iohelper ix,
-   /etc/libvirt/hooks/** rmix,
-   /etc/xen/scripts/** rmix,
- 

diff --git a/app-emulation/libvirt/files/libvirt-4.5.0-do_not_use_sysconf.patch b/app-emulation/libvirt/files/libvirt-4.5.0-do_not_use_sysconf.patch
deleted file mode 100644
index 3e430cba1d2..00000000000
--- a/app-emulation/libvirt/files/libvirt-4.5.0-do_not_use_sysconf.patch
+++ /dev/null
@@ -1,216 +0,0 @@
-From a365e2d5b4af1ab2be743773412fe265579a9a0b Mon Sep 17 00:00:00 2001
-Message-Id: <a365e2d5b4af1ab2be743773412fe265579a9a0b.1529989118.git.mprivozn@redhat.com>
-From: Michal Privoznik <mprivozn@redhat.com>
-Date: Tue, 26 Jun 2018 06:51:06 +0200
-Subject: [PATCH] gentoo: do not use sysconf
-
-Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
----
- src/Makefile.am                  | 29 ++++++-----------------------
- src/locking/virtlockd.service.in |  3 +--
- src/logging/virtlogd.service.in  |  3 +--
- src/remote/libvirtd.service.in   |  3 +--
- tools/Makefile.am                | 17 ++++-------------
- tools/libvirt-guests.service.in  |  2 +-
- tools/libvirt-guests.sysconf     |  7 +++++++
- 7 files changed, 21 insertions(+), 43 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index db8c8ebd1a..63d7a9ca46 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -757,23 +757,6 @@ endif WITH_SETUID_RPC_CLIENT
- 
- EXTRA_DIST += $(SYSCONF_FILES)
- 
--install-sysconfig:
--	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
--	for f in $(SYSCONF_FILES:%.sysconf=%) ; \
--	do \
--	  tgt=`basename $$f`; \
--	  $(INSTALL_DATA) $(srcdir)/$$f.sysconf \
--	      $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
--	done
--
--uninstall-sysconfig:
--	for f in $(SYSCONF_FILES:%.sysconf=%) ; \
--	do \
--	  tgt=`basename $$f`; \
--	  rm -f $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
--	done
--	rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
--
- SYSVINIT_FILES_IN += \
- 	locking/virtlockd.init.in \
- 	$(NULL)
-@@ -814,14 +797,14 @@ uninstall-logrotate:
- endif ! WITH_LIBVIRTD
- 
- if LIBVIRT_INIT_SCRIPT_RED_HAT
--install-init:: $(SYSVINIT_FILES) install-sysconfig
-+install-init:: $(SYSVINIT_FILES)
- 	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d
- 	for f in $(SYSVINIT_FILES:%.init=%) ; \
- 	do \
- 	  $(INSTALL_SCRIPT) $$f.init $(DESTDIR)$(sysconfdir)/rc.d/init.d/$$f; \
- 	done
- 
--uninstall-init:: uninstall-sysconfig
-+uninstall-init::
- 	rm -f $(SYSVINIT_FILES:%.init=$(DESTDIR)$(sysconfdir)/rc.d/init.d/%)
- 	rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d || :
- 
-@@ -859,14 +842,14 @@ SYSTEMD_UNIT_FILES = $(notdir $(SYSTEMD_UNIT_FILES_IN:%.in=%))
- BUILT_SOURCES += $(SYSTEMD_UNIT_FILES)
- DISTCLEANFILES += $(SYSTEMD_UNIT_FILES)
- 
--install-systemd: $(SYSTEMD_UNIT_FILES) install-sysconfig
-+install-systemd: $(SYSTEMD_UNIT_FILES)
- 	$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
- 	for f in $(SYSTEMD_UNIT_FILES); \
- 	do \
- 	  $(INSTALL_DATA) $$f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ ; \
- 	done
- 
--uninstall-systemd: uninstall-sysconfig
-+uninstall-systemd:
- 	rm -f $(SYSTEMD_UNIT_FILES:%=$(DESTDIR)$(SYSTEMD_UNIT_DIR)/%)
- 	rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
- else ! LIBVIRT_INIT_SCRIPT_SYSTEMD
-@@ -884,7 +867,7 @@ EXTRA_DIST += $(UPSTART_FILES)
- if WITH_LIBVIRTD
- if LIBVIRT_INIT_SCRIPT_UPSTART
- 
--install-upstart: install-sysconfig
-+install-upstart:
- 	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/event.d
- 	for f in $(UPSTART_FILES:%.upstart=%); \
- 	do \
-@@ -893,7 +876,7 @@ install-upstart: install-sysconfig
- 	      $(DESTDIR)$(sysconfdir)/event.d/$$tgt ; \
- 	done
- 
--uninstall-upstart: uninstall-sysconfig
-+uninstall-upstart:
- 	for f in $(UPSTART_FILES:%.upstart=%); \
- 	do \
- 	  tgt=`basename $$f` ; \
-diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in
-index 3c9d587032..2449b201d9 100644
---- a/src/locking/virtlockd.service.in
-+++ b/src/locking/virtlockd.service.in
-@@ -7,8 +7,7 @@ Documentation=man:virtlockd(8)
- Documentation=https://libvirt.org
- 
- [Service]
--EnvironmentFile=-/etc/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
-diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in
-index 3d9ae36150..43736191d5 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=-/etc/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
-diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in
-index 7f689e08a8..239beeced9 100644
---- a/src/remote/libvirtd.service.in
-+++ b/src/remote/libvirtd.service.in
-@@ -22,8 +22,7 @@ Documentation=https://libvirt.org
- 
- [Service]
- Type=notify
--EnvironmentFile=-/etc/sysconfig/libvirtd
--ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
-+ExecStart=@sbindir@/libvirtd
- ExecReload=/bin/kill -HUP $MAINPID
- KillMode=process
- Restart=on-failure
-diff --git a/tools/Makefile.am b/tools/Makefile.am
-index 1452d984a0..cef08741cb 100644
---- a/tools/Makefile.am
-+++ b/tools/Makefile.am
-@@ -336,15 +336,6 @@ install-data-local: install-init install-systemd install-nss \
- uninstall-local: uninstall-init uninstall-systemd uninstall-nss \
- 	uninstall-bash-completion
- 
--install-sysconfig:
--	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
--	$(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
--	  $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
--
--uninstall-sysconfig:
--	rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
--	rmdir $(DESTDIR)$(sysconfdir)/sysconfig ||:
--
- EXTRA_DIST += libvirt-guests.sh.in libvirt-guests.init.in
- 
- install-initscript: libvirt-guests.init
-@@ -359,8 +350,8 @@ uninstall-initscript:
- 
- if LIBVIRT_INIT_SCRIPT_RED_HAT
- BUILT_SOURCES += libvirt-guests.init
--install-init: install-sysconfig install-initscript
--uninstall-init: uninstall-sysconfig uninstall-initscript
-+install-init: install-initscript
-+uninstall-init: uninstall-initscript
- else ! LIBVIRT_INIT_SCRIPT_RED_HAT
- install-init:
- uninstall-init:
-@@ -391,12 +382,12 @@ EXTRA_DIST += libvirt-guests.service.in
- SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
- 
- if LIBVIRT_INIT_SCRIPT_SYSTEMD
--install-systemd: libvirt-guests.service install-sysconfig libvirt-guests.sh
-+install-systemd: libvirt-guests.service libvirt-guests.sh
- 	$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
- 	$(INSTALL_DATA) libvirt-guests.service \
- 	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
- 
--uninstall-systemd: uninstall-sysconfig
-+uninstall-systemd:
- 	rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
- 	rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||:
- 
-diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in
-index 491ca62138..f0f417bffb 100644
---- a/tools/libvirt-guests.service.in
-+++ b/tools/libvirt-guests.service.in
-@@ -10,7 +10,7 @@ Documentation=man:libvirtd(8)
- Documentation=https://libvirt.org
- 
- [Service]
--EnvironmentFile=-/etc/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
-diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf
-index 669b046507..45b0b9ea46 100644
---- a/tools/libvirt-guests.sysconf
-+++ b/tools/libvirt-guests.sysconf
-@@ -1,3 +1,10 @@
-+#
-+# 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
-+#
-+
-+
- # URIs to check for running guests
- # example: URIS='default xen:///system vbox+tcp://host/system lxc:///system'
- #URIS=default
--- 
-2.16.4
-


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/
@ 2019-07-09 18:54 Matthias Maier
  0 siblings, 0 replies; 20+ messages in thread
From: Matthias Maier @ 2019-07-09 18:54 UTC (permalink / raw
  To: gentoo-commits

commit:     495bfb353757634fdf2204fe0836f662e23951ea
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  9 18:50:07 2019 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Tue Jul  9 18:54:16 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=495bfb35

app-emulation/libvirt: drop obsolete files

Package-Manager: Portage-2.3.68, Repoman-2.3.16
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 app-emulation/libvirt/files/libvirtd.init-r16 | 34 ---------------------------
 1 file changed, 34 deletions(-)

diff --git a/app-emulation/libvirt/files/libvirtd.init-r16 b/app-emulation/libvirt/files/libvirtd.init-r16
deleted file mode 100644
index 2a3fb52696a..00000000000
--- a/app-emulation/libvirt/files/libvirtd.init-r16
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2019 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="-d ${LIBVIRTD_OPTS}"
-start_stop_daemon_args="--env KRB5_KTNAME=/etc/libvirt/krb5.tab"
-pidfile="/run/libvirtd.pid"
-retry="${LIBVIRTD_TERMTIMEOUT}"
-
-depend() {
-	need virtlogd
-	use dbus virtlockd
-	after ntp-client ntpd nfs nfsmount portmap rpc.statd iptables ip6tables ebtables corosync sanlock cgconfig xenconsoled
-	USE_FLAG_FIREWALLD
-	USE_FLAG_AVAHI
-	USE_FLAG_ISCSI
-	USE_FLAG_RBD
-}
-
-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
-	checkpath --directory /etc/libvirt/qemu || return 1
-	checkpath --directory /etc/libvirt/storage || return 1
-}


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/
@ 2019-07-28 18:21 Matthias Maier
  0 siblings, 0 replies; 20+ messages in thread
From: Matthias Maier @ 2019-07-28 18:21 UTC (permalink / raw
  To: gentoo-commits

commit:     88662a3ea8e59839f8c5f152f096bda8ea2e9d3f
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 28 18:12:36 2019 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Sun Jul 28 18:21:29 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88662a3e

app-emulation/libvirt: fix typo

Thanks!

Closes: https://bugs.gentoo.org/690774
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 app-emulation/libvirt/files/README.gentoo-r2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/libvirt/files/README.gentoo-r2 b/app-emulation/libvirt/files/README.gentoo-r2
index 1c086c1eb5e..6d6fb18ed3c 100644
--- a/app-emulation/libvirt/files/README.gentoo-r2
+++ b/app-emulation/libvirt/files/README.gentoo-r2
@@ -53,6 +53,6 @@ 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 libvirtd is built with USE=caps, libvirt will now start qemu/kvm VMs
+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.


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/
@ 2019-10-15 16:09 Matthias Maier
  0 siblings, 0 replies; 20+ messages in thread
From: Matthias Maier @ 2019-10-15 16:09 UTC (permalink / raw
  To: gentoo-commits

commit:     c55b28accef737e99287bf479c6c26dd2b98a9f3
Author:     Michal Privoznik <mprivozn <AT> redhat <DOT> com>
AuthorDate: Tue Oct 15 09:06:50 2019 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Tue Oct 15 16:08:41 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c55b28ac

app-emulation/libvirt-9999: Rebase a patch

Signed-off-by: Michal Privoznik <mprivozn <AT> redhat.com>
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 .../files/libvirt-5.7.0-do-not-use-sysconf.patch   | 22 +++++++++-------------
 1 file changed, 9 insertions(+), 13 deletions(-)

diff --git a/app-emulation/libvirt/files/libvirt-5.7.0-do-not-use-sysconf.patch b/app-emulation/libvirt/files/libvirt-5.7.0-do-not-use-sysconf.patch
index f4850f6ae63..2ffffe492db 100644
--- a/app-emulation/libvirt/files/libvirt-5.7.0-do-not-use-sysconf.patch
+++ b/app-emulation/libvirt/files/libvirt-5.7.0-do-not-use-sysconf.patch
@@ -1,5 +1,5 @@
-From eee203f582af1f96e7a9451d447079cf49f47495 Mon Sep 17 00:00:00 2001
-Message-Id: <eee203f582af1f96e7a9451d447079cf49f47495.1565963722.git.mprivozn@redhat.com>
+From e387be8671d0de88632d063e2ecd2c12eb1b2fdf Mon Sep 17 00:00:00 2001
+Message-Id: <e387be8671d0de88632d063e2ecd2c12eb1b2fdf.1567522968.git.mprivozn@redhat.com>
 From: Michal Privoznik <mprivozn@redhat.com>
 Date: Sat, 16 Mar 2019 12:33:00 +0100
 Subject: [PATCH] gentoo: do not use sysconf
@@ -16,10 +16,10 @@ Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
  7 files changed, 15 insertions(+), 37 deletions(-)
 
 diff --git a/src/Makefile.am b/src/Makefile.am
-index 3ae4b87abb..69729d15b4 100644
+index f5093b9c90..e2ebc51c87 100644
 --- a/src/Makefile.am
 +++ b/src/Makefile.am
-@@ -666,23 +666,6 @@ libvirt_lxc_la_LIBADD = libvirt.la $(CYGWIN_EXTRA_LIBADD)
+@@ -672,23 +672,6 @@ libvirt_lxc_la_LIBADD = libvirt.la $(CYGWIN_EXTRA_LIBADD)
  
  EXTRA_DIST += $(SYSCONF_FILES)
  
@@ -43,7 +43,7 @@ index 3ae4b87abb..69729d15b4 100644
  LOGROTATE_FILES := $(LOGROTATE_FILES_IN:remote/%.in=%)
  
  EXTRA_DIST += $(LOGROTATE_FILES_IN)
-@@ -740,14 +723,14 @@ SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
+@@ -746,14 +729,14 @@ SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
  BUILT_SOURCES += $(SYSTEMD_UNIT_FILES)
  DISTCLEANFILES += $(SYSTEMD_UNIT_FILES)
  
@@ -89,20 +89,16 @@ index daff48e67d..43736191d5 100644
  # Loosing the logs is a really bad thing that will
  # cause the machine to be fenced (rebooted), so make
 diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in
-index 4c5b28b478..032ea940fa 100644
+index 9c8c54a2ef..a042280cef 100644
 --- a/src/remote/libvirtd.service.in
 +++ b/src/remote/libvirtd.service.in
-@@ -22,12 +22,11 @@ Documentation=https://libvirt.org
+@@ -25,8 +25,7 @@ Documentation=https://libvirt.org
  
  [Service]
  Type=notify
 -EnvironmentFile=-@sysconfdir@/sysconfig/libvirtd
- # libvirtd.service is set to run on boot so that autostart of
- # VMs can be performed. We don't want it to stick around if
- # unused though, so we set a timeout. The socket activation
- # then ensures it gets started again if anything needs it
--ExecStart=@sbindir@/libvirtd --timeout 120 $LIBVIRTD_ARGS
-+ExecStart=@sbindir@/libvirtd --timeout 120
+-ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
++ExecStart=@sbindir@/libvirtd
  ExecReload=/bin/kill -HUP $MAINPID
  KillMode=process
  Restart=on-failure


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/
@ 2020-04-05 17:19 Matthias Maier
  0 siblings, 0 replies; 20+ messages in thread
From: Matthias Maier @ 2020-04-05 17:19 UTC (permalink / raw
  To: gentoo-commits

commit:     f878989202041fd75730a8302caea50e495e4ae3
Author:     Michal Privoznik <mprivozn <AT> redhat <DOT> com>
AuthorDate: Sun Apr  5 12:47:55 2020 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Sun Apr  5 17:19:12 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8789892

app-emulation/libvirt: Drop unused files

There are some files under files/ directory that are not used
anymore. For instance, patches for older (now removed) ebuilds
and some old init scripts.

Signed-off-by: Michal Privoznik <mprivozn <AT> redhat.com>
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 .../files/libvirt-5.2.0-do-not-use-sysconf.patch   | 170 ---------------
 .../libvirt/files/libvirt-5.2.0-md-clear.patch     |  36 ----
 .../files/libvirt-5.6.0-do-not-use-sysconf.patch   | 174 ---------------
 .../files/libvirt-5.7.0-do-not-use-sysconf.patch   | 170 ---------------
 app-emulation/libvirt/files/libvirt-guests.init-r3 | 236 ---------------------
 app-emulation/libvirt/files/libvirtd.init-r17      |  36 ----
 6 files changed, 822 deletions(-)

diff --git a/app-emulation/libvirt/files/libvirt-5.2.0-do-not-use-sysconf.patch b/app-emulation/libvirt/files/libvirt-5.2.0-do-not-use-sysconf.patch
deleted file mode 100644
index 292af16b491..00000000000
--- a/app-emulation/libvirt/files/libvirt-5.2.0-do-not-use-sysconf.patch
+++ /dev/null
@@ -1,170 +0,0 @@
-From 525d89d39f78a4099508f47a58c4ab65d1e59c0a Mon Sep 17 00:00:00 2001
-Message-Id: <525d89d39f78a4099508f47a58c4ab65d1e59c0a.1552736006.git.mprivozn@redhat.com>
-From: Michal Privoznik <mprivozn@redhat.com>
-Date: Sat, 16 Mar 2019 12:33:00 +0100
-Subject: [PATCH] gentoo: do not use sysconf
-
-Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
----
- src/Makefile.am                  | 21 ++-------------------
- src/locking/virtlockd.service.in |  3 +--
- src/logging/virtlogd.service.in  |  3 +--
- src/remote/libvirtd.service.in   |  3 +--
- tools/Makefile.am                | 13 ++-----------
- tools/libvirt-guests.service.in  |  2 +-
- tools/libvirt-guests.sysconf     |  7 +++++++
- 7 files changed, 15 insertions(+), 37 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index a73f43c483..47dd55c112 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -747,23 +747,6 @@ endif WITH_SETUID_RPC_CLIENT
- 
- EXTRA_DIST += $(SYSCONF_FILES)
- 
--install-sysconfig:
--	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
--	for f in $(SYSCONF_FILES:%.sysconf=%) ; \
--	do \
--	  tgt=`basename $$f`; \
--	  $(INSTALL_DATA) $(srcdir)/$$f.sysconf \
--	      $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
--	done
--
--uninstall-sysconfig:
--	for f in $(SYSCONF_FILES:%.sysconf=%) ; \
--	do \
--	  tgt=`basename $$f`; \
--	  rm -f $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
--	done
--	rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
--
- LOGROTATE_FILES := $(LOGROTATE_FILES_IN:remote/%.in=%)
- 
- EXTRA_DIST += $(LOGROTATE_FILES_IN)
-@@ -822,14 +805,14 @@ SYSTEMD_UNIT_FILES = $(notdir $(SYSTEMD_UNIT_FILES_IN:%.in=%))
- BUILT_SOURCES += $(SYSTEMD_UNIT_FILES)
- DISTCLEANFILES += $(SYSTEMD_UNIT_FILES)
- 
--install-systemd: $(SYSTEMD_UNIT_FILES) install-sysconfig
-+install-systemd: $(SYSTEMD_UNIT_FILES)
- 	$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
- 	for f in $(SYSTEMD_UNIT_FILES); \
- 	do \
- 	  $(INSTALL_DATA) $$f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ ; \
- 	done
- 
--uninstall-systemd: uninstall-sysconfig
-+uninstall-systemd:
- 	rm -f $(SYSTEMD_UNIT_FILES:%=$(DESTDIR)$(SYSTEMD_UNIT_DIR)/%)
- 	rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
- 
-diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in
-index 3c9d587032..2449b201d9 100644
---- a/src/locking/virtlockd.service.in
-+++ b/src/locking/virtlockd.service.in
-@@ -7,8 +7,7 @@ Documentation=man:virtlockd(8)
- Documentation=https://libvirt.org
- 
- [Service]
--EnvironmentFile=-/etc/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
-diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in
-index 3d9ae36150..43736191d5 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=-/etc/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
-diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in
-index 7f689e08a8..239beeced9 100644
---- a/src/remote/libvirtd.service.in
-+++ b/src/remote/libvirtd.service.in
-@@ -22,8 +22,7 @@ Documentation=https://libvirt.org
- 
- [Service]
- Type=notify
--EnvironmentFile=-/etc/sysconfig/libvirtd
--ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
-+ExecStart=@sbindir@/libvirtd
- ExecReload=/bin/kill -HUP $MAINPID
- KillMode=process
- Restart=on-failure
-diff --git a/tools/Makefile.am b/tools/Makefile.am
-index c6064dee08..40f41ddb38 100644
---- a/tools/Makefile.am
-+++ b/tools/Makefile.am
-@@ -333,15 +333,6 @@ install-data-local: install-systemd install-nss \
- uninstall-local: uninstall-systemd uninstall-nss \
- 	uninstall-bash-completion
- 
--install-sysconfig:
--	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
--	$(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
--	  $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
--
--uninstall-sysconfig:
--	rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
--	rmdir $(DESTDIR)$(sysconfdir)/sysconfig ||:
--
- EXTRA_DIST += libvirt-guests.sh.in
- 
- libvirt-guests.sh: libvirt-guests.sh.in $(top_builddir)/config.status
-@@ -361,12 +352,12 @@ EXTRA_DIST += libvirt-guests.service.in
- SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
- 
- if LIBVIRT_INIT_SCRIPT_SYSTEMD
--install-systemd: libvirt-guests.service install-sysconfig libvirt-guests.sh
-+install-systemd: libvirt-guests.service libvirt-guests.sh
- 	$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
- 	$(INSTALL_DATA) libvirt-guests.service \
- 	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
- 
--uninstall-systemd: uninstall-sysconfig
-+uninstall-systemd:
- 	rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
- 	rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||:
- 
-diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in
-index 491ca62138..f0f417bffb 100644
---- a/tools/libvirt-guests.service.in
-+++ b/tools/libvirt-guests.service.in
-@@ -10,7 +10,7 @@ Documentation=man:libvirtd(8)
- Documentation=https://libvirt.org
- 
- [Service]
--EnvironmentFile=-/etc/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
-diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf
-index 669b046507..45b0b9ea46 100644
---- a/tools/libvirt-guests.sysconf
-+++ b/tools/libvirt-guests.sysconf
-@@ -1,3 +1,10 @@
-+#
-+# 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
-+#
-+
-+
- # URIs to check for running guests
- # example: URIS='default xen:///system vbox+tcp://host/system lxc:///system'
- #URIS=default
--- 
-2.19.2
-

diff --git a/app-emulation/libvirt/files/libvirt-5.2.0-md-clear.patch b/app-emulation/libvirt/files/libvirt-5.2.0-md-clear.patch
deleted file mode 100644
index cd14d0d539a..00000000000
--- a/app-emulation/libvirt/files/libvirt-5.2.0-md-clear.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 538d873571d7a682852dc1d70e5f4478f4d64e85 Mon Sep 17 00:00:00 2001
-From: Jiri Denemark <jdenemar@redhat.com>
-Date: Fri, 5 Apr 2019 15:11:20 +0200
-Subject: [PATCH] cpu_map: Define md-clear CPUID bit
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-CVE-2018-12126, CVE-2018-12127, CVE-2018-12130, CVE-2019-11091
-
-The bit is set when microcode provides the mechanism to invoke a flush
-of various exploitable CPU buffers by invoking the VERW instruction.
-
-Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
-Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
----
- src/cpu_map/x86_features.xml                                | 3 +++
-
-diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml
-index efcc10b1ae..370807f88e 100644
---- a/src/cpu_map/x86_features.xml
-+++ b/src/cpu_map/x86_features.xml
-@@ -320,6 +320,9 @@
-   <feature name='avx512-4fmaps'>
-     <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00000008'/>
-   </feature>
-+  <feature name='md-clear'> <!-- md_clear -->
-+    <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00000400'/>
-+  </feature>
-   <feature name='pconfig'>
-     <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00040000'/>
-   </feature>
--- 
-2.21.0
-

diff --git a/app-emulation/libvirt/files/libvirt-5.6.0-do-not-use-sysconf.patch b/app-emulation/libvirt/files/libvirt-5.6.0-do-not-use-sysconf.patch
deleted file mode 100644
index b847392cc13..00000000000
--- a/app-emulation/libvirt/files/libvirt-5.6.0-do-not-use-sysconf.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-From 8b27863cd4bd4eebefe6f39b42c181d073b457ff Mon Sep 17 00:00:00 2001
-Message-Id: <8b27863cd4bd4eebefe6f39b42c181d073b457ff.1564650738.git.mprivozn@redhat.com>
-From: Michal Privoznik <mprivozn@redhat.com>
-Date: Sat, 16 Mar 2019 12:33:00 +0100
-Subject: [PATCH] gentoo: do not use sysconf
-
-Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
----
- src/Makefile.am                  | 21 ++-------------------
- src/locking/virtlockd.service.in |  3 +--
- src/logging/virtlogd.service.in  |  3 +--
- src/remote/libvirtd.service.in   |  3 +--
- tools/Makefile.am                | 13 ++-----------
- tools/libvirt-guests.service.in  |  2 +-
- tools/libvirt-guests.sysconf     |  7 +++++++
- 7 files changed, 15 insertions(+), 37 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 4a8cae11dc..6c93435066 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -750,23 +750,6 @@ endif WITH_SETUID_RPC_CLIENT
- 
- EXTRA_DIST += $(SYSCONF_FILES)
- 
--install-sysconfig:
--	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
--	for f in $(SYSCONF_FILES:%.sysconf=%) ; \
--	do \
--	  tgt=`basename $$f`; \
--	  $(INSTALL_DATA) $(srcdir)/$$f.sysconf \
--	      $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
--	done
--
--uninstall-sysconfig:
--	for f in $(SYSCONF_FILES:%.sysconf=%) ; \
--	do \
--	  tgt=`basename $$f`; \
--	  rm -f $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
--	done
--	rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
--
- LOGROTATE_FILES := $(LOGROTATE_FILES_IN:remote/%.in=%)
- 
- EXTRA_DIST += $(LOGROTATE_FILES_IN)
-@@ -825,14 +808,14 @@ SYSTEMD_UNIT_FILES = $(notdir $(SYSTEMD_UNIT_FILES_IN:%.in=%))
- BUILT_SOURCES += $(SYSTEMD_UNIT_FILES)
- DISTCLEANFILES += $(SYSTEMD_UNIT_FILES)
- 
--install-systemd: $(SYSTEMD_UNIT_FILES) install-sysconfig
-+install-systemd: $(SYSTEMD_UNIT_FILES)
- 	$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
- 	for f in $(SYSTEMD_UNIT_FILES); \
- 	do \
- 	  $(INSTALL_DATA) $$f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ ; \
- 	done
- 
--uninstall-systemd: uninstall-sysconfig
-+uninstall-systemd:
- 	rm -f $(SYSTEMD_UNIT_FILES:%=$(DESTDIR)$(SYSTEMD_UNIT_DIR)/%)
- 	rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
- 
-diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in
-index 3c9d587032..2449b201d9 100644
---- a/src/locking/virtlockd.service.in
-+++ b/src/locking/virtlockd.service.in
-@@ -7,8 +7,7 @@ Documentation=man:virtlockd(8)
- Documentation=https://libvirt.org
- 
- [Service]
--EnvironmentFile=-/etc/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
-diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in
-index 3d9ae36150..43736191d5 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=-/etc/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
-diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in
-index 3ddf0e229b..a38f2b08fa 100644
---- a/src/remote/libvirtd.service.in
-+++ b/src/remote/libvirtd.service.in
-@@ -20,12 +20,11 @@ Documentation=https://libvirt.org
- 
- [Service]
- Type=notify
--EnvironmentFile=-/etc/sysconfig/libvirtd
- # libvirtd.service is set to run on boot so that autostart of
- # VMs can be performed. We don't want it to stick around if
- # unused though, so we set a timeout. The socket activation
- # then ensures it gets started again if anything needs it
--ExecStart=@sbindir@/libvirtd --timeout 120 $LIBVIRTD_ARGS
-+ExecStart=@sbindir@/libvirtd --timeout 120
- ExecReload=/bin/kill -HUP $MAINPID
- KillMode=process
- Restart=on-failure
-diff --git a/tools/Makefile.am b/tools/Makefile.am
-index 2807b9f6fd..cde5dba193 100644
---- a/tools/Makefile.am
-+++ b/tools/Makefile.am
-@@ -334,15 +334,6 @@ install-data-local: install-systemd install-nss \
- uninstall-local: uninstall-systemd uninstall-nss \
- 	uninstall-bash-completion
- 
--install-sysconfig:
--	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
--	$(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
--	  $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
--
--uninstall-sysconfig:
--	rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
--	rmdir $(DESTDIR)$(sysconfdir)/sysconfig ||:
--
- EXTRA_DIST += libvirt-guests.sh.in
- 
- libvirt-guests.sh: libvirt-guests.sh.in $(top_builddir)/config.status
-@@ -362,12 +353,12 @@ EXTRA_DIST += libvirt-guests.service.in
- SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
- 
- if LIBVIRT_INIT_SCRIPT_SYSTEMD
--install-systemd: libvirt-guests.service install-sysconfig libvirt-guests.sh
-+install-systemd: libvirt-guests.service libvirt-guests.sh
- 	$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
- 	$(INSTALL_DATA) libvirt-guests.service \
- 	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
- 
--uninstall-systemd: uninstall-sysconfig
-+uninstall-systemd:
- 	rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
- 	rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||:
- 
-diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in
-index 491ca62138..f0f417bffb 100644
---- a/tools/libvirt-guests.service.in
-+++ b/tools/libvirt-guests.service.in
-@@ -10,7 +10,7 @@ Documentation=man:libvirtd(8)
- Documentation=https://libvirt.org
- 
- [Service]
--EnvironmentFile=-/etc/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
-diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf
-index 669b046507..45b0b9ea46 100644
---- a/tools/libvirt-guests.sysconf
-+++ b/tools/libvirt-guests.sysconf
-@@ -1,3 +1,10 @@
-+#
-+# 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
-+#
-+
-+
- # URIs to check for running guests
- # example: URIS='default xen:///system vbox+tcp://host/system lxc:///system'
- #URIS=default
--- 
-2.21.0
-

diff --git a/app-emulation/libvirt/files/libvirt-5.7.0-do-not-use-sysconf.patch b/app-emulation/libvirt/files/libvirt-5.7.0-do-not-use-sysconf.patch
deleted file mode 100644
index 2ffffe492db..00000000000
--- a/app-emulation/libvirt/files/libvirt-5.7.0-do-not-use-sysconf.patch
+++ /dev/null
@@ -1,170 +0,0 @@
-From e387be8671d0de88632d063e2ecd2c12eb1b2fdf Mon Sep 17 00:00:00 2001
-Message-Id: <e387be8671d0de88632d063e2ecd2c12eb1b2fdf.1567522968.git.mprivozn@redhat.com>
-From: Michal Privoznik <mprivozn@redhat.com>
-Date: Sat, 16 Mar 2019 12:33:00 +0100
-Subject: [PATCH] gentoo: do not use sysconf
-
-Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
----
- src/Makefile.am                  | 21 ++-------------------
- src/locking/virtlockd.service.in |  3 +--
- src/logging/virtlogd.service.in  |  3 +--
- src/remote/libvirtd.service.in   |  3 +--
- tools/Makefile.am                | 13 ++-----------
- tools/libvirt-guests.service.in  |  2 +-
- tools/libvirt-guests.sysconf     |  7 +++++++
- 7 files changed, 15 insertions(+), 37 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index f5093b9c90..e2ebc51c87 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -672,23 +672,6 @@ libvirt_lxc_la_LIBADD = libvirt.la $(CYGWIN_EXTRA_LIBADD)
- 
- EXTRA_DIST += $(SYSCONF_FILES)
- 
--install-sysconfig:
--	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
--	for f in $(SYSCONF_FILES:%.sysconf=%) ; \
--	do \
--	  tgt=`basename $$f`; \
--	  $(INSTALL_DATA) $(srcdir)/$$f.sysconf \
--	      $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
--	done
--
--uninstall-sysconfig:
--	for f in $(SYSCONF_FILES:%.sysconf=%) ; \
--	do \
--	  tgt=`basename $$f`; \
--	  rm -f $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \
--	done
--	rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
--
- LOGROTATE_FILES := $(LOGROTATE_FILES_IN:remote/%.in=%)
- 
- EXTRA_DIST += $(LOGROTATE_FILES_IN)
-@@ -746,14 +729,14 @@ SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
- BUILT_SOURCES += $(SYSTEMD_UNIT_FILES)
- DISTCLEANFILES += $(SYSTEMD_UNIT_FILES)
- 
--install-systemd: $(SYSTEMD_UNIT_FILES) install-sysconfig
-+install-systemd: $(SYSTEMD_UNIT_FILES)
- 	$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
- 	for f in $(SYSTEMD_UNIT_FILES); \
- 	do \
- 	  $(INSTALL_DATA) $$f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ ; \
- 	done
- 
--uninstall-systemd: uninstall-sysconfig
-+uninstall-systemd:
- 	rm -f $(SYSTEMD_UNIT_FILES:%=$(DESTDIR)$(SYSTEMD_UNIT_DIR)/%)
- 	rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
- 
-diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in
-index e7f8057c06..2449b201d9 100644
---- a/src/locking/virtlockd.service.in
-+++ b/src/locking/virtlockd.service.in
-@@ -7,8 +7,7 @@ Documentation=man:virtlockd(8)
- 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
-diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in
-index daff48e67d..43736191d5 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
- # Loosing the logs is a really bad thing that will
- # cause the machine to be fenced (rebooted), so make
-diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in
-index 9c8c54a2ef..a042280cef 100644
---- a/src/remote/libvirtd.service.in
-+++ b/src/remote/libvirtd.service.in
-@@ -25,8 +25,7 @@ Documentation=https://libvirt.org
- 
- [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
-diff --git a/tools/Makefile.am b/tools/Makefile.am
-index 29fdbfe846..04b21eb54a 100644
---- a/tools/Makefile.am
-+++ b/tools/Makefile.am
-@@ -360,15 +360,6 @@ install-data-local: install-systemd install-nss \
- uninstall-local: uninstall-systemd uninstall-nss \
- 	uninstall-bash-completion
- 
--install-sysconfig:
--	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
--	$(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
--	  $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
--
--uninstall-sysconfig:
--	rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
--	rmdir $(DESTDIR)$(sysconfdir)/sysconfig ||:
--
- EXTRA_DIST += libvirt-guests.sh.in
- 
- libvirt-guests.sh: libvirt-guests.sh.in $(top_builddir)/config.status
-@@ -388,12 +379,12 @@ EXTRA_DIST += libvirt-guests.service.in
- SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
- 
- if LIBVIRT_INIT_SCRIPT_SYSTEMD
--install-systemd: libvirt-guests.service install-sysconfig libvirt-guests.sh
-+install-systemd: libvirt-guests.service libvirt-guests.sh
- 	$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
- 	$(INSTALL_DATA) libvirt-guests.service \
- 	  $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
- 
--uninstall-systemd: uninstall-sysconfig
-+uninstall-systemd:
- 	rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
- 	rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||:
- 
-diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in
-index 10c664016a..f0f417bffb 100644
---- a/tools/libvirt-guests.service.in
-+++ b/tools/libvirt-guests.service.in
-@@ -10,7 +10,7 @@ Documentation=man:libvirtd(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
-diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf
-index 669b046507..45b0b9ea46 100644
---- a/tools/libvirt-guests.sysconf
-+++ b/tools/libvirt-guests.sysconf
-@@ -1,3 +1,10 @@
-+#
-+# 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
-+#
-+
-+
- # URIs to check for running guests
- # example: URIS='default xen:///system vbox+tcp://host/system lxc:///system'
- #URIS=default
--- 
-2.21.0
-

diff --git a/app-emulation/libvirt/files/libvirt-guests.init-r3 b/app-emulation/libvirt/files/libvirt-guests.init-r3
deleted file mode 100644
index 10797e1b807..00000000000
--- a/app-emulation/libvirt/files/libvirt-guests.init-r3
+++ /dev/null
@@ -1,236 +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
-	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
-}

diff --git a/app-emulation/libvirt/files/libvirtd.init-r17 b/app-emulation/libvirt/files/libvirtd.init-r17
deleted file mode 100644
index 0f89df82db4..00000000000
--- a/app-emulation/libvirt/files/libvirtd.init-r17
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2019 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="-d ${LIBVIRTD_OPTS}"
-start_stop_daemon_args="--env KRB5_KTNAME=/etc/libvirt/krb5.tab"
-pidfile="/run/libvirtd.pid"
-retry="${LIBVIRTD_TERMTIMEOUT}"
-
-depend() {
-	need virtlogd
-	use dbus virtlockd
-	after ntp-client ntpd nfs nfsmount portmap rpc.statd iptables ip6tables ebtables corosync sanlock cgconfig xenconsoled
-	USE_FLAG_FIREWALLD
-	USE_FLAG_AVAHI
-	USE_FLAG_ISCSI
-	USE_FLAG_RBD
-}
-
-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
-}


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/
@ 2020-10-06 18:07 Sam James
  0 siblings, 0 replies; 20+ messages in thread
From: Sam James @ 2020-10-06 18:07 UTC (permalink / raw
  To: gentoo-commits

commit:     adcefe5c40a45576ec0999c39f34b9c9ab85708d
Author:     Jonathan Davies <jpds <AT> protonmail <DOT> com>
AuthorDate: Tue Oct  6 17:03:44 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct  6 18:07:10 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=adcefe5c

app-emulation/libvirt: fix libvirt-6.7.0-fix-paths-for-apparmor.patch

* File renames are handled by meson.build.
* Restored libvirt in front of virt-aa-helper.in.
* Renamed local helper to also be under libexec.

Closes: https://bugs.gentoo.org/746182

Signed-off-by: Jonathan Davies <jpds <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/17823
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../libvirt-6.7.0-fix-paths-for-apparmor.patch     | 31 +++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)

diff --git a/app-emulation/libvirt/files/libvirt-6.7.0-fix-paths-for-apparmor.patch b/app-emulation/libvirt/files/libvirt-6.7.0-fix-paths-for-apparmor.patch
index 1ca70030062..fcd15191eca 100644
--- a/app-emulation/libvirt/files/libvirt-6.7.0-fix-paths-for-apparmor.patch
+++ b/app-emulation/libvirt/files/libvirt-6.7.0-fix-paths-for-apparmor.patch
@@ -10,10 +10,31 @@ index 80986ae..d550d8c 100644
  
    # pki for libvirt-vnc and libvirt-spice (LP: #901272, #1690140)
    /etc/pki/CA/ r,
-diff --git a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in b/src/security/apparmor/usr.libexec.virt-aa-helper.in
+
+--- 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.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.virt-aa-helper.in
@@ -22,5 +43,9 @@ index dd18c8a..d06f9cb 100644
    /**/disk{,.*} r,
  
 -  #include <local/usr.lib.libvirt.virt-aa-helper>
-+  #include <local/usr.libexec.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


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/
@ 2020-10-06 20:45 Sam James
  0 siblings, 0 replies; 20+ messages in thread
From: Sam James @ 2020-10-06 20:45 UTC (permalink / raw
  To: gentoo-commits

commit:     9af4ca4ecde365133bfe54796d1e70d69a27eef0
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  6 20:39:51 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct  6 20:44:58 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9af4ca4e

app-emulation/libvirt: fix USE=apparmor patch for 6.7.0

Fixes: adcefe5c40a45576ec0999c39f34b9c9ab85708d
Bug: https://bugs.gentoo.org/746182
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/libvirt/files/libvirt-6.7.0-fix-paths-for-apparmor.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/libvirt/files/libvirt-6.7.0-fix-paths-for-apparmor.patch b/app-emulation/libvirt/files/libvirt-6.7.0-fix-paths-for-apparmor.patch
index fcd15191eca..18e7ef2daa0 100644
--- a/app-emulation/libvirt/files/libvirt-6.7.0-fix-paths-for-apparmor.patch
+++ b/app-emulation/libvirt/files/libvirt-6.7.0-fix-paths-for-apparmor.patch
@@ -37,7 +37,7 @@ 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.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,


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/
@ 2021-02-11 18:02 Matthias Maier
  0 siblings, 0 replies; 20+ messages in thread
From: Matthias Maier @ 2021-02-11 18:02 UTC (permalink / raw
  To: gentoo-commits

commit:     0aa71d9e20099e4c0fece7d4b4a36d603270430d
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 11 17:23:38 2021 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Thu Feb 11 18:01:24 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0aa71d9e

app-emulation/libvirt: drop unused patch

Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 ...10.0-Fix-segfault-when-parsing-mdev-types.patch | 61 ----------------------
 1 file changed, 61 deletions(-)

diff --git a/app-emulation/libvirt/files/libvirt-6.10.0-Fix-segfault-when-parsing-mdev-types.patch b/app-emulation/libvirt/files/libvirt-6.10.0-Fix-segfault-when-parsing-mdev-types.patch
deleted file mode 100644
index 207cc20ba09..00000000000
--- a/app-emulation/libvirt/files/libvirt-6.10.0-Fix-segfault-when-parsing-mdev-types.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 4c4d0e2da07b5a035b26a0ff13ec27070f7c7b1a Mon Sep 17 00:00:00 2001
-Message-Id: <4c4d0e2da07b5a035b26a0ff13ec27070f7c7b1a.1607416232.git.mprivozn@redhat.com>
-From: Jonathon Jongsma <jjongsma@redhat.com>
-Date: Wed, 2 Dec 2020 11:52:39 -0600
-Subject: [PATCH] conf: Fix segfault when parsing mdev types
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Commit f1b0890 introduced a potential crash due to incorrect operator
-precedence when accessing an element from a pointer to an array.
-
-Backtrace below:
-
-  #0  virNodeDeviceGetMdevTypesCaps (sysfspath=0x7fff801661e0 "/sys/devices/pci0000:00/0000:00:02.0", mdev_types=0x7fff801c9b40, nmdev_types=0x7fff801c9b48) at ../src/conf/node_device_conf.c:2676
-  #1  0x00007ffff7caf53d in virNodeDeviceGetPCIDynamicCaps (sysfsPath=0x7fff801661e0 "/sys/devices/pci0000:00/0000:00:02.0", pci_dev=0x7fff801c9ac8) at ../src/conf/node_device_conf.c:2705
-  #2  0x00007ffff7cae38f in virNodeDeviceUpdateCaps (def=0x7fff80168a10) at ../src/conf/node_device_conf.c:2342
-  #3  0x00007ffff7cb11c0 in virNodeDeviceObjMatch (obj=0x7fff84002e50, flags=0) at ../src/conf/virnodedeviceobj.c:850
-  #4  0x00007ffff7cb153d in virNodeDeviceObjListExportCallback (payload=0x7fff84002e50, name=0x7fff801cbc20 "pci_0000_00_02_0", opaque=0x7fffe2ffc6a0) at ../src/conf/virnodedeviceobj.c:909
-  #5  0x00007ffff7b69146 in virHashForEach (table=0x7fff9814b700 = {...}, iter=0x7ffff7cb149e <virNodeDeviceObjListExportCallback>, opaque=0x7fffe2ffc6a0) at ../src/util/virhash.c:394
-  #6  0x00007ffff7cb1694 in virNodeDeviceObjListExport (conn=0x7fff98013170, devs=0x7fff98154430, devices=0x7fffe2ffc798, filter=0x7ffff7cf47a1 <virConnectListAllNodeDevicesCheckACL>, flags=0)
-          at ../src/conf/virnodedeviceobj.c:943
-  #7  0x00007fffe00694b2 in nodeConnectListAllNodeDevices (conn=0x7fff98013170, devices=0x7fffe2ffc798, flags=0) at ../src/node_device/node_device_driver.c:228
-  #8  0x00007ffff7e703aa in virConnectListAllNodeDevices (conn=0x7fff98013170, devices=0x7fffe2ffc798, flags=0) at ../src/libvirt-nodedev.c:130
-  #9  0x000055555557f796 in remoteDispatchConnectListAllNodeDevices (server=0x555555627080, client=0x5555556bf050, msg=0x5555556c0000, rerr=0x7fffe2ffc8a0, args=0x7fffd4008470, ret=0x7fffd40084e0)
-          at src/remote/remote_daemon_dispatch_stubs.h:1613
-  #10 0x000055555557f6f9 in remoteDispatchConnectListAllNodeDevicesHelper (server=0x555555627080, client=0x5555556bf050, msg=0x5555556c0000, rerr=0x7fffe2ffc8a0, args=0x7fffd4008470, ret=0x7fffd40084e0)
-          at src/remote/remote_daemon_dispatch_stubs.h:1591
-  #11 0x00007ffff7ce9542 in virNetServerProgramDispatchCall (prog=0x555555690c10, server=0x555555627080, client=0x5555556bf050, msg=0x5555556c0000) at ../src/rpc/virnetserverprogram.c:428
-  #12 0x00007ffff7ce90bd in virNetServerProgramDispatch (prog=0x555555690c10, server=0x555555627080, client=0x5555556bf050, msg=0x5555556c0000) at ../src/rpc/virnetserverprogram.c:302
-  #13 0x00007ffff7cf042b in virNetServerProcessMsg (srv=0x555555627080, client=0x5555556bf050, prog=0x555555690c10, msg=0x5555556c0000) at ../src/rpc/virnetserver.c:137
-  #14 0x00007ffff7cf04eb in virNetServerHandleJob (jobOpaque=0x5555556b66b0, opaque=0x555555627080) at ../src/rpc/virnetserver.c:154
-  #15 0x00007ffff7bd912f in virThreadPoolWorker (opaque=0x55555562bc70) at ../src/util/virthreadpool.c:163
-  #16 0x00007ffff7bd8645 in virThreadHelper (data=0x55555562bc90) at ../src/util/virthread.c:233
-  #17 0x00007ffff6d90432 in start_thread () at /lib64/libpthread.so.0
-  #18 0x00007ffff75c5913 in clone () at /lib64/libc.so.6
-
-Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
-Reviewed-by: Ján Tomko <jtomko@redhat.com>
-Signed-off-by: Ján Tomko <jtomko@redhat.com>
-Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
----
- src/conf/node_device_conf.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
-index 4e2837c1cd..cac4243b50 100644
---- a/src/conf/node_device_conf.c
-+++ b/src/conf/node_device_conf.c
-@@ -2673,7 +2673,7 @@ virNodeDeviceGetMdevTypesCaps(const char *sysfspath,
- 
-     /* this could be a refresh, so clear out the old data */
-     for (i = 0; i < *nmdev_types; i++)
--       virMediatedDeviceTypeFree(*mdev_types[i]);
-+       virMediatedDeviceTypeFree((*mdev_types)[i]);
-     VIR_FREE(*mdev_types);
-     *nmdev_types = 0;
- 
--- 
-2.26.2
-


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/
@ 2022-03-08 13:18 Sam James
  0 siblings, 0 replies; 20+ messages in thread
From: Sam James @ 2022-03-08 13:18 UTC (permalink / raw
  To: gentoo-commits

commit:     201d380d51b0e9b89f5988be2796a4699d364e91
Author:     Michal Privoznik <mprivozn <AT> redhat <DOT> com>
AuthorDate: Tue Mar  8 07:48:41 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Mar  8 13:17:50 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=201d380d

app-emulation/libvirt: Fix a typo on postinst message

There's a typo in the postinst message as it suggests using
'service' to start libvirtd service, while in fact the correct
binary is 'rc-service'.

Closes: https://bugs.gentoo.org/833622
Signed-off-by: Michal Privoznik <mprivozn <AT> redhat.com>
Closes: https://github.com/gentoo/gentoo/pull/24445
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/libvirt/files/README.gentoo-r3 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/libvirt/files/README.gentoo-r3 b/app-emulation/libvirt/files/README.gentoo-r3
index 1fec12f0c025..0eab21d3a006 100644
--- a/app-emulation/libvirt/files/README.gentoo-r3
+++ b/app-emulation/libvirt/files/README.gentoo-r3
@@ -5,7 +5,7 @@ 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
+	$ rc-service libvirt-guests start
 
 
 For the basic networking support (bridged and routed networks) you don't


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/
@ 2022-03-15  5:52 Joonas Niilola
  0 siblings, 0 replies; 20+ messages in thread
From: Joonas Niilola @ 2022-03-15  5:52 UTC (permalink / raw
  To: gentoo-commits

commit:     4e0d1e7d8a345d6c532cd90080ccab940793ce7c
Author:     Michal Privoznik <mprivozn <AT> redhat <DOT> com>
AuthorDate: Tue Mar 15 04:25:02 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Mar 15 05:50:37 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e0d1e7d

app-emulation/libvirt: Rebase ${PN}-8.2.0-fix-paths-for-apparmor.patch

In one of my previous patches I've rebased
libvirt-8.2.0-fix-paths-for-apparmor.patch which moves apparmor
profiles from /usr/lib into /usr/libexec. But I forgot to 'git
add' some files, resulting in apparmor profiles being just
removed. Rebase the patch again, properly this time.

Closes: https://bugs.gentoo.org/show_bug.cgi?id=835161
Signed-off-by: Michal Privoznik <mprivozn <AT> redhat.com>
Closes: https://github.com/gentoo/gentoo/pull/24568
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../libvirt-8.2.0-fix-paths-for-apparmor.patch     | 124 +++++----------------
 1 file changed, 27 insertions(+), 97 deletions(-)

diff --git a/app-emulation/libvirt/files/libvirt-8.2.0-fix-paths-for-apparmor.patch b/app-emulation/libvirt/files/libvirt-8.2.0-fix-paths-for-apparmor.patch
index 331a49aa4497..5bab5d69856a 100644
--- a/app-emulation/libvirt/files/libvirt-8.2.0-fix-paths-for-apparmor.patch
+++ b/app-emulation/libvirt/files/libvirt-8.2.0-fix-paths-for-apparmor.patch
@@ -1,21 +1,21 @@
-From afcb8e32343d662d74ccb7b6596ddf03104c8e41 Mon Sep 17 00:00:00 2001
-Message-Id: <afcb8e32343d662d74ccb7b6596ddf03104c8e41.1646212419.git.mprivozn@redhat.com>
+From 52ecc3247d72e2a5ffc390093d803f59e20087f6 Mon Sep 17 00:00:00 2001
+Message-Id: <52ecc3247d72e2a5ffc390093d803f59e20087f6.1647318231.git.mprivozn@redhat.com>
 From: Michal Privoznik <mprivozn@redhat.com>
-Date: Wed, 2 Mar 2022 10:12:44 +0100
+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 +-
- .../usr.lib.libvirt.virt-aa-helper.in         | 75 -------------------
- .../usr.lib.libvirt.virt-aa-helper.local      |  1 -
- 4 files changed, 4 insertions(+), 79 deletions(-)
- delete mode 100644 src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in
- delete mode 100644 src/security/apparmor/usr.lib.libvirt.virt-aa-helper.local
+ 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 8cd76d48ec..39f8f04c03 100644
+index 250ba4ea58..1599289932 100644
 --- a/src/security/apparmor/libvirt-qemu
 +++ b/src/security/apparmor/libvirt-qemu
 @@ -95,6 +95,7 @@
@@ -47,94 +47,24 @@ index 990f00b4f3..2a2235c89a 100644
 -  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.lib.libvirt.virt-aa-helper.in
-deleted file mode 100644
-index ff1d46bebe..0000000000
+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
-+++ /dev/null
-@@ -1,75 +0,0 @@
--#include <tunables/global>
--
--profile virt-aa-helper @libexecdir@/virt-aa-helper {
--  #include <abstractions/base>
--  #include <abstractions/openssl>
--
--  # needed for searching directories
--  capability dac_override,
--  capability dac_read_search,
--
--  # needed for when disk is on a network filesystem
--  network inet,
--  network inet6,
--
--  deny @{PROC}/[0-9]*/mounts r,
--  @{PROC}/[0-9]*/net/psched r,
--  owner @{PROC}/[0-9]*/status r,
--  @{PROC}/filesystems r,
--
--  # Used when internally running another command (namely apparmor_parser)
--  @{PROC}/@{pid}/fd/ r,
--
--  # allow reading libnl's classid file
--  @sysconfdir@/libnl{,-3}/classid r,
--
--  # for gl enabled graphics
--  /dev/dri/{,*} r,
--
--  # for hostdev
--  /sys/devices/ r,
--  /sys/devices/** r,
--  /sys/bus/usb/devices/ r,
--  deny /dev/sd* r,
--  deny /dev/vd* r,
--  deny /dev/dm-* r,
--  deny /dev/drbd[0-9]* r,
--  deny /dev/dasd* r,
--  deny /dev/nvme* r,
--  deny /dev/zd[0-9]* r,
--  deny /dev/mapper/ r,
--  deny /dev/mapper/* r,
--
--  @libexecdir@/virt-aa-helper mr,
--  /{usr/,}sbin/apparmor_parser Ux,
--
--  @sysconfdir@/apparmor.d/libvirt/* r,
--  @sysconfdir@/apparmor.d/libvirt/libvirt-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]* rw,
--
--  # for backingstore -- allow access to non-hidden files in @{HOME} as well
--  # as storage pools
--  audit deny @{HOME}/.* mrwkl,
--  audit deny @{HOME}/.*/ rw,
--  audit deny @{HOME}/.*/** mrwkl,
--  audit deny @{HOME}/bin/ rw,
--  audit deny @{HOME}/bin/** mrwkl,
--  @{HOME}/ r,
--  @{HOME}/** r,
--  /var/lib/libvirt/images/ r,
--  /var/lib/libvirt/images/** r,
--  /var/lib/nova/instances/_base/* r,
--  /{media,mnt,opt,srv}/** r,
--  # For virt-sandbox
--  /{,var/}run/libvirt/**/[sv]d[a-z] r,
--
--  /**.img r,
--  /**.raw r,
--  /**.qcow{,2} r,
--  /**.qed r,
--  /**.vmdk r,
--  /**.vhd r,
--  /**.[iI][sS][oO] r,
--  /**/disk{,.*} r,
--
++++ 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>
--}
-diff --git a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.local b/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.local
-deleted file mode 100644
-index c0990e51d0..0000000000
---- a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.local
-+++ /dev/null
-@@ -1 +0,0 @@
--# Site-specific additions and overrides for '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
 


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/
@ 2022-04-04  7:49 David Seifert
  0 siblings, 0 replies; 20+ messages in thread
From: David Seifert @ 2022-04-04  7:49 UTC (permalink / raw
  To: gentoo-commits

commit:     7bc2be1ebb665a5152bf35cfaf1be055d239b06d
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Mon Apr  4 07:48:47 2022 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Mon Apr  4 07:48:47 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7bc2be1e

app-emulation/libvirt: remove unused patch

Closes: https://github.com/gentoo/gentoo/pull/24892
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../files/libvirt-8.1.0-do-not-use-sysconfig.patch | 208 ---------------------
 1 file changed, 208 deletions(-)

diff --git a/app-emulation/libvirt/files/libvirt-8.1.0-do-not-use-sysconfig.patch b/app-emulation/libvirt/files/libvirt-8.1.0-do-not-use-sysconfig.patch
deleted file mode 100644
index ec957cf51784..000000000000
--- a/app-emulation/libvirt/files/libvirt-8.1.0-do-not-use-sysconfig.patch
+++ /dev/null
@@ -1,208 +0,0 @@
-From e669d8bdc18a04154b10f0a21ee3f7c4141d2a42 Mon Sep 17 00:00:00 2001
-Message-Id: <e669d8bdc18a04154b10f0a21ee3f7c4141d2a42.1642669122.git.mprivozn@redhat.com>
-From: Michal Privoznik <mprivozn@redhat.com>
-Date: Thu, 20 Jan 2022 09:39:58 +0100
-Subject: [PATCH] do not use sysconfig
-
-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         | 1 -
- 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         | 1 -
- 15 files changed, 15 deletions(-)
-
-diff --git a/src/interface/virtinterfaced.service.in b/src/interface/virtinterfaced.service.in
-index 3d944e17a9..1d94f3c943 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 2b5163e179..4edfdeb719 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..a734e0ef9d 100644
---- a/src/logging/virtlogd.service.in
-+++ b/src/logging/virtlogd.service.in
-@@ -7,7 +7,6 @@ Documentation=man:virtlogd(8)
- Documentation=https://libvirt.org
- 
- [Service]
--EnvironmentFile=-@sysconfdir@/sysconfig/virtlogd
- ExecStart=@sbindir@/virtlogd $VIRTLOGD_ARGS
- ExecReload=/bin/kill -USR1 $MAINPID
- # Losing the logs is a really bad thing that will
-diff --git a/src/lxc/virtlxcd.service.in b/src/lxc/virtlxcd.service.in
-index d58bde9f5d..c5c2bb31e4 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 3decfbbf1d..c7c57fdd44 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 688cf89822..41c7a0f0f0 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 36d00b58f0..d422bfeca1 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 551eb4d405..4c0344aad2 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 10e8cf7263..5fc887fe4a 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 cbd63fe0b2..bdf96ea0b1 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 f72f8426fd..6e865e53e7 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 cfdafc39d2..a1108e60f8 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 1a9b233e11..765b777536 100644
---- a/tools/libvirt-guests.service.in
-+++ b/tools/libvirt-guests.service.in
-@@ -10,7 +10,6 @@ Documentation=man:libvirt-guests(8)
- Documentation=https://libvirt.org
- 
- [Service]
--EnvironmentFile=-@sysconfdir@/sysconfig/libvirt-guests
- # Hack just call traditional service until we factor
- # out the code
- ExecStart=@libexecdir@/libvirt-guests.sh start
--- 
-2.34.1
-


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/
@ 2022-10-02 14:43 Conrad Kostecki
  0 siblings, 0 replies; 20+ messages in thread
From: Conrad Kostecki @ 2022-10-02 14:43 UTC (permalink / raw
  To: gentoo-commits

commit:     4c5a5e6037ab184811f062e647f6b8fe3bf6830d
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Sat Sep 24 09:55:11 2022 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sun Oct  2 14:42:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c5a5e60

app-emulation/libvirt: remove unused patches

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Portage 3.0.37 / pkgdev 0.2.2 / pkgcheck 0.10.15
Closes: https://github.com/gentoo/gentoo/pull/27426
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../libvirt/files/libvirt-7.10.0-fix_soname.patch  | 13 -----
 .../libvirt/files/libvirt-7.9.0-fix_cgroupv2.patch | 32 -----------
 .../libvirt/files/libvirt-8.5.0-glibc-2.36.patch   | 67 ----------------------
 3 files changed, 112 deletions(-)

diff --git a/app-emulation/libvirt/files/libvirt-7.10.0-fix_soname.patch b/app-emulation/libvirt/files/libvirt-7.10.0-fix_soname.patch
deleted file mode 100644
index 8e89fc818fb5..000000000000
--- a/app-emulation/libvirt/files/libvirt-7.10.0-fix_soname.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/tools/nss/meson.build b/tools/nss/meson.build
-index 198936f3d42e1827d0f03ff3b27a198bdc4fa59c..f77309ebcab8063c515ae2bf95dbff542238a2ee 100644
---- a/tools/nss/meson.build
-+++ b/tools/nss/meson.build
-@@ -59,7 +59,7 @@ nss_libvirt_guest_syms = '@0@@1@'.format(
-   meson.current_source_dir() / nss_guest_sym_file,
- )
- 
--nss_libvirt_lib = shared_module(
-+nss_libvirt_lib = shared_library(
-   'nss_libvirt',
-   name_prefix: nss_prefix,
-   name_suffix: 'so.@0@'.format(nss_so_ver),

diff --git a/app-emulation/libvirt/files/libvirt-7.9.0-fix_cgroupv2.patch b/app-emulation/libvirt/files/libvirt-7.9.0-fix_cgroupv2.patch
deleted file mode 100644
index 1309996f3ecf..000000000000
--- a/app-emulation/libvirt/files/libvirt-7.9.0-fix_cgroupv2.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From c80a05cd7d5f17ee16a2bc2546981863451fcab7 Mon Sep 17 00:00:00 2001
-From: "System user; portage" <portage@kestrel.43-1.org>
-Date: Wed, 8 Dec 2021 15:07:06 -0600
-Subject: [PATCH] Revert "lxc: controller: Fix container launch on cgroup v1"
-
-This reverts commit 1b9ce05ce241a581d4e80228c92ceb0266f21f94.
----
- src/lxc/lxc_controller.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
-index 444f728af4..8953e0c904 100644
---- a/src/lxc/lxc_controller.c
-+++ b/src/lxc/lxc_controller.c
-@@ -865,12 +865,12 @@ static int virLXCControllerSetupCgroupLimits(virLXCController *ctrl)
-     nodeset = virDomainNumatuneGetNodeset(ctrl->def->numa, auto_nodeset, -1);
- 
-     if (!(ctrl->cgroup = virLXCCgroupCreate(ctrl->def,
--                                            getpid(),
-+                                            ctrl->initpid,
-                                             ctrl->nnicindexes,
-                                             ctrl->nicindexes)))
-         goto cleanup;
- 
--    if (virCgroupAddMachineProcess(ctrl->cgroup, ctrl->initpid) < 0)
-+    if (virCgroupAddMachineProcess(ctrl->cgroup, getpid()) < 0)
-         goto cleanup;
- 
-     /* Add all qemu-nbd tasks to the cgroup */
--- 
-2.32.0
-

diff --git a/app-emulation/libvirt/files/libvirt-8.5.0-glibc-2.36.patch b/app-emulation/libvirt/files/libvirt-8.5.0-glibc-2.36.patch
deleted file mode 100644
index e02c5ea44086..000000000000
--- a/app-emulation/libvirt/files/libvirt-8.5.0-glibc-2.36.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-https://bugs.gentoo.org/863446
-https://github.com/libvirt/libvirt/commit/9493c9b79dc541ec9e0fd73c6d87bdf8d30aaa90
-https://github.com/libvirt/libvirt/commit/c0d9adf220dc0d223330a7bac37b174132d330ba
-
-From 9493c9b79dc541ec9e0fd73c6d87bdf8d30aaa90 Mon Sep 17 00:00:00 2001
-From: Cole Robinson <crobinso@redhat.com>
-Date: Mon, 1 Aug 2022 15:20:38 -0400
-Subject: [PATCH] lxc: containter: fix build with glibc 2.36
-
-With glibc 2.36, sys/mount.h and linux/mount.h conflict:
-https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
-
-lxc_container.c imports sys/mount.h and linux/fs.h, which pulls in
-linux/mount.h.
-
-linux/fs.h isn't required here though. glibc sys/mount.h has had
-MS_MOVE since 2.12 in 2010
-
-Reviewed-by: Erik Skultety <eskultet@redhat.com>
-Signed-off-by: Cole Robinson <crobinso@redhat.com>
---- a/src/lxc/lxc_container.c
-+++ b/src/lxc/lxc_container.c
-@@ -33,9 +33,6 @@
- /* Yes, we want linux private one, for _syscall2() macro */
- #include <linux/unistd.h>
- 
--/* For MS_MOVE */
--#include <linux/fs.h>
--
- #if WITH_CAPNG
- # include <cap-ng.h>
- #endif
-
-From c0d9adf220dc0d223330a7bac37b174132d330ba Mon Sep 17 00:00:00 2001
-From: Cole Robinson <crobinso@redhat.com>
-Date: Mon, 1 Aug 2022 15:24:01 -0400
-Subject: [PATCH] virfile: Fix build with glibc 2.36
-
-With glibc 2.36, sys/mount.h and linux/mount.h conflict:
-https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
-
-virfile.c imports sys/mount.h and linux/fs.h, which pulls in
-linux/mount.h.
-
-Manually define the constants we need from linux/fs.h, like was
-done in llvm:
-
-https://reviews.llvm.org/rGb379129c4beb3f26223288627a1291739f33af02
-
-Reviewed-by: Erik Skultety <eskultet@redhat.com>
-Signed-off-by: Cole Robinson <crobinso@redhat.com>
---- a/src/util/virfile.c
-+++ b/src/util/virfile.c
-@@ -71,7 +71,11 @@
- # endif
- # include <sys/ioctl.h>
- # include <linux/cdrom.h>
--# include <linux/fs.h>
-+/* These come from linux/fs.h, but that header conflicts with
-+ * sys/mount.h on glibc 2.36+ */
-+# define FS_IOC_GETFLAGS _IOR('f', 1, long)
-+# define FS_IOC_SETFLAGS _IOW('f', 2, long)
-+# define FS_NOCOW_FL 0x00800000
- #endif
- 
- #if WITH_LIBATTR
-


^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-10-02 14:43 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-04  7:49 [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/ David Seifert
  -- strict thread matches above, loose matches on Subject: below --
2022-10-02 14:43 Conrad Kostecki
2022-03-15  5:52 Joonas Niilola
2022-03-08 13:18 Sam James
2021-02-11 18:02 Matthias Maier
2020-10-06 20:45 Sam James
2020-10-06 18:07 Sam James
2020-04-05 17:19 Matthias Maier
2019-10-15 16:09 Matthias Maier
2019-07-28 18:21 Matthias Maier
2019-07-09 18:54 Matthias Maier
2019-07-03  8:09 Matthias Maier
2019-06-18  0:35 Aaron Bauman
2019-05-19 23:42 Matthias Maier
2019-03-26 16:45 Patrice Clement
2018-06-29  4:50 Matthias Maier
2015-09-11 14:25 Doug Goldstein
2015-09-02 16:03 Doug Goldstein
2015-08-28 13:48 Doug Goldstein
2015-08-20  1:13 Matthias Maier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox