Bug 2140197

Summary: xdg-open raises avoidable warning regarding grep-3.8 [bug 2123935]
Product: [Fedora] Fedora Reporter: Jan Pokorný [poki] <fedora>
Component: xdg-utilsAssignee: Rex Dieter <rdieter>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 37CC: ekohlvan, jks, rdieter, rjeffman, sergio
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2123935    
Bug Blocks:    

Description Jan Pokorný [poki] 2022-11-04 19:08:29 UTC
Hi, just noticed this:

$ xdg-open https://fedoraproject.org
> egrep: warning: egrep is obsolescent; using grep -E

(more informative demo with a pun intended for a little bit of fun:
$ egrep egrep $(which xdg-open)
> egrep: warning: egrep is obsolescent; using grep -E
>             || ! echo "$1" | egrep -q '^[[:alpha:]][[:alpha:][:digit:]+\.\-]*:'; then
)

$ rpm -qf $(which grep xdg-open)
grep-3.8-1.fc38.x86_64
xdg-utils-1.1.3-12.fc37.noarch

See also the announcement
https://lists.gnu.org/archive/html/info-gnu/2022-09/msg00001.html:

>   The egrep and fgrep commands, which have been deprecated since
>   release 2.5.3 (2007), now warn that they are obsolescent and should
>   be replaced by grep -E and grep -F.

Also, for the sake of a more complete picture, note it looks like
Debian actually decided to revert the upstream change of raising those
compatibility warnings:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1019335

No particular opinion here, just following what's currently in Fedora
and assuming that Fedora is more prudent regarding the divergence
from upstream, which would favour adapting xdg-utils to this new
constrain than the other way around.

No upstream bug seems to exist for xdg-utils at this time.

Comment 2 Jouni Seppänen 2023-04-24 10:52:34 UTC
*** Bug 2189126 has been marked as a duplicate of this bug. ***

Comment 3 Ewoud Kohl van Wijngaarden 2023-07-19 14:54:09 UTC
https://gitlab.freedesktop.org/xdg/xdg-utils/-/merge_requests/66 is not merge yet, but it would be good to apply this downstream until it's resolved upstream. Just to avoid the warning all the time.

Comment 4 Rafael Jeffman 2023-07-25 19:34:47 UTC
To fix this issue, I'm proposing https://src.fedoraproject.org/rpms/xdg-utils/pull-request/2