Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 891665 - net-misc/openssh-9.1_p1-r3[x509]: src_prepare fails
Summary: net-misc/openssh-9.1_p1-r3[x509]: src_prepare fails
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 891639
  Show dependency tree
 
Reported: 2023-01-22 08:44 UTC by setun.90
Modified: 2023-01-22 17:50 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
net-misc/openssh-9.1_p1-r3 build log (build.log,37.98 KB, text/x-log)
2023-01-22 08:45 UTC, setun.90
Details

Note You need to log in before you can comment on or make changes to this bug.
Description setun.90 2023-01-22 08:44:04 UTC
net-misc/openssh-9.1_p1-r3 fails in the prepare phase when a patch command fails.

Reproducible: Always

Steps to Reproduce:
emerge '=net-misc/openssh-9.1_p1-r3'
Actual Results:  
src_prepare fails.

Expected Results:  
net-misc/openssh-9.1_p1-r3 merges.

The build.log warns about some ignored new patches, namely getentropy.patch and seccomp-writev.patch. Patch is sys-devel/patch-2.7.6-r5.
Comment 1 setun.90 2023-01-22 08:45:20 UTC
Created attachment 848953 [details]
net-misc/openssh-9.1_p1-r3 build log
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-22 08:48:48 UTC
This is really another piece of evidence supporting the idea of splitting x509+HPN into their own ebuild.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2023-01-22 17:48:56 UTC
Fun, looks like the X509 patch has it's own fix for the getentropy bug, implemented differently. Will conditionally not apply that fix for x509.

excerpt from the x509 diff:
-   if (getentropy(rnd, sizeof rnd) == -1)
-       _getentropy_fail();
+#ifdef WITH_OPENSSL
+   /* Always prefer OpenSSL random functionality */
+   if (RAND_bytes(rnd, sizeof(rnd)) <= 0)
+       fatal("Couldn't obtain random bytes (error 0x%lx)",
+           (unsigned long)ERR_get_error());
+#else
+   if (_ssh_compat_getentropy(rnd, sizeof rnd) == -1)
+       fatal("getentropy failed");
+#endif
Comment 4 Larry the Git Cow gentoo-dev 2023-01-22 17:50:56 UTC
The bug has been closed via the following commit(s):

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

commit 1b2bcb67e18ff9150bc5c7e758bc2d6d72e75ba9
Author:     Robin H. Johnson <robbat2@gentoo.org>
AuthorDate: 2023-01-22 17:49:01 +0000
Commit:     Robin H. Johnson <robbat2@gentoo.org>
CommitDate: 2023-01-22 17:50:32 +0000

    net-misc/openssh: avoid conflict between x509 patch and getentropy fix
    
    Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
    Closes: https://bugs.gentoo.org/891665

 net-misc/openssh/openssh-9.1_p1-r3.ebuild | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)