Github messages for voidlinux
 help / color / mirror / Atom feed
From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Merged]: openssh: fix broken gssapi on musl
Date: Thu, 10 Nov 2022 02:45:29 +0100	[thread overview]
Message-ID: <20221110014529.tCjMJukYkII5tueGU4YG2Y5-0FhfPpMC5JsC9x0-VpM@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-40414@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 3162 bytes --]

There's a merged pull request on the void-packages repository

openssh: fix broken gssapi on musl
https://github.com/void-linux/void-packages/pull/40414

Description:
I noticed that openssh does not build with gssapi option on musl (or crosscompiled from glibc). Seems it's complaining about missing definition `MAXHOSTNAMELEN` in `gss-serv.c`. in the headers included in `mit-krb5-devel` it's defined in `/usr/include/gssrpc/types.h` (also included in `musl-devel` in `/usr/include/sys/param.h` but using that the build fails crosscompiling from glibc complaining of unresolvable shlibs and `mit-krb5-devel` is already a makedepend with gssapi option).

Patching `#include <gssrpc/types.h>` into `gss-serv.c` seems to fix the problem both for native musl compile and crosscompiling from glibc. I also confirmed that compiling natively on glibc still works.

Don't know if there's an issue in the configure script that causes this, seems to be checking for `rpc/types.h`:
```
checking for rpc/types.h... no
```
which is similar to `gssrpc/types.h`. The configure script also contains mentions of `sys/param.h` but adding `musl-devel` to the makedepends without v1 patch does not fix it.

#### Testing the changes
- I tested the changes in this PR: **YES**

sshd main server instance seemed to crash after update on x86_64-musl and had to be restarted with `sv x sshd` (`sv t sshd` didn't seem to do anything). Don't know how much impact that would have as gssapi option is not enabled by default.
GSSAPI authentication seems to work from what I've tested with the patch.

The server crash on x86_64-musl could be unrelated but this should probably be tested by someone else anyway before merging to see if there's any other side-effects I've missed.

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-musl, x86_64-glibc)
- I built this PR locally for these architectures:
  - aarch64-musl
  - aarch64
  - armv6l-musl (tested on a rpi1, sshd seemed to restart properly with `sv t sshd`)
  - armv6l

Attaching logs from builds for reference (v1 is using /usr/include/sys/param.h from musl-devel):

[glibc-cross-x86_64-musl-no-patch.log](https://github.com/void-linux/void-packages/files/9971765/glibc-cross-x86_64-musl-no-patch.log)
[glibc-cross-x86_64-musl-v1-patch.log](https://github.com/void-linux/void-packages/files/9971766/glibc-cross-x86_64-musl-v1-patch.log)
[glibc-cross-x86_64-musl-v2-patch.log](https://github.com/void-linux/void-packages/files/9971767/glibc-cross-x86_64-musl-v2-patch.log)
[glibc-no-patch.log](https://github.com/void-linux/void-packages/files/9971768/glibc-no-patch.log)
[glibc-v1-patch.log](https://github.com/void-linux/void-packages/files/9971769/glibc-v1-patch.log)
[glibc-v2-patch.log](https://github.com/void-linux/void-packages/files/9971770/glibc-v2-patch.log)
[musl-no-patch.log](https://github.com/void-linux/void-packages/files/9971771/musl-no-patch.log)
[musl-v1-patch.log](https://github.com/void-linux/void-packages/files/9971772/musl-v1-patch.log)
[musl-v2-patch.log](https://github.com/void-linux/void-packages/files/9971773/musl-v2-patch.log)

      parent reply	other threads:[~2022-11-10  1:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09 14:37 [PR PATCH] " klarasm
2022-11-09 16:05 ` dkwo
2022-11-09 16:54 ` klarasm
2022-11-09 17:23 ` klarasm
2022-11-09 17:26 ` klarasm
2022-11-09 17:26 ` klarasm
2022-11-09 17:47 ` klarasm
2022-11-09 17:54 ` klarasm
2022-11-09 18:25 ` klarasm
2022-11-09 19:27 ` dkwo
2022-11-09 20:00 ` klarasm
2022-11-09 20:35 ` dkwo
2022-11-09 20:46 ` klarasm
2022-11-09 21:22 ` [PR PATCH] [Updated] " klarasm
2022-11-10  1:45 ` sgn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221110014529.tCjMJukYkII5tueGU4YG2Y5-0FhfPpMC5JsC9x0-VpM@z \
    --to=sgn@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).