Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 658232 - =net-misc/openssh-7.7_p1-r4: patch openssh-7.7p1-hpnssh14v15-gentoo1.patch breaks build on x86
Summary: =net-misc/openssh-7.7_p1-r4: patch openssh-7.7p1-hpnssh14v15-gentoo1.patch br...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 657366
  Show dependency tree
 
Reported: 2018-06-16 13:56 UTC by Anthony Basile
Modified: 2018-06-18 23:33 UTC (History)
0 users

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 Anthony Basile gentoo-dev 2018-06-16 13:56:53 UTC
While I hit this on x86 musl, its clearly a mistake independent of arch and libc.  The following upstream commit

https://github.com/rapier1/openssh-portable/commit/e3ea335abeab731c68f2b2141bee85a4b0bf680f

changed the SC_ALLOW(), SC_ALLOW_ARG() and SC_DENY() macros so they don't prepend __NR_ to the syscall number.  This change was consistently pushed through for all syscalls except socketcall.  Lines 1662-1664 of openssh-7.7p1-hpnssh14v15-gentoo1.patch adds the following:

+#ifdef __NR_socketcall
+       SC_ALLOW(socketcall),
+#endif

But this should read

+#ifdef __NR_socketcall
+       SC_ALLOW(__NR_socketcall),
+#endif

Building with USE=hpn bails with socketcall not defined.  I don't know what happens on other arches/libcs, but even if it works, this should be fixed as the logic is incorrect.
Comment 1 Larry the Git Cow gentoo-dev 2018-06-18 23:33:50 UTC
The bug has been closed via the following commit(s):

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

commit e1a1048cb7a8810473fbead4eca8cd963be976d1
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2018-06-18 23:30:43 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2018-06-18 23:33:38 +0000

    net-misc/openssh: bump to address multiple issues
    
    - Fix building on x86 due to undefined socketcall when "hpn" USE
      flag was set. [Bug 658232]
    
    - Fix segfault when using sshd with "sctp" USE flag. [Bug 658308]
    
    Closes: https://bugs.gentoo.org/658232
    Closes: https://bugs.gentoo.org/658308
    Package-Manager: Portage-2.3.40, Repoman-2.3.9
    RepoMan-Options: --force

 net-misc/openssh/Manifest                                             | 4 ++--
 .../{openssh-7.7_p1-r100.ebuild => openssh-7.7_p1-r101.ebuild}        | 4 ++--
 .../openssh/{openssh-7.7_p1-r4.ebuild => openssh-7.7_p1-r5.ebuild}    | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)