Ubuntu

Merge lp:~pali/ubuntu/precise/pulseaudio/pulseaudio into lp:ubuntu/precise/pulseaudio

Proposed by Pali on 2012-02-11
Status: Rejected
Rejected by: Stéphane Graber on 2012-03-12
Proposed branch: lp:~pali/ubuntu/precise/pulseaudio/pulseaudio
Merge into: lp:ubuntu/precise/pulseaudio
Diff against target: 140 lines (+40/-83) 3 files modified
To merge this branch: bzr merge lp:~pali/ubuntu/precise/pulseaudio/pulseaudio
Reviewer Review Type Date Requested Status
Serge Hallyn Resubmit on 2012-03-02
Ubuntu branches 2012-02-11 Pending
Review via email: mp+92622@code.launchpad.net

Description of the Change

* Convert System V pulseaudio init script to upstart and added support for additional pulseaudio command line arguments

This merge request supersed old request:
https://code.launchpad.net/~pali/ubuntu/oneiric/pulseaudio/pulseaudio/+merge/67286

To post a comment you must log in.
165. By Pali on 2012-02-12

Convert System V pulseaudio init script to upstart

Serge Hallyn (serge-hallyn) wrote :

Thanks for this merge proposal. The only comment I have is that you
removed debian/pulseaudio.init, which isn't necessary. Ordinarely I'd
say it adds extra delta over the debian package, but since we're
currently not tracking the debian package anyway, it probably doesn't
matter.

I don't have the upload rights to this package, but I hope someone
consider that I've reviewed and approved

review: Approve
Serge Hallyn (serge-hallyn) wrote :

I'm sorry, I wasn't looking right. Since this is against the packaging tree,
it should have an accompanying changelog entry. I have created a new merge
request at

lp:~serge-hallyn/ubuntu/precise/pulseaudio/pa-upstart

with a changelog entry credited to you. If you prefer to make the changes
yourself and resubmit, please go ahead.

Please note that as this is not addressing any particular bug, it is probably
too late in the Precise cycle to accept a patch such as this.

review: Resubmit
Stéphane Graber (stgraber) wrote :

I'm marking this one as rejected as we now have a duplicate in the queue (Hallyn's).

I don't think we should do the change for Precise but I'll let a desktop team reviewer make the decision and if they feel like we should have it, then ask for a freeze exception.

Unmerged revisions

165. By Pali on 2012-02-12

Convert System V pulseaudio init script to upstart

Preview Diff

1=== modified file 'debian/pulseaudio.default'
2--- debian/pulseaudio.default 2011-05-27 14:05:01 +0000
3+++ debian/pulseaudio.default 2012-02-12 10:10:24 +0000
4@@ -20,3 +20,5 @@
5 # 0 = no, 1 = yes
6 DISALLOW_MODULE_LOADING=1
7
8+# Additional pulseaudio command line arguments
9+# PULSEAUDIO_ARGS=""
10
11=== removed file 'debian/pulseaudio.init'
12--- debian/pulseaudio.init 2012-02-08 15:58:41 +0000
13+++ debian/pulseaudio.init 1970-01-01 00:00:00 +0000
14@@ -1,83 +0,0 @@
15-#!/bin/sh -e
16-### BEGIN INIT INFO
17-# Provides: pulseaudio esound
18-# Required-Start: $remote_fs $syslog
19-# Required-Stop: $remote_fs $syslog
20-# Should-Start: udev NetworkManager
21-# Should-Stop: udev NetworkManager
22-# Default-Start: 2 3 4 5
23-# Default-Stop: 1
24-# Short-Description: Start the PulseAudio sound server
25-# Description: System mode startup script for
26-# the PulseAudio sound server.
27-### END INIT INFO
28-
29-DAEMON=/usr/bin/pulseaudio
30-PIDDIR=/var/run/pulse
31-PIDFILE=$PIDDIR/pid
32-DAEMONUSER=pulse
33-PATH=/sbin:/bin:/usr/sbin:/usr/bin
34-
35-test -x $DAEMON || exit 0
36-
37-. /lib/lsb/init-functions
38-
39-PULSEAUDIO_SYSTEM_START=0
40-DISALLOW_MODULE_LOADING=1
41-test -f /etc/default/pulseaudio && . /etc/default/pulseaudio
42-if [ "$PULSEAUDIO_SYSTEM_START" != "1" ]; then
43- log_warning_msg "PulseAudio configured for per-user sessions"
44- exit 0
45-fi
46-
47-pulseaudio_start () {
48- log_daemon_msg "Starting system PulseAudio Daemon"
49- if [ ! -d $PIDDIR ]; then
50- mkdir -p $PIDDIR
51- chown $DAEMONUSER:$DAEMONUSER $PIDDIR
52- fi
53- start-stop-daemon -x $DAEMON -p $PIDFILE --start -- --system --daemonize --high-priority --log-target=syslog --disallow-exit --disallow-module-loading=$DISALLOW_MODULE_LOADING
54- status=$?
55- if [ -e /var/run/pulse/.esd_auth ]; then
56- chown pulse:pulse-access /var/run/pulse/.esd_auth
57- chmod 640 /var/run/pulse/.esd_auth
58- fi
59- if [ -e /var/run/pulse/.pulse-cookie ]; then
60- chown pulse:pulse-access /var/run/pulse/.pulse-cookie
61- chmod 640 /var/run/pulse/.pulse-cookie
62- fi
63- log_end_msg ${status}
64-}
65-
66-pulseaudio_stop () {
67- log_daemon_msg "Stopping system PulseAudio Daemon"
68- start-stop-daemon -p $PIDFILE --stop --retry 5 || echo -n "...which is not running"
69- log_end_msg $?
70-}
71-
72-case "$1" in
73- start|stop)
74- pulseaudio_${1}
75- ;;
76- restart|reload|force-reload)
77- if [ -s $PIDFILE ] && kill -0 $(cat $PIDFILE) >/dev/null 2>&1; then
78- pulseaudio_stop
79- pulseaudio_start
80- fi
81- ;;
82- force-stop)
83- pulseaudio_stop
84- killall pulseaudio || true
85- sleep 2
86- killall -9 pulseaudio || true
87- ;;
88- status)
89- status_of_proc -p $PIDFILE "$DAEMON" "system-wide PulseAudio" && exit 0 || exit $?
90- ;;
91- *)
92- echo "Usage: /etc/init.d/pulseaudio {start|stop|force-stop|restart|reload|force-reload|status}"
93- exit 1
94- ;;
95-esac
96-
97-exit 0
98
99=== added file 'debian/pulseaudio.upstart'
100--- debian/pulseaudio.upstart 1970-01-01 00:00:00 +0000
101+++ debian/pulseaudio.upstart 2012-02-12 10:10:24 +0000
102@@ -0,0 +1,38 @@
103+# System PulseAudio service
104+
105+description "System PulseAudio sound server"
106+author "Pali Rohár <pali.rohar@gmail.com>"
107+
108+start on (started udev and runlevel [2345])
109+stop on runlevel [016]
110+
111+expect daemon
112+respawn
113+
114+env PULSEAUDIO_SYSTEM_START=0
115+env DISALLOW_MODULE_LOADING=1
116+env PULSEAUDIO_ARGS=
117+
118+pre-start script
119+ [ -r /etc/default/pulseaudio ] && . /etc/default/pulseaudio
120+ [ "$PULSEAUDIO_SYSTEM_START" != "1" ] && { stop; exit 0; }
121+ mkdir -p /var/run/pulse
122+ chown pulse:pulse /var/run/pulse
123+ chmod 755 /var/run/pulse
124+end script
125+
126+script
127+ [ -r /etc/default/pulseaudio ] && . /etc/default/pulseaudio
128+ exec /usr/bin/pulseaudio --system --daemonize --high-priority --log-target=syslog --disallow-exit --disallow-module-loading=$DISALLOW_MODULE_LOADING $PULSEAUDIO_ARGS
129+end script
130+
131+post-start script
132+ if [ -e /var/run/pulse/.esd_auth ]; then
133+ chown pulse:pulse-access /var/run/pulse/.esd_auth
134+ chmod 640 /var/run/pulse/.esd_auth
135+ fi
136+ if [ -e /var/run/pulse/.pulse-cookie ]; then
137+ chown pulse:pulse-access /var/run/pulse/.pulse-cookie
138+ chmod 640 /var/run/pulse/.pulse-cookie
139+ fi
140+end script

Subscribers

People subscribed via source and target branches

to all changes: