From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3B477138350 for ; Sat, 11 Apr 2020 01:54:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 67A31E0928; Sat, 11 Apr 2020 01:54:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 366D5E0928 for ; Sat, 11 Apr 2020 01:54:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 228E034EEFC for ; Sat, 11 Apr 2020 01:54:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B11542B for ; Sat, 11 Apr 2020 01:54:33 +0000 (UTC) From: "Matthias Maier" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matthias Maier" Message-ID: <1586569530.ca0a61eed33d17d0bd434ea5ad5c7bf2f891621c.tamiko@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/, app-emulation/libvirt/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-emulation/libvirt/files/libvirtd.init-r19 app-emulation/libvirt/files/virtlockd.init-r2 app-emulation/libvirt/files/virtlogd.init-r2 app-emulation/libvirt/libvirt-6.2.0-r1.ebuild app-emulation/libvirt/libvirt-6.2.0-r2.ebuild app-emulation/libvirt/libvirt-9999.ebuild X-VCS-Directories: app-emulation/libvirt/ app-emulation/libvirt/files/ X-VCS-Committer: tamiko X-VCS-Committer-Name: Matthias Maier X-VCS-Revision: ca0a61eed33d17d0bd434ea5ad5c7bf2f891621c X-VCS-Branch: master Date: Sat, 11 Apr 2020 01:54:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 77d4d937-3392-4583-8620-30602e45fbb1 X-Archives-Hash: 0c7d25928bac042c09540e33d2f557f6 commit: ca0a61eed33d17d0bd434ea5ad5c7bf2f891621c Author: Matthias Maier gentoo org> AuthorDate: Sat Apr 11 01:45:30 2020 +0000 Commit: Matthias Maier gentoo org> CommitDate: Sat Apr 11 01:45:30 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca0a61ee app-emulation/libvirt: update openrc init scripts Upstream changes between 6.1.0 and 6.2.0 on pidfile handling break our openrc init script due to a race condition. Work around this issue by not using the "-d" option (keeping the daemon in foreground) and let start-stop-daemon do double-forking ("-b" option). Closes: https://bugs.gentoo.org/716800 Package-Manager: Portage-2.3.98, Repoman-2.3.22 Signed-off-by: Matthias Maier gentoo.org> app-emulation/libvirt/files/libvirtd.init-r19 | 33 ++++++++++++++++++++++ app-emulation/libvirt/files/virtlockd.init-r2 | 23 +++++++++++++++ app-emulation/libvirt/files/virtlogd.init-r2 | 23 +++++++++++++++ ...irt-6.2.0-r1.ebuild => libvirt-6.2.0-r2.ebuild} | 6 ++-- app-emulation/libvirt/libvirt-9999.ebuild | 6 ++-- 5 files changed, 85 insertions(+), 6 deletions(-) diff --git a/app-emulation/libvirt/files/libvirtd.init-r19 b/app-emulation/libvirt/files/libvirtd.init-r19 new file mode 100644 index 00000000000..60dad6a791d --- /dev/null +++ b/app-emulation/libvirt/files/libvirtd.init-r19 @@ -0,0 +1,33 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="Virtual Machine Management daemon (libvirt)" + +LIBVIRTD_OPTS=${LIBVIRTD_OPTS:-"${LIBVIRTD_OPTS}"} +LIBVIRTD_TIMEOUT=${LIBVIRTD_TERMTIMEOUT:-"TERM/25/KILL/5"} + +command="/usr/sbin/libvirtd" +command_args="${LIBVIRTD_OPTS}" +start_stop_daemon_args="-b --env KRB5_KTNAME=/etc/libvirt/krb5.tab" +pidfile="/run/libvirtd.pid" +retry="${LIBVIRTD_TERMTIMEOUT}" + +depend() { + need virtlogd + use ceph dbus iscsid virtlockd + after cgconfig corosync ebtables iptables ip6tables nfs nfsmount ntp-client ntpdportmap rpc.statd sanlock xenconsoled + USE_FLAG_FIREWALLD +} + +start_pre() { + # Test configuration directories in /etc/libvirt/ to be either not + # present or a directory, i.e. not a regular file, bug #532892 + + checkpath --directory /etc/libvirt/lxc || return 1 + checkpath --directory /etc/libvirt/nwfilter || return 1 + [ -L /etc/libvirt/qemu ] || + checkpath --directory /etc/libvirt/qemu || return 1 + [ -L /etc/libvirt/storage ] || + checkpath --directory /etc/libvirt/storage || return 1 +} diff --git a/app-emulation/libvirt/files/virtlockd.init-r2 b/app-emulation/libvirt/files/virtlockd.init-r2 new file mode 100644 index 00000000000..385dc1e6231 --- /dev/null +++ b/app-emulation/libvirt/files/virtlockd.init-r2 @@ -0,0 +1,23 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="libvirt virtual machine lock manager" +command="/usr/sbin/virtlockd" +start_stop_daemon_args="-b" +pidfile="/run/virtlockd.pid" + +extra_started_commands="reload" +description_reload="re-exec the daemon, while maintaining locks and clients" + + +depend() { + after ntp-client ntpd nfs nfsmount corosync +} + +reload() { + ebegin "re-exec() virtlockd" + + start-stop-daemon --signal SIGUSR1 \ + --exec "${command}" --pidfile "${pidfile}" +} diff --git a/app-emulation/libvirt/files/virtlogd.init-r2 b/app-emulation/libvirt/files/virtlogd.init-r2 new file mode 100644 index 00000000000..442dcb8de48 --- /dev/null +++ b/app-emulation/libvirt/files/virtlogd.init-r2 @@ -0,0 +1,23 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="libvirt virtual machine logging manager" +command="/usr/sbin/virtlogd" +start_stop_daemon_args="-b" +pidfile="/run/virtlogd.pid" + +extra_started_commands="reload" +description_reload="re-exec the daemon, while maintaining open connections" + + +depend() { + after ntp-client ntpd nfs nfsmount corosync +} + +reload() { + ebegin "re-exec() virtlogd" + + start-stop-daemon --signal SIGUSR1 \ + --exec "${command}" --pidfile "${pidfile}" +} diff --git a/app-emulation/libvirt/libvirt-6.2.0-r1.ebuild b/app-emulation/libvirt/libvirt-6.2.0-r2.ebuild similarity index 98% rename from app-emulation/libvirt/libvirt-6.2.0-r1.ebuild rename to app-emulation/libvirt/libvirt-6.2.0-r2.ebuild index a387149a364..8079bd8549b 100644 --- a/app-emulation/libvirt/libvirt-6.2.0-r1.ebuild +++ b/app-emulation/libvirt/libvirt-6.2.0-r2.ebuild @@ -219,7 +219,7 @@ src_prepare() { default # Tweak the init script: - cp "${FILESDIR}/libvirtd.init-r18" "${S}/libvirtd.init" || die + cp "${FILESDIR}/libvirtd.init-r19" "${S}/libvirtd.init" || die sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ -i "${S}/libvirtd.init" || die "sed failed" @@ -328,8 +328,8 @@ my_src_install() { newinitd "${S}/libvirtd.init" libvirtd newinitd "${FILESDIR}/libvirt-guests.init-r4" libvirt-guests - newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd - newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd + newinitd "${FILESDIR}/virtlockd.init-r2" virtlockd + newinitd "${FILESDIR}/virtlogd.init-r2" virtlogd newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests diff --git a/app-emulation/libvirt/libvirt-9999.ebuild b/app-emulation/libvirt/libvirt-9999.ebuild index 9d895175578..0f0e3da1713 100644 --- a/app-emulation/libvirt/libvirt-9999.ebuild +++ b/app-emulation/libvirt/libvirt-9999.ebuild @@ -218,7 +218,7 @@ src_prepare() { default # Tweak the init script: - cp "${FILESDIR}/libvirtd.init-r18" "${S}/libvirtd.init" || die + cp "${FILESDIR}/libvirtd.init-r19" "${S}/libvirtd.init" || die sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ -i "${S}/libvirtd.init" || die "sed failed" @@ -327,8 +327,8 @@ my_src_install() { newinitd "${S}/libvirtd.init" libvirtd newinitd "${FILESDIR}/libvirt-guests.init-r4" libvirt-guests - newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd - newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd + newinitd "${FILESDIR}/virtlockd.init-r2" virtlockd + newinitd "${FILESDIR}/virtlogd.init-r2" virtlogd newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests