Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 699526

Summary: sys-libs/pam on prefix - pkg_postinst(): ${EPREFIX}/bin/chown: cannot access '${EPREFIX}/sbin/unix_chkpwd': No such file or directory
Product: Gentoo Linux Reporter: ZongyuZ <zzy2529420793>
Component: Current packagesAssignee: Mikle Kolyada (RETIRED) <zlogene>
Status: RESOLVED FIXED    
Severity: normal CC: prefix
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=709924
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Output of emerge --info '=sys-libs/pam-1.3.0-r2::gentoo'
Output of emerge -pqv '=sys-libs/pam-1.3.0-r2::gentoo'
Error message generated while emerging sys-libs/pam
set EROOT.patch

Description ZongyuZ 2019-11-07 13:32:11 UTC
Created attachment 595212 [details]
Output of emerge --info '=sys-libs/pam-1.3.0-r2::gentoo'

I tried to emerge sys-libs/pam in a fresh-installed Gentoo Prefix.

The profile "default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+" enables USE="pam", so many packages depends on sys-libs/pam.

Finally sys-libs/pam failed during postinst phase, and the related command was "fcaps cap_dac_override sbin/unix_chkpwd".
Comment 1 ZongyuZ 2019-11-07 13:33:00 UTC
Created attachment 595214 [details]
Output of emerge -pqv '=sys-libs/pam-1.3.0-r2::gentoo'
Comment 2 ZongyuZ 2019-11-07 13:34:38 UTC
Created attachment 595216 [details]
Error message generated while emerging sys-libs/pam
Comment 3 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2019-11-08 08:07:42 UTC
Created attachment 595420 [details, diff]
set EROOT.patch

This should be helpful, please test.
Comment 4 ZongyuZ 2019-11-08 11:03:06 UTC
Hello,

  It seems this patch works with =sys-libs/pam-1.3.0-r2, but it does not work with =sys-libs/pam-1.2.1-r2.


  BTW, =sys-libs/pam-1.3.1-r1 fails during compiling, which is not related to this bug. May I open a new bug and report the compile failure of =sys-libs/pam-1.3.1-r1?
Comment 5 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2019-11-08 13:54:24 UTC
(In reply to ZongyuZ from comment #4)
> Hello,
> 
>   It seems this patch works with =sys-libs/pam-1.3.0-r2, but it does not
> work with =sys-libs/pam-1.2.1-r2.
> 
> 
>   BTW, =sys-libs/pam-1.3.1-r1 fails during compiling, which is not related
> to this bug. May I open a new bug and report the compile failure of
> =sys-libs/pam-1.3.1-r1?

This depends on what problem you have, say bug 695966 is still unclear to me. Also I have no idea why pam on prefix may be needed at all, might be only for ssh, but not sure.
Comment 6 ZongyuZ 2019-11-08 14:09:07 UTC
(In reply to Mikle Kolyada from comment #5)

> This depends on what problem you have, say bug 695966 is still unclear to
> me. Also I have no idea why pam on prefix may be needed at all, might be
> only for ssh, but not sure.

I'm not sure either. USE="pam" was enabled and sys-libs/pam would be emerged when some other packages like openrc being emerged.

So it seems this bug is resolved, as sys-libs/pam-1.3.0-r2 is already installed in my system with no error reported. Thank you very much!

Would you merge your patch into gentoo? And am I the person who should mark this bug as resolved? 

Thank you for your help again!
Comment 7 Larry the Git Cow gentoo-dev 2020-03-12 16:12:29 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4fee95b96c9d684c3b992f7e154c9d12e6636ab

commit e4fee95b96c9d684c3b992f7e154c9d12e6636ab
Author:     Mikle Kolyada <zlogene@gentoo.org>
AuthorDate: 2020-03-12 16:07:51 +0000
Commit:     Mikle Kolyada <zlogene@gentoo.org>
CommitDate: 2020-03-12 16:12:16 +0000

    sys-libs/pam: Add prefix support
    
    Closes: https://bugs.gentoo.org/709924
    Closes: https://bugs.gentoo.org/699188
    Closes: https://bugs.gentoo.org/699526
    Bug: https://bugs.gentoo.org/695966
    Thanks-to: Benda Xu <heroxbd@gentoo.org>
    Package-Manager: Portage-2.3.89, Repoman-2.3.20
    Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>

 sys-libs/pam/pam-1.3.1_p20200128.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)