1

My sysadmin would like a proxy whitelist for some old CentOS sever I am trying to update (until now, it was cut off from the Internet).

I asked to have full Internet access, so I can just update everything, and install some more, and then send him the list of URLs that were needed for the update, so he can switch to a whitelist.

Unfortunately, the URLs used are not logged in /var/log/yum.log.

I came upon this question: How to know from which yum repository a package has been installed?

It tells me the "From repo", but this is just a "logical name" which can map to many URLs, and change over time, and "URL" is the "creator/source" of the package, not where it was physically downloaded from.

Is there somewhere else, where I can extract the URLs that yum used to install/update, or maybe can I configure the logging of yum to also log that information?

Currently, updating a package just produces something like this in the logs:

May 18 18:04:07 Updated: 1:busybox-1.15.1-21.el6_6.x86_64

2

The repo URLs are in the yum configuration files in the /etc/yum.repos.d directory.

Keep in mind that most CentOS repos use mirrorlists, which contain the URLs of every possible CentOS mirror, and any given package might have been downloaded from any mirror.

On EL 7 you can find the specific URL a package was downloaded from in the file /var/lib/yum/yumdb/[a-z]/[unique-id-packagename]/origin_url. This information will not be made available in EL 8.

0

You can do yum info to see it, from yum installed for example.

Consider zlib on a Centos 6 box -

yum info zlib
Installed Packages
Name        : zlib
Arch        : i686
Version     : 1.2.3
Release     : 29.el6
Size        : 136 k
Repo        : installed
From repo   : base
Summary     : The zlib compression and decompression library
URL         : http://www.gzip.org/zlib/
License     : zlib and Boost
Description : Zlib is a general-purpose, patent-free, lossless data compression
            : library which is used by many different programs.

Name        : zlib
Arch        : x86_64
Version     : 1.2.3
Release     : 29.el6
Size        : 149 k
Repo        : installed
From repo   : anaconda-CentOS-201311272149.x86_64
Summary     : The zlib compression and decompression library
URL         : http://www.gzip.org/zlib/
License     : zlib and Boost
Description : Zlib is a general-purpose, patent-free, lossless data compression
            : library which is used by many different programs.

It shows From Repo for you.

  • The only URL I see in there is "gzip.org/zlib". It is not where the (compiled) package was downloaded from, rather where the source code comes from. This does not answer my question. – monster May 19 '17 at 11:16
  • You have to do more work and actually check the repo the package is listed from to get more information and therefore the URL. – MartyS Magemojo Support May 23 '17 at 0:56

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.