Many files in the mtools-*.tar.bz2 have the S (setuid) bit set and for some reason this makes them unreadable when they are on an NFS volume. Two such files are Makefile.in and msdos.h. Reproducible: Always Steps to Reproduce: 1. Set up so that $PORTAGE_TMPDIR is on an NFSv3 volume. 2. Emerge mtools. Actual Results: Build fails with files unable to be read. Expected Results: Build should succeed. The problem is caused by a fault in NFS (I think); nevertheless, the fault is only present in mtools and is easily cured, as set-out in the 'Description' above.
1) Please post your `emerge --info sys-fs/mtools' output in a comment. 2) Please attach the entire build log to this bug report. [ 3) NFS mounted PORTAGE_TMPDIR problems are quite common. ]
emerge --info sys-fs/mtools: Portage 2.1.10.27 (default/linux/x86/10.0/desktop, gcc-4.5.3, glibc-2.13-r4, 3.0.6-gentoo i686) ================================================================= System Settings ================================================================= System uname: Linux-3.0.6-gentoo-i686-Intel-R-_Atom-TM-_CPU_N280_@_1.66GHz-with-gentoo-2.1 Timestamp of tree: Mon, 17 Oct 2011 19:45:01 +0000 ccache version 3.1.6 [enabled] app-shells/bash: 4.2_p10 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.2-r3, 3.2.2 dev-util/ccache: 3.1.6 dev-util/cmake: 2.8.5-r2 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.1 sys-apps/openrc: 0.9.3-r1 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.10.3, 1.11.1-r1 sys-devel/binutils: 2.21.1-r1 sys-devel/gcc: 4.5.3-r1 sys-devel/gcc-config: 1.4.1-r1 sys-devel/libtool: 2.4-r3 sys-devel/make: 3.82-r3 sys-kernel/linux-headers: 2.6.39 (virtual/os-headers) sys-libs/glibc: 2.13-r4 Repositories: gentoo ACCEPT_KEYWORDS="x86 ~x86" ACCEPT_LICENSE="* -@EULA" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -msse -msse2 -msse3 -mfpmath=sse -mtune=native -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /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="-O2 -msse -msse2 -msse3 -mfpmath=sse -mtune=native -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs ccache distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://ftp.swin.edu.au/gentoo http://mirror.pacific.net.au/linux/Gentoo ftp://ftp.swin.edu.au/gentoo ftp://mirror.pacific.net.au/linux/Gentoo " LANG="en_GB.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en en_GB" MAKEOPTS="-j4 -s" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.au.gentoo.org/gentoo-portage" USE="3dnow X a52 aac acl acpi alsa autoipd avahi berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus disk-partition doc dri dts dvd dvdr emboss encode exif extras fam firefox flac fontconfig fortran gdbm gdu gif glibc-omitfp gpm gtk iconv imap jadetex java jpeg kpathsea lcms ldap libnotify lzma lzo mad mmap mmx mmxext mng modules mp3 mp4 mpeg msn mudflap ncurses networkmanager nls nntp npp nptl nptlonly odbc ogg opengl openmp oscar oss pam pango pcre pdf png policykit ppds pppd qt3support qt4 quicktime readline rss ruby sdl session slang spell sql ssl startup-notification svg sysfs tcpd threads tiff truetype udev unicode usb v4l2 vcd vim-syntax vnc vorbis webkit wifi win32codecs wmf x264 x86 xattr xcb xcomposite xine xml xorg xpm xulrunner xv xvid yahoo zlib" ALSA_CARDS="intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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 ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel fbdev vga" 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" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS ================================================================= Package Settings ================================================================= sys-fs/mtools-4.0.17 was built with the following: USE="X"
CANCEL THIS COMMENT. IT IS INCORRECT. CORRECT OUTPUT POSTED BELOW.
Portage 2.1.10.27 (default/linux/x86/10.0/desktop, gcc-4.5.3, glibc-2.13-r4, 3.0.6-gentoo i686) ================================================================= System Settings ================================================================= System uname: Linux-3.0.6-gentoo-i686-Intel-R-_Atom-TM-_CPU_N280_@_1.66GHz-with-gentoo-2.1 Timestamp of tree: Sat, 15 Oct 2011 02:45:01 +0000 ccache version 3.1.6 [enabled] app-shells/bash: 4.2_p10 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.2-r3, 3.1.4-r3, 3.2.2 dev-util/ccache: 3.1.6 dev-util/cmake: 2.8.5-r2 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.1 sys-apps/openrc: 0.9.3-r1 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.10.3, 1.11.1-r1 sys-devel/binutils: 2.21.1-r1 sys-devel/gcc: 4.5.3-r1 sys-devel/gcc-config: 1.4.1-r1 sys-devel/libtool: 2.4-r3 sys-devel/make: 3.82-r3 sys-kernel/linux-headers: 2.6.39 (virtual/os-headers) sys-libs/glibc: 2.13-r4 Repositories: gentoo ACCEPT_KEYWORDS="x86 ~x86" ACCEPT_LICENSE="* -@EULA" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -msse -msse2 -msse3 -mfpmath=sse -mtune=native -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /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="-O2 -msse -msse2 -msse3 -mfpmath=sse -mtune=native -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs ccache distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://ftp.swin.edu.au/gentoo http://mirror.pacific.net.au/linux/Gentoo ftp://ftp.swin.edu.au/gentoo ftp://mirror.pacific.net.au/linux/Gentoo " LANG="en_GB.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en en_GB" MAKEOPTS="-j4 -s" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.au.gentoo.org/gentoo-portage" USE="3dnow X a52 aac acl acpi alsa autoipd avahi berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus disk-partition doc dri dts dvd dvdr emboss encode exif extras fam firefox flac fontconfig fortran gdbm gdu gif glibc-omitfp gpm gtk iconv imap jadetex java jpeg kpathsea lcms ldap libnotify lzma lzo mad mmap mmx mmxext mng modules mp3 mp4 mpeg msn mudflap ncurses networkmanager nls nntp npp nptl nptlonly odbc ogg opengl openmp oscar oss pam pango pcre pdf png policykit ppds pppd qt3support qt4 quicktime readline rss ruby sdl session slang spell sql ssl startup-notification svg sysfs tcpd threads tiff truetype udev unicode usb v4l2 vcd vim-syntax vnc vorbis webkit wifi win32codecs wmf x264 x86 xattr xcb xcomposite xine xml xorg xpm xulrunner xv xvid yahoo zlib" ALSA_CARDS="intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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 ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel fbdev vga" 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" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
build.log: * Package: sys-fs/mtools-4.0.17 * Repository: gentoo * Maintainer: base-system@gentoo.org * USE: X elibc_glibc kernel_linux userland_GNU x86 * FEATURES: ccache sandbox checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether i686-pc-linux-gnu-gcc accepts -g... yes checking for i686-pc-linux-gnu-gcc option to accept ISO C89... none needed checking how to run the C preprocessor... i686-pc-linux-gnu-gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking whether i686-pc-linux-gnu-gcc needs -traditional... no checking for a BSD-compatible install... /usr/bin/install -c checking whether ln -s works... yes checking for install-info... /usr/bin/install-info checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for an ANSI C-conforming const... yes checking for inline... inline checking for getpwnam in -lsun... no checking for cam_open_device in -lcam... no checking for ANSI C header files... (cached) yes checking for sys/wait.h that is POSIX.1 compatible... yes checking getopt.h usability... yes checking getopt.h presence... yes checking for getopt.h... yes checking for sys/stat.h... (cached) yes checking for stdlib.h... (cached) yes checking for unistd.h... (cached) yes checking linux/unistd.h usability... yes checking linux/unistd.h presence... yes checking for linux/unistd.h... yes checking libc.h usability... no checking libc.h presence... no checking for libc.h... no checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/ioctl.h usability... yes checking sys/ioctl.h presence... yes checking for sys/ioctl.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking for strings.h... (cached) yes checking for string.h... (cached) yes checking sys/param.h usability... yes checking sys/param.h presence... yes checking for sys/param.h... yes checking for memory.h... (cached) yes checking malloc.h usability... yes checking malloc.h presence... yes checking for malloc.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking utime.h usability... yes checking utime.h presence... yes checking for utime.h... yes checking sgtty.h usability... yes checking sgtty.h presence... yes checking for sgtty.h... yes checking sys/floppy.h usability... no checking sys/floppy.h presence... no checking for sys/floppy.h... no checking mntent.h usability... yes checking mntent.h presence... yes checking for mntent.h... yes checking sys/sysmacros.h usability... yes checking sys/sysmacros.h presence... yes checking for sys/sysmacros.h... yes checking netinet/in.h usability... yes checking netinet/in.h presence... yes checking for netinet/in.h... yes checking assert.h usability... yes checking assert.h presence... yes checking for assert.h... yes checking iconv.h usability... yes checking iconv.h presence... yes checking for iconv.h... yes checking wctype.h usability... yes checking wctype.h presence... yes checking for wctype.h... yes checking wchar.h usability... yes checking wchar.h presence... yes checking for wchar.h... yes checking locale.h usability... yes checking locale.h presence... yes checking for locale.h... yes checking linux/fs.h usability... yes checking linux/fs.h presence... yes checking for linux/fs.h... yes checking termio.h usability... yes checking termio.h presence... yes checking for termio.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking whether llseek declared in unistd.h... no checking whether lseek64 declared in unistd.h... yes checking for htons... yes checking for an ANSI C-conforming const... (cached) yes checking for inline... (cached) inline checking for size_t... yes checking whether time.h and sys/time.h may both be included... yes checking whether struct tm is in sys/time.h or time.h... time.h checking return type of signal handlers... void checking for strerror... yes checking for random... yes checking for srandom... yes checking for strchr... yes checking for strrchr... yes checking for lockf... yes checking for flock... yes checking for strcasecmp... yes checking for strncasecmp... yes checking for strnlen... yes checking for atexit... yes checking for on_exit... yes checking for getpass... yes checking for memmove... yes checking for strdup... yes checking for strcspn... yes checking for strspn... yes checking for strtoul... yes checking for strtol... yes checking for memcpy... yes checking for strpbrk... yes checking for memset... yes checking for setenv... yes checking for seteuid... yes checking for setresuid... yes checking for setpgrp... yes checking for tcsetattr... yes checking for tcflush... yes checking for basename... yes checking for fchdir... yes checking for media_oldaliases... no checking for llseek... yes checking for lseek64... yes checking for snprintf... yes checking for stat64... yes checking for setlocale... yes checking for wcsdup... yes checking for wcscasecmp... yes checking for wcsnlen... yes checking for putwc... yes checking for getuserid... no checking for getgroupid... no checking whether setpgrp takes no argument... yes checking for 64-bit off_t... no checking whether i686-pc-linux-gnu-gcc supports loff_t type... yes checking whether i686-pc-linux-gnu-gcc supports offset_t type... no checking whether i686-pc-linux-gnu-gcc supports long long type... yes checking for utimes... yes checking for tzset... yes checking for gettimeofday... yes checking declaration of sys_errlist... yes checking for X... libraries , headers checking for gethostbyname... yes checking for connect... yes checking for remove... yes checking for shmat... yes checking for IceConnectionNumber in -lICE... yes checking for main in -lsocket... no checking for main in -lbsd... no checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking arpa/inet.h usability... yes checking arpa/inet.h presence... yes checking for arpa/inet.h... yes checking netdb.h usability... yes checking netdb.h presence... yes checking for netdb.h... yes configure: creating ./config.status config.status: creating Makefile sed: can't read Makefile.in: Permission denied sed: can't read Makefile.in: Permission denied config.status: creating config.h make: Warning: File `Makefile' has modification time 166 s in the future make: *** No targets. Stop. * ERROR: sys-fs/mtools-4.0.17 failed (compile phase): * emake failed * * If you need support, post the output of 'emerge --info =sys-fs/mtools-4.0.17', * the complete build log and the output of 'emerge -pqv =sys-fs/mtools-4.0.17'. * The complete build log is located at '/var/tmp/portage/sys-fs/mtools-4.0.17/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-fs/mtools-4.0.17/temp/environment'. * S: '/var/tmp/portage/sys-fs/mtools-4.0.17/work/mtools-4.0.17'
sed: can't read Makefile.in: Permission denied sed: can't read Makefile.in: Permission denied make: Warning: File `Makefile' has modification time 166 s in the future I guess you need to fix your NFS shares/mounts (and synchronise the systems' clocks) or simply not use it as PORTAGE_TMPDIR. There's nothing mtools is doing wrong here.
Many files in the mtools-*.tar.bz2 have the S (setuid) bit set and for some reason this makes them unreadable when they are on an NFS volume. Two such files are Makefile.in and msdos.h.
<<shrug>> It's your software, I can't make you fix it. You completely ignore my original problem description. How can a Makefile.in or a .h be setuid ? What's that supposed to mean ? And why ask for all that information if you're just going to reply "NFS problem" anyway ?
Any file can be setuid. Does it make sense on a non-executable file? No. # touch foo ; chmod u+s foo There, foo is setuid. We should maybe pass --no-same-permissions to tar to avoid restoring the setuid bit.
the files are not setuid, they're setgid. and setgid does make sense on files when they're not +x. however, they're probably spurious in the mtools tarball. --no-same-permissions implies sane umask, but that shouldn't be an issue when running under portage. but this would be something for portage to handle, not special case in mtools.
If we change unpack behavior then it has to go through PMS.
(In reply to comment #11) > If we change unpack behavior then it has to go through PMS. I'd rather not change general unpack behaviour because of a single package that has problems. If the mtools tarball contains spurious files with the setgid bit set, then this should be fixed. So please report it upstream. (In reply to comment #0) > Many files in the mtools-*.tar.bz2 have the S (setuid) bit set and for some > reason this makes them unreadable when they are on an NFS volume. I cannot reproduce this problem. On what sort of system is your NFS server running?
> I'd rather not change general unpack behaviour because of a single package that > has problems. If the mtools tarball contains spurious files with the setgid bit > set, then this should be fixed. So please report it upstream. OK, there appears not to be a formal bug database as such but I've emailed the maintainer given on the mtools web page. > > Many files in the mtools-*.tar.bz2 have the S (setuid) bit set and for some > > reason this makes them unreadable when they are on an NFS volume. > I cannot reproduce this problem. On what sort of system is your NFS server > running? As I said, I do believe there is something subtly wrong with my NFS setup and there are unresolved queries on the Gentoo fora about it. I'm using a Gentoo client with nfsvers=3 and a Solaris 10 server.
(In reply to comment #13) > OK, there appears not to be a formal bug database as such but I've emailed > the maintainer given on the mtools web page. Thanks. > As I said, I do believe there is something subtly wrong with my NFS setup and > there are unresolved queries on the Gentoo fora about it. I'm using a Gentoo > client with nfsvers=3 and a Solaris 10 server. Hm, looks like it's a known problem: <http://mail.opensolaris.org/pipermail/nfs-discuss/2006-October/000360.html>
The maintainer has emailed me to say that this will be fixed in the next release.