I am fairly new to rpm building and i have been trying to understand the syntax of "Provides" inside a spec file without success. I have the following spec file snippet for building clamav rpm:
Summary: End-user tools for the Clam Antivirus scanner Name: clamav Version: 0.103.12 Release: 1%{?dist} %package data Summary: Virus signature data for the Clam Antivirus scanner Requires: ns-clamav-filesystem = %{version}-%{release} Provides: data(clamav) = full Provides: clamav-db = %{version}-%{release} Obsoletes: clamav-db < %{version}-%{release} BuildArch: noarch %package update Summary: Auto-updater for the Clam Antivirus scanner data-files Requires: ns-clamav-filesystem = %{version}-%{release} Requires: ns-clamav-lib = %{version}-%{release} Provides: data(clamav) = empty Provides: clamav-data-empty = %{version}-%{release} Obsoletes: clamav-data-empty < %{version}-%{release} %package -n ns-clamd Summary: The Clam AntiVirus Daemon Requires: data(clamav) Requires: ns-clamav-filesystem = %{version}-%{release} Requires: ns-clamav-lib = %{version}-%{release} Requires: coreutils Requires(pre): shadow-utils I am aware what the "Provides:" indicates here and also that parenthesis next to provides indicate the installation of a module (for that package). In my case, %package data (clamav-data) when installed, it will also state to rpm/yum that it provides clamav-db and data(clamav).
It is the data(clamav) i don't understand. How does it relate to the default package name prefix of clamav-data ? Shouldn't this be clamav(data) ?
How can I search this data(clamav) in yum/rpm? I can see this mentioned in the rpm info but when I install it how can I search it like I do on other packages? For instance yum info <package>
# rpm -q --requires RPMS/x86_64/ns-clamd-0.103.12-1.el8.x86_64.rpm /bin/sh /bin/sh /bin/sh /bin/sh coreutils data(clamav) # rpm -q RPMS/noarch/ns-clamav-data-0.103.12-1.el8.noarch.rpm --provides clamav-db = 0.103.12-1.el8 config(ns-clamav-data) = 0.103.12-1.el8 data(clamav) = full ns-clamav-data = 0.103.12-1.el8