Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 219957 - emerge should warn users when PORTAGE_TMPDIR points a filesystem with noexec or ro attributes
Summary: emerge should warn users when PORTAGE_TMPDIR points a filesystem with noexec ...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 216231
  Show dependency tree
 
Reported: 2008-05-01 18:35 UTC by Martin Mokrejš
Modified: 2008-08-21 18:09 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2008-05-01 18:35:44 UTC
After trying to size down my Gentoo installation I have moved portage tree away from locak CompactFlash IDE drive, 512MB only in size -- into RAM. The /dev/shm seemed like a ready-made place. A lot of packages I could emerge successfully since then but few not. It turned down often configure cannot be executed:


>>> Source unpacked.
>>> Compiling source in /dev/shm/var/tmp/portage/portage/app-shells/bash-3.2_p17-r1/work/bash-3.2 ...
 * 
 * ERROR: app-shells/bash-3.2_p17-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2414:  Called econf 'src_compile' 'src_compile' '--without-afs' '--disable-profiling' '--without-gnu-malloc' '--without-installed-readline'
 *               ebuild.sh, line  516:  Called die
 * The specific snippet of code:
 *              die "configure is not executable"
 *  The die message:
 *   configure is not executable




# cd /dev/shm/var/tmp/portage/portage/app-shells/bash-3.2_p17-r1/work/bash-3.2
# ./configure
-bash: ./configure: /bin/sh: bad interpreter: Permission denied
# 

It seems quite a common problem: http://bugs.gentoo.org/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&long_desc_type=substring&long_desc=%2Fbin%2Fsh%3A+bad+interpreter%3A+Permission+denied&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=

People either have a read-only media or filesystem mounted with at least one of 'noexec' or 'ro'.

Could emerge on its execution check that PORTAGE_TMPDIR is located on a filesystem mounted in a proper way? It is just about parsing /etc/mtab. Preferably, it should first try to expand the path in case it would be a softlink to another filesystem.

Anyway, I believe the message 'configure is not executable' could me accommodated with better explanation and a hint to see bug #188328 and #144703 and at least in this moment it could parse /etc/mtab and see what are the mount options. 

# emerge --version
Portage 2.1.4.4 (default/linux/amd64/2008.0/no-multilib, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24.5-default x86_64)
#
Comment 1 Marius Mauch (RETIRED) gentoo-dev 2008-05-02 02:56:35 UTC
Well, parsing mtab isn't really a good idea IMO, but fortunately there is os.access() to use for such tests.
Comment 2 Zac Medico gentoo-dev 2008-05-06 08:41:45 UTC
This is fixed in 2.1.5_rc7.
Comment 3 Ofer Wald 2008-08-21 18:09:12 UTC
There is a small typo in the explanation:

Please make sure that portage can execute files in this direxctory.

should be:
Please make sure that portage can execute files in this directory.

This is in current 2.1.5.6