1

I have following 2 packages installed on a Redhat Enterprise 7.0 instance

bind-license-9.9.4-14.el7_0.1.noarch
bind-libs-lite-9.9.4-14.el7_0.1.x86_64

The "repoquery -i" command tells me that the source rpm of these packages is bind.

repoquery -i bind-license-9.9.4-14.el7_0.1.noarch

Name        : bind-license
Version     : 9.9.4
Release     : 14.el7_0.1
Architecture: noarch
Size        : 26019
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Group       : Applications/System
URL         : http://www.isc.org/products/BIND/
Repository  : rhel-7-server-rpms
Summary     : License of the BIND DNS suite
Source      : **bind-9.9.4-14.el7_0.1.src.rpm**
Description :
Contains license of the BIND DNS suite.

Similarly if I use the yum downloader to download the source rpms of above 2 packages the bind source rpm (bind-9.9.4-14.el7_0.1.src.rpm) is downloaded.

However if we try to update the bind here is what i get

yum update bind
Loaded plugins: product-id, subscription-manager
Package(s) bind available, but not installed.
**No packages marked for update**

My question is why are repoquery and yumdownloader reporting bind-9.9.4-14.el7_0.1.src.rpm as the source rpm. If bind is the correct source rpm then why is "yum update bind" saying that the bind is not installed on the system?

2 Answers2

0

The source-RPM builds several packages from the same sources. The spec-file has these directives (with intervening content), which declare the packages to be built (in addition to the default bind package):

%package pkcs11
%package sdb
%package libs-lite
%package libs
%package license
%package utils
%package devel
%package lite-devel
%package chroot
%package sdb-chroot

That is, "bind-" prefixes each of the corresponding names used in the %package directives in the resulting packages.

The spec-file also has conditional logic which can be turned on by scripts; the bind-sdb-chroot package for instance is inside a conditional block using the SDB symbol. In the spec-file the symbols which drive that logic are in the header:

%{?!SDB:       %global SDB       1}
%{?!test:      %global test      0}
%{?!bind_uid:  %global bind_uid  25}
%{?!bind_gid:  %global bind_gid  25}
%{?!GSSTSIG:   %global GSSTSIG   1}
%if 0%{?rhel}
%{?!PKCS11:    %global PKCS11    0}
%else
%{?!PKCS11:    %global PKCS11    1}
%endif
%{?!DEVEL:     %global DEVEL     1}
%global        bind_dir          /var/named
%global        chroot_prefix     %{bind_dir}/chroot
%if %{SDB}
%global        chroot_sdb_prefix %{bind_dir}/chroot_sdb
%endif

So, if you were to download the source-RPM and build it, you could get some or all of those packages, depending upon the command-line options you gave.

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105
0

My question is why are repoquery and yumdownloader reporting bind-9.9.4-14.el7_0.1.src.rpm as the source rpm. If bind is the correct source rpm then why is "yum update bind" saying that the bind is not installed on the system?

The confusion is because .src.rom packages are never installed on the system. only the binary .i686.rom or .x86_64.rpm packages are. As others have said, one source RPM can build multiple, differntly-named binary packages.