summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Rękorajski2012-08-13 11:29:07 (GMT)
committerJan Rękorajski2012-08-13 11:29:07 (GMT)
commitd37361b918331ae4e93edb370ee3ec785e579af1 (patch)
treeec4ec3f0c46dde3e4a157bbe59de7add907537a5
parent7b1dc45dff1d2ad10631645004e408c567de7b38 (diff)
downloadudisks2-d37361b918331ae4e93edb370ee3ec785e579af1.zip
udisks2-d37361b918331ae4e93edb370ee3ec785e579af1.tar.gz
Fix fedora/systemd monoculture stupidityauto/ti/udisks2-1.99.0-2auto/th/udisks2-1.99.0-2
udisks2 when built with systemd-logind (default) uncoditionally assumes that init is also systemd, leading to inability to detect current seat. Fix this by always returning TRUE for current seat check when init is not systemd - same as complitation without systemd-logind.
-rw-r--r--systemd_booted.patch55
-rw-r--r--udisks2.spec4
2 files changed, 58 insertions, 1 deletions
diff --git a/systemd_booted.patch b/systemd_booted.patch
new file mode 100644
index 0000000..f6912c2
--- /dev/null
+++ b/systemd_booted.patch
@@ -0,0 +1,55 @@
+--- udisks-1.99.0/configure.ac~ 2012-07-10 13:57:31.000000000 +0200
++++ udisks-1.99.0/configure.ac 2012-08-13 13:01:49.864645029 +0200
+@@ -138,6 +138,13 @@
+ AC_SUBST(LIBSYSTEMD_LOGIN_CFLAGS)
+ AC_SUBST(LIBSYSTEMD_LOGIN_LIBS)
+
++PKG_CHECK_MODULES(LIBSYSTEMD_DAEMON,
++ [libsystemd-daemon >= 44],
++ have_libsystemd_daemon=yes,
++ have_libsystemd_daemon=no)
++AC_SUBST(LIBSYSTEMD_DAEMON_CFLAGS)
++AC_SUBST(LIBSYSTEMD_DAEMON_LIBS)
++
+ # udevdir
+ AC_ARG_WITH([udevdir],
+ AS_HELP_STRING([--with-udevdir=DIR], [Directory for udev]),
+--- udisks-1.99.0/src/Makefile.am~ 2012-08-13 12:56:38.778928525 +0200
++++ udisks-1.99.0/src/Makefile.am 2012-08-13 13:00:31.560260729 +0200
+@@ -88,6 +88,7 @@
+ $(POLKIT_GOBJECT_1_CFLAGS) \
+ $(ACL_CFLAGS) \
+ $(LIBSYSTEMD_LOGIN_CFLAGS) \
++ $(LIBSYSTEMD_DAEMON_CFLAGS) \
+ $(NULL)
+
+ libudisks_daemon_la_LIBADD = \
+@@ -98,6 +99,7 @@
+ $(POLKIT_GOBJECT_1_LIBS) \
+ $(ACL_LIBS) \
+ $(LIBSYSTEMD_LOGIN_LIBS) \
++ $(LIBSYSTEMD_DAEMON_LIBS) \
+ $(top_builddir)/udisks/libudisks2.la \
+ $(NULL)
+
+--- udisks-1.99.0/src/udisksdaemonutil.c~ 2012-07-27 18:40:34.000000000 +0200
++++ udisks-1.99.0/src/udisksdaemonutil.c 2012-08-13 12:53:01.928371044 +0200
+@@ -43,6 +43,7 @@
+
+ #if defined(HAVE_LIBSYSTEMD_LOGIN)
+ #include <systemd/sd-login.h>
++#include <systemd/sd-daemon.h>
+ #endif
+
+ /**
+@@ -1021,6 +1021,10 @@
+ UDisksObject *drive_object = NULL;
+ UDisksDrive *drive = NULL;
+
++ /* if we don't booted systemd, assume it's always the same seat */
++ if (sd_booted() <= 0)
++ return TRUE;
++
+ if (UDISKS_IS_LINUX_BLOCK_OBJECT (object))
+ {
+ UDisksLinuxBlockObject *linux_block_object;
diff --git a/udisks2.spec b/udisks2.spec
index 2e3ffd7..9dcc2d1 100644
--- a/udisks2.spec
+++ b/udisks2.spec
@@ -6,12 +6,13 @@
Summary: Disk Management Service
Name: udisks2
Version: 1.99.0
-Release: 1
+Release: 2
License: GPL v2+
Group: Libraries
Source0: http://udisks.freedesktop.org/releases/udisks-%{version}.tar.bz2
# Source0-md5: b42f1d36ad4606622a9989e166fbae20
Patch0: automake-1.12.patch
+Patch1: systemd_booted.patch
URL: http://www.freedesktop.org/wiki/Software/udisks
BuildRequires: acl-devel
BuildRequires: autoconf
@@ -115,6 +116,7 @@ Pakiet ten dostarcza bashowe uzupełnianie nazw dla udisks2.
%prep
%setup -q -n udisks-%{version}
%patch0 -p1
+%patch1 -p1
%build
%{__intltoolize}