1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
From: Simon McVittie <smcv@debian.org>
Date: Sat, 16 Feb 2019 16:15:24 +0000
Subject: dconf: Use dbus-run-session to set up dconf overrides
dbus-launch is not particularly well designed to be used to run
individual processes with a temporary D-Bus session bus. Since
dbus 1.8, the dbus-run-session utility provides a better way to
do this.
The upstream is going to remove the dconf stuff so there's no
need to upstream. See https://github.com/ibus/ibus/issues/2150
Forwarded: not-needed
Reviewed-by: Simon McVittie <smcv@debian.org>
Reviewed-by: Boyuan Yang <byang@debian.org>
Last-Update: 2023-07-30
---
configure.ac | 2 +-
data/dconf/make-dconf-override-db.sh | 14 +++-----------
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/configure.ac b/configure.ac
index 89ad979..f443d84 100644
--- a/configure.ac
+++ b/configure.ac
@@ -394,7 +394,7 @@ fi
# Check for dbus.
PKG_CHECK_MODULES(DBUS, [
- dbus-1
+ dbus-1 >= 1.8
])
# --enable-memconf option.
diff --git a/data/dconf/make-dconf-override-db.sh b/data/dconf/make-dconf-override-db.sh
index 32cb153..d719cd2 100755
--- a/data/dconf/make-dconf-override-db.sh
+++ b/data/dconf/make-dconf-override-db.sh
@@ -2,27 +2,21 @@
set -e
-# gnome-continuous doesn't have a machine-id set, which
-# breaks dbus-launch. There's dbus-run-session which is
-# better, but not everyone has it yet.
-export DBUS_FATAL_WARNINGS=0
export TMPDIR=$(mktemp -d -p "$PWD")
export XDG_CONFIG_HOME="$TMPDIR/config"
export XDG_CACHE_HOME="$TMPDIR/cache"
export GSETTINGS_SCHEMA_DIR="$TMPDIR/schemas"
mkdir -p $XDG_CONFIG_HOME $XDG_CACHE_HOME $GSETTINGS_SCHEMA_DIR
-eval `dbus-launch --sh-syntax`
-
trap cleanup EXIT
cleanup() {
test $? -eq 0 && exit
- rm -rf $TMPDIR; kill $DBUS_SESSION_BUS_PID
+ rm -rf $TMPDIR
}
# in case that schema is not installed on the system
-glib-compile-schemas --targetdir "$GSETTINGS_SCHEMA_DIR" "$PWD"
+dbus-run-session -- glib-compile-schemas --targetdir "$GSETTINGS_SCHEMA_DIR" "$PWD"
cat <<EOF
# This file is a part of the IBus packaging and should not be changed.
@@ -39,7 +33,7 @@ EOF
schemas="org.freedesktop.ibus.general org.freedesktop.ibus.panel"
current_schema=
for schema in $schemas; do
- gsettings list-recursively $schema | \
+ dbus-run-session -- gsettings list-recursively $schema | \
while read schema key val; do
if test "$schema" != "$current_schema"; then
echo
@@ -57,5 +51,3 @@ if [ -d $TMPDIR/cache/gvfs ] ; then
umount $TMPDIR/cache/gvfs
fi
rm -rf $TMPDIR
-
-kill $DBUS_SESSION_BUS_PID
|