Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 771078 - app-arch/zstd - move libzstd to /lib
Summary: app-arch/zstd - move libzstd to /lib
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 398051
  Show dependency tree
 
Reported: 2021-02-17 10:35 UTC by Stuart Shelton
Modified: 2024-02-06 22:49 UTC (History)
5 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 Stuart Shelton 2021-02-17 10:35:30 UTC
New in sys-apps/kmod-28 is the `zstd` USE-flag, which gives `modprobe` et. al a dependency on app-arch/zstd.

However, app-arch/zstd installs libzstd library to `/usr/lib64`, meaning that any system which:

  * Has a non-monolithic kernel configuration requiring kernel modules to be loaded in order to boot;

  * Has a separate `/usr` partition;

  * Has sys-apps/kmod built with USE=zstd

... will fail to start once rebooted, as `modprobe` now requires /usr/lib64/libzstd* in order to execute.

Suggested solution: Use `usr-ldscript` to relocate zstd libraries back to the root filesystem, issue a warning to users not to reboot without upgrading.

Also consider an additional QA check that nothing deployed to /bin/ or /sbin/ (or /lib64?) has a dynamic dependency on libraries which exist within the /usr tree?
Comment 1 Ionen Wolkens gentoo-dev 2021-02-17 13:41:24 UTC
(In reply to Stuart Shelton from comment #0)
> Also consider an additional QA check that nothing deployed to /bin/ or
> /sbin/ (or /lib64?) has a dynamic dependency on libraries which exist within
> the /usr tree?
Supporting this is not a requirement in Gentoo, see:
https://projects.gentoo.org/qa/policy-guide/filesystem.html#pg0202

So handling this (or not) is up to maintainer(s) of individual packages.
Comment 2 Ionen Wolkens gentoo-dev 2021-02-17 14:07:29 UTC
Assigning to kmod for now to know direction want to take, but a fix would have to be forwarded to zstd.
Comment 3 Mike Gilbert gentoo-dev 2021-02-17 14:43:31 UTC
I am relabeling this as a request to move libzstd to /lib, and punting this to the zstd maintainer.
Comment 4 Adjudicator Darren 2021-05-12 19:05:57 UTC Comment hidden (obsolete)
Comment 5 Adjudicator Darren 2021-05-12 19:49:46 UTC Comment hidden (obsolete)
Comment 6 Adjudicator Darren 2021-05-12 20:04:30 UTC Comment hidden (obsolete)
Comment 7 Larry the Git Cow gentoo-dev 2022-06-16 15:30:55 UTC
The bug has been closed via the following commit(s):

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

commit 80ef1c05eaf312a05e91c56acd56b20464eed81e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-06-16 15:29:03 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-06-16 15:29:59 +0000

    sys-apps/kmod: enable zstd support by default
    
    And depends on newer zstd w/ split-usr support.
    
    Portage already depends on app-arch/zstd so this doesn't extend @system
    at all.
    
    Closes: https://bugs.gentoo.org/771078
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/kmod/kmod-29-r1.ebuild | 204 ++++++++++++++++++++++++++++++++++++++++
 sys-apps/kmod/kmod-9999.ebuild  |  21 +++--
 2 files changed, 215 insertions(+), 10 deletions(-)

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

commit 1ae31721af31ad1eff932f9de790e2584fdd3a9f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-06-16 15:25:44 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-06-16 15:25:46 +0000

    app-arch/zstd: add split-usr support
    
    Done with some reluctance, as I don't really want to be introducing more of
    these, but it blocks being able to turn on zstd by default safely in kmod,
    and it's a simple enough fix that I can't justify breaking things - it'd
    be gratuitious.
    
    Not tested on a split-usr system though, so it's really best-effort.
    
    (split-usr being "/usr is a separate partition and therefore libraries
    need to be in /$(get_libdir) for boot to bring it up", and not anything
    to do with "merged-usr").
    
    Closes: https://bugs.gentoo.org/771078
    Signed-off-by: Sam James <sam@gentoo.org>

 app-arch/zstd/zstd-1.5.1-r3.ebuild | 81 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)
Comment 8 Larry the Git Cow gentoo-dev 2022-06-18 13:05:02 UTC
The bug has been referenced in the following commit(s):

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

commit e5f5a24567c083d7615486bf0c58c968e01052ed
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-06-18 13:04:43 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-06-18 13:04:53 +0000

    sys-apps/kmod: tighten zstd dep
    
    Closes: https://bugs.gentoo.org/852860
    Bug: https://bugs.gentoo.org/771078
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/kmod/{kmod-29-r1.ebuild => kmod-29-r2.ebuild} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 9 Larry the Git Cow gentoo-dev 2024-02-06 22:49:52 UTC
The bug has been referenced in the following commit(s):

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

commit b0655eb884a394fdd8048617b8888b8be74adc5e
Author:     Eli Schwartz <eschwartz93@gmail.com>
AuthorDate: 2024-02-06 05:13:57 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-02-06 22:49:28 +0000

    app-arch/zstd: remove usr-ldscript support
    
    Per news item 2024-01-05-usr-initramfs, we no longer support this use
    case. It is fragile and hacky and leads to bizarre forms of load errors.
    
    The functionality is, despite being called "split-usr", not really about
    split-usr at all.
    
    [sam: Added bug #771078 ref.]
    [sam: See also https://github.com/trofi/nix-guix-gentoo/commit/8f194519982fbfabb6b3ca84c0806b1a379b5d06 and
    https://github.com/trofi/nix-guix-gentoo/commit/43d84cc00af530ef912d9c98448b64d6b5282907].
    
    Bug: https://bugs.gentoo.org/771078
    Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 app-arch/zstd/zstd-1.5.5-r1.ebuild | 67 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)