LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to create rpm from tar.gz (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-create-rpm-from-tar-gz-790133/)

gsvsmanyam 02-19-2010 02:29 AM

how to create rpm from tar.gz
 
Hi,

I need to create an rpm, to decrease time consuming in installations of minor packages. I googled many sites in which they are going theoretically(of course, it should be in that way). Could anyone help me in this regard about what is the step by step process in practical?

I thank in advance for your help.

Regards,
Manyam

TheIndependentAquarius 02-19-2010 02:45 AM

Quote:

how to create rpm from tar.gz
See if the following helps:

http://kwave.sourceforge.net/doc/en/...rom_targz.html

http://www.linuxscrew.com/2008/06/11...-checkinstall/

http://www.nongnu.org/lpi-manuals/lp...l/ch06s02.html

vinaytp 02-19-2010 03:13 AM

Try out with Alien software..

Its a good tool to convert from one package format to another.
You may download it from

http://www.icewalkers.com/Linux/Soft...020/Alien.html

TheIndependentAquarius 02-19-2010 03:16 AM

Quote:

Originally Posted by gsvsmanyam
hi anisha...

my situation is i have the subversion tar.gz file with me. when am trying to build spec file initially am getting the following errors...
error: Name field must be present in package: (main package)
error: Version field must be present in package: (main package)
error: Release field must be present in package: (main package)
error: Summary field must be present in package: (main package)
error: Group field must be present in package: (main package)
error: License field must be present in package: (main package)

Kindly do post the problems in this thread only, not here: http://www.linuxquestions.org/user/anishakaul-445448/

It will be easier for other people to help u this way !

TheIndependentAquarius 02-19-2010 03:18 AM

Would you be kind enough to give :

1. the exact name of the tar file u have,
2. the exact steps you followed to get the above errors..

gsvsmanyam 02-19-2010 03:27 AM

Quote:

Originally Posted by anishakaul (Post 3869124)
Would you be kind enough to give :

1. the exact name of the tar file u have,
2. the exact steps you followed to get the above errors..

hi...

1.exact name of the file: subversion-1.6.6.tar.gz
2.
a.I copied the tar file to /usr/src/packages/SOURCES
b.copied the subversion.spec to /usr/src/packagages/SPECS
c.edited the .spec file @name, version, release and source
d.and executed rpmbuild -ta subversion-1.6.6.spec

TheIndependentAquarius 02-19-2010 03:33 AM

See this link w.r.t errors:

http://docs.fedoraproject.org/drafts...n/ch11s02.html

Read this post also and try it according to your needs:

http://www.linuxquestions.org/questi...9/#post1149839

TheIndependentAquarius 02-19-2010 03:43 AM

If these steps do not work, why don't you try out the Alien software.. as mentioned by Vinay !

TheIndependentAquarius 02-19-2010 03:49 AM

See this link also :
http://www.linuxforums.org/forum/red...eb-cp-fc5.html

gsvsmanyam 02-19-2010 04:04 AM

Quote:

Originally Posted by anishakaul (Post 3869148)
If these steps do not work, why don't you try out the Alien software.. as mentioned by Vinay !

hi..

I d'loaded and installed alien..
but I don't know how to start with alien :(
again help please... :)

Thank you

TheIndependentAquarius 02-19-2010 04:08 AM

Is it a tar file, if so, then do the following in the command prompt :

Code:

tar -xf filename
cd filename
./configure
make
su
make install


gsvsmanyam 02-19-2010 04:11 AM

Quote:

Originally Posted by anishakaul (Post 3869166)
Is it a tar file, if so, then do the following in the command prompt :

Code:

tar -xf filename
cd filename
./configure
make
su
make install


hi...

yep...all the things done with alien as they mentioned in INSTALL file

perl Makefile.PL
make
make install

and I want to know how to use alien to build rpm

Thank you

vinaytp 02-19-2010 04:17 AM

Hi gsvsmanyam,

For every product that you download you will get a README file or INSTALL file or anything similar to this for getting started.

I downloaded alien source and unzipped it i got followin INSTALL FILE
Quote:

To try alien before installing, just run ./alien.pl from this directory. Most
features will work prior to installation.

To install alien, become root and type:
perl Makefile.PL; make; make install

To use alien, you'll need a variety of other software. See the README for
details.
~
which is pretty simple for any one to understad and follow.

After installation you can use
Code:

alien -r <ur pkg name>
TO conver your pkg to RPM..

For additional info
Code:

man alien  OR
alien --help

Hope this helps...

TheIndependentAquarius 02-19-2010 04:18 AM

Quote:

and I want to know how to use alien to build rpm
Read this man page:

http://linux.die.net/man/1/alien

gsvsmanyam 02-19-2010 04:25 AM

Quote:

Originally Posted by vinaytp (Post 3869176)
Hi gsvsmanyam,

For every product that you download you will get a README file or INSTALL file or anything similar to this for getting started.

I downloaded alien source and unzipped it i got followin INSTALL FILE


which is pretty simple for any one to understad and follow.

After installation you can use
Code:

alien -r <ur pkg name>
TO conver your pkg to RPM..

For additional info
Code:

man alien  OR
alien --help

Hope this helps...

YAHOOOOOO...UREKA....

It worked and no arch rpm is generated....
But am not satisfied as I used a third party for that.
I couldn't understand why it isn't worked with 'rpmbuild' to generate the rpm..it makes me unhappy for failing to do it with the original way...

Any way..
THANK YOU ANISHA & VINAY...you are awesome...
am rushing to experiment with that rpm on my SUSE10.3

Thank you
Manyam.....


All times are GMT -5. The time now is 11:53 PM.