From nobody Tue Mar 19 16:12:13 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TzcDs4nX2z5Fkbj; Tue, 19 Mar 2024 16:12:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TzcDs4JPSz4S5Z; Tue, 19 Mar 2024 16:12:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710864733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oKps07Wh3oD49KQocLDDi7WSF9T9Mpb9X/7DWmdNXXM=; b=m+4KN11YqNkSJId+bYU0kUUSq0STtzJ0D+7LxLr+lzwTuYIjZu7mBsYCwxQE3ojYkHBmaK 5i2NuDyOvR2v1tYSB9lTR2az+EX06cbVWMb/ARoX+3OF/tQ68FaAHS/Dp9fwKIV+TMHeD4 /WbzaTWzU5yx4FcYQDnECnmNF8e2xIWnSVoRDCBtVsdJ6d+R2+B9ugjoi7Wv3xlJ4mMuy0 WuHGLcTtysRAXddTEUjT2VhdRXChhX3hvQP4eW+2PM47wtm7ZVvEks8u17Z6V8fUcwJzPs rEFr29Ku64lDDoWfGwlHmg41Nb1Ks6t97MGQ/HqsNT1dMSxAQ7GAqAGH+gsu1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710864733; a=rsa-sha256; cv=none; b=qJGvCeNd3d/JZAA4mV8PWZdTh7EZCDkYEaJnECt0GT88eRlcQ7PzsScUo40LqzwoY+IQ3O 3N3B7d9YWFH1tJ4QQmd52o9JMATfdFs2OmO1YMrA1xC+vyNfnOy0OHdiw7e4qnCZttFaQF s8L7/ONedkZAvXdQdnhqH46qNBAPcrtYJXfK0CDNV78EIUHShpje+b5kPXbQNVXxJg3oKY f4bZFz+r7mDsbS+36mYipj2L3dImo8hNWtCF95WHeOEeoxj70OHlVbdR/yM4UF0qcM3KNY GQXLvv0jyIbChhamWrq282vLj+1jLm8/5mLmuy3YDLNHPuqyezoVwzS/L4tfuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710864733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oKps07Wh3oD49KQocLDDi7WSF9T9Mpb9X/7DWmdNXXM=; b=I4rL563TdbQjuMHHE6MdLHlj998HoGoxmVlG0X8XLt97Orrm6eATgzmeVNUWGSQ9UDj8q1 UTAHCjy3ljXAq7vlFZxU21d8/A4j+W93oMnuX5D9n6VR6ZlitcmgN9x4KK2Gn9exlGiLZT GdWT12COxze/yiVID7Q+OWtlGpgrOxBdgVD/RWdOzGJwBsotsnuIuq8NVzXv0pQOoDOcYa q55ipRRFwVHWvVsUO/LRXb2h8ItJ1uSUTaAr/JtcG7UB+YlwkXMJ/5D7rHgBXXpNbRSlMP Gy0XTUuVYhF6WuEwMozHk20yRHoR5aQZ9tDvlwNyWdAvpJaSKkVcmtulv2V57g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TzcDs3vr3zF9q; Tue, 19 Mar 2024 16:12:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42JGCDeg069420; Tue, 19 Mar 2024 16:12:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42JGCDF1069417; Tue, 19 Mar 2024 16:12:13 GMT (envelope-from git) Date: Tue, 19 Mar 2024 16:12:13 GMT Message-Id: <202403191612.42JGCDF1069417@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Cy Schubert Subject: git: 28df2926d2ad - main - net/rdist6: Add RDIST_RSH environment variable List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28df2926d2ad90e95a53276b8e0fb4eaccd84245 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/ports/commit/?id=28df2926d2ad90e95a53276b8e0fb4eaccd84245 commit 28df2926d2ad90e95a53276b8e0fb4eaccd84245 Author: Cy Schubert AuthorDate: 2024-03-19 16:11:00 +0000 Commit: Cy Schubert CommitDate: 2024-03-19 16:11:00 +0000 net/rdist6: Add RDIST_RSH environment variable Similar to rsync's RSYNC_RSH, add RDIST_RSH, for the same reason. --- net/rdist6/Makefile | 2 +- net/rdist6/files/patch-doc_rdist.man | 35 ++++++++++++++++++++++++++++++++++ net/rdist6/files/patch-src_rdist.c | 37 +++++++++++++++++++++++++++++++----- 3 files changed, 68 insertions(+), 6 deletions(-) diff --git a/net/rdist6/Makefile b/net/rdist6/Makefile index d740af9e0353..c8335f64dcff 100644 --- a/net/rdist6/Makefile +++ b/net/rdist6/Makefile @@ -1,6 +1,6 @@ PORTNAME= rdist PORTVERSION= 6.1.5 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= net MASTER_SITES= https://fossies.org/linux/misc/old/ \ http://www.magnicomp.com/download/rdist/ diff --git a/net/rdist6/files/patch-doc_rdist.man b/net/rdist6/files/patch-doc_rdist.man new file mode 100644 index 000000000000..0c92425b02b9 --- /dev/null +++ b/net/rdist6/files/patch-doc_rdist.man @@ -0,0 +1,35 @@ +--- doc/rdist.man.orig 1998-11-09 21:38:53.000000000 -0800 ++++ doc/rdist.man 2024-03-19 08:57:42.415646000 -0700 +@@ -242,6 +242,21 @@ + .RE + .sp + .fi ++The ++.I rsh(1) ++method can be overridden to ssh using the ++.I RDIST_RSH ++environment variable. ++.nf ++.sp ++.RS ++\fBexport RDIST_RSH=/usr/local/bin/ssh\fR ++.RE ++.sp ++.fi ++See the ++.I ENVIRONMENT ++section below. + .PP + If the + .I rcmd(3) +@@ -870,6 +885,10 @@ + .IP TMPDIR + Name of temporary directory to use. Default is + .B /tmp. ++.IP RDIST_RSH ++This environment variable lets you override the default remote shell used ++to transport the rdist protocol. By default it is net/bsdrcmds rsh. To ++use ssh simply assign the full pathname of the ssh binary. + .SH FILES + .nf + .ta \w'/tmp/rdist* 'u diff --git a/net/rdist6/files/patch-src_rdist.c b/net/rdist6/files/patch-src_rdist.c index e1752e33b5ad..b1b9dcde4dcb 100644 --- a/net/rdist6/files/patch-src_rdist.c +++ b/net/rdist6/files/patch-src_rdist.c @@ -1,6 +1,6 @@ ---- src/rdist.c.orig 1998-11-10 04:13:50 UTC -+++ src/rdist.c -@@ -62,8 +62,8 @@ static char copyright[] = +--- src/rdist.c.orig 1998-11-09 20:13:50.000000000 -0800 ++++ src/rdist.c 2024-03-19 09:08:42.194504000 -0700 +@@ -62,8 +62,8 @@ char *distfile = NULL; /* Name of distfile to use */ int maxchildren = MAXCHILDREN; /* Max no of concurrent PIDs */ int nflag = 0; /* Say without doing */ @@ -11,7 +11,16 @@ FILE *fin = NULL; /* Input file pointer */ struct group *gr = NULL; /* Static area for getgrent */ char localmsglist[] = "stdout=all:notify=all:syslog=nerror,ferror"; -@@ -107,12 +107,13 @@ main(argc, argv, envp) +@@ -72,6 +72,8 @@ + FILE *opendist(); + char *path_rdistd = _PATH_RDISTD; + char *path_remsh = _PATH_REMSH; ++char *path_remsh_env; ++#define RDIST_RSH_ENV "RDIST_RSH" + + /* + * Add a hostname to the host list +@@ -107,12 +109,13 @@ register char *cp; int cmdargs = 0; int c; @@ -26,7 +35,25 @@ if (cp = msgparseopts(localmsglist, TRUE)) { error("Bad builtin log option (%s): %s.", -@@ -176,10 +177,20 @@ main(argc, argv, envp) +@@ -155,6 +158,17 @@ + fatalerr("This version of rdist should not be installed setuid."); + #endif /* DIRECT_RCMD */ + ++ path_remsh_env = getenv(RDIST_RSH_ENV); ++ if (path_remsh_env) { ++ if (cp = searchpath(path_remsh_env)) ++ path_remsh = strdup(cp); ++ else { ++ error("Environment incorrect: No component of path \"%s\" exists.", ++ path_remsh_env); ++ exit(1); ++ } ++ } ++ + while ((c = getopt(argc, argv, optchars)) != -1) + switch (c) { + case 'l': +@@ -176,10 +190,20 @@ error("\"%s\" is not a number.", optarg); usage(); }