Subject: bug#57604: [ef]grep usage -> POSIXLY_CORRECT?

From: Guillem Jover <[email-masked]>
Date: Fri, 9 Sep 2022 14:16:10 +0200

Hi!

Just to note since grep 3.8 got uploaded into Debian, this has been a
problematic change. There are now packages that fail to work such as
apt-file (https://bugs.debian.org/1019329), and the emission of tons
of warnings all over the place, in many cases hard to know where these
are coming from, if the invoking command is nested deep.

Transitioning away from fgrep/egrep seems like it would be painful as
that involves lots of upstream projects:

  https://codesearch.debian.net/search?q=fgrep&literal=1
  https://codesearch.debian.net/search?q=egrep&literal=1

(And https://codesearch.debian.net/search?q=rgrep&literal=1)

In Debian the grep package has been blocked from migrating from
unstable to testing, and this change might get reverted:

  https://bugs.debian.org/1019335

There's a check by shellcheck, but unfortunately not everyone runs that
over shell code.

(Personally I'm happy to adapt code I maintain for this kind of thing,
but from reading older discussions upstream I get the feeling the
theoretical reach of these tools usage was perhaps not calibrated against
actual usage?)

Thanks,
Guillem