Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 550986 - sys-fs/e2fsprogs: util/subst randomly fails during install with: e2fsck.conf.5.new: Permission denied
Summary: sys-fs/e2fsprogs: util/subst randomly fails during install with: e2fsck.conf....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: http://thread.gmane.org/gmane.comp.st...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-02 08:25 UTC by LABBE Corentin
Modified: 2015-09-18 06:46 UTC (History)
0 users

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


Attachments
build.log for sys-fs/e2fsprogs emerge (build.log,75.01 KB, text/plain)
2015-06-02 08:25 UTC, LABBE Corentin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description LABBE Corentin 2015-06-02 08:25:35 UTC
Created attachment 404452 [details]
build.log for sys-fs/e2fsprogs emerge

When emerging sys-fs/e2fsprogs I got
../util/subst -t -f ../util/subst.conf ./e2fsck.8.in e2fsck.8
../util/subst -t -f ../util/subst.conf ./e2fsck.conf.5.in e2fsck.conf.5
e2fsck.conf.5.new: Permission denied
Makefile:494: recipe for target 'e2fsck.conf.5' failed

Portage 2.2.18 (python 2.7.9-final-0, default/linux/arm/13.0/armv7a, gcc-4.8.4, glibc-2.20-r2, 4.1.0-rc6+ armv7l)
=================================================================
System uname: Linux-4.1.0-rc6+-armv7l-with-gentoo-2.2
KiB Mem:     1031052 total,    581096 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Tue, 02 Jun 2015 04:30:02 +0000
sh bash 4.3_p33-r2
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.3_p33-r2::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r1::gentoo, 3.4.1::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.69::gentoo
sys-devel/automake:       1.13.4::gentoo, 1.14.1::gentoo
sys-devel/binutils:       2.24-r3::gentoo
sys-devel/gcc:            4.7.3-r1::gentoo, 4.8.4::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

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

ACCEPT_KEYWORDS="arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv7a-hardfloat-linux-gnueabi"
CFLAGS="-O2 -pipe -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard"
CHOST="armv7a-hardfloat-linux-gnueabi"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/spool/munin-async/.ssh"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe -march=armv7-a"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg"
FFLAGS="-O2 -pipe -march=armv7-a"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="fr_FR.UTF-8"
LC_ALL="fr_FR.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
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/tmp/portage/"
USE="arm armv5te armv6 armv6t2 bzip2 caps cli cracklib crypt cxx dri iconv modules ncurses neon nfsv41 nptl pam pcre readline session ssl tcpd unicode zlib" APACHE2_MODULES="alias auth_basic authn_file authz_host authz_user dir headers include log_config mime status" 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" 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 mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="arm" QEMU_USER_TARGETS="arm" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="exynos fbdev omap omapfb dummy v4l" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 SpanKY gentoo-dev 2015-06-08 15:58:22 UTC
is this really an arm system or are you using qemu ?

please look at the file system permissions on the dir:
  /var/tmp/portage/portage/sys-fs/e2fsprogs-1.42.12/work/e2fsprogs-1.42.12/e2fsck

and make sure there isn't a e2fsck.conf.5.new file in there.
Comment 2 LABBE Corentin 2015-06-09 06:56:21 UTC
It is a real arm device.

ls -l /var/tmp/portage/portage/sys-fs/e2fsprogs-1.42.12/work/e2fsprogs-1.42.12/e2fsck/e2fsck.conf.5.new 
-r--r--r-- 1 portage portage 0 mai   27 14:28 /var/tmp/portage/portage/sys-fs/e2fsprogs-1.42.12/work/e2fsprogs-1.42.12/e2fsck/e2fsck.conf.5.new
Comment 3 starbux 2015-09-11 14:18:38 UTC
I have a similar bug emerging e2fsprogs-1.42.13 on a qemu virtual system.

Here's a bit of the error message, it changes at each try.

e2freefrag.8.new: Permission denied
Makefile:733: recipe for target 'e2freefrag.8' failed
make[2]: *** [e2freefrag.8] Error 1

I'm using ccache and the portage dirs (portage tree, tmp portage) are on an nfs share.

Hope this helps.
Comment 4 SpanKY gentoo-dev 2015-09-15 19:26:46 UTC
LABBE: are you also using nfs ?

the subst tool does:
        fd = open(newfn, O_CREAT|O_TRUNC|O_RDWR, 0444);

the .new file should not already exist (it's not in the tarball nor created) which means it should create it for the first time.  if the file already existed, then you would get a permission denied error, but that shouldn't happen.

perhaps NFS is screwing things up and there's a race/desync between the client & server as to the state of the file.  i imagine if we changed the 0444 to 0644, it'd make things work, but i think the NFS behavior is still wrong (not POSIX compliant).

if you don't use NFS in the temp dir, does it build ?
Comment 5 starbux 2015-09-17 10:17:10 UTC
(In reply to SpanKY from comment #4)
> LABBE: are you also using nfs ?
> 
> the subst tool does:
>         fd = open(newfn, O_CREAT|O_TRUNC|O_RDWR, 0444);
> 
> the .new file should not already exist (it's not in the tarball nor created)
> which means it should create it for the first time.  if the file already
> existed, then you would get a permission denied error, but that shouldn't
> happen.
> 
> perhaps NFS is screwing things up and there's a race/desync between the
> client & server as to the state of the file.  i imagine if we changed the
> 0444 to 0644, it'd make things work, but i think the NFS behavior is still
> wrong (not POSIX compliant).
> 
> if you don't use NFS in the temp dir, does it build ?

Indeed, not using the NFS tmp dir for portage makes it build.
Comment 6 SpanKY gentoo-dev 2015-09-17 18:34:13 UTC
should be fixed by:
http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff98e2caac4f8e53b51b602de9d9be06782622e6

please try it out w/NFS
Comment 7 LABBE Corentin 2015-09-18 06:46:09 UTC
I confirm that it builds now with NFS.
Thanks for the patch.