From patchwork Fri Mar 11 03:18:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dominic Martinez X-Patchwork-Id: 37739 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 A6BB327BBEA; Fri, 11 Mar 2022 03:21:29 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, 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 72CF527BBE9 for ; Fri, 11 Mar 2022 03:21:29 +0000 (GMT) Received: from localhost ([::1]:48384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nSVqK-0001HC-EE for patchwork@mira.cbaines.net; Thu, 10 Mar 2022 22:21:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51240) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nSVp1-0000D7-Ig for guix-patches@gnu.org; Thu, 10 Mar 2022 22:20:09 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:42258) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nSVp0-0000YI-O3 for guix-patches@gnu.org; Thu, 10 Mar 2022 22:20:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nSVp0-0001Q0-Kn for guix-patches@gnu.org; Thu, 10 Mar 2022 22:20:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54335] [PATCH 09/14] gnu: Add go-github-com-vishvananda-netns. Resent-From: Dominic Martinez Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 11 Mar 2022 03:20:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54335 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54335@debbugs.gnu.org Cc: Dominic Martinez Received: via spool by 54335-submit@debbugs.gnu.org id=B54335.16469687765337 (code B ref 54335); Fri, 11 Mar 2022 03:20:06 +0000 Received: (at 54335) by debbugs.gnu.org; 11 Mar 2022 03:19:36 +0000 Received: from localhost ([127.0.0.1]:36147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nSVoW-0001O1-BA for submit@debbugs.gnu.org; Thu, 10 Mar 2022 22:19:36 -0500 Received: from mailout-pe-a.jellyfish.systems ([198.54.127.66]:56824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nSVoU-0001NV-G0 for 54335@debbugs.gnu.org; Thu, 10 Mar 2022 22:19:34 -0500 Received: from NEW-01-3.privateemail.com (unknown [10.35.5.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout-pe-a.jellyfish.systems (Postfix) with ESMTPSA id 4KFB4J1q33z3wpY for <54335@debbugs.gnu.org>; Fri, 11 Mar 2022 03:19:28 +0000 (UTC) Received: from MTA-08.privateemail.com (unknown [10.50.14.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by NEW-01-3.privateemail.com (Postfix) with ESMTPS id 2E1AF1005882 for <54335@debbugs.gnu.org>; Thu, 10 Mar 2022 22:19:28 -0500 (EST) Received: from mta-08.privateemail.com (localhost [127.0.0.1]) by mta-08.privateemail.com (Postfix) with ESMTP id 07A6418000A1; Thu, 10 Mar 2022 22:19:28 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dominicm.dev; s=default; t=1646968768; bh=qp3sWWxB0YbCneQ4/lhRq1GH4Tj/VQTTN/MKvtLylbM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y7abZuMJ/FLpoRSrzIzDTg/7TMXS5CYSCckr1sP5hdzHSib6Ws6KnGng/cH6f901F gBRZHDBzfR1tKERWLPnCeK8tBQWfB61fxqgFmx57zGN3m1s/wJOs2zzSaCHsd33XHt Wyy+YbX/Jy042ImACqnUcYGXbUNbW2gOSCRHp1vIeapRMVfLNOULLiUMwcNnNdPmtD WXN+K8f70BMKzajNouLfGUMevGDL1xfZ9bBM9NDekQ7F5MlX5q5HHTNmgURgT+k1NZ YxjZcaaDdN+RjEg1iqHGluCYSx+EShhVk/fX+0F5F7v5jqxfh77xAhbdUn1C5nwogW 56OgO9wscOXow== Received: from localhost.localdomain (unknown [10.20.151.169]) by mta-08.privateemail.com (Postfix) with ESMTPA id 8C06C18000A0; Thu, 10 Mar 2022 22:19:25 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dominicm.dev; s=default; t=1646968767; bh=qp3sWWxB0YbCneQ4/lhRq1GH4Tj/VQTTN/MKvtLylbM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oyyBHrsdyxNlJh1tRB6rWtV21h8nBlfBdzT1BP8f7jy/h+NTA23Q3c9WRsp2ymDn+ ZY46l7rk7BFYYs7jeeBSr6NrU2FI06fmFanGbyqBpjoXpQZD9r5vERPSm40Vtx8x10 N+VhXSOSATWex3QADR3fprMoDc9yLVR1oBa8QAM6j5n06qwqAeIZSMKnkMCoym8FPr UHMSNkOF7xbdFbgL1pRAesVtIWednXEL+4v8v02XLhVPPJZZi+MXkr2tk8yjYSskxz VTweKozBti7UzAEtzy4wkidDXA/yyqXG8BtzFx13Tq7sOdQtVB1lI0epFUK7COK4JH fOzZfLBGrfu0g== From: Dominic Martinez Date: Thu, 10 Mar 2022 22:18:49 -0500 Message-Id: <20220311031849.12681-9-dom@dominicm.dev> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220311031849.12681-1-dom@dominicm.dev> References: <20220311031849.12681-1-dom@dominicm.dev> MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/golang.scm (go-github-com-vishvananda-netns): New variable. --- gnu/packages/golang.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index a58b404079..bcf50439c7 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -9955,3 +9955,33 @@ (define-public go-github-com-songgao-water library for Go that efficiently works with standard packages like io, bufio, etc.. Use waterutil with it to work with TUN/TAP packets/frames.") (license license:bsd-3))) + +(define-public go-github-com-vishvananda-netns + (package + (name "go-github-com-vishvananda-netns") + (version "0.0.0-20211101163701-50045581ed74") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/vishvananda/netns") + (commit (go-version->git-ref version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0kam780m036mk77fmc0w0z6qz4b5awkllcd1dps71zd1n82mr407")))) + (build-system go-build-system) + (arguments '(#:tests? #f ; Tests require root privileges + #:import-path "github.com/vishvananda/netns")) + (native-inputs + (list go-golang-org-x-sys)) + (home-page "https://github.com/vishvananda/netns") + (synopsis "Simple network namespace handling for Go") + (description + "Package netns allows ultra-simple network namespace handling. NsHandles can be +retrieved and set. Note that the current namespace is thread local so actions +that set and reset namespaces should use LockOSThread to make sure the namespace +doesn't change due to a goroutine switch. It is best to close 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)))