Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 699254 - Confirming QA policy vote: static archives and .la files must not be installed to /lib*
Summary: Confirming QA policy vote: static archives and .la files must not be installe...
Status: CONFIRMED
Alias: None
Product: Quality Assurance
Classification: Unclassified
Component: Policies (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Quality Assurance Team
URL:
Whiteboard: vote [y/n/a]: 6/0/0
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-03 19:49 UTC by Michał Górny
Modified: 2021-07-21 00:59 UTC (History)
3 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 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-11-03 19:49:24 UTC
Since William is attempting to change policy with Portage patches [1], I'd like to call a vote to confirm that the policy corresponding to the existing Portage checks and standard practice at the time [2]:

Static libraries (.a) and libtool files (.la) must not be installed to /lib*.  Instead, they should be installed to /usr/lib*.  If shared library needs to be installed to /lib*, gen_usr_ldscript needs to be used to create .so script in /usr/lib*.


Rationale: according to the current policy, the purpose of rootfs is to store executables and relevant files needed to boot the system up to the point of mounting /usr, and provide recovery.  While technically we seem no longer to care about this working without an initramfs, many of our users still maintain split partitions for historical reasons, with rootfs being small.  It is therefore reasonable to avoid installing unnecessary files there.

Static libraries are used only during build time, they are therefore absolutely unnecessary at boot time.  Depending on compilation flags and FEATURES, they can easily get very large.  If we start permitting installing more and more unnecessary stuff to rootfs (what for, really?) it'll easily become cluttered and cause problems for people who followed historical Gentoo installation instructions.


Please discuss/vote.


[1] https://archives.gentoo.org/gentoo-portage-dev/message/6e4cfbb0ef9c36dc6511d4f2003cc458
[2] https://gitweb.gentoo.org/proj/portage.git/tree/bin/install-qa-check.d/80libraries#n155
Comment 1 David Seifert gentoo-dev 2019-11-03 20:34:30 UTC
Yes (i.e. ban static archives and .la files in /lib)
Comment 2 William Hubbs gentoo-dev 2019-11-04 01:08:41 UTC
From what I see upstream in portage, there really is not a reason given
to force this check; it was just added with no bug number and no
explanation.

https://gitweb.gentoo.org/proj/portage.git/commit/?id=5beb22875
https://gitweb.gentoo.org/proj/portage.git/commit/?id=71c9ff5b50
Comment 3 William Hubbs gentoo-dev 2019-11-04 05:15:07 UTC
Here are a couple more things to consider.

If the static-libs use flag is removed from an ebuild this check is
completely irrelivent since the ebuild will not be building static libs
in the first place.

If we remove the static-libs use flag from all ebuilds that install libs
in /, there really is no reason for the check.

Also, since this is a gentoo-ism, the check fits imo better in
metadata/install-qa-check.d instead of portage itself if we keep it.
libs to go in / to begin with, so this would be more reason to remove
this check.

Also,
Comment 4 Ulrich Müller gentoo-dev 2019-11-04 11:24:15 UTC
This is best practice and common sense since many years, we shouldn't even need an explicit policy for it.

I vote yes.
Comment 5 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2019-11-04 13:03:55 UTC
I vote yes.
Comment 6 Andreas K. Hüttel archtester gentoo-dev 2019-11-05 02:09:55 UTC
I vote yes.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-11-05 03:30:36 UTC
I vote yes.
Comment 8 Sergey Popov gentoo-dev 2019-11-06 07:59:38 UTC
i vote yes