Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 358167 - net-misc/dhcpcd: configure script prefers PREFIX from environment over command line switch
Summary: net-misc/dhcpcd: configure script prefers PREFIX from environment over comman...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal major (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-10 05:12 UTC by hellohellodon
Modified: 2013-07-08 14:32 UTC (History)
2 users (show)

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 hellohellodon 2011-03-10 05:12:56 UTC
I was calling emerge from su. The variable $PREFIX was defined by the user calling su.

Reproducible: Always

Steps to Reproduce:
1.create a variable called $PREFIX and assign it to a directory path
2.su to gain root priveledges
3.emerge dhcpcd -av
Actual Results:  
Installs the executable dhcpcd into $PREFIX/sbin

Expected Results:  
For executable to be installed in /sbin

I've been trying to see if may be PREFIX is a reserved variable by Gentoo or portage but I'm not finding that anywhere. Also, I emerged other packages while having this $PREFIX variable defined as such and have not had emerge install the binaries or files in my prefix. To fix, I simply renamed the variable and emerge installed into the correct directory.
Comment 1 Fabian Groffen gentoo-dev 2012-08-22 15:22:15 UTC
Prefix uses EPREFIX, not PREFIX.  EPREFIX is blacklisted by Portage, so it cannot bleed in from the environment.
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-08-22 15:57:09 UTC
Assigning to proper maintainer. Removing prefix@g.o
Comment 3 William Hubbs gentoo-dev 2013-06-05 20:20:41 UTC
Roy,

there appears to be an issue with dhcpcd's configure script. If PREFIX
is set in the environment and --prefix= is given on the command line,
the environment setting of PREFIX is used, instead of the --prefix=
setting on the command line.

For example, if I run:

PREFIX=/foo/bar ./configure --prefix=/home/william

the configure script ignores the --prefix=/home/william command line
switch and uses /foo/bar as the value for PREFIX.

Thanks,

William
Comment 4 Roy Marples 2013-06-06 00:35:10 UTC
Should be fixed here:
http://roy.marples.name/cgi-bin/gitweb.cgi?p=dhcpcd.git;a=commitdiff;h=791c63ac688169ed7d0b4145dfefb2ce0c9cc7d4

Can someone test it?
Comment 5 William Hubbs gentoo-dev 2013-06-06 12:58:56 UTC
Roy, I ran the same test I mentioned above, and it works as expected,
the --prefix setting is now preferred.

Should I cherry-pick the patch or are you going to do another release
soon?

William
Comment 6 Roy Marples 2013-06-06 16:34:12 UTC
Cherry pick it as the next release won't be for a week or so.
Comment 7 William Hubbs gentoo-dev 2013-07-08 14:32:51 UTC
This is fixed in dhcpcd-6.0.2.