public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libssh/, net-libs/libssh/files/
Date: Tue, 30 Aug 2022 20:30:42 +0000 (UTC)	[thread overview]
Message-ID: <1661891409.53106843b6fec1b6a390bf6f3953ae49452407dc.sam@gentoo> (raw)

commit:     53106843b6fec1b6a390bf6f3953ae49452407dc
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 30 20:30:09 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Aug 30 20:30:09 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53106843

net-libs/libssh: fix build with musl

Revbump as GNU_SOURCE can change runtime behaviour
(and indeed that was partly the issue in contention here,
although a build failure prevented it getting that far
usually.)

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/libssh-0.10.0-fix-musl-gnu-source.patch  | 58 ++++++++++++++++++++++
 ...ibssh-0.10.0.ebuild => libssh-0.10.0-r1.ebuild} |  4 ++
 2 files changed, 62 insertions(+)

diff --git a/net-libs/libssh/files/libssh-0.10.0-fix-musl-gnu-source.patch b/net-libs/libssh/files/libssh-0.10.0-fix-musl-gnu-source.patch
new file mode 100644
index 000000000000..be234bab53c9
--- /dev/null
+++ b/net-libs/libssh/files/libssh-0.10.0-fix-musl-gnu-source.patch
@@ -0,0 +1,58 @@
+https://gitlab.com/libssh/libssh-mirror/-/commit/8cf9c8162fc317761f19c35f60fc0cae7337ceea
+https://gitlab.com/libssh/libssh-mirror/-/issues/141
+
+From: Jakub Jelen <jjelen@redhat.com>
+Date: Mon, 29 Aug 2022 12:48:34 +0200
+Subject: [PATCH] Do not force GNU_SOURCE during build to fix #141
+
+Signed-off-by: Jakub Jelen <jjelen@redhat.com>
+Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -348,10 +348,6 @@ endif (WITH_SYMBOL_VERSIONING AND HAVE_LD_VERSION_SCRIPT AND ABIMAP_FOUND)
+ # This gets built as a static library, if -DBUILD_SHARED_LIBS=OFF is passed to
+ # cmake.
+ add_library(ssh ${libssh_SRCS})
+-target_compile_options(ssh
+-                       PRIVATE
+-                           ${DEFAULT_C_COMPILE_FLAGS}
+-                           -D_GNU_SOURCE)
+ target_include_directories(ssh
+                            PUBLIC
+                                $<BUILD_INTERFACE:${libssh_SOURCE_DIR}/include>
+@@ -408,10 +404,6 @@ install(EXPORT libssh-config
+ 
+ if (BUILD_STATIC_LIB)
+   add_library(ssh-static STATIC ${libssh_SRCS})
+-  target_compile_options(ssh-static
+-                         PRIVATE
+-                            ${DEFAULT_C_COMPILE_FLAGS}
+-                            -D_GNU_SOURCE)
+ 
+   target_include_directories(ssh-static
+                              PUBLIC
+--- a/src/misc.c
++++ b/src/misc.c
+@@ -1956,7 +1956,7 @@ char *ssh_strerror(int err_num, char *buf, size_t buflen)
+ #if defined(_WIN32)
+     strerror_s(buf, buflen, err_num);
+     return buf;
+-#elif defined(__linux__) && defined(_GNU_SOURCE)
++#elif defined(__linux__) && defined(__GLIBC__) && defined(_GNU_SOURCE)
+     /* GNU extension on Linux */
+     return strerror_r(err_num, buf, buflen);
+ #else
+--- a/tests/torture.h
++++ b/tests/torture.h
+@@ -24,10 +24,6 @@
+ #ifndef _TORTURE_H
+ #define _TORTURE_H
+ 
+-#ifndef _GNU_SOURCE
+-#define _GNU_SOURCE
+-#endif
+-
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stdarg.h>
+GitLab

diff --git a/net-libs/libssh/libssh-0.10.0.ebuild b/net-libs/libssh/libssh-0.10.0-r1.ebuild
similarity index 98%
rename from net-libs/libssh/libssh-0.10.0.ebuild
rename to net-libs/libssh/libssh-0.10.0-r1.ebuild
index 9b897cf8885e..0a5989b9a16b 100644
--- a/net-libs/libssh/libssh-0.10.0.ebuild
+++ b/net-libs/libssh/libssh-0.10.0-r1.ebuild
@@ -47,6 +47,10 @@ DOCS=( AUTHORS CHANGELOG README )
 
 PATCHES=( "${FILESDIR}/${PN}-0.8.0-tests.patch" )
 
+PATCHES=(
+	"${FILESDIR}"/${P}-fix-musl-gnu-source.patch
+)
+
 src_prepare() {
 	cmake_src_prepare
 


             reply	other threads:[~2022-08-30 20:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30 20:30 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-04-15  3:23 [gentoo-commits] repo/gentoo:master commit in: net-libs/libssh/, net-libs/libssh/files/ Sam James
2025-01-25 13:27 Andreas Sturmlechner
2024-06-07 18:10 Andreas Sturmlechner
2022-09-30 13:34 Andreas Sturmlechner
2022-08-30 22:21 Sam James
2020-01-26 10:55 Andreas Sturmlechner
2019-09-01 20:43 Andreas Sturmlechner
2018-10-31 18:15 Andreas Sturmlechner
2018-10-02 13:33 Jeroen Roovers
2016-02-27  7:44 Jeroen Roovers

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=1661891409.53106843b6fec1b6a390bf6f3953ae49452407dc.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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