Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 700128 - sys-apps/kmod USE=ssl causes boot failures when /usr is not mounted yet
Summary: sys-apps/kmod USE=ssl causes boot failures when /usr is not mounted yet
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: udev maintainers
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: 398051
  Show dependency tree
 
Reported: 2019-11-15 00:25 UTC by David Owen
Modified: 2024-02-06 22:52 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 David Owen 2019-11-15 00:25:43 UTC
When sys-apps/kmod is built with the ssl USE flag, it is linked against /usr/lib/libcrypt.so.

This can cause boot failures on systems configured with a late-mounting /usr and no initrd.  If the primary video driver is dynamically loaded without a fallback (e.g. framebuffer during EFI hand-off), the user might see nothing except "Loading linux <version>...." with a hung system.

Reproducible: Always

Steps to Reproduce:
1. With /usr on a separate filesystem and no initrd, compile kmod +ssl and reboot.
Actual Results:  
With working video driver built in to the kernel, the user will see openrc starting up, followed quickly by an error about kmod not running because /usr/lib/libcrypt.so couldn't be loaded.  Openrc will nevertheless attempt to continue.

Without a working video driver built in to the kernel, the user will see a system hang at "Loading linux <version> ...." or similar.

Expected Results:  
System should boot successfully.

Some possible ways to handle:

 * If ssl is enabled, emit a warning about the added dependency on /usr during boot.  Additionally, consider not enabling ssl by default.

 * If ssl is enabled, statically link libcrypt so there's no dependency on /usr.

 * Make glibc install libcrypt to /lib instead of /usr/lib.
Comment 1 Alexander Tsoy 2019-11-15 01:43:41 UTC
(In reply to David Owen from comment #0)
> When sys-apps/kmod is built with the ssl USE flag, it is linked against
> /usr/lib/libcrypt.so.
...
>  * Make glibc install libcrypt to /lib instead of /usr/lib.
AFAIS it is linked against /usr/lib*/libcrypto.so.* which is owned by openssl.
Comment 2 Tomáš Mózes 2019-11-15 12:24:15 UTC
AFAIK /usr on separate volume without initramfs is not supported.
Comment 3 David Owen 2019-11-15 16:55:20 UTC
(In reply to Alexander Tsoy from comment #1)
> AFAIS it is linked against /usr/lib*/libcrypto.so.* which is owned by
> openssl.

Oh, yes, you're correct on both points.
Comment 4 Larry the Git Cow gentoo-dev 2019-11-15 18:37:39 UTC
The bug has been closed via the following commit(s):

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

commit ab4d42b4c700cfb08d601c7741959e6f0483705a
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2019-11-15 17:26:13 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2019-11-15 18:37:29 +0000

    sys-apps/kmod: rename 'ssl' USE flag to 'pkcs7'
    
    This better expresses the effect of the --with-openssl configure option.
    See NEWS for more details.
    
    This also has the nice side-effect of disabling the dependency on
    opensssl by default, which makes kmod work without /usr mounted in early
    boot.
    
    Closes: https://bugs.gentoo.org/700128
    Package-Manager: Portage-2.3.79_p3, Repoman-2.3.18_p2
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-apps/kmod/kmod-26-r2.ebuild | 6 +++---
 sys-apps/kmod/kmod-9999.ebuild  | 6 +++---
 sys-apps/kmod/metadata.xml      | 1 +
 3 files changed, 7 insertions(+), 6 deletions(-)