From 92d0e332ec466285d0c9f4c1968b38aca8efd184 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Fri, 1 Feb 2008 20:29:03 +0000 Subject: Apply 4 security fixes. --- MPlayer/build/MPlayer.SlackBuild | 67 +++++++++++++++++++++++++++++++++------- 1 file changed, 55 insertions(+), 12 deletions(-) (limited to 'MPlayer') diff --git a/MPlayer/build/MPlayer.SlackBuild b/MPlayer/build/MPlayer.SlackBuild index 025000a3..07446f69 100755 --- a/MPlayer/build/MPlayer.SlackBuild +++ b/MPlayer/build/MPlayer.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright (c) 2007 Eric Hameleers +# Copyright (c) 2006,2007,2008 Eric Hameleers # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -49,9 +49,11 @@ # install-prefix); update default skin; enable mplayer menu; # add security fix # 1.0rc1-5: 07/jun/2007 by Eric Hameleers -# Add security fix. +# * Add security fix. # 1.0rc2-1: 09/oct/2007 by Eric Hameleers -# New version. +# * New version. +# 1.0rc2-2: 01/feb/2008 by Eric Hameleers +# * Apply 4 security fixes. # # Run 'sh MPlayer.SlackBuild --cleanup' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . @@ -64,7 +66,7 @@ PRGNAM=MPlayer VERSION=${VERSION:-1.0rc2} ARCH=${ARCH:-i486} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} DOCS="AUTHORS Changelog Copyright LICENSE README DOCS/HTML DOCS/tech" @@ -122,6 +124,19 @@ SRCURL[0]="http://www4.mplayerhq.hu/${PRGNAM}/releases/${PRGNAM}-${VERSION}.tar. SOURCE[1]="$SRCDIR/${DEFSKIN}-${SKINVER}.tar.bz2" SRCURL[1]="http://www.mplayerhq.hu/MPlayer/skins/${DEFSKIN}-${SKINVER}.tar.bz2" +# Patches: +SOURCE[2]="$SRCDIR/demux_audio_fix_20080129.diff" +SRCURL[2]="http://www.mplayerhq.hu/MPlayer/patches/demux_audio_fix_20080129.diff" + +SOURCE[3]="$SRCDIR/demux_mov_fix_20080129.diff" +SRCURL[3]="http://www.mplayerhq.hu/MPlayer/patches/demux_mov_fix_20080129.diff" + +SOURCE[4]="$SRCDIR/url_fix_20080120.diff" +SRCURL[4]="http://www.mplayerhq.hu/MPlayer/patches/url_fix_20080120.diff" + +SOURCE[5]="$SRCDIR/stream_cddb_fix_20080120.diff" +SRCURL[5]="http://www.mplayerhq.hu/MPlayer/patches/stream_cddb_fix_20080120.diff" + ## ## --- with a little luck, you won't have to edit below this point --- ## ## @@ -164,9 +179,9 @@ esac # Create working directories: mkdir -p $TMP/tmp-$PRGNAM # location to build the source rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build -mkdir -p $PKG # place for the package to be built -rm -rf $PKG/* # We always erase old package's contents: -mkdir -p $OUTPUT # place for the package to be saved +mkdir -p $PKG # place for the package to be built +rm -rf $PKG/* # erase old package's contents +mkdir -p $OUTPUT # place for the package to be saved # Source file availability: for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do @@ -176,7 +191,7 @@ for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do [ -w "$SRCDIR" ] || SOURCE[$i]="$OUTPUT/$(basename ${SOURCE[$i]})" echo "Source '$(basename ${SOURCE[$i]})' not available yet..." echo "Will download file to $(dirname $SOURCE[$i])" - wget -nv --connect-timeout=30 -O "${SOURCE[$i]}" "${SRCURL[$i]}" || true + wget -nv -T 20 -O "${SOURCE[$i]}" "${SRCURL[$i]}" || true if [ $? -ne 0 -o ! -s "${SOURCE[$i]}" ]; then echo "Downloading '$(basename ${SOURCE[$i]})' failed.. aborting the build." mv -f "${SOURCE[$i]}" "${SOURCE[$i]}".FAIL @@ -202,7 +217,18 @@ echo "++" # Warn about libdvdread requirement: if [ "$REMOVECSS" == "yes" ]; then - echo -e "\n**\n** Removing internal DECSS library.\n** If you want to play encrypted DVD's you need to install libdvdcss separately.\n**\n** If you do not want to remove libdvdcss, then\n** edit this SlackBuild script and change the line:\n** REMOVECSS=${REMOVECSS:-"yes"}\n** to:\n** REMOVECSS="no"\n**\n" + cat <<-"EOT" + ** + ** Removing internal DECSS library. + ** If you want to play encrypted DVD's you need to install libdvdcss separately. + ** + ** If you do not want to remove libdvdcss, then + ** edit this SlackBuild script and change the line: + ** REMOVECSS=${REMOVECSS:-"yes"} + ** to: + ** REMOVECSS="no" + ** + EOT sleep 2 fi @@ -212,6 +238,12 @@ tar -xjvf ${SOURCE[0]} chown -R root:root * chmod -R u+w,go+r-w,a-s * cd ${PRGNAM}-${VERSION} +# Apply patches: +( cd libmpdemux ; patch -p0 < ${SOURCE[2]} ; cd .. + cd libmpdemux ; patch -p0 < ${SOURCE[3]} ; cd .. + cd stream ; patch -p0 < ${SOURCE[4]} ; cd .. + cd stream ; patch -p0 < ${SOURCE[5]} ; cd .. +) 2>&1 | tee $OUTPUT/patch-$PRGNAM.log # Remove potentially illegal dvdcss code (in which case, make sure you have # libdvdread installed before you start the compile!): @@ -362,9 +394,20 @@ if [ "$P1" = "--cleanup" ]; then rm -rf $PKG fi -# Warn about libdvdread requirement (again): +# Warn about libdvdcss requirement (again): if [ "$REMOVECSS" == "yes" ]; then - echo -e "\n**\n** Internal DECSS library was not built.\n** If you want to play encrypted DVD's you need to install libdvdcss separately.\n**\n** If you do not care about patent issues,\n** and want to keep support for internal libdvdcss, then\n** edit this SlackBuild script and change the line:\n** REMOVECSS=${REMOVECSS:-"yes"}\n** to:\n** REMOVECSS="no"\n**\n" - sleep 2 + cat <<-"EOT" + ** + ** Internal DECSS library was not built. + ** If you want to play encrypted DVD's you need to install libdvdcss separately. + ** + ** If you do not care about patent issues, + ** and want to keep support for internal libdvdcss, then + ** edit this SlackBuild script and change the line: + ** REMOVECSS=${REMOVECSS:-"yes"} + ** to: + ** REMOVECSS="no" + ** + EOT fi -- cgit v1.2.3-79-gdb01