LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-25-2010, 11:11 AM   #1
jaikris
Member
 
Registered: Sep 2009
Posts: 31

Rep: Reputation: 15
How to create RPM


I have created one script , i just need create an RPM with that..

Can any one guide me how to create an RPM for my script in LINUX.

say : my script path in /home/jk/script

can any one tell the steps to create an RPM
 
Old 02-25-2010, 11:15 AM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
http://docs.fedoraproject.org/drafts...ting-rpms.html
 
Old 02-25-2010, 11:16 AM   #3
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Honestly, for a single script... you're probably better off not having one in all likelihood.

There is a good tutorial here:
http://www.rpm-based.org/how-to-create-rpm-package
 
1 members found this post helpful.
Old 03-26-2010, 12:17 AM   #4
jaikris
Member
 
Registered: Sep 2009
Posts: 31

Original Poster
Rep: Reputation: 15
Smile How to create an RPM

I have developed a script that performs some daily activities , i jusy need to create an RPM for that

what are steps to create an RPM . in Redhat 5.1
While runnning that binary ( creating while installing rmp ) should perform my daily activities.

let say my script path : /tmp/script/activities.sh

. how ican build an RPM with my script.
 
Old 03-26-2010, 12:34 AM   #5
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Quote:
what are steps to create an RPM
See if the following links help !

http://fedoraproject.org/wiki/How_to...an_RPM_package
and
http://www.ibm.com/developerworks/library/l-rpm1/

Last edited by Aquarius_Girl; 03-26-2010 at 12:35 AM.
 
Old 05-27-2010, 10:50 AM   #7
jaikris
Member
 
Registered: Sep 2009
Posts: 31

Original Poster
Rep: Reputation: 15
hi ,thanks for the reply , where can i put my shell script , in the pdf its mentioning source as some tar.gz file
 
Old 05-27-2010, 11:21 AM   #8
jaikris
Member
 
Registered: Sep 2009
Posts: 31

Original Poster
Rep: Reputation: 15
All the notes tells " Only .tar.gz, .tar, .tgz and .tar.Z can be used with RPM. "


is this possible to make my shell script ( test.sh ) to an rpm .
 
Old 05-27-2010, 12:04 PM   #9
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
This might help you out.
 
Old 05-27-2010, 01:47 PM   #10
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,094

Rep: Reputation: 198Reputation: 198
Look at this thread:
Creating an RPM without source
 
Old 05-27-2010, 11:58 PM   #11
jaikris
Member
 
Registered: Sep 2009
Posts: 31

Original Poster
Rep: Reputation: 15
while building thee rpm getting the below error message :

Bad exit status from /var/tmp/rpm-tmp.85151 (%prep)


how to overcome from this ..
 
Old 05-28-2010, 02:39 AM   #12
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,094

Rep: Reputation: 198Reputation: 198
My script in the other thread that builds the rpm uses ~/rpmbuild as the rpm building directory. Unless you've set up your .rpmmacros file to specify use of ~/rpmbuild then you need to change the script to use /usr/src/packages.
 
Old 05-28-2010, 07:02 AM   #13
jenyroger
LQ Newbie
 
Registered: May 2010
Posts: 2

Rep: Reputation: 0
RPM is install in a Red hat Linux . when you create a RPM it create Mkdir as make directory, home directory . It builds the Environment Package for whole directories and it also prepares fonts files for package using the commands of linux.
 
Old 05-30-2010, 10:56 PM   #14
jaikris
Member
 
Registered: Sep 2009
Posts: 31

Original Poster
Rep: Reputation: 15
finally i could develop a RPM for rm , while installing its creating a binary /bin/rm , also i have renamed the original /bin/rm to /bin/rm_old . while executing "rm" executing my new script for "rm " and working fine .

the problem is :
i have renamed the current /bin/rm to /bin/rm_old , while am using "rm" its executing new binary and working fine . but while shutting down and booting up its creating so many problems , it seams so many dependencies with original rm.


how can i rename the original rm to some other name ( /bin/rm-old ) , if am doing this whether i should mention any where so that kernel can identify the original rm is in new name /bin/rm_old
 
Old 05-31-2010, 01:48 AM   #15
exptloyd
LQ Newbie
 
Registered: May 2010
Posts: 5

Rep: Reputation: 0
First of all the go to your system programs then create a one director in your system then in wish directory you one crate a one file and If you plan to create an RPM package for the Fedora repository, follow the process for How to join the Fedora Package Collection Maintainers, including following the various Fedora guidance.

Last edited by pixellany; 06-05-2010 at 08:27 AM.
 
  


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
create a rpm for sshdfilter travisray2004 Programming 2 11-16-2008 03:42 PM
how to create a RPM jp-lack Linux - General 1 05-04-2007 06:57 AM
Create Rpm sjacobs Linux - Software 0 11-03-2005 07:19 AM
Create a RPM of webpages. sachinnshah Linux - General 3 06-03-2004 08:40 AM
How can I create an RPM file mayankjohri Linux - Software 1 04-16-2002 08:13 AM

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

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