Patchwork [12/12] systemd: remove libsystemd-daemon linkage in libudev

login
register
mail settings
Submitter Ross Burton
Date March 11, 2013, 6:24 p.m.
Message ID <1fd5b960dd36458b7b829f9094df18cd8b5ac201.1363025917.git.ross.burton@intel.com>
Download mbox | patch
Permalink /patch/45973/
State Accepted
Commit 23c88bb151bfcc8b4e50f6c0543b22ecbc7923b5
Headers show

Comments

Ross Burton - March 11, 2013, 6:24 p.m.
libudev was statically linking to libsystemd-shared, which was linking to
libsystemd-daemon (via libtool).  This is a spurious dependency so backport a
commit from upstream to remove it.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 .../systemd/systemd/udev-linkage.patch             |   62 ++++++++++++++++++++
 meta/recipes-core/systemd/systemd_197.bb           |    1 +
 2 files changed, 63 insertions(+)
 create mode 100644 meta/recipes-core/systemd/systemd/udev-linkage.patch

Patch

diff --git a/meta/recipes-core/systemd/systemd/udev-linkage.patch b/meta/recipes-core/systemd/systemd/udev-linkage.patch
new file mode 100644
index 0000000..a0d9b4c
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/udev-linkage.patch
@@ -0,0 +1,62 @@ 
+Don't cause libudev to link against libsystemd-daemon.
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 8ee37c2bed1d452d566abf85b0cdf732b7ca029a Mon Sep 17 00:00:00 2001
+From: Kay Sievers <kay@vrfy.org>
+Date: Thu, 7 Feb 2013 13:47:46 +0100
+Subject: [PATCH] build-sys: at least for now, never link libudev against
+ systemd's shared libraries
+
+---
+ Makefile.am |   12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 474110a..0e6c88f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -811,8 +811,6 @@ libsystemd_shared_la_SOURCES = \
+ 	src/shared/calendarspec.c \
+ 	src/shared/calendarspec.h
+ 
+-libsystemd_shared_la_LIBADD = libsystemd-daemon.la
+-
+ #-------------------------------------------------------------------------------
+ noinst_LTLIBRARIES += \
+ 	libsystemd-dbus.la
+@@ -1662,6 +1660,9 @@ systemd_tty_ask_password_agent_LDADD = \
+ libsystemd_daemon_la_SOURCES = \
+ 	src/libsystemd-daemon/sd-daemon.c
+ 
++libsystemd_daemon_internal_la_SOURCES = \
++        $(libsystemd_daemon_la_SOURCES)
++
+ libsystemd_daemon_la_CFLAGS = \
+ 	$(AM_CFLAGS) \
+ 	-fvisibility=hidden \
+@@ -1689,6 +1690,9 @@ UNINSTALL_EXEC_HOOKS += libsystemd-daemon-uninstall-hook
+ lib_LTLIBRARIES += \
+ 	libsystemd-daemon.la
+ 
++noinst_LTLIBRARIES += \
++        libsystemd-daemon-internal.la
++
+ pkgconfiglib_DATA += \
+ 	src/libsystemd-daemon/libsystemd-daemon.pc
+ 
+@@ -1768,7 +1772,9 @@ libudev_la_LDFLAGS = \
+ 	-Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
+ 
+ libudev_la_LIBADD = \
+-	libsystemd-shared.la
++	libsystemd-shared.la \
++	libsystemd-daemon-internal.la \
++	libsystemd-id128-internal.la
+ 
+ pkgconfiglib_DATA += \
+ 	src/libudev/libudev.pc
+-- 
+1.7.10.4
+
diff --git a/meta/recipes-core/systemd/systemd_197.bb b/meta/recipes-core/systemd/systemd_197.bb
index e2bf415..5180eef 100644
--- a/meta/recipes-core/systemd/systemd_197.bb
+++ b/meta/recipes-core/systemd/systemd_197.bb
@@ -25,6 +25,7 @@  SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
            ${UCLIBCPATCHES} \
            file://00-create-volatile.conf \
            file://0001-systemd-analyze-rewrite-in-C.patch \
+           file://udev-linkage.patch \
           "
 SRC_URI[md5sum] = "56a860dceadfafe59f40141eb5223743"
 SRC_URI[sha256sum] = "e6857ea21ae24d7056e7b0f4c2aaaba73b8bf57025b8949c0a8af0c1bc9774b5"