LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-03-2007, 03:34 AM   #1
koobi
Member
 
Registered: Jun 2006
Location: Colombo, Sri Lanka
Distribution: Ubuntu
Posts: 103

Rep: Reputation: 15
How do I rebuild an RPM with an edited .spec file?


Hi,
I'm trying to enable SSL in postgres at compile time using an RPM or SRPM (not source - tar.gz).

How can I do this?

This is what I have tried...I downloaded the SRPM, extracted it to the SOURCE folder and then edit the .spec file in the SPEC folder and used rpmbuild to build the RPM but while building, it gives me an error saying "Bad exit status from /vat/tmp/rpm-tmp.85685 (%install)"
This is the rpmbuild command:
Code:
rpmbuild --rebuild --define 'tcl 0' \
        --define 'test 0' --define 'runselftest 0' --define 'kerberos 0' \
        --define 'plpython 0' --define 'pltcl 0' --define 'plperl 0' \
        --define 'ssl 1' --define 'nls 0' --define 'pam 0' \
        --define 'xml 0' --define 'pgfts 0'  postgresql-8.1.10-2PGDG.f7.src.rpm

So I opened up the spec file in the SPEC folder and looked at the %install macro and it had a variable named %buildroot which is not defined above.
I believe the command was something like:
Code:
%install
rm -rf %{buildroot}

So I'm not sure how to proceed. I'm not too familiar with working with RPM's (I use deb based distros at home), this was the first time I tried to build an RPM and it error'd and I'm not sure how to proceed so any guidance would be greatly appreciated.

Thanks.


:EDIT:
If it helps, I just wanted to mention that I couldn't find an .rpmmacros file on my system.

Last edited by koobi; 12-03-2007 at 03:58 AM.
 
Old 12-03-2007, 05:34 AM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Bad rpmbuild command, from where the edited spec file resides it should be more like:

rpmbuild -bb{or ba} postgresql.spec
 
Old 12-04-2007, 10:30 AM   #3
koobi
Member
 
Registered: Jun 2006
Location: Colombo, Sri Lanka
Distribution: Ubuntu
Posts: 103

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Lenard View Post
Bad rpmbuild command, from where the edited spec file resides it should be more like:

rpmbuild -bb{or ba} postgresql.spec


thanks, that worked

when i tried to use the SSL properties by turning SSL on in postgresql.conf, it gave me an error on start up. i haven't added the certificate yet, but should it really error if a certificate is not present? Just checking.

Thanks.
 
Old 12-04-2007, 11:17 AM   #4
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
If I remember correctly the certificate is required to use the feature.
 
  


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
rpm (or .spec file) newbie question powah Red Hat 2 08-28-2007 10:44 AM
rpm spec file alrawab Linux - General 2 03-28-2007 06:39 AM
RPM Spec file adddy Linux - Software 8 11-07-2006 05:02 AM
%file attribute for RPM SPEC files Brian of Gep Fedora 0 06-15-2004 07:12 PM
RPM Spec file creation: %file section question davidas Linux - Newbie 0 03-16-2004 10:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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