* [Buildroot] [PATCH 1/1] package/openssh: fix musl compile issue
@ 2024-10-28 16:31 Fiona Klute via buildroot
2024-10-28 20:14 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Fiona Klute via buildroot @ 2024-10-28 16:31 UTC (permalink / raw)
To: buildroot; +Cc: Fiona Klute (WIWA)
From: "Fiona Klute (WIWA)" <fiona.klute@gmx.de>
Building package/openssh 9.9p1 with musl failed during linking because
construct_utmp() was referenced due to "use construct_utmp to
construct btmp records" [1], but not built as utmp is disabled in the
Buildroot package. The fix comes from upstream and ensures the
construct_utmp function actually gets built when USE_BTMP is set [2].
[1] https://anongit.mindrot.org/openssh.git/commit/?id=671c440786a5a66216922f15d0007b60f1e6733f
[2] https://anongit.mindrot.org/openssh.git/commit/?id=76a618d2842c34c16cd21a4efc7230e2f459008d
Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
---
...-construct_utmp-when-USE_BTMP-is-set.patch | 35 +++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100644 package/openssh/0001-build-construct_utmp-when-USE_BTMP-is-set.patch
diff --git a/package/openssh/0001-build-construct_utmp-when-USE_BTMP-is-set.patch b/package/openssh/0001-build-construct_utmp-when-USE_BTMP-is-set.patch
new file mode 100644
index 0000000000..0805bcdacb
--- /dev/null
+++ b/package/openssh/0001-build-construct_utmp-when-USE_BTMP-is-set.patch
@@ -0,0 +1,35 @@
+From 76a618d2842c34c16cd21a4efc7230e2f459008d Mon Sep 17 00:00:00 2001
+From: Damien Miller <djm@mindrot.org>
+Date: Wed, 25 Sep 2024 11:13:05 +1000
+Subject: [PATCH] build construct_utmp() when USE_BTMP is set
+
+Fixes compile error on Void Linux/Musl
+
+Upstream: https://anongit.mindrot.org/openssh.git/commit/?id=76a618d2842c34c16cd21a4efc7230e2f459008d
+Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
+---
+ loginrec.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/loginrec.c b/loginrec.c
+index 45f13dee8b1f..7b1818b86753 100644
+--- a/loginrec.c
++++ b/loginrec.c
+@@ -614,7 +614,7 @@ line_abbrevname(char *dst, const char *src, int dstsize)
+ ** into account.
+ **/
+
+-#if defined(USE_UTMP) || defined (USE_WTMP) || defined (USE_LOGIN)
++#if defined(USE_BTMP) || defined(USE_UTMP) || defined (USE_WTMP) || defined (USE_LOGIN)
+
+ /* build the utmp structure */
+ void
+@@ -698,7 +698,7 @@ construct_utmp(struct logininfo *li,
+ }
+ # endif
+ }
+-#endif /* USE_UTMP || USE_WTMP || USE_LOGIN */
++#endif /* USE_BTMP || USE_UTMP || USE_WTMP || USE_LOGIN */
+
+ /**
+ ** utmpx utility functions
--
2.45.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/openssh: fix musl compile issue
2024-10-28 16:31 [Buildroot] [PATCH 1/1] package/openssh: fix musl compile issue Fiona Klute via buildroot
@ 2024-10-28 20:14 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-10-28 20:14 UTC (permalink / raw)
To: Fiona Klute via buildroot; +Cc: Fiona Klute
On Mon, 28 Oct 2024 17:31:37 +0100
Fiona Klute via buildroot <buildroot@buildroot.org> wrote:
> From: "Fiona Klute (WIWA)" <fiona.klute@gmx.de>
>
> Building package/openssh 9.9p1 with musl failed during linking because
> construct_utmp() was referenced due to "use construct_utmp to
> construct btmp records" [1], but not built as utmp is disabled in the
> Buildroot package. The fix comes from upstream and ensures the
> construct_utmp function actually gets built when USE_BTMP is set [2].
It would have been nice to include more explicitly since when this
issue started occurring. I assume it's since the bump of OpenSSH to
9.9p1, but this should ideally been made explicit. Could you keep this
in mind for your next fixes?
I've also added a reference to the autobuilder failure being fixed, and
applied. Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-28 20:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-28 16:31 [Buildroot] [PATCH 1/1] package/openssh: fix musl compile issue Fiona Klute via buildroot
2024-10-28 20:14 ` Thomas Petazzoni via buildroot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.