packages: pulseaudio/pulseaudio-pa-machine-id.patch (NEW) - allow setting m...

baggins baggins at pld-linux.org
Wed Jun 9 01:10:37 CEST 2010


Author: baggins                      Date: Tue Jun  8 23:10:37 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- allow setting machine-id for pulseaudio independent of DBUS UUID or hostname

---- Files affected:
packages/pulseaudio:
   pulseaudio-pa-machine-id.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/pulseaudio/pulseaudio-pa-machine-id.patch
diff -u /dev/null packages/pulseaudio/pulseaudio-pa-machine-id.patch:1.1
--- /dev/null	Wed Jun  9 01:10:37 2010
+++ packages/pulseaudio/pulseaudio-pa-machine-id.patch	Wed Jun  9 01:10:32 2010
@@ -0,0 +1,33 @@
+--- pulseaudio-0.9.21/src/Makefile.am~	2010-06-08 17:31:32.581778168 +0200
++++ pulseaudio-0.9.21/src/Makefile.am	2010-06-09 00:17:58.023181027 +0200
+@@ -83,6 +83,7 @@
+ 	-DPA_SYSTEM_STATE_PATH=\"$(PA_SYSTEM_STATE_PATH)\" \
+ 	-DAO_REQUIRE_CAS \
+ 	-DPULSE_LOCALEDIR=\"$(pulselocaledir)\" \
++	-DPA_PA_MACHINE_ID=\"$(PA_DEFAULT_CONFIG_DIR)/machine-id\" \
+ 	-DPA_MACHINE_ID=\"$(localstatedir)/lib/dbus/machine-id\" \
+         -DPA_ALSA_PATHS_DIR=\"$(alsapathsdir)\" \
+         -DPA_ALSA_PROFILE_SETS_DIR=\"$(alsaprofilesetsdir)\"
+--- pulseaudio-0.9.21/src/pulsecore/core-util.c.orig	2009-11-23 04:57:07.000000000 +0100
++++ pulseaudio-0.9.21/src/pulsecore/core-util.c	2010-06-09 00:20:25.361930253 +0200
+@@ -2560,6 +2560,20 @@
+     /* The returned value is supposed be some kind of ascii identifier
+      * that is unique and stable across reboots. */
+ 
++    /* First we try locally configured ID */
++
++    if ((f = fopen(PA_PA_MACHINE_ID, "r"))) {
++        char ln[34] = "", *r;
++
++        r = fgets(ln, sizeof(ln)-1, f);
++        fclose(f);
++
++        pa_strip_nl(ln);
++
++        if (r && ln[0])
++            return pa_utf8_filter(ln);
++    }
++
+     /* First we try the D-Bus UUID, which is the best option we have,
+      * since it fits perfectly our needs and is not as volatile as the
+      * hostname which might be set from dhcp. */
================================================================


More information about the pld-cvs-commit mailing list