LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-16-2012, 01:28 PM   #1
Brandon9000
Member
 
Registered: Apr 2012
Location: Florida
Distribution: Many
Posts: 111

Rep: Reputation: Disabled
Rolling Back Yum or Rpm Updates


The latest in my flurry of yum inquiries. In RedHat derived distributions, what is a good way to roll back an update and what do you have to do to set it up? Where or when would it fail? Thanks.
 
Old 04-16-2012, 01:51 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Haven't used it myself but I believe that is the purpose of Spacewalk.

http://wiki.centos.org/HowTos/Packag...ment/Spacewalk

For RHEL itself though you have to purchase RH Satellite which is derived from Spacewalk. I've seen someone comment Spacewalk itself could be used for RHEL but when I pressed they were unable to provide details.
 
Old 04-16-2012, 01:59 PM   #3
Brandon9000
Member
 
Registered: Apr 2012
Location: Florida
Distribution: Many
Posts: 111

Original Poster
Rep: Reputation: Disabled
That is very interesting, but I was looking more for something build into rpm or yum or the OS. It would be good if the solution worked for users who might not have a 3rd party tool, so I guess I was looking for something a little more basic.
 
Old 04-16-2012, 02:20 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
why " role back" that is a mostly Microsoft concept
on a RHEL system you SHOULD have yum-priorities or yum-protectbase installed ( and set up and CONFIGURED)

just fix the user created rpm/repo conflict
on rhel5 this is rpmforge ( rf) mostly
for rhel6 this IS fixed

the repo conflicts are VERY well documented
 
Old 04-16-2012, 02:48 PM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Could you elaborate on protect and priorities? I think the OP was looking for a way to return the system to the original set of packages in the event update to later set breaks something. (At least that's what I've been looking for in the past that led me to Spacewalk/Satellite.)

From a quick check of Priorities it appears that is not its purpose - its purpose is to insure that you get updates from specific repositories - it seems you'd still have the issue of rolling back even if the "right" repository was used.

Also I disagree rolling back is a Windows concept. On UNIX (HP-UX, Solaris) one can update patches and then remove them after the fact if they cause problems which leaves the earlier version of programs intact.

I'd dearly love to be able to do that with RHEL5 and RHEL6. So far without Spacewalk/Satellite the best idea I've had is to make a mondo copy before update then reinstall from the mondo copy and backups if things break - not something I'm very keen on doing.
 
Old 04-16-2012, 04:20 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Brandon9000 View Post
In RedHat derived distributions, what is a good way to roll back an update and what do you have to do to set it up? Where or when would it fail?
To enable roll back for 'rpm' use the "--repackage" switch. To enable roll back for 'yum' set "tsflags=repackage" in /etc/yum.conf. See 'man rpm' and search for "repackage". The definition of "good" coincides with your last question. Packages created in /var/spool/repackage/ represent installed packages, kind of like using http://rpmrebuild.sourceforge.net, and not the officially released version. (I haven't used --repackage in ages exactly for that reason.) Another way could be to allow Yum to use an older release, see yum-allowdowngrade.
 
Old 04-16-2012, 06:43 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,124

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Why not just use fs-snapshot ?. Most (all) EL installations will have LVM - I personally prefer btrfs, but then I don't have to worry about prod data.
 
Old 04-17-2012, 04:48 AM   #8
impert
Member
 
Registered: Feb 2009
Posts: 282

Rep: Reputation: 54
Another solution is to dual-boot two copies of the same distro. You update one and make sure that it works before updating the other.
Of course, you could go one better, and multi-boot several distros.
 
Old 04-17-2012, 12:54 PM   #9
Brandon9000
Member
 
Registered: Apr 2012
Location: Florida
Distribution: Many
Posts: 111

Original Poster
Rep: Reputation: Disabled
I should clarify. I am not looking for a way to do this on my own system. I am looking for a way to do this programatically in software I write which users will then run. I cannot count on the users to have any esoteric utilities or ask them to go through a procedure. It has to be something I can utilize in code.

As for the repackage option in yum.conf, I am under the impression that is used to set up the --rollback option in rpm, which is being discontinued.
 
Old 04-17-2012, 02:20 PM   #10
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
if you really want a "role back" function instead of fixing a problem so that there are no repo conflicts use a different OS
however for red hat ( RHN) there are no isues

it is only when the warned about precautions are not fallowed that the incompatible with RHN repos cause problems
( even when fallowing them there is a "chance" of messing it up )
see:
http://wiki.centos.org/AdditionalResources/Repositories
Quote:
3rd Party Repositories

WARNING: These repositories are not provided nor supported by CentOS. They are listed in a 'catch as catch can' order, and being listed earlier does not imply any particular merit to a given repository. The CentOS project exercises no editorial control over the assertions of computability made by these sites. Many 3rd party repositories are mutually incompatible and will cause dependency issues and conflicts, as well as stability issues, if used together! If something from them breaks, you get to keep the pieces. Some of the repos, such as RPMforge, ELRepo, ATrpms, EPEL and RPMfusion have their own mailing lists for support issues with their packages.


NOTE: If you are considering using a 3rd Party Repository, then you should seriously consider how to prevent unintended 'updates' from these side archives from over-writing some core part of CentOS. One approach is to only enable these archives from time to time, and generally leave them disabled. See: man yum

Another approach is to use the exclude= and includepkgs= options on a per sub-archive basis, in the matching .conf file found in /etc/yum.repos.d/ See: man yum.conf

There are also additional non-stock plug-ins to extend yum using the Priorities (or ProtectBase) yum plugin. (The Priorities and ProtectBase plugins can each prevent a 3rd party repository from replacing base packages, but Priorities is much more flexible and therefore a more powerful plugin.)
use a different OS

install openSUSE or SELD
it has it( role back) built in and is in the yast gui menu
but it is better to FIX what is causing problems
 
Old 04-17-2012, 02:21 PM   #11
Brandon9000
Member
 
Registered: Apr 2012
Location: Florida
Distribution: Many
Posts: 111

Original Poster
Rep: Reputation: Disabled
I can install anything I want, but I can hardly dictate this to customers.
 
Old 04-17-2012, 02:43 PM   #12
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
I think the point is still being missed. The issue isn't using the "correct" repositories sometimes but simply that other applications do not like what the updates did. This would be most likely with 3rd party apps like Oracle. While you might say "don't use 3rd party apps that don't understand yum" that is NOT a real world response so the question again becomes how one is able to undo what was done and return the system to its original state. Chances are someone using RHEL IS using some 3rd party app that makes RHEL a prerequisite.

Rather than saying "there should be no need to roll back" it would be more to the point to say you don't know how to do it. On occasion there IS need to roll back as indicated both by the OP and myself.
 
Old 04-17-2012, 02:44 PM   #13
Brandon9000
Member
 
Registered: Apr 2012
Location: Florida
Distribution: Many
Posts: 111

Original Poster
Rep: Reputation: Disabled
Correct. Yum seems to have a downgrade switch, but I'm not sure how to use it.
 
Old 04-17-2012, 02:50 PM   #14
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
Originally Posted by Brandon9000 View Post
Correct. Yum seems to have a downgrade switch, but I'm not sure how to use it.
The problem is many things that work fine in yum based distros such as CentOS and Fedora do NOT work in RHEL because you must use RHN to do things. Often I see folks posting "do this" or "do that" and almost always they're talking about what they've done on CentOS or Fedora and say it "should" work on RHEL but I've never really found folks saying it "does" work on RHEL. They simply get frustrated and tell you to quit using RHEL as if that were a real option rather than simply admitting they don't know the answer. As for me I don't know the answer which is why I'm interested in your thread. There have been new ideas presented above by others that seem interesting that I may get a chance to test someday.
 
Old 04-17-2012, 03:13 PM   #15
Brandon9000
Member
 
Registered: Apr 2012
Location: Florida
Distribution: Many
Posts: 111

Original Poster
Rep: Reputation: Disabled
You're right. It is an interesting topic, but I also have to write code for Debian using apt, and Suse using Yast, etc., so if no one comes up with anything here, I will try to work rollback out myself when I can get back to it. Doing rollbacks in a system not particularly designed to accomodate them, one has to be very careful to "do no harm."
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
yum, rpm and system updates (CentOS) drigby Linux - Newbie 2 04-05-2012 11:46 AM
Yum update 404 after rpm mirror updates WindleX Linux - Software 3 08-19-2009 08:42 AM
Rolling back Ubuntu updates.. OldClay Linux - Newbie 3 09-01-2008 08:03 AM
Rollback of yum updates and/or rpm installs WingnutOne Linux - General 1 11-29-2007 10:24 AM
updates, rpm, games, yum, up2date helpme0904 Fedora 1 09-23-2004 04:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration