* [PATCH 0/1] rpm: build without dbus for rpm-native
@ 2018-04-08 7:56 Chen Qi
2018-04-08 7:56 ` [PATCH 1/1] " Chen Qi
0 siblings, 1 reply; 2+ messages in thread
From: Chen Qi @ 2018-04-08 7:56 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 29f65bda6d2c9fea4adb125c4857ee64f9312b9f:
nativesdk-glibc: Split glibc and libcrypt to use libxcrypt instead (2018-04-07 22:34:45 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib ChenQi/rpm-native-dbus
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/rpm-native-dbus
Chen Qi (1):
rpm: build without dbus for rpm-native
.../0001-configure.ac-add-option-for-dbus.patch | 42 ++++++++++++++++++++++
meta/recipes-devtools/rpm/rpm_4.14.1.bb | 6 ++--
2 files changed, 46 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-devtools/rpm/files/0001-configure.ac-add-option-for-dbus.patch
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] rpm: build without dbus for rpm-native
2018-04-08 7:56 [PATCH 0/1] rpm: build without dbus for rpm-native Chen Qi
@ 2018-04-08 7:56 ` Chen Qi
0 siblings, 0 replies; 2+ messages in thread
From: Chen Qi @ 2018-04-08 7:56 UTC (permalink / raw)
To: openembedded-core
Add option for dbus in configure.ac, and explicitly build without dbus
for rpm-native.
Previously, the rpm recipe tries to prevent rpm-native from attempting
to inhibit shutdown via session dbus by appending '--disable-plugins'
to EXTRA_OECONF in case of native.
However, some layer may need some functionality via plugin support. And
when it enables it, we would meet the following warning at rootfs time.
Unable to get systemd shutdown inhibition lock: Socket name too long
As plugins/systemd_inhibit.c is the only place that's related to this
dependency, we can be sure that dbus is really not needed for rpm-native.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
.../0001-configure.ac-add-option-for-dbus.patch | 42 ++++++++++++++++++++++
meta/recipes-devtools/rpm/rpm_4.14.1.bb | 6 ++--
2 files changed, 46 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-devtools/rpm/files/0001-configure.ac-add-option-for-dbus.patch
diff --git a/meta/recipes-devtools/rpm/files/0001-configure.ac-add-option-for-dbus.patch b/meta/recipes-devtools/rpm/files/0001-configure.ac-add-option-for-dbus.patch
new file mode 100644
index 0000000..dc71d9b
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-configure.ac-add-option-for-dbus.patch
@@ -0,0 +1,42 @@
+From dfb422c744fdc1838afc40b8e1f161bb46093d92 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Sun, 8 Apr 2018 12:06:42 +0800
+Subject: [PATCH] configure.ac: add option for dbus
+
+Add option for dbus so that users could choose to build with dbus
+or with no dbus.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ configure.ac | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4db15c7909..493f393d31 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -976,12 +976,15 @@ AS_IF([test "$enable_plugins" = yes],[
+ ])
+ AM_CONDITIONAL(ENABLE_PLUGINS,[test "$enable_plugins" = yes])
+
+-with_dbus=no
+-AS_IF([test "$enable_plugins" != no],[
++AC_ARG_WITH([dbus], [AS_HELP_STRING([--with-dbus], [build with dbus support])],
++ [],
++ [with_dbus=yes])
++
++AS_IF([test "$with_dbus" != no],[
+ PKG_CHECK_MODULES([DBUS],
+ [dbus-1 >= 1.3],
+- [AC_DEFINE(DBUS, 1, [Build with dbus support?]) with_dbus=yes],
+- [with_dbus=no])
++ [AC_DEFINE(DBUS, 1, [Build with dbus support?])],
++ [AC_MSG_ERROR([dbus not present (--without-dbus to disable)])])
+ AC_SUBST(DBUS_CFLAGS)
+ AC_SUBST(DBUS_LIBS)
+ ])
+--
+2.11.0
+
diff --git a/meta/recipes-devtools/rpm/rpm_4.14.1.bb b/meta/recipes-devtools/rpm/rpm_4.14.1.bb
index 7b8ea46..818d3ef 100644
--- a/meta/recipes-devtools/rpm/rpm_4.14.1.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.14.1.bb
@@ -40,6 +40,7 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \
file://0001-perl-disable-auto-reqs.patch \
file://0001-Revert-Set-FD_CLOEXEC-on-opened-files-before-exec-fr.patch \
+ file://0001-configure.ac-add-option-for-dbus.patch \
"
PE = "1"
@@ -63,8 +64,9 @@ EXTRA_OECONF_append_libc-musl = " --disable-nls"
#
# --localstatedir prevents rpm from writing its database to native sysroot when building images
#
-# Also disable plugins, so that rpm doesn't attempt to inhibit shutdown via session dbus
-EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins"
+# Disable dbus for native, so that rpm doesn't attempt to inhibit shutdown via session dbus even when plugins support is enabled.
+# Also disable plugins by default for native.
+EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --without-dbus --disable-plugins"
BBCLASSEXTEND = "native nativesdk"
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-08 7:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-08 7:56 [PATCH 0/1] rpm: build without dbus for rpm-native Chen Qi
2018-04-08 7:56 ` [PATCH 1/1] " Chen Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox