survive a missing ~/.pulse
This commit is contained in:
parent
95fede18f0
commit
f88f37920f
36
dotpulse.patch
Normal file
36
dotpulse.patch
Normal file
@ -0,0 +1,36 @@
|
||||
diff -up pulseaudio-0.9.12/src/pulsecore/core-util.c.dotpulse pulseaudio-0.9.12/src/pulsecore/core-util.c
|
||||
--- pulseaudio-0.9.12/src/pulsecore/core-util.c.dotpulse 2008-09-15 22:06:10.000000000 -0400
|
||||
+++ pulseaudio-0.9.12/src/pulsecore/core-util.c 2008-09-15 22:08:39.000000000 -0400
|
||||
@@ -1370,6 +1370,7 @@ static int make_random_dir_and_link(mode
|
||||
char *pa_get_runtime_dir(void) {
|
||||
char *d, *k = NULL, *p = NULL, *t = NULL, *mid;
|
||||
struct stat st;
|
||||
+ mode_t m;
|
||||
|
||||
/* The runtime directory shall contain dynamic data that needs NOT
|
||||
* to be kept accross reboots and is usuallly private to the user,
|
||||
@@ -1378,10 +1379,9 @@ char *pa_get_runtime_dir(void) {
|
||||
* this directory, we link it to a random subdir in /tmp, if it
|
||||
* was not explicitly configured. */
|
||||
|
||||
- if ((d = getenv("PULSE_RUNTIME_PATH"))) {
|
||||
- mode_t m;
|
||||
+ m = pa_in_system_mode() ? 0755U : 0700U;
|
||||
|
||||
- m = pa_in_system_mode() ? 0755U : 0700U;
|
||||
+ if ((d = getenv("PULSE_RUNTIME_PATH"))) {
|
||||
|
||||
if (pa_make_secure_dir(d, m, (uid_t) -1, (gid_t) -1) < 0) {
|
||||
pa_log_error("Failed to create secure directory: %s", pa_cstrerror(errno));
|
||||
@@ -1394,6 +1394,11 @@ char *pa_get_runtime_dir(void) {
|
||||
if (!(d = get_pulse_home()))
|
||||
goto fail;
|
||||
|
||||
+ if (pa_make_secure_dir(d, m, (uid_t) -1, (gid_t) -1) < 0) {
|
||||
+ pa_log_error("Failed to create secure directory: %s", pa_cstrerror(errno));
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
if (!(mid = pa_machine_id())) {
|
||||
pa_xfree(d);
|
||||
goto fail;
|
||||
@ -3,7 +3,7 @@
|
||||
Name: pulseaudio
|
||||
Summary: Improved Linux sound server
|
||||
Version: 0.9.12
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
License: GPLv2+
|
||||
Group: System Environment/Daemons
|
||||
Source0: http://0pointer.de/lennart/projects/pulseaudio/pulseaudio-%{version}.tar.gz
|
||||
@ -18,7 +18,7 @@ BuildRequires: xmltoman
|
||||
# Libtool is dragging in rpaths. Fedora's libtool should get rid of the
|
||||
# unneccessary ones.
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libXt-devel, xorg-x11-proto-devel
|
||||
BuildRequires: libXt-devel, xorg-x11-proto-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: gdbm-devel speex-devel libasyncns-devel
|
||||
BuildRequires: intltool
|
||||
@ -34,6 +34,8 @@ Obsoletes: pulseaudio-devel
|
||||
#Patch9: pulseaudio-0.9.8-cputime-abort.patch
|
||||
#Patch10: wrong-assert.patch
|
||||
#Patch11: pa-ck-api-change.patch
|
||||
# from upstream, https://bugzilla.redhat.com/show_bug.cgi?id=462407
|
||||
Patch12: dotpulse.patch
|
||||
|
||||
%description
|
||||
PulseAudio is a sound server for Linux and other Unix like operating
|
||||
@ -180,6 +182,7 @@ This package contains command line utilities for the PulseAudio sound server.
|
||||
#%patch9 -p1 -b .cputime-abort
|
||||
#%patch10 -p1 -b .wrong-assert
|
||||
#%patch11 -p1 -b .api-change
|
||||
%patch12 -p1 -b .dotpulse
|
||||
|
||||
%build
|
||||
%configure --disable-ltdl-install --disable-static --disable-rpath --with-system-user=pulse --with-system-group=pulse --with-realtime-group=pulse-rt --with-access-group=pulse-access
|
||||
@ -406,6 +409,9 @@ groupadd -r pulse-access &>/dev/null || :
|
||||
%{_mandir}/man1/pax11publish.1.gz
|
||||
|
||||
%changelog
|
||||
* Mon Sep 15 2008 Matthias Clasen <mclasen@redhat.com> 0.9.12-6
|
||||
- Survive a missing ~/.pulse (#462407)
|
||||
|
||||
* Thu Sep 11 2008 - Bastien Nocera <bnocera@redhat.com> 0.9.12-5
|
||||
- Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user