Bug 1540485 - grep does not provide /usr/bin/grep
Summary: grep does not provide /usr/bin/grep
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: grep
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1567086
TreeView+ depends on / blocked
 
Reported: 2018-01-31 08:03 UTC by Miro Hrončok
Modified: 2018-04-13 12:00 UTC (History)
4 users (show)

Fixed In Version: grep-3.1-4.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1567086 (view as bug list)
Environment:
Last Closed: 2018-02-02 15:39:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2018-01-31 08:03:00 UTC
Description of problem:
Fedora had **Move all to /usr** change/feature in Fedora 17.

https://fedoraproject.org/wiki/Features/UsrMove

However, grep still installs itself (and egrep, fgrep) to /bin/.

This leads to packaging errors such as https://src.fedoraproject.org/rpms/redhat-rpm-config/c/9ac5353554ec44cfb2b9ef1cda10406971f78ac8?branch=master

Version-Release number of selected component (if applicable):
grep-3.1-3

How reproducible:
Always.

Steps to Reproduce:
1. dnf install /usr/bin/grep

Actual results:
No match for argument: /usr/bin/grep
Error: Unable to find a match

Expected results:
Package grep-3.1-3.fc27.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!

Additional info:
grep redefined _bindir to /bin in https://src.fedoraproject.org/rpms/grep/c/0efa5e9cebf61d2e2a185a5282e4f0b95bd25d09

Comment 1 Miro Hrončok 2018-02-01 00:52:58 UTC
Note: When this gets fixed, the Requires for /bin/grep in redhat-rpm-config needs to be replaced with /usr/bin/grep immediately, or it will will break the buildroot once again.

Comment 2 Jason Tibbitts 2018-02-01 00:58:36 UTC
The grep package can simply add "Provides: /bin/grep" to avoid breaking anything.

Comment 3 Jaroslav Škarvada 2018-02-02 15:10:48 UTC
We kept it mostly for backward compatibility. Let's try to fix it in Rawhide. I will add the explicit provide for backward compatibility.

Comment 4 Jaroslav Škarvada 2018-02-02 15:23:10 UTC
The following packages require /bin/grep:
Canna
am-utils
redhat-lsb-core
resource-agents
torque

The following packages require /bin/egrep:
nagios-plugins-log
nagios-plugins-sensors
redhat-lsb-core

The following packages require /bin/fgrep:
redhat-lsb-core

Comment 5 Miro Hrončok 2018-02-02 15:56:41 UTC
Thank you!

$ rpm -qpl grep-3.1-4.fc28.x86_64.rpm | grep bin
/usr/bin/egrep
/usr/bin/fgrep
/usr/bin/grep

$ rpm -qp --provides grep-3.1-4.fc28.x86_64.rpm | grep bin
/bin/egrep
/bin/fgrep
/bin/grep

Comment 8 Jaroslav Škarvada 2018-02-05 10:10:55 UTC
(In reply to Jaroslav Škarvada from comment #7)
> (In reply to Miro Hrončok from comment #6)
> > Canna is orphaned
> > https://src.fedoraproject.org/rpms/am-utils/pull-request/1
> > https://src.fedoraproject.org/rpms/redhat-lsb/pull-request/3
> > https://src.fedoraproject.org/rpms/resource-agents/pull-request/2
> > https://src.fedoraproject.org/rpms/torque/pull-request/2
> 
> Thanks
> 
> > I see no egrep mentioned in nagios-plugins.spec
> 
> It seems they silently fixed it in:
> https://src.fedoraproject.org/rpms/nagios-plugins/c/
> 12c05af7b4828ecc028accf262b00fb8ba74e3f0

Probably here is the first fix:
https://src.fedoraproject.org/rpms/nagios-plugins/c/47131dde93200ccbac99cfb379f02a4ba4ec3df1

but it seems there isn't still the fixed version built in the f26 I did the query across.


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