Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 93363 - econf() should force update of read-only config.{sub,guess} files
Summary: econf() should force update of read-only config.{sub,guess} files
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 87301 93180 (view as bug list)
Depends on:
Blocks: 87301 93180
  Show dependency tree
 
Reported: 2005-05-20 12:48 UTC by Octavio Ruiz (Ta^3)
Modified: 2005-07-29 12:38 UTC (History)
3 users (show)

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


Attachments
ebuild.sh.diff (ebuild.sh.diff,411 bytes, patch)
2005-05-20 12:49 UTC, Octavio Ruiz (Ta^3)
Details | Diff
ebuild-functions.sh--fix_econf.patch (ebuild-functions.sh--rev1.11--fix_econf.patch,432 bytes, patch)
2005-06-28 04:42 UTC, TGL
Details | Diff
ebuild-functions.sh--rev1.11--fix_econf.patch (ebuild-functions.sh--rev1.11--fix_econf.patch,584 bytes, patch)
2005-06-28 05:10 UTC, TGL
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Octavio Ruiz (Ta^3) 2005-05-20 12:48:31 UTC
econf() from <=sys-apps/portage-2.0.51.22-r1 should verify the writability of config.{sub,guess} before copying them.

Could it be fixed in portage-stable?

Note: Fixed on portage-cvs in ebuild-functions.sh since rev 1.7
Comment 1 Octavio Ruiz (Ta^3) 2005-05-20 12:49:08 UTC
Created attachment 59401 [details, diff]
ebuild.sh.diff
Comment 2 Octavio Ruiz (Ta^3) 2005-05-20 12:55:36 UTC
Summary changed, I was thinking in something like if [ -w ${x} ]; then chmod u+w
${x}... Seems to be better to use the `-f` argument from cp, so no
"verification" needed, just replace it.
Comment 3 Masatomo Nakano (RETIRED) gentoo-dev 2005-05-20 19:39:43 UTC
*** Bug 87301 has been marked as a duplicate of this bug. ***
Comment 4 Aaron Walker (RETIRED) gentoo-dev 2005-05-22 04:55:40 UTC
*** Bug 93180 has been marked as a duplicate of this bug. ***
Comment 5 TGL 2005-06-28 04:40:46 UTC
Not exactly the same bug, but really closely related:
When "libtool" is ran by an ebuild without the --copy option, config.sub is
symlinked to the /usr/share/gnuconfig file. Then the "cp -f" fails, and then the
chmod violates sandboxing. Example (with app-text/evince):

 * econf: updating evince-0.3.2/config.sub with /usr/share/gnuconfig/config.sub
cp: `/usr/share/gnuconfig/config.sub' and
`/var/tmp/portage/evince-0.3.2/work/evince-0.3.2/config.sub' are the same file
ACCESS DENIED   chmod:    
/var/tmp/portage/evince-0.3.2/work/evince-0.3.2/config.sub
chmod: changing permissions of
`/var/tmp/portage/evince-0.3.2/work/evince-0.3.2/config.sub': Permission denied

I've not found the magic "cp" option that would allow copying a file over a
symlink on itself, so i suggest adding an "rm -f" before the copy. Patch
follows, in case my explanation is not clear.
Comment 6 TGL 2005-06-28 04:42:14 UTC
Created attachment 62139 [details, diff]
ebuild-functions.sh--fix_econf.patch

Patch is against latest CVS HEAD revision (1.11) of ebuild-functions.sh
Comment 7 TGL 2005-06-28 05:07:43 UTC
Err... not such a smart fix actually... The real bug is the "find" expression
just above which tries to match only real files, but does not because of
operators precedence. Patch follows.
Comment 8 TGL 2005-06-28 05:10:07 UTC
Created attachment 62140 [details, diff]
ebuild-functions.sh--rev1.11--fix_econf.patch
Comment 9 Octavio Ruiz (Ta^3) 2005-06-28 06:32:03 UTC
See Bug #96242
Comment 10 SpanKY gentoo-dev 2005-07-04 01:28:31 UTC
fixed the find expr in cvs
Comment 11 Jason Stubbs (RETIRED) gentoo-dev 2005-07-14 05:47:56 UTC
Fixed on or before 2.0.51.22-r1 
Comment 12 Jason Stubbs (RETIRED) gentoo-dev 2005-07-14 06:58:40 UTC
Looking through the batch of bugs, I'm not sure that some of these are 
actually fixed in stable. Others, the requirements have possibly changed after 
the initial fix was committed. 
 
If you think this bug has been closed incorrectly, please reopen or ask that 
it be reopened.