Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified)) by mollari.NetBSD.org (Postfix) with ESMTPS id 64ECC1A9239 for ; Mon, 15 Nov 2021 11:37:01 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id 9E4CF84D69; Mon, 15 Nov 2021 11:37:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id D912A84D61 for ; Mon, 15 Nov 2021 11:36:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id HZRihDLWCMoU for ; Mon, 15 Nov 2021 11:36:59 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 11B3D84CE0 for ; Mon, 15 Nov 2021 11:36:59 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 09F1FFAEC; Mon, 15 Nov 2021 11:36:59 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1636976219182120" MIME-Version: 1.0 Date: Mon, 15 Nov 2021 11:36:59 +0000 From: "Amitai Schleier" Subject: CVS commit: pkgsrc/net/tcpexec To: pkgsrc-changes@NetBSD.org Reply-To: schmonz@netbsd.org X-Mailer: log_accum Message-Id: <20211115113659.09F1FFAEC@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1636976219182120 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: schmonz Date: Mon Nov 15 11:36:58 UTC 2021 Added Files: pkgsrc/net/tcpexec: DESCR Makefile PLIST distinfo pkgsrc/net/tcpexec/patches: patch-Makefile patch-tcpexec.c Log Message: Add tcpexec, a minimal UCSPI inetd. It attaches the standard input and output of a command to a TCP socket. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 pkgsrc/net/tcpexec/DESCR pkgsrc/net/tcpexec/Makefile \ pkgsrc/net/tcpexec/PLIST pkgsrc/net/tcpexec/distinfo cvs rdiff -u -r0 -r1.1 pkgsrc/net/tcpexec/patches/patch-Makefile \ pkgsrc/net/tcpexec/patches/patch-tcpexec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1636976219182120 Content-Disposition: inline Content-Length: 4025 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Added files: Index: pkgsrc/net/tcpexec/DESCR diff -u /dev/null pkgsrc/net/tcpexec/DESCR:1.1 --- /dev/null Mon Nov 15 11:36:58 2021 +++ pkgsrc/net/tcpexec/DESCR Mon Nov 15 11:36:58 2021 @@ -0,0 +1,2 @@ +tcpexec is a minimal UCSPI inetd. It attaches the standard input and +output of a command to a TCP socket. Index: pkgsrc/net/tcpexec/Makefile diff -u /dev/null pkgsrc/net/tcpexec/Makefile:1.1 --- /dev/null Mon Nov 15 11:36:58 2021 +++ pkgsrc/net/tcpexec/Makefile Mon Nov 15 11:36:58 2021 @@ -0,0 +1,25 @@ +# $NetBSD: Makefile,v 1.1 2021/11/15 11:36:58 schmonz Exp $ + +GITHUB_PROJECT= tcpexec +GITHUB_TAG= 7e02e755aca4cb377910b729e43de8e3fb48eece +DISTNAME= ${GITHUB_TAG} +PKGNAME= ${GITHUB_PROJECT}-0.1.1 +CATEGORIES= net +MASTER_SITES= ${MASTER_SITE_GITHUB:=msantos/} +DIST_SUBDIR= ${GITHUB_PROJECT} + +MAINTAINER= schmonz@NetBSD.org +HOMEPAGE= https://github.com/msantos/tcpexec/ +COMMENT= Minimal UCSPI inetd +LICENSE= isc + +TEST_DEPENDS+= bats-[0-9]*:../../devel/bats +TEST_TARGET= test # XXX needs to be run as root + +INSTALLATION_DIRS= bin share/doc/${PKGBASE} + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/tcpexec ${DESTDIR}${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/README.md ${DESTDIR}${PREFIX}/share/doc/${PKGBASE} + +.include "../../mk/bsd.pkg.mk" Index: pkgsrc/net/tcpexec/PLIST diff -u /dev/null pkgsrc/net/tcpexec/PLIST:1.1 --- /dev/null Mon Nov 15 11:36:58 2021 +++ pkgsrc/net/tcpexec/PLIST Mon Nov 15 11:36:58 2021 @@ -0,0 +1,3 @@ +@comment $NetBSD: PLIST,v 1.1 2021/11/15 11:36:58 schmonz Exp $ +bin/tcpexec +share/doc/tcpexec/README.md Index: pkgsrc/net/tcpexec/distinfo diff -u /dev/null pkgsrc/net/tcpexec/distinfo:1.1 --- /dev/null Mon Nov 15 11:36:58 2021 +++ pkgsrc/net/tcpexec/distinfo Mon Nov 15 11:36:58 2021 @@ -0,0 +1,7 @@ +$NetBSD: distinfo,v 1.1 2021/11/15 11:36:58 schmonz Exp $ + +BLAKE2s (tcpexec/7e02e755aca4cb377910b729e43de8e3fb48eece-7e02e755aca4cb377910b729e43de8e3fb48eece.tar.gz) = 3e833e3aeb0a7bf8023ee870b1e5a1c39c10804037fbb6541470a018c646db0b +SHA512 (tcpexec/7e02e755aca4cb377910b729e43de8e3fb48eece-7e02e755aca4cb377910b729e43de8e3fb48eece.tar.gz) = d1ad7ff52499a3287cadf4f44ce012a2bb9eeeaca2c77c75caa12fdcff2c09b60fefa396ebcb4dc3478acea1340e8ba322955ed9bb8f73af33a39254e545f801 +Size (tcpexec/7e02e755aca4cb377910b729e43de8e3fb48eece-7e02e755aca4cb377910b729e43de8e3fb48eece.tar.gz) = 4219 bytes +SHA1 (patch-Makefile) = 17d61c1e7da32f51f528e282152f47601065c31b +SHA1 (patch-tcpexec.c) = d87d6cde188efc84905348cac092de9488078741 Index: pkgsrc/net/tcpexec/patches/patch-Makefile diff -u /dev/null pkgsrc/net/tcpexec/patches/patch-Makefile:1.1 --- /dev/null Mon Nov 15 11:36:58 2021 +++ pkgsrc/net/tcpexec/patches/patch-Makefile Mon Nov 15 11:36:58 2021 @@ -0,0 +1,24 @@ +$NetBSD: patch-Makefile,v 1.1 2021/11/15 11:36:58 schmonz Exp $ + +Use pkgsrc-provided CFLAGS and LDFLAGS. + +--- Makefile.orig 2021-11-13 13:34:51.000000000 +0000 ++++ Makefile +@@ -2,14 +2,13 @@ + + PROG= tcpexec + +-CFLAGS ?= -D_FORTIFY_SOURCE=2 -O2 -fstack-protector-strong \ +- -Wformat -Werror=format-security \ ++CFLAGS ?= -Wformat -Werror=format-security \ + -fno-strict-aliasing +-LDFLAGS += -Wl,-z,relro,-z,now ++LDFLAGS ?= -Wl,-z,relro,-z,now + + RM ?= rm + +-TCPEXEC_CFLAGS ?= -g -Wall -fwrapv ++TCPEXEC_CFLAGS ?= -Wall -fwrapv + + CFLAGS += $(TCPEXEC_CFLAGS) + Index: pkgsrc/net/tcpexec/patches/patch-tcpexec.c diff -u /dev/null pkgsrc/net/tcpexec/patches/patch-tcpexec.c:1.1 --- /dev/null Mon Nov 15 11:36:58 2021 +++ pkgsrc/net/tcpexec/patches/patch-tcpexec.c Mon Nov 15 11:36:58 2021 @@ -0,0 +1,16 @@ +$NetBSD: patch-tcpexec.c,v 1.1 2021/11/15 11:36:58 schmonz Exp $ + +Fix macOS build. + +--- tcpexec.c.orig 2021-11-13 13:34:51.000000000 +0000 ++++ tcpexec.c +@@ -152,6 +152,9 @@ static int tcpexec_listen(const char *ad + } + + for (rp = res; rp != NULL; rp = rp->ai_next) { ++#ifndef SOCK_CLOEXEC ++#define SOCK_CLOEXEC 0 ++#endif + fd = socket(rp->ai_family, rp->ai_socktype | SOCK_CLOEXEC, rp->ai_protocol); + + if (fd == -1) --_----------=_1636976219182120--