Excluding a package from WHM Update Server Software
AnsweredIs there some way to exclude a package from being updated by WHM Update Server Software?
I have tried adding the package to to the excludes in /etc/yum.conf - which does work when I manually run yum - but this does not seem to stop WHM Update Server Software attempting the update (which fails)
Details Of The Actual Error...
Server is running cPanel & WHM v130.0.16
WHM Update Server Software is attempting to do a big upgrade of 239 packages. But it fails every time because the server has perl-DBD-MySQL installed (needed by an old Perl script on the server)
It downloads all the packages OK, runs transaction check which succeeds, then this happens...
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'yum clean packages'.
Error: Transaction test error:
file /usr/share/mysql/charsets/Index.xml from install of mysql-common-8.0.43-1.el9_6.x86_64 conflicts with file from package MariaDB-common-10.6.24-1.el9.x86_64
file /usr/share/mysql/charsets/armscii8.xml from install of mysql-common-8.0.43-1.el9_6.x86_64 conflicts with file from package MariaDB-common-10.6.24-1.el9.x86_64
....then lots more similar conflict errors
So Update Server Software fails because the new perl-DBD-MySQL package has dependencies of mysql-common and mysql-libs
Those dependencies are not currently installed because perl-DBD-MySQL does not actually need them (because the server is using MariaDB not MySQL 8.0)
I do not know why the latest perl-DBD-MySQL update has them as a dependency
mysql-common fails to install because it conflicts with MariaDB
I have added perl-DBD-MySQL to the excludes in /etc/yum.conf - and confirmed that when I manually run yum, it will not update perl-DBD-MySQL
But Update Server Software still attempts to update it - so the whole update fails every time (it has been trying to do this update for weeks now)
It looks like Update Server Software is ignoring /etc/yum.conf (even though it uses yum)
Is there some way to exclude a package from Update Server Software?
Additional Note: The log file says
checkyum version 22.3 (excludes: bind-chroot)
This suggests WHM Update Server Software is only excluding bind-chroot (and nothing else).
bind-chroot is the first item in the list of excludes in /etc/yum.conf
I do not know whether WHM Update Server Software is getting that exclude from /etc/yum.conf (and only reading the first item of the exclude list) or whether it is getting the exclude from somewhere else
NOTE: /etc/yum.conf is actually a Symbolic Link for /etc/dnf/dnf.conf - so the exclude applies to DNF aswell as YUM
-
Hey there! As far as I'm aware the system should be using that file how you are expecting. Can you let me know *exactly* what perl-DBD-MySQL package you have installed, and exactly what is in the yum.conf file so I can do some more testing with this?
0 -
Thanks for the reply, I have answered below - but one question I do have is that the log file contains
Processing: Running update-packages
Processing command `/usr/local/cpanel/scripts/update-packages`
[/usr/local/cpanel/scripts/update-packages] checkyum version 22.3 (excludes: bind-chroot)This says excludes: bind-chroot (not the rest of the yum.conf excludes)
Does this mean that it is not excluding the rest of the yum.conf excludes?----------------------------------
To answer your question - I just checked and yum does not list perl-DBD-MySQL as being installed - so I guess something is messed up
Without perl-DBD-MySQL in the exclude, both yum and cpanel want to install perl-DBD-MySQL (and are saying it is an upgrade not a new install)
With perl-DBD-MySQL in the exclude, only cpanel wants to install perl-DBD-MySQL
From the log file, the package cpanel is attempting to install is
[/usr/local/cpanel/scripts/update-packages] perl-DBD-MySQL x86_64 4.053-1.el9 appstream 144 k
It is attempting to install dependencies:
[/usr/local/cpanel/scripts/update-packages] mysql-common x86_64 8.0.43-1.el9_6 appstream 68 k
[/usr/local/cpanel/scripts/update-packages] mysql-libs x86_64 8.0.43-1.el9_6 appstream 1.2 M
This is the yum.conf file (this is the file that came with the server - the only thing I have changed is to add perl-DBD-MySQL)[main]
exclude=bind-chroot dovecot* exim* filesystem p0f php* proftpd* pure-ftpd* perl-DBD-MySQL
tolerant=1
plugins=1
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=True
skip_if_unavailable=False
minrate=50k
When I enter: yum update (using SSH), yum lists the packages to be installed (then asks whether to proceed - which I decline)Without perl-DBD-MySQL in the exclude, the list includes perl-DBD-MySQL and dependencies mysql-common and mysql-libs
After adding perl-DBD-MySQL to the exclude, all 3 are no longer present
0 -
Yes, we specifically exclude the bind-chroot package even if that is not included in the yum.conf.
I'm not seeing that perl-DBD-MySQL gets installed on a default cPanel machine, so I'm guessing this came from somewhere else since it's from the appstream repo. Is it possible there was another database server installed at some point?
0 -
I do not think so - this is quite a new server
Sorry but I do not see the relevance anyway - the issue is that the exclude is being ignored by cpanel
One thing I did notice is that perl-DBD-MySQL is the only exclude with upper case letters
If I add perl-dbd-mysql to the exclude instead of perl-DBD-MySQL then yum does not exclude it either
I just wondered whether cpanel was lower casing the list?
I may be just clutching at straws though
0 -
We don't perform any case adjustments to that list, although it doesn't mean we're processing things correctly there.
Let me do some testing with this and I'll get back to you.
0 -
I'm not seeing issues with the case of text in yum.conf on my test machine. Is it possible you could create a ticket so we can see this is action on your current system?
0 -
I did some more testing
I excluded "unzip" and both cpanel and yum excluded it OK - so this confirms that the exclude in yum.conf do work in cpanel
I then excluded "perl-Net-SSLeay" which is the only other "perl-..." package that the server says needs updating - and cpanel failed to exclude it (yum did exclude it)
yum says perl-Net-SSLeay IS installed
perl-Net-SSLeay.x86_64 1.94-1.el9 @appstreamcpanel wants to update it to
perl-Net-SSLeay x86_64 1.94-3.el9 appstream 391 k
So it is not just perl-DBD-MySQL
Does this help you track it down?0 -
Not really - that makes things even more weird to me since we aren't expecting that to be excluded based on the yum.conf settings are we?
0 -
Sorry - I think you misunderstood
I removed perl-DBD-MySQL from yum.conf and added "unzip" instead and confirmed that both cpanel and yum then excluded the unzip package - this worked as expected
I then removed "unzip" and added "perl-Net-SSLeay" to yum.conf to see what would happen
yum then excluded it
cpanel did NOT exclude it
I also tried adding perl-* to yum.conf to see what would happen. Again yum excluded the two perl- items and cpanel did not exclude them
So cpanel is failing to exclude items that start with "perl-" and have upper case letters in them.
0 -
I've been thinking about ways to test this and I found the mesa-libEGL on a new version 132 system, and that has capital letters. I added that to the exclude line in yum.conf and then ran scripts/update-packages and got this error:
Error:
Problem 1: package mesa-dri-drivers-25.0.7-3.el9_7.alma.1.x86_64 from appstream requires (mesa-libEGL(x86-64) = 25.0.7-3.el9_7.alma.1 if mesa-libEGL(x86-64)), but none of the providers can be installedso at least on my test machine it would appear that cPanel is both reading the yum.conf exclude line *and* respecting the upper case characters there.
Once I removed that entry from the yum.conf exclude line the update completed normally.
At this point it would be best to create a ticket since I'm not able to reproduce this specific issue.
0 -
Yes I have done a similar test myself and got that result too - so it looks like the capital letters idea was wrong
So the problem I am getting only seems to happen when the name starts with perl-
I know it seems like an odd error - but are you able to test that?
0 -
I FINALLY FIXED IT!!!
I have posted the solution in case anyone else has this problem
The problem is that cpanel ignores exclude items that start with "perl-" (no idea why)
With "perl-DBD-MySQL" as one of the exclude items in yum.conf, Update Server Software fails to exclude perl-DBD-MySQL
I changed the exclude item to "*-DBD-MySQL" (using a wildcard asterisk at the start) - and Update Server Software did exclude perl-DBD-MySQL and did the whole update (all 240 packages) OK
Just to check it, I changed the exclude back to perl-DBD-MySQL and used Update Server Software again and it tried to install just perl-DBD-MySQL - which failed
I changed the exclude back to *-DBD-MySQL and used Update Server Software again - and it said nothing needed updating
0 -
I did confirm that /scripts/update-packages ignores any perl* exclusions from yum.conf since cPanel relies on Perl internally, just in case we really do need to update something with those packages.
0 -
Thanks for the confirmation
I would like to make a suggestionI wasted a huge amount of time on this issue because of a lack of information and very unexpected behavior by /scripts/update-packages
The output from /scripts/update-packages currently says (rather confusingly)
excludes bind-chrootI would suggest it should be changed to
excludes bind-chroot and all excludes in yum.conf or dnf.conf. Excludes starting with "perl" are ignored for internal reasons.I know this is more verbose - but people do not normally read that output unless there is a problem - and then they want as much information as possible.
Thanks
0 -
I agree 100% - there needs to be some docs or some changed output, or both, to make this more clear.
I created case CPANEL-50547 with our developers so that output can be made more clear, and if I hear any updates on that I'll be sure to post!
0 -
Update - it looks like our team is changing the wording on the tool in version 134 so the output looks like this:
checkyum version 22.3excludes: bind-chroot dovecot* exim* filesystem kernel kernel-xen kernel-smp kernel-pae kernel-PAE kernel-SMP kernel-hugemem kernel-debug* kernel-core kernel-modules* kernel-devel* kmod-[a-z]* p0f php* proftpd* pure-ftpd*"0 -
Thanks for the update
I assume that means the output now lists everything that is being excluded - which is definitely an improvement.
0 -
Correct - that will all show up in the future version when you execute the command.
0
Please sign in to leave a comment.
Comments
18 comments