resource-agents
resource-agents copied to clipboard
RPM spec file dependency issue
The resource-agents.spec.in
file has Requires:
lines referencing the following:
-
/usr/bin/grep
-
/usr/bin/hostname
-
/usr/bin/netstat
The CentOS 7 RPMs which install those programs, declare them as /bin/grep
, /bin/hostname
, and /bin/netstat
. This "works" because on CentOS 7, /bin
is a symlink to /usr/bin
.
Because the filenames being "provided" and "required" are not the same, they don't match in the yum database, and yum update
commands are failing because of it.
# yum update grep
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
...
Resolving Dependencies
--> Running transaction check
---> Package grep.x86_64 0:2.20-2.el7 will be updated
---> Package grep.x86_64 0:2.20-3.el7 will be an update
--> Processing Dependency: /usr/bin/grep for package: resource-agents-4.8.0-1.el7.x86_64
--> Finished Dependency Resolution
Error: Package: resource-agents-4.8.0-1.el7.x86_64 (@voalte-public)
Requires: /usr/bin/grep
Removing: grep-2.20-2.el7.x86_64 (@anaconda)
Not found
Updated By: grep-2.20-3.el7.x86_64 (base)
Not found
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
My first instinct would be to change the Required:
lines in the resource-agents.spec.in
file, however I have no idea how that would impact other RPM-based distributions, and I don't want to break things for other distros. (Plus I don't have the time right now to sit down and figure out how to set up a conditional block so that CentOS 7 uses /bin/xxx
and other distros use /usr/bin/xxx
.)