Skip to content

Commit db53108

Browse files
authored
Merge pull request #677 from arnaldo2792/provide-dbus-launcher
Provide dbus-launcher as its own package
2 parents 292cebe + 29e280b commit db53108

File tree

2 files changed

+83
-4
lines changed

2 files changed

+83
-4
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
From 819952f36db9a27e3dff5c9db7344992263d111d Mon Sep 17 00:00:00 2001
2+
From: Arnaldo Garcia Rincon <[email protected]>
3+
Date: Thu, 18 Sep 2025 01:55:32 +0000
4+
Subject: [PATCH] meson.build: remove condition to build the journal catalog
5+
6+
Don't require the dbus-launcher to build the journal catalog
7+
8+
Signed-off-by: Arnaldo Garcia Rincon <[email protected]>
9+
---
10+
meson.build | 6 +++++-
11+
meson_options.txt | 1 +
12+
src/meson.build | 2 +-
13+
3 files changed, 7 insertions(+), 2 deletions(-)
14+
15+
diff --git a/meson.build b/meson.build
16+
index 72e2b47..625c552 100644
17+
--- a/meson.build
18+
+++ b/meson.build
19+
@@ -67,6 +67,11 @@ if use_docs
20+
endif
21+
22+
#
23+
+# Config: catalog (needed for both broker and launcher)
24+
+#
25+
+
26+
+conf.set('catalogdir', get_option('catalogdir'))
27+
+
28+
# Config: launcher
29+
#
30+
31+
@@ -79,7 +84,6 @@ if use_launcher
32+
add_project_arguments('-DSYSTEMUIDMAX=' + dep_systemd.get_variable('systemuidmax'), language: 'c')
33+
conf.set('systemunitdir', dep_systemd.get_variable('systemdsystemunitdir'))
34+
conf.set('userunitdir', dep_systemd.get_variable('systemduserunitdir'))
35+
- conf.set('catalogdir', dep_systemd.get_variable('catalogdir'))
36+
endif
37+
38+
#
39+
diff --git a/meson_options.txt b/meson_options.txt
40+
index 5227a93..bfc898c 100644
41+
--- a/meson_options.txt
42+
+++ b/meson_options.txt
43+
@@ -7,3 +7,4 @@ option('reference-test', type: 'boolean', value: false, description: 'Run test s
44+
option('selinux', type: 'boolean', value: false, description: 'SELinux support')
45+
option('system-console-users', type: 'array', value: [], description: 'Additional set of names of system-users to be considered at-console')
46+
option('tests', type: 'boolean', value: false, description: 'Include tests in the distribution')
47+
+option('catalogdir', type: 'string', description: 'The target directory of the catalogdir')
48+
diff --git a/src/meson.build b/src/meson.build
49+
index 4b9bc71..33fc7f7 100644
50+
--- a/src/meson.build
51+
+++ b/src/meson.build
52+
@@ -2,8 +2,8 @@
53+
# target: subdirs
54+
#
55+
56+
+subdir('catalog')
57+
if use_launcher
58+
- subdir('catalog')
59+
subdir('units/system')
60+
subdir('units/user')
61+
endif
62+
--
63+
2.50.1
64+

packages/dbus-broker/dbus-broker.spec

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,25 @@ BuildRequires: %{_cross_os}systemd-devel
2121
Requires: %{_cross_os}libexpat
2222
Requires: %{_cross_os}libselinux
2323
Requires: %{_cross_os}systemd
24+
Requires: %{_cross_os}dbus-broker(launcher)
2425

2526
# Work around an aliasing rules violation.
2627
Patch0001: 0001-c-utf8-disable-strict-aliasing-optimizations.patch
28+
# Allow building the journal catalogs when dbus-launcher is excluded
29+
Patch0002: 0002-meson.build-remove-condition-to-build-the-journal-ca.patch
2730

2831
%description
2932
%{summary}.
3033

34+
%package launcher
35+
Summary: Launcher for the D-BUS message broker
36+
Provides: %{_cross_os}dbus-broker(launcher) = 1:
37+
Conflicts: %{_cross_os}dbus-broker(launcher)
38+
Requires: %{name}
39+
40+
%description launcher
41+
%{summary}.
42+
3143
%prep
3244
%{gpgverify} --data=%{S:0} --signature=%{S:1} --keyring=%{S:2}
3345
%autosetup -n dbus-broker-%{version} -p1
@@ -39,6 +51,7 @@ CONFIGURE_OPTS=(
3951
-Ddocs=false
4052
-Dlauncher=true
4153
-Dselinux=true
54+
-Dcatalogdir=%{_cross_journalcatalogdir}
4255
)
4356

4457
%cross_meson "${CONFIGURE_OPTS[@]}"
@@ -60,14 +73,16 @@ install -p -m 0644 %{S:13} %{buildroot}%{_cross_sysusersdir}/dbus.conf
6073
%license LICENSE
6174
%{_cross_attribution_file}
6275
%{_cross_bindir}/dbus-broker
63-
%{_cross_bindir}/dbus-broker-launch
6476
%dir %{_cross_datadir}/dbus-1
65-
%{_cross_datadir}/dbus-1/*
6677
%{_cross_journalcatalogdir}/dbus-broker.catalog
67-
%{_cross_journalcatalogdir}/dbus-broker-launch.catalog
6878
%{_cross_sysusersdir}/dbus.conf
69-
%{_cross_unitdir}/dbus-broker.service
7079
%{_cross_unitdir}/dbus.socket
7180
%exclude %{_cross_userunitdir}/dbus-broker.service
7281

82+
%files launcher
83+
%{_cross_bindir}/dbus-broker-launch
84+
%{_cross_journalcatalogdir}/dbus-broker-launch.catalog
85+
%{_cross_datadir}/dbus-1/system.conf
86+
%{_cross_unitdir}/dbus-broker.service
87+
7388
%changelog

0 commit comments

Comments
 (0)