Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 692698 - sys-apps/portage: sys-libs/pam-1.3.0-r2 to 1.3.1-r1 upgrade triggers preserve-libs for libpam_misc.so.0.82.1
Summary: sys-apps/portage: sys-libs/pam-1.3.0-r2 to 1.3.1-r1 upgrade triggers preserve...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: preserve-libs 691278
  Show dependency tree
 
Reported: 2019-08-21 19:21 UTC by Zac Medico
Modified: 2019-11-02 00:35 UTC (History)
4 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 Zac Medico gentoo-dev 2019-08-21 19:21:34 UTC
It looks like maybe this is triggered because sys-libs/pam-1.3.1-r1 does not install the /lib64/libpam_misc.so -> libpam_misc.so.0 symlink that was installed by sys-libs/pam-1.3.0-r2:

> >>> /lib64/libpam.so.0.84.2
> >>> /lib64/libpamc.so.0.82.1
> >>> /lib64/libpam_misc.so.0.82.1
> >>> /lib64/libpamc.so.0 -> libpamc.so.0.82.1
> >>> /lib64/libpam_misc.so.0 -> libpam_misc.so.0.82.1
> >>> /lib64/libpam.so.0 -> libpam.so.0.84.2
> ...
> --- /usr/lib64/
> >>> /usr/lib64/libpamc.so
> >>> /usr/lib64/libpam_misc.so
> >>> /usr/lib64/libpam.so
> >>> needed    obj /lib64/libpam_misc.so.0.82.1
> >>> Safely unmerging already-installed instance...
> ...
> !!! existing preserved libs:
> >>> package: sys-libs/pam-1.3.1-r1 *  - /lib64/libpam_misc.so.0.82.1 *      used by /bin/login (sys-apps/shadow-4.6)
Comment 1 Arfrever Frehtes Taifersar Arahesis 2019-08-21 19:27:21 UTC
/lib64/libpam.so, /lib64/libpam_misc.so and /lib64/libpamc.so symlinks were not necessary for anything and were causing internal collisions (bug #690322) so they have been dropped.
Comment 2 Mikle Kolyada archtester Gentoo Infrastructure gentoo-dev Security 2019-08-22 22:00:28 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #1)
> /lib64/libpam.so, /lib64/libpam_misc.so and /lib64/libpamc.so symlinks were
> not necessary for anything and were causing internal collisions (bug
> #690322) so they have been dropped.

^^ so this is expected.
Comment 3 Mikle Kolyada archtester Gentoo Infrastructure gentoo-dev Security 2019-08-22 22:01:23 UTC
P.S. but newer pam will become stable soonish, so this problem is temporary in any way
Comment 4 Zac Medico gentoo-dev 2019-08-22 22:37:05 UTC
(In reply to Mikle Kolyada from comment #2)
> (In reply to Arfrever Frehtes Taifersar Arahesis from comment #1)
> > /lib64/libpam.so, /lib64/libpam_misc.so and /lib64/libpamc.so symlinks were
> > not necessary for anything and were causing internal collisions (bug
> > #690322) so they have been dropped.
> 
> ^^ so this is expected.

The thing is, dropping the /lib64/libpam_misc.so symlink appears to trigger a bug in portage which causes it to erroneously preserve /lib64/libpam_misc.so.0.82.1. If that's what's happening then we should fix portage to prevent it from erroneously preserving libraries like this.
Comment 5 Arfrever Frehtes Taifersar Arahesis 2019-08-22 23:30:42 UTC
Yes, this is a bug in Portage, which needs to be fixed.
Comment 7 Larry the Git Cow gentoo-dev 2019-08-24 03:15:44 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=f90400eedc6a8788878c050880db564800c825d2

commit f90400eedc6a8788878c050880db564800c825d2
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-08-23 20:00:15 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-08-24 02:41:35 +0000

    preserve-libs: ignore dropped non-soname symlink (bug 692698)
    
    Fix the dblink _find_libs_to_preserve method to ignore a dropped
    non-soname symlink. For example, pam-1.3.1-r1 drops the non-soname
    symlink named libpam_misc.so, and we don't want this to trigger
    unnecessary preservation of the corresponding library, since the
    corresponding libpam_misc.so.0 soname symlink and the hardlink
    that it references are still provided by pam-1.3.1-r1.
    
    Bug: https://bugs.gentoo.org/692698
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/portage/dbapi/vartree.py | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
Comment 8 Larry the Git Cow gentoo-dev 2019-08-24 03:50:20 UTC
The bug has been referenced in the following commit(s):

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

commit 865e342cb93b386fcce3d9837a1f20f2f9d48b99
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-08-24 03:43:12 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-08-24 03:49:10 +0000

    sys-apps/portage: Bump to version 2.3.73
    
     #692698 preserve-libs: ignore dropped non-soname symlink
    
    Bug: https://bugs.gentoo.org/691278
    Bug: https://bugs.gentoo.org/692698
    Package-Manager: Portage-2.3.73, Repoman-2.3.17
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-2.3.73.ebuild | 264 +++++++++++++++++++++++++++++++++
 2 files changed, 265 insertions(+)
Comment 9 brassy.panache 2019-10-14 09:22:10 UTC
Is there any update or temporary resolution for this issue?  I still receive this warning every time emerge is used:

!!! existing preserved libs:
>>> package: sys-libs/pam-1.3.1-r1
 *  - /lib64/libpam_misc.so.0.82.1
 *      used by /bin/login (sys-apps/shadow-4.7)
 *      used by /bin/passwd (sys-apps/shadow-4.7)
 *      used by /bin/su (sys-apps/shadow-4.7)
 *      used by 16 other files

My solution for the moment was to remove the pam USE flag, however this seems a little drastic.
Comment 10 Zac Medico gentoo-dev 2019-10-14 17:50:41 UTC
(In reply to brassy.panache from comment #9)
> Is there any update or temporary resolution for this issue?  I still receive
> this warning every time emerge is used:
> 
> !!! existing preserved libs:
> >>> package: sys-libs/pam-1.3.1-r1
>  *  - /lib64/libpam_misc.so.0.82.1
>  *      used by /bin/login (sys-apps/shadow-4.7)
>  *      used by /bin/passwd (sys-apps/shadow-4.7)
>  *      used by /bin/su (sys-apps/shadow-4.7)
>  *      used by 16 other files

This means that you upgraded to sys-libs/pam-1.3.1-r1 before you upgraded to sys-apps/portage-2.3.76. You can resolve the issue by removing /var/lib/portage/preserved_libs_registry, but if it contains any files for packages besides pam that you need to manually edit the file to remove just the pam files. Alternatively, you can simply rebuilding sys-libs/pam-1.3.1-r1.