diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-07-16 14:00:05 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-07-16 14:00:05 +0000 |
commit | 092595fdc4d716194bd43bdfe1d72f94de68ea9d (patch) | |
tree | d751132da925805ee80624f3cc8129267ce46d84 /media-sound | |
parent | Sparc stable, bug #278039. (diff) | |
download | historical-092595fdc4d716194bd43bdfe1d72f94de68ea9d.tar.gz historical-092595fdc4d716194bd43bdfe1d72f94de68ea9d.tar.bz2 historical-092595fdc4d716194bd43bdfe1d72f94de68ea9d.zip |
Add patch to fix CVE-2009-1894, see bug #276986.
Package-Manager: portage-2.2_rc33/cvs/Linux x86_64
RepoMan-Options: --force
Diffstat (limited to 'media-sound')
-rw-r--r-- | media-sound/pulseaudio/ChangeLog | 15 | ||||
-rw-r--r-- | media-sound/pulseaudio/Manifest | 18 | ||||
-rw-r--r-- | media-sound/pulseaudio/files/pulseaudio-0.9.15-CVE-2009-1894.patch | 49 | ||||
-rw-r--r-- | media-sound/pulseaudio/files/pulseaudio-0.9.16-CVE-2009-1894.patch | 85 | ||||
-rw-r--r-- | media-sound/pulseaudio/files/pulseaudio-0.9.9-CVE-2009-1894.patch | 64 | ||||
-rw-r--r-- | media-sound/pulseaudio/pulseaudio-0.9.15-r2.ebuild | 154 | ||||
-rw-r--r-- | media-sound/pulseaudio/pulseaudio-0.9.15-r51.ebuild | 199 | ||||
-rw-r--r-- | media-sound/pulseaudio/pulseaudio-0.9.16_rc2-r2.ebuild | 171 | ||||
-rw-r--r-- | media-sound/pulseaudio/pulseaudio-0.9.16_rc2-r51.ebuild | 213 | ||||
-rw-r--r-- | media-sound/pulseaudio/pulseaudio-0.9.9-r1.ebuild | 175 |
10 files changed, 1137 insertions, 6 deletions
diff --git a/media-sound/pulseaudio/ChangeLog b/media-sound/pulseaudio/ChangeLog index ef5da8a802c0..03956d2e962b 100644 --- a/media-sound/pulseaudio/ChangeLog +++ b/media-sound/pulseaudio/ChangeLog @@ -1,6 +1,19 @@ # ChangeLog for media-sound/pulseaudio # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/ChangeLog,v 1.134 2009/07/03 00:14:32 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/ChangeLog,v 1.135 2009/07/16 14:00:05 flameeyes Exp $ + +*pulseaudio-0.9.16_rc2-r51 (16 Jul 2009) +*pulseaudio-0.9.16_rc2-r2 (16 Jul 2009) +*pulseaudio-0.9.15-r51 (16 Jul 2009) +*pulseaudio-0.9.15-r2 (16 Jul 2009) + + 16 Jul 2009; Diego E. Pettenò <flameeyes@gentoo.org> + +pulseaudio-0.9.9-r1.ebuild, +files/pulseaudio-0.9.9-CVE-2009-1894.patch, + +pulseaudio-0.9.15-r2.ebuild, +pulseaudio-0.9.15-r51.ebuild, + +files/pulseaudio-0.9.15-CVE-2009-1894.patch, + +pulseaudio-0.9.16_rc2-r2.ebuild, +pulseaudio-0.9.16_rc2-r51.ebuild, + +files/pulseaudio-0.9.16-CVE-2009-1894.patch: + Add patch to fix CVE-2009-1894, see bug #276986. 03 Jul 2009; Diego E. Pettenò <flameeyes@gentoo.org> pulseaudio-0.9.16_rc2-r1.ebuild, pulseaudio-0.9.16_rc2-r50.ebuild, diff --git a/media-sound/pulseaudio/Manifest b/media-sound/pulseaudio/Manifest index bdfbd38a4c97..d522b9cc3b2a 100644 --- a/media-sound/pulseaudio/Manifest +++ b/media-sound/pulseaudio/Manifest @@ -1,12 +1,15 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 +AUX pulseaudio-0.9.15-CVE-2009-1894.patch 1969 RMD160 69a11b7f132d24e7f99fec180ffed3caf806de77 SHA1 1b9106e52c063e83b8577434360edaf3be81351d SHA256 a14e01e386f60c083dda6049e951bcf17af693ac475afd1f455d71f400f2e526 AUX pulseaudio-0.9.15-bsd.patch 549 RMD160 d44e309557353c115281e860bfa643b197d04921 SHA1 0cd07acc70c0e53984e7a639d9668b4817cb804c SHA256 d044e27ad71424b601f0de37e29321226579146203c6c557434d11e298798787 +AUX pulseaudio-0.9.16-CVE-2009-1894.patch 3269 RMD160 b900d2001a4dc611f78c704603f5994c0a9614da SHA1 9c6737a7ec293308699410ec41eeceae1a3643d2 SHA256 3be0eaa395606aaa832e6748a7c0d075ad4a2dd473dc302759510673189bfb48 AUX pulseaudio-0.9.8-bt-nohal.patch 1153 RMD160 5ad7a7173795c022fca73ccf694207e18d6925a7 SHA1 9f50549357b5fa498e0b7f67258de431e90f89e2 SHA256 1bdc458d55529777a3a760205a09d0381433402a3002518ba5a700b3518c727d AUX pulseaudio-0.9.8-create-directory.patch 685 RMD160 87c287d3ff6047c9bee892271ea3b3ac6d06fa1a SHA1 2083a575f6272135909efce292d43a2f947f285f SHA256 5fd77f5d0a897d3f70cb3e20e24b97e7f0f46d9266b8758c56a7cb84f763e571 AUX pulseaudio-0.9.8-esoundpath.patch 1798 RMD160 c009c0d1cfdf0bb9db6ef476df29bca56b68ab58 SHA1 5901b164c5b4bd3fa485dbc1a5a950f2ba5794a9 SHA256 4ae132c68a19f07ecf1fef9c55cebc7615e38b157dc196961f666c3914a4641b AUX pulseaudio-0.9.8-polkit.patch 766 RMD160 20bafbeae68fb9092dd3ef2d6d7facca86091d42 SHA1 490aeea34db54e779b84e9922bdb372e1cdcde7e SHA256 112d4da6597783e4dd3d69b73fe08c91631e280b23e84a41c2f1f8b3d9c8d368 AUX pulseaudio-0.9.8-svn2074.patch 412 RMD160 49e416e5e9747cd7c2065b98220e99910375f826 SHA1 9a6d61fd8a000baa4699904154453b83c7bae6f9 SHA256 70b0baed200e5c86672f395520131af797eab7e8ea7fbad2b9caf00ad3e22b65 +AUX pulseaudio-0.9.9-CVE-2009-1894.patch 2274 RMD160 727d4e4e355612f105d5c8bbe66e898d5ceee1f6 SHA1 679aace5e7647d636cf3f186993fa0d7a7cc8855 SHA256 e4981106768e4a60ca7384200668a5071cbe934afecad850e58b626a7414cc43 AUX pulseaudio.conf.d 275 RMD160 6317cb5be41a768428056c0057d8f5b1f189e804 SHA1 22ed7f1de0f2a18a608c5e9a91635ee66addac4d SHA256 c03661e8cc902d27ff6b52f291207f2b008957571b942abdd92a873a52aae0dd AUX pulseaudio.init.d-2 632 RMD160 5baf66e3f64e406b7e23ffbe13774e32595cff19 SHA1 e0a46567d43f7e3620c8da90654a0f16235a36fa SHA256 24c7f5319161105e46382c7c1340ae634d54cfbe32cdf70c86d6fd6c40782ee0 AUX pulseaudio.init.d-4 2344 RMD160 3bfc1f05a6a4d9e4794bbf985501f3422f426d50 SHA1 104148a552c30aad040a8b88e73dc2551238161d SHA256 a7c5a409775b24d54d9361b8b9fae5a9316ea50c356b8d13e175e835768faec3 @@ -14,17 +17,22 @@ DIST pulseaudio-0.9.15.tar.gz 1704374 RMD160 7cab0d9ab44180b6440ae7f151a6cbb9192 DIST pulseaudio-0.9.16-test2.tar.gz 1908588 RMD160 ec60087d2a7e62d4483e3c56800092e04dfacb7a SHA1 0cdd641cc225ffca9d0c631cc2c6a690fa50ee77 SHA256 ae06bafd6fcba6202abee42f2942c1c10fa6057908b7f9690e9af2a01ea29a37 DIST pulseaudio-0.9.9.tar.gz 1063448 RMD160 beb9cb645ce69978ba095e73376ae8ae4b92daf9 SHA1 de8896cf3c6e26e77e4ae19ba300c409b6de8455 SHA256 9caab8f9be8a371aea7cd0241aab7ffd4b1043fbc4a8f62736faea4229f11f7d EBUILD pulseaudio-0.9.15-r1.ebuild 4469 RMD160 4407543ee4f93ee82246d3ecd8fabd22a3b9557f SHA1 a91cb0fe17889ed20d8a90b5580dc1a91327c329 SHA256 85f7d54087b3db949091915b840c1503f220c3efbf157ccb612e879733212cae +EBUILD pulseaudio-0.9.15-r2.ebuild 4516 RMD160 e83f9fb66461f9e8c1c60d6cbde5f995ce781983 SHA1 320e0d60a6736c6c850fcb7248238cbbfb34ce3f SHA256 b5bfb2952198b1a2fa804bb6909c8335d5faac9c857f38a3ef803b438db6e6e2 EBUILD pulseaudio-0.9.15-r50.ebuild 6195 RMD160 96872c7ba15c3c8fcb6a0f13b540e67284ee33a2 SHA1 86111398ed15a21c198d87415d048e899750b9ca SHA256 803bc50933ac7ace0d479fd664f34ca755478166b7c85b836b213562e3ad526a +EBUILD pulseaudio-0.9.15-r51.ebuild 6242 RMD160 e7d01530193fa365bdabb940bf514f2c7bdfe65c SHA1 1e4aecb72d1c2528893bca575c045d2f07ce05ad SHA256 beedfd6ca86fdbe828aa210bebfa4a347d466a30501e92b882065f8b2f8ef8b5 EBUILD pulseaudio-0.9.16_rc2-r1.ebuild 4838 RMD160 5c6eda6bb892e42ccdc16987a63524dee377648e SHA1 ba426fac4faff5335ea21e3887bef40e8456ccc4 SHA256 309daa9c2be2eaa26db3bf35828649614c97e9b6b6fe0db5b2c70b557fb19974 +EBUILD pulseaudio-0.9.16_rc2-r2.ebuild 4856 RMD160 8d9066f8bf839042d1d239295c33115c8b6af472 SHA1 2491b78511090d0ec9ed3471b35a66f6d5fb90e6 SHA256 26fbc999a95f2c257f949316264c1e6e41ab771382792218264b981922d1e4a5 EBUILD pulseaudio-0.9.16_rc2-r50.ebuild 6325 RMD160 2125993ef2d1d261a899b9032de88b362062f187 SHA1 3ff38278006455ddec927223c1dce5080bb07ee4 SHA256 49c673c52762d91284172646d559ef5525aa3a6fc6c3b7d18f91d53240cc90b8 +EBUILD pulseaudio-0.9.16_rc2-r51.ebuild 6380 RMD160 826799d7750cad5d435e140126627fdfa30fa93b SHA1 e783dc546feec399b2e59d302f0c8aea12e971ca SHA256 9fea83b11ce1b4547d96e0f3b9911e47f26e05aa0b0c0ad7dfd3233844cd160d +EBUILD pulseaudio-0.9.9-r1.ebuild 5848 RMD160 f32d4d72890d0b8a71dd18b54959f3d91e215c58 SHA1 00bd46cbd29ffbe4a693fc4ef6453b71354c3b02 SHA256 56f4ce88153d96b1066e311594a4c017e723ec4ebbe875747712d0a2f5b83b67 EBUILD pulseaudio-0.9.9.ebuild 5797 RMD160 a3e829dc0f9c5ddfcb2f6bde0964a1ea6934a832 SHA1 e418cad6fd7ddd3dda0fdf51bf738ea4e35563ff SHA256 bb4be3fa7cc13e0118db3741af201b83db5a39d938e57864443f78f35897ab43 -MISC ChangeLog 25810 RMD160 705bef5fd27abc8ffa6dfa34f39e8a9fded62a72 SHA1 b05d9cbea674f012262865844c5cfecd4ea7e011 SHA256 bddcf7fc37a73fcecd224897921a82a9d7a17a9afd32d74ca43e121396d2cf5f +MISC ChangeLog 26379 RMD160 36877132793d03e8ad55f604f9135d3b82cf41a4 SHA1 25fe5c92b01619003cbdba21f4be745a248cbaa2 SHA256 4dfd76331d3aa6dd864c26fc3ec7fed383b163c42005a094c609d466e700549f MISC metadata.xml 1449 RMD160 1074867d9654a4550bb17d32aea93c3be969c79a SHA1 6f04434e3cfa72d1df35f9a0398f2f95a86156c4 SHA256 551909c453b7163940bc1761eeadbe36b37d07d47ae37b4adcfad05109ea16f0 MISC pulseaudio-0.9.16_rc2-r1.ebuild.rej 506 RMD160 88f2f0da8e57a46bf77417a23c5b3303fc7dd916 SHA1 610afa61f791d297942f38fcecd446b1d08523de SHA256 2278149707872aba3ccfaa81910ca2ce3bf28edf52a870d72c7ff6a55e326d14 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.12 (GNU/Linux) +Version: GnuPG v2.0.11 (GNU/Linux) -iEYEARECAAYFAkpNTW4ACgkQAiZjviIA2XjFzQCfcNu1VgBy0VMWL95Egq7Slvb+ -ElIAmwcQ82fgcYqxc/Yi4DffMVM29kdb -=tcM6 +iEYEARECAAYFAkpfMmsACgkQAiZjviIA2XikiwCggWBQ95078O73ZwjXBu20u56t +ggYAmwXPdnQd5zbyBSL/NPbCFF+q0iA6 +=EBbx -----END PGP SIGNATURE----- diff --git a/media-sound/pulseaudio/files/pulseaudio-0.9.15-CVE-2009-1894.patch b/media-sound/pulseaudio/files/pulseaudio-0.9.15-CVE-2009-1894.patch new file mode 100644 index 000000000000..729ed9178286 --- /dev/null +++ b/media-sound/pulseaudio/files/pulseaudio-0.9.15-CVE-2009-1894.patch @@ -0,0 +1,49 @@ +Index: pulseaudio-0.9.15/src/daemon/main.c +=================================================================== +--- pulseaudio-0.9.15.orig/src/daemon/main.c ++++ pulseaudio-0.9.15/src/daemon/main.c +@@ -399,28 +399,6 @@ int main(int argc, char *argv[]) { + pa_log_set_level(PA_LOG_NOTICE); + pa_log_set_flags(PA_LOG_COLORS|PA_LOG_PRINT_FILE|PA_LOG_PRINT_LEVEL, PA_LOG_RESET); + +-#if defined(__linux__) && defined(__OPTIMIZE__) +- /* +- Disable lazy relocations to make usage of external libraries +- more deterministic for our RT threads. We abuse __OPTIMIZE__ as +- a check whether we are a debug build or not. +- */ +- +- if (!getenv("LD_BIND_NOW")) { +- char *rp; +- +- /* We have to execute ourselves, because the libc caches the +- * value of $LD_BIND_NOW on initialization. */ +- +- pa_set_env("LD_BIND_NOW", "1"); +- +- if ((rp = pa_readlink("/proc/self/exe"))) +- pa_assert_se(execv(rp, argv) == 0); +- else +- pa_log_warn("Couldn't read /proc/self/exe, cannot self execute. Running in a chroot()?"); +- } +-#endif +- + #ifdef HAVE_GETUID + real_root = getuid() == 0; + suid_root = !real_root && geteuid() == 0; +Index: pulseaudio-0.9.15/src/Makefile.am +=================================================================== +--- pulseaudio-0.9.15.orig/src/Makefile.am ++++ pulseaudio-0.9.15/src/Makefile.am +@@ -153,9 +153,9 @@ PREOPEN_LIBS = $(modlibexec_LTLIBRARIES) + endif + + if FORCE_PREOPEN +-pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) -dlpreopen force $(foreach f,$(PREOPEN_LIBS),-dlpreopen $(f)) ++pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) -Wl,-z,now -dlpreopen force $(foreach f,$(PREOPEN_LIBS),-dlpreopen $(f)) + else +-pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) -dlopen force $(foreach f,$(PREOPEN_LIBS),-dlopen $(f)) ++pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) -Wl,-z,now -dlopen force $(foreach f,$(PREOPEN_LIBS),-dlopen $(f)) + endif + + if HAVE_POLKIT diff --git a/media-sound/pulseaudio/files/pulseaudio-0.9.16-CVE-2009-1894.patch b/media-sound/pulseaudio/files/pulseaudio-0.9.16-CVE-2009-1894.patch new file mode 100644 index 000000000000..64e672377ac0 --- /dev/null +++ b/media-sound/pulseaudio/files/pulseaudio-0.9.16-CVE-2009-1894.patch @@ -0,0 +1,85 @@ +From fdd11d6cc0f4c75f75c62fb7d419d157ce00c956 Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Diego=20Elio=20'Flameeyes'=20Petten=C3=B2?= <flameeyes@gmail.com> +Date: Tue, 7 Jul 2009 20:51:53 +0200 +Subject: [PATCH] Remove exploitable LD_BIND_NOW hack. + +Instead of trying to re-execute pulseaudio itself with LD_BIND_NOW set, +just find the correct flag for the linker to request immediate bindings +(all ELF files support that option), and use that when linking the daemon. + +Reduce the amount of compiled and executed code as well. +--- + configure.ac | 6 ++++++ + src/Makefile.am | 4 ++-- + src/daemon/main.c | 22 ---------------------- + 3 files changed, 8 insertions(+), 24 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 9c96d1c..cc7f674 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -113,6 +113,12 @@ CC_CHECK_LDFLAGS([${tmp_ldflag}], + [VERSIONING_LDFLAGS='-Wl,-version-script=$(srcdir)/map-file']) + AC_SUBST([VERSIONING_LDFLAGS]) + ++dnl Use immediate (now) bindings; avoids the funky re-call in itself ++dnl the -z now syntax is lifted from Sun's linker and works with GNU's too ++dnl other linkes might be added later ++CC_CHECK_LDFLAGS([-Wl,-z,now], [IMMEDIATE_LDFLAGS="-Wl,-z,now"]) ++AC_SUBST([IMMEDIATE_LDFLAGS]) ++ + dnl Check for the proper way to build libraries that have no undefined + dnl symbols; on some hosts this needs to be avoided but the macro + dnl takes care of it. +diff --git a/src/Makefile.am b/src/Makefile.am +index 7ebf1f8..ac627c8 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -183,9 +183,9 @@ PREOPEN_LIBS = $(modlibexec_LTLIBRARIES) + endif + + if FORCE_PREOPEN +-pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) -dlpreopen force $(foreach f,$(PREOPEN_LIBS),-dlpreopen $(f)) ++pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(IMMEDIATE_LDFLAGS) -dlpreopen force $(foreach f,$(PREOPEN_LIBS),-dlpreopen $(f)) + else +-pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) -dlopen force $(foreach f,$(PREOPEN_LIBS),-dlopen $(f)) ++pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(IMMEDIATE_LDFLAGS) -dlopen force $(foreach f,$(PREOPEN_LIBS),-dlopen $(f)) + endif + + ################################### +diff --git a/src/daemon/main.c b/src/daemon/main.c +index eb378d2..0f6fc90 100644 +--- a/src/daemon/main.c ++++ b/src/daemon/main.c +@@ -401,28 +401,6 @@ int main(int argc, char *argv[]) { + pa_log_set_level(PA_LOG_NOTICE); + pa_log_set_flags(PA_LOG_COLORS|PA_LOG_PRINT_FILE|PA_LOG_PRINT_LEVEL, PA_LOG_RESET); + +-#if defined(__linux__) && defined(__OPTIMIZE__) +- /* +- Disable lazy relocations to make usage of external libraries +- more deterministic for our RT threads. We abuse __OPTIMIZE__ as +- a check whether we are a debug build or not. +- */ +- +- if (!getenv("LD_BIND_NOW")) { +- char *rp; +- +- /* We have to execute ourselves, because the libc caches the +- * value of $LD_BIND_NOW on initialization. */ +- +- pa_set_env("LD_BIND_NOW", "1"); +- +- if ((rp = pa_readlink("/proc/self/exe"))) +- pa_assert_se(execv(rp, argv) == 0); +- else +- pa_log_warn("Couldn't read /proc/self/exe, cannot self execute. Running in a chroot()?"); +- } +-#endif +- + if ((e = getenv("PULSE_PASSED_FD"))) { + passed_fd = atoi(e); + +-- +1.6.3.3 + diff --git a/media-sound/pulseaudio/files/pulseaudio-0.9.9-CVE-2009-1894.patch b/media-sound/pulseaudio/files/pulseaudio-0.9.9-CVE-2009-1894.patch new file mode 100644 index 000000000000..affa986d2f8d --- /dev/null +++ b/media-sound/pulseaudio/files/pulseaudio-0.9.9-CVE-2009-1894.patch @@ -0,0 +1,64 @@ +From fdd11d6cc0f4c75f75c62fb7d419d157ce00c956 Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Diego=20Elio=20'Flameeyes'=20Petten=C3=B2?= <flameeyes@gmail.com> +Date: Tue, 7 Jul 2009 20:51:53 +0200 +Subject: [PATCH] Remove exploitable LD_BIND_NOW hack. + +Instead of trying to re-execute pulseaudio itself with LD_BIND_NOW set, +just find the correct flag for the linker to request immediate bindings +(all ELF files support that option), and use that when linking the daemon. + +Reduce the amount of compiled and executed code as well. +--- + src/Makefile.am | 4 ++-- + src/daemon/main.c | 19 ------------------- + 2 files changed, 2 insertions(+), 21 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 2ac4f3d..7d1c431 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -147,9 +147,9 @@ PREOPEN_LIBS = $(modlibexec_LTLIBRARIES) + endif + + if FORCE_PREOPEN +-pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) -dlpreopen force $(foreach f,$(PREOPEN_LIBS),-dlpreopen $(f)) ++pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) -Wl,-z,now -dlpreopen force $(foreach f,$(PREOPEN_LIBS),-dlpreopen $(f)) + else +-pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) -dlopen force $(foreach f,$(PREOPEN_LIBS),-dlopen $(f)) ++pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) -Wl,-z,now -dlopen force $(foreach f,$(PREOPEN_LIBS),-dlopen $(f)) + endif + + if HAVE_POLKIT +diff --git a/src/daemon/main.c b/src/daemon/main.c +index 4276d1d..c788917 100644 +--- a/src/daemon/main.c ++++ b/src/daemon/main.c +@@ -340,25 +340,6 @@ int main(int argc, char *argv[]) { + #endif + + +-#if defined(__linux__) && defined(__OPTIMIZE__) +- /* +- Disable lazy relocations to make usage of external libraries +- more deterministic for our RT threads. We abuse __OPTIMIZE__ as +- a check whether we are a debug build or not. +- */ +- +- if (!getenv("LD_BIND_NOW")) { +- char *rp; +- +- /* We have to execute ourselves, because the libc caches the +- * value of $LD_BIND_NOW on initialization. */ +- +- putenv(pa_xstrdup("LD_BIND_NOW=1")); +- pa_assert_se(rp = pa_readlink("/proc/self/exe")); +- pa_assert_se(execv(rp, argv) == 0); +- } +-#endif +- + #ifdef HAVE_GETUID + real_root = getuid() == 0; + suid_root = !real_root && geteuid() == 0; +-- +1.6.3.3 + diff --git a/media-sound/pulseaudio/pulseaudio-0.9.15-r2.ebuild b/media-sound/pulseaudio/pulseaudio-0.9.15-r2.ebuild new file mode 100644 index 000000000000..17a38ad8c5e8 --- /dev/null +++ b/media-sound/pulseaudio/pulseaudio-0.9.15-r2.ebuild @@ -0,0 +1,154 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/pulseaudio-0.9.15-r2.ebuild,v 1.1 2009/07/16 14:00:05 flameeyes Exp $ + +EAPI=2 + +inherit eutils libtool flag-o-matic + +DESCRIPTION="A networked sound server with an advanced plugin system" +HOMEPAGE="http://www.pulseaudio.org/" +if [[ ${PV/_rc/} == ${PV} ]]; then + SRC_URI="http://0pointer.de/lennart/projects/${PN}/${P}.tar.gz" +else + SRC_URI="http://0pointer.de/public/${P/_rc/-test}.tar.gz" +fi + +S="${WORKDIR}/${P/_rc/-test}" + +LICENSE="LGPL-2 GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86" +IUSE="alsa avahi caps jack lirc oss tcpd X hal dbus libsamplerate gnome bluetooth policykit asyncns +glib test" + +RDEPEND="X? ( x11-libs/libX11 x11-libs/libSM x11-libs/libICE x11-libs/libXtst ) + caps? ( sys-libs/libcap ) + libsamplerate? ( >=media-libs/libsamplerate-0.1.1-r1 ) + alsa? ( >=media-libs/alsa-lib-1.0.19 ) + glib? ( >=dev-libs/glib-2.4.0 ) + avahi? ( >=net-dns/avahi-0.6.12[dbus] ) + >=dev-libs/liboil-0.3.0 + jack? ( >=media-sound/jack-audio-connection-kit-0.100 ) + tcpd? ( sys-apps/tcp-wrappers ) + lirc? ( app-misc/lirc ) + dbus? ( >=sys-apps/dbus-1.0.0 ) + gnome? ( >=gnome-base/gconf-2.4.0 ) + hal? ( + >=sys-apps/hal-0.5.7 + >=sys-apps/dbus-1.0.0 + ) + app-admin/eselect-esd + bluetooth? ( + || ( >=net-wireless/bluez-4 + >=net-wireless/bluez-libs-3 ) + >=sys-apps/dbus-1.0.0 + ) + policykit? ( sys-auth/policykit ) + asyncns? ( net-libs/libasyncns ) + >=media-libs/audiofile-0.2.6-r1 + >=media-libs/speex-1.2_beta + >=media-libs/libsndfile-1.0.10 + >=dev-libs/liboil-0.3.6 + sys-libs/gdbm + >=sys-devel/libtool-2.2.4" # it's a valid RDEPEND, libltdl.so is used + +DEPEND="${RDEPEND} + X? ( x11-proto/xproto ) + dev-libs/libatomic_ops + dev-util/pkgconfig + dev-util/intltool" + +RDEPEND="${RDEPEND} + gnome-extra/gnome-audio" + +pkg_setup() { + enewgroup audio 18 # Just make sure it exists + enewgroup realtime + enewgroup pulse-access + enewgroup pulse + enewuser pulse -1 -1 /var/run/pulse pulse,audio +} + +src_prepare() { + epatch "${FILESDIR}/${P}-bsd.patch" + epatch "${FILESDIR}/${P}-CVE-2009-1894.patch" + elibtoolize +} + +src_configure() { + # To properly fix CVE-2008-0008 + append-flags -UNDEBUG + + append-ldflags -Wl,--no-as-needed + + econf \ + --enable-largefile \ + $(use_enable glib glib2) \ + --disable-solaris \ + $(use_enable asyncns) \ + $(use_enable oss) \ + $(use_enable alsa) \ + $(use_enable lirc) \ + $(use_enable tcpd tcpwrap) \ + $(use_enable jack) \ + $(use_enable lirc) \ + $(use_enable avahi) \ + $(use_enable hal) \ + $(use_enable dbus) \ + $(use_enable gnome gconf) \ + $(use_enable libsamplerate samplerate) \ + $(use_enable bluetooth bluez) \ + $(use_enable policykit polkit) \ + $(use_enable X x11) \ + $(use_enable test default-build-tests) \ + $(use_with caps) \ + --localstatedir=/var \ + --with-realtime-group=realtime \ + --disable-per-user-esound-socket \ + || die "econf failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + + use avahi && sed -i -e '/module-zeroconf-publish/s:^#::' "${D}/etc/pulse/default.pa" + + dohtml -r doc + dodoc README + + # Create the state directory + diropts -o pulse -g pulse -m0755 + keepdir /var/run/pulse + + find "${D}" -name '*.la' -delete +} + +pkg_postinst() { + elog "If you want to make use of realtime capabilities of PulseAudio" + elog "you should follow the realtime guide to create and set up a realtime" + elog "user group: http://www.gentoo.org/proj/en/desktop/sound/realtime.xml" + elog "Make sure you also have baselayout installed with pam USE flag" + elog "enabled, if you're using the rlimit method." + if use bluetooth; then + elog + elog "The BlueTooth proximity module is not enabled in the default" + elog "configuration file. If you do enable it, you'll have to have" + elog "your BlueTooth controller enabled and inserted at bootup or" + elog "PulseAudio will refuse to start." + elog + elog "Please note that the BlueTooth proximity module seems itself" + elog "still experimental, so please report to upstream if you have" + elog "problems with it." + fi + if use alsa; then + local pkg="media-plugins/alsa-plugins" + if has_version ${pkg} && ! built_with_use --missing false ${pkg} pulseaudio; then + elog + elog "You have alsa support enabled so you probably want to install" + elog "${pkg} with pulseaudio support to have" + elog "alsa using applications route their sound through pulseaudio" + fi + fi + + eselect esd update --if-unset +} diff --git a/media-sound/pulseaudio/pulseaudio-0.9.15-r51.ebuild b/media-sound/pulseaudio/pulseaudio-0.9.15-r51.ebuild new file mode 100644 index 000000000000..4519e15d714e --- /dev/null +++ b/media-sound/pulseaudio/pulseaudio-0.9.15-r51.ebuild @@ -0,0 +1,199 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/pulseaudio-0.9.15-r51.ebuild,v 1.1 2009/07/16 14:00:05 flameeyes Exp $ + +EAPI=2 + +inherit eutils libtool flag-o-matic + +DESCRIPTION="A networked sound server with an advanced plugin system" +HOMEPAGE="http://www.pulseaudio.org/" +if [[ ${PV/_rc/} == ${PV} ]]; then + SRC_URI="http://0pointer.de/lennart/projects/${PN}/${P}.tar.gz" +else + SRC_URI="http://0pointer.de/public/${P/_rc/-test}.tar.gz" +fi + +S="${WORKDIR}/${P/_rc/-test}" + +LICENSE="LGPL-2 GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86" +IUSE="alsa avahi caps jack lirc oss tcpd X hal dbus libsamplerate gnome bluetooth policykit asyncns +glib test" + +RDEPEND="X? ( x11-libs/libX11 x11-libs/libSM x11-libs/libICE x11-libs/libXtst ) + caps? ( sys-libs/libcap ) + libsamplerate? ( >=media-libs/libsamplerate-0.1.1-r1 ) + alsa? ( >=media-libs/alsa-lib-1.0.19 ) + glib? ( >=dev-libs/glib-2.4.0 ) + avahi? ( >=net-dns/avahi-0.6.12[dbus] ) + >=dev-libs/liboil-0.3.0 + jack? ( >=media-sound/jack-audio-connection-kit-0.100 ) + tcpd? ( sys-apps/tcp-wrappers ) + lirc? ( app-misc/lirc ) + dbus? ( >=sys-apps/dbus-1.0.0 ) + gnome? ( >=gnome-base/gconf-2.4.0 ) + hal? ( + >=sys-apps/hal-0.5.7 + >=sys-apps/dbus-1.0.0 + ) + app-admin/eselect-esd + bluetooth? ( + || ( >=net-wireless/bluez-4 + >=net-wireless/bluez-libs-3 ) + >=sys-apps/dbus-1.0.0 + ) + policykit? ( sys-auth/policykit ) + asyncns? ( net-libs/libasyncns ) + >=media-libs/audiofile-0.2.6-r1 + >=media-libs/speex-1.2_beta + >=media-libs/libsndfile-1.0.10 + >=dev-libs/liboil-0.3.6 + sys-libs/gdbm + >=sys-devel/libtool-2.2.4" # it's a valid RDEPEND, libltdl.so is used + +DEPEND="${RDEPEND} + X? ( x11-proto/xproto ) + dev-libs/libatomic_ops + dev-util/pkgconfig + || ( dev-util/unifdef sys-freebsd/freebsd-ubin ) + dev-util/intltool" + +# alsa-utils dep is for the alsasound init.d script (see bug #155707) +# bluez-utils dep is for the bluetooth init.d script +RDEPEND="${RDEPEND} + sys-apps/openrc + gnome-extra/gnome-audio + alsa? ( media-sound/alsa-utils ) + bluetooth? ( + || ( >=net-wireless/bluez-4 + >=net-wireless/bluez-utils-3 ) )" + +pkg_setup() { + enewgroup audio 18 # Just make sure it exists + enewgroup realtime + enewgroup pulse-access + enewgroup pulse + enewuser pulse -1 -1 /var/run/pulse pulse,audio +} + +src_prepare() { + epatch "${FILESDIR}/${P}-bsd.patch" + epatch "${FILESDIR}/${P}-CVE-2009-1894.patch" + elibtoolize +} + +src_configure() { + # To properly fix CVE-2008-0008 + append-flags -UNDEBUG + + append-ldflags -Wl,--no-as-needed + + econf \ + --enable-largefile \ + $(use_enable glib glib2) \ + --disable-solaris \ + $(use_enable asyncns) \ + $(use_enable oss) \ + $(use_enable alsa) \ + $(use_enable lirc) \ + $(use_enable tcpd tcpwrap) \ + $(use_enable jack) \ + $(use_enable lirc) \ + $(use_enable avahi) \ + $(use_enable hal) \ + $(use_enable dbus) \ + $(use_enable gnome gconf) \ + $(use_enable libsamplerate samplerate) \ + $(use_enable bluetooth bluez) \ + $(use_enable policykit polkit) \ + $(use_enable X x11) \ + $(use_enable test default-build-tests) \ + $(use_with caps) \ + --localstatedir=/var \ + --with-realtime-group=realtime \ + --disable-per-user-esound-socket \ + || die "econf failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + + newconfd "${FILESDIR}/pulseaudio.conf.d" pulseaudio + + use_define() { + local define=${2:-$(echo $1 | tr '[:lower:]' '[:upper:]')} + + use "$1" && echo "-D$define" || echo "-U$define" + } + + unifdef $(use_define hal) \ + $(use_define avahi) \ + $(use_define alsa) \ + $(use_define bluetooth) \ + "${FILESDIR}/pulseaudio.init.d-4" \ + > "${T}/pulseaudio" + + doinitd "${T}/pulseaudio" + + use avahi && sed -i -e '/module-zeroconf-publish/s:^#::' "${D}/etc/pulse/default.pa" + + dohtml -r doc + dodoc README + + # Create the state directory + diropts -o pulse -g pulse -m0755 + keepdir /var/run/pulse + + find "${D}" -name '*.la' -delete +} + +pkg_postinst() { + elog "PulseAudio in Gentoo can use a system-wide pulseaudio daemon." + elog "This support is enabled by starting the pulseaudio init.d ." + elog "To be able to access that you need to be in the group pulse-access." + elog "If you choose to use this feature, please make sure that you" + elog "really want to run PulseAudio this way:" + elog " http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode" + elog "For more information about system-wide support, please refer to:" + elog " http://pulseaudio.org/wiki/SystemWideInstance" + if use gnome; then + elog + elog "By enabling gnome USE flag, you enabled gconf support. Please note" + elog "that you might need to remove the gnome USE flag or disable the" + elog "gconf module on /etc/pulse/system.pa to be able to use PulseAudio" + elog "with a system-wide instance." + fi + elog + elog "To use the ESounD wrapper while using a system-wide daemon, you also" + elog "need to enable auth-anonymous for the esound-unix module, or to copy" + elog "/var/run/pulse/.esd_auth into each home directory." + elog + elog "If you want to make use of realtime capabilities of PulseAudio" + elog "you should follow the realtime guide to create and set up a realtime" + elog "user group: http://www.gentoo.org/proj/en/desktop/sound/realtime.xml" + elog "Make sure you also have baselayout installed with pam USE flag" + elog "enabled, if you're using the rlimit method." + if use bluetooth; then + elog + elog "The BlueTooth proximity module is not enabled in the default" + elog "configuration file. If you do enable it, you'll have to have" + elog "your BlueTooth controller enabled and inserted at bootup or" + elog "PulseAudio will refuse to start." + elog + elog "Please note that the BlueTooth proximity module seems itself" + elog "still experimental, so please report to upstream if you have" + elog "problems with it." + fi + if use alsa; then + local pkg="media-plugins/alsa-plugins" + if has_version ${pkg} && ! built_with_use --missing false ${pkg} pulseaudio; then + elog + elog "You have alsa support enabled so you probably want to install" + elog "${pkg} with pulseaudio support to have" + elog "alsa using applications route their sound through pulseaudio" + fi + fi + + eselect esd update --if-unset +} diff --git a/media-sound/pulseaudio/pulseaudio-0.9.16_rc2-r2.ebuild b/media-sound/pulseaudio/pulseaudio-0.9.16_rc2-r2.ebuild new file mode 100644 index 000000000000..b1dadff08214 --- /dev/null +++ b/media-sound/pulseaudio/pulseaudio-0.9.16_rc2-r2.ebuild @@ -0,0 +1,171 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/pulseaudio-0.9.16_rc2-r2.ebuild,v 1.1 2009/07/16 14:00:05 flameeyes Exp $ + +EAPI=2 + +inherit eutils libtool flag-o-matic + +DESCRIPTION="A networked sound server with an advanced plugin system" +HOMEPAGE="http://www.pulseaudio.org/" +if [[ ${PV/_rc/} == ${PV} ]]; then + SRC_URI="http://0pointer.de/lennart/projects/${PN}/${P}.tar.gz" +else + SRC_URI="http://0pointer.de/public/${P/_rc/-test}.tar.gz" +fi + +S="${WORKDIR}/${P/_rc/-test}" + +LICENSE="LGPL-2 GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86" +IUSE="alsa avahi caps jack lirc oss tcpd X hal dbus libsamplerate gnome bluetooth policykit asyncns +glib test doc" + +RDEPEND="X? ( x11-libs/libX11 x11-libs/libSM x11-libs/libICE x11-libs/libXtst ) + caps? ( sys-libs/libcap ) + libsamplerate? ( >=media-libs/libsamplerate-0.1.1-r1 ) + alsa? ( >=media-libs/alsa-lib-1.0.19 ) + glib? ( >=dev-libs/glib-2.4.0 ) + avahi? ( >=net-dns/avahi-0.6.12[dbus] ) + >=dev-libs/liboil-0.3.0 + jack? ( >=media-sound/jack-audio-connection-kit-0.100 ) + tcpd? ( sys-apps/tcp-wrappers ) + lirc? ( app-misc/lirc ) + dbus? ( >=sys-apps/dbus-1.0.0 ) + gnome? ( >=gnome-base/gconf-2.4.0 ) + hal? ( + >=sys-apps/hal-0.5.7 + >=sys-apps/dbus-1.0.0 + ) + app-admin/eselect-esd + bluetooth? ( + || ( >=net-wireless/bluez-4 + >=net-wireless/bluez-libs-3 ) + >=sys-apps/dbus-1.0.0 + ) + policykit? ( sys-auth/policykit ) + asyncns? ( net-libs/libasyncns ) + >=media-libs/audiofile-0.2.6-r1 + >=media-libs/speex-1.2_beta + >=media-libs/libsndfile-1.0.10 + >=dev-libs/liboil-0.3.6 + sys-libs/gdbm + >=sys-devel/libtool-2.2.4" # it's a valid RDEPEND, libltdl.so is used + +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen ) + X? ( x11-proto/xproto ) + dev-libs/libatomic_ops + dev-util/pkgconfig + dev-util/intltool" + +RDEPEND="${RDEPEND} + gnome-extra/gnome-audio" + +pkg_setup() { + enewgroup audio 18 # Just make sure it exists + enewgroup realtime + enewgroup pulse-access + enewgroup pulse + enewuser pulse -1 -1 /var/run/pulse pulse,audio +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-0.9.16-CVE-2009-1894.patch" + elibtoolize +} + +src_configure() { + # To properly fix CVE-2008-0008 + append-flags -UNDEBUG + + append-ldflags -Wl,--no-as-needed + + econf \ + --enable-largefile \ + $(use_enable glib glib2) \ + --disable-solaris \ + $(use_enable asyncns) \ + $(use_enable oss) \ + $(use_enable alsa) \ + $(use_enable lirc) \ + $(use_enable tcpd tcpwrap) \ + $(use_enable jack) \ + $(use_enable lirc) \ + $(use_enable avahi) \ + $(use_enable hal) \ + $(use_enable dbus) \ + $(use_enable gnome gconf) \ + $(use_enable libsamplerate samplerate) \ + $(use_enable bluetooth bluez) \ + $(use_enable policykit polkit) \ + $(use_enable X x11) \ + $(use_enable test default-build-tests) \ + $(use_with caps) \ + --localstatedir=/var \ + --with-realtime-group=realtime \ + --disable-per-user-esound-socket \ + || die "econf failed" + + if use doc; then + pushd doxygen + doxygen doxygen.conf || die + popd + fi +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + + use avahi && sed -i -e '/module-zeroconf-publish/s:^#::' "${D}/etc/pulse/default.pa" + + # the “true” condition should be replaced by “use udev” once + # that's enabled. + if use hal && true; then + sed -i -e 's:-udev:-hal:' "${D}/etc/pulse/default.pa" || die + fi + + dodoc README ChangeLog todo || die + + if use doc; then + pushd doxygen/html + dohtml * || die + popd + fi + + # Create the state directory + diropts -o pulse -g pulse -m0755 + keepdir /var/run/pulse + + find "${D}" -name '*.la' -delete +} + +pkg_postinst() { + elog "If you want to make use of realtime capabilities of PulseAudio" + elog "you should follow the realtime guide to create and set up a realtime" + elog "user group: http://www.gentoo.org/proj/en/desktop/sound/realtime.xml" + elog "Make sure you also have baselayout installed with pam USE flag" + elog "enabled, if you're using the rlimit method." + if use bluetooth; then + elog + elog "The BlueTooth proximity module is not enabled in the default" + elog "configuration file. If you do enable it, you'll have to have" + elog "your BlueTooth controller enabled and inserted at bootup or" + elog "PulseAudio will refuse to start." + elog + elog "Please note that the BlueTooth proximity module seems itself" + elog "still experimental, so please report to upstream if you have" + elog "problems with it." + fi + if use alsa; then + local pkg="media-plugins/alsa-plugins" + if has_version ${pkg} && ! built_with_use --missing false ${pkg} pulseaudio; then + elog + elog "You have alsa support enabled so you probably want to install" + elog "${pkg} with pulseaudio support to have" + elog "alsa using applications route their sound through pulseaudio" + fi + fi + + eselect esd update --if-unset +} diff --git a/media-sound/pulseaudio/pulseaudio-0.9.16_rc2-r51.ebuild b/media-sound/pulseaudio/pulseaudio-0.9.16_rc2-r51.ebuild new file mode 100644 index 000000000000..33ffdb70046e --- /dev/null +++ b/media-sound/pulseaudio/pulseaudio-0.9.16_rc2-r51.ebuild @@ -0,0 +1,213 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/pulseaudio-0.9.16_rc2-r51.ebuild,v 1.1 2009/07/16 14:00:05 flameeyes Exp $ + +EAPI=2 + +inherit eutils libtool flag-o-matic + +MY_P=${P/_rc/-test} + +DESCRIPTION="A networked sound server with an advanced plugin system" +HOMEPAGE="http://www.pulseaudio.org/" +SRC_URI="http://0pointer.de/public/${MY_P}.tar.gz" + +S="${WORKDIR}/${MY_P}" + +LICENSE="LGPL-2 GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86" +IUSE="alsa avahi caps jack lirc oss tcpd X hal dbus libsamplerate gnome bluetooth policykit asyncns +glib test doc" + +RDEPEND="X? ( x11-libs/libX11 x11-libs/libSM x11-libs/libICE x11-libs/libXtst ) + caps? ( sys-libs/libcap ) + libsamplerate? ( >=media-libs/libsamplerate-0.1.1-r1 ) + alsa? ( >=media-libs/alsa-lib-1.0.19 ) + glib? ( >=dev-libs/glib-2.4.0 ) + avahi? ( >=net-dns/avahi-0.6.12[dbus] ) + >=dev-libs/liboil-0.3.0 + jack? ( >=media-sound/jack-audio-connection-kit-0.100 ) + tcpd? ( sys-apps/tcp-wrappers ) + lirc? ( app-misc/lirc ) + dbus? ( >=sys-apps/dbus-1.0.0 ) + gnome? ( >=gnome-base/gconf-2.4.0 ) + hal? ( + >=sys-apps/hal-0.5.7 + >=sys-apps/dbus-1.0.0 + ) + app-admin/eselect-esd + bluetooth? ( + || ( >=net-wireless/bluez-4 + >=net-wireless/bluez-libs-3 ) + >=sys-apps/dbus-1.0.0 + ) + policykit? ( sys-auth/policykit ) + asyncns? ( net-libs/libasyncns ) + >=media-libs/audiofile-0.2.6-r1 + >=media-libs/speex-1.2_beta + >=media-libs/libsndfile-1.0.10 + >=dev-libs/liboil-0.3.6 + sys-libs/gdbm + >=sys-devel/libtool-2.2.4" # it's a valid RDEPEND, libltdl.so is used + +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen ) + X? ( x11-proto/xproto ) + dev-libs/libatomic_ops + dev-util/pkgconfig + || ( dev-util/unifdef sys-freebsd/freebsd-ubin ) + dev-util/intltool" + +# alsa-utils dep is for the alsasound init.d script (see bug #155707) +# bluez-utils dep is for the bluetooth init.d script +RDEPEND="${RDEPEND} + sys-apps/openrc + gnome-extra/gnome-audio + alsa? ( media-sound/alsa-utils ) + bluetooth? ( + || ( >=net-wireless/bluez-4 + >=net-wireless/bluez-utils-3 ) )" + +pkg_setup() { + enewgroup audio 18 # Just make sure it exists + enewgroup pulse-access + enewgroup pulse + enewuser pulse -1 -1 /var/run/pulse pulse,audio +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-0.9.16-CVE-2009-1894.patch" + elibtoolize +} + +src_configure() { + # To properly fix CVE-2008-0008 + append-flags -UNDEBUG + + # It's a binutils bug, once I can find time to fix that I'll add a + # proper dependency and fix this up. — flameeyes + append-ldflags -Wl,--no-as-needed + + # udev is disabled because we don't have the right version just + # yet, and thus we need to avoid it for now. Once we have the + # version I'll revbump PA. — flameeyes + econf \ + --enable-largefile \ + $(use_enable glib glib2) \ + --disable-solaris \ + $(use_enable asyncns) \ + $(use_enable oss) \ + $(use_enable alsa) \ + $(use_enable lirc) \ + $(use_enable tcpd tcpwrap) \ + $(use_enable jack) \ + $(use_enable lirc) \ + $(use_enable avahi) \ + $(use_enable hal) \ + $(use_enable dbus) \ + $(use_enable gnome gconf) \ + $(use_enable libsamplerate samplerate) \ + $(use_enable bluetooth bluez) \ + $(use_enable X x11) \ + $(use_enable test default-build-tests) \ + $(use_with caps) \ + --disable-udev \ + --localstatedir=/var \ + --disable-per-user-esound-socket \ + --with-database=gdbm \ + || die "econf failed" + + if use doc; then + pushd doxygen + doxygen doxygen.conf || die + popd + fi +} + +src_install() { + emake -j1 DESTDIR="${D}" install || die "make install failed" + + newconfd "${FILESDIR}/pulseaudio.conf.d" pulseaudio + + use_define() { + local define=${2:-$(echo $1 | tr '[:lower:]' '[:upper:]')} + + use "$1" && echo "-D$define" || echo "-U$define" + } + + unifdef $(use_define hal) \ + $(use_define avahi) \ + $(use_define alsa) \ + $(use_define bluetooth) \ + "${FILESDIR}/pulseaudio.init.d-4" \ + > "${T}/pulseaudio" + + doinitd "${T}/pulseaudio" + + use avahi && sed -i -e '/module-zeroconf-publish/s:^#::' "${D}/etc/pulse/default.pa" + + # the “true” condition should be replaced by “use udev” once + # that's enabled. + if use hal && true; then + sed -i -e 's:-udev:-hal:' "${D}/etc/pulse/default.pa" || die + fi + + dodoc README ChangeLog todo || die + + if use doc; then + pushd doxygen/html + dohtml * || die + popd + fi + + # Create the state directory + diropts -o pulse -g pulse -m0755 + keepdir /var/run/pulse + + find "${D}" -name '*.la' -delete +} + +pkg_postinst() { + elog "PulseAudio in Gentoo can use a system-wide pulseaudio daemon." + elog "This support is enabled by starting the pulseaudio init.d ." + elog "To be able to access that you need to be in the group pulse-access." + elog "If you choose to use this feature, please make sure that you" + elog "really want to run PulseAudio this way:" + elog " http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode" + elog "For more information about system-wide support, please refer to:" + elog " http://pulseaudio.org/wiki/SystemWideInstance" + if use gnome; then + elog + elog "By enabling gnome USE flag, you enabled gconf support. Please note" + elog "that you might need to remove the gnome USE flag or disable the" + elog "gconf module on /etc/pulse/system.pa to be able to use PulseAudio" + elog "with a system-wide instance." + fi + elog + elog "To use the ESounD wrapper while using a system-wide daemon, you also" + elog "need to enable auth-anonymous for the esound-unix module, or to copy" + elog "/var/run/pulse/.esd_auth into each home directory." + elog + if use bluetooth; then + elog + elog "The BlueTooth proximity module is not enabled in the default" + elog "configuration file. If you do enable it, you'll have to have" + elog "your BlueTooth controller enabled and inserted at bootup or" + elog "PulseAudio will refuse to start." + elog + elog "Please note that the BlueTooth proximity module seems itself" + elog "still experimental, so please report to upstream if you have" + elog "problems with it." + fi + if use alsa; then + local pkg="media-plugins/alsa-plugins" + if has_version ${pkg} && ! built_with_use --missing false ${pkg} pulseaudio; then + elog + elog "You have alsa support enabled so you probably want to install" + elog "${pkg} with pulseaudio support to have" + elog "alsa using applications route their sound through pulseaudio" + fi + fi + + eselect esd update --if-unset +} diff --git a/media-sound/pulseaudio/pulseaudio-0.9.9-r1.ebuild b/media-sound/pulseaudio/pulseaudio-0.9.9-r1.ebuild new file mode 100644 index 000000000000..7cf160d3faa0 --- /dev/null +++ b/media-sound/pulseaudio/pulseaudio-0.9.9-r1.ebuild @@ -0,0 +1,175 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/pulseaudio-0.9.9-r1.ebuild,v 1.3 2009/07/16 14:00:05 flameeyes Exp $ + +inherit eutils libtool autotools flag-o-matic + +DESCRIPTION="A networked sound server with an advanced plugin system" +HOMEPAGE="http://www.pulseaudio.org" +SRC_URI="http://0pointer.de/lennart/projects/${PN}/${P}.tar.gz" + +LICENSE="LGPL-2 GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sh sparc x86" +IUSE="alsa avahi caps jack lirc oss tcpd X hal dbus libsamplerate gnome bluetooth policykit asyncns" + +RDEPEND="X? ( x11-libs/libX11 ) + caps? ( sys-libs/libcap ) + >=media-libs/audiofile-0.2.6-r1 + libsamplerate? ( >=media-libs/libsamplerate-0.1.1-r1 ) + >=media-libs/libsndfile-1.0.10 + >=dev-libs/liboil-0.3.6 + alsa? ( >=media-libs/alsa-lib-1.0.10 ) + >=dev-libs/glib-2.4.0 + avahi? ( >=net-dns/avahi-0.6.12 ) + >=dev-libs/liboil-0.3.0 + jack? ( >=media-sound/jack-audio-connection-kit-0.100 ) + tcpd? ( sys-apps/tcp-wrappers ) + lirc? ( app-misc/lirc ) + dbus? ( >=sys-apps/dbus-1.0.0 ) + gnome? ( >=gnome-base/gconf-2.4.0 ) + hal? ( + >=sys-apps/hal-0.5.7 + >=sys-apps/dbus-1.0.0 + ) + app-admin/eselect-esd + bluetooth? ( + >=net-wireless/bluez-libs-3 + >=sys-apps/dbus-1.0.0 + ) + policykit? ( sys-auth/policykit ) + asyncns? ( net-libs/libasyncns ) + >=sys-devel/libtool-1.5.24" # it's a valid RDEPEND, libltdl.so is used +DEPEND="${RDEPEND} + dev-libs/libatomic_ops + dev-util/pkgconfig" + +# alsa-utils dep is for the alsasound init.d script (see bug #155707) +# bluez-utils dep is for the bluetooth init.d script +RDEPEND="${RDEPEND} + gnome-extra/gnome-audio + alsa? ( media-sound/alsa-utils ) + bluetooth? ( >=net-wireless/bluez-utils-3 )" + +pkg_setup() { + if use avahi && ! built_with_use net-dns/avahi dbus ; then + echo + eerror "In order to compile pulseaudio with avahi support, you need to have" + eerror "net-dns/avahi emerged with 'dbus' in your USE flag. Please add that" + eerror "flag, re-emerge avahi, and then emerge pulseaudio again." + die "net-dns/avahi is missing the D-Bus bindings." + fi + + enewgroup audio 18 # Just make sure it exists + enewgroup realtime + enewgroup pulse-access + enewgroup pulse + enewuser pulse -1 -1 /var/run/pulse pulse,audio +} + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${PN}-0.9.8-svn2074.patch" + epatch "${FILESDIR}/${PN}-0.9.8-polkit.patch" + epatch "${FILESDIR}/${PN}-0.9.8-bt-nohal.patch" + epatch "${FILESDIR}/${PN}-0.9.8-esoundpath.patch" + epatch "${FILESDIR}/${PN}-0.9.8-create-directory.patch" + epatch "${FILESDIR}/${P}-CVE-2009-1894.patch" + + eautoreconf + elibtoolize +} + +src_compile() { + # To properly fix CVE-2008-0008 + append-flags -UNDEBUG + + econf \ + --enable-largefile \ + --enable-glib2 \ + --disable-solaris \ + $(use_enable asyncns) \ + $(use_enable oss) \ + $(use_enable alsa) \ + $(use_enable lirc) \ + $(use_enable tcpd tcpwrap) \ + $(use_enable jack) \ + $(use_enable lirc) \ + $(use_enable avahi) \ + $(use_enable hal) \ + $(use_enable dbus) \ + $(use_enable gnome gconf) \ + $(use_enable libsamplerate samplerate) \ + $(use_enable bluetooth bluez) \ + $(use_enable policykit polkit) \ + $(use_with caps) \ + $(use_with X x) \ + --disable-ltdl-install \ + --localstatedir=/var \ + --with-realtime-group=realtime \ + || die "econf failed" + emake || die "emake failed" +} + +src_install() { + emake -j1 DESTDIR="${D}" install || die "make install failed" + + newconfd "${FILESDIR}/pulseaudio.conf.d" pulseaudio + + local neededservices + use alsa && neededservices="$neededservices alsasound" + use avahi && neededservices="$neededservices avahi-daemon" + use hal && neededservices="$neededservices hald" + use bluetooth && neededservices="$neededservices bluetooth" + [[ -n ${neededservices} ]] && sed -e "s/@neededservices@/need $neededservices/" "${FILESDIR}/pulseaudio.init.d-2" > "${T}/pulseaudio" + doinitd "${T}/pulseaudio" + + use avahi && sed -i -e '/module-zeroconf-publish/s:^#::' "${D}/etc/pulse/default.pa" + + dohtml -r doc + dodoc README + + # Create the state directory + diropts -o pulse -g pulse -m0755 + keepdir /var/run/pulse +} + +pkg_postinst() { + elog "PulseAudio in Gentoo can use a system-wide pulseaudio daemon." + elog "This support is enabled by starting the pulseaudio init.d ." + elog "To be able to access that you need to be in the group pulse-access." + elog "For more information about system-wide support, please refer to" + elog " http://pulseaudio.org/wiki/SystemWideInstance" + if use gnome; then + elog + elog "By enabling gnome USE flag, you enabled gconf support. Please note" + elog "that you might need to remove the gnome USE flag or disable the" + elog "gconf module on /etc/pulse/default.pa to be able to use PulseAudio" + elog "with a system-wide instance." + fi + elog + elog "To use the ESounD wrapper while using a system-wide daemon, you also" + elog "need to enable auth-anonymous for the esound-unix module, or to copy" + elog "/var/run/pulse/.esd_auth into each home directory." + elog + elog "If you want to make use of realtime capabilities of PulseAudio" + elog "you should follow the realtime guide to create and set up a realtime" + elog "user group: http://www.gentoo.org/proj/en/desktop/sound/realtime.xml" + elog "Make sure you also have baselayout installed with pam USE flag" + elog "enabled, if you're using the rlimit method." + if use bluetooth; then + elog + elog "The BlueTooth proximity module is not enabled in the default" + elog "configuration file. If you do enable it, you'll have to have" + elog "your BlueTooth controller enabled and inserted at bootup or" + elog "PulseAudio will refuse to start." + elog + elog "Please note that the BlueTooth proximity module seems itself" + elog "still experimental, so please report to upstream if you have" + elog "problems with it." + fi + + eselect esd update --if-unset +} |