diff options
Diffstat (limited to 'meta/recipes-multimedia/pulseaudio')
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 @@ | |||
1 | SUMMARY = "A library for atomic integer operations" | ||
2 | DESCRIPTION = "A library for atomic integer operations" | ||
3 | HOMEPAGE = "http://www.hpl.hp.com/research/linux/atomic_ops/" | ||
4 | SECTION = "optional" | ||
5 | LICENSE = "GPLv2 & MIT" | ||
6 | LIC_FILES_CHKSUM = "file://doc/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
7 | file://doc/LICENSING.txt;md5=607073e04548eac7d1f763e480477bab \ | ||
8 | " | ||
9 | PR = "r1" | ||
10 | |||
11 | SRC_URI = "http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-${PV}.tar.gz \ | ||
12 | " | ||
13 | |||
14 | SRC_URI[md5sum] = "890acdc83a7cd10e2e9536062d3741c8" | ||
15 | SRC_URI[sha256sum] = "c4ee6e0c304c6f13bcc32968453cdb54b2ec233d8bf4cfcf266ee09dc33b4eb5" | ||
16 | |||
17 | S = "${WORKDIR}/libatomic_ops-${PV}" | ||
18 | |||
19 | ALLOW_EMPTY_${PN} = "1" | ||
20 | |||
21 | ARM_INSTRUCTION_SET = "arm" | ||
22 | |||
23 | inherit autotools pkgconfig | ||
24 | |||
25 | do_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 | |||
31 | BBCLASSEXTEND = "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 @@ | |||
1 | SUMMARY = "Sound server for Linux and Unix-like operating systems" | ||
2 | HOMEPAGE = "http://www.pulseaudio.org" | ||
3 | AUTHOR = "Lennart Poettering" | ||
4 | SECTION = "libs/multimedia" | ||
5 | LICENSE = "GPLv2+ & LGPLv2.1" | ||
6 | LIC_FILES_CHKSUM = "file://GPL;md5=4325afd396febcb659c36b49533135d4 \ | ||
7 | file://LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | ||
8 | file://src/pulsecore/resampler.h;beginline=4;endline=23;md5=c3d539b93f8c82a1780bfa3cfa544a95" | ||
9 | |||
10 | DEPENDS = "libatomics-ops liboil libsamplerate0 libsndfile1 libtool" | ||
11 | # optional | ||
12 | DEPENDS += "udev alsa-lib glib-2.0 dbus gconf" | ||
13 | DEPENDS += "json-c gdbm speex libxml-parser-perl-native libcap" | ||
14 | |||
15 | inherit autotools pkgconfig useradd gettext perlnative | ||
16 | |||
17 | # *.desktop rules wont be generated during configure and build will fail | ||
18 | # if using --disable-nls | ||
19 | USE_NLS = "yes" | ||
20 | |||
21 | EXTRA_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 | |||
34 | PACKAGECONFIG ??= "${@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)}" | ||
38 | PACKAGECONFIG[bluez4] = "--enable-bluez4,--disable-bluez4,bluez4 sbc" | ||
39 | PACKAGECONFIG[bluez5] = "--enable-bluez5,--disable-bluez5,bluez5 sbc" | ||
40 | PACKAGECONFIG[gtk] = "--enable-gtk3,--disable-gtk3,gtk+3" | ||
41 | PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd" | ||
42 | PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxtst libice libsm libxcb" | ||
43 | PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi" | ||
44 | PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" | ||
45 | |||
46 | EXTRA_OECONF_append_arm = "${@bb.utils.contains("TUNE_FEATURES", "neon", "", " --enable-neon-opt=no", d)}" | ||
47 | EXTRA_OECONF_append_armeb = "${@bb.utils.contains("TUNE_FEATURES", "neon", "", " --enable-neon-opt=no", d)}" | ||
48 | |||
49 | |||
50 | export TARGET_PFPU = "${TARGET_FPU}" | ||
51 | |||
52 | # TODO: Use more fine granular version | ||
53 | #OE_LT_RPATH_ALLOW=":${libdir}/pulse-0.9:" | ||
54 | OE_LT_RPATH_ALLOW = "any" | ||
55 | OE_LT_RPATH_ALLOW[export]="1" | ||
56 | |||
57 | do_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 | |||
66 | USERADD_PACKAGES = "pulseaudio-server" | ||
67 | GROUPADD_PARAM_pulseaudio-server = "pulse" | ||
68 | USERADD_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. | ||
76 | PACKAGES =+ "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: | ||
80 | RREPLACES_pulseaudio-server = "libpulse-bin libpulse-conf" | ||
81 | |||
82 | PACKAGES_DYNAMIC += "^pulseaudio-lib-.* ^pulseaudio-module-.*" | ||
83 | |||
84 | FILES_libpulsecore = "${libdir}/libpulsecore*.so" | ||
85 | FILES_libpulsecommon = "${libdir}/pulseaudio/libpulsecommon*.so" | ||
86 | FILES_libpulse = "${libdir}/libpulse.so.*" | ||
87 | FILES_libpulse-simple = "${libdir}/libpulse-simple.so.*" | ||
88 | FILES_libpulse-mainloop-glib = "${libdir}/libpulse-mainloop-glib.so.*" | ||
89 | |||
90 | FILES_${PN}-dbg += "${libexecdir}/pulse/.debug \ | ||
91 | ${libdir}/pulse-${PV}/modules/.debug" | ||
92 | FILES_${PN}-dev += "${libdir}/pulse-${PV}/modules/*.la ${datadir}/vala ${libdir}/cmake" | ||
93 | FILES_${PN}-conf = "${sysconfdir}" | ||
94 | FILES_${PN}-bin += "${sysconfdir}/default/volatiles/volatiles.04_pulse" | ||
95 | FILES_${PN}-server = "${bindir}/pulseaudio ${bindir}/start-* ${sysconfdir} ${bindir}/pactl */udev/rules.d/*.rules" | ||
96 | FILES_${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) | ||
99 | ALLOW_EMPTY_${PN} = "1" | ||
100 | |||
101 | CONFFILES_pulseaudio-server = "\ | ||
102 | ${sysconfdir}/pulse/default.pa \ | ||
103 | ${sysconfdir}/pulse/daemon.conf \ | ||
104 | ${sysconfdir}/pulse/client.conf \ | ||
105 | " | ||
106 | |||
107 | pkg_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 | |||
113 | python 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 | |||
121 | RDEPENDS_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 | |||
144 | RDEPENDS_pulseaudio-module-console-kit =+ "consolekit" | ||
145 | RDEPENDS_pulseaudio-misc += "pulseaudio-module-cli-protocol-unix" | ||
146 | |||
147 | FILES_pulseaudio-module-gconf += "${libexecdir}/pulse/gconf-helper" | ||
148 | FILES_pulseaudio-module-alsa-card += "${datadir}/pulseaudio/alsa-mixer" | ||
149 | |||
150 | RDEPENDS_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 @@ | |||
1 | From 002b16f0f2176b4c685e210e335bf69c02563ede Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Sat, 22 Feb 2014 18:03:10 +0100 | ||
4 | Subject: [PATCH] configure.ac: Check only for libsystemd not libsystemd-login | ||
5 | |||
6 | * they were merged into libsystemd in systemd-209 | ||
7 | |||
8 | Upstream-Status: Pending (it would need to be conditional on systemd version for upstream to accept this) | ||
9 | |||
10 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
11 | --- | ||
12 | configure.ac | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/configure.ac b/configure.ac | ||
16 | index 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 | -- | ||
29 | 1.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 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | commit 26b9d22dd24c17eb118d0205bf7b02b75d435e3c upstream | ||
4 | |||
5 | rtp-recv: fix crash on empty UDP packets (CVE-2014-3970) | ||
6 | |||
7 | On FIONREAD returning 0 bytes, we cannot return success, as the caller | ||
8 | (rtpoll_work_cb in module-rtp-recv.c) would then try to | ||
9 | pa_memblock_unref(chunk.memblock) and, because memblock is NULL, trigger | ||
10 | an assertion. | ||
11 | |||
12 | Also we have to read out the possible empty packet from the socket, so | ||
13 | that the kernel doesn't tell us again and again about it. | ||
14 | |||
15 | Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com> | ||
16 | |||
17 | diff --git a/src/modules/rtp/rtp.c b/src/modules/rtp/rtp.c | ||
18 | index 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> | ||
2 | d 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 @@ | |||
1 | require pulseaudio.inc | ||
2 | |||
3 | SRC_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 | " | ||
8 | SRC_URI[md5sum] = "c43749838612f4860465e83ed62ca38e" | ||
9 | SRC_URI[sha256sum] = "99c13a8b1249ddbd724f195579df79484e9af6418cecf6a15f003a7f36caf939" | ||
10 | |||
11 | do_compile_prepend() { | ||
12 | mkdir -p ${S}/libltdl | ||
13 | cp ${STAGING_LIBDIR}/libltdl* ${S}/libltdl | ||
14 | } | ||