Koozali.org: home of the SME Server

Latest Updates - Dependency Error

Offline slicknic

  • *
  • 23
  • +0/-0
    • http://www.oasisdriving.co.uk
Latest Updates - Dependency Error
« on: February 13, 2020, 04:05:34 PM »
Hi Everyone,

Just trying to run the latest updates, and keep coming up with a dependency error.

--> Finished Dependency Resolution
Error: Package: smeserver-yum-2.4.0-29.el6.sme.noarch (smeupdates)
           Requires: perl(File::Slurp)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

I've never seen this before when updating.

Thanks in advance for help in resolving this issue.

Nick
...
Oasis Driving School - Bristol
www.oasisdriving.co.uk

Online TerryF

  • grumpy old man
  • *
  • 1,821
  • +6/-0
Re: Latest Updates - Dependency Error
« Reply #1 on: February 13, 2020, 06:35:42 PM »
That file comes from the base repo, should be enabled by default

# db yum_repositories show base
base=repository
    EnableGroups=no
    Exclude=initscripts,libgsf
    GPGCheck=yes
    MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
    Name=CentOS - os
    Visible=yes
    status=enabled

Check status of the repo, otherwise it may just be a simple issue with routing/connectivity

--
qui scribit bis legit

Offline slicknic

  • *
  • 23
  • +0/-0
    • http://www.oasisdriving.co.uk
Re: Latest Updates - Dependency Error
« Reply #2 on: February 13, 2020, 07:11:35 PM »
Thanks for the reply. For some reason it's disabled....

base=repository
    BaseURL=http://vault.centos.org/4.9/os/$basearch
    EnableGroups=no
    Exclude=initscripts,libgsf
    GPGCheck=yes
    MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
    Name=CentOS - os
    Visible=yes
    status=disabled

I have enabled it, and the updates are now running....
...
Oasis Driving School - Bristol
www.oasisdriving.co.uk

Online TerryF

  • grumpy old man
  • *
  • 1,821
  • +6/-0
Re: Latest Updates - Dependency Error
« Reply #3 on: February 13, 2020, 07:18:30 PM »
Make sure its enabled, ensures upstream updates are yummed :-) is that a word? yummed
--
qui scribit bis legit

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: Latest Updates - Dependency Error
« Reply #4 on: February 14, 2020, 01:47:19 PM »
These repos are all enabled by default -

Quote from: find /etc/e-smith/db/yum_repositories/defaults/ -name "status" -exec grep -H 'enabled' "{}" \;

/etc/e-smith/db/yum_repositories/defaults/smeaddons/status:enabled
/etc/e-smith/db/yum_repositories/defaults/smeos/status:enabled
/etc/e-smith/db/yum_repositories/defaults/smeextras/status:enabled
/etc/e-smith/db/yum_repositories/defaults/smeupdates/status:enabled
/etc/e-smith/db/yum_repositories/defaults/base/status:enabled
/etc/e-smith/db/yum_repositories/defaults/updates/status:enabled


These repositories are defined by default but disabled:
Quote from: find /etc/e-smith/db/yum_repositories/defaults/ -name "status" -exec grep -H 'disabled' "{}" \;

/etc/e-smith/db/yum_repositories/defaults/smedev/status:disabled
/etc/e-smith/db/yum_repositories/defaults/extras/status:disabled
/etc/e-smith/db/yum_repositories/defaults/smeupdates-testing/status:disabled
/etc/e-smith/db/yum_repositories/defaults/fasttrack/status:disabled
/etc/e-smith/db/yum_repositories/defaults/centosplus/status:disabled
/etc/e-smith/db/yum_repositories/defaults/smetest/status:disabled
/etc/e-smith/db/yum_repositories/defaults/smecontribs/status:disabled
/etc/e-smith/db/yum_repositories/defaults/contrib/status:disabled


If (like me) you've been doing things you shouldn't have been doing with yum on your server, this command will list all the repositories that yum sees, and show you if they're in the configuration database, along with the default status. It will take a while to run on the first attempt as it updates repo info for all repos; after that it is faster.
Code: [Select]
printf "%-30s" "repository"; \
printf "%-12s" "yum status"; \
printf "%-10s" "db status"; \
printf "(default)\n"; \
yum repolist all | egrep -v '^L|^ |^repo id|^repolist' | \
  sed 's/ .*\(...abled\).*/\t\1/' | \
  while read repo status; do
    printf "%-30s" $repo;
    printf "%-12s" "$status";
    printf "%-10s" "$(db yum_repositories getprop $repo status || echo "n/a")";
    printf "($(cat /etc/e-smith/db/yum_repositories/defaults/$repo/status 2>/dev/null || echo "n/a"))\n";
  done

Output on my system:
Code: [Select]
repository                    yum status  db status (default)
base                          enabled     enabled   (enabled)
centos-sclo-rh                disabled    disabled  (n/a)
centos-sclo-sclo              disabled    n/a       (n/a)
centos-sclo-sclo-debuginfo    disabled    n/a       (n/a)
centos-sclo-sclo-source       disabled    n/a       (n/a)
centos-sclo-sclo-testing      disabled    n/a       (n/a)
centosplus                    disabled    disabled  (disabled)
contrib                       disabled    disabled  (disabled)
epel                          disabled    disabled  (n/a)
epel-nodejs                   disabled    disabled  (n/a)
extras                        disabled    disabled  (disabled)
fasttrack                     disabled    disabled  (disabled)
fws                           disabled    disabled  (n/a)
puppet5                       disabled    disabled  (n/a)
remi                          disabled    disabled  (n/a)
remi-safe                     disabled    disabled  (n/a)
smeaddons                     enabled     enabled   (enabled)
smecontribs                   disabled    disabled  (disabled)
smedev                        disabled    disabled  (disabled)
smeextras                     enabled     enabled   (enabled)
smeos                         enabled     enabled   (enabled)
smetest                       disabled    disabled  (disabled)
smeupdates                    enabled     enabled   (enabled)
smeupdates-testing            disabled    disabled  (disabled)
sogo3                         disabled    disabled  (n/a)
sogo4                         disabled    disabled  (n/a)
stephdl                       disabled    disabled  (n/a)
updates                       enabled     enabled   (enabled)
wazuh                         disabled    disabled  (n/a)
zabbix                        enabled     n/a       (n/a)
zabbix-debuginfo              disabled    n/a       (n/a)
zabbix-deprecated             disabled    n/a       (n/a)
zabbix-non-supported          enabled     n/a       (n/a)

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Latest Updates - Dependency Error
« Reply #5 on: February 14, 2020, 08:32:20 PM »
Mmccarn

Great script

Could be added to audittool to check if any repo has been added in yum without adding it via the db. Like adding a file in /etc/yum.smerepo.d/

Would you mind post a nfr against sme10 ?

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: Latest Updates - Dependency Error
« Reply #6 on: February 15, 2020, 06:53:50 AM »

Offline slicknic

  • *
  • 23
  • +0/-0
    • http://www.oasisdriving.co.uk
Re: Latest Updates - Dependency Error
« Reply #7 on: February 15, 2020, 01:20:18 PM »
Again, thanks for your help. Enabling the base repo enabled the updates to complete, however the repo did not stay enabled. I used this command.

yum update --enablerepo=base

I am trying to be self sufficient and searching for how to do this, but not getting very far. I assume a template has to be saved/expanded to make this permanent?
...
Oasis Driving School - Bristol
www.oasisdriving.co.uk

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: Latest Updates - Dependency Error
« Reply #8 on: February 15, 2020, 02:00:38 PM »
Code: [Select]
db yum_repositories setprop base status enabled
signal-event yum-modify

You probably want to run the command I provided to see if there is anything else unexpected about your yum configuration.

I can only think of two explanations for having the 'base' repository disabled:
1) This server has been continuously updated from SME 7.1, but never had the yum configuration reset
--> in this case, there will be other repositories that should be enabled by default.  The basic structure of the SME yum distribution system changed when v7.2 was released. (in 7.1 and earlier, SME Devs migrated, compiled, and distributed many more packages from the SME repositories; starting with 7.2 unmodified Centos packages have been installed and maintained using the default Centos repos)

2) Someone managing the server has been intentionally ([edit] or unintentionally) modifying the yum defaults
--> in this case, there may be totally unexpected yum repositories configured, and you really should check thoroughly.  It can be painful to recover from an update that uses the wrong repository.
« Last Edit: February 15, 2020, 02:20:25 PM by mmccarn »

Offline slicknic

  • *
  • 23
  • +0/-0
    • http://www.oasisdriving.co.uk
Re: Latest Updates - Dependency Error
« Reply #9 on: February 15, 2020, 02:20:29 PM »
Those commands seem to have worked, and the repo is now permanently enabled.

I have been running koozali as a mail server for many (17?) years, but don't 'play' with it much in case I break it. When I upgraded to V9.x I also moved to new hardware with a fresh installation using the affa contrib. I always install updates when they are released, and have not had a problem before, so no idea why it wasn't enabled.

The output from your script is as follows:

repository                    yum status  db status (default)
base                          enabled     enabled   (enabled)
centosplus                    disabled    disabled  (disabled)
contrib                       disabled    disabled  (disabled)
extras                        disabled    disabled  (disabled)
fasttrack                     disabled    disabled  (disabled)
fws                           disabled    disabled  (n/a)
smeaddons                     enabled     enabled   (enabled)
smecontribs                   disabled    disabled  (disabled)
smedev                        disabled    disabled  (disabled)
smeextras                     enabled     enabled   (enabled)
smeos                         enabled     enabled   (enabled)
smetest                       disabled    disabled  (disabled)
smeupdates                    enabled     enabled   (enabled)
smeupdates-testing            disabled    disabled  (disabled)
updates                       enabled     enabled   (enabled)
...
Oasis Driving School - Bristol
www.oasisdriving.co.uk

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: Latest Updates - Dependency Error
« Reply #10 on: February 15, 2020, 02:32:43 PM »
That all looks fine.

17 years puts you in the same time-frame that I'm in (~2003/2004; starting with SME 5.6...)

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Latest Updates - Dependency Error
« Reply #11 on: February 16, 2020, 05:30:33 AM »
By upgrading you kept old setting from sme 7 where centos repo were disabled by default.