Sunday, December 01, 2019

Update: shells/tcsh 6.21.00

Here's an update for shells/tcsh to 6.21.00, which came out in May.
People who actually use tcsh--I don't--might want to give it a try.

A number of regression tests used to fail because the built-in echo
in our sh always interprets backslash sequences. The switch to the
latest autoconf has fixed those tests. The remaining failures are
a kernel issue regarding execve(2), see tech@, and two that are due
to the lack of a home directory in the test environment. Setting
HOME=${WRKDIR} in TEST_FLAGS would work around this for one test,
but the other one still stumbles over the discrepancy between $HOME
and getpwent(), so I've left it as is.

The existing port installs a number of message catalogs for translated
error messages. The directory names, such as fr_FR.ISO_8859-1,
suggest encodings that OpenBSD no longer supports. This is doubly
wrong. It turns out that the actual files have switched to UTF-8
encoding at some point in the past, but apparently nobody noticed.

Eliciting translated error messages from tcsh proves to be difficult.
The code uses the POSIX catopen(3) interface. This does not have
a default path for the catalogs. The user MUST set a search path
by way of the NLSPATH variable. Since this is not part of the
default OpenBSD environment, the chance of users actually managing
to enable the translations are slim. I had to look at the POSIX
standard and the libc source to figure it out. I've consulted
schwarze@, and since catopen(3) is terrible and only used by three
crufty ports, he suggested that we should simply stop installing
those message catalogs. Obviously nobody has missed them in years,
if ever, and the patch below drops them.

Comments, OKs, preferably from people who use tcsh?


Index: Makefile
===================================================================
RCS file: /cvs/ports/shells/tcsh/Makefile,v
retrieving revision 1.60
diff -u -p -r1.60 Makefile
--- Makefile 12 Jul 2019 20:49:38 -0000 1.60
+++ Makefile 1 Dec 2019 16:18:39 -0000
@@ -2,8 +2,7 @@

COMMENT= extended C-shell with many useful features

-DISTNAME= tcsh-6.20.00
-REVISION= 1
+DISTNAME= tcsh-6.21.00
CATEGORIES= shells
HOMEPAGE= http://www.tcsh.org/

@@ -23,34 +22,15 @@ CONFIGURE_ENV= LDFLAGS="${STATIC}"
.endif

CONFIGURE_STYLE=gnu
+# obsolete catopen(3) message catalogs
+CONFIGURE_ARGS+=--disable-nls-catalogs

-AUTOCONF_VERSION=2.59
+AUTOCONF_VERSION=2.69
TEST_DEPENDS= ${MODGNU_AUTOCONF_DEPENDS}
TEST_FLAGS= AUTOCONF_VERSION=${AUTOCONF_VERSION}

do-install:
${INSTALL_PROGRAM} ${WRKSRC}/tcsh ${PREFIX}/bin/tcsh
${INSTALL_MAN} ${WRKSRC}/tcsh.man ${PREFIX}/man/man1/tcsh.1
-.for S D in \
- C C \
- et et_EE.ISO-8859-1 \
- finnish fi_FI.ISO_8859-1 \
- french fr_BE.ISO_8859-1 \
- french fr_CA.ISO_8859-1 \
- french fr_CH.ISO_8859-1 \
- french fr_FR.ISO_8859-1 \
- german de_AT.ISO_8859-1 \
- german de_CH.ISO_8859-1 \
- german de_DE.ISO_8859-1 \
- greek el_GR.ISO_8859-7 \
- italian it_CH.ISO_8859-1 \
- italian it_IT.ISO_8859-1 \
- ja ja_JP.EUC \
- pl pl_PL.ISO_8859-2 \
- russian ru_RU.KOI8-R \
- spanish es_ES.ISO_8859-1 \
- ukrainian uk_UA.KOI8-U
- ${INSTALL_DATA} ${WRKSRC}/nls/$S.cat ${PREFIX}/share/nls/$D/tcsh.cat
-.endfor

.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/shells/tcsh/distinfo,v
retrieving revision 1.12
diff -u -p -r1.12 distinfo
--- distinfo 17 Feb 2018 08:42:08 -0000 1.12
+++ distinfo 1 Dec 2019 16:18:39 -0000
@@ -1,2 +1,2 @@
-SHA256 (tcsh-6.20.00.tar.gz) = uJ3nBkq1TaxFSiZs/l2L9mlAy17QSNDDBnTqYufs750=
-SIZE (tcsh-6.20.00.tar.gz) = 1001696
+SHA256 (tcsh-6.21.00.tar.gz) = xDgyVEg3H1mxKkyTv9P2mC5vefjFrvS8g6rI9idm6XI=
+SIZE (tcsh-6.21.00.tar.gz) = 1001909
Index: patches/patch-sh_func_c
===================================================================
RCS file: patches/patch-sh_func_c
diff -N patches/patch-sh_func_c
--- patches/patch-sh_func_c 10 Sep 2018 16:23:27 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
-$OpenBSD: patch-sh_func_c,v 1.3 2018/09/10 16:23:27 sthen Exp $
-
-From d8b47bd1934d1d9cb603e562b149bba2816d90ca Mon Sep 17 00:00:00 2001
-From: Christos Zoulas <christos@zoulas.com>
-Date: Mon, 28 Nov 2016 17:14:20 +0000
-Subject: [PATCH] Fix type of read in prompt confirmation (eg. rmstar) (David
- Kaspar)
-
-Index: sh.func.c
---- sh.func.c.orig
-+++ sh.func.c
-@@ -2734,16 +2734,18 @@ nlsclose(void)
- 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: pkg/PLIST
===================================================================
RCS file: /cvs/ports/shells/tcsh/pkg/PLIST,v
retrieving revision 1.13
diff -u -p -r1.13 PLIST
--- pkg/PLIST 31 May 2016 12:11:34 -0000 1.13
+++ pkg/PLIST 1 Dec 2019 16:18:39 -0000
@@ -1,21 +1,3 @@
@comment $OpenBSD: PLIST,v 1.13 2016/05/31 12:11:34 sthen Exp $
@shell bin/tcsh
@man man/man1/tcsh.1
-share/nls/C/tcsh.cat
-share/nls/de_AT.ISO_8859-1/tcsh.cat
-share/nls/de_CH.ISO_8859-1/tcsh.cat
-share/nls/de_DE.ISO_8859-1/tcsh.cat
-share/nls/el_GR.ISO_8859-7/tcsh.cat
-share/nls/es_ES.ISO_8859-1/tcsh.cat
-share/nls/et_EE.ISO-8859-1/tcsh.cat
-share/nls/fi_FI.ISO_8859-1/tcsh.cat
-share/nls/fr_BE.ISO_8859-1/tcsh.cat
-share/nls/fr_CA.ISO_8859-1/tcsh.cat
-share/nls/fr_CH.ISO_8859-1/tcsh.cat
-share/nls/fr_FR.ISO_8859-1/tcsh.cat
-share/nls/it_CH.ISO_8859-1/tcsh.cat
-share/nls/it_IT.ISO_8859-1/tcsh.cat
-share/nls/ja_JP.EUC/tcsh.cat
-share/nls/pl_PL.ISO_8859-2/tcsh.cat
-share/nls/ru_RU.KOI8-R/tcsh.cat
-share/nls/uk_UA.KOI8-U/tcsh.cat

--
Christian "naddy" Weisgerber naddy@mips.inka.de

No comments:

Post a Comment