Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 203929 - sys-libs/pam does not respect ROOT
Summary: sys-libs/pam does not respect ROOT
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PAM Gentoo Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-31 22:43 UTC by Adrian Freihofer
Modified: 2008-01-01 09:22 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 Adrian Freihofer 2007-12-31 22:43:10 UTC
sys-libs/pam-0.99.9.0 cannot be cross compiled under certain conditions.

The problem are the following lines in the ebuild:
-  if sed -e 's:#.*::' /etc/pam.d/* | fgrep -q pam_stack.so; then
-  if sed -e 's:#.*::' /etc/pam.d/* | egrep -q 'pam_(pwdb|radius|timestamp|console)'; then
-  if sed -e 's:#.*::' /etc/pam.d/* | fgrep -q ${module}.so; then

Because of the absolute path to /etc/pam.d the ebuild will check the files from the host and not the files from the target. If something is not properly set up on the host, cross emerge will fail wrongly.
An interesting but for me unimportant question is: how could I get pam-0.99.9.0 on my host?

My workaround is to replace /etc with ${SYSROOT}/etc in the ebuild. (SYSROOT points to the target filesystem and must be set)


There is an other little problem in this ebuild: The dependency on flex isn't listed. But pam needs libfl provided by the flex package. Because flex is part of the system profile, this unpleasant problem normaly never happens. 

Reproducible: Always

Steps to Reproduce:
1. Setup an old /etc/pam.d
2. setup corss environment
3. cross compile pam
Comment 1 SpanKY gentoo-dev 2007-12-31 23:39:53 UTC
has nothing to do with devrel

SYSROOT is not a valid variable ... it should be checking ROOT ... not a cross-compiling issue, just related
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-01-01 02:32:28 UTC
Thanks for reporting, I've fixed the two issues in 0.99.9.0.
Comment 3 Adrian Freihofer 2008-01-01 09:22:11 UTC
(In reply to comment #2)
> Thanks for reporting, I've fixed the two issues in 0.99.9.0.
> 

Yes, should be ROOT, not SYSROOT.
Thanks a lot for this fix.