Bug 818775

Summary: grep --devices=skip ignores stdin
Product: [Fedora] Fedora Reporter: Aron Griffis <aron>
Component: grepAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 17CC: jskarvad, lkundrak, redhat
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: grep-2.12-1.fc17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-06 04:53:07 UTC 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:

Description Aron Griffis 2012-05-03 23:19:44 UTC
Description of problem:
In F16, "grep --devices=skip" would search stdin if no files were specified on the command-line. In F17, it returns immediately with exit status 1. This breaks grep wrappers that assume (based on previous behavior) that it's okay to specify --devices=skip.

It appears that this might be a regression in grep 2.11 which is fixed in 2.12, considering the wording in the manual page has changed. See http://www.gnu.org/software/grep/manual/grep.html where it says "This option has no effect on a file that is read via standard input."

Version-Release number of selected component (if applicable):
grep-2.11-1.fc17.x86_64

How reproducible:
every time

Steps to Reproduce:
1. echo foo | grep -q --devices=skip foo
  
Actual results:
exit status 1

Expected results:
exit status 0

Additional info:

Comment 1 Aron Griffis 2012-05-04 03:27:52 UTC
In fact, this regression is specifically called out as one of two regressions fixed in grep 2.12: http://savannah.gnu.org/forum/forum.php?forum_id=7207

Comment 2 Fedora Update System 2012-05-04 08:14:46 UTC
grep-2.12-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/grep-2.12-1.fc17

Comment 3 Fedora Update System 2012-05-04 22:18:16 UTC
Package grep-2.12-1.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing grep-2.12-1.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-7325/grep-2.12-1.fc17
then log in and leave karma (feedback).

Comment 4 Aron Griffis 2012-05-05 18:50:31 UTC
Thanks for your quick attention to this Jaroslav! The update is working well for me, and I left karma as requested.

Comment 5 Fedora Update System 2012-05-06 04:53:07 UTC
grep-2.12-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.