From patchwork Thu Dec 7 03:28:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "ashish.is--- via Guix-patches\" via" X-Patchwork-Id: 57343 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 930EF27BBE9; Thu, 7 Dec 2023 03:32:14 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E7FFE27BBE2 for ; Thu, 7 Dec 2023 03:32:12 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rB57B-00086T-Er; Wed, 06 Dec 2023 22:31:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rB579-00086K-8J for guix-patches@gnu.org; Wed, 06 Dec 2023 22:31:51 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rB578-0005Zx-VH for guix-patches@gnu.org; Wed, 06 Dec 2023 22:31:50 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rB57K-0006Uv-Nx for guix-patches@gnu.org; Wed, 06 Dec 2023 22:32:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67675] [PATCH] gnu: dante: Enable preloading support. Resent-From: =?utf-8?b?Tmd1eeG7hW4=?= Gia Phong Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 07 Dec 2023 03:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67675 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67675@debbugs.gnu.org Cc: =?utf-8?b?Tmd1eeG7hW4=?= Gia Phong X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.170191987224898 (code B ref -1); Thu, 07 Dec 2023 03:32:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 Dec 2023 03:31:12 +0000 Received: from localhost ([127.0.0.1]:40768 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rB56T-0006TQ-G3 for submit@debbugs.gnu.org; Wed, 06 Dec 2023 22:31:12 -0500 Received: from lists.gnu.org ([2001:470:142::17]:38368) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rB56O-0006Su-NZ for submit@debbugs.gnu.org; Wed, 06 Dec 2023 22:31:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rB562-00081S-3o for guix-patches@gnu.org; Wed, 06 Dec 2023 22:30:47 -0500 Received: from layka.disroot.org ([178.21.23.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rB55x-0005UN-LS for guix-patches@gnu.org; Wed, 06 Dec 2023 22:30:39 -0500 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 7163844E5A; Thu, 7 Dec 2023 04:30:32 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mQ0HK87BEick; Thu, 7 Dec 2023 04:30:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1701919826; bh=LH06JfAXvDgjz1R93TDfNdBT7uSsRNErCyP3/o638VU=; h=From:To:Cc:Subject:Date; b=HaheyxMVqxg3zDVaw2anB2EcoGGbx8rDAbuLhHiSU+NHyA1xNrIgkMJpJNhWWSUkq nCJNZqn9SEbTYGbuGsXlhbCruWm7dJBiYiO1UD4cQE4O+MmtPYt9QddniCjTptJ/Aa xJBlhMOsCKthVoGhDz1n3vokJDRe9v4V6ecltYOUdfThXheOVK9/lk31e0D34Yj8vb wkgxDZ3/keAVEItP+DWDxbX3Sam6dHpxVbFdG9ySZ2m9Sdopc07t4tu7mLAfTpDA3Z YkQ9T51QJb7MsCzPAEOXmkuKY2hF6fOGYV7vzTRqmEE2F7lHmW4fSqDEcB985FjHZi 9vsEH5ffV3jqA== Date: Thu, 7 Dec 2023 12:28:29 +0900 Message-ID: MIME-Version: 1.0 Received-SPF: pass client-ip=178.21.23.139; envelope-from=mcsinyx@disroot.org; helo=layka.disroot.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: =?utf-8?b?Tmd1eeG7hW4=?= Gia Phong X-ACL-Warn: , =?utf-8?q?Nguy=E1=BB=85n_Gia_Phong_via_Guix-patches?= X-Patchwork-Original-From: guix-patches--- via From: "ashish.is--- via Guix-patches\" via" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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 base-commit: 4e7cb241188cf9f213d5fbabbabce07d35ca0991 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@}"