LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-08-2009, 10:47 AM   #1
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,118
Blog Entries: 1

Rep: Reputation: 129Reputation: 129
Rpmbuild spec file for virtual rpm - removing obsolete packages - CentOS/RHEL 5.3


Hi all,

I have put together rpm's for OpenOffice.org 3.1.1 for CentOS/RHEL 5. Everything works as expected.

I also created "ooo3-base", virtual rpm package that depends on all needed rpm's, so that installation is much easier. This is especially necessary because I additionally created "ooo3-en-US" "ooo3-SR" and "ooo3-SH" for separate language files, and they depend on "ooo3-base" so everything installs fine if there is no OpenOffice.org version 2(.3.0). Problem arises when there is already older OpenOffice.org installed (version 2.3.0), since my rpm's do not have Obsoletes set.

I am now trying to add Obsoletes to ooo3-base pockage, but there are problems.

For now, I was adding lines like this:

Obsoletes: openoffice.org-core < 1:3.0.0

But when trying to install that package, it only says something like "replacing" obsolete packages, but it does not select old packages for removal.

Is this normal behavior, or is there a way to remove them at the same time I am installing new packages?

Last edited by DrLove73; 10-08-2009 at 10:52 AM.
 
Old 10-08-2009, 11:52 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I wonder: how does the .spec from an older OOo version .src.rpm do things?
 
Old 10-08-2009, 01:44 PM   #3
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,118

Original Poster
Blog Entries: 1

Rep: Reputation: 129Reputation: 129
Fedora 10 version creates rpm by rpm with "Obsolete:" lines for each packet. When I add all those Openoffice.org v2 files with "Obsolete:" to ooo3-base, it runs, but it does not remove old packages, but it looks like it integrates then (I currently do not have that setup in spec so I can not post you exact install log). I am afraid that not actually removing old packages could leave files from old packages on the system and interfere with OpenOffice.org 3.x.

Best option for me would be to remove packages before the installation of new version begins, but I do not know how to make this happen. Google haven't shown me anything usable (there was A LOT of unrelated junk).

Current setup of ooo3-base file is no Obsoletes what so ever, just to write warning in description to remove old version first. This can also work since few packages from new set have conflicting files with the old set so installing version 3 over version 2 does not work without use of force.

Last edited by DrLove73; 10-08-2009 at 01:48 PM.
 
Old 10-10-2009, 10:22 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Last time I read a discussion about %obsolete on the rpm mailing list there was lots of talk about what is required to make it happen properly from a RPMDB point of view regarding intricacies like ordering, dependencies and such. I can't remember what the suggestions were but I maybe you would not want to install OOo by starting with ooo3-base but from a meta package instead? (I thought OOo RPMs as distributed by OOo themselves already used one.) Just like you don't install X11/Xorg drivers but the X11/Xorg installation draws in the driver meta package?

That said since version 2 OOo does no longer use its own installer but builds RPMs so I'm thinking they would have already discussed upgrading (as in not reinventing the wheel). Maybe the OOo site, the installation or specifications subprojects or related mailing list archives could tell. Else I wonder what Fedora says in its RPM building guidelines about obsoleting "the right way"...
 
  


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
rpmbuild a spec file when a BuildRequires is not installed carltm Linux - Software 1 12-08-2008 06:45 PM
Why is rpmbuild -ba name.spec is creating a <name>-debug.rpm only jjap Linux - Newbie 3 06-12-2008 06:01 PM
rpm spec file help AutoC Fedora 3 01-30-2008 08:25 AM
rpm spec file alrawab Linux - General 2 03-28-2007 06:39 AM
Problem with rpmbuild and template.spec file abefroman Linux - Software 0 11-27-2005 12:18 AM

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

All times are GMT -5. The time now is 03:51 PM.

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