Merge branch 'dbus-1.10' into staging

This commit is contained in:
Thomas Tuegel 2016-05-02 15:33:04 -05:00
commit 3dd354d4cf
6 changed files with 40 additions and 71 deletions

View 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>

View 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>

View File

@ -10,6 +10,16 @@ let
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 {
name = "dbus-conf";
@ -19,47 +29,17 @@ let
buildCommand = ''
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...
# Tell the daemon where the setuid wrapper around
# 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}|'
''; # */
sed '${./dbus-session-local.conf.in}' \
-e 's,@extra@,${sessionExtraxml},' \
> "$out/session-local.conf"
'';
};
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
{
@ -72,7 +52,7 @@ in
enable = mkOption {
type = types.bool;
default = true;
default = false;
internal = true;
description = ''
Whether to start the D-Bus message bus daemon, which is
@ -129,8 +109,8 @@ in
permissions = "u+rx,g+rx,o-rx";
};
services.dbus.packages =
[ "/nix/var/nix/profiles/default"
services.dbus.packages = [
pkgs.dbus
config.system.path
];

View File

@ -689,6 +689,8 @@ in
"systemd/system-generators" = { source = generators; };
});
services.dbus.enable = true;
system.activationScripts.systemd = stringAfter [ "groups" ]
''
mkdir -m 0755 -p /var/lib/udev

View File

@ -6,8 +6,8 @@ assert x11Support -> libX11 != null
&& libSM != null;
let
version = "1.8.20";
sha256 = "0fkh3d5r57a659hw9lqnw4v0bc5556vx54fsf7l9c732ci6byksw";
version = "1.10.8";
sha256 = "0560y3hxpgh346w6avcrcz79c8ansmn771y5xpcvvlr6m8mx5wxs";
self = stdenv.mkDerivation {
name = "dbus-${version}";
@ -17,8 +17,7 @@ self = stdenv.mkDerivation {
inherit sha256;
};
patches = [ ./ignore-missing-includedirs.patch ]
++ lib.optional stdenv.isSunOS ./implement-getgrouplist.patch;
patches = lib.optional stdenv.isSunOS ./implement-getgrouplist.patch;
postPatch = ''
substituteInPlace tools/Makefile.in \
--replace 'install-localstatelibDATA:' 'disabled:' \

View File

@ -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;