Join the community today
Register Now

Repository priority protections

Discussion in 'System Administration' started by SneakyDave, Mar 21, 2015.

Tags:
  1. SneakyDave

    SneakyDave Member

    68
    11
    8
    Jul 24, 2014
    Ratings:
    +16
    Local Time:
    6:50 PM
    1.0.15
    Noticed this when doing a recent yum update.

    Code:
    [root@xxxx centmin-v1.2.3mod]# yum -y update
    Loaded plugins: downloadonly, fastestmirror, priorities
    Setting up Update Process
    Loading mirror speeds from cached hostfile
     * base: mirror.steadfast.net
     * epel: mirror.steadfast.net
     * extras: mirror.ash.fastserv.com
     * rpmforge: mirror.rit.edu
     * updates: mirror.cs.uwp.edu
    1639 packages excluded due to repository priority protections
    No Packages marked for Update
    [root@xxxx centmin-v1.2.3mod]#
    
    1639 packages excluded? Is this normal? How can I tell what is getting them excluded?
     
  2. SneakyDave

    SneakyDave Member

    68
    11
    8
    Jul 24, 2014
    Ratings:
    +16
    Local Time:
    6:50 PM
    1.0.15
    I assume it's normal. I was thinking that I had a lot of updates to apply, but it told me there weren't any to update, so I was curious why that was, and looking at the yum history, I must have installed the daily yum cron, and it had updated everything a few hours earlier. lol.
     
  3. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    9:50 AM
    Nginx 1.13.x
    MariaDB 5.5
    yeah it's normal and if you have yum-cron setup for automatic YUM package updates, you won't have much to update as yum-cron does daily update checks/installs.

    tagging on --disableplugin=priorities will disable priority protections i.e. for listing updates

    Code:
    yum list updates --disableplugin=priorities
    Loaded plugins: downloadonly, fastestmirror
    Loading mirror speeds from cached hostfile
    * base: centos.mirror.ndchost.com
    * epel: mirror.prgmr.com
    * extras: mirror.hmc.edu
    * rpmforge: mirror.hmc.edu
    * updates: mirrors.cat.pdx.edu
    in this case no updates

    without yum priorities disabled
    Code:
    yum list updates
    Loaded plugins: downloadonly, fastestmirror, priorities
    Loading mirror speeds from cached hostfile
    * base: centos.mirror.ndchost.com
    * epel: mirror.prgmr.com
    * extras: mirror.hmc.edu
    * rpmforge: mirror.hmc.edu
    * updates: mirrors.cat.pdx.edu
    1677 packages excluded due to repository priority protections
    Yum priorities info PackageManagement/Yum/Priorities - CentOS Wiki i specifically setup 3rd party YUM repos like axivo, remi, varnish cache, percona etc with YUM priorities in their respective *.repo files so they do not conflict with CentOS base YUM packages.
     
  4. SneakyDave

    SneakyDave Member

    68
    11
    8
    Jul 24, 2014
    Ratings:
    +16
    Local Time:
    6:50 PM
    1.0.15
    Thanks, yeah, I was just looking at the list of repos you include with yum repolist all. That makes sense.
     
  5. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    9:50 AM
    Nginx 1.13.x
    MariaDB 5.5
    I like to use redis as an example for yum priorities in action to protect CentOS base packages

    CentOS 6.x doesn't have redis package, so uses EPEL yum repo and that has redis version defaults to 2.4.10.
    Code:
    yum list redis -q
    Available Packages
    redis.x86_64 2.4.10-1.el6 epel
    
    EPEL redis has priority first due to yum priorities

    Remi repo has redis 2.8.19-1 version but you won't see it if you have yum-priorities enabeld (which is default)
    Code:
    yum list redis -q --enablerepo=remi                          
    Available Packages
    redis.x86_64 2.4.10-1.el6 epel
    
    if you disable yum priorities, then Remi's redis version is seen

    Code:
    yum list redis -q --disableplugin=priorities --enablerepo=remi
    Available Packages
    redis.x86_64 2.8.19-1.el6.remi remi
    
    This way with yum priorities, Centmin Mod LEMP environment can control 3rd party yum repositories and prevent possible conflicts with CentOS defaults.