Skip to main content

Excluding a package from WHM Update Server Software

Answered

Comments

18 comments

  • cPRex Jurassic Moderator

    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
  • Alan Reece

    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
  • cPRex Jurassic Moderator

    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? 

    https://support.cpanel.net/hc/en-us/articles/19127424189207-Unable-to-install-the-DBD-mysql-Perl-module

    0
  • Alan Reece

    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
  • cPRex Jurassic Moderator

    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
  • cPRex Jurassic Moderator

    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
  • Alan Reece

    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      @appstream

    cpanel 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
  • cPRex Jurassic Moderator

    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
  • Alan Reece

    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
  • cPRex Jurassic Moderator

    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 installed

    so 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
  • Alan Reece

    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
  • Alan Reece

    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
  • cPRex Jurassic Moderator

    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
  • Alan Reece

    Thanks for the confirmation


    I would like to make a suggestion

    I 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-chroot

    I 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
  • cPRex Jurassic Moderator

    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
  • cPRex Jurassic Moderator

    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.3
    excludes: 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
  • Alan Reece

    Thanks for the update

    I assume that means the output now lists everything that is being excluded - which is definitely an improvement.

    0
  • cPRex Jurassic Moderator

    Correct - that will all show up in the future version when you execute the command.

    0

Please sign in to leave a comment.