Dr. Werner Fink 2014-03-12 15:08:08 +00:00 committed by Git OBS Bridge
parent 24da852755
commit 07ec1297b1
4 changed files with 47 additions and 21 deletions

View File

@ -0,0 +1,36 @@
From: Olaf Kirch <okir@suse.de>
Date: Date: Wed, 12 Mar 2014 13:52:50 +0000
Subject: [PATCH] systemd big endian reply matching
Reply matching on big endian architectures is broken in the dbus code.
The hashmap functions, which are used to store and retrieves the reply_callback
structures of asynchronous calls, take a uint64_t pointer for the key argument.
However, the reply_cookie of the sd_bus_message is stored in a 32bit variable.
This works nicely on x86-64, because (a) it's little endian, and (b) the struct
is padded to the next 8 byte boundary because reply_cookie is wedged between
two pointers.
On s390x, this fails badly thanks to being big endian.
Unfortunately, this results in complete failure of any communication
between systemd daemons and the dbus-daemon, because it never gets
past the initial Hello handshake - which is sent as an asynchronous
message.
Signed-off-by: Olaf Kirch <okir@suse.de>
Index: systemd-210/src/libsystemd/sd-bus/bus-message.h
===================================================================
--- systemd-210/src/libsystemd/sd-bus/bus-message.h
+++ systemd-210/src/libsystemd/sd-bus/bus-message.h
@@ -84,7 +84,7 @@ struct sd_bus_message {
sd_bus *bus;
- uint32_t reply_cookie;
+ uint64_t reply_cookie;
const char *path;
const char *interface;

View File

@ -43,7 +43,6 @@ BuildRequires: audit-devel
BuildRequires: binutils-gold
%endif
%if ! 0%{?bootstrap}
BuildRequires: dbus-1
BuildRequires: docbook-xsl-stylesheets
%endif
BuildRequires: fdupes
@ -204,7 +203,7 @@ Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch
# PATCH-FIX-OPENSUSE use-usr-sbin-sulogin-for-emergency-service.patch arvidjaar@gmail.com -- fix path to sulogin
Patch46: use-usr-sbin-sulogin-for-emergency-service.patch
# PATCH-FIX-OPENSUSE Make systemd talk with dbus-daemon even on big endian
Patch47: use-correct-size-4-reply_cookie-4-bigendian.patch
Patch47: systemd-big-endian-reply-matching.patch
# PATCH-FIX-OPENSUSE make-emergency.service-conflict-with-syslog.socket.patch (bnc#852232)
Patch84: make-emergency.service-conflict-with-syslog.socket.patch
# PATCH-FIX-SUSE 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch
@ -658,6 +657,10 @@ export V=1
%configure \
--docdir=%{_docdir}/systemd \
--with-pamlibdir=/%{_lib}/security \
--with-dbuspolicydir=%{_sysconfdir}/dbus-1/system.d \
--with-dbussessionservicedir=%{_datadir}/dbus-1/services \
--with-dbussystemservicedir=%{_datadir}/dbus-1/system-services \
--with-dbusinterfacedir=%{_datadir}/dbus-1/interfaces \
%if 0%{?bootstrap}
--disable-gudev \
--disable-myhostname \
@ -1178,7 +1181,12 @@ exit 0
%dir %{_sysconfdir}/systemd/system
%dir %{_sysconfdir}/systemd/user
%dir %{_sysconfdir}/xdg/systemd
%dir %{_sysconfdir}/dbus-1
%dir %{_sysconfdir}/dbus-1/system.d
%{_sysconfdir}/xdg/systemd/user
%dir %{_datadir}/dbus-1
%dir %{_datadir}/dbus-1/services
%dir %{_datadir}/dbus-1/system-services
%config(noreplace) %{_sysconfdir}/systemd/bootchart.conf
%config(noreplace) %{_sysconfdir}/systemd/system.conf
%config(noreplace) %{_sysconfdir}/systemd/logind.conf

View File

@ -198,7 +198,7 @@ Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch
# PATCH-FIX-OPENSUSE use-usr-sbin-sulogin-for-emergency-service.patch arvidjaar@gmail.com -- fix path to sulogin
Patch46: use-usr-sbin-sulogin-for-emergency-service.patch
# PATCH-FIX-OPENSUSE Make systemd talk with dbus-daemon even on big endian
Patch47: use-correct-size-4-reply_cookie-4-bigendian.patch
Patch47: systemd-big-endian-reply-matching.patch
# PATCH-FIX-OPENSUSE make-emergency.service-conflict-with-syslog.socket.patch (bnc#852232)
Patch84: make-emergency.service-conflict-with-syslog.socket.patch
# PATCH-FIX-SUSE 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch

View File

@ -1,18 +0,0 @@
From: Olaf Kirch <okir@suse.de>
Date: Date: Wed, 12 Mar 2014 13:52:50 +0000
Subject: [PATCH] Let systemd talk with dbus-daemon even on big endian
Related to bug #866732 that is to help systemd to talk with dbus-daemon
on s390x.
--- systemd-210/src/libsystemd/sd-bus/bus-message.h
+++ systemd-210/src/libsystemd/sd-bus/bus-message.h 2014-03-12 14:06:54.862235499 +0000
@@ -84,7 +84,7 @@ struct sd_bus_message {
sd_bus *bus;
- uint32_t reply_cookie;
+ uint64_t reply_cookie;
const char *path;
const char *interface;