Koozali.org: home of the SME Server

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

Offline FreakWent

  • ****
  • 89
  • +0/-0
Can't update 7.51, can't upgrade to 8. Broken Server?
« on: March 20, 2012, 09:02:27 PM »
At some point yum's been used to add software that everyone says I shouldn't add, so this is my fault. Again.

I can't update because, as we know, 7.5 has reached Centos' EOL.  The instructions found in the official forum post didn't work for me, I still had lots of 404 errors.

I tried to take the jump to 8, and I get about thirty entries like this for various things:

Error: Missing Dependency: dbus = 0.22 is needed by package cups

Do I need to remove these packages before I can update?  If so, how do I force yum to remove them without needing "repomd.xml file for repository: base", which it can't get?  If not, how can I force yum to ignore the dependency problems, since I'd rather have a working yum and broken cups than the other way around?

Overall, it seems my repos might be set up all wrong; but I don't know much about repos, SME is the only linux machine I've ever used where I have to know or care at all. Is there a solid, reliable way to 'reset' the repos so that the commands in the official post will work as expected?

Thank You!

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 #1 on: March 20, 2012, 10:22:58 PM »
Please open a bug report at Bugzilla and provide as much information about your system as you can.
- 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 #2 on: March 21, 2012, 09:54:12 AM »
I won't do this because I don't believe that it's a bug, and I'm not trying to report a failure but to receive community support.  Bugzilla is not the right place for community support, in my humble opinion.

It's okay if I  can't be helped directly in this context, it's my customisations that caused the problem so it's not anyone else's job to fix it.

I think I'll rebuild with gentoo.  I have less problems upgrading with gentoo than I do with sme.

 :lol: :-D


Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Can't update 7.51, can't upgrade to 8. Broken Server?
« Reply #3 on: March 21, 2012, 09:58:47 AM »
I won't do this because I don't believe that it's a bug, and I'm not trying to report a failure but to receive community support.  Bugzilla is not the right place for community support, in my humble opinion.
If that is the case you will need to provide more information instead of paraphrasing part of there error messages here. You are making it hard for us to help you as you do not give us much to go on.

Going the Gentoo way is you choice, but it certainly is not your solution. Running Gentoo will bring lots of other issues for which you need some expert knowledge. If you are unable to solve this on your SME Server I doubt Gentoo is the proper path to take.

The solution for the repomod.xml issue you are seeing was posted in the forums and IIRC it is a sticky so that should be easy to find. From there you should be able to remove your additional packages and be able to upgrade.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Can't update 7.51, can't upgrade to 8. Broken Server?
« Reply #4 on: March 21, 2012, 10:39:58 AM »
At some point yum's been used to add software that everyone says I shouldn't add, so this is my fault. Again.

I can't update because, as we know, 7.5 has reached Centos' EOL.  The instructions found in the official forum post didn't work for me, I still had lots of 404 errors.

I tried to take the jump to 8, and I get about thirty entries like this for various things:

Error: Missing Dependency: dbus = 0.22 is needed by package cups

Do I need to remove these packages before I can update?  If so, how do I force yum to remove them without needing "repomd.xml file for repository: base", which it can't get?  If not, how can I force yum to ignore the dependency problems, since I'd rather have a working yum and broken cups than the other way around?

Overall, it seems my repos might be set up all wrong; but I don't know much about repos, SME is the only linux machine I've ever used where I have to know or care at all. Is there a solid, reliable way to 'reset' the repos so that the commands in the official post will work as expected?

Thank You!


my 2c.. create a new SME8 server (a virtual one will work), use affa to move to SME 8, the install SME8 on the "old" server and use affa again..

before migrating, be sure the contribs you are using are supported by SME8

HTH

p.s. I agree with cactus: moving to gentoo is not the solution

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Can't update 7.51, can't upgrade to 8. Broken Server?
« Reply #5 on: March 21, 2012, 05:00:53 PM »
FreakWent

Quote
Overall, it seems my repos might be set up all wrong; but I don't know much about repos, SME is the only linux machine I've ever used where I have to know or care at all. Is there a solid, reliable way to 'reset' the repos so that the commands in the official post will work as expected?

Please read
http://wiki.contribs.org/SME_Server:Documentation:FAQ#Yum_Updates
also see
http://wiki.contribs.org/Adding_Software#Restoring_Default_Yum_Repositories
and
http://wiki.contribs.org/Updating_from_SME_7.1.x_or_earlier

To list the repos do
db yum_repositories show |more
press Space or Enter to scroll down the listing

To selectively list one repo do
db yum_repositories show reponame
eg
db yum_repositories show base
db yum_repositories show smecontribs
and so on

Look for the repos where
status=enabled
these are the active ones that packages will be automatically updated from

This command will list the status of all repos
/sbin/e-smith/audittools/repositories

I suggest you disable all non essential repos, meaning only enable the recommended repos as per FAQ
db yum_repositories setprop reponame status disabled
replace reponame with actual name of repo
Followed by
signal-event yum-modify
yum clean all

Then try
yum update --disablerepo=base --disablerepo=updates
Give us the full output if you still have troubles

To remove packages
yum remove packagename
or
rpm -e packagename

You should remove packages before you update

There is a way to reset all repos to default values and remove any repos you have added, but that is really a heavy handed approach.
Changing status to disabled for all non standard repos should be just as effective.

See
http://wiki.contribs.org/Updating_from_SME_7.1.x_or_earlier
which in part says
Reset your repository configuration and reboot:

cd /home/e-smith/db/
mv yum_repositories yum_repositories.po
/etc/e-smith/events/actions/initialize-default-databases
signal-event yum-modify
signal-event post-upgrade; signal-event reboot
« Last Edit: March 22, 2012, 01:34:14 AM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline FreakWent

  • ****
  • 89
  • +0/-0
Re: Can't update 7.51, can't upgrade to 8. Broken Server?
« Reply #6 on: March 25, 2012, 05:14:15 AM »
mary, thank you very much for an excellent post!

I've always found handling yum repositories distracting and annoying, and dealing with db parameters in the middle makes it something I find just creates more cognitive overhead than I usually have available.

When I looked, I found that the repo configuration was exactly as you've suggested.

I did notice this time that "yum clean all" doesn't actually finish when it returns, so the next command fails.  Waiting long enough allowed that command to finish cleanly.

It spends a long time downloading, after which I see Missing dependency complaints.

I tried to remove cups:

Code: [Select]
bash-3.00# yum remove cups
Loading "protect-packages" plugin
Loading "installonlyn" plugin
Loading "smeserver" plugin
Loading "fastestmirror" plugin
Setting up Remove Process
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package cups.i386 1:1.1.22-0.rc1.9.32.el4.10 set to be erased
--> Running transaction check
Setting up repositories
not using ftp, http[s], or file for repos, skipping - 4 is not a valid release or hasn't been released yet
Cannot find a valid baseurl for repo: base
Error: Cannot find a valid baseurl for repo: base
bash-3.00# rpm -e cups
error: Failed dependencies:
        LPRng is needed by (installed) e-smith-LPRng-2.0.0-1.el4.sme.noarch
        lpr is needed by (installed) pipsplus-0.1b-1.i386



The 'base' entry from db is:

Code: [Select]
base=repository
    EnableGroups=no
    Exclude=kernel,kernel-smp,kernel-xenU,mkinitrd,mdadm,initscripts
    GPGCheck=yes
    MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
    Name=CentOS - os
    Visible=yes
    status=enabled


cat /etc/e-smith-release
SME Server release 7.5.1



"You should remove packages before you update"

Much as I don't want to lose printing to update, I'm willing to do this, but the system won't let me cleanly remove the software.  Have you any last advice before I try a more heavy handed approach?


Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Can't update 7.51, can't upgrade to 8. Broken Server?
« Reply #7 on: March 25, 2012, 05:46:44 AM »
FreakWent

Your main issue:
The error you see appears to be with the base repository
There is a special procedure to follow as CentOS have moved all files to the vault due to End of Life for CentOS4.x, see
http://forums.contribs.org/index.php/topic,48424.0.html

Try fixing yum (as per link above) and try the sme version update again and see how you go.
Report back.

I doubt that it is necessary to do the heavy handed approach (I assume reinstall), if you do the right steps one by one to resolve your problems.
Yum repos make your life much easier.

When upgrading from sme7 to 8, you should firstly check that all the contribs you use are compatible.
Do that here:
http://wiki.contribs.org/SME8.0_Contribs_QA
Unfortunately no one has added info re cups.
Also checked the Howto here
http://wiki.contribs.org/Cups
and no info either.
As cups is a generic Linux software so I see no reason why it should not work with sme8.
You could search the Forums or ask in the Forums if cups is compatible with sme8, or find out yourself by installing it on a test server running sme8b7

You probably do not need to uninstall cups to upgrade to sme8.

rpm -e packagename --nodeps
will always work, but be careful using it

Quote
"You should remove packages before you update"

That means to remove incompatible packages before you upgrade from sme7 to sme8. or perhaps also includes problematic packages (for whatever reason).
You can reinstall them later when a compatible version is found or released or whatever other problems you have are resolved.

You should keep a more regular eye on the forums, so that you are up to date with recent changes or events etc. Check the Announcements section of the Forums and check the sticky posts/notes at the top of each forum, as a minimum.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline FreakWent

  • ****
  • 89
  • +0/-0
Re: Can't update 7.51, can't upgrade to 8. Broken Server?
« Reply #8 on: March 25, 2012, 12:38:15 PM »
> CentOS have moved all files to the vault due to End of Life for CentOS4.x

Yes, this is, I think, the root cause of my trouble.

> Try fixing yum (as per link above)

Okay.  The command I found at that link was:
Code: [Select]
bash-3.00# yum --disablerepo=base --disablerepo=updates update

[.....]

Error: Missing Dependency: glibc = 2.3.4-2.54 is needed by package glibc-devel
Error: Missing Dependency: glibc = 2.3.4-2.54 is needed by package glibc-headers
Error: Missing Dependency: libcrypto.so.4 is needed by package nmap
Error: Missing Dependency: python = 2.3.4-14.10.el4 is needed by package python-devel
Error: Missing Dependency: glib2 = 2.4.7 is needed by package glib2-devel
Error: Missing Dependency: dbus = 0.22 is needed by package cups
Error: Missing Dependency: libssl.so.4 is needed by package nmap
Error: Missing Dependency: php = 4.3.9-3.31 is needed by package php-xmlrpc
Error: Missing Dependency: libssl.so.4 is needed by package cyrus-sasl-devel
Error: Missing Dependency: libstdc++ = 3.4.6-11.el4_8.1 is needed by package libstdc++-devel
Error: Missing Dependency: php5-cgi >= 5.2.8 is needed by package smeserver-php5-cgi
Error: Missing Dependency: zlib = 1.2.1.2 is needed by package zlib-devel
Error: Missing Dependency: openldap = 2.2.13-12.el4_8.4 is needed by package openldap-devel
Error: Missing Dependency: php5-cgi-mysql >= 5.2.8 is needed by package smeserver-php5-cgi
Error: Missing Dependency: krb5-libs = 1.3.4-62.el4_8.3 is needed by package krb5-devel
Error: Missing Dependency: libdbus-1.so.0 is needed by package cups
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
Error: Missing Dependency: openssl = 0.9.7a-43.17.el4_8.6 is needed by package openssl-devel
Error: Missing Dependency: libssl.so.4 is needed by package cups
Error: Missing Dependency: libcrypto.so.4 is needed by package libtorrent
Error: Missing Dependency: libsasl.so.7 is needed by package cyrus-sasl-devel
Error: Missing Dependency: libcrypto.so.4 is needed by package cups
Error: Missing Dependency: php5-cgi-pear >= 5.2.8 is needed by package smeserver-php5-cgi
Error: Missing Dependency: php5-cgi-imap >= 5.2.8 is needed by package smeserver-php5-cgi
Error: Missing Dependency: curl = 7.12.1-17.el4 is needed by package curl-devel
Error: Missing Dependency: php5-cgi-xmlrpc >= 5.2.8 is needed by package smeserver-php5-cgi
Error: Missing Dependency: libgomp = 4.1.2-44.EL4_8.1 is needed by package gcc4
Error: Missing Dependency: e2fsprogs = 1.35 is needed by package e2fsprogs-devel
Error: Missing Dependency: php5-cgi-ldap >= 5.2.8 is needed by package smeserver-php5-cgi
Error: Missing Dependency: cups-libs = 1:1.1.22 is needed by package cups
Error: Missing Dependency: cyrus-sasl = 2.1.19-14 is needed by package cyrus-sasl-devel
Error: Missing Dependency: audit-libs = 1.8-2.el5 is needed by package audit-libs-python
bash-3.00#

"You probably do not need to uninstall cups to upgrade to sme8."

Okay, good! How then can I fix the dependency problems without uninstalling the relevant packages?


Should I rip out these packages with "rpm -e packagename --nodeps"? I'm happy to put my hand up to wrongly installing cups or gcc4 (ahem!) but I'm not sure that smeserver-php5-cgi should be having trouble; nor am I confident that removing it in this way is a good idea.


"You should keep a more regular eye on the forums, so that you are up to date with recent changes or events etc."

Apart from following the sage advice like "don't install weird things on the server", I'm not sure that would have helped.  Were there warning posts up before the event "struck"?

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Can't update 7.51, can't upgrade to 8. Broken Server?
« Reply #9 on: March 25, 2012, 01:13:42 PM »
FreakWent

Well at some point you installed package(s) that now need those dependencies.
If done correctly you would have used the --enablerepo=reponame switch
eg
yum install packagename --enablerepo=dag
having setup the dag (or whichever) repo first on your sme server.
So one possible solution is for you to use (enable) the appropriate repos that have those dependencies
It may also be the case that you need to disable repos that are enabled and may be causing issues (ie repos that should not normally be enabled).

So that we know what repos are setup on your server, and how they are configured, please show output of
/sbin/e-smith/audittools/repositories
« Last Edit: March 25, 2012, 01:17:33 PM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline FreakWent

  • ****
  • 89
  • +0/-0
Re: Can't update 7.51, can't upgrade to 8. Broken Server?
« Reply #10 on: March 25, 2012, 10:17:19 PM »
Is there a way to ask yum which repository "owns" a package?  Enabling smecontribs made nmap and a few other happy, so that's helpful.  I couldn't make any other progress though, even after I'd turned on every repo I have (with --enablerepo=) that doesn't cause an error.

My main concern is the php5 stuff that's needed by the smeserver package (unmet deps listed above)

Default config:

Code: [Select]
bash-3.00# /sbin/e-smith/audittools/repositories
addons: disabled
base: enabled
centosplus: disabled
contrib: disabled
extras: disabled
smeaddons: enabled
smecontribs: disabled
smedev: disabled
smeextras: enabled
smeos: enabled
smetest: disabled
smeupdates: enabled
smeupdates-testing: disabled
updates: enabled


I was reluctant to post his because it's big, but it might help, especially if the URLs are wrong:

Code: [Select]
bash-3.00# db yum_repositories show                 
addons=repository
    EnableGroups=no
    GPGCheck=yes
    MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
    Name=CentOS - addons
    Visible=no
    status=disabled
base=repository
    EnableGroups=no
    Exclude=kernel,kernel-smp,kernel-xenU,mkinitrd,mdadm,initscripts
    GPGCheck=yes
    MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
    Name=CentOS - os
    Visible=yes
    status=enabled
centosplus=repository
    EnableGroups=no
    GPGCheck=yes
    MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
    Name=CentOS - centosplus
    Visible=no
    status=disabled
contrib=repository
    EnableGroups=no
    GPGCheck=yes
    MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
    Name=CentOS - contrib
    Visible=no
    status=disabled
extras=repository
    EnableGroups=no
    GPGCheck=yes
    MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
    Name=CentOS - extras
    Visible=no
    status=disabled
smeaddons=repository
    EnableGroups=yes
    GPGCheck=yes
    MirrorList=http://distro.ibiblio.org/pub/linux/distributions/smeserver/mirrorlist/smeaddons-8
    Name=SME Server - addons
    Visible=yes
    status=enabled
smecontribs=repository
    EnableGroups=yes
    GPGCheck=yes
    MirrorList=http://distro.ibiblio.org/pub/linux/distributions/smeserver/mirrorlist/smecontribs-8
    Name=SME Server - contribs
    Visible=no
    status=disabled
smedev=repository
    EnableGroups=yes
    GPGCheck=yes
    MirrorList=http://distro.ibiblio.org/pub/linux/distributions/smeserver/mirrorlist/smedev-8
    Name=SME Server - dev
    Visible=no
    status=disabled
smeextras=repository
    EnableGroups=yes
    GPGCheck=yes
    MirrorList=http://distro.ibiblio.org/pub/linux/distributions/smeserver/mirrorlist/smeextras-8
    Name=SME Server - extras
    Visible=yes
    status=enabled
smeos=repository
    EnableGroups=yes
    GPGCheck=yes
    MirrorList=http://distro.ibiblio.org/pub/linux/distributions/smeserver/mirrorlist/smeos-8
    Name=SME Server - os
    Visible=yes
    status=enabled
smetest=repository
    EnableGroups=yes
    GPGCheck=yes
    MirrorList=http://distro.ibiblio.org/pub/linux/distributions/smeserver/mirrorlist/smetest-8
    Name=SME Server - test
    Visible=no
    status=disabled
smeupdates=repository
    EnableGroups=yes
    GPGCheck=yes
    MirrorList=http://distro.ibiblio.org/pub/linux/distributions/smeserver/mirrorlist/smeupdates-8
    Name=SME Server - updates
    Visible=yes
    status=enabled
smeupdates-testing=repository
    EnableGroups=yes
    GPGCheck=yes
    MirrorList=http://distro.ibiblio.org/pub/linux/distributions/smeserver/mirrorlist/smeupdates-testing-8
    Name=SME Server - updates testing
    Visible=yes
    status=disabled
updates=repository
    EnableGroups=no
    Exclude=kernel,kernel-smp,kernel-xenU,mkinitrd,mdadm,initscripts
    GPGCheck=yes
    MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
    Name=CentOS - updates
    Visible=yes
    status=enabled

As we've come as far as this, perhaps it wasn't me breaking it and it really is a bug and I should have taken chris burnat's advice in the first place and trotted off to Bugzilla.  Is this still good advice?

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 #11 on: March 26, 2012, 12:01:50 AM »

bash-3.00# db yum_repositories show                 
addons=repository
    EnableGroups=no
    GPGCheck=yes
    MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
    Name=CentOS - addons
    Visible=no
    status=disabled

All of the mirrorList for Centos are incorrect, they do not point to Vault. Provide the output of the following command:

rpm -q smeserver-yum

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 #12 on: March 28, 2012, 10:25:44 PM »
bash-3.00# rpm -q smeserver-yum
smeserver-yum-2.0.0-12.el4.sme


Thank you!

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 #13 on: March 28, 2012, 11:35:19 PM »
bash-3.00# rpm -q smeserver-yum
smeserver-yum-2.0.0-12.el4.sme

We are just becoming aware of an issue associated with EOL; the command provided to date in http://bugs.contribs.org/show_bug.cgi?id=6873 and other places is not covering all eventualities and this need documenting.  As it turns out, you may be the perfect case and your issue should really have been dealt at Bugzilla.  This being said, lets try to solve you problem, we can document later.

Try:
Code: [Select]
yum --disablerepo=* --enablerepo=smeupdates install smeserver-yum
Please copy and paste  to this ticket the full transaction resulting from this command until yum gives you the option Yes/No.

When completed, do:
Code: [Select]
signal-event post-upgrade; signal-event reboot
You can then proceed to fully update your server using the usual method.

- 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 #14 on: March 31, 2012, 07:24:22 AM »
"As it turns out, [...] your issue should really have been dealt at Bugzilla."

I am so sick of being wrong so often!

Code: [Select]
bash-3.00# yum --disablerepo=* --enablerepo=smeupdates install smeserver-yum
Loading "protect-packages" plugin
Loading "installonlyn" plugin
Loading "smeserver" plugin
Loading "fastestmirror" plugin
Setting up Install Process
Setting up repositories
smeupdates                100% |=========================| 2.3 kB    00:00     
Determining fastest mirrors
Reading repository metadata in from local files
Parsing package install arguments
No Match for argument: smeserver-yum
Nothing to do
bash-3.00#

Oh dear!