[OE-core] [WIP][PATCH 14/20] consolekit: Add patch to explicitly disable polkit when not enabled

Martin Jansa martin.jansa at gmail.com
Thu Aug 29 16:03:01 UTC 2013


Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
 .../allow.to.disable.polkit.support.patch          | 33 ++++++++++++++++++++++
 .../recipes-support/consolekit/consolekit_0.4.6.bb |  4 +--
 2 files changed, 35 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-support/consolekit/consolekit/allow.to.disable.polkit.support.patch

diff --git a/meta/recipes-support/consolekit/consolekit/allow.to.disable.polkit.support.patch b/meta/recipes-support/consolekit/consolekit/allow.to.disable.polkit.support.patch
new file mode 100644
index 0000000..e1a868b
--- /dev/null
+++ b/meta/recipes-support/consolekit/consolekit/allow.to.disable.polkit.support.patch
@@ -0,0 +1,33 @@
+Polkit is autodetected from sysroot.
+
+We need to explicitly disable it to get deterministic behavior
+when following sequence is used:
+bitbake consolekit
+bitbake polkit
+bitbake consolekit
+
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
+
+--- a/configure.ac	2013-08-26 15:43:00.770168252 +0200
++++ b/configure.ac	2013-08-26 15:45:15.816173094 +0200
+@@ -56,13 +56,16 @@
+   gthread-2.0 >= $GLIB_REQUIRED_VERSION
+ )
+ 
+-PKG_CHECK_MODULES(POLKIT,
++AC_ARG_ENABLE(polkit,
++	[AS_HELP_STRING([--enable-polkit],[build polkit support])],
++[PKG_CHECK_MODULES(POLKIT,
+   polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION,
+   have_polkit=yes,
+   have_polkit=no)
+ if test "x$have_polkit" = "xyes" ; then
+        AC_DEFINE(HAVE_POLKIT, [], [Define if we have polkit])
+-fi
++fi], [have_polkit=no])
++  
+ AM_CONDITIONAL(HAVE_POLKIT, test x$have_polkit = xyes)
+ AC_SUBST(HAVE_POLKIT)
+ 
diff --git a/meta/recipes-support/consolekit/consolekit_0.4.6.bb b/meta/recipes-support/consolekit/consolekit_0.4.6.bb
index 63da028..7f05389 100644
--- a/meta/recipes-support/consolekit/consolekit_0.4.6.bb
+++ b/meta/recipes-support/consolekit/consolekit_0.4.6.bb
@@ -12,6 +12,7 @@ RDEPENDS_${PN} += "base-files"
 inherit autotools pkgconfig
 
 SRC_URI = "http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-${PV}.tar.xz \
+           file://allow.to.disable.polkit.support.patch \
            file://sepbuildfix.patch"
 
 SRC_URI[md5sum] = "611792b4d616253a5bdec9175f8b7678"
@@ -23,8 +24,7 @@ PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
                    ${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
 
 PACKAGECONFIG[pam] = "--enable-pam-module --with-pam-module-dir=${base_libdir}/security,--disable-pam-module,libpam"
-# No option to turn it on or off, so rely on the build dependency for now.
-PACKAGECONFIG[policykit] = ",,polkit"
+PACKAGECONFIG[policykit] = "--enable-polkit,--disable-polkit,polkit"
 PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--with-systemdsystemunitdir="
 
 FILES_${PN} += "${localstatedir}/log/ConsoleKit ${exec_prefix}/lib/ConsoleKit \
-- 
1.8.3.2




More information about the Openembedded-core mailing list