From patchwork Thu Sep 14 07:09:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edouard Klein X-Patchwork-Id: 53829 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 A3F6D27BBEC; Thu, 14 Sep 2023 08:22:04 +0100 (BST) 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=ham 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 B204A27BBE9 for ; Thu, 14 Sep 2023 08:22:03 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qggdv-0000VX-4G; Thu, 14 Sep 2023 03:20:03 -0400 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 1qggdt-0000U0-8b for guix-patches@gnu.org; Thu, 14 Sep 2023 03:20:01 -0400 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 1qggdt-000062-0l for guix-patches@gnu.org; Thu, 14 Sep 2023 03:20:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qggdy-0006z6-L8; Thu, 14 Sep 2023 03:20:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65944] [PATCH 04/33] gnu: Add go-github-com-vishvananda-netns. Resent-From: Edouard Klein Original-Sender: "Debbugs-submit" Resent-CC: cox.katherine.e+guix@gmail.com, guix-patches@gnu.org Resent-Date: Thu, 14 Sep 2023 07:20:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65944 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65944@debbugs.gnu.org Cc: Edouard Klein , Katherine Cox-Buday X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Katherine Cox-Buday Received: via spool by submit@debbugs.gnu.org id=B.169467596226374 (code B ref -1); Thu, 14 Sep 2023 07:20:06 +0000 Received: (at submit) by debbugs.gnu.org; 14 Sep 2023 07:19:22 +0000 Received: from localhost ([127.0.0.1]:36682 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qggdG-0006r6-Av for submit@debbugs.gnu.org; Thu, 14 Sep 2023 03:19:22 -0400 Received: from lists.gnu.org ([2001:470:142::17]:50832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qggdA-0006pZ-0f for submit@debbugs.gnu.org; Thu, 14 Sep 2023 03:19:17 -0400 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 1qggcj-0008V6-Oy for guix-patches@gnu.org; Thu, 14 Sep 2023 03:18:52 -0400 Received: from sender11-op-o11.zoho.eu ([31.186.226.225]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qggcZ-0008Cs-M6 for guix-patches@gnu.org; Thu, 14 Sep 2023 03:18:46 -0400 Delivered-To: edk@beaver-labs.com ARC-Seal: i=1; a=rsa-sha256; t=1694675913; cv=none; d=zohomail.eu; s=zohoarc; b=KyWfp++kUHPQU+UKIjoHntsqGvxfqKLFGdtVSAWFZoyEHA4mjAvrPE1c3OTg0TbZqDGRgzXT4gYknSk35Fw+VyiJDheJxo48Zh9kc5Uh565PVp7+H7NnoHQawzFdcBXIopHkekiLQClu1qA2tIdwqiKlO4lmdxn2U814MVCa1z8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1694675913; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=4cO4Ov4XzuRohoQuuMvzhe11O1+rSRtYdi5QgP8/XoI=; b=eavbjL7oEyfuUd9h71LENjzgB+RBG0JtxiKEZ11Og8mdynKb29vQYMmY9rO2mOAkwTOcZtOaWcxz4qqihydOzMcr/yfQmXCbYDqSDsK3C+7iz4yVwB6fkNHANMq/3RQ4p5BbOPrjL2O6CBV2LH1DldZtmCQWTGT95S6rbdL/h1U= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=beaver-labs.com; spf=pass smtp.mailfrom=edk@beaver-labs.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1694675913; s=zoho; d=beaver-labs.com; i=edk@beaver-labs.com; h=From:From:To:To:Cc:Cc:Message-ID:Subject:Subject:Date:Date:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Reply-To; bh=4cO4Ov4XzuRohoQuuMvzhe11O1+rSRtYdi5QgP8/XoI=; b=XJ/Yh5Ji4PsXkZhbaMiIKOIbByPn8ncqJ79IeCXjbqzbmZrQRqHcyHpMcGP2o+Rv qVgJUSxe649MUrvKd0S4SxgEPB+Tyx4ofbL2AqYP58iijGeE/pfNejMnemsMCLNtUst v+WQlLbzAQV363C/KwjeIpc8h7S9H60/BODlNFI6BaHLFo9aA5BcjWzWAPQLn1U+KBa rJYCTxq7CCsnxBP1Eaa3KLp6S+YKEFiHWdBoqsYZB5L7M6mOWF7HQ73/gqEUmS8tx+C dkc71cUZHGJDGfd2slnMe5hGTmkbdGrmZ91yc5vkOitCsZxecWvfQSi+YuIAFT/BMx5 5VVw7z3sOg== Received: from schwarzy.home (lfbn-idf3-1-667-244.w86-252.abo.wanadoo.fr [86.252.237.244]) by mx.zoho.eu with SMTPS id 1694675912885139.77034598799514; Thu, 14 Sep 2023 09:18:32 +0200 (CEST) From: Edouard Klein Message-ID: Date: Thu, 14 Sep 2023 09:09:11 +0200 X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-ZohoMailClient: External Received-SPF: pass client-ip=31.186.226.225; envelope-from=edk@beaver-labs.com; helo=sender11-op-o11.zoho.eu 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: , 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 * gnu/packages/golang.scm (go-github-com-vishvananda-netns): New variable. --- gnu/packages/golang.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 57dee78330..5a00fd0a2b 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -13259,6 +13259,37 @@ (define-public go-src-elv-sh Windows.") (license license:bsd-2))) +(define-public go-github-com-vishvananda-netns + (package + (name "go-github-com-vishvananda-netns") + (version "0.0.4") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/vishvananda/netns") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0rci8c211m57nya9il81fz6459pia3dj5i4b16fp34vjrkcxliml")))) + (build-system go-build-system) + (arguments + '(#:tests? #f ;; From what I understand, and I may very well be wrong, + ;; the tests require root access. At least they fail with "operation not permitted". + #:import-path "github.com/vishvananda/netns")) + (propagated-inputs `(("go-golang-org-x-sys" ,go-golang-org-x-sys))) + (home-page "https://github.com/vishvananda/netns") + (synopsis "netns - network namespaces in go") + (description + "Package netns allows ultra-simple network namespace handling. @code{NsHandles} +can be retrieved and set. Note that the current namespace is thread local so +actions that set and reset namespaces should use @code{LockOSThread} to make +sure the namespace doesn't change due to a goroutine switch. It is best to +close @code{NsHandles} when you are done with them. This can be accomplished +via a `defer ns.Close()` on the handle. Changing namespaces requires elevated +privileges, so in most cases this code needs to be run as root.") + (license license:asl2.0))) + (define-public go-github-com-gorilla-websocket (package (name "go-github-com-gorilla-websocket")