mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
Merge branch 'dbus-1.10' into staging
This commit is contained in:
commit
3dd354d4cf
5
nixos/modules/services/system/dbus-session-local.conf.in
Normal file
5
nixos/modules/services/system/dbus-session-local.conf.in
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
|
||||||
|
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
||||||
|
<busconfig>
|
||||||
|
@extra@
|
||||||
|
</busconfig>
|
6
nixos/modules/services/system/dbus-system-local.conf.in
Normal file
6
nixos/modules/services/system/dbus-system-local.conf.in
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
|
||||||
|
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
||||||
|
<busconfig>
|
||||||
|
<servicehelper>@servicehelper@</servicehelper>
|
||||||
|
@extra@
|
||||||
|
</busconfig>
|
@ -10,6 +10,16 @@ let
|
|||||||
|
|
||||||
homeDir = "/var/run/dbus";
|
homeDir = "/var/run/dbus";
|
||||||
|
|
||||||
|
systemExtraxml = concatStrings (flip concatMap cfg.packages (d: [
|
||||||
|
"<servicedir>${d}/share/dbus-1/system-services</servicedir>"
|
||||||
|
"<includedir>${d}/etc/dbus-1/system.d</includedir>"
|
||||||
|
]));
|
||||||
|
|
||||||
|
sessionExtraxml = concatStrings (flip concatMap cfg.packages (d: [
|
||||||
|
"<servicedir>${d}/share/dbus-1/services</servicedir>"
|
||||||
|
"<includedir>${d}/etc/dbus-1/session.d</includedir>"
|
||||||
|
]));
|
||||||
|
|
||||||
configDir = pkgs.stdenv.mkDerivation {
|
configDir = pkgs.stdenv.mkDerivation {
|
||||||
name = "dbus-conf";
|
name = "dbus-conf";
|
||||||
|
|
||||||
@ -19,47 +29,17 @@ let
|
|||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
|
|
||||||
cp -v ${pkgs.dbus.daemon}/etc/dbus-1/system.conf $out/system.conf
|
sed '${./dbus-system-local.conf.in}' \
|
||||||
|
-e 's,@servicehelper@,${config.security.wrapperDir}/dbus-daemon-launch-helper,g' \
|
||||||
|
-e 's,@extra@,${systemExtraxml},' \
|
||||||
|
> "$out/system-local.conf"
|
||||||
|
|
||||||
# !!! Hm, these `sed' calls are rather error-prone...
|
sed '${./dbus-session-local.conf.in}' \
|
||||||
|
-e 's,@extra@,${sessionExtraxml},' \
|
||||||
# Tell the daemon where the setuid wrapper around
|
> "$out/session-local.conf"
|
||||||
# dbus-daemon-launch-helper lives.
|
'';
|
||||||
sed -i $out/system.conf \
|
|
||||||
-e 's|<servicehelper>.*/libexec/dbus-daemon-launch-helper|<servicehelper>${config.security.wrapperDir}/dbus-daemon-launch-helper|'
|
|
||||||
|
|
||||||
# Add the system-services and system.d directories to the system
|
|
||||||
# bus search path.
|
|
||||||
sed -i $out/system.conf \
|
|
||||||
-e 's|<standard_system_servicedirs/>|${systemServiceDirs}|' \
|
|
||||||
-e 's|<includedir>system.d</includedir>|${systemIncludeDirs}|'
|
|
||||||
|
|
||||||
cp ${pkgs.dbus.daemon}/etc/dbus-1/session.conf $out/session.conf
|
|
||||||
|
|
||||||
# Add the services and session.d directories to the session bus
|
|
||||||
# search path.
|
|
||||||
sed -i $out/session.conf \
|
|
||||||
-e 's|<standard_session_servicedirs />|${sessionServiceDirs}&|' \
|
|
||||||
-e 's|<includedir>session.d</includedir>|${sessionIncludeDirs}|'
|
|
||||||
''; # */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
systemServiceDirs = concatMapStrings
|
|
||||||
(d: "<servicedir>${d}/share/dbus-1/system-services</servicedir> ")
|
|
||||||
cfg.packages;
|
|
||||||
|
|
||||||
systemIncludeDirs = concatMapStrings
|
|
||||||
(d: "<includedir>${d}/etc/dbus-1/system.d</includedir> ")
|
|
||||||
cfg.packages;
|
|
||||||
|
|
||||||
sessionServiceDirs = concatMapStrings
|
|
||||||
(d: "<servicedir>${d}/share/dbus-1/services</servicedir> ")
|
|
||||||
cfg.packages;
|
|
||||||
|
|
||||||
sessionIncludeDirs = concatMapStrings
|
|
||||||
(d: "<includedir>${d}/etc/dbus-1/session.d</includedir> ")
|
|
||||||
cfg.packages;
|
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -72,7 +52,7 @@ in
|
|||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = false;
|
||||||
internal = true;
|
internal = true;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to start the D-Bus message bus daemon, which is
|
Whether to start the D-Bus message bus daemon, which is
|
||||||
@ -82,7 +62,7 @@ in
|
|||||||
|
|
||||||
packages = mkOption {
|
packages = mkOption {
|
||||||
type = types.listOf types.path;
|
type = types.listOf types.path;
|
||||||
default = [];
|
default = [ ];
|
||||||
description = ''
|
description = ''
|
||||||
Packages whose D-Bus configuration files should be included in
|
Packages whose D-Bus configuration files should be included in
|
||||||
the configuration of the D-Bus system-wide message bus.
|
the configuration of the D-Bus system-wide message bus.
|
||||||
@ -129,10 +109,10 @@ in
|
|||||||
permissions = "u+rx,g+rx,o-rx";
|
permissions = "u+rx,g+rx,o-rx";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.dbus.packages =
|
services.dbus.packages = [
|
||||||
[ "/nix/var/nix/profiles/default"
|
pkgs.dbus
|
||||||
config.system.path
|
config.system.path
|
||||||
];
|
];
|
||||||
|
|
||||||
# Don't restart dbus-daemon. Bad things tend to happen if we do.
|
# Don't restart dbus-daemon. Bad things tend to happen if we do.
|
||||||
systemd.services.dbus.reloadIfChanged = true;
|
systemd.services.dbus.reloadIfChanged = true;
|
||||||
|
@ -689,6 +689,8 @@ in
|
|||||||
"systemd/system-generators" = { source = generators; };
|
"systemd/system-generators" = { source = generators; };
|
||||||
});
|
});
|
||||||
|
|
||||||
|
services.dbus.enable = true;
|
||||||
|
|
||||||
system.activationScripts.systemd = stringAfter [ "groups" ]
|
system.activationScripts.systemd = stringAfter [ "groups" ]
|
||||||
''
|
''
|
||||||
mkdir -m 0755 -p /var/lib/udev
|
mkdir -m 0755 -p /var/lib/udev
|
||||||
|
@ -6,8 +6,8 @@ assert x11Support -> libX11 != null
|
|||||||
&& libSM != null;
|
&& libSM != null;
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "1.8.20";
|
version = "1.10.8";
|
||||||
sha256 = "0fkh3d5r57a659hw9lqnw4v0bc5556vx54fsf7l9c732ci6byksw";
|
sha256 = "0560y3hxpgh346w6avcrcz79c8ansmn771y5xpcvvlr6m8mx5wxs";
|
||||||
|
|
||||||
self = stdenv.mkDerivation {
|
self = stdenv.mkDerivation {
|
||||||
name = "dbus-${version}";
|
name = "dbus-${version}";
|
||||||
@ -17,8 +17,7 @@ self = stdenv.mkDerivation {
|
|||||||
inherit sha256;
|
inherit sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./ignore-missing-includedirs.patch ]
|
patches = lib.optional stdenv.isSunOS ./implement-getgrouplist.patch;
|
||||||
++ lib.optional stdenv.isSunOS ./implement-getgrouplist.patch;
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace tools/Makefile.in \
|
substituteInPlace tools/Makefile.in \
|
||||||
--replace 'install-localstatelibDATA:' 'disabled:' \
|
--replace 'install-localstatelibDATA:' 'disabled:' \
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
diff -ru -x '*~' dbus-1.2.24-orig/bus/config-parser.c dbus-1.2.24/bus/config-parser.c
|
|
||||||
--- dbus-1.2.24-orig/bus/config-parser.c 2010-03-23 20:01:27.000000000 +0100
|
|
||||||
+++ dbus-1.2.24/bus/config-parser.c 2010-07-20 14:17:20.000000000 +0200
|
|
||||||
@@ -2159,12 +2159,16 @@
|
|
||||||
|
|
||||||
retval = FALSE;
|
|
||||||
|
|
||||||
- dir = _dbus_directory_open (dirname, error);
|
|
||||||
+ dbus_error_init (&tmp_error);
|
|
||||||
+
|
|
||||||
+ dir = _dbus_directory_open (dirname, &tmp_error);
|
|
||||||
|
|
||||||
if (dir == NULL)
|
|
||||||
- goto failed;
|
|
||||||
+ {
|
|
||||||
+ retval = TRUE;
|
|
||||||
+ goto failed;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
- dbus_error_init (&tmp_error);
|
|
||||||
while (_dbus_directory_get_next_file (dir, &filename, &tmp_error))
|
|
||||||
{
|
|
||||||
DBusString full_path;
|
|
Loading…
Reference in New Issue
Block a user