Yum repodata issue with CentOS 7

Hi, I’m working on a yum repository with CentOS 7 and encountered interoperation issue with some packages as below. My setup contain one Yum(hosted) repository, and i upload just only one package. However, when a CentOS 7 client point to this repository to start “yum install”, that package appear have conflicts even the required version has been met already. Afterwards, I put the “conflicted” rpm file on local disk and install it manually using yum. No conflict was found at all.

Nexus Version: OSS 3.15.2-01
CentOS Version: CentOS Linux release 7.6.1810 (Core)

----------------------Nexus Yum Install------------------------------------------------#####
[root@localhost test]# yum clean all
Cleaning repos: Remote-Yum-Test
Other repos take up 230 M of disk space (use --verbose for details)
[root@localhost test]# yum install bash-completion
Remote-Yum-Test                                                                                                                                             | 1.4 kB  00:00:00
Remote-Yum-Test/primary                                                                                                                                     |  814 B  00:00:00
Remote-Yum-Test                                                                                                                                                                1/1
Resolving Dependencies
--> Running transaction check
---> Package bash-completion.noarch 1:2.1-6.el7 will be installed
--> Processing Conflict: util-linux-2.23.2-59.el7.x86_64 conflicts bash-completion < 1:2.1-1
--> Finished Dependency Resolution
**Error: util-linux conflicts with 1:bash-completion-2.1-6.el7.noarch**
** You could try using --skip-broken to work around the problem**
** You could try running: rpm -Va --nofiles --nodigest**
----------------------Local Install------------------------------------------------#####
[root@localhost test]# yum install /packages/test/bash-completion-2.1-6.el7.noarch.rpm
Examining /packages/test/bash-completion-2.1-6.el7.noarch.rpm: 1:bash-completion-2.1-6.el7.noarch
Marking /packages/test/bash-completion-2.1-6.el7.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package bash-completion.noarch 1:2.1-6.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================
 Package                                  Arch                            Version                                 Repository                                                  Size
===================================================================================================================================================================================
Installing:
 bash-completion                          noarch                          1:2.1-6.el7                             /bash-completion-2.1-6.el7.noarch                          259 k

Transaction Summary
===================================================================================================================================================================================
Install  1 Package

Total size: 259 k
Installed size: 259 k
Is this ok [y/d/N]:
Exiting on user command
Your transaction was saved, rerun it with:
 yum load-transaction /tmp/yum_save_tx.2019-02-01.22-47.07MHjr.yumtx
[root@localhost test]#

Hi Levin,

I’m wondering if the architecture has some how been listed wrong inside the metadata in NXRM. Could you paste the xml block for bash-completion from primary.xml which you can browse to in NXRM?

The code that builds the metadata inside NXRM is similar to the createrepo tool so another thing to try would be to manually setup a local Yum repository using the createrepo tool with just that one RPM to see if you get the same issue. You could also then compare the metadata from that to the metadata that NXRM is generating to see if there is a difference.

Thanks,

Joe

Thanks stephens, do you mean the repomd.xml?

----NXRM----
<?xml version="1.0" encoding="UTF-8"?>
<repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">
    <revision>1549003985</revision>
    <data type="filelists">
        <checksum type="sha256">28ca47ab98e1e8851fd89fc357ff5ee33733fbe9def90ee37eb0f7ff4a0db6c9</checksum>
        <open-checksum type="sha256">1161cc3623b0f3a5ac12f248bd479a0e7ec48a02d3027f797566d9e8e8e2712d</open-checksum>
        <location href="repodata/28ca47ab98e1e8851fd89fc357ff5ee33733fbe9def90ee37eb0f7ff4a0db6c9-filelists.xml.gz"></location>
        <timestamp>1549003985</timestamp>
        <size>736</size>
        <open-size>5228</open-size>
    </data>
    <data type="primary">
        <checksum type="sha256">b29d89f713801ef02320ab5febf02b9924fb88d640fb4ac41df06217e92ee58f</checksum>
        <open-checksum type="sha256">a7cbb079ef5e1cb00fc7ec6ad191995cdd129894fe207765c730eac2bd3df8b6</open-checksum>
        <location href="repodata/b29d89f713801ef02320ab5febf02b9924fb88d640fb4ac41df06217e92ee58f-primary.xml.gz"></location>
        <timestamp>1549003985</timestamp>
        <size>814</size>
        <open-size>1772</open-size>
    </data>
    <data type="other">
        <checksum type="sha256">6ae43f42eb228b91d47fb6700977598767ad170de5b3f56dd6f5b4a980e7cca4</checksum>
        <open-checksum type="sha256">d40781de24bdf78e8d3b029568b047b7617feed8903d6d2357ab117de8955b62</open-checksum>
        <location href="repodata/6ae43f42eb228b91d47fb6700977598767ad170de5b3f56dd6f5b4a980e7cca4-other.xml.gz"></location>
        <timestamp>1549003985</timestamp>
        <size>856</size>
        <open-size>2091</open-size>
    </data>
</repomd>
---- NXRM ----

Local Repo

---- Local Repo -----
<?xml version="1.0" encoding="UTF-8"?>
<repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">
 <revision>1549032216</revision>
<data type="filelists">
  <checksum type="sha256">b19e7f41d93f521cae7a492c2a91b860a0df9d91382263f2bbeccd04213e2698</checksum>
  <open-checksum type="sha256">5ac496afd2d30be513230ee26ea47b93903c4b3075a6ebab548e5bde82aadfe1</open-checksum>
  <location href="repodata/b19e7f41d93f521cae7a492c2a91b860a0df9d91382263f2bbeccd04213e2698-filelists.xml.gz"/>
  <timestamp>1549032216</timestamp>
  <size>731</size>
  <open-size>5481</open-size>
</data>
<data type="primary">
  <checksum type="sha256">06b9f311ce4aa6d676a3abf5418281592912839d6a13e131f571756bc9cd5876</checksum>
  <open-checksum type="sha256">dbfccc4732e1fa71950fd67fbc97dfa43a1e5b291eec2ff3137100a159469ede</open-checksum>
  <location href="repodata/06b9f311ce4aa6d676a3abf5418281592912839d6a13e131f571756bc9cd5876-primary.xml.gz"/>
  <timestamp>1549032216</timestamp>
  <size>812</size>
  <open-size>1822</open-size>
</data>
<data type="primary_db">
  <checksum type="sha256">607db0670baec4ca8a07e7832ac02178747d8302da38c67062c9f67a1b38a6de</checksum>
  <open-checksum type="sha256">6307b53a07817ac06d5d9f2fc6a99125ca54a6c38bdac567b66151841582a8c4</open-checksum>
  <location href="repodata/607db0670baec4ca8a07e7832ac02178747d8302da38c67062c9f67a1b38a6de-primary.sqlite.bz2"/>
  <timestamp>1549032217</timestamp>
  <database_version>10</database_version>
  <size>1918</size>
  <open-size>21504</open-size>
</data>
<data type="other_db">
  <checksum type="sha256">cac78fb4c88aaabe3b2e4b3d1e584b117c888ea0ce314e18590eb4ced906d995</checksum>
  <open-checksum type="sha256">b690229e6a42855d5bfae5fc865f677e1696d718682ae60cf5a7568653a46de9</open-checksum>
  <location href="repodata/cac78fb4c88aaabe3b2e4b3d1e584b117c888ea0ce314e18590eb4ced906d995-other.sqlite.bz2"/>
  <timestamp>1549032216</timestamp>
  <database_version>10</database_version>
  <size>1529</size>
  <open-size>8192</open-size>
</data>
<data type="other">
  <checksum type="sha256">365fcf4d148384ea64b14233f30a6731b678eb5e9ef6f1e4927be98ed92a7783</checksum>
  <open-checksum type="sha256">311938afd1324bbce79837836836df7bf7c44a8a3f9c8348b0a3f0ce76b2fca0</open-checksum>
  <location href="repodata/365fcf4d148384ea64b14233f30a6731b678eb5e9ef6f1e4927be98ed92a7783-other.xml.gz"/>
  <timestamp>1549032216</timestamp>
  <size>857</size>
  <open-size>2119</open-size>
</data>
<data type="filelists_db">
  <checksum type="sha256">c4a17f677785383b03cccf43b8b24c76ed1408269a7eb77bff8dda1d0be5ec9a</checksum>
  <open-checksum type="sha256">faca8d3bbb28d702b9b0da2439f4892ca9ee77f38952ad6bb67527eeed6f2ba9</open-checksum>
  <location href="repodata/c4a17f677785383b03cccf43b8b24c76ed1408269a7eb77bff8dda1d0be5ec9a-filelists.sqlite.bz2"/>
  <timestamp>1549032217</timestamp>
  <database_version>10</database_version>
  <size>1448</size>
  <open-size>9216</open-size>
</data>
</repomd>
---- Local  ------

The files I need are

repodata/b29d89f713801ef02320ab5febf02b9924fb88d640fb4ac41df06217e92ee58f-primary.xml.gz

from NXRM

and

“repodata/06b9f311ce4aa6d676a3abf5418281592912839d6a13e131f571756bc9cd5876-primary.xml.gz”

From your local repository.

NXRM####

<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://linux.duke.edu/metadata/common" xmlns:rpm="http://linux.duke.edu/metadata/rpm" packages="1">
    <package type="rpm">
        <name>bash-completion</name>
        <arch>noarch</arch>
        <version epoch="1" ver="2.1" rel="6.el7"></version>
        <checksum type="sha256" pkgid="YES">9d69453713af5bc73be93a7ff83393b224aba5b3b4e1623e88ddff4c64dfc7ca</checksum>
        <summary>Programmable completion for Bash</summary>
        <description>bash-completion is a collection of shell functions that take advantage
of the programmable completion feature of bash.</description>
        <packager>CentOS BuildSystem &lt;http://bugs.centos.org&gt;</packager>
        <url>http://bash-completion.alioth.debian.org/</url>
        <time file="1549003985138" build="1402358727"></time>
        <size package="87272" installed="264934" archive="278712"></size>
        <location href="bash-completion-2.1-6.el7.noarch.rpm"></location>
        <format>
            <rpm:license>GPLv2+</rpm:license>
            <rpm:vendor>CentOS</rpm:vendor>
            <rpm:group>Unspecified</rpm:group>
            <rpm:buildhost>worker1.bsys.centos.org</rpm:buildhost>
            <rpm:sourcerpm>bash-completion-2.1-6.el7.src.rpm</rpm:sourcerpm>
            <rpm:header-range start="1384" end="15820"></rpm:header-range>
            <rpm:provides>
                <rpm:entry ver="2.1" name="bash-completion" flags="EQ" rel="6.el7"></rpm:entry>
                <rpm:entry ver="2.1" name="config(bash-completion)" flags="EQ" rel="6.el7"></rpm:entry>
                <rpm:entry ver="2.1" name="pkgconfig(bash-completion)" flags="EQ" epoch="0"></rpm:entry>
            </rpm:provides>
            <rpm:requires>
                <rpm:entry name="/usr/bin/pkg-config"></rpm:entry>
                <rpm:entry ver="4.1" name="bash" flags="GE" epoch="0"></rpm:entry>
            </rpm:requires>
            <file>/etc/bash_completion.d/redefine_filedir</file>
            <file>/etc/profile.d/bash_completion.sh</file>
            <file type="dir">/etc/bash_completion.d</file>
        </format>
    </package>
</metadata>

####Local Repo ####

<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://linux.duke.edu/metadata/common" xmlns:rpm="http://linux.duke.edu/metadata/rpm" packages="1">
<package type="rpm">
  <name>bash-completion</name>
  <arch>noarch</arch>
  <version epoch="1" ver="2.1" rel="6.el7"/>
  <checksum type="sha256" pkgid="YES">9d69453713af5bc73be93a7ff83393b224aba5b3b4e1623e88ddff4c64dfc7ca</checksum>
  <summary>Programmable completion for Bash</summary>
  <description>bash-completion is a collection of shell functions that take advantage
of the programmable completion feature of bash.</description>
  <packager>CentOS BuildSystem &lt;http://bugs.centos.org&gt;</packager>
  <url>http://bash-completion.alioth.debian.org/</url>
  <time file="1549032210" build="1402358727"/>
  <size package="87272" installed="264934" archive="278712"/>
  <location href="bash-completion-2.1-6.el7.noarch.rpm"/>
  <format>
    <rpm:license>GPLv2+</rpm:license>
    <rpm:vendor>CentOS</rpm:vendor>
    <rpm:group>Unspecified</rpm:group>
    <rpm:buildhost>worker1.bsys.centos.org</rpm:buildhost>
    <rpm:sourcerpm>bash-completion-2.1-6.el7.src.rpm</rpm:sourcerpm>
    <rpm:header-range start="1384" end="15820"/>
    <rpm:provides>
      <rpm:entry name="bash-completion" flags="EQ" epoch="1" ver="2.1" rel="6.el7"/>
      <rpm:entry name="config(bash-completion)" flags="EQ" epoch="1" ver="2.1" rel="6.el7"/>
      <rpm:entry name="pkgconfig(bash-completion)" flags="EQ" epoch="0" ver="2.1"/>
    </rpm:provides>
    <rpm:requires>
      <rpm:entry name="/usr/bin/pkg-config"/>
      <rpm:entry name="bash" flags="GE" epoch="0" ver="4.1"/>
    </rpm:requires>
  <file>/etc/bash_completion.d/redefine_filedir</file>
  <file>/etc/profile.d/bash_completion.sh</file>
  <file type="dir">/etc/bash_completion.d</file>
  </format>
</package>

Hmm I’m honestly not sure why the direct install is working but it doesn’t look like an NXRM3 issue to me because the metadata is effectively the same.

To investigate further you could try pointing your yum configuration to your local repository by setting configuration similar to

[customrepo]
name=Custom Repository
baseurl=file:///repository1/
enabled=1
gpgcheck=0

Where baseurl is the location of your local repository and then run “yum install bash-completion”. If that works then there must be something different about the NXRM metadata that I’m not seeing. If it fails then it suggests that installing the RPM directly has a different behaviour.

Hi Stephen,

I tried the same way you are mentioned, the local repo appear no problem for installing that rpm. Further tested by uploading the local repomd.xml+gz metadata to the NXRM yum repository/repodata to replace the NXRM one. yum install will be successful. Btw, after few mins, the repomd on NXRM will be regenerated and fail again. At the moment i just workaround to setup as RAW repository instead of Yum.

Levin

Hi Levin,

Could you file a bug at https://issues.sonatype.org and include a support zip and a copy of the RPM that you are having trouble with and a copy of all metadata files from your NXRM repository.

How to generate a support zip: Support Ticket Best Practices – Sonatype Support

Ticket access is Sonatype and yourself by default so only you and Sonatype will be able to see the contents of the zip.

Thanks,

Joe

Alright. Thank you for your time.

1 Like

did you fix this problem? i have a similar problem in nexus host,(version is 3.31.1) that nexus can not parse the /etc/crypto-policies/back-ends/krb5.config of crypto-policies.rpm, krb5-libs depend on this file that can not be installed