Package: tcsh
Version: 6.21.00-1.1
Severity: grave
Tags: newcomer
Justification: causes non-serious data loss

Dear Maintainer,

tcsh does not respect character classes. Minimal example:

$ mkdir a
$ touch a/a a/B
$ echo a/[a-z]
a/a a/B

I expect the result to simply be 'a/a' since 'B' is not in [a-z]. The behavior
generalizes to character classes in wildcards - it is not just about the
trivial one-character filename example seen here.

This is in locale en_US.UTF-8, but switching to locale "C" has the same
behavior.

This behavior can result in data loss with e.g. 'rm [a-z]*' removing unexpected
files, and can also result in operating on the wrong files, so I have
tentatively
classified it 'grave'. tcsh as packaged is unusable for my purposes.

I have verified that tcsh built from the current upstream (version 6.23.00)
with

$ git clone g...@github.com:tcsh-org/tcsh.git
$ cd tcsh
$ configure && make

Does NOT suffer this behavior, while tcsh built from the Debian source package
with

$ apt-get --build source tcsh

DOES suffer this behavior. The 6.23.00 built from upstream has the same
$version
string options as the Debian 6.21.00 except for "nd" (NODOT).

I attempted to build from the upstream repository at version 6.21.00 but could
not successfully build after 'configure', so I cannot tell if this is a bug
introduced by the Debian-specific changes, or a bug in the upstream 6.21.00.
The differences between the Debian source package with patches applied vs.
upstream 6.21.00 source are smallish and don't obviously implicate character
classes but that proves nothing.

Suggested resolutionn is to update the buster package to tcsh 6.23.00. I
believe
this will also result in elimination of a large number of warning messages
during
the build of form

/usr/include/features.h:187:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE
are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  187 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use
_DEFAULT_SOURCE"
      |   ^~~~~~~


-- System Information:
Debian Release: 11.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500,
'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-9-amd64 (SMP w/12 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not
set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages tcsh depends on:
ii  libc6      2.31-13+deb11u2
ii  libcrypt1  1:4.4.18-4
ii  libtinfo6  6.2+20201114-2

tcsh recommends no packages.

tcsh suggests no packages.

Reply via email to