ports/132407: [patch] multimedia/ffmpeg: respect TMPDIR passed from make.conf

Eygene Ryabinkin rea-fbsd at codelabs.ru
Sun Mar 8 05:40:03 PDT 2009

>Number:         132407
>Category:       ports
>Synopsis:       [patch] multimedia/ffmpeg: respect TMPDIR passed from make.conf
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 08 12:40:02 UTC 2009
>Originator:     Eygene Ryabinkin
>Release:        FreeBSD 7.1-STABLE amd64
Code Labs

System: FreeBSD 7.1-STABLE amd64


Currently multimedia/ffmpeg's configure script wants contents of /tmp
(or $TMPDIR) to be allowed to be executable, so /tmp + noexec breaks
the port.  Manual correction of this is well-known: 'TMPDIR=/var/tmp
make install clean' works perfectly.  But for automated upgrades, for
example, via 'portupgrade -a' it is better if we will be able to pass
TMPDIR from make.conf.  But this isn't possible with the current port
Makefile contents, they should be modified to include TMPDIR to the
build tools environment.


Mount /tmp with option 'noexec' and try to build the port.  It will
fail on the configure stage.


The following patch teaches Makefile to include TMPDIR to the build
tools environment.  I had tested it on my installation and it works
perfectly for me.

--- pass-TMPDIR.diff begins here ---
>From 706d969f0f516968733038d790143c35d378a2a0 Mon Sep 17 00:00:00 2001
From: Eygene Ryabinkin <rea-fbsd at codelabs.ru>
Date: Sun, 8 Mar 2009 15:15:01 +0300

ffmpeg wants to put executables to the $TMPDIR or /tmp (the latter is
the default).  If I run /tmp with noexec, then configure whines and
refuses to work, so port build fails.  Doing 'TMPDIR=/var/tmp make
install clean' is fine, but I want to update ports via 'portupgrade -a',
so the most appropriate place to put TMPDIR is /etc/make.conf.
Unfortunately, this doesn't work as-is: some support from the port
itself is needed and it was added in this commit.

Signed-off-by: Eygene Ryabinkin <rea-fbsd at codelabs.ru>
 multimedia/ffmpeg/Makefile |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile
index 75a5f06..96988f9 100644
--- a/multimedia/ffmpeg/Makefile
+++ b/multimedia/ffmpeg/Makefile
@@ -228,6 +228,12 @@ CONFIGURE_ARGS+=	--enable-libxvid
 CONFIGURE_ARGS+=	--disable-libxvid
+## Pass TMPDIR down to the configure and make.
+.endif # TMPDIR
 .if defined(WITHOUT_OGG) && (!defined(WITHOUT_VORBIS) || !defined(WITHOUT_THEORA))
 	@${ECHO_MSG}	WITH_VORBIS or WITH_THEORA defined, libogg will be built
--- pass-TMPDIR.diff ends here ---

More information about the freebsd-multimedia mailing list