From: "Alex Griffin" <a@ajgrf.com>
To: "Efraim Flashner" <efraim@flashner.co.il>,
"Ludovic Courtès" <ludo@gnu.org>
Cc: 38286@debbugs.gnu.org
Subject: [bug#38286] [PATCH] gnu: Add netcat-openbsd.
Date: Thu, 21 Nov 2019 21:49:05 +0000 [thread overview]
Message-ID: <550ee09b-7126-4acd-87ab-4e3a77cb346c@www.fastmail.com> (raw)
In-Reply-To: <20191121101755.GD15074@E5400>
[-- Attachment #1: Type: text/plain, Size: 338 bytes --]
On Thu, Nov 21, 2019, at 10:17 AM, Efraim Flashner wrote:
> Here is Debian's packaging repo for netcat-openbsd with their patches
> applied: https://salsa.debian.org/debian/netcat-openbsd/tree/debian/1.203-2
Thanks, I was able to simplify the package a lot by fetching that repo instead! The revised patch is attached.
--
Alex Griffin
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-netcat-openbsd.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-netcat-openbsd.patch", Size: 4115 bytes --]
From 05a47d99a60e46eef9f82c73cf4041810470f5c7 Mon Sep 17 00:00:00 2001
From: Alex Griffin <a@ajgrf.com>
Date: Tue, 19 Nov 2019 19:59:32 -0600
Subject: [PATCH] gnu: Add netcat-openbsd.
* gnu/packages/admin.scm (netcat-openbsd): New variable.
---
gnu/packages/admin.scm | 59 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 761b26a8d6..f07416c8a1 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -27,6 +27,7 @@
;;; Copyright © 2019 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>
;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -67,6 +68,7 @@
#:use-module (gnu packages file)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages readline)
+ #:use-module (gnu packages libbsd)
#:use-module (gnu packages linux)
#:use-module (gnu packages lua)
#:use-module (gnu packages guile)
@@ -87,6 +89,7 @@
#:use-module (gnu packages glib)
#:use-module (gnu packages openldap)
#:use-module (gnu packages mcrypt)
+ #:use-module (gnu packages patchutils)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages popt)
#:use-module (gnu packages python)
@@ -620,6 +623,62 @@ and exploration tool, since it can create almost any kind of connection you
would need and has several interesting built-in capabilities.")
(license license:gpl2+)))
+(define-public netcat-openbsd
+ (package
+ (name "netcat-openbsd")
+ (version "1.203-2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://salsa.debian.org/debian/netcat-openbsd.git")
+ (commit (string-append "debian/" version))))
+ (sha256
+ (base32
+ "0j85gzbjzs6yrhgabh3zkwzd27qkr5s0zjjczl0hah8q7yhrjk3m"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; no test suite
+ #:make-flags
+ (list "CC=gcc"
+ (string-append "PREFIX=" (assoc-ref %outputs "out"))
+ (string-append "CFLAGS=-I" (assoc-ref %build-inputs "libbsd") "/include")
+ "LDFLAGS=-lbsd")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'build 'patch
+ (lambda _
+ (setenv "QUILT_PATCHES" "debian/patches")
+ (invoke "quilt" "push" "-a")
+ #t))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (doc (string-append out "/share/doc/netcat-openbsd-" ,version))
+ (man (string-append out "/share/man/man1")))
+ (install-file "nc" bin)
+ (install-file "nc.1" man)
+ (install-file "debian/copyright" doc)
+ #t))))))
+ (inputs `(("libbsd" ,libbsd)))
+ (native-inputs `(("pkg-config" ,pkg-config)
+ ("quilt" ,quilt)))
+ (home-page "https://packages.debian.org/sid/netcat-openbsd")
+ (synopsis "TCP/IP swiss army knife")
+ (description
+ "A simple Unix utility which reads and writes data across network
+connections using TCP or UDP protocol. It is designed to be a reliable
+\"back-end\" tool that can be used directly or easily driven by other programs
+and scripts. At the same time it is a feature-rich network debugging and
+exploration tool, since it can create almost any kind of connection you would
+need and has several interesting built-in capabilities.
+
+This package contains the OpenBSD rewrite of netcat, including support for
+IPv6, proxies, and Unix sockets.")
+ (license (list license:bsd-3
+ license:bsd-2)))) ; atomicio.*, socks.c
+
(define-public sipcalc
(package
(name "sipcalc")
--
2.24.0
next prev parent reply other threads:[~2019-11-21 21:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-20 2:10 [bug#38286] [PATCH] gnu: Add netcat-openbsd Alex Griffin
2019-11-21 9:09 ` Ludovic Courtès
2019-11-21 10:17 ` Efraim Flashner
2019-11-21 21:49 ` Alex Griffin [this message]
2019-11-21 22:09 ` Alex Griffin
2019-11-21 22:15 ` Alex Griffin
2019-11-24 11:03 ` Ludovic Courtès
2019-11-25 15:50 ` bug#38286: " Alex Griffin
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=550ee09b-7126-4acd-87ab-4e3a77cb346c@www.fastmail.com \
--to=a@ajgrf.com \
--cc=38286@debbugs.gnu.org \
--cc=efraim@flashner.co.il \
--cc=ludo@gnu.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).