LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 08-07-2013, 09:24 AM   #1
jbeiter
Member
 
Registered: Jul 2004
Posts: 105

Rep: Reputation: 15
Building custom RPMs


Can anyone recommend a good resource for learning how to build RPM packages from source tarballs? Redhat doesn't support it and after doing repeated searches for the past 4 days, there is nothing on the internet except for a shallow how-tos.

I'm trying to package a build of clamav we can distribute internally but will eventually need to make builds of java, jboss, tripwire, etc...

Some specific problems I am having include:

- I created a non-root account to build rpms but even though I specified a buildroot, when I build the RPM it still tries to overwrite libs in /var/lib.

- I downloaded the source tarball from clamav.com, can configure;make;make install just fine but when I build the rpm then try to install the rpm on another system it complains that the prereq libclamav.so.6 isn't installed.. but its in the source tarball. Shouldn't rpm include it as part of the make install?

The best doc I've found so far is the max-rpm.pdf document by Ed Bailey. I'm following it but not finding ways around these roadblocks. Looked at LDP too. If anyone knows of better resources, I'd appreciate the clue.
 
Old 08-07-2013, 10:32 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
.. how to build RPM packages from source tarballs?
Redhat doesn't support it ..
All Redhat EL* packages are available as {source code + a spec file},
that's the SRC.RPMS :
ftp://ftp.redhat.com/redhat/linux/en...r/en/os/SRPMS/

Clamav as an SRC.RPM for EL6 : http://pkgs.repoforge.org/clamav/
> http://pkgs.repoforge.org/clamav/cla...5-1.rf.src.rpm
> clamav-0.97.5-1.rf.src.rpm

Version 0.97.8 : http://dl.fedoraproject.org/pub/fedo...ource/SRPMS/c/


Quote:
.. the prereq libclamav.so.6 isn't installed.. but its in the source tarball.
Shouldn't rpm include it as part of the make install ?
What does the spec file say ? Is libclamav.so.6 getting installed ?

-
 
Old 08-07-2013, 02:25 PM   #3
jbeiter
Member
 
Registered: Jul 2004
Posts: 105

Original Poster
Rep: Reputation: 15
holy cow that srpm has dozens of unresolved dependancies.. I was able to compile and install the source tarball from clamav.com out of the box.

my spec file is pretty primitive compared to the nightmare included in that source rpm but pretty standard for every document and howto on rpmbuild I've found so far.

guess I'll try to study this fedoraproject spec file if there are no better references for this stuff.
 
Old 08-08-2013, 07:58 AM   #4
jbeiter
Member
 
Registered: Jul 2004
Posts: 105

Original Poster
Rep: Reputation: 15
For those of you who can take a source tarball and turn it into an RPM, where did you learn how to do this? What resources did you turn to for questions?
 
Old 08-08-2013, 08:01 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,253

Rep: Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419
have you seen the command rpmbuild? it can take a tarball and create an rpm.
http://www.rpm.org/max-rpm-snapshot/...b-command.html
Is this what you are looking for?
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating Custom LiveOS ISO with Custom Files and RPMs niteshadw Red Hat 1 11-06-2012 10:44 AM
Building RPMS in centos linuxguy08 Linux - Server 1 09-20-2012 06:35 PM
help building src rpms nkoplm Linux - General 1 04-05-2006 03:13 PM
no distro, custom build need help with rpms sideshowrob Linux - Software 3 06-24-2005 04:31 PM
Building RPMs Brian of Gep Linux - Newbie 2 05-02-2004 10:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

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