From 7964ca4df6811dae9ae0a2c57056e8bbe0c87d0b Mon Sep 17 00:00:00 2001 From: Brian Harring Date: Thu, 22 Jul 2004 21:15:33 +0000 Subject: locked down the default daemon installation a bit (binds to localhost only by default), added USE="droproot" (which will become a default beyond 0.11.1), cleansed the deps, yadda yadda yadda. --- media-sound/mpd/ChangeLog | 18 ++++++- media-sound/mpd/Manifest | 20 +++---- media-sound/mpd/files/digest-mpd-0.11.0 | 1 - media-sound/mpd/files/digest-mpd-0.11.0-r1 | 1 + media-sound/mpd/files/digest-mpd-0.11.1 | 1 - media-sound/mpd/files/digest-mpd-0.11.1-r1 | 1 + media-sound/mpd/files/mpd.rc6 | 4 +- media-sound/mpd/metadata.xml | 3 ++ media-sound/mpd/mpd-0.11.0-r1.ebuild | 87 ++++++++++++++++++++++++++++++ media-sound/mpd/mpd-0.11.0.ebuild | 64 ---------------------- media-sound/mpd/mpd-0.11.1-r1.ebuild | 87 ++++++++++++++++++++++++++++++ media-sound/mpd/mpd-0.11.1.ebuild | 64 ---------------------- 12 files changed, 208 insertions(+), 143 deletions(-) delete mode 100644 media-sound/mpd/files/digest-mpd-0.11.0 create mode 100644 media-sound/mpd/files/digest-mpd-0.11.0-r1 delete mode 100644 media-sound/mpd/files/digest-mpd-0.11.1 create mode 100644 media-sound/mpd/files/digest-mpd-0.11.1-r1 create mode 100644 media-sound/mpd/mpd-0.11.0-r1.ebuild delete mode 100644 media-sound/mpd/mpd-0.11.0.ebuild create mode 100644 media-sound/mpd/mpd-0.11.1-r1.ebuild delete mode 100644 media-sound/mpd/mpd-0.11.1.ebuild (limited to 'media-sound') diff --git a/media-sound/mpd/ChangeLog b/media-sound/mpd/ChangeLog index 2b090fb42274..9e2f12873dbe 100644 --- a/media-sound/mpd/ChangeLog +++ b/media-sound/mpd/ChangeLog @@ -1,12 +1,28 @@ # ChangeLog for media-sound/mpd # Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/ChangeLog,v 1.34 2004/07/21 19:17:50 mholzer Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/ChangeLog,v 1.35 2004/07/22 21:15:33 ferringb Exp $ + +*mpd-0.11.1-r1 (22 Jul 2004) + + 22 Jul 2004; Brian Harring metadata.xml, + mpd-0.11.0-r1.ebuild, mpd-0.11.0.ebuild, mpd-0.11.1-r1.ebuild, + mpd-0.11.1.ebuild, files/mpd.rc6: + revbumping 0.11.0 and 0.11.1 to push out corrected deps/configuration + handling, added USE="droproot" option to control whether mpd runs as root, or + user mpd, and adjusted the default configuration so that it binds strictly to + localhost. These changes are intended to secure the default install- versions + beyond 0.11.1 will install mpd as non-root by default. Corrected init.d script + so that /etc/mpd.conf is used (was fixed once upon a time, but crept back in) + which closes bug #56132 . *mpd-0.11.2 (21 Jul 2004) 21 Jul 2004; Martin Holzer mpd-0.11.2.ebuild: Version bumped. + 16 Jul 2004; Brian Harring mpd-0.11.0.ebuild: + Stabling 0.11.0 for x86. + *mpd-0.11.1 (27 Jun 2004) 27 Jun 2004; Martin Holzer mpd-0.11.1.ebuild: diff --git a/media-sound/mpd/Manifest b/media-sound/mpd/Manifest index 623ebe072191..c907bec869cc 100644 --- a/media-sound/mpd/Manifest +++ b/media-sound/mpd/Manifest @@ -1,15 +1,15 @@ -MD5 67e06c877eaa67975cbb542f17bd55b6 ChangeLog 4789 -MD5 a1eaeb2ae801daeb712c90c060e922dc metadata.xml 158 -MD5 7eeee75a4f1b489521647df96913d3b5 mpd-0.9.4-r1.ebuild 1667 -MD5 10713136a84d9d1419d1a69d58706c9a mpd-0.10.4.ebuild 1915 +MD5 823b621df5d3717be87258d6616c1933 ChangeLog 5587 +MD5 ab49b3978e51630cd199bddd4321bd49 metadata.xml 221 MD5 7f836ed517e151b1e1ba1d2f2181f616 mpd-0.10.3-r1.ebuild 1923 +MD5 10713136a84d9d1419d1a69d58706c9a mpd-0.10.4.ebuild 1915 +MD5 7eeee75a4f1b489521647df96913d3b5 mpd-0.9.4-r1.ebuild 1667 +MD5 1c2e6013d4b9a78599df00ac4e92c11a mpd-0.11.0-r1.ebuild 2797 MD5 76845e94c803c11e2d1724466e36fcbe mpd-0.11.2.ebuild 1914 -MD5 5aa2f9bc752974dcf80ea2d4fae2c1ab mpd-0.11.1.ebuild 1913 -MD5 44fea0fb8765646d220cddec1e2f2612 mpd-0.11.0.ebuild 1919 +MD5 675656dda664cecc74b65082b872c1e9 mpd-0.11.1-r1.ebuild 2814 MD5 727c4148fc9939fdbb4ba6770d2b1249 files/digest-mpd-0.10.3-r1 62 -MD5 b26df5fab168ac4c9bca171911b4dc8c files/digest-mpd-0.9.4-r1 62 -MD5 b957f8393452420ffd7c8ce76531e528 files/mpd.rc6 860 MD5 c211dd1fcfbc2b64395fd728cc572621 files/digest-mpd-0.10.4 62 -MD5 12b5b0ad7c2d89bfa754775e3a984aad files/digest-mpd-0.11.0 63 -MD5 268d1b619a63dd6c824afc1c63b97b50 files/digest-mpd-0.11.1 63 +MD5 b26df5fab168ac4c9bca171911b4dc8c files/digest-mpd-0.9.4-r1 62 +MD5 aac769d5eea24e74c5669be8f9f94aef files/mpd.rc6 874 MD5 721443952b6dfa20f262595b919c626b files/digest-mpd-0.11.2 63 +MD5 12b5b0ad7c2d89bfa754775e3a984aad files/digest-mpd-0.11.0-r1 63 +MD5 268d1b619a63dd6c824afc1c63b97b50 files/digest-mpd-0.11.1-r1 63 diff --git a/media-sound/mpd/files/digest-mpd-0.11.0 b/media-sound/mpd/files/digest-mpd-0.11.0 deleted file mode 100644 index 705fdeddabdd..000000000000 --- a/media-sound/mpd/files/digest-mpd-0.11.0 +++ /dev/null @@ -1 +0,0 @@ -MD5 7ee41a7699e46ab596c7df5619689469 mpd-0.11.0.tar.gz 1114000 diff --git a/media-sound/mpd/files/digest-mpd-0.11.0-r1 b/media-sound/mpd/files/digest-mpd-0.11.0-r1 new file mode 100644 index 000000000000..705fdeddabdd --- /dev/null +++ b/media-sound/mpd/files/digest-mpd-0.11.0-r1 @@ -0,0 +1 @@ +MD5 7ee41a7699e46ab596c7df5619689469 mpd-0.11.0.tar.gz 1114000 diff --git a/media-sound/mpd/files/digest-mpd-0.11.1 b/media-sound/mpd/files/digest-mpd-0.11.1 deleted file mode 100644 index 9d0d915198d7..000000000000 --- a/media-sound/mpd/files/digest-mpd-0.11.1 +++ /dev/null @@ -1 +0,0 @@ -MD5 c8d11a5a439c36a0de95c0eed6fa50c4 mpd-0.11.1.tar.gz 1116854 diff --git a/media-sound/mpd/files/digest-mpd-0.11.1-r1 b/media-sound/mpd/files/digest-mpd-0.11.1-r1 new file mode 100644 index 000000000000..9d0d915198d7 --- /dev/null +++ b/media-sound/mpd/files/digest-mpd-0.11.1-r1 @@ -0,0 +1 @@ +MD5 c8d11a5a439c36a0de95c0eed6fa50c4 mpd-0.11.1.tar.gz 1116854 diff --git a/media-sound/mpd/files/mpd.rc6 b/media-sound/mpd/files/mpd.rc6 index c4d7289d6428..f9ec4f9ef178 100644 --- a/media-sound/mpd/files/mpd.rc6 +++ b/media-sound/mpd/files/mpd.rc6 @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/files/mpd.rc6,v 1.8 2004/07/14 22:48:35 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/files/mpd.rc6,v 1.9 2004/07/22 21:15:33 ferringb Exp $ depend() { need localmount @@ -25,7 +25,7 @@ start() { checkconfig || return 1 ebegin "Starting Music Player Daemon" - start-stop-daemon --start --quiet --exec /usr/bin/mpd -- --no-create-db + start-stop-daemon --start --quiet --exec /usr/bin/mpd -- --no-create-db /etc/mpd.conf eend $? } diff --git a/media-sound/mpd/metadata.xml b/media-sound/mpd/metadata.xml index e1774e3d9ad7..7116862b7e21 100644 --- a/media-sound/mpd/metadata.xml +++ b/media-sound/mpd/metadata.xml @@ -2,4 +2,7 @@ sound + + ferringb@gentoo.org + diff --git a/media-sound/mpd/mpd-0.11.0-r1.ebuild b/media-sound/mpd/mpd-0.11.0-r1.ebuild new file mode 100644 index 000000000000..b30ff2f9a6dc --- /dev/null +++ b/media-sound/mpd/mpd-0.11.0-r1.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/mpd-0.11.0-r1.ebuild,v 1.1 2004/07/22 21:15:33 ferringb Exp $ + +inherit eutils + +IUSE="oggvorbis mad aac audiofile ipv6 flac droproot mikmod" + +DESCRIPTION="Music Player Daemon (mpd)" +SRC_URI="mirror://sourceforge/musicpd/${P}.tar.gz" +HOMEPAGE="http://www.musicpd.org" + +KEYWORDS="x86 ~amd64 ~sparc ~ppc" +SLOT="0" +LICENSE="GPL-2" + +DEPEND="oggvorbis? ( media-libs/libvorbis ) + mad? ( media-libs/libmad + media-libs/libid3tag ) + aac? ( >=media-libs/faad2-2.0_rc2 ) + audiofile? ( media-libs/audiofile ) + flac? ( >=media-libs/flac-1.1.0 ) + mikmod? ( >=media-libs/libmikmod ) + alsa? ( media-libs/alsa-lib ) + >=media-libs/libao-0.8.4 + sys-libs/zlib" + +src_compile() { + #flip on/off the support, and test. + econf `use_enable aac` \ + `use_enable oggvorbis ogg` \ + `use_enable oggvorbis oggtest` \ + `use_enable oggvorbis vorbistest` \ + `use_enable audiofile` \ + `use_enable audiofile audiofiletest` \ + `use_enable ipv6` \ + `use_enable flac libFLACtest` \ + `use_enable flac` \ + `use_enable mad mpd-mad` \ + `use_enable mad id3tag` \ + `use_enable mikmod libmikmodtest` \ + `use_enable mikmod mod` || die "could not configure" + + emake || die "emake failed" +} + +src_install() { + emake install DESTDIR=${D} || die + rm -rf ${D}/usr/share/doc/mpd/ + dodoc COPYING ChangeLog INSTALL README TODO UPGRADING + dodoc doc/COMMANDS doc/mpdconf.example + + insinto /etc + newins doc/mpdconf.example mpd.conf + + exeinto /etc/init.d + newexe ${FILESDIR}/mpd.rc6 mpd + + if use droproot; then + dosed 's:^#user.*$:user "mpd":' /etc/mpd.conf + fi + dosed 's:^#bind.*$:bind "localhost":' /etc/mpd.conf + dosed 's:^port.*$:port "6600":' /etc/mpd.conf + dosed 's:^music_directory.*$:music_directory "/usr/share/mpd/music":' /etc/mpd.conf + dosed 's:^playlist_directory.*$:playlist_directory "/usr/share/mpd/playlists":' /etc/mpd.conf + dosed 's:^log_file.*$:log_file "/var/log/mpd.log":' /etc/mpd.conf + dosed 's:^error_file.*$:error_file "/var/log/mpd.error.log":' /etc/mpd.conf +} + +pkg_preinst() { + if use droproot; then + echo "adding user" + enewuser mpd '' '' '' audio || die "problem adding user mpd" + fi +} + +pkg_postinst() { + einfo "libao prior to 0.8.4 has issues with the ALSA drivers" + einfo "please refer to the FAQ" + einfo "http://musicpd.sourceforge.net/faq.php if you are having problems." + einfo + einfo "There have been a few changes to the default config as of late for security reason." + einfo "If the use flag droproot is enabled, mpd runs as user mpd rather then root. + einfo "Using a non-root user will be made into a default after 0.11.1. + einfo + einfo "Also, the default config now binds the daemon strictly to localhost, rather then all available IPs." +} diff --git a/media-sound/mpd/mpd-0.11.0.ebuild b/media-sound/mpd/mpd-0.11.0.ebuild deleted file mode 100644 index 4b0a94417571..000000000000 --- a/media-sound/mpd/mpd-0.11.0.ebuild +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/mpd-0.11.0.ebuild,v 1.3 2004/06/27 11:01:49 mholzer Exp $ - -IUSE="oggvorbis mad aac audiofile ipv6 flac" - -DESCRIPTION="Music Player Daemon (mpd)" -SRC_URI="mirror://sourceforge/musicpd/${P}.tar.gz" -HOMEPAGE="http://www.musicpd.org" - -KEYWORDS="~x86 ~amd64 ~sparc ~ppc" -SLOT="0" -LICENSE="GPL-2" - -DEPEND="oggvorbis? ( media-libs/libvorbis ) - mad? ( media-sound/madplay ) - aac? ( >=media-libs/faad2-2.0_rc2 ) - audiofile? ( media-libs/audiofile ) - flac? ( >=media-libs/flac-1.1.0 ) - media-libs/libid3tag - >=media-libs/libao-0.8.4 - sys-libs/zlib" - -src_compile() { - local myconf - - use oggvorbis \ - || myconf="${myconf} --disable-ogg --disable-oggtest \ - --disable-vorbistest" - use mad || myconf="${myconf} --enable-mpd-mad --enable-mpd-id3tag" - - econf `use_enable aac` \ - `use_enable audiofile` \ - `use_enable ipv6` \ - `use_enable flac` \ - ${myconf} || die "could not configure" - - emake || die "emake failed" -} - -src_install() { - emake install DESTDIR=${D} || die - rm -rf ${D}/usr/share/doc/mpd/ - dodoc COPYING ChangeLog INSTALL README TODO UPGRADING - dodoc doc/COMMANDS doc/mpdconf.example - - insinto /etc - newins doc/mpdconf.example mpd.conf - - exeinto /etc/init.d - newexe ${FILESDIR}/mpd.rc6 mpd - - dosed 's:^port.*$:port "6600":' /etc/mpd.conf - dosed 's:^music_directory.*$:music_directory "/usr/share/mpd/music":' /etc/mpd.conf - dosed 's:^playlist_directory.*$:playlist_directory "/usr/share/mpd/playlists":' /etc/mpd.conf - dosed 's:^log_file.*$:log_file "/var/log/mpd.log":' /etc/mpd.conf - dosed 's:^error_file.*$:error_file "/var/log/mpd.error.log":' /etc/mpd.conf -} - -pkg_postinst() { - einfo "libao prior to 0.8.4 has issues with the ALSA drivers" - einfo "please refer to the FAQ" - einfo "http://musicpd.sourceforge.net/faq.php if you are having problems." -} diff --git a/media-sound/mpd/mpd-0.11.1-r1.ebuild b/media-sound/mpd/mpd-0.11.1-r1.ebuild new file mode 100644 index 000000000000..76499e4dcbad --- /dev/null +++ b/media-sound/mpd/mpd-0.11.1-r1.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/mpd-0.11.1-r1.ebuild,v 1.1 2004/07/22 21:15:33 ferringb Exp $ + +inherit eutils + +IUSE="oggvorbis mad aac audiofile ipv6 flac droproot mikmod" + +DESCRIPTION="Music Player Daemon (mpd)" +SRC_URI="mirror://sourceforge/musicpd/${P}.tar.gz" +HOMEPAGE="http://www.musicpd.org" + +KEYWORDS="~x86 ~amd64 ~sparc ~ppc" +SLOT="0" +LICENSE="GPL-2" + +DEPEND="oggvorbis? ( media-libs/libvorbis ) + mad? ( media-libs/libmad + media-libs/libid3tag ) + aac? ( >=media-libs/faad2-2.0_rc2 ) + audiofile? ( media-libs/audiofile ) + flac? ( >=media-libs/flac-1.1.0 ) + mikmod? ( >=media-libs/libmikmod ) + alsa? ( media-libs/alsa-lib ) + >=media-libs/libao-0.8.4 + sys-libs/zlib" + +src_compile() { + #flip on/off the support, and test. + econf `use_enable aac` \ + `use_enable oggvorbis ogg` \ + `use_enable oggvorbis oggtest` \ + `use_enable oggvorbis vorbistest` \ + `use_enable audiofile` \ + `use_enable audiofile audiofiletest` \ + `use_enable ipv6` \ + `use_enable flac libFLACtest` \ + `use_enable flac` \ + `use_enable !mad mpd-mad` \ + `use_enable !mad id3tag` \ + `use_enable mikmod libmikmodtest` \ + `use_enable mikmod mod` || die "could not configure" + + emake || die "emake failed" +} + +src_install() { + emake install DESTDIR=${D} || die + rm -rf ${D}/usr/share/doc/mpd/ + dodoc COPYING ChangeLog INSTALL README TODO UPGRADING + dodoc doc/COMMANDS doc/mpdconf.example + + insinto /etc + newins doc/mpdconf.example mpd.conf + + exeinto /etc/init.d + newexe ${FILESDIR}/mpd.rc6 mpd + + if use droproot; then + dosed 's:^#user.*$:user "mpd":' /etc/mpd.conf + fi + dosed 's:^#bind.*$:bind "localhost":' /etc/mpd.conf + dosed 's:^port.*$:port "6600":' /etc/mpd.conf + dosed 's:^music_directory.*$:music_directory "/usr/share/mpd/music":' /etc/mpd.conf + dosed 's:^playlist_directory.*$:playlist_directory "/usr/share/mpd/playlists":' /etc/mpd.conf + dosed 's:^log_file.*$:log_file "/var/log/mpd.log":' /etc/mpd.conf + dosed 's:^error_file.*$:error_file "/var/log/mpd.error.log":' /etc/mpd.conf +} + +pkg_preinst() { + if use droproot; then + echo "adding user" + enewuser mpd '' '' '' audio || die "problem adding user mpd" + fi +} + +pkg_postinst() { + einfo "libao prior to 0.8.4 has issues with the ALSA drivers" + einfo "please refer to the FAQ" + einfo "http://musicpd.sourceforge.net/faq.php if you are having problems." + einfo + einfo "There have been a few changes to the default config as of late for security reason." + einfo "If the use flag droproot is enabled, mpd runs as user mpd rather then root; this will be a default" + einfo "in later versions, rather then enabled via use flag." + einfo + einfo "Also, the default config now binds the daemon strictly to localhost, rather then all available IPs." +} diff --git a/media-sound/mpd/mpd-0.11.1.ebuild b/media-sound/mpd/mpd-0.11.1.ebuild deleted file mode 100644 index 750bf0256565..000000000000 --- a/media-sound/mpd/mpd-0.11.1.ebuild +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/mpd-0.11.1.ebuild,v 1.2 2004/07/21 19:20:53 mholzer Exp $ - -IUSE="oggvorbis mad aac audiofile ipv6 flac" - -DESCRIPTION="Music Player Daemon (mpd)" -SRC_URI="mirror://sourceforge/musicpd/${P}.tar.gz" -HOMEPAGE="http://www.musicpd.org" - -KEYWORDS="x86 ~amd64 ~sparc" -SLOT="0" -LICENSE="GPL-2" - -DEPEND="oggvorbis? ( media-libs/libvorbis ) - mad? ( media-sound/madplay ) - aac? ( >=media-libs/faad2-2.0_rc2 ) - audiofile? ( media-libs/audiofile ) - flac? ( >=media-libs/flac-1.1.0 ) - media-libs/libid3tag - >=media-libs/libao-0.8.4 - sys-libs/zlib" - -src_compile() { - local myconf - - use oggvorbis \ - || myconf="${myconf} --disable-ogg --disable-oggtest \ - --disable-vorbistest" - use mad || myconf="${myconf} --enable-mpd-mad --enable-mpd-id3tag" - - econf `use_enable aac` \ - `use_enable audiofile` \ - `use_enable ipv6` \ - `use_enable flac` \ - ${myconf} || die "could not configure" - - emake || die "emake failed" -} - -src_install() { - emake install DESTDIR=${D} || die - rm -rf ${D}/usr/share/doc/mpd/ - dodoc COPYING ChangeLog INSTALL README TODO UPGRADING - dodoc doc/COMMANDS doc/mpdconf.example - - insinto /etc - newins doc/mpdconf.example mpd.conf - - exeinto /etc/init.d - newexe ${FILESDIR}/mpd.rc6 mpd - - dosed 's:^port.*$:port "6600":' /etc/mpd.conf - dosed 's:^music_directory.*$:music_directory "/usr/share/mpd/music":' /etc/mpd.conf - dosed 's:^playlist_directory.*$:playlist_directory "/usr/share/mpd/playlists":' /etc/mpd.conf - dosed 's:^log_file.*$:log_file "/var/log/mpd.log":' /etc/mpd.conf - dosed 's:^error_file.*$:error_file "/var/log/mpd.error.log":' /etc/mpd.conf -} - -pkg_postinst() { - einfo "libao prior to 0.8.4 has issues with the ALSA drivers" - einfo "please refer to the FAQ" - einfo "http://musicpd.sourceforge.net/faq.php if you are having problems." -} -- cgit v1.2.3-65-gdbad