Koozali.org: home of the SME Server

Can't update 7.51, can't upgrade to 8. Broken Server?

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: Can't update 7.51, can't upgrade to 8. Broken Server?
« Reply #15 on: March 31, 2012, 08:12:19 AM »
Ok, looks like yum is broken. 
The fix in Bug #6892 comment #19 may work for you.
It may possiblu make things worse....
I think this should go to Bugzilla.
Now.
Thanks.
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.


Offline FreakWent

  • ****
  • 89
  • +0/-0
Re: Can't update 7.51, can't upgrade to 8. Broken Server?
« Reply #17 on: April 08, 2012, 03:41:14 AM »
Bug closed.  Suggestions are to wipe and reinstall, like for Windows.  Suggestions refused, so documenting my experiences in case it ever helps someone else.

Referred  here:

http://wiki.contribs.org/Updating_from_SME_7.1.x_or_earlier#Ensuring_the_correct_yum_repository_configuration

Which refers to:

http://wiki.contribs.org/Adding_Software#Restoring_Default_Yum_Repositories

So:

Code: [Select]
bash-3.00# cd /home/e-smith/db/
bash-3.00# mv yum_repositories yum_repositories.po
bash-3.00# /etc/e-smith/events/actions/initialize-default-databases
Migrating existing database yum_installed
Migrating existing database hosts
Migrating existing database mailpatterns
Migrating existing database accounts
Migrating existing database backups
Migrating existing database yum_updates
Migrating existing database domains
Migrating existing database configuration
Migrating existing database networks
Migrating existing database spamassassin
Creating database yum_repositories and setting defaults
Migrating existing database yum_available
bash-3.00# signal-event yum-modify
bash-3.00# yum update
Loading "protect-packages" plugin
Loading "installonlyn" plugin
Loading "smeserver" plugin
Loading "fastestmirror" plugin
Existing lock /var/run/yum.pid: another copy is running. Aborting.

Wait three minutes, then:

Code: [Select]
bash-3.00# yum update
Loading "protect-packages" plugin
Loading "installonlyn" plugin
Loading "smeserver" plugin
Loading "fastestmirror" plugin
Setting up Update Process
Setting up repositories
Loading mirror speeds from cached hostfile
Reading repository metadata in from local files
Excluding Packages from CentOS - os
Finished
Excluding Packages from CentOS - updates
Finished
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for e-smith-horde to pack into transaction set.
e-smith-horde-4.0.0-12.el 100% |=========================|  29 kB    00:00     
---> Package e-smith-horde.noarch 0:4.0.0-12.el4.sme set to be updated
---> Downloading header for freetype to pack into transaction set.
freetype-2.1.9-21.el4.i38 100% |=========================|  31 kB    00:00     



............ etcetera, until:

Code: [Select]
Transaction Summary
=============================================================================
Install      0 Package(s)         
Update      49 Package(s)         
Remove       0 Package(s)         
Total download size: 67 M
Is this ok [y/N]: y
Downloading Packages:
(1/49): e-smith-horde-4.0 100% |=========================|  57 kB    00:01     
(2/49): freetype-2.1.9-21 100% |=========================| 767 kB    00:02     
(3/49): netpbm-10.35.58-8 100% |=========================| 817 kB    00:02     

This went all the way through and ended with the instructions to do:

signal-event post-upgrade; signal-event reboot

So I will.  Posting follow-up shortly.

Offline FreakWent

  • ****
  • 89
  • +0/-0
Re: Can't update 7.51, can't upgrade to 8. Broken Server?
« Reply #18 on: April 08, 2012, 06:35:22 AM »
Okay time for:

yum --disablerepo=base --disablerepo=updates update

[...]

No Packages marked for Update/Obsoletion


Pop over to:

http://wiki.contribs.org/SME_Server_8


Code: [Select]
bash-3.00# db yum_repositories print | grep '^sme' | cut -d= -f1 | while read repo
> do
>     db yum_repositories setprop $repo MirrorList \
>     http://distro.ibiblio.org/pub/linux/distributions/smeserver/mirrorlist/$repo-8
> done
bash-3.00# /etc/e-smith/events/actions/generic_template_expand yum-modify
expanding /etc/crontab
expanding /etc/yum.conf
expanding /etc/yum.smerepos.d/sme-base.repo
expanding /etc/sysconfig/protected-packages
bash-3.00#


Dependencies are missing.

Error: Missing Dependency: glibc = 2.3.4-2.57 is needed by package glibc-headers
Error: Missing Dependency: libcrypto.so.4 is needed by package cyrus-sasl-devel
Error: Missing Dependency: libidn = 0.5.6-1 is needed by package libidn-devel

.... etc.



Hm.  Getting tired of this.

From the yum website I find:

Quote
--nodeps is only used when a package or system is badly broken. As a general rule if you find you cannot put the screw in the hole with a screw driver you should not go get a hammer.

--force tells rpm - if there are any pkg or file conflicts just blow them all away with what I'm giving you. Again - not a good idea if you want to keep your system running well. It's like gardening with a backhoe.

When you go to update yum relies on an assumption that the rpmdb is roughly correct. We've added functionality to warn you when we notice your rpmdb does not have dependency closure - but it is likely that using --nodeps and --force will screw up updates.

But these are rpm options not yum options.  I think I'll have to scrub each package that has dependencies...

« Last Edit: April 08, 2012, 06:37:34 AM by FreakWent »

Offline FreakWent

  • ****
  • 89
  • +0/-0
Re: Can't update 7.51, can't upgrade to 8. Broken Server?
« Reply #19 on: April 08, 2012, 07:02:21 AM »
... and removing every package that wanted dependencies allows the upgrade to continue, EG:


Code: [Select]
xz-libs                 i386       4.999.9-0.3.beta.20091007git.el5  smeupdates-testing  100 k
 yum-fastestmirror       noarch     1.1.16-21.el5.centos  smeupdates-testing   21 k
 yum-protect-packages    noarch     1.1.16-21.el5.centos  smeupdates-testing   14 k

Transaction Summary
=============================================================================
Install    131 Package(s)         
Update     470 Package(s)         
Remove       0 Package(s)         
Total download size: 446 M
Is this ok [y/N]: y
Downloading Packages:
(1/601): perl-Net-DNS-0.6 100% |=========================| 326 kB    00:04     
(2/601): php-pear-Net-URL 100% |=========================| 9.7 kB    00:00     
(3/601): ingo-h3-1.2.5-1. 100% |=========================| 1.9 MB    00:25     
(4/601): smeserver-qpsmtp 100% |=========================| 104 kB    00:00     

I'll be in touch.  I'm half expecting this to all go horribly bad.

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: Can't update 7.51, can't upgrade to 8. Broken Server?
« Reply #20 on: April 08, 2012, 07:41:19 AM »
Bug closed.  Suggestions are to wipe and reinstall, like for Windows.  Suggestions refused, so documenting my experiences in case it ever helps someone else.

This is fair enough.  However, please do not post until you have fully solved your issue.  You methodology may or may not be correct, and others users may become confused, or worse may follow you and potentially wreck their system. 
Happy Easter.
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline FreakWent

  • ****
  • 89
  • +0/-0
Re: Can't update 7.51, can't upgrade to 8. Broken Server?
« Reply #21 on: April 09, 2012, 01:06:31 AM »
Code: [Select]
-bash-3.2$ cat /etc/e-smith-release
SME Server release 8.0beta7


Each package that wanted unmet dependencies has been removed.

rtorrent is broken, with "error while loading shared libraries: libldap-2.2.so.7", which I can deal with one way or another.

rutorrent works, cups is broken. nmap was explicitly removed, so of course it's gone.

I can't think of any other additions I have to the server that I still need to test.

Of course, it might be terribly hard to get my customisations and extensions working again, I don't know yet.

What I did to force my update was clearly "unsupported", and now I'm on a beta release.

I'm not recommending this approach for any business-type production server, but then again a business-type production server probably wouldn't need rtorrent or nmap or any of the rest of my silly rubbish either!

Anyway, I got where I wanted to be.  Cheers!