Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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
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.
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.
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.
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.
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
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.
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.
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."
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.