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 424921A9239 for ; Thu, 18 Nov 2021 10:20:50 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id D721684ECE; Thu, 18 Nov 2021 10:20:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 1535F84C13 for ; Thu, 18 Nov 2021 10:20:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id Q5tTKdchr3Zf for ; Thu, 18 Nov 2021 10:20:47 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id C012084D0E for ; Thu, 18 Nov 2021 10:20:47 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id AE91EFAEC; Thu, 18 Nov 2021 10:20:47 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1637230847111090" MIME-Version: 1.0 Date: Thu, 18 Nov 2021 10:20:47 +0000 From: "Kimmo Suominen" Subject: CVS commit: pkgsrc/shells To: pkgsrc-changes@NetBSD.org Reply-To: kim@netbsd.org X-Mailer: log_accum Message-Id: <20211118102047.AE91EFAEC@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1637230847111090 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: kim Date: Thu Nov 18 10:20:47 UTC 2021 Modified Files: pkgsrc/shells/standalone-tcsh: Makefile pkgsrc/shells/static-tcsh: Makefile pkgsrc/shells/tcsh: Makefile distinfo pkgsrc/shells/tcsh/patches: patch-sh.h patch-tcsh.man patch-tw.color.c Added Files: pkgsrc/shells/tcsh/patches: patch-sh.exp.c patch-sh.func.c Log Message: {,standalone-,static-}tcsh: Pull in some additional patches - Fix off-by-one, found by Coverity - Don't glob the filetest builtin arguments twice - Add more detail to "jobs -Z" usage To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 pkgsrc/shells/standalone-tcsh/Makefile cvs rdiff -u -r1.15 -r1.16 pkgsrc/shells/static-tcsh/Makefile cvs rdiff -u -r1.102 -r1.103 pkgsrc/shells/tcsh/Makefile cvs rdiff -u -r1.55 -r1.56 pkgsrc/shells/tcsh/distinfo cvs rdiff -u -r0 -r1.1 pkgsrc/shells/tcsh/patches/patch-sh.exp.c cvs rdiff -u -r0 -r1.3 pkgsrc/shells/tcsh/patches/patch-sh.func.c cvs rdiff -u -r1.1 -r1.2 pkgsrc/shells/tcsh/patches/patch-sh.h \ pkgsrc/shells/tcsh/patches/patch-tcsh.man \ pkgsrc/shells/tcsh/patches/patch-tw.color.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1637230847111090 Content-Disposition: inline Content-Length: 9611 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/shells/standalone-tcsh/Makefile diff -u pkgsrc/shells/standalone-tcsh/Makefile:1.36 pkgsrc/shells/standalone-tcsh/Makefile:1.37 --- pkgsrc/shells/standalone-tcsh/Makefile:1.36 Mon Nov 15 19:54:11 2021 +++ pkgsrc/shells/standalone-tcsh/Makefile Thu Nov 18 10:20:47 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.36 2021/11/15 19:54:11 kim Exp $ +# $NetBSD: Makefile,v 1.37 2021/11/18 10:20:47 kim Exp $ # # FIXME: This is because of PREFIX=/ below. @@ -6,7 +6,7 @@ CHECK_FILES_SUPPORTED= no NOT_FOR_UNPRIVILEGED= yes PKGNAME= standalone-${DISTNAME} -PKGREVISION= 2 +PKGREVISION= 3 PATCHDIR= ../../shells/tcsh/patches PKGDIR= ../../shells/tcsh Index: pkgsrc/shells/static-tcsh/Makefile diff -u pkgsrc/shells/static-tcsh/Makefile:1.15 pkgsrc/shells/static-tcsh/Makefile:1.16 --- pkgsrc/shells/static-tcsh/Makefile:1.15 Mon Nov 15 19:56:03 2021 +++ pkgsrc/shells/static-tcsh/Makefile Thu Nov 18 10:20:47 2021 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.15 2021/11/15 19:56:03 kim Exp $ +# $NetBSD: Makefile,v 1.16 2021/11/18 10:20:47 kim Exp $ # PKGNAME= static-${DISTNAME} -PKGREVISION= 2 +PKGREVISION= 3 .include "../../shells/tcsh/Makefile.common" Index: pkgsrc/shells/tcsh/Makefile diff -u pkgsrc/shells/tcsh/Makefile:1.102 pkgsrc/shells/tcsh/Makefile:1.103 --- pkgsrc/shells/tcsh/Makefile:1.102 Mon Nov 15 17:11:58 2021 +++ pkgsrc/shells/tcsh/Makefile Thu Nov 18 10:20:47 2021 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.102 2021/11/15 17:11:58 kim Exp $ +# $NetBSD: Makefile,v 1.103 2021/11/18 10:20:47 kim Exp $ .include "../../shells/tcsh/Makefile.common" -PKGREVISION= 2 +PKGREVISION= 3 .include "../../mk/bsd.pkg.mk" Index: pkgsrc/shells/tcsh/distinfo diff -u pkgsrc/shells/tcsh/distinfo:1.55 pkgsrc/shells/tcsh/distinfo:1.56 --- pkgsrc/shells/tcsh/distinfo:1.55 Thu Nov 18 08:55:34 2021 +++ pkgsrc/shells/tcsh/distinfo Thu Nov 18 10:20:47 2021 @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.55 2021/11/18 08:55:34 kim Exp $ +$NetBSD: distinfo,v 1.56 2021/11/18 10:20:47 kim Exp $ BLAKE2s (tcsh-6.23.00.tar.gz) = a61b142efc2ca927cb33ea4eb87c0530cacc0c79ff1c30d5e9022a4404cef72d SHA512 (tcsh-6.23.00.tar.gz) = 8ea491e9409f12ab113bf5551398cb827692a50340318b050d0f8278d3cd9c133ba89a407dc692d9c4bd69957ecd6d4d92db7ccfacc7064ace3b09e3bd562f30 @@ -6,6 +6,8 @@ Size (tcsh-6.23.00.tar.gz) = 1010250 byt SHA1 (patch-Makefile.in) = 16ae4c595c8e23be1acbfa0263334df569300a79 SHA1 (patch-config_f.h) = 715d939e8a8f4917bd219dccd91d5c49ae502939 SHA1 (patch-nls_Makefile.in) = 58d859e8a50e6436b9bc6514497eb876426d92d7 -SHA1 (patch-sh.h) = ac6211ddd5e552e9baec2d35aed5e7e573cab04e -SHA1 (patch-tcsh.man) = 7ced0fbcc2bdae180d3e88acda44e189ca37abc6 -SHA1 (patch-tw.color.c) = 9ad72f83e6ebf21bb587cc6c83657a2b4bdee0e6 +SHA1 (patch-sh.exp.c) = c65aeedf8950d2e298d1d0a5dbe2261eba18ff77 +SHA1 (patch-sh.func.c) = f06cddb996915e79e372d56984f3798a68437e05 +SHA1 (patch-sh.h) = 487282e85cd6f21a703d7d5332c47f113ca2fea8 +SHA1 (patch-tcsh.man) = 1265cc74450170f65c282921859c3b29ef6caa39 +SHA1 (patch-tw.color.c) = 39c1f8a0821b8254c6bb4729b5e1504c6a83feb5 Index: pkgsrc/shells/tcsh/patches/patch-sh.h diff -u pkgsrc/shells/tcsh/patches/patch-sh.h:1.1 pkgsrc/shells/tcsh/patches/patch-sh.h:1.2 --- pkgsrc/shells/tcsh/patches/patch-sh.h:1.1 Sun May 25 03:59:17 2014 +++ pkgsrc/shells/tcsh/patches/patch-sh.h Thu Nov 18 10:20:47 2021 @@ -1,10 +1,15 @@ -$NetBSD: patch-sh.h,v 1.1 2014/05/25 03:59:17 rodent Exp $ +$NetBSD: patch-sh.h,v 1.2 2021/11/18 10:20:47 kim Exp $ Add OpenBSD support. ---- sh.h.orig 2011-04-14 18:25:25.000000000 +0000 -+++ sh.h -@@ -310,7 +310,7 @@ typedef long tcsh_number_t; +Don't glob the filetest builtin arguments twice: + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=905649 + +https://github.com/tcsh-org/tcsh/commit/8a83d4c717ad4a56450751986b65ccd6ea9eed8a.patch + +--- sh.h.orig 2021-11-11 09:54:05.000000000 +0000 ++++ sh.h 2021-11-18 10:03:48.441361892 +0000 +@@ -320,7 +320,7 @@ * redefines malloc(), so we define the following * to avoid it. */ @@ -13,3 +18,12 @@ Add OpenBSD support. # define NO_FIX_MALLOC # include # else /* glibc */ +@@ -1299,4 +1299,8 @@ + + #include "tc.nls.h" + ++#define TEXP_IGNORE 1 /* in ignore, it means to ignore value, just parse */ ++#define TEXP_NOGLOB 2 /* in ignore, it means not to globone */ ++ ++ + #endif /* _h_sh */ Index: pkgsrc/shells/tcsh/patches/patch-tcsh.man diff -u pkgsrc/shells/tcsh/patches/patch-tcsh.man:1.1 pkgsrc/shells/tcsh/patches/patch-tcsh.man:1.2 --- pkgsrc/shells/tcsh/patches/patch-tcsh.man:1.1 Sun Nov 14 22:15:13 2021 +++ pkgsrc/shells/tcsh/patches/patch-tcsh.man Thu Nov 18 10:20:47 2021 @@ -1,12 +1,42 @@ -$NetBSD: patch-tcsh.man,v 1.1 2021/11/14 22:15:13 kim Exp $ +$NetBSD: patch-tcsh.man,v 1.2 2021/11/18 10:20:47 kim Exp $ Document ln=target +Add more detail to "jobs -Z" usage. https://github.com/tcsh-org/tcsh/commit/b98d6544234e9258156f08c8b559ed6253f2bc49.patch +https://github.com/tcsh-org/tcsh/commit/a81394cfaca1b9cf4d9cf8d3f4d8c0126b8b09d0.patch ---- tcsh.man -+++ tcsh.man -@@ -5088,6 +5088,9 @@ A few terminal programs do not recognize the default end code +--- tcsh.man.orig 2021-11-11 09:54:05.000000000 +0000 ++++ tcsh.man 2021-11-18 10:08:01.436706660 +0000 +@@ -2972,16 +2972,22 @@ + .B inlib \fIshared-library\fR ... (+) + Adds each \fIshared-library\fR to the current environment. There is no way + to remove a shared library. (Domain/OS only) ++.PP ++.B jobs \fR[\fB\-l\fR] ++.PD 0 + .TP 8 +-.B jobs \fR[\fB\-lZ\fR] ++.B jobs \-Z \fR[\fItitle\fR] (+) + Lists the active jobs. With \fB\-l\fR, lists process + IDs in addition to the normal information. On TCF systems, prints + the site on which each job is executing. +-The \fB-Z\fR option sets the process title using setproctitle(3) +-where available. ++.PD ++.RS +8 ++.PP ++The \fB-Z\fR option sets the process title to \fItitle\fR using ++setproctitle(3) where available. ++If no \fItitle\fR is provided, the process title will be cleared. ++.RE + .PP +-.PD 0 +-.TP 8 + .B kill \fR[\fB\-s \fIsignal\fR] \fB%\fIjob\fR|\fIpid\fR ... + .PD 0 + .TP 8 +@@ -5088,6 +5094,9 @@ properly. If all text gets colorized after you do a directory listing, try changing the \fBno\fR and \fBfi\fR codes from 0 to the numerical codes for your standard fore- and background colors. Index: pkgsrc/shells/tcsh/patches/patch-tw.color.c diff -u pkgsrc/shells/tcsh/patches/patch-tw.color.c:1.1 pkgsrc/shells/tcsh/patches/patch-tw.color.c:1.2 --- pkgsrc/shells/tcsh/patches/patch-tw.color.c:1.1 Sun Nov 14 22:15:13 2021 +++ pkgsrc/shells/tcsh/patches/patch-tw.color.c Thu Nov 18 10:20:47 2021 @@ -1,13 +1,19 @@ -$NetBSD: patch-tw.color.c,v 1.1 2021/11/14 22:15:13 kim Exp $ +$NetBSD: patch-tw.color.c,v 1.2 2021/11/18 10:20:47 kim Exp $ Fix the ln=target code by NUL terminating the result of readlink(2). +Fix off-by-one, found by Coverity https://github.com/tcsh-org/tcsh/commit/247a7d6649621fdc40c31ad81c4967413213b9d2.patch +https://github.com/tcsh-org/tcsh/commit/92e557e324655906b73bad5253885051bbb7162e.patch ---- tw.color.c -+++ tw.color.c -@@ -482,10 +482,12 @@ print_with_color(const Char *filename, size_t len, Char suffix) - char buf[MAXPATHLEN]; +--- tw.color.c.orig 2021-11-11 09:54:05.000000000 +0000 ++++ tw.color.c 2021-11-18 09:54:30.997940824 +0000 +@@ -479,13 +479,15 @@ + if (suffix == '@' && color_as_referent) { + char *f = short2str(filename); + Char c = suffix; +- char buf[MAXPATHLEN]; ++ char buf[MAXPATHLEN + 1]; while (c == '@') { - if (readlink(f, buf, MAXPATHLEN) == -1) { Added files: Index: pkgsrc/shells/tcsh/patches/patch-sh.exp.c diff -u /dev/null pkgsrc/shells/tcsh/patches/patch-sh.exp.c:1.1 --- /dev/null Thu Nov 18 10:20:47 2021 +++ pkgsrc/shells/tcsh/patches/patch-sh.exp.c Thu Nov 18 10:20:47 2021 @@ -0,0 +1,32 @@ +$NetBSD: patch-sh.exp.c,v 1.1 2021/11/18 10:20:47 kim Exp $ + +Don't glob the filetest builtin arguments twice: + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=905649 + +https://github.com/tcsh-org/tcsh/commit/8a83d4c717ad4a56450751986b65ccd6ea9eed8a.patch + +--- sh.exp.c ++++ sh.exp.c +@@ -36,9 +36,6 @@ + * C shell + */ + +-#define TEXP_IGNORE 1 /* in ignore, it means to ignore value, just parse */ +-#define TEXP_NOGLOB 2 /* in ignore, it means not to globone */ +- + #define ADDOP 1 + #define MULOP 2 + #define EQOP 4 +@@ -677,7 +674,11 @@ filetest(Char *cp, Char ***vp, int ignore) + dp = *(*vp)++; + if (ignore & TEXP_IGNORE) + return (Strsave(STRNULL)); +- ep = globone(dp, G_APPEND); ++ if ((ignore & TEXP_NOGLOB) == 0) { ++ ep = globone(dp, G_APPEND); ++ } else { ++ ep = Strsave(dp); ++ } + cleanup_push(ep, xfree); + ft = &cp[1]; + do Index: pkgsrc/shells/tcsh/patches/patch-sh.func.c diff -u /dev/null pkgsrc/shells/tcsh/patches/patch-sh.func.c:1.3 --- /dev/null Thu Nov 18 10:20:47 2021 +++ pkgsrc/shells/tcsh/patches/patch-sh.func.c Thu Nov 18 10:20:47 2021 @@ -0,0 +1,18 @@ +$NetBSD: patch-sh.func.c,v 1.3 2021/11/18 10:20:47 kim Exp $ + +Don't glob the filetest builtin arguments twice: + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=905649 + +https://github.com/tcsh-org/tcsh/commit/8a83d4c717ad4a56450751986b65ccd6ea9eed8a.patch + +--- sh.func.c ++++ sh.func.c +@@ -227,7 +227,7 @@ dofiletest(Char **v, struct command *c) + cleanup_push(globbed, blk_cleanup); + + while (*(fileptr = v++) != NULL) { +- res = filetest(ftest, &fileptr, 0); ++ res = filetest(ftest, &fileptr, TEXP_NOGLOB); + cleanup_push(res, xfree); + xprintf("%S", res); + cleanup_until(res); --_----------=_1637230847111090--