summaryrefslogtreecommitdiffstats
path: root/debian/pulseaudio.bug-script
diff options
context:
space:
mode:
Diffstat (limited to 'debian/pulseaudio.bug-script')
-rw-r--r--debian/pulseaudio.bug-script51
1 files changed, 51 insertions, 0 deletions
diff --git a/debian/pulseaudio.bug-script b/debian/pulseaudio.bug-script
new file mode 100644
index 0000000..2b385c5
--- /dev/null
+++ b/debian/pulseaudio.bug-script
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+
+REPORTBUG_VERSION=$(dpkg-query -f '${source:Version}' -W reportbug)
+HAVE_ATTACHMENTS=$(dpkg --compare-versions "$REPORTBUG_VERSION" ge "6.5.0" && echo yes || echo no)
+
+function include_file() {
+ while [ -n "$1" ] ; do
+ if [ ! -f "$1" ] ; then
+ # file doesn't exist, just note that fact
+ echo "File '$1' does not exist" >&3
+ echo >&3
+ elif [ $HAVE_ATTACHMENTS = yes ] ; then
+ echo "-- BEGIN ATTACHMENTS --" >&3
+ echo $1 >&3
+ echo "-- END ATTACHMENTS --" >&3
+ else
+ echo "${1}:" >&3
+ cat "$1" >&3
+ echo >&3
+ fi
+ shift
+ done
+}
+
+function include_command() {
+ desc=$(echo "$@" | sed -e 's/[^[:alnum:]:_-]\+/_/g')
+ tmp=$(mktemp --tmpdir bug-pulseaudio-${desc}.XXXXXX)
+ "$@" &>$tmp
+ include_file $tmp
+ # delete cruft if possible
+ # for attachments we can't because it is not known when reportbug exits
+ if [ $HAVE_ATTACHMENTS = no ] ; then
+ rm $tmp
+ fi
+}
+
+# to see if we have a systemwide pulseaudio
+include_file /etc/default/pulseaudio
+
+# pulseaudio configuration
+include_file /etc/pulse/client.conf /etc/pulse/daemon.conf /etc/pulse/default.pa /etc/pulse/system.pa
+
+# Get alsa devices if possible
+if which aplay &>/dev/null ; then
+ include_command aplay -L
+fi
+
+include_command pactl list
+include_command pactl info
+