Bug 30844 - Warning messages in rkhunter since grep has been upgraded to 3.8
Summary: Warning messages in rkhunter since grep has been upgraded to 3.8
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: All Packagers
QA Contact:
URL: https://sourceforge.net/p/rkhunter/bu...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-12 20:23 CEST by GG HH
Modified: 2023-05-01 10:40 CEST (History)
3 users (show)

See Also:
Source RPM: rkhunter-1.4.6-4.mga9.src.rpm
CVE:
Status comment:


Attachments
fix regressions from the new grep release (563.82 KB, text/plain)
2022-09-12 20:26 CEST, GG HH
Details
Patch (19.92 KB, text/plain)
2022-09-13 19:59 CEST, GG HH
Details

Description GG HH 2022-09-12 20:23:58 CEST
rkunter prints tens on warning messages on my system since grep has been updated to version 3.8
grep: warning: stray \ before +
egrep: warning: egrep is obsolescent; using grep -E

$ rkhunter --version
grep: warning: stray \ before -
grep: warning: stray \ before +
Rootkit Hunter 1.4.6

$ grep --version
grep (GNU grep) 3.8

a proposal fix is joined.
Comment 1 GG HH 2022-09-12 20:26:58 CEST
Created attachment 13370 [details]
fix regressions from the new grep release

replace egrep by grep -e
remove rkhunter internal requirement of egrep
remove unusefull \ in grep regexp

Please have a look to the discussion on rkunter bug in the report

CC: (none) => boulshet

Marja Van Waes 2022-09-12 23:43:23 CEST

Attachment 13370 is patch: 0 => 1
CC: (none) => marja11
Attachment 13370 mime type: application/x-shellscript => text/plain

Marja Van Waes 2022-09-12 23:45:59 CEST

Attachment 13370 is patch: 1 => 0

Comment 2 Marja Van Waes 2022-09-12 23:52:17 CEST
(In reply to GG HH from comment #1)
> Created attachment 13370 [details]
> fix regressions from the new grep release
> 
> replace egrep by grep -e
> remove rkhunter internal requirement of egrep
> remove unusefull \ in grep regexp

Assigning to all packagers collectively, since there is no registered maintainer for rkhunter

> 
> Please have a look to the discussion on rkunter bug in the report

So here: https://sourceforge.net/p/rkhunter/bugs/176/

Summary: Warning messages since grep has been upgraded to 3.8 => Warning messages in rkhunter since grep has been upgraded to 3.8
Assignee: bugsquad => pkg-bugs

Comment 3 Dick Gevers 2022-09-13 00:13:08 CEST
IMHO the attachment does more than fix the grep obsolescences.... 

So I would want to see the rkhunter bug#176 accepted as is by the rkhunter authors before incorporating all the changes made by this "patch" (replacement really).

CC: (none) => dvgevers

Comment 4 GG HH 2022-09-13 00:55:47 CEST
> IMHO the attachment does more than fix the grep obsolescences.... 

Anything you would like to be explained beside what is described in comment 1 ?

> So I would want to see the rkhunter bug#176 accepted as is by the rkhunter authors before incorporating all the changes made by this "patch" (replacement really).

Fair enough.
Hopefully we will have a feedback but rkhunter did not look so active lately.
Comment 5 Jani Välimaa 2022-09-13 13:17:47 CEST
Please provide patches against pkg sources instead of full script replacements so we can really see what's changed.
Comment 6 GG HH 2022-09-13 19:59:16 CEST
Created attachment 13371 [details]
Patch

$ rpm -V rkhunter 
S.5....T.  c /etc/rkhunter.conf
.......T.    /usr/sbin/rkhunter
.M?....T.    /var/lib/rkhunter/db/mirrors.dat

$ diff /usr/sbin/rkhunter /usr/sbin/rkhunter-egrep-fix-+-backslash-escape  > /tmp/rkhunter-egrep-fix-+-backslash-escape.diff
Lewis Smith 2022-12-26 20:36:44 CET

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=31327

Comment 7 Lewis Smith 2022-12-26 20:39:40 CET
In the light of comment 3, upping the importance. We are liable to see this egrep error msg in other places.

Severity: minor => normal

Comment 8 GG HH 2022-12-26 21:08:50 CET
The issue has to be fixed separately in each package which make uses of the deprecated syntax.
https://www.phoronix.com/news/GNU-Grep-3.8-Stop-egrep-fgrep
The good news is that the fixes are of course trivial, for rkhunter at least.
Unfortunately it still is not. Neither upstream nor in mageia.

Regards
Comment 9 GG HH 2023-05-01 10:40:05 CEST
It looks like a patch has been applied

$ rpm -q --changelog rkhunter
* dim. avril 30 2023 kekepower <kekepower> 1.4.6-5.mga9
+ Revision: 1955467
- Add patch to switch from egrep to grep -E

It is far better but still misses some issues :

grep: warning: stray \ before -
grep: warning: stray \ before +
The command '-E' must be present on the system in order to run rkhunter.

Regards

Note You need to log in before you can comment on or make changes to this bug.