Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 810058 - sys-auth/nss_ldap-265-r10: stabilisation (was: Missing version number on installed .so files for no-multilib)
Summary: sys-auth/nss_ldap-265-r10: stabilisation (was: Missing version number on inst...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Stabilization (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo LDAP project
URL:
Whiteboard:
Keywords: CC-ARCHES
Depends on:
Blocks:
 
Reported: 2021-08-24 17:22 UTC by John Einar Reitan
Modified: 2021-09-04 15:31 UTC (History)
4 users (show)

See Also:
Package list:
sys-auth/nss_ldap-265-r10
Runtime testing required: ---
nattka: sanity-check+


Attachments
emerge --info (emerge-info,5.77 KB, text/plain)
2021-08-24 17:24 UTC, John Einar Reitan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Einar Reitan 2021-08-24 17:22:09 UTC
Upgrading from sys-auth/nss_ldap-265-r5 to sys-auth/nss_ldap-265-r9 broke user auth on my no-multilib platforms. Normal multilib platforms worked fine.

Issue tracked down to symlink /usr/lib64/libnss_ldap.so.2 which points to ../../lib64/libnss_ldap.so.2, but that file doesn't exist.

Instead we find these files:

/lib64/libnss_ldap-.so
/lib64/libnss_ldap.so. -> libnss_ldap-.so

On my normal multilib machines I see:

/lib64/libnss_ldap-2.33.so
/lib64/libnss_ldap.so.2 -> libnss_ldap-2.33.so

This seems initially related/dupe of Bug 780108, but the issue there was the symlink itself, which pointed to /lib and not /lib64, but here it seems like the version suffix is wrong instead.

Reproducible: Always

Steps to Reproduce:
1. default/linux/amd64/17.1/no-multilib profile
2. emerge sys-auth/nss_ldap
3. ls -la /lib64/libnss_ldap*
Actual Results:  
/lib64/libnss_ldap-.so
/lib64/libnss_ldap.so. -> libnss_ldap-.so

Expected Results:  
/lib64/libnss_ldap-2.33.so
/lib64/libnss_ldap.so.2 -> libnss_ldap-2.33.so

Reproduced initially on a fresh Gentoo install, later reproduced on long-running Gentoo installs. Reverting to sys-auth/nss_ldap-265-r5 fixes the issue.
Comment 1 John Einar Reitan 2021-08-24 17:24:34 UTC
Created attachment 735787 [details]
emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-08-25 02:46:25 UTC
So, in nss_ldap-265-libdir.patch, we have:
>-if GCC
>-MULTI_OS_DIRECTORY=$(shell $(CC) $(CFLAGS) -print-multi-os-directory)
>-else
> MULTI_OS_DIRECTORY=.
>-endif

and on no-multilib, I suppose we lack /lib/, so things like this are broken:
> if GLIBC
>-LIBC_VERS = $(shell ls /lib/$(MULTI_OS_DIRECTORY)/libc-*.so | tail -n 1 | sed >-e 's|.*libc-\(.*\)\.so|\1|')
>+LIBC_VERS = $(shell ls @GENTOO_PORTAGE_EPREFIX@/lib/$(MULTI_OS_DIRECTORY)/libc-*.so | tail -n 1 | sed -e 's|.*libc-\(.*\)\.so|\1|')
>NSS_LDAP_LIBC_VERSIONED = libnss_ldap-$(LIBC_VERS).so

I'll dig into this a bit more later but it might be enough to just use libdir instead as the versions should match for all ABIs installed anyway.
Comment 3 John Einar Reitan 2021-08-25 10:44:15 UTC
The bug is LIBC_VERS detection, as it assumes there is a libc-x.xx in /lib, which is only true on 32-bit/multilib setups. 64-bit no-multilib only has libc in /lib64.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-08-26 17:45:00 UTC
(In reply to John Einar Reitan from comment #3)
> The bug is LIBC_VERS detection, as it assumes there is a libc-x.xx in /lib,
> which is only true on 32-bit/multilib setups. 64-bit no-multilib only has
> libc in /lib64.

I think we're the saying the same thing, aye. On it.
Comment 5 Larry the Git Cow gentoo-dev 2021-08-26 18:21:11 UTC
The bug has been referenced in the following commit(s):

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

commit 185c7bc43d6c85bfa46f3420493fbe3502071ad3
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-08-26 18:18:43 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-08-26 18:21:02 +0000

    sys-auth/nss_ldap: fix finding glibc version on no-multilib
    
    Bit of a hack but the rest of it is rather fragile anyway.
    
    The issue was that ${EPREFIX}/lib doesn't exist on
    non-multilib systems.
    
    Bug: https://bugs.gentoo.org/810058
    Signed-off-by: Sam James <sam@gentoo.org>

 .../nss_ldap/files/nss_ldap-265-r10-libdir.patch   |  31 +++++
 sys-auth/nss_ldap/nss_ldap-265-r10.ebuild          | 148 +++++++++++++++++++++
 2 files changed, 179 insertions(+)
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-08-26 18:21:58 UTC
Could you verify if -r10 works for you? Thank you!
Comment 7 John Einar Reitan 2021-08-26 18:59:33 UTC
Your commit is broken, but trivially to fix.

You called the new patch for nss_ldap-265-r10-libdir.patch, but nss_ldap-265-r10.ebuild tries to pull in nss_ldap-265-r9-libdir.patch.

Updating the -r10.ebuild to use the right filename it built and installed correctly versioned .so files.
Comment 8 Larry the Git Cow gentoo-dev 2021-08-26 19:05:34 UTC
The bug has been referenced in the following commit(s):

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

commit 2b53bbf2ac38ceb693b0de04adbb067ee3a35c27
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-08-26 19:04:52 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-08-26 19:04:52 +0000

    sys-auth/nss_ldap: fix patch filename
    
    Caused by flip-flopping between revbumping or not
    for the fix (which was silly).
    
    Fixes: 185c7bc43d6c85bfa46f3420493fbe3502071ad3
    Bug: https://bugs.gentoo.org/810058
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-auth/nss_ldap/nss_ldap-265-r10.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-08-26 19:06:30 UTC
(In reply to John Einar Reitan from comment #7)
> Your commit is broken, but trivially to fix.
> 
> You called the new patch for nss_ldap-265-r10-libdir.patch, but
> nss_ldap-265-r10.ebuild tries to pull in nss_ldap-265-r9-libdir.patch.
> 

Thank you -- apologies, it's because I ended up going back and forth on revbumping or not (for unknown reasons, as we obviously should, I think I was just a bit distracted).

> Updating the -r10.ebuild to use the right filename it built and installed
> correctly versioned .so files.

Excellent, thank you for the fast confirmation.
Comment 10 Agostino Sarubbo gentoo-dev 2021-08-27 05:11:08 UTC
amd64 stable
Comment 11 Agostino Sarubbo gentoo-dev 2021-08-27 05:12:35 UTC
x86 stable
Comment 12 Rolf Eike Beer archtester 2021-08-29 08:07:56 UTC
sparc done
Comment 13 ernsteiswuerfel archtester 2021-08-29 11:58:34 UTC
Looking good on ppc64.

 # cat nss_ldap-810058.report 
USE='-kerberos sasl ssl' succeeded for =sys-auth/nss_ldap-265-r10
USE='kerberos sasl ssl' succeeded for =sys-auth/nss_ldap-265-r10
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-08-29 17:53:15 UTC
ppc64 done
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-08-29 17:53:37 UTC
(In reply to ernsteiswuerfel from comment #13)
> Looking good on ppc64.
> 
>  # cat nss_ldap-810058.report 
> USE='-kerberos sasl ssl' succeeded for =sys-auth/nss_ldap-265-r10
> USE='kerberos sasl ssl' succeeded for =sys-auth/nss_ldap-265-r10

Thanks!
Comment 16 Agostino Sarubbo gentoo-dev 2021-09-01 09:32:00 UTC
ppc stable
Comment 17 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-09-01 18:30:16 UTC
arm done

all arches done
Comment 18 Larry the Git Cow gentoo-dev 2021-09-04 15:31:25 UTC
The bug has been referenced in the following commit(s):

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

commit b5ffac8065af254bee8634251515ee460973e428
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-09-04 15:30:22 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-09-04 15:31:11 +0000

    sys-auth/nss_ldap: Drop 265-r9
    
    Bug: https://bugs.gentoo.org/810058
    Package-Manager: Portage-3.0.22, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 sys-auth/nss_ldap/nss_ldap-265-r9.ebuild | 147 -------------------------------
 1 file changed, 147 deletions(-)