* [Buildroot] [PATCH 1/1] package/polkit: drop dbus build dependency
@ 2021-09-13 20:34 Fabrice Fontaine
2021-09-15 20:00 ` Yann E. MORIN
0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2021-09-13 20:34 UTC (permalink / raw)
To: buildroot; +Cc: Fabrice Fontaine, Marek Belisko
Drop dbus build dependency to avoid the following build failure since
commit 1db13226394ff7e6f5e7ca643e275f35d6c633bb if systemd-polkit is
enabled:
package/dbus/dbus.mk:124: *** Recursive variable 'DBUS_FINAL_RECURSIVE_DEPENDENCIES' references itself (eventually). Stop.
Fixes:
- http://autobuild.buildroot.org/results/0e038fae0f5fc2db3e85be05db4612e4f2395e35
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...t-computation-of-dbus-data-directory.patch | 35 ++++++++++++++++
...Don-t-require-dbus-development-files.patch | 42 +++++++++++++++++++
package/polkit/Config.in | 2 +-
package/polkit/polkit.mk | 2 +-
4 files changed, 79 insertions(+), 2 deletions(-)
create mode 100644 package/polkit/0003-build-Remove-redundant-computation-of-dbus-data-directory.patch
create mode 100644 package/polkit/0004-build-Don-t-require-dbus-development-files.patch
diff --git a/package/polkit/0003-build-Remove-redundant-computation-of-dbus-data-directory.patch b/package/polkit/0003-build-Remove-redundant-computation-of-dbus-data-directory.patch
new file mode 100644
index 0000000000..7fce2e10a5
--- /dev/null
+++ b/package/polkit/0003-build-Remove-redundant-computation-of-dbus-data-directory.patch
@@ -0,0 +1,35 @@
+From 9fa097f4dde92a0c1675400228b4cb965ed3e123 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@debian.org>
+Date: Thu, 3 Jun 2021 18:55:29 +0100
+Subject: [PATCH] build: Remove redundant computation of dbus data directory
+
+We were asking pkg-config "if I define ${datadir} to pk_prefix/pk_datadir,
+what would ${datadir} be?" but the answer is obviously always going to be
+pk_prefix/pk_datadir.
+
+Signed-off-by: Simon McVittie <smcv@debian.org>
+
+[Retrieved (and slightly updated for duktape fork) from:
+https://gitlab.freedesktop.org/polkit/polkit/-/commit/9fa097f4dde92a0c1675400228b4cb965ed3e123]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ meson.build | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 6a6799e..03a7683 100644
+--- a/meson.build
++++ b/meson.build
+@@ -136,8 +136,7 @@ assert(cc.has_function('XML_ParserCreate', dependencies: expat_dep), 'Can\'t fin
+ endif
+
+ dbus_dep = dependency('dbus-1')
+-dbus_confdir = dbus_dep.get_pkgconfig_variable('datadir', define_variable: ['datadir', pk_prefix / pk_datadir]) #changed from sysconfdir with respect to commit#8eada3836465838
+-dbus_policydir = dbus_confdir / 'dbus-1/system.d'
++dbus_policydir = pk_prefix / pk_datadir / 'dbus-1/system.d'
+ dbus_system_bus_services_dir = dbus_dep.get_pkgconfig_variable('system_bus_services_dir', define_variable: ['datadir', pk_prefix / pk_datadir])
+
+ # check OS
+--
+GitLab
+
diff --git a/package/polkit/0004-build-Don-t-require-dbus-development-files.patch b/package/polkit/0004-build-Don-t-require-dbus-development-files.patch
new file mode 100644
index 0000000000..1b7adbf67f
--- /dev/null
+++ b/package/polkit/0004-build-Don-t-require-dbus-development-files.patch
@@ -0,0 +1,42 @@
+From 4bb2157adae620c8b07caf5a24b177d1f90f2fbb Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@debian.org>
+Date: Thu, 3 Jun 2021 18:57:00 +0100
+Subject: [PATCH] build: Don't require dbus development files
+
+We don't actually need libdbus, only the dbus-daemon's installation
+directory for system services, which in practice is always going to be
+/usr/share/dbus-1/system-services.
+
+Signed-off-by: Simon McVittie <smcv@debian.org>
+
+[Retrieved (and slightly updated for duktape fork) from:
+https://gitlab.freedesktop.org/polkit/polkit/-/commit/4bb2157adae620c8b07caf5a24b177d1f90f2fbb]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ meson.build | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 03a7683..539ec7a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -135,9 +135,14 @@ assert(cc.has_function('XML_ParserCreate', dependencies: expat_dep), 'Can\'t fin
+ js_dep = dependency('mozjs-78')
+ endif
+
+-dbus_dep = dependency('dbus-1')
++dbus_dep = dependency('dbus-1', required: false)
+ dbus_policydir = pk_prefix / pk_datadir / 'dbus-1/system.d'
+-dbus_system_bus_services_dir = dbus_dep.get_pkgconfig_variable('system_bus_services_dir', define_variable: ['datadir', pk_prefix / pk_datadir])
++if dbus_dep.found()
++ dbus_system_bus_services_dir = dbus_dep.get_pkgconfig_variable('system_bus_services_dir', define_variable: ['datadir', pk_prefix / pk_datadir])
++else
++ # libdbus development files not installed, assume a standard layout
++ dbus_system_bus_services_dir = pk_prefix / pk_datadir / 'dbus-1' / 'system-services'
++endif
+
+ # check OS
+ host_system = host_machine.system()
+--
+GitLab
+
diff --git a/package/polkit/Config.in b/package/polkit/Config.in
index a968ee52d7..622cbbb90b 100644
--- a/package/polkit/Config.in
+++ b/package/polkit/Config.in
@@ -5,7 +5,7 @@ config BR2_PACKAGE_POLKIT
depends on BR2_USE_MMU # libglib2, dbus
depends on BR2_USE_WCHAR # libglib2
depends on !BR2_STATIC_LIBS # duktape
- select BR2_PACKAGE_DBUS
+ select BR2_PACKAGE_DBUS # runtime
select BR2_PACKAGE_DUKTAPE
select BR2_PACKAGE_EXPAT
select BR2_PACKAGE_LIBGLIB2
diff --git a/package/polkit/polkit.mk b/package/polkit/polkit.mk
index 7d75d66ffb..ed6f1a5a8f 100644
--- a/package/polkit/polkit.mk
+++ b/package/polkit/polkit.mk
@@ -12,7 +12,7 @@ POLKIT_CPE_ID_VENDOR = polkit_project
POLKIT_INSTALL_STAGING = YES
POLKIT_DEPENDENCIES = \
- dbus duktape libglib2 host-intltool expat $(TARGET_NLS_DEPENDENCIES)
+ duktape libglib2 host-intltool expat $(TARGET_NLS_DEPENDENCIES)
POLKIT_LDFLAGS = $(TARGET_NLS_LIBS)
--
2.33.0
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/polkit: drop dbus build dependency
2021-09-13 20:34 [Buildroot] [PATCH 1/1] package/polkit: drop dbus build dependency Fabrice Fontaine
@ 2021-09-15 20:00 ` Yann E. MORIN
0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2021-09-15 20:00 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Marek Belisko, buildroot
Fabrice, All,
On 2021-09-13 22:34 +0200, Fabrice Fontaine spake thusly:
> Drop dbus build dependency to avoid the following build failure since
> commit 1db13226394ff7e6f5e7ca643e275f35d6c633bb if systemd-polkit is
> enabled:
>
> package/dbus/dbus.mk:124: *** Recursive variable 'DBUS_FINAL_RECURSIVE_DEPENDENCIES' references itself (eventually). Stop.
>
> Fixes:
> - http://autobuild.buildroot.org/results/0e038fae0f5fc2db3e85be05db4612e4f2395e35
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> ...t-computation-of-dbus-data-directory.patch | 35 ++++++++++++++++
> ...Don-t-require-dbus-development-files.patch | 42 +++++++++++++++++++
> package/polkit/Config.in | 2 +-
> package/polkit/polkit.mk | 2 +-
> 4 files changed, 79 insertions(+), 2 deletions(-)
> create mode 100644 package/polkit/0003-build-Remove-redundant-computation-of-dbus-data-directory.patch
> create mode 100644 package/polkit/0004-build-Don-t-require-dbus-development-files.patch
>
> diff --git a/package/polkit/0003-build-Remove-redundant-computation-of-dbus-data-directory.patch b/package/polkit/0003-build-Remove-redundant-computation-of-dbus-data-directory.patch
> new file mode 100644
> index 0000000000..7fce2e10a5
> --- /dev/null
> +++ b/package/polkit/0003-build-Remove-redundant-computation-of-dbus-data-directory.patch
> @@ -0,0 +1,35 @@
> +From 9fa097f4dde92a0c1675400228b4cb965ed3e123 Mon Sep 17 00:00:00 2001
> +From: Simon McVittie <smcv@debian.org>
> +Date: Thu, 3 Jun 2021 18:55:29 +0100
> +Subject: [PATCH] build: Remove redundant computation of dbus data directory
> +
> +We were asking pkg-config "if I define ${datadir} to pk_prefix/pk_datadir,
> +what would ${datadir} be?" but the answer is obviously always going to be
> +pk_prefix/pk_datadir.
> +
> +Signed-off-by: Simon McVittie <smcv@debian.org>
> +
> +[Retrieved (and slightly updated for duktape fork) from:
> +https://gitlab.freedesktop.org/polkit/polkit/-/commit/9fa097f4dde92a0c1675400228b4cb965ed3e123]
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + meson.build | 3 +--
> + 1 file changed, 1 insertion(+), 2 deletions(-)
> +
> +diff --git a/meson.build b/meson.build
> +index 6a6799e..03a7683 100644
> +--- a/meson.build
> ++++ b/meson.build
> +@@ -136,8 +136,7 @@ assert(cc.has_function('XML_ParserCreate', dependencies: expat_dep), 'Can\'t fin
> + endif
> +
> + dbus_dep = dependency('dbus-1')
> +-dbus_confdir = dbus_dep.get_pkgconfig_variable('datadir', define_variable: ['datadir', pk_prefix / pk_datadir]) #changed from sysconfdir with respect to commit#8eada3836465838
> +-dbus_policydir = dbus_confdir / 'dbus-1/system.d'
> ++dbus_policydir = pk_prefix / pk_datadir / 'dbus-1/system.d'
> + dbus_system_bus_services_dir = dbus_dep.get_pkgconfig_variable('system_bus_services_dir', define_variable: ['datadir', pk_prefix / pk_datadir])
> +
> + # check OS
> +--
> +GitLab
> +
> diff --git a/package/polkit/0004-build-Don-t-require-dbus-development-files.patch b/package/polkit/0004-build-Don-t-require-dbus-development-files.patch
> new file mode 100644
> index 0000000000..1b7adbf67f
> --- /dev/null
> +++ b/package/polkit/0004-build-Don-t-require-dbus-development-files.patch
> @@ -0,0 +1,42 @@
> +From 4bb2157adae620c8b07caf5a24b177d1f90f2fbb Mon Sep 17 00:00:00 2001
> +From: Simon McVittie <smcv@debian.org>
> +Date: Thu, 3 Jun 2021 18:57:00 +0100
> +Subject: [PATCH] build: Don't require dbus development files
> +
> +We don't actually need libdbus, only the dbus-daemon's installation
> +directory for system services, which in practice is always going to be
> +/usr/share/dbus-1/system-services.
> +
> +Signed-off-by: Simon McVittie <smcv@debian.org>
> +
> +[Retrieved (and slightly updated for duktape fork) from:
> +https://gitlab.freedesktop.org/polkit/polkit/-/commit/4bb2157adae620c8b07caf5a24b177d1f90f2fbb]
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + meson.build | 9 +++++++--
> + 1 file changed, 7 insertions(+), 2 deletions(-)
> +
> +diff --git a/meson.build b/meson.build
> +index 03a7683..539ec7a 100644
> +--- a/meson.build
> ++++ b/meson.build
> +@@ -135,9 +135,14 @@ assert(cc.has_function('XML_ParserCreate', dependencies: expat_dep), 'Can\'t fin
> + js_dep = dependency('mozjs-78')
> + endif
> +
> +-dbus_dep = dependency('dbus-1')
> ++dbus_dep = dependency('dbus-1', required: false)
> + dbus_policydir = pk_prefix / pk_datadir / 'dbus-1/system.d'
> +-dbus_system_bus_services_dir = dbus_dep.get_pkgconfig_variable('system_bus_services_dir', define_variable: ['datadir', pk_prefix / pk_datadir])
> ++if dbus_dep.found()
> ++ dbus_system_bus_services_dir = dbus_dep.get_pkgconfig_variable('system_bus_services_dir', define_variable: ['datadir', pk_prefix / pk_datadir])
> ++else
> ++ # libdbus development files not installed, assume a standard layout
> ++ dbus_system_bus_services_dir = pk_prefix / pk_datadir / 'dbus-1' / 'system-services'
> ++endif
> +
> + # check OS
> + host_system = host_machine.system()
> +--
> +GitLab
> +
> diff --git a/package/polkit/Config.in b/package/polkit/Config.in
> index a968ee52d7..622cbbb90b 100644
> --- a/package/polkit/Config.in
> +++ b/package/polkit/Config.in
> @@ -5,7 +5,7 @@ config BR2_PACKAGE_POLKIT
> depends on BR2_USE_MMU # libglib2, dbus
> depends on BR2_USE_WCHAR # libglib2
> depends on !BR2_STATIC_LIBS # duktape
> - select BR2_PACKAGE_DBUS
> + select BR2_PACKAGE_DBUS # runtime
> select BR2_PACKAGE_DUKTAPE
> select BR2_PACKAGE_EXPAT
> select BR2_PACKAGE_LIBGLIB2
> diff --git a/package/polkit/polkit.mk b/package/polkit/polkit.mk
> index 7d75d66ffb..ed6f1a5a8f 100644
> --- a/package/polkit/polkit.mk
> +++ b/package/polkit/polkit.mk
> @@ -12,7 +12,7 @@ POLKIT_CPE_ID_VENDOR = polkit_project
> POLKIT_INSTALL_STAGING = YES
>
> POLKIT_DEPENDENCIES = \
> - dbus duktape libglib2 host-intltool expat $(TARGET_NLS_DEPENDENCIES)
> + duktape libglib2 host-intltool expat $(TARGET_NLS_DEPENDENCIES)
>
> POLKIT_LDFLAGS = $(TARGET_NLS_LIBS)
>
> --
> 2.33.0
>
> _______________________________________________
> buildroot mailing list
> buildroot@lists.buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-15 20:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-13 20:34 [Buildroot] [PATCH 1/1] package/polkit: drop dbus build dependency Fabrice Fontaine
2021-09-15 20:00 ` Yann E. MORIN
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.