Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 542542 - media-video/ffmpeg-2.5.4: emerge: configure requires executable TMPDIR
Summary: media-video/ffmpeg-2.5.4: emerge: configure requires executable TMPDIR
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-08 11:45 UTC by Klaus Kusche
Modified: 2015-03-10 07:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
failed ffmpeg emerge config.log (config.log,158.76 KB, text/plain)
2015-03-09 18:55 UTC, Klaus Kusche
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Kusche 2015-03-08 11:45:36 UTC
emerging ffmpeg fails in configure:
"/var/portage/portage/media-video/ffmpeg-2.5.4/work/ffmpeg-2.5.4/configure ...

Unable to create and execute files in /tmp.  Set the TMPDIR environment
variable to another directory and make sure that it is not mounted noexec.
Sanity test failed."

After setting TMPDIR to some exec-able dir, ffmpeg emerges fine.

/tmp and TMPDIR are indeed noexec, and for good reasons:
Any unix/linux security guideline requires TMPDIR and world-write dir's
to be noexec. 
Whoever assumes TMPDIR should be exec-able is wrong.

If ffmpeg needs an exec-able TMPDIR only during build,
please set TMPDIR to something within /var/portage in the ebuild.

If ffmpeg needs an exec-able TMPDIR when being run,
it is broken and needs to be fixed.
Comment 1 Andrew Savchenko gentoo-dev 2015-03-09 18:44:45 UTC
Not all security guides are good guides. With noexec on /tmp you will broke a lot of software. If you are interested in a tight security, there are more powerful ways to do so (start with Gentoo Hardened).

Anyway, please provide config.log and emerge --info.
Comment 2 Klaus Kusche 2015-03-09 18:54:15 UTC
I've set /tmp as well as all ~/.tmp to noexec for *many* years, 
and it's the first time this causes trouble.
And I use a hardened kernel with most PaX features enabled 
since I started to use gentoo.

emerge --info:
Portage 2.2.18 (python 2.7.9-final-0, default/linux/amd64/13.0/no-multilib, gcc-4.9.2, glibc-2.20-r2, 3.18.8-hardened x86_64)
=================================================================
System uname: Linux-3.18.8-hardened-x86_64-Intel-R-_Core-TM-_i7-3940XM_CPU_@_3.00GHz-with-gentoo-2.2
KiB Mem:    32907044 total,  31305488 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 08 Mar 2015 07:45:01 +0000
sh bash 4.3_p33-r2
ld GNU ld (Gentoo 2.25 p1.0) 2.25
app-shells/bash:          4.3_p33-r2::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r2::gentoo, 3.4.3::gentoo
dev-util/cmake:           3.1.0::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.13.11::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25::gentoo
sys-devel/gcc:            4.9.2::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage
    priority: -1000

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 AdobeFlash-11.x Oracle-BCLA-JavaSE google-chrome googleearth Vivaldi"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mtune=native -flto -fuse-linker-plugin -O3 -fomit-frame-pointer -fweb -ftracer -fivopts -frename-registers -maccumulate-outgoing-args -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -mtune=native -flto -fuse-linker-plugin -O3 -fomit-frame-pointer -fweb -ftracer -fivopts -frename-registers -maccumulate-outgoing-args -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n --with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles keeptemp keepwork merge-sync news noclean parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://de-mirror.org/distro/gentoo http://gentoo.inode.at http://ftp.halifax.rwth-aachen.de/gentoo/ http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_DE.iso885915"
LC_ALL="en_DE.iso885915"
LDFLAGS="-march=native -mtune=native -flto -fuse-linker-plugin -O3 -fomit-frame-pointer -fweb -ftracer -fivopts -frename-registers -maccumulate-outgoing-args -pipe"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/portage"
USE="64bit X a52 aac adobe-cff alsa amd64 apng applet archive ass avx bzip2 cairo cdda cdparanoia clang cli contrast cups curl cxx dbus dconf demosaic detex devfs-compat dga divx dns dot dri dri3 dts dvd dvdnav dvdr dvi dvipdfm egl encode epspdf exif expat extra faad ffmpeg fftw flac fontconfig foomaticdb fts3 g3dvl gallium gbm gdk-pixbuf gif gimp glamor gles gles1 gles2 glib glibc-omitfp gmp graphics gs gstreamer gtk gtk2 gudev hpn htmlreport http hwdb iconv icu imagemagick inotify introspection jbig jit jpeg jpeg2k kpathsea lasi latex latex3 lcdfilter lcms lensfun libkms libnotify libopts libsamplerate libwww lightning llvm llvm-gcc llvm-shared-libs lz4 lzma lzo mad metric midi minizip mmap mms mmx mmxext mng modern-top modules mp3 mpeg mpfr mta mudflap multicall natspec ncat ncurses ndiff nping nptl nscd nsplugin offensive ogg oldnet opencl opengl openmax openmp openvg opus orc pam pango pax_kernel pcre pdf pic plugins png policykit postproc postscript ppds pstricks pth ptpax quicktime r600-llvm-compiler rar raw readline realmedia right_timezone rle rpc rtc rule_generator sanitize scanner schroedinger scope secure-delete session smp sndfile sound sqlite sqlite3 sse sse2 sse3 sse4 sse4_1 sse4_2 ssh ssl ssse3 svg symlink sync-plugin-portage system-cairo system-icu system-jpeg system-libvpx system-sqlite systemd t1lib texi2html theora threads thunar tiff tools tremor truetype udev udisks unicode unlock-notify unwind usb utils vaapi vdpau vim-with-x vorbis vpx webkit2 webp wmf wmp x264 xa xcb xcomposite xetex xkb xlib-xcb xmp xorg xpm xrandr xulrunner xv xvid xvmc zenmap zip zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer pdfimport" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" SANE_BACKENDS="epson" USERLAND="GNU" VIDEO_CARDS="radeon radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Klaus Kusche 2015-03-09 18:55:25 UTC
Created attachment 398542 [details]
failed ffmpeg emerge config.log
Comment 4 Alexis Ballier gentoo-dev 2015-03-10 07:42:57 UTC
well, ffmpeg has been needing an executable tmpdir for as much as i can remember, if you wish to improve "security" by making it not necessary, please go and submit patches upstream, there's much gentoo can do here :/