From 29fb9e0573e6cd7be715ee2a021a7a9fa85a710b Mon Sep 17 00:00:00 2001 From: Matteo Azzali Date: Thu, 19 Oct 2006 16:48:32 +0000 Subject: Security fix bug #150568. Removed init script. This also fixes bug #145289. (Portage version: 2.1.2_pre3-r5) --- media-tv/freevo/ChangeLog | 9 +- media-tv/freevo/files/digest-freevo-1.5.4-r1 | 3 + media-tv/freevo/files/freevo.boot | 53 +++++++++ media-tv/freevo/freevo-1.5.4-r1.ebuild | 166 +++++++++++++++++++++++++++ 4 files changed, 230 insertions(+), 1 deletion(-) create mode 100644 media-tv/freevo/files/digest-freevo-1.5.4-r1 create mode 100755 media-tv/freevo/files/freevo.boot create mode 100644 media-tv/freevo/freevo-1.5.4-r1.ebuild (limited to 'media-tv') diff --git a/media-tv/freevo/ChangeLog b/media-tv/freevo/ChangeLog index 3d347e9b16a0..d7541290f012 100644 --- a/media-tv/freevo/ChangeLog +++ b/media-tv/freevo/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for media-tv/freevo # Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-tv/freevo/ChangeLog,v 1.36 2006/08/19 13:25:26 herbs Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-tv/freevo/ChangeLog,v 1.37 2006/10/19 16:48:32 mattepiu Exp $ + +*freevo-1.5.4-r1 (19 Oct 2006) + + 19 Oct 2006; Matteo Azzali +files/freevo.boot, + +freevo-1.5.4-r1.ebuild: + Removed initscript changed boot method per security bug #150568. + This fixes also bug #145289. Thanks to alpiturchi and Laurent Dufrechou. 19 Aug 2006; Herbie Hopkins freevo-1.5.4.ebuild: Stable on amd64 wrt bug #137088. diff --git a/media-tv/freevo/files/digest-freevo-1.5.4-r1 b/media-tv/freevo/files/digest-freevo-1.5.4-r1 new file mode 100644 index 000000000000..00efc312fb28 --- /dev/null +++ b/media-tv/freevo/files/digest-freevo-1.5.4-r1 @@ -0,0 +1,3 @@ +MD5 22ada48e84e5e3d7f80110c842ed18ca freevo-1.5.4.tar.gz 4425484 +RMD160 a5538af486ce6926f57f40abd90a7f655137f225 freevo-1.5.4.tar.gz 4425484 +SHA256 d9a7c9455a94c281acb8c5e3f0fc68e4289af7a557af413db2244a254dd48090 freevo-1.5.4.tar.gz 4425484 diff --git a/media-tv/freevo/files/freevo.boot b/media-tv/freevo/files/freevo.boot new file mode 100755 index 000000000000..f375c8896780 --- /dev/null +++ b/media-tv/freevo/files/freevo.boot @@ -0,0 +1,53 @@ +#!/bin/bash +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# use "freevoboot stop" to stop, "freevoboot xstop" if you use X. + +freevo=`grep ^freevo= /etc/conf.d/freevo | cut -d'"' -f2` +webserver=`grep ^webserver= /etc/conf.d/freevo | cut -d'"' -f2` +recordserver=`grep ^recordserver= /etc/conf.d/freevo | cut -d'"' -f2` + + +if [ "x$1" != "xstop" ]; then + if [ "$recordserver" == "yes" ]; then + echo "Starting Freevo recordserver" + /usr/bin/freevo recordserver start + fi + + if [ "$webserver" == "yes" ]; then + echo "Starting Freevo webserver" + /usr/bin/freevo webserver start + fi + + if [ "$freevo" == "daemon" ] && [ "x$1" != "xstartx" ]; then + echo "Starting Freevo daemon" + /usr/bin/freevo daemon start + elif [ "$freevo" == "yes" ] || [ "x$1" == "xstartx" ] ; then + echo "Starting Freevo" + if egrep -q '^display.*(x11|dga)' /etc/freevo/freevo.conf ; then + /usr/bin/freevo -fs &>/dev/null & + else + /usr/bin/freevo start + fi + fi + +else + if [ "$freevo" == "daemon" ] && [ "x$1" != "xstopx" ]; then + echo "Stopping Freevo daemon" + /usr/bin/freevo daemon stop + elif [ "$freevo" == "yes" ] || [ "x$1" == "xstopx" ] ; then + echo "Stopping Freevo" + /usr/bin/freevo stop + fi + + if [ "$webserver" == "yes" ]; then + echo "Stopping Freevo webserver" + /usr/bin/freevo webserver stop + fi + + if [ "$recordserver" == "yes" ]; then + echo "Stopping Freevo recordserver" + /usr/bin/freevo recordserver stop + fi +fi diff --git a/media-tv/freevo/freevo-1.5.4-r1.ebuild b/media-tv/freevo/freevo-1.5.4-r1.ebuild new file mode 100644 index 000000000000..b8d308a24ed8 --- /dev/null +++ b/media-tv/freevo/freevo-1.5.4-r1.ebuild @@ -0,0 +1,166 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-tv/freevo/freevo-1.5.4-r1.ebuild,v 1.1 2006/10/19 16:48:32 mattepiu Exp $ + +inherit distutils + +IUSE="matrox dvd encode lirc X nls" +DESCRIPTION="Digital video jukebox (PVR, DVR)." +HOMEPAGE="http://www.freevo.org/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" +RESTRICT="nomirror" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +DEPEND=">=dev-python/pygame-1.5.6 + >=dev-python/imaging-1.1.3 + >=dev-python/pyxml-0.8.2 + >=dev-python/twisted-2 + >=dev-python/twisted-web-0.5.0-r1 + >=dev-python/mmpython-0.4.5 + >=media-video/mplayer-0.92 + >=media-libs/freetype-2.1.4 + >=media-libs/libsdl-1.2.5 + >=sys-apps/sed-4 + dvd? ( >=media-video/xine-ui-0.9.22 >=media-video/lsdvd-0.10 ) + encode? ( >=media-sound/cdparanoia-3.9.8 >=media-sound/lame-3.93.1 ) + matrox? ( >=media-video/matroxset-0.3 ) + lirc? ( app-misc/lirc >=dev-python/pylirc-0.0.3 )" + +src_unpack() { + unpack ${A} + cp "${FILESDIR}/freevo.rc6" "${WORKDIR}/" + if use X ; then + sed -e 's/lircd/lircd xdm/g' "${WORKDIR}/freevo.rc6" > "${WORKDIR}/freevo.rc6b" + else + sed -e 's/lircd/lircd local/g' "${WORKDIR}/freevo.rc6" > "${WORKDIR}/freevo.rc6b" + fi +} + +src_install() { + distutils_src_install + + insinto /etc/freevo + doins "${T}/freevo.conf" + newins local_conf.py.example local_conf.py + + if [ "${PROFILE_ARCH}" == "xbox" ]; then + sed -i -e "s/# MPLAYER_AO_DEV.*/MPLAYER_AO_DEV='alsa1x'/" ${D}/etc/freevo/local_conf.py + newins ${FILESDIR}/xbox-lircrc lircrc + fi + + if use X; then + echo "#!/bin/bash" > freevo + echo "/usr/bin/freevoboot startx" >> freevo + exeinto /etc/X11/Sessions/ + doexe freevo + + KDFREEVO=`kde-config --prefix` + if [ "x$KDFREEVO" != "x" ]; then + FREEVOSESSION=`grep ^SessionsDirs= ${KDFREEVO}/share/config/kdm/kdmrc | cut -d= -f 2 | cut -d: -f1` + if [ "x${FREEVOSESSION}" != "x" ]; then + insinto ${FREEVOSESSION} + doins ${FILESDIR}/freevo.desktop freevo.desktop + fi + fi + + insinto /etc/X11/dm/Sessions + doins ${FILESDIR}/freevo.desktop freevo.desktop + fi + + exeinto /usr/bin + newexe "${WORKDIR}/freevo.boot" freevoboot + insinto /etc/conf.d + newins "${FILESDIR}/freevo.conf" freevo + + rm -rf "${D}/usr/share/doc" + newdoc Docs/README README.docs + dodoc BUGS COPYING ChangeLog FAQ INSTALL PKG-INFO README TODO \ + Docs/{CREDITS,NOTES,plugins/*.txt} + cp -r Docs/{installation,plugin_writing} "${D}/usr/share/doc/${PF}" + + use nls || rm -rf ${D}/usr/share/locale +} + +pkg_postinst() { + einfo "If you want to schedule programs, emerge xmltv now." + echo + + einfo "Please check /etc/freevo/freevo.conf and" + einfo "/etc/freevo/local_conf.py before starting Freevo." + einfo "To rebuild freevo.conf with different parameters," + einfo "please run:" + einfo " freevo setup" + echo + + if [ -e "${ROOT}/etc/init.d/freevo" ] ; then + ewarn "Please remove ${ROOT}/etc/init.d/freevo because is no longer used" + ewarn "and runnining freevo as root could be a security risk" + fi + echo + ewarn "Freevo starting for freevo only system is changed, cause" + ewarn "initscript would run it as root and this may cause unsecurity." + ewarn "That is now substituted with freevoboot, a wrapper to be runned" + ewarn "as user. Configuration is still in /etc/conf.d/freevo" + echo + if use X ; then + ewarn "If you're using a Freevo-only system with X, you'll need" + ewarn " to setup the autologin (as user) and choose freevo as" + ewarn "default session. If you need to run recordserver/webserver" + ewarn "at boot, please use /etc/conf.d/freevo as always." + echo + ewarn "Should you decide to personalize your freevo.desktop" + ewarn "session, keep inside /usr/bin/freevoboot startx (wrapper)." + echo + else + ewarn "Freevo initscript is changed and should not be run as root" + echo + ewarn "If you want Freevo to start automatically,you'll need" + ewarn "to follow instructions at :" + ewarn "http://freevo.sourceforge.net/cgi-bin/doc/BootFreevo" + echo + ewarn "*NOTE: you can use mingetty or provide a login" + ewarn "program for getty to autologin as limited privileges user" + ewarn "a tutorial for getty is at:" + ewarn "http://ubuntuforums.org/showthread.php?t=152274" + echo + ewarn "Sorry for the disadvantage, this is done for bug #150568." + echo + fi + + if [ -e "${ROOT}/etc/init.d/freevo" ] ; then + ewarn "Please remove ${ROOT}/etc/init.d/freevo as is a security" + ewarn "threat. To set autostart read above." + fi + + if [ -e "${ROOT}/opt/freevo" ] ; then + ewarn "Please remove ${ROOT}/opt/freevo because it is no longer used." + fi + if [ -e "${ROOT}/etc/freevo/freevo_config.py" ] ; then + ewarn "Please remove ${ROOT}/etc/freevo/freevo_config.py." + fi + if [ -e "${ROOT}/etc/init.d/freevo-record" ] ; then + ewarn "Please remove ${ROOT}/etc/init.d/freevo-record" + fi + if [ -e "${ROOT}/etc/init.d/freevo-web" ] ; then + ewarn "Please remove ${ROOT}/etc/init.d/freevo-web" + fi + + local myconf + if [ "`/bin/ls -l /etc/localtime | grep -e "Europe\|GMT"`" ] ; then + myconf="${myconf} --tv=pal" + fi + if [ "${PROFILE_ARCH}" == "xbox" ]; then + myconf="${myconf} --geometry=640x480 --display=x11" + elif use matrox ; then + myconf="${myconf} --geometry=768x576 --display=mga" + elif use X ; then + myconf="${myconf} --geometry=800x600 --display=x11" + else + myconf="${myconf} --geometry=800x600 --display=fbdev" + fi + + "/usr/bin/freevo" setup ${myconf} || die "configure problem" +} -- cgit v1.2.3-65-gdbad