Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 890240 - pam.eclass: cleanpamd using full path
Summary: pam.eclass: cleanpamd using full path
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2023-01-08 15:59 UTC by Jan Kobler
Modified: 2023-02-09 07:09 UTC (History)
3 users (show)

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


Attachments
patch for pam.eclass (0001-pam.eclass-cleanpamd-use-basename.patch,872 bytes, patch)
2023-01-08 15:59 UTC, Jan Kobler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kobler 2023-01-08 15:59:11 UTC
Created attachment 847972 [details, diff]
patch for pam.eclass

In file eclass/pam.eclass
in function cleanpamd

the file name "${D}/etc/pam.d/$1" is computed.

When the function cleanpamd is called in dopamd with a list of full path names,
then only the basename of each path name should be used instead:

"${D}/etc/pam.d/$(basename $1)"
Comment 1 Anon Emuss 2023-02-09 07:09:34 UTC
Just adding that I encountered this too, while bootstrapping a new system.  A really short way to reproduce it:
  ROOT=/path/to/empty/dir emerge -a1 --nodeps system
Originally encountered while running:
  ROOT=/path/to/empty/dir emerge -au1 --nodeps baselayout @system
In my case, there are fairly easy workarounds.  On older versions of portage I used the --nodeps to avoid circular dependencies, but that no longer seems to be necessary.  Removing it pulls in sys-libs/pam (since I have USE=pam set), and if pam installs first, that triggers the else clause seen in the patch and bypasses the troublesome line.  However, this might cause problems for somebody installing a system with USE=-pam.