[libvirt] [PATCH 0/2] Various RHEL 6 bugfixes

This patch set fixes a couple of minor bugs I discovered while building libvirt v1.3.0 for RHEL 6. Michael Chapman (2): spec: fix builds on RHEL <= 6 virtlogd: fix lock file path in initscript libvirt.spec.in | 8 ++++---- src/logging/virtlogd.init.in | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) -- 2.4.3

- dbus-devel is needed as build dependency if polkit support is enabled. - chkconfig(8) and service(8) are in /sbin/, not /bin/. Signed-off-by: Michael Chapman <mike@very.puzzling.org> --- libvirt.spec.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 6193177..3afef66 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -647,8 +647,8 @@ BuildRequires: util-linux BuildRequires: nfs-utils %endif -%if %{with_firewalld} -# Communication with the firewall daemon uses DBus +%if %{with_firewalld} || %{with_polkit} +# Communication with the firewall and polkit daemons use DBus BuildRequires: dbus-devel %endif @@ -1792,9 +1792,9 @@ if [ $1 -ge 1 ] ; then /bin/systemctl start virtlogd.socket || : %else /sbin/chkconfig libvirtd 1>/dev/null 2>&1 && - /bin/chkconfig virtlogd on || : + /sbin/chkconfig virtlogd on || : /sbin/service libvirtd status 1>/dev/null 2>&1 && - /bin/service virtlogd start || : + /sbin/service virtlogd start || : %endif fi -- 2.4.3

On 12/31/2015 12:09 AM, Michael Chapman wrote:
- dbus-devel is needed as build dependency if polkit support is enabled. - chkconfig(8) and service(8) are in /sbin/, not /bin/.
Both fixes are valid, and not just for RHEL <= 6, but they should be in separate patches (both because they are separate issues, and because the dbus-devel dependency is a long-standing bug that could/should be backported to earlier maintenance releases while the chkconfig/service location are fixes to a very recent addition, so they would cause a merge conflict if backported). ACK - I split it into two separate patches (both attributed to you) and pushed them both.
Signed-off-by: Michael Chapman <mike@very.puzzling.org> --- libvirt.spec.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in index 6193177..3afef66 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -647,8 +647,8 @@ BuildRequires: util-linux BuildRequires: nfs-utils %endif
-%if %{with_firewalld} -# Communication with the firewall daemon uses DBus +%if %{with_firewalld} || %{with_polkit} +# Communication with the firewall and polkit daemons use DBus BuildRequires: dbus-devel %endif
@@ -1792,9 +1792,9 @@ if [ $1 -ge 1 ] ; then /bin/systemctl start virtlogd.socket || : %else /sbin/chkconfig libvirtd 1>/dev/null 2>&1 && - /bin/chkconfig virtlogd on || : + /sbin/chkconfig virtlogd on || : /sbin/service libvirtd status 1>/dev/null 2>&1 && - /bin/service virtlogd start || : + /sbin/service virtlogd start || : %endif fi

The virtlogd initscript's lock file should go in /var/lock/subsys/, not (the nonexistent) /var/log/subsys/. Signed-off-by: Michael Chapman <mike@very.puzzling.org> --- src/logging/virtlogd.init.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/logging/virtlogd.init.in b/src/logging/virtlogd.init.in index 1408236..bc9b903 100644 --- a/src/logging/virtlogd.init.in +++ b/src/logging/virtlogd.init.in @@ -42,7 +42,7 @@ start() { daemon --pidfile $PIDFILE --check $SERVICE $PROCESS --daemon $VIRTLOGD_ARGS RETVAL=$? echo - [ $RETVAL -eq 0 ] && touch @localstatedir@/log/subsys/$SERVICE + [ $RETVAL -eq 0 ] && touch @localstatedir@/lock/subsys/$SERVICE } stop() { @@ -52,7 +52,7 @@ stop() { RETVAL=$? echo if [ $RETVAL -eq 0 ]; then - rm -f @localstatedir@/log/subsys/$SERVICE + rm -f @localstatedir@/lock/subsys/$SERVICE rm -f $PIDFILE fi } @@ -84,7 +84,7 @@ case "$1" in reload ;; condrestart|try-restart) - [ -f @localstatedir@/log/subsys/$SERVICE ] && restart || : + [ -f @localstatedir@/lock/subsys/$SERVICE ] && restart || : ;; *) echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload|try-restart}" -- 2.4.3

On 12/31/2015 12:09 AM, Michael Chapman wrote:
The virtlogd initscript's lock file should go in /var/lock/subsys/, not (the nonexistent) /var/log/subsys/.
ACK and push. Thanks!
Signed-off-by: Michael Chapman <mike@very.puzzling.org> --- src/logging/virtlogd.init.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/logging/virtlogd.init.in b/src/logging/virtlogd.init.in index 1408236..bc9b903 100644 --- a/src/logging/virtlogd.init.in +++ b/src/logging/virtlogd.init.in @@ -42,7 +42,7 @@ start() { daemon --pidfile $PIDFILE --check $SERVICE $PROCESS --daemon $VIRTLOGD_ARGS RETVAL=$? echo - [ $RETVAL -eq 0 ] && touch @localstatedir@/log/subsys/$SERVICE + [ $RETVAL -eq 0 ] && touch @localstatedir@/lock/subsys/$SERVICE }
stop() { @@ -52,7 +52,7 @@ stop() { RETVAL=$? echo if [ $RETVAL -eq 0 ]; then - rm -f @localstatedir@/log/subsys/$SERVICE + rm -f @localstatedir@/lock/subsys/$SERVICE rm -f $PIDFILE fi } @@ -84,7 +84,7 @@ case "$1" in reload ;; condrestart|try-restart) - [ -f @localstatedir@/log/subsys/$SERVICE ] && restart || : + [ -f @localstatedir@/lock/subsys/$SERVICE ] && restart || : ;; *) echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload|try-restart}"
participants (2)
-
Laine Stump
-
Michael Chapman