mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 14:36:13 +01:00
Merge branch 'wip/pwithnall/dbus-system-bus-address' into 'main'
gdbusaddress: Use runstatedir rather than localstatedir See merge request GNOME/glib!3101
This commit is contained in:
commit
6599cf95ae
12
NEWS
12
NEWS
@ -1,3 +1,15 @@
|
||||
UNRELEASED CHANGES
|
||||
==================
|
||||
|
||||
* Change the default D-Bus system bus socket address from
|
||||
`/var/run/dbus/system_bus_socket` to `/run/dbus/system_bus_socket`, in line
|
||||
with changes in dbus.git. This can now be overridden by passing
|
||||
`-Druntime_dir=/some/path` at configure time — the default is `/run`, which
|
||||
should work for all users except distributions where `/run` is not equivalent
|
||||
to `/var/run`. OS distributors should check that this configured path matches
|
||||
the runtime directory configured for their D-Bus daemon. (!3101)
|
||||
|
||||
|
||||
Overview of changes in GLib 2.75.0, 2022-11-10
|
||||
==============================================
|
||||
|
||||
|
@ -1339,8 +1339,10 @@ g_dbus_address_get_for_bus_sync (GBusType bus_type,
|
||||
{
|
||||
/* While the D-Bus specification says this must be `/var/run/dbus/system_bus_socket`,
|
||||
* a footnote allows it to use localstatedir:
|
||||
* https://dbus.freedesktop.org/doc/dbus-specification.html#ftn.id-1.13.6.4.3.3 */
|
||||
ret = g_strdup ("unix:path=" GLIB_LOCALSTATEDIR "/run/dbus/system_bus_socket");
|
||||
* https://dbus.freedesktop.org/doc/dbus-specification.html#ftn.id-1.13.6.4.3.3
|
||||
* or, on systems where /run is the same as /var/run, runstatedir:
|
||||
* https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/209 */
|
||||
ret = g_strdup ("unix:path=" GLIB_RUNSTATEDIR "/dbus/system_bus_socket");
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -266,10 +266,12 @@ g_unix_is_mount_path_system_internal (const char *mount_path)
|
||||
"/var",
|
||||
"/var/crash",
|
||||
"/var/local",
|
||||
GLIB_LOCALSTATEDIR,
|
||||
"/var/log",
|
||||
"/var/log/audit", /* https://bugzilla.redhat.com/show_bug.cgi?id=333041 */
|
||||
"/var/mail",
|
||||
"/var/run",
|
||||
GLIB_RUNSTATEDIR,
|
||||
"/var/tmp", /* https://bugzilla.redhat.com/show_bug.cgi?id=335241 */
|
||||
"/proc",
|
||||
"/sbin",
|
||||
|
17
meson.build
17
meson.build
@ -123,10 +123,17 @@ else
|
||||
glib_charsetaliasdir = glib_libdir
|
||||
endif
|
||||
|
||||
glib_localstatedir = get_option('localstatedir')
|
||||
if not glib_localstatedir.startswith('/')
|
||||
# See https://mesonbuild.com/Builtin-options.html#directories
|
||||
glib_localstatedir = join_paths(glib_prefix, glib_localstatedir)
|
||||
glib_localstatedir = glib_prefix / get_option('localstatedir')
|
||||
|
||||
if get_option('runtime_dir') != ''
|
||||
glib_runstatedir = glib_prefix / get_option('runtime_dir')
|
||||
else
|
||||
# While we’d normally prefix directories like this with, for example,
|
||||
# glib_localstatedir, `/run` is a bit different in that it’s for runtime state
|
||||
# rather than data files, so it’s typically functionally useless to use a
|
||||
# prefixed version. No other processes will be using it. So we default to the
|
||||
# unprefixed system `/run` directory.
|
||||
glib_runstatedir = '/run'
|
||||
endif
|
||||
|
||||
installed_tests_metadir = join_paths(glib_datadir, 'installed-tests', meson.project_name())
|
||||
@ -2110,6 +2117,7 @@ glib_conf.set('HAVE_GETTEXT', 1)
|
||||
glib_conf.set_quoted('GLIB_LOCALE_DIR', join_paths(glib_datadir, 'locale'))
|
||||
|
||||
glib_conf.set_quoted('GLIB_LOCALSTATEDIR', glib_localstatedir)
|
||||
glib_conf.set_quoted('GLIB_RUNSTATEDIR', glib_runstatedir)
|
||||
|
||||
# libmount is only used by gio, but we need to fetch the libs to generate the
|
||||
# pkg-config file below
|
||||
@ -2450,6 +2458,7 @@ summary({
|
||||
'includedir' : glib_includedir,
|
||||
'giomodulesdir' : glib_giomodulesdir,
|
||||
'localstatedir' : glib_localstatedir,
|
||||
'runstatedir' : glib_runstatedir,
|
||||
}, section: 'Directories')
|
||||
|
||||
if get_option('multiarch')
|
||||
|
@ -14,6 +14,14 @@ option('gio_module_dir',
|
||||
value : '',
|
||||
description : 'load gio modules from this directory (default to \'libdir/gio/modules\' if unset)')
|
||||
|
||||
# FIXME: Deliberately not named runstatedir to avoid colliding with
|
||||
# https://github.com/mesonbuild/meson/issues/4141; port to that when Meson
|
||||
# supports it
|
||||
option('runtime_dir',
|
||||
type: 'string',
|
||||
value: '',
|
||||
description: 'Directory for transient runtime state [default: /run]')
|
||||
|
||||
option('selinux',
|
||||
type : 'feature',
|
||||
value : 'auto',
|
||||
|
Loading…
Reference in New Issue
Block a user