I am having quite a problem with yum and elrepo. Let me start from the very beginning. There is a local machine with CentOS 7:
$ uname -a Linux vt001.localdomain 3.10.0-327.36.3.el7.xppsl_18.104.22.16882.x86_64 #1 SMP Fri Nov 18 10:03:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
I want to update the kernel to current version (now 4.18.8). To do that I follow the instruction from https://server.etutsplus.com/centos-7-how-to-update-kernel-to-the-latest-mainline-stable/ (sorry, it is in Japanese, but google translate works fine, and I found instructions most detailed so far).
The main problem is that after installation of elrepo, yum doesn't see the packages related to the kernel:
$ yum list available --disablerepo='*' --enablerepo=elrepo-kernel Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * elrepo-kernel: ftp.ne.jp Available Packages perf.x86_64 4.18.9-1.el7.elrepo elrepo-kernel python-perf.x86_64 4.18.9-1.el7.elrepo elrepo-kernel
As it can be seen, last two packages from repo are recognized, but all other packages are absent. I checked the very repo contents (by the link http://www.ftp.ne.jp/Linux/RPMS/elrepo/kernel/el7/x86_64/RPMS/) and it has a bunch of packages including kernel-ml which I am hunting for. Also I tried two other repos from the list (https://elrepo.org/tiki/Download), but always same result: only two last packages are available from elrepo-kernel repository. By the way, other elrepo brunches seems to be seen properly.
As the story goes, I decided to install kernel-ml directly from rpm. That was successful:
$ yum info kernel-ml Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: ftp.jaist.ac.jp * elrepo: ftp.ne.jp * extras: ftp.jaist.ac.jp * updates: ftp.jaist.ac.jp Installed Packages Name : kernel-ml Arch : x86_64 Version : 4.18.8 Release : 1.el7.elrepo Size : 203 M Repo : installed
I even can reboot with that kernel, but then I need to swap kernel-related packages: kernel-headers, kernel-tools, kernel-tools-libs and kernel-devel. The thing is that those packages are again in elrepo-kernel and I don't have access to them. Here I am a little afraid to do that manually because of lack of experience. I don't know, how to do that without
yum swap, or how to use
yum swap with local rpm packages (I have all them downloaded from the elrepo-kernel).
The funny thing is that I even tried to create my own local repo with createrepo having .rpm files in particular directory. When I wrote .repo file in /etc/yum.repos.d/ and added that repo to yum, it states something strange for me in repolist:
$ yum repolist ... repo id repo name status ... !my-kernel2 Downloaded kernel rpms 2+7
I wonder, what does (2+7) mean? Because again if I want to see available packages, only two are present:
$ yum list available --disablerepo='*' —enablerepo=my-kernel2 Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile Error: No matching Packages to list
$ sudo yum repo-pkgs my-kernel2 list ... Available Packages perf.x86_64 4.18.8-1.el7.elrepo my-kernel2 python-perf.x86_64 4.18.8-1.el7.elrepo my-kernel2
While I have this in the RPMS forlder in my-kernel2 repo:
$ ls -l RPMS/ total 69776 -rw-r--r-- 1 ivan ivan 46M Sep 25 12:22 kernel-ml-4.18.8-1.el7.elrepo.x86_64.rpm -rw-r--r-- 1 ivan ivan 12M Sep 25 12:22 kernel-ml-devel-4.18.8-1.el7.elrepo.x86_64.rpm -rw-r--r-- 1 ivan ivan 7.4M Sep 25 12:22 kernel-ml-doc-4.18.8-1.el7.elrepo.noarch.rpm -rw-r--r-- 1 ivan ivan 1.3M Sep 25 12:22 kernel-ml-headers-4.18.8-1.el7.elrepo.x86_64.rpm -rw-r--r-- 1 ivan ivan 164K Sep 25 12:22 kernel-ml-tools-4.18.8-1.el7.elrepo.x86_64.rpm -rw-r--r-- 1 ivan ivan 66K Sep 25 12:22 kernel-ml-tools-libs-4.18.8-1.el7.elrepo.x86_64.rpm -rw-r--r-- 1 ivan ivan 47K Sep 25 12:22 kernel-ml-tools-libs-devel-4.18.8-1.el7.elrepo.x86_64.rpm -rw-r--r-- 1 ivan ivan 1.9M Sep 25 12:22 perf-4.18.8-1.el7.elrepo.x86_64.rpm -rw-r--r-- 1 ivan ivan 481K Sep 25 12:22 python-perf-4.18.8-1.el7.elrepo.x86_64.rpm
So, I am completely lost. Basically, I can produce two questions:
- Can I use yum swap with local .rpm files?
- What is that mystery with packages that are in the repo but are not seen by yum???
Thanks to the comments and answer by GracefulRestart, I found excluded packages in yum.config:
exclude=kernel* centos* ibutils-libs*
I don't know how (on Earth) that line appeared in the config, but without it yum sees all that I need.