Package: grep Version: 2.26-1 Severity: grave Tags: upstream Justification: renders package unusable
Upstream commit af6af288 causes inconsistent results when output is redirected to /dev/null. I'm setting this to grave because grep is a very common glue and if its results aren't reliable, then there's lots of unknown behavior that may exhibit from things using it. Unfortunately, the simplest test case I've been able to find so far is a script from neovim's source package. $ git clone https://github.com/neovim/neovim $ cd neovim $ ./scripts/vim-patch.sh -l When grep is working properly (i.e., with af6af288 reverted), this should start printing out numbers starting around 7.4.1559. Instead, it is printing out numbers starting around 7.4.630. The relevant part of the script is just looking for whether patch numbers are applied or marked NA in neovim's src/nvim/version.c: is_missing="$(sed -n '/static int included_patches/,/}/p' "${NVIM_SOURCE_DIR}/src/nvim/version.c" | grep -x -e "[[:space:]]*//[[:space:]]${patch_number} NA.*" -e "[[:space:]]*${patch_number}," >/dev/null && echo "false" || echo "true")" The worrisome part about this is that the behavior isn't consistent: $ diff -u <(flock . ./scripts/vim-patch.sh -l) <(flock . ./scripts/vim-patch.sh -l) | diffstat 14 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) $ diff -u <(flock . ./scripts/vim-patch.sh -l) <(flock . ./scripts/vim-patch.sh -l) | diffstat 14 | 4 ---- 1 file changed, 4 deletions(-) Other problems I've seen reported related to this: - Vim's build leaves behind random files[0] - Slackware's upgradepkg fails to remove the old package after upgrade[1] [0]: https://www.mail-archive.com/vim_dev@googlegroups.com/msg42764.html [1]: https://www.linuxquestions.org/questions/slackware-14/pkgtools-grep-bug-in-slackware%5B64%5D-current-4175593054/ -- System Information: Debian Release: stretch/sid APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental-debug'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.7.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages grep depends on: ii dpkg 1.18.14 ii libc6 2.24-5 ii libpcre3 2:8.39-2 grep recommends no packages. Versions of packages grep suggests: ii libpcre3 2:8.39-2 -- no debconf information