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

Bug 709924

Summary: =sys-libs/pam-1.3.1_p20200128 fails to install on prefix: die "Aborting due to QA concerns: there are files installed outside the prefix"
Product: Gentoo Linux Reporter: Sergei Trofimovich (RETIRED) <slyfox>
Component: Current packagesAssignee: Mikle Kolyada (RETIRED) <zlogene>
Status: RESOLVED FIXED    
Severity: normal CC: prefix
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=699188
https://bugs.gentoo.org/show_bug.cgi?id=699526
https://bugs.gentoo.org/show_bug.cgi?id=695966
https://bugs.gentoo.org/show_bug.cgi?id=799803
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: sys-libs:pam-1.3.1_p20200128.log
pam.patch
pam.patch
pam.patch

Description Sergei Trofimovich (RETIRED) gentoo-dev 2020-02-17 08:04:14 UTC
Default prefix update pulls in libpam, that fails to install. Package it's relevant uses either have to be masked in profiles or library need a fix for installation paths.

"""
$ emerge -avuDN @world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] sys-libs/pam-1.3.1_p20200128::gentoo  USE="berkdb cracklib filecaps nls pie (split-usr) -audit -debug -nis (-selinux) -static-libs" 0 KiB
[ebuild  N     ] sys-auth/pambase-20191128::gentoo  USE="cracklib nullok sha512 -caps -consolekit -debug -elogind -minimal -mktemp -pam_krb5 -pam_ssh -passwdqc -securetty (-selinux) (-systemd)" 0 KiB
[ebuild     U  ] sys-libs/libcap-2.31::gentoo [2.27::gentoo] USE="pam* (split-usr%*) -static-libs" 0 KiB

Total: 3 packages (1 upgrade, 2 new), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No]

 * QA Notice: the following files are outside of the prefix:
 * /usr
 * /usr/lib64
 * /usr/lib64/libpam_misc.so
 * /usr/lib64/libpamc.la
 * /usr/lib64/libpamc.so
 * /usr/lib64/libpam.la
 * /usr/lib64/libpam_misc.so.0.82.1
 * /usr/lib64/libpam_misc.so.0
 * /usr/lib64/libpamc.so.0.82.1
 * /usr/lib64/libpamc.so.0
 * /usr/lib64/libpam.so.0.84.2
 * /usr/lib64/libpam_misc.la
 * /usr/lib64/libpam.so
 * /usr/lib64/libpam.so.0
 * ERROR: sys-libs/pam-1.3.1_p20200128::gentoo failed:
 *   Aborting due to QA concerns: there are files installed outside the prefix
 *
 * Call stack:
 *   misc-functions.sh, line 586:  Called install_qa_check
 *   misc-functions.sh, line 132:  Called source 'install_symlink_html_docs'
 *            05prefix, line 114:  Called install_qa_check_prefix
 *            05prefix, line  27:  Called die
 * The specific snippet of code:
 *   			die "Aborting due to QA concerns: there are files installed outside the prefix"
"""
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2020-02-17 08:05:38 UTC
Created attachment 614096 [details]
sys-libs:pam-1.3.1_p20200128.log
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2020-02-17 08:07:24 UTC
$ emerge --info
Portage 2.3.89 (python 3.6.10-final-0, default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+, gcc-10.0.1, glibc-2.31-r1, 5.2.17-1rodete3-amd64 x86_64)
=================================================================
System uname: Linux-5.2.17-1rodete3-amd64-x86_64-Intel-R-_Core-TM-_i7-6600U_CPU_@_2.60GHz-with-debian-bullseye-sid
KiB Mem:    16345180 total,   1775328 free
KiB Swap:   16629756 total,  16532732 free
Head commit of repository gentoo: 4202315a5c0a34f3ce0be67ef3216efbae1c6532

Head commit of repository haskell: 0b0d158ce1e52484d1c857b0c64f9326ce9b774f

sh bash 5.0_p16
ld GNU ld (Gentoo 2.34 p1) 2.34.0
ccache version 3.7.7 [enabled]
app-shells/bash:          5.0_p16::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17-r1::gentoo, 3.6.10::gentoo, 3.7.6::gentoo, 3.8.1::gentoo
dev-util/ccache:          3.7.7-r1::gentoo
dev-util/cmake:           3.16.4::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.69-r5::gentoo
sys-devel/automake:       1.16.1-r2::gentoo
sys-devel/binutils:       2.34::gentoo
sys-devel/gcc:            10.0.1_pre9999::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.5::gentoo (virtual/os-headers)
sys-libs/glibc:           2.31-r1::gentoo
Repositories:

gentoo
    location: /home/siarheit/dev/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo/gentoo
    priority: -1000

crossdev
    location: /home/siarheit/co
    masters: gentoo

haskell
    location: /home/siarheit/dev/gentoo-haskell
    sync-type: git
    sync-uri: https://github.com/gentoo-haskell/gentoo-haskell
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /home/siarheit/gentoo/rap/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /home/siarheit/gentoo/rap/etc/env.d /home/siarheit/gentoo/rap/etc/gentoo-release"
CXXFLAGS="-O2 -pipe -O2 -pipe"
DISTDIR="/home/siarheit/dev/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles force-prefix ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/home/siarheit/gentoo/rap/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/home/siarheit/gentoo/rap/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/home/siarheit/gentoo/rap/var/tmp"
USE="X acl alsa amd64 apng berkdb bzip2 cli crypt curl cxx dbus dri fluidsynth fortran gdbm gif gtk iconv ipv6 jpeg libtirpc midi ncurses nls nptl opengl openmp pam pcre png prefix pulseaudio python readline seccomp split-usr sqlite ssl tcpd tiff unicode vorbis zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_USER_TARGETS="hppa arm64" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2020-02-21 08:43:27 UTC
well, honestly I have no idea why suddenly prefix needs pam at all.

Does --prefix="${EPREFIX}"/usr help?
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2020-02-21 13:55:49 UTC
Probably default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+ somehow by accident does not include features/prefix/rpath/use.mask:pam. prefix@ might know the details.

$ EXTRA_ECONF=--prefix="$(portageq envvar EPREFIX)"/usr ebuild ~/dev/gentoo/sys-libs/pam/pam-1.3.1_p20200128.ebuild clean install

does not work:

 * QA Notice: the following files are outside of the prefix:
 * /usr
 * /usr/lib64
 * /usr/lib64/libpam_misc.so
 * /usr/lib64/libpamc.la
 * /usr/lib64/libpamc.so
 * /usr/lib64/libpam.la
 * /usr/lib64/libpam_misc.so.0.82.1
 * /usr/lib64/libpam_misc.so.0
 * /usr/lib64/libpamc.so.0.82.1
 * /usr/lib64/libpamc.so.0
 * /usr/lib64/libpam.so.0.84.2
 * /usr/lib64/libpam_misc.la
 * /usr/lib64/libpam.so
 * /usr/lib64/libpam.so.0
Comment 5 Benda Xu gentoo-dev 2020-02-21 14:39:59 UTC
(In reply to Sergei Trofimovich from comment #4)
> Probably default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+ somehow by
> accident does not include features/prefix/rpath/use.mask:pam. prefix@ might
> know the details.
> 
> $ EXTRA_ECONF=--prefix="$(portageq envvar EPREFIX)"/usr ebuild
> ~/dev/gentoo/sys-libs/pam/pam-1.3.1_p20200128.ebuild clean install
> 
> does not work:
> 
>  * QA Notice: the following files are outside of the prefix:
>  * /usr
>  * /usr/lib64
>  * /usr/lib64/libpam_misc.so
>  * /usr/lib64/libpamc.la
>  * /usr/lib64/libpamc.so
>  * /usr/lib64/libpam.la
>  * /usr/lib64/libpam_misc.so.0.82.1
>  * /usr/lib64/libpam_misc.so.0
>  * /usr/lib64/libpamc.so.0.82.1
>  * /usr/lib64/libpamc.so.0
>  * /usr/lib64/libpam.so.0.84.2
>  * /usr/lib64/libpam_misc.la
>  * /usr/lib64/libpam.so
>  * /usr/lib64/libpam.so.0

pam was unmasked on purpose before.  But now after rethinking, it should be masked in Prefix with its reverse dependencies.
Comment 6 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2020-02-21 18:51:31 UTC
(In reply to Benda Xu from comment #5)
> (In reply to Sergei Trofimovich from comment #4)
> > Probably default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+ somehow by
> > accident does not include features/prefix/rpath/use.mask:pam. prefix@ might
> > know the details.
> > 
> > $ EXTRA_ECONF=--prefix="$(portageq envvar EPREFIX)"/usr ebuild
> > ~/dev/gentoo/sys-libs/pam/pam-1.3.1_p20200128.ebuild clean install
> > 
> > does not work:
> > 
> >  * QA Notice: the following files are outside of the prefix:
> >  * /usr
> >  * /usr/lib64
> >  * /usr/lib64/libpam_misc.so
> >  * /usr/lib64/libpamc.la
> >  * /usr/lib64/libpamc.so
> >  * /usr/lib64/libpam.la
> >  * /usr/lib64/libpam_misc.so.0.82.1
> >  * /usr/lib64/libpam_misc.so.0
> >  * /usr/lib64/libpamc.so.0.82.1
> >  * /usr/lib64/libpamc.so.0
> >  * /usr/lib64/libpam.so.0.84.2
> >  * /usr/lib64/libpam_misc.la
> >  * /usr/lib64/libpam.so
> >  * /usr/lib64/libpam.so.0
> 
> pam was unmasked on purpose before.  But now after rethinking, it should be
> masked in Prefix with its reverse dependencies.

FTR: I talked to haubi about it at fosdem and he also had no clue why pam is availible on prefix platforms:D Would be nice to maske it there, yes.
Comment 7 Benda Xu gentoo-dev 2020-02-22 01:48:44 UTC
(In reply to Benda Xu from comment #5)
> (In reply to Sergei Trofimovich from comment #4)
> > Probably default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+ somehow by
> > accident does not include features/prefix/rpath/use.mask:pam. prefix@ might
> > know the details.
> > 
> > $ EXTRA_ECONF=--prefix="$(portageq envvar EPREFIX)"/usr ebuild
> > ~/dev/gentoo/sys-libs/pam/pam-1.3.1_p20200128.ebuild clean install
> > 
> > does not work:
> > 
> >  * QA Notice: the following files are outside of the prefix:
> >  * /usr
> >  * /usr/lib64
> >  * /usr/lib64/libpam_misc.so
> >  * /usr/lib64/libpamc.la
> >  * /usr/lib64/libpamc.so
> >  * /usr/lib64/libpam.la
> >  * /usr/lib64/libpam_misc.so.0.82.1
> >  * /usr/lib64/libpam_misc.so.0
> >  * /usr/lib64/libpamc.so.0.82.1
> >  * /usr/lib64/libpamc.so.0
> >  * /usr/lib64/libpam.so.0.84.2
> >  * /usr/lib64/libpam_misc.la
> >  * /usr/lib64/libpam.so
> >  * /usr/lib64/libpam.so.0
> 
> pam was unmasked on purpose before.  But now after rethinking, it should be
> masked in Prefix with its reverse dependencies.

I remembered now.  The reverse dependency is way too big to be handled in the profile, for example, sys-libs/pam <- gnome-base/gdm <- gnome-base/gnome draws in too many packages to be masked.

It is easier to just let pam install successfully on Prefix.
Comment 8 Benda Xu gentoo-dev 2020-02-27 08:35:49 UTC
(In reply to Benda Xu from comment #7)

> I remembered now.  The reverse dependency is way too big to be handled in
> the profile, for example, sys-libs/pam <- gnome-base/gdm <- gnome-base/gnome
> draws in too many packages to be masked.
> 
> It is easier to just let pam install successfully on Prefix.

Hi Mikle and Sergei, what do you think?
Comment 9 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2020-02-27 08:45:48 UTC
(In reply to Benda Xu from comment #8)
> (In reply to Benda Xu from comment #7)
> 
> > I remembered now.  The reverse dependency is way too big to be handled in
> > the profile, for example, sys-libs/pam <- gnome-base/gdm <- gnome-base/gnome
> > draws in too many packages to be masked.
> > 
> > It is easier to just let pam install successfully on Prefix.
> 
> Hi Mikle and Sergei, what do you think?

Hello.

As for me I do not currently have any prefix installation around, so I can't test solutions even in theory, that said I am more than happy to accept any help with this, otherwise the bug may take long as I will have to deploy ubuntu prefix myself (not soon, workload high).
Comment 10 Benda Xu gentoo-dev 2020-03-08 03:41:15 UTC
Created attachment 617440 [details, diff]
pam.patch

Hi Mikle, what do you think of this patch?
Comment 11 Benda Xu gentoo-dev 2020-03-08 04:22:30 UTC
Created attachment 617442 [details, diff]
pam.patch

Mention bug 695966, this patch finally fix it.
Comment 12 Benda Xu gentoo-dev 2020-03-08 04:25:43 UTC
Created attachment 617444 [details, diff]
pam.patch

bug 699526 is also fixed by this patch with the --exec-prefix argument.
Comment 13 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2020-03-08 08:40:05 UTC
(In reply to Benda Xu from comment #12)
> Created attachment 617444 [details, diff] [details, diff]
> pam.patch
> 
> bug 699526 is also fixed by this patch with the --exec-prefix argument.

It looks pretty good and without having ugly hacks, I will also test it on non-prefix systems and then commit, Thank you a lot!
Comment 14 Benda Xu gentoo-dev 2020-03-08 09:14:27 UTC
Thank you Mikle.
Comment 15 Larry the Git Cow gentoo-dev 2020-03-12 16:12:26 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(-)