{standalone-,static-,}tcsh: Update to 6.21.00 pkgsrc changes: - Add patch-nls_Makefile.in to avoid +x bit in *.cat files - Remove no longer needed patches (all applied upstream): patch-ed.chared.c, patch-ed.inputl.c, patch-nls-catgen, patch-sh.func.c, patch-tw.init.c Changes: V6.21.00 - 20190508 ------------------- - Abort history loading on words and lines too long https://bugzilla.redhat.com/show_bug.cgi?id=1598502 - PR/37: Introduce GetCmdChar() to avoid open coding array access. make closem() not close sockets so as not to affect nss_ldap. tcsh never creates sockets so that's ok (Miloslav Trmac) - PR/597: Make rmstar work with aliased rm - convert match() from recursive to backtracking. - Handle 8 bit characters in bindkey (Werner Fink) - Look for tgetent in libtinfo as well (Werner Fink) - Don't play pointer tricks that are undefined in modern c (Brooks Davis) - Fix out of bounds read (Brooks Davis) - Fix type of read in prompt confirmation (eg. rmstar) (David Kaspar) - PR/471: Delay arginp parsing Index: standalone-tcsh/Makefile =================================================================== RCS file: /cvsroot/pkgsrc/shells/standalone-tcsh/Makefile,v retrieving revision 1.28 diff -u -p -r1.28 Makefile --- standalone-tcsh/Makefile 23 Aug 2017 17:52:47 -0000 1.28 +++ standalone-tcsh/Makefile 8 May 2019 19:47:30 -0000 @@ -6,7 +6,7 @@ CHECK_FILES_SUPPORTED= no NOT_FOR_UNPRIVILEGED= yes PKGNAME= standalone-${DISTNAME} -PKGREVISION= 2 # ALWAYS needs to be set; 0 if none. +PKGREVISION= 0 # ALWAYS needs to be set; 0 if none. WRKSRC= ${WRKDIR}/${DISTNAME} PATCHDIR= ${.CURDIR}/../../shells/tcsh/patches Index: static-tcsh/Makefile =================================================================== RCS file: /cvsroot/pkgsrc/shells/static-tcsh/Makefile,v retrieving revision 1.10 diff -u -p -r1.10 Makefile --- static-tcsh/Makefile 23 Aug 2017 17:52:59 -0000 1.10 +++ static-tcsh/Makefile 8 May 2019 19:47:30 -0000 @@ -11,7 +11,7 @@ DESCR_SRC= ${.CURDIR}/../../shells/tcsh CONFLICTS= tcsh-[0-9]* PKGNAME= static-${DISTNAME} -PKGREVISION= 3 # ALWAYS needs to be set; 0 if none. +PKGREVISION= 0 # ALWAYS needs to be set; 0 if none. # SunOS 5.10 stopped shipping static libraries. NOT_FOR_PLATFORM+= SunOS-5.1[0-9]-* Index: tcsh/Makefile =================================================================== RCS file: /cvsroot/pkgsrc/shells/tcsh/Makefile,v retrieving revision 1.87 diff -u -p -r1.87 Makefile --- tcsh/Makefile 4 Sep 2017 18:01:01 -0000 1.87 +++ tcsh/Makefile 8 May 2019 19:47:30 -0000 @@ -3,8 +3,8 @@ # used by shells/standalone-tcsh/Makefile # used by shells/static-tcsh/Makefile -DISTNAME= tcsh-6.20.00 -PKGREVISION?= 2 # use ?= to allow for overrides. +DISTNAME= tcsh-6.21.00 +PKGREVISION?= 0 # use ?= to allow for overrides. CATEGORIES= shells MASTER_SITES= ftp://ftp.astron.com/pub/tcsh/ MASTER_SITES+= ftp://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/ Index: tcsh/distinfo =================================================================== RCS file: /cvsroot/pkgsrc/shells/tcsh/distinfo,v retrieving revision 1.39 diff -u -p -r1.39 distinfo --- tcsh/distinfo 17 Feb 2017 19:21:44 -0000 1.39 +++ tcsh/distinfo 8 May 2019 19:47:30 -0000 @@ -1,15 +1,11 @@ $NetBSD: distinfo,v 1.39 2017/02/17 19:21:44 he Exp $ -SHA1 (tcsh-6.20.00.tar.gz) = a77d68434cc4bed731a46a39b9e01523e3a1e98c -RMD160 (tcsh-6.20.00.tar.gz) = 3f119421ef3500cea1bebe2edf35c6d81ca1c8f3 -SHA512 (tcsh-6.20.00.tar.gz) = c5635393c22341e62fb9a0b953ddf8871a876ab09deb08c98237f93afa9257b4a3381d1db65eefe769e22ef845db29ab7bc78773f1f609d73c8205689a6683e9 -Size (tcsh-6.20.00.tar.gz) = 1001696 bytes -SHA1 (patch-aa) = 440849534fc49afdbd70b95d6cbc62ff5abee240 +SHA1 (tcsh-6.21.00.tar.gz) = aeb43ee952d47bdf33cc29fdecd170cfedbe8481 +RMD160 (tcsh-6.21.00.tar.gz) = 665d522ded31e3fa23b71a5726d2d52e1c60e085 +SHA512 (tcsh-6.21.00.tar.gz) = d7f46588a35b9cd01cfa33d0f9bbae09e9692605b5c045c2b58e66dba958ab904ddfe45aa7361767034e6cc03a34ad9ba4d14fa836df723bade29f3f6a18a46c +Size (tcsh-6.21.00.tar.gz) = 1001909 bytes +SHA1 (patch-aa) = 6ec2bcee6029e733743a73d267aa51bfcc898843 SHA1 (patch-ab) = 8cf26988778b5331360eb1aab98bfcc920c71ac2 SHA1 (patch-configure) = 91c2019da8c074bd6f24b84bf798ccd497110727 -SHA1 (patch-ed.chared.c) = d26ba00afcba958b5bb1efc2171e6211c8a5f964 -SHA1 (patch-ed.inputl.c) = d91c55ba297fcbe69f09b1ab3a7b50b9d83114c3 -SHA1 (patch-nls-catgen) = fe5da1ea0edfcb646bcc271e614f5075afa56c60 -SHA1 (patch-sh.func.c) = 030a2647930300f96147715ae17ab95c79ca8ca2 +SHA1 (patch-nls_Makefile.in) = 58d859e8a50e6436b9bc6514497eb876426d92d7 SHA1 (patch-sh.h) = ac6211ddd5e552e9baec2d35aed5e7e573cab04e -SHA1 (patch-tw.init.c) = 4ed0f6632e149d8badcb8338817af5f9095e34b4 Index: tcsh/patches/patch-aa =================================================================== RCS file: /cvsroot/pkgsrc/shells/tcsh/patches/patch-aa,v retrieving revision 1.15 diff -u -p -r1.15 patch-aa --- tcsh/patches/patch-aa 24 Nov 2016 15:45:06 -0000 1.15 +++ tcsh/patches/patch-aa 8 May 2019 19:47:30 -0000 @@ -1,6 +1,7 @@ $NetBSD: patch-aa,v 1.15 2016/11/24 15:45:06 christos Exp $ -Use LDFLAGS and BSD_INSTALL_*. +- Adjust mandir +- Use BSD_INSTALL_* --- Makefile.in.orig 2015-08-24 16:09:04.000000000 -0400 +++ Makefile.in 2016-11-24 10:43:07.000000000 -0500 @@ -13,15 +14,6 @@ Use LDFLAGS and BSD_INSTALL_*. MANSECT=1 DESTBIN=${DESTDIR}${bindir} DESTMAN=${DESTDIR}${mandir}/man${MANSECT} -@@ -449,7 +449,7 @@ - - gethost: gethost.c sh.err.h tc.const.h sh.h - rm -f gethost -- ${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} $(srcdir)/gethost.c -+ ${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} $(srcdir)/gethost.c - - tc.defs.c: gethost host.defs - @rm -f $@.tmp @@ -597,19 +597,13 @@ -strip ${DESTBIN}/tcsh$(EXEEXT) Index: tcsh/patches/patch-ed.chared.c =================================================================== RCS file: tcsh/patches/patch-ed.chared.c diff -N tcsh/patches/patch-ed.chared.c --- tcsh/patches/patch-ed.chared.c 24 Dec 2016 13:18:43 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,22 +0,0 @@ -$NetBSD: patch-ed.chared.c,v 1.1 2016/12/24 13:18:43 kim Exp $ - -Fix out of bounds read (Brooks Davis) -(reproduce by starting tcsh and hitting tab at the prompt) - -Index: ed.chared.c -=================================================================== -RCS file: /p/tcsh/cvsroot/tcsh/ed.chared.c,v -retrieving revision 3.103 -retrieving revision 3.104 -diff -u -r3.103 -r3.104 ---- ed.chared.c 19 Aug 2015 14:29:55 -0000 3.103 -+++ ed.chared.c 2 Dec 2016 16:59:28 -0000 3.104 -@@ -750,7 +750,7 @@ - /* - * If we found a history character, go expand it. - */ -- if (HIST != '\0' && *p == HIST) -+ if (p >= InputBuf && HIST != '\0' && *p == HIST) - nr_exp = c_excl(p); - else - nr_exp = 0; Index: tcsh/patches/patch-ed.inputl.c =================================================================== RCS file: tcsh/patches/patch-ed.inputl.c diff -N tcsh/patches/patch-ed.inputl.c --- tcsh/patches/patch-ed.inputl.c 17 Feb 2017 19:21:44 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,35 +0,0 @@ -$NetBSD: patch-ed.inputl.c,v 1.1 2017/02/17 19:21:44 he Exp $ - -Add fix from upstream: Unfortunately the AsciiOnly reversion causes -a SEGV because *ch is used to index in the command array, and now contains -INVALID_BYTE. Reproduce error with: - env -i ./tcsh - b - ---- ed.inputl.c.orig 2012-10-19 15:23:32.000000000 +0000 -+++ ed.inputl.c -@@ -800,13 +800,17 @@ GetNextChar(Char *cp) - return -1; - } - } -- cbp++; -- if (normal_mbtowc(cp, cbuf, cbp) == -1) { -- reset_mbtowc(); -- if (cbp < MB_CUR_MAX) -- continue; /* Maybe a partial character */ -- /* And drop the following bytes, if any */ -- *cp = (unsigned char)*cbuf | INVALID_BYTE; -+ if (AsciiOnly) { -+ *cp = (unsigned char)*cbuf; -+ } else { -+ cbp++; -+ if (normal_mbtowc(cp, cbuf, cbp) == -1) { -+ reset_mbtowc(); -+ if (cbp < MB_CUR_MAX) -+ continue; /* Maybe a partial character */ -+ /* And drop the following bytes, if any */ -+ *cp = (unsigned char)*cbuf | INVALID_BYTE; -+ } - } - break; - } Index: tcsh/patches/patch-nls-catgen =================================================================== RCS file: tcsh/patches/patch-nls-catgen diff -N tcsh/patches/patch-nls-catgen --- tcsh/patches/patch-nls-catgen 24 Dec 2016 13:18:43 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,23 +0,0 @@ -$NetBSD: patch-nls-catgen,v 1.1 2016/12/24 13:18:43 kim Exp $ - -use `` instead $() for solaris, bleh. - -Index: nls/catgen -=================================================================== -RCS file: /p/tcsh/cvsroot/tcsh/nls/catgen,v -retrieving revision 1.4 -retrieving revision 1.5 -diff -u -r1.4 -r1.5 ---- nls/catgen 25 Jul 2014 14:45:25 -0000 1.4 -+++ nls/catgen 26 Nov 2016 00:35:37 -0000 1.5 -@@ -13,8 +13,8 @@ - shift - CHARSET="$1" - shift --cat "${CHARSET}" $(sortit "$@") > "$TMP" -+cat "${CHARSET}" `sortit "$@"` > "$TMP" - --echo "$(basename "$OUT" .cat)" -+echo "`basename "$OUT" .cat`" - "${GENCAT}" "$OUT" "$TMP" - exit 0 Index: tcsh/patches/patch-nls_Makefile.in =================================================================== RCS file: tcsh/patches/patch-nls_Makefile.in diff -N tcsh/patches/patch-nls_Makefile.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ tcsh/patches/patch-nls_Makefile.in 8 May 2019 19:47:30 -0000 @@ -0,0 +1,123 @@ +$NetBSD$ + +Use INSTALL_DATA instead of INSTALL to avoid setting executable bits. + +--- nls/Makefile.in.orig 2019-05-08 18:39:28.000000000 +0000 ++++ nls/Makefile.in +@@ -4,7 +4,7 @@ CATALOGS= C.cat et.cat finnish.cat frenc + italian.cat ja.cat pl.cat russian.cat spanish.cat ukrainian.cat + LOCALES= ${CATALOGS:.cat=} + GENCAT= @GENCAT@ +-INSTALL= @INSTALL@ ++INSTALL_DATA= @INSTALL_DATA@ + RM?= rm -f + VPATH=@srcdir@ + srcdir=@srcdir@ +@@ -19,7 +19,7 @@ all: ${CATALOGS} + INSTALLED+=${localedir}/C/LC_MESSAGES/tcsh.cat + ${localedir}/C/LC_MESSAGES/tcsh.cat: C.cat + mkdir -p $(@D) +- $(INSTALL) $> $^ $@ ++ $(INSTALL_DATA) $> $^ $@ + + C.cat: ${srcdir}/C/charset ${srcdir}/C/*set[0-9]* + @${CATGEN} $(GENCAT) $@ $^ $> +@@ -27,7 +27,7 @@ C.cat: ${srcdir}/C/charset ${srcdir}/C/* + INSTALLED+=${localedir}/et/LC_MESSAGES/tcsh.cat + ${localedir}/et/LC_MESSAGES/tcsh.cat: et.cat + mkdir -p $(@D) +- $(INSTALL) $> $^ $@ ++ $(INSTALL_DATA) $> $^ $@ + + et.cat: ${srcdir}/et/charset ${srcdir}/et/*set[0-9]* + @${CATGEN} $(GENCAT) $@ $^ $> +@@ -35,7 +35,7 @@ et.cat: ${srcdir}/et/charset ${srcdir}/e + INSTALLED+=${localedir}/fi/LC_MESSAGES/tcsh.cat + ${localedir}/fi/LC_MESSAGES/tcsh.cat: finnish.cat + mkdir -p $(@D) +- $(INSTALL) $> $^ $@ ++ $(INSTALL_DATA) $> $^ $@ + + finnish.cat: ${srcdir}/finnish/charset ${srcdir}/finnish/*set[0-9]* + @${CATGEN} $(GENCAT) $@ $^ $> +@@ -43,7 +43,7 @@ finnish.cat: ${srcdir}/finnish/charset $ + INSTALLED+=${localedir}/fr/LC_MESSAGES/tcsh.cat + ${localedir}/fr/LC_MESSAGES/tcsh.cat: french.cat + mkdir -p $(@D) +- $(INSTALL) $> $^ $@ ++ $(INSTALL_DATA) $> $^ $@ + + french.cat: ${srcdir}/french/charset ${srcdir}/french/*set[0-9]* + @${CATGEN} $(GENCAT) $@ $^ $> +@@ -51,7 +51,7 @@ french.cat: ${srcdir}/french/charset ${s + INSTALLED+=${localedir}/de/LC_MESSAGES/tcsh.cat + ${localedir}/de/LC_MESSAGES/tcsh.cat: german.cat + mkdir -p $(@D) +- $(INSTALL) $> $^ $@ ++ $(INSTALL_DATA) $> $^ $@ + + german.cat: ${srcdir}/german/charset ${srcdir}/german/*set[0-9]* + @${CATGEN} $(GENCAT) $@ $^ $> +@@ -59,7 +59,7 @@ german.cat: ${srcdir}/german/charset ${s + INSTALLED+=${localedir}/gr/LC_MESSAGES/tcsh.cat + ${localedir}/gr/LC_MESSAGES/tcsh.cat: greek.cat + mkdir -p $(@D) +- $(INSTALL) $> $^ $@ ++ $(INSTALL_DATA) $> $^ $@ + + greek.cat: ${srcdir}/greek/charset ${srcdir}/greek/*set[0-9]* + @${CATGEN} $(GENCAT) $@ $^ $> +@@ -67,7 +67,7 @@ greek.cat: ${srcdir}/greek/charset ${src + INSTALLED+=${localedir}/it/LC_MESSAGES/tcsh.cat + ${localedir}/it/LC_MESSAGES/tcsh.cat: italian.cat + mkdir -p $(@D) +- $(INSTALL) $> $^ $@ ++ $(INSTALL_DATA) $> $^ $@ + + italian.cat: ${srcdir}/italian/charset ${srcdir}/italian/*set[0-9]* + @${CATGEN} $(GENCAT) $@ $^ $> +@@ -75,7 +75,7 @@ italian.cat: ${srcdir}/italian/charset $ + INSTALLED+=${localedir}/ja/LC_MESSAGES/tcsh.cat + ${localedir}/ja/LC_MESSAGES/tcsh.cat: ja.cat + mkdir -p $(@D) +- $(INSTALL) $> $^ $@ ++ $(INSTALL_DATA) $> $^ $@ + + ja.cat: ${srcdir}/ja/charset ${srcdir}/ja/*set[0-9]* + @${CATGEN} $(GENCAT) $@ $^ $> +@@ -83,7 +83,7 @@ ja.cat: ${srcdir}/ja/charset ${srcdir}/j + INSTALLED+=${localedir}/pl/LC_MESSAGES/tcsh.cat + ${localedir}/pl/LC_MESSAGES/tcsh.cat: pl.cat + mkdir -p $(@D) +- $(INSTALL) $> $^ $@ ++ $(INSTALL_DATA) $> $^ $@ + + pl.cat: ${srcdir}/pl/charset ${srcdir}/pl/*set[0-9]* + @${CATGEN} $(GENCAT) $@ $^ $> +@@ -91,7 +91,7 @@ pl.cat: ${srcdir}/pl/charset ${srcdir}/p + INSTALLED+=${localedir}/ru/LC_MESSAGES/tcsh.cat + ${localedir}/ru/LC_MESSAGES/tcsh.cat: russian.cat + mkdir -p $(@D) +- $(INSTALL) $> $^ $@ ++ $(INSTALL_DATA) $> $^ $@ + + russian.cat: ${srcdir}/russian/charset ${srcdir}/russian/*set[0-9]* + @${CATGEN} $(GENCAT) $@ $^ $> +@@ -99,7 +99,7 @@ russian.cat: ${srcdir}/russian/charset $ + INSTALLED+=${localedir}/es/LC_MESSAGES/tcsh.cat + ${localedir}/es/LC_MESSAGES/tcsh.cat: spanish.cat + mkdir -p $(@D) +- $(INSTALL) $> $^ $@ ++ $(INSTALL_DATA) $> $^ $@ + + spanish.cat: ${srcdir}/spanish/charset ${srcdir}/spanish/*set[0-9]* + @${CATGEN} $(GENCAT) $@ $^ $> +@@ -107,7 +107,7 @@ spanish.cat: ${srcdir}/spanish/charset $ + INSTALLED+=${localedir}/ru_UA/LC_MESSAGES/tcsh.cat + ${localedir}/ru_UA/LC_MESSAGES/tcsh.cat: ukrainian.cat + mkdir -p $(@D) +- $(INSTALL) $> $^ $@ ++ $(INSTALL_DATA) $> $^ $@ + + ukrainian.cat: ${srcdir}/ukrainian/charset ${srcdir}/ukrainian/*set[0-9]* + @${CATGEN} $(GENCAT) $@ $^ $> Index: tcsh/patches/patch-sh.func.c =================================================================== RCS file: tcsh/patches/patch-sh.func.c diff -N tcsh/patches/patch-sh.func.c --- tcsh/patches/patch-sh.func.c 24 Dec 2016 13:18:43 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,34 +0,0 @@ -$NetBSD: patch-sh.func.c,v 1.1 2016/12/24 13:18:43 kim Exp $ - -Fix type of read in prompt confirmation (eg. rmstar) (David Kaspar) - -Index: sh.func.c -=================================================================== -RCS file: /p/tcsh/cvsroot/tcsh/sh.func.c,v -retrieving revision 3.176 -retrieving revision 3.177 -diff -u -r3.176 -r3.177 ---- sh.func.c 18 Oct 2016 17:26:42 -0000 3.176 -+++ sh.func.c 28 Nov 2016 17:14:20 -0000 3.177 -@@ -2734,16 +2734,18 @@ - int - getYN(const char *prompt) - { -- int doit, c; -+ int doit; -+ char c; -+ - xprintf("%s", prompt); - flush(); -- (void) force_read(SHIN, &c, 1); -+ (void) force_read(SHIN, &c, sizeof(c)); - /* - * Perhaps we should use the yesexpr from the - * actual locale - */ - doit = (strchr(CGETS(22, 14, "Yy"), c) != NULL); -- while (c != '\n' && force_read(SHIN, &c, 1) == 1) -+ while (c != '\n' && force_read(SHIN, &c, sizeof(c)) == sizeof(c)) - continue; - return doit; - } Index: tcsh/patches/patch-tw.init.c =================================================================== RCS file: tcsh/patches/patch-tw.init.c diff -N tcsh/patches/patch-tw.init.c --- tcsh/patches/patch-tw.init.c 24 Dec 2016 13:18:43 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,23 +0,0 @@ -$NetBSD: patch-tw.init.c,v 1.1 2016/12/24 13:18:43 kim Exp $ - -Don't play pointer tricks that are undefined in modern c (Brooks Davis) - -Index: tw.init.c -=================================================================== -RCS file: /p/tcsh/cvsroot/tcsh/tw.init.c,v -retrieving revision 3.42 -retrieving revision 3.43 -diff -u -r3.42 -r3.43 ---- tw.init.c 17 Apr 2011 14:49:30 -0000 3.42 -+++ tw.init.c 7 Dec 2016 02:52:27 -0000 3.43 -@@ -125,9 +125,8 @@ - sl->buff = xrealloc(sl->buff, sl->tbuff * sizeof(Char)); - /* Re-thread the new pointer list, if changed */ - if (ptr != NULL && ptr != sl->buff) { -- intptr_t offs = sl->buff - ptr; - for (i = 0; i < sl->nlist; i++) -- sl->list[i] += offs; -+ sl->list[i] = sl->buff + (sl->list[i] - ptr); - } - disabled_cleanup(&pintr_disabled); - }