* [bug#67675] [PATCH] gnu: dante: Enable preloading support.
@ 2023-12-07 3:28 guix-patches--- via
2023-12-22 16:44 ` bug#67675: " Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: guix-patches--- via @ 2023-12-07 3:28 UTC (permalink / raw)
To: 67675; +Cc: Nguyễn Gia Phong
Dante uses dlopen which doesn't work with libc.so but libc.so.6.
This fixes socksify, which is patched to skip invoking uname needlessly.
* gnu/packages/networking.scm (dante): Enable preloading support.
* gnu/packages/patches/dante-non-darwin.patch: New file.
References: https://github.com/NixOS/nixpkgs/pull/68418#discussion_r343625853
Fixes: https://issues.guix.gnu.org/63250
Change-Id: I03a5b6b6e11cf6a0453a4968ff00c6dd627249a8
---
gnu/packages/networking.scm | 9 +++------
gnu/packages/patches/dante-non-darwin.patch | 15 +++++++++++++++
2 files changed, 18 insertions(+), 6 deletions(-)
create mode 100644 gnu/packages/patches/dante-non-darwin.patch
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 6b415076e89f..13ac08aa253d 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -3640,13 +3640,10 @@ (define-public dante
(uri (string-append "https://www.inet.no/dante/files/dante-"
version ".tar.gz"))
(sha256
- (base32 "0pbahkj43rx7rmv2x40mf5p3g3x9d6i2sz7pzglarf54w5ghd2j1"))))
+ (base32 "0pbahkj43rx7rmv2x40mf5p3g3x9d6i2sz7pzglarf54w5ghd2j1"))
+ (patches (search-patches "dante-non-darwin.patch"))))
(build-system gnu-build-system)
- (arguments
- ;; XXX: The dynamic socks library doesn't work with 'libc.so' (GNU ld
- ;; script). When preloading is enabled, 'sockd' failed with:
- ;; … Failed to open library "libc.so": …: invalid ELF header
- '(#:configure-flags '("--disable-preload")))
+ (arguments '(#:configure-flags '("--with-libc=libc.so.6")))
(home-page "https://www.inet.no/dante/")
(synopsis "SOCKS server and client")
(description "Dante is a SOCKS client and server implementation. It can
diff --git a/gnu/packages/patches/dante-non-darwin.patch b/gnu/packages/patches/dante-non-darwin.patch
new file mode 100644
index 000000000000..0ecb705c78b7
--- /dev/null
+++ b/gnu/packages/patches/dante-non-darwin.patch
@@ -0,0 +1,15 @@
+Disable runtime check for Darwin so we don't have to substitute uname.
+--- a/bin/socksify.in
++++ b/bin/socksify.in
+@@ -65,11 +65,6 @@
+ unset FULLPATH
+ fi
+
+-#use "FLAT_NAMESPACE" on Darwin in attempt to match LD_PRELOAD behavior
+-if test x`uname` = xDarwin; then
+- export DYLD_FORCE_FLAT_NAMESPACE=t
+-fi
+-
+ #dlib/Makefile.am libtool flags should produce a predictable library name
+ #(ending in SOLIB_POSTFIX).
+ LIBRARY="${SOCKS_LIBRARY:-${FULLPATH}libdsocks.@SOLIB_POSTFIX@}"
base-commit: 4e7cb241188cf9f213d5fbabbabce07d35ca0991
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#67675: [PATCH] gnu: dante: Enable preloading support.
2023-12-07 3:28 [bug#67675] [PATCH] gnu: dante: Enable preloading support guix-patches--- via
@ 2023-12-22 16:44 ` Ludovic Courtès
2023-12-22 17:22 ` [bug#67675] " guix-patches--- via
0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2023-12-22 16:44 UTC (permalink / raw)
To: Nguyễn Gia Phong; +Cc: 67675-done
Hi,
Nguyễn Gia Phong <mcsinyx@disroot.org> skribis:
> Dante uses dlopen which doesn't work with libc.so but libc.so.6.
> This fixes socksify, which is patched to skip invoking uname needlessly.
>
> * gnu/packages/networking.scm (dante): Enable preloading support.
> * gnu/packages/patches/dante-non-darwin.patch: New file.
>
> References: https://github.com/NixOS/nixpkgs/pull/68418#discussion_r343625853
> Fixes: https://issues.guix.gnu.org/63250
> Change-Id: I03a5b6b6e11cf6a0453a4968ff00c6dd627249a8
I added the patch to ‘gnu/local.mk’ and committed.
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [bug#67675] [PATCH] gnu: dante: Enable preloading support.
2023-12-22 16:44 ` bug#67675: " Ludovic Courtès
@ 2023-12-22 17:22 ` guix-patches--- via
0 siblings, 0 replies; 3+ messages in thread
From: guix-patches--- via @ 2023-12-22 17:22 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 67675
[-- Attachment #1: Type: text/plain, Size: 549 bytes --]
On 2023-12-22 at 17:44+01:00, Ludovic Courtès wrote:
> Nguyễn Gia Phong <mcsinyx@disroot.org> skribis:
> > Dante uses dlopen which doesn't work with libc.so but libc.so.6.
> > This fixes socksify, which is patched to skip invoking uname needlessly.
> >
> > * gnu/packages/networking.scm (dante): Enable preloading support.
> > * gnu/packages/patches/dante-non-darwin.patch: New file.
>
> I added the patch to ‘gnu/local.mk’ and committed.
Thanks, I didn't know about that.
Have a merry christmas or other holiday of your choice!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 687 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-12-22 17:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-07 3:28 [bug#67675] [PATCH] gnu: dante: Enable preloading support guix-patches--- via
2023-12-22 16:44 ` bug#67675: " Ludovic Courtès
2023-12-22 17:22 ` [bug#67675] " guix-patches--- via
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
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.