Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 699252 - sys-apps/portage: install-qa-check.d bans libtool files and static libs from /, leading to unnecessary divergence from upstream
Summary: sys-apps/portage: install-qa-check.d bans libtool files and static libs from ...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL: https://archives.gentoo.org/gentoo-po...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-03 19:43 UTC by Zac Medico
Modified: 2023-09-18 19:01 UTC (History)
1 user (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-11-03 19:43:06 UTC
> From: William Hubbs <williamh@gentoo.org>
> To: gentoo-portage-dev@lists.gentoo.org
> Cc: qa@gentoo.org, William Hubbs <williamh@gentoo.org>
> Subject: [gentoo-portage-dev] [PATCH] install-qa-check.d: remove check that bans libtool files and static libs from /
> 
> Most upstreams and build systems do not make this distinction, so this
> causes unnecessary hacks in ebuilds.
> 
> Signed-off-by: William Hubbs <williamh@gentoo.org>
> ---
>  bin/install-qa-check.d/80libraries | 10 ----------
>  1 file changed, 10 deletions(-)
> 
> diff --git a/bin/install-qa-check.d/80libraries b/bin/install-qa-check.d/80libraries
> index d1d2c4fdd..e59369bf6 100644
> --- a/bin/install-qa-check.d/80libraries
> +++ b/bin/install-qa-check.d/80libraries
> @@ -152,16 +152,6 @@ lib_check() {
>  	done
>  	[[ ${abort} == "yes" ]] && die "add those ldscripts"
>  
> -	# Make sure people don't store libtool files or static libs in /lib
> -	f=$(ls "${ED%/}"/lib*/*.{a,la} 2>/dev/null)
> -	if [[ -n ${f} ]] ; then
> -		__vecho -ne '\n'
> -		eqawarn "QA Notice: Excessive files found in the / partition"
> -		eqawarn "${f}"
> -		__vecho -ne '\n'
> -		die "static archives (*.a) and libtool library files (*.la) belong in /usr/lib*, not /lib*"
> -	fi
> -
>  	# Verify that the libtool files don't contain bogus $D entries.
>  	local abort=no gentoo_bug=no always_overflow=no
>  	for a in "${ED%/}"/usr/lib*/*.la ; do
Comment 1 Larry the Git Cow gentoo-dev 2019-11-03 19:45:56 UTC
The bug has been referenced in the following commit(s):

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

commit 498900e5e51460502d8271f409a4c614a021613b
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2019-10-27 17:40:07 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-11-03 19:44:44 +0000

    install-qa-check.d: remove check that bans libtool files and static libs from /
    
    Most upstreams and build systems do not make this distinction, so this
    causes unnecessary hacks in ebuilds.
    
    Bug: https://bugs.gentoo.org/699252
    Signed-off-by: William Hubbs <williamh@gentoo.org>
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 bin/install-qa-check.d/80libraries | 10 ----------
 1 file changed, 10 deletions(-)
Comment 2 Larry the Git Cow gentoo-dev 2019-11-03 20:02:09 UTC
The bug has been referenced in the following commit(s):

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

commit a2506e4ebd47781eb81b7d13b0a1a376ed028c77
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-11-03 19:59:06 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-11-03 20:00:59 +0000

    install-qa-check.d: handle libtool files and static libs from /
    
    Fixes: 498900e5e514 ("install-qa-check.d: remove check that bans libtool files and static libs from /")
    Bug: https://bugs.gentoo.org/699252
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 bin/install-qa-check.d/80libraries | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 3 Larry the Git Cow gentoo-dev 2019-11-03 20:15:23 UTC
The bug has been referenced in the following commit(s):

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

commit ae2a76261fd7e519bfbb3b8c4b41aa511d039245
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-11-03 20:12:02 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-11-03 20:14:42 +0000

    Revert "install-qa-check.d: remove check that bans libtool files and static libs from /"
    
    This reverts commit 498900e5e51460502d8271f409a4c614a021613b.
    This change is still being discussed.
    
    See: https://archives.gentoo.org/gentoo-portage-dev/message/6e4cfbb0ef9c36dc6511d4f2003cc458
    Bug: https://bugs.gentoo.org/699252
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 bin/install-qa-check.d/80libraries | 10 ++++++++++
 1 file changed, 10 insertions(+)
Comment 4 Duncan 2020-09-22 21:27:50 UTC
So it seems the ban on static libs and libtool files in / is not going to be lifted in general, and FWIW I understand and agree, but...

Could some at least user-level override be made available?  Maybe QA_STRICT_STATICLIBS=ignore, to sort of match the other QA_STRICT_* vars listed in the make.conf manpage but reverse form from =set, since those force stricter than default while this would be loosening the default?

And/or simply make it subject to FEATURES=stricter or some such, which I believe the other QA_STRICT variables are.  (I have FEATURES=strict but not stricter set here, and get non-fatal warnings for most of those.)

The scenario is bug #701082, filed a couple weeks after this bug in Nov 2019.  It seems upstream qt introduced a build-system feature where they detect the existing install location (presumably for qtcore) and install additional modules to the same location.  That detects my reverse-usrmerge /usr -> . symlink and installs directly to / in the fake-install image, thus triggering this die where most ebuilds don't, as they're installed to /usr in the fake-install image and only merged directly to / in qmerge, after this QA_ test.  But since reverse-usrmerge apparently isn't fully supported and no one else seems to have run into the bug, the bug has pretty much just sat there.

FWIW equery f '*' | grep '^/lib64/.*\.a' say I have only four *.a files installed directly to /lib64.  All four of those are dev-qt/* three from qtdeclarative, one from designer.  There are of course other *.a files in /lib64, but they're actually installed to /usr/lib64 which just happens to be /lib64 on my box, which is fine as they don't trigger the die.

Since I troubleshot that bug I've been carrying a local portage patch that s/die/eqawarn/ on the appropriate line in 80libraries in ordered to continue running current qt, required for the live-git kde-* I run from the gentoo/kde overlay, and having some way to user-toggle that check to nonfatal in portage config would allow me to drop that local patch. =:^)
Comment 5 Vic Kerr (wikky) 2023-09-18 19:01:47 UTC
This check is pretty much irrelevant for usr-merged systems, no matter the direction, since /usr/lib and /lib are the same directory.