Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/1] dbus: support large-file for stat64
       [not found] <cover.1451873095.git.hongxu.jia@windriver.com>
@ 2016-01-04  2:08 ` Hongxu Jia
  2016-01-04  2:15   ` Hongxu Jia
  0 siblings, 1 reply; 2+ messages in thread
From: Hongxu Jia @ 2016-01-04  2:08 UTC (permalink / raw)
  To: openembedded-core, ross.burton

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]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 ...onfigure.ac-support-large-file-for-stat64.patch | 53 ++++++++++++++++++++++
 meta/recipes-core/dbus/dbus_1.8.20.bb              |  3 ++
 2 files changed, 56 insertions(+)
 create mode 100644 meta/recipes-core/dbus/dbus/0001-configure.ac-support-large-file-for-stat64.patch

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 0000000..bb73288
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus/0001-configure.ac-support-large-file-for-stat64.patch
@@ -0,0 +1,53 @@
+From e18bd3a571be716d90bedc835a014472470ae7bd Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 30 Dec 2015 10:58:39 +0800
+Subject: [PATCH] configure.ac: 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.
+
+Upstream-Status: Submitted
+
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93545
+https://bugs.freedesktop.org/attachment.cgi?id=120747
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 82806ba..cb5a60b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -64,6 +64,7 @@ AC_SUBST(DBUS_VERSION)
+ AC_PROG_CC
+ AM_PROG_CC_C_O
+ AC_PROG_CXX
++AC_SYS_LARGEFILE
+ AC_USE_SYSTEM_EXTENSIONS
+ AC_ISC_POSIX
+ AC_HEADER_STDC
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/dbus/dbus_1.8.20.bb b/meta/recipes-core/dbus/dbus_1.8.20.bb
index c0ad48b..0c7f6b1 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 \
            file://dbus-1.init \
            file://os-test.patch \
            file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
+           file://0001-configure.ac-support-large-file-for-stat64.patch \
 "
 
 SRC_URI[md5sum] = "b49890bbabedab3a1c3f4f73c7ff8b2b"
@@ -92,6 +93,7 @@ EXTRA_OECONF = "--disable-tests \
 EXTRA_OECONF_append_class-native = " --disable-selinux"
 
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
 PACKAGECONFIG_class-native = ""
 PACKAGECONFIG_class-nativesdk = ""
@@ -100,6 +102,7 @@ PACKAGECONFIG_class-nativesdk = ""
 # systemd<->dbus
 PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir"
 PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
+PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
 
 do_install() {
 	autotools_do_install
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] dbus: support large-file for stat64
  2016-01-04  2:08 ` [PATCH 1/1] dbus: support large-file for stat64 Hongxu Jia
@ 2016-01-04  2:15   ` Hongxu Jia
  0 siblings, 0 replies; 2+ messages in thread
From: Hongxu Jia @ 2016-01-04  2:15 UTC (permalink / raw)
  To: openembedded-core, ross.burton

[-- Attachment #1: Type: text/plain, Size: 2 bytes --]



[-- Attachment #2: 0000-cover-letter.patch --]
[-- Type: text/x-patch, Size: 890 bytes --]

Subject: [PATCH 0/1] dbus: support large-file for stat64

Test steps:
1. Build with qemux86 and start qemu with nfs as rootfs.

2. Build with qemux86-64 and start qemu with nfs as rootfs.

//Hongxu

The following changes since commit 2cd061a29a94fdcdfec86732e6bcbb71c12c4afc:

  bluez5: include the patch only for 5.36 (2015-12-28 13:02:11 +0000)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib hongxu/dbus-lfs
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/dbus-lfs

Hongxu Jia (1):
  dbus: support large-file for stat64

 ...onfigure.ac-support-large-file-for-stat64.patch | 53 ++++++++++++++++++++++
 meta/recipes-core/dbus/dbus_1.8.20.bb              |  3 ++
 2 files changed, 56 insertions(+)
 create mode 100644 meta/recipes-core/dbus/dbus/0001-configure.ac-support-large-file-for-stat64.patch

-- 
1.9.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-04  2:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1451873095.git.hongxu.jia@windriver.com>
2016-01-04  2:08 ` [PATCH 1/1] dbus: support large-file for stat64 Hongxu Jia
2016-01-04  2:15   ` Hongxu Jia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox