summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/pulseaudio
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia/pulseaudio')
-rw-r--r--meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb31
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio.inc151
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio/0001-configure.ac-Check-only-for-libsystemd-not-libsystem.patch30
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio/CVE-2014-3970.patch52
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio/volatiles.04_pulse2
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio_5.0.bb14
6 files changed, 280 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb b/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb
new file mode 100644
index 0000000000..4632d240d2
--- /dev/null
+++ b/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb
@@ -0,0 +1,31 @@
1SUMMARY = "A library for atomic integer operations"
2DESCRIPTION = "A library for atomic integer operations"
3HOMEPAGE = "http://www.hpl.hp.com/research/linux/atomic_ops/"
4SECTION = "optional"
5LICENSE = "GPLv2 & MIT"
6LIC_FILES_CHKSUM = "file://doc/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
7 file://doc/LICENSING.txt;md5=607073e04548eac7d1f763e480477bab \
8 "
9PR = "r1"
10
11SRC_URI = "http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-${PV}.tar.gz \
12 "
13
14SRC_URI[md5sum] = "890acdc83a7cd10e2e9536062d3741c8"
15SRC_URI[sha256sum] = "c4ee6e0c304c6f13bcc32968453cdb54b2ec233d8bf4cfcf266ee09dc33b4eb5"
16
17S = "${WORKDIR}/libatomic_ops-${PV}"
18
19ALLOW_EMPTY_${PN} = "1"
20
21ARM_INSTRUCTION_SET = "arm"
22
23inherit autotools pkgconfig
24
25do_install_append() {
26 # those contain only docs, not necessary for now.
27 install -m 0755 -d ${D}${docdir}
28 mv ${D}${datadir}/libatomic_ops ${D}${docdir}/${BPN}
29}
30
31BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
new file mode 100644
index 0000000000..99cad76186
--- /dev/null
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
@@ -0,0 +1,151 @@
1SUMMARY = "Sound server for Linux and Unix-like operating systems"
2HOMEPAGE = "http://www.pulseaudio.org"
3AUTHOR = "Lennart Poettering"
4SECTION = "libs/multimedia"
5LICENSE = "GPLv2+ & LGPLv2.1"
6LIC_FILES_CHKSUM = "file://GPL;md5=4325afd396febcb659c36b49533135d4 \
7 file://LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1 \
8 file://src/pulsecore/resampler.h;beginline=4;endline=23;md5=c3d539b93f8c82a1780bfa3cfa544a95"
9
10DEPENDS = "libatomics-ops liboil libsamplerate0 libsndfile1 libtool"
11# optional
12DEPENDS += "udev alsa-lib glib-2.0 dbus gconf"
13DEPENDS += "json-c gdbm speex libxml-parser-perl-native libcap"
14
15inherit autotools pkgconfig useradd gettext perlnative
16
17# *.desktop rules wont be generated during configure and build will fail
18# if using --disable-nls
19USE_NLS = "yes"
20
21EXTRA_OECONF = "\
22 --disable-hal-compat \
23 --disable-orc \
24 --enable-tcpwrap=no \
25 --with-access-group=audio \
26 --disable-openssl \
27 --disable-xen \
28 --with-database=simple \
29 --without-fftw \
30 --with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d \
31 ac_cv_header_valgrind_memcheck_h=no \
32"
33
34PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez4', '', d)} \
35 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
36 ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
37 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
38PACKAGECONFIG[bluez4] = "--enable-bluez4,--disable-bluez4,bluez4 sbc"
39PACKAGECONFIG[bluez5] = "--enable-bluez5,--disable-bluez5,bluez5 sbc"
40PACKAGECONFIG[gtk] = "--enable-gtk3,--disable-gtk3,gtk+3"
41PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd"
42PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxtst libice libsm libxcb"
43PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"
44PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
45
46EXTRA_OECONF_append_arm = "${@bb.utils.contains("TUNE_FEATURES", "neon", "", " --enable-neon-opt=no", d)}"
47EXTRA_OECONF_append_armeb = "${@bb.utils.contains("TUNE_FEATURES", "neon", "", " --enable-neon-opt=no", d)}"
48
49
50export TARGET_PFPU = "${TARGET_FPU}"
51
52# TODO: Use more fine granular version
53#OE_LT_RPATH_ALLOW=":${libdir}/pulse-0.9:"
54OE_LT_RPATH_ALLOW = "any"
55OE_LT_RPATH_ALLOW[export]="1"
56
57do_install_append() {
58 install -d ${D}${sysconfdir}/default/volatiles
59 install -m 0644 ${WORKDIR}/volatiles.04_pulse ${D}${sysconfdir}/default/volatiles/volatiles.04_pulse
60
61 if [ "x${TARGET_PFPU}" = "xsoft" ] ; then
62 sed -i -e s:\;\ resample-method\ =\ sinc-fastest:resample-method\ =\ trivial: ${D}${sysconfdir}/pulse/daemon.conf
63 fi
64}
65
66USERADD_PACKAGES = "pulseaudio-server"
67GROUPADD_PARAM_pulseaudio-server = "pulse"
68USERADD_PARAM_pulseaudio-server = "--system --home /var/run/pulse \
69 --no-create-home --shell /bin/false \
70 --groups audio,pulse --gid pulse pulse"
71
72# The console-kit module is included here explicitly so bitbake can map to the
73# RDEPENDS we define for it in this recipe, and thereby ensure that when
74# adding the console-kit module to an image, we also get the necessary
75# consolekit package produced.
76PACKAGES =+ "libpulsecore libpulsecommon libpulse libpulse-simple libpulse-mainloop-glib \
77 pulseaudio-server pulseaudio-misc ${@bb.utils.contains('PACKAGECONFIG', 'x11', 'pulseaudio-module-console-kit', '', d)}"
78
79#upgrade path:
80RREPLACES_pulseaudio-server = "libpulse-bin libpulse-conf"
81
82PACKAGES_DYNAMIC += "^pulseaudio-lib-.* ^pulseaudio-module-.*"
83
84FILES_libpulsecore = "${libdir}/libpulsecore*.so"
85FILES_libpulsecommon = "${libdir}/pulseaudio/libpulsecommon*.so"
86FILES_libpulse = "${libdir}/libpulse.so.*"
87FILES_libpulse-simple = "${libdir}/libpulse-simple.so.*"
88FILES_libpulse-mainloop-glib = "${libdir}/libpulse-mainloop-glib.so.*"
89
90FILES_${PN}-dbg += "${libexecdir}/pulse/.debug \
91 ${libdir}/pulse-${PV}/modules/.debug"
92FILES_${PN}-dev += "${libdir}/pulse-${PV}/modules/*.la ${datadir}/vala ${libdir}/cmake"
93FILES_${PN}-conf = "${sysconfdir}"
94FILES_${PN}-bin += "${sysconfdir}/default/volatiles/volatiles.04_pulse"
95FILES_${PN}-server = "${bindir}/pulseaudio ${bindir}/start-* ${sysconfdir} ${bindir}/pactl */udev/rules.d/*.rules"
96FILES_${PN}-misc = "${bindir}/* ${libdir}/pulseaudio/libpulsedsp.so"
97
98# Allow the pulseaudio package to be created empty as a placeholder (-dbg and -dev depend on it)
99ALLOW_EMPTY_${PN} = "1"
100
101CONFFILES_pulseaudio-server = "\
102 ${sysconfdir}/pulse/default.pa \
103 ${sysconfdir}/pulse/daemon.conf \
104 ${sysconfdir}/pulse/client.conf \
105 "
106
107pkg_postinst_${PN}-server() {
108 if [ -z "$D" ] && [ -e ${sysconfdir}/init.d/populate-volatile.sh ] ; then
109 ${sysconfdir}/init.d/populate-volatile.sh update
110 fi
111}
112
113python populate_packages_prepend() {
114 #d.setVar('PKG_pulseaudio', 'pulseaudio')
115
116 plugindir = d.expand('${libdir}/pulse-${PV}/modules/')
117 do_split_packages(d, plugindir, '^module-(.*)\.so$', 'pulseaudio-module-%s', 'PulseAudio module for %s', extra_depends='', prepend=True)
118 do_split_packages(d, plugindir, '^lib(.*)\.so$', 'pulseaudio-lib-%s', 'PulseAudio library for %s', extra_depends='', prepend=True)
119}
120
121RDEPENDS_pulseaudio-server = " \
122 pulseaudio-module-filter-apply \
123 pulseaudio-module-filter-heuristics \
124 pulseaudio-module-udev-detect \
125 pulseaudio-module-null-sink \
126 pulseaudio-module-device-restore \
127 pulseaudio-module-stream-restore \
128 pulseaudio-module-card-restore \
129 pulseaudio-module-augment-properties \
130 pulseaudio-module-detect \
131 pulseaudio-module-alsa-sink \
132 pulseaudio-module-alsa-source \
133 pulseaudio-module-alsa-card \
134 pulseaudio-module-native-protocol-unix \
135 pulseaudio-module-default-device-restore \
136 pulseaudio-module-intended-roles \
137 pulseaudio-module-rescue-streams \
138 pulseaudio-module-always-sink \
139 pulseaudio-module-suspend-on-idle \
140 pulseaudio-module-position-event-sounds \
141 pulseaudio-module-role-cork \
142 pulseaudio-module-switch-on-port-available"
143
144RDEPENDS_pulseaudio-module-console-kit =+ "consolekit"
145RDEPENDS_pulseaudio-misc += "pulseaudio-module-cli-protocol-unix"
146
147FILES_pulseaudio-module-gconf += "${libexecdir}/pulse/gconf-helper"
148FILES_pulseaudio-module-alsa-card += "${datadir}/pulseaudio/alsa-mixer"
149
150RDEPENDS_pulseaudio-server += "\
151 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'pulseaudio-module-console-kit', '', d)}"
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-configure.ac-Check-only-for-libsystemd-not-libsystem.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-configure.ac-Check-only-for-libsystemd-not-libsystem.patch
new file mode 100644
index 0000000000..467cd2cbd0
--- /dev/null
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-configure.ac-Check-only-for-libsystemd-not-libsystem.patch
@@ -0,0 +1,30 @@
1From 002b16f0f2176b4c685e210e335bf69c02563ede Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Sat, 22 Feb 2014 18:03:10 +0100
4Subject: [PATCH] configure.ac: Check only for libsystemd not libsystemd-login
5
6* they were merged into libsystemd in systemd-209
7
8Upstream-Status: Pending (it would need to be conditional on systemd version for upstream to accept this)
9
10Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
11---
12 configure.ac | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/configure.ac b/configure.ac
16index 388fae2..fff7a83 100644
17--- a/configure.ac
18+++ b/configure.ac
19@@ -1160,7 +1160,7 @@ AC_ARG_ENABLE([systemd],
20 AS_HELP_STRING([--disable-systemd],[Disable optional systemd support]))
21
22 AS_IF([test "x$enable_systemd" != "xno"],
23- [PKG_CHECK_MODULES(SYSTEMD, [ libsystemd-login ], HAVE_SYSTEMD=1, HAVE_SYSTEMD=0)],
24+ [PKG_CHECK_MODULES(SYSTEMD, [ libsystemd ], HAVE_SYSTEMD=1, HAVE_SYSTEMD=0)],
25 HAVE_SYSTEMD=0)
26
27 AS_IF([test "x$enable_systemd" = "xyes" && test "x$HAVE_SYSTEMD" = "x0"],
28--
291.8.5.3
30
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/CVE-2014-3970.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/CVE-2014-3970.patch
new file mode 100644
index 0000000000..d5f33dc42e
--- /dev/null
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio/CVE-2014-3970.patch
@@ -0,0 +1,52 @@
1Upstream-Status: Backport
2
3commit 26b9d22dd24c17eb118d0205bf7b02b75d435e3c upstream
4
5rtp-recv: fix crash on empty UDP packets (CVE-2014-3970)
6
7On FIONREAD returning 0 bytes, we cannot return success, as the caller
8(rtpoll_work_cb in module-rtp-recv.c) would then try to
9pa_memblock_unref(chunk.memblock) and, because memblock is NULL, trigger
10an assertion.
11
12Also we have to read out the possible empty packet from the socket, so
13that the kernel doesn't tell us again and again about it.
14
15Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
16
17diff --git a/src/modules/rtp/rtp.c b/src/modules/rtp/rtp.c
18index 9195493..c45981e 100644
19--- a/src/modules/rtp/rtp.c
20+++ b/src/modules/rtp/rtp.c
21@@ -182,8 +182,29 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool, struct
22 goto fail;
23 }
24
25- if (size <= 0)
26- return 0;
27+ if (size <= 0) {
28+ /* size can be 0 due to any of the following reasons:
29+ *
30+ * 1. Somebody sent us a perfectly valid zero-length UDP packet.
31+ * 2. Somebody sent us a UDP packet with a bad CRC.
32+ *
33+ * It is unknown whether size can actually be less than zero.
34+ *
35+ * In the first case, the packet has to be read out, otherwise the
36+ * kernel will tell us again and again about it, thus preventing
37+ * reception of any further packets. So let's just read it out
38+ * now and discard it later, when comparing the number of bytes
39+ * received (0) with the number of bytes wanted (1, see below).
40+ *
41+ * In the second case, recvmsg() will fail, thus allowing us to
42+ * return the error.
43+ *
44+ * Just to avoid passing zero-sized memchunks and NULL pointers to
45+ * recvmsg(), let's force allocation of at least one byte by setting
46+ * size to 1.
47+ */
48+ size = 1;
49+ }
50
51 if (c->memchunk.length < (unsigned) size) {
52 size_t l;
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/volatiles.04_pulse b/meta/recipes-multimedia/pulseaudio/pulseaudio/volatiles.04_pulse
new file mode 100644
index 0000000000..5b1998032b
--- /dev/null
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio/volatiles.04_pulse
@@ -0,0 +1,2 @@
1# <type> <owner> <group> <mode> <path> <linksource>
2d pulse pulse 0755 /var/run/pulse none
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_5.0.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_5.0.bb
new file mode 100644
index 0000000000..99f0ef3a46
--- /dev/null
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_5.0.bb
@@ -0,0 +1,14 @@
1require pulseaudio.inc
2
3SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/pulseaudio-${PV}.tar.xz \
4 file://0001-configure.ac-Check-only-for-libsystemd-not-libsystem.patch \
5 file://volatiles.04_pulse \
6 file://CVE-2014-3970.patch \
7"
8SRC_URI[md5sum] = "c43749838612f4860465e83ed62ca38e"
9SRC_URI[sha256sum] = "99c13a8b1249ddbd724f195579df79484e9af6418cecf6a15f003a7f36caf939"
10
11do_compile_prepend() {
12 mkdir -p ${S}/libltdl
13 cp ${STAGING_LIBDIR}/libltdl* ${S}/libltdl
14}