summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2016-01-04 10:08:42 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-11 23:26:31 +0000
commit3f4fb3936edbf42b6e94b71e0f243acd6c56b132 (patch)
treef325b575d077923990400b0660a2a8bf9c2d434d /meta
parent0d5e41f41d28b6a7ce7468145fc86c59ecb424f9 (diff)
downloadpoky-3f4fb3936edbf42b6e94b71e0f243acd6c56b132.tar.gz
dbus: support large-file for stat64
While starting dbus-daemon on a 32-bit linux host and it invokes fstat to load /etc/dbus-1/system.conf through NFS. If system.conf was created with a large indoe number on 64-bit host. The above fstat invoking failed. Here is the log of strace: ............ $ ls -i /etc/dbus-1/system.conf 53778558109 /etc/dbus-1/system.conf $ strace /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation |open("/etc/dbus-1/system.conf", O_RDONLY) = 4 |fstat64(4, {st_mode=S_IFREG|0644, st_size=3340, ...}) = 0 |close(4) = 0 |close(3) = 0 |write(2, "Failed to start message bus: Fai"..., 109Failed to start message bus: Failed to stat "/etc/dbus-1/system.conf": Value too large for defined data type |) = 109 |exit_group(1) = ? |+++ exited with 1 +++ ............ In this situation, we should support large-file for stat64. Add marco AC_SYS_LARGEFILE to do the detection at configure time. It can be disabled by configuring with the `--disable-largefile' option. [YOCTO: #8863] (From OE-Core rev: 33a7a9b3efafc35ed1409fdfa8ab8f544f1babc3) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/dbus/dbus/0001-configure.ac-support-large-file-for-stat64.patch53
-rw-r--r--meta/recipes-core/dbus/dbus_1.8.20.bb3
2 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-core/dbus/dbus/0001-configure.ac-support-large-file-for-stat64.patch b/meta/recipes-core/dbus/dbus/0001-configure.ac-support-large-file-for-stat64.patch
new file mode 100644
index 0000000000..bb73288609
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus/0001-configure.ac-support-large-file-for-stat64.patch
@@ -0,0 +1,53 @@
1From e18bd3a571be716d90bedc835a014472470ae7bd Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 30 Dec 2015 10:58:39 +0800
4Subject: [PATCH] configure.ac: support large-file for stat64
5
6While starting dbus-daemon on a 32-bit linux host and it invokes
7fstat to load /etc/dbus-1/system.conf through NFS. If system.conf
8was created with a large indoe number on 64-bit host. The above
9fstat invoking failed. Here is the log of strace:
10............
11$ ls -i /etc/dbus-1/system.conf
1253778558109 /etc/dbus-1/system.conf
13
14$ strace /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
15|open("/etc/dbus-1/system.conf", O_RDONLY) = 4
16|fstat64(4, {st_mode=S_IFREG|0644, st_size=3340, ...}) = 0
17|close(4) = 0
18|close(3) = 0
19|write(2, "Failed to start message bus: Fai"..., 109Failed to start message bus:
20Failed to stat "/etc/dbus-1/system.conf": Value too large for defined data type
21|) = 109
22|exit_group(1) = ?
23|+++ exited with 1 +++
24............
25
26In this situation, we should support large-file for stat64. Add marco
27AC_SYS_LARGEFILE to do the detection at configure time. It can be disabled
28by configuring with the `--disable-largefile' option.
29
30Upstream-Status: Submitted
31
32Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93545
33https://bugs.freedesktop.org/attachment.cgi?id=120747
34Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
35---
36 configure.ac | 1 +
37 1 file changed, 1 insertion(+)
38
39diff --git a/configure.ac b/configure.ac
40index 82806ba..cb5a60b 100644
41--- a/configure.ac
42+++ b/configure.ac
43@@ -64,6 +64,7 @@ AC_SUBST(DBUS_VERSION)
44 AC_PROG_CC
45 AM_PROG_CC_C_O
46 AC_PROG_CXX
47+AC_SYS_LARGEFILE
48 AC_USE_SYSTEM_EXTENSIONS
49 AC_ISC_POSIX
50 AC_HEADER_STDC
51--
521.9.1
53
diff --git a/meta/recipes-core/dbus/dbus_1.8.20.bb b/meta/recipes-core/dbus/dbus_1.8.20.bb
index c0ad48b33c..0c7f6b1a21 100644
--- a/meta/recipes-core/dbus/dbus_1.8.20.bb
+++ b/meta/recipes-core/dbus/dbus_1.8.20.bb
@@ -17,6 +17,7 @@ SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
17 file://dbus-1.init \ 17 file://dbus-1.init \
18 file://os-test.patch \ 18 file://os-test.patch \
19 file://clear-guid_from_server-if-send_negotiate_unix_f.patch \ 19 file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
20 file://0001-configure.ac-support-large-file-for-stat64.patch \
20" 21"
21 22
22SRC_URI[md5sum] = "b49890bbabedab3a1c3f4f73c7ff8b2b" 23SRC_URI[md5sum] = "b49890bbabedab3a1c3f4f73c7ff8b2b"
@@ -92,6 +93,7 @@ EXTRA_OECONF = "--disable-tests \
92EXTRA_OECONF_append_class-native = " --disable-selinux" 93EXTRA_OECONF_append_class-native = " --disable-selinux"
93 94
94PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ 95PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
96 ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
95 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" 97 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
96PACKAGECONFIG_class-native = "" 98PACKAGECONFIG_class-native = ""
97PACKAGECONFIG_class-nativesdk = "" 99PACKAGECONFIG_class-nativesdk = ""
@@ -100,6 +102,7 @@ PACKAGECONFIG_class-nativesdk = ""
100# systemd<->dbus 102# systemd<->dbus
101PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir" 103PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir"
102PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm" 104PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
105PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
103 106
104do_install() { 107do_install() {
105 autotools_do_install 108 autotools_do_install