ClusterLabs / resource-agents

Combined repository of OCF agents from the RHCS and Linux-HA projects
GNU General Public License v2.0
493 stars 579 forks source link

RPM spec file dependency issue #1832

Open jms1voalte opened 1 year ago

jms1voalte commented 1 year ago

The resource-agents.spec.in file has Requires: lines referencing the following:

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.)