1

TL;DR... I'm replacing public yum repos with an internal one and I can't figure out why two public ones continue to display in "yum repolist" when they don't appear in the normal config files.

I've installed Oracle Linux 7.1 (closely derived from RHEL 7.1) and am switching the system's yum repositories from the public repos to our internal private one.

Oracle Linux 7.1 ships with a default /etc/yum.repos.d/public-yum-ol7.repo which contains several repos, the only two which are enabled are "ol7_latest" and "ol7_UEKR3" which come from public-yum.oracle.com.

I delete this file and copy my own own .repo files... uswulnrepo01_ol7_latest.repo and uswulnrepo01_ol7_uekr3.repo. (uswulnrepo01 is our internal yum repository).

After I do this I verify with a "yum clean all && yum repolist" to verify only my two repositories show up, which they do.

The problem is I end up with 4 repositories...

[root@oel7template yum.repos.d]# yum repolist
Loaded plugins: langpacks, rhnplugin
This system is receiving updates from ULN.
repo id                           repo name                                                                               status
ol7_x86_64_UEKR3                  Unbreakable Enterprise Kernel Release 3 for Oracle Linux 7 (x86_64) - Latest              158
ol7_x86_64_latest                 Oracle Linux 7 Latest (x86_64)                                                          9,212
uswulnrepo01_ol7_UEKR3/x86_64     Unbreakable Enterprise Kernel Release 3 for Oracle Linux 7 (x86_64) - Latest              123
uswulnrepo01_ol7_latest/x86_64    Oracle Linux 7 Latest (x86_64)                                                          6,784
repolist: 16,277

I cannot figure out where ol7_x86_64_UEKR3 and ol7_x86_64_latest are coming from. When I try to get extended info on the repositories (I've removed non-relevant data)...

[root@oel7template yum.repos.d]# yum repolist -v
Looking for repo options for [main]
Looking for repo options for [ol7_x86_64_UEKR3]
Repo 'ol7_x86_64_UEKR3' setting option 'enabled' = '1'
Repo 'ol7_x86_64_UEKR3' setting option 'gpgcheck' = '1'
Repo 'ol7_x86_64_UEKR3' setting option 'timeout' = '120'
Looking for repo options for [ol7_x86_64_latest]
Repo 'ol7_x86_64_latest' setting option 'enabled' = '1'
Repo 'ol7_x86_64_latest' setting option 'gpgcheck' = '1'
Repo 'ol7_x86_64_latest' setting option 'timeout' = '120'

Repo-id      : ol7_x86_64_UEKR3
Repo-name    : Unbreakable Enterprise Kernel Release 3 for Oracle Linux 7 (x86_64) - Latest
Repo-baseurl : https://linux-update.oracle.com/XMLRPC/GET-REQ/ol7_x86_64_UEKR3

Repo-id      : ol7_x86_64_latest
Repo-name    : Oracle Linux 7 Latest (x86_64)
Repo-baseurl : https://linux-update.oracle.com/XMLRPC/GET-REQ/ol7_x86_64_latest

Repo-id      : uswulnrepo01_ol7_UEKR3/x86_64
Repo-name    : Unbreakable Enterprise Kernel Release 3 for Oracle Linux 7 (x86_64) - Latest
Repo-baseurl : http://uswulnrepo01.[REDACTED]/yum/OracleLinux/OL7/UEKR3/x86_64/
Repo-filename: /etc/yum.repos.d/uswulnrepo01_ol7_uekr3.repo

Repo-id      : uswulnrepo01_ol7_latest/x86_64
Repo-name    : Oracle Linux 7 Latest (x86_64)
Repo-baseurl : http://uswulnrepo01.[REDACTED]/yum/OracleLinux/OL7/latest/x86_64/
Repo-filename: /etc/yum.repos.d/uswulnrepo01_ol7_latest.repo

repolist: 13,799

Notice how the top two unwanted linux-update.oracle.com entries don't have a Repo-filename value, nor do they match public-yum.oracle.com which the default public-yum-ol6.repo had.

I've tried everything to remove these entries but I can't figure out how. I've looked around in other yum config files, done some content searches on the /etc/ directory and I can't find anything relevant. I've even deleted the contents of /var/cache/yum/. When I do a "yum repolist" after that, the public yum folders re-appear.

I doubt yum itself was modified by Oracle, so these repos have to be in a config file somewhere... How can I figure out where? Is there a command which lists all config files yum reads?

Edit

I created a new configuration file "/etc/yum.repos.d/ol7_x86_64_UEKR3.repo" as an attempt to permenantly disable the repo:

[ol7_x86_64_UEKR3]
name=Unbreakable Enterprise Kernel Release 3 for Oracle Linux 7 (x86_64) - Latest
enabled=0

And I get a new error (again, removed unnecessary info):

[root@oel7template yum.repos.d]# yum repolist -v
Looking for repo options for [main]
Looking for repo options for [ol7_x86_64_UEKR3]
Repo 'ol7_x86_64_UEKR3' setting option 'enabled' = '1'
Repo 'ol7_x86_64_UEKR3' setting option 'gpgcheck' = '1'
Repo 'ol7_x86_64_UEKR3' setting option 'timeout' = '120'
Repository ol7_x86_64_UEKR3 is listed more than once in the configuration

To me, this reinforces the idea that this setting is in a config file somewhere... But how do I find it?

  • Oracle is most likely bundling it in yum by default. Run rpm -ql yum to see which files oracle's yum rpm contains. – Xavier Lucas Mar 20 '15 at 22:54
  • Do you still believe this even after my edit above where I created a new .repo file to disable the unwanted repo? – Caesar Kabalan Mar 20 '15 at 22:56
  • Bundled doesn't mean hardcoded. My point is to list the files bundled in the package like plugins. – Xavier Lucas Mar 20 '15 at 23:02
  • For clarity, I ran this rpm -ql yum | xargs grep 'linux-update.oracle.com' and it didn't return anything relevant. The file in your answer below also does not exist in the yum package, but probably does in the rhn package. Looks like your post disappeared. Adding thoses lines DID fix the problem. If you post again I'll mark as the answer. – Caesar Kabalan Mar 20 '15 at 23:07
  • Dunno what happened but it's there :) – Xavier Lucas Mar 20 '15 at 23:10
2

Edit /etc/yum/pluginconf.d/rhnplugin.conf

And set :

[ol7_x86_64_UEKR3]
enabled=0

[ol7_x86_64_latest]
enabled=0
  • 1
    This solved my problem, I had to add these lines since they didn't exist. Running a yum clean all && yum repolist returned just my two internal repositories. Thank you for your help! – Caesar Kabalan Mar 20 '15 at 23:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.