LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-06-2005, 06:26 AM   #1
smart_sagittari
LQ Newbie
 
Registered: Apr 2005
Posts: 26

Rep: Reputation: 16
Creating an installable RPM


I have never created an RPM file [never felt the need to ]. However, I now have this folder structure of some directories which I need to convert into an RPM so that it can be installed in some other machine.

More clearly, I have the following directory structure within my "source" directory [the one to be packaged].

0/
1/
2/
3/
4/
5/
6/
7/
8/
9/

Each of them is a directory with depth "n" [constant across all the directories]. I need to create an RPM such that it will install this directory structure into some path in a different machine.

I would appreciate a simple step by step guide for this.

Thanks
 
Old 09-06-2005, 07:12 AM   #2
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Rep: Reputation: 45
Couldn't you just compress the "source" directory in a way that keeps the directory structure?
 
Old 09-06-2005, 09:22 AM   #3
smart_sagittari
LQ Newbie
 
Registered: Apr 2005
Posts: 26

Original Poster
Rep: Reputation: 16
I will tell you what I have. I have the entire source directory in a tar format. Problem is I have never ever created an RPM. I was going through some pages, but didnt really understand much. There was some mention about creating a spec file. If you can kindly help me with that, I would be really grateful.

All I need is that the directory structure that I have [in store.tar] needs to be copied to a particular location on using the rpm. I need to create an RPM for this.

Please help!
 
Old 09-06-2005, 10:40 AM   #4
crAckZ
Member
 
Registered: Sep 2004
Location: LOUISVILLE KENTUCKY
Distribution: mandriva 2006
Posts: 155

Rep: Reputation: 30
http://qa.mandriva.com/twiki/bin/view/Main/RpmHowTo
 
Old 09-08-2005, 03:31 AM   #5
smart_sagittari
LQ Newbie
 
Registered: Apr 2005
Posts: 26

Original Poster
Rep: Reputation: 16
Thanks for the link. I have now been able to create an RPM which does what I wanted to.

I have a new problem though. When I want to uninstall this particular RPM, giving a rpm -e <packagename> removes only the files under %files section, but doesnt remove the directory structure. What can I do about it?
 
Old 09-08-2005, 12:28 PM   #6
crAckZ
Member
 
Registered: Sep 2004
Location: LOUISVILLE KENTUCKY
Distribution: mandriva 2006
Posts: 155

Rep: Reputation: 30
this link should help
www-128.ibm.com/developerworks/library/l-rpm3/

this will tell you how to add a post script to your rpm. i am assuming that in this post script you can tell it to remove the created directories.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
creating rpm problem bensky Programming 2 08-30-2005 02:35 AM
problem creating rpm captainfreedom Linux - Newbie 0 05-31-2004 05:42 PM
Creating an RPM database Null Linux - Software 6 03-20-2003 07:09 PM
Creating an RPM package? WeNdeL Linux - Software 3 03-05-2003 10:30 AM
Creating RPM. jayakrishnan Linux - General 1 04-10-2002 01:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:59 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