Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Passing configure options to an SRPM

123 views
Skip to first unread message

Tahir Hashmi

unread,
Nov 22, 2002, 8:10:23 AM11/22/02
to
Hi All!

How do I pass a configure option thru an SRPM? I want to do something
analogous to:
$ ./configure --enable-foo
with the source rpm while doing a rebuild. Also, how do I examine the
contents of an SRPM?

TIA

--
Tahir Hashmi
tahir AT ncst DOT ernet DOT in

ne...

unread,
Nov 22, 2002, 10:50:14 AM11/22/02
to
On Fri, 22 Nov 2002 at 13:10 GMT, Tahir Hashmi eloquently wrote:
> Hi All!
>
> How do I pass a configure option thru an SRPM? I want to do something
> analogous to:
> $ ./configure --enable-foo
> with the source rpm while doing a rebuild. Also, how do I examine the
> contents of an SRPM?
First you need to man rpm to learn about the options rpm has. Next install
the src.rpm ( rpm -i foo.src.rpm). The go to /usr/src/redhat/SPECS, if you
use RH and examine the foo.spec file. You can even edit it. The build
foo.rpm using the editted foo.spec file. But first man rpm.

--
Registered Linux User # 125653 (http://counter.li.org)
Certified: 55% bastard, 31% of which is tard.
http://www.thespark.com/bastardtest
Please remove '.invalid' to reply.

Tahir Hashmi

unread,
Nov 23, 2002, 5:14:54 AM11/23/02
to
"ne..." <aka...@directvinternet.com.invalid> wrote...

> On Fri, 22 Nov 2002 at 13:10 GMT, Tahir Hashmi eloquently wrote:
> > Hi All!
> >
> > How do I pass a configure option thru an SRPM? I want to do something
> > analogous to:
> > $ ./configure --enable-foo
> > with the source rpm while doing a rebuild. Also, how do I examine the
> > contents of an SRPM?
> First you need to man rpm to learn about the options rpm has. Next install
> the src.rpm ( rpm -i foo.src.rpm). The go to /usr/src/redhat/SPECS, if you
> use RH and examine the foo.spec file. You can even edit it. The build
> foo.rpm using the editted foo.spec file. But first man rpm.

OK, here's what I did:

$ rpm -i foo.src.rpm

edited the following in /usr/src/redhat/SPECS/foo.spec :

%build
./configure --prefix=%{prefix} --enable-xft <-- I added --enable-xft
myself
make

and then did this:

$ rpmbuild --rebuild foo.src.rpm
# rpm -i foo.rpm

The configure option didn't seem to have any effect. Am I making some
mistake in rebuilding and installation or somewhere else?

Juha Laiho

unread,
Nov 23, 2002, 12:52:01 PM11/23/02
to
nos...@tahirhashmi.scriptmania.com (Tahir Hashmi) said:
>OK, here's what I did:
>
>$ rpm -i foo.src.rpm
>
>edited the following in /usr/src/redhat/SPECS/foo.spec :
>
>%build
>./configure --prefix=%{prefix} --enable-xft <-- I added --enable-xft
>myself
>make
>
>and then did this:
>
>$ rpmbuild --rebuild foo.src.rpm
># rpm -i foo.rpm
>
>The configure option didn't seem to have any effect. Am I making some
>mistake in rebuilding and installation or somewhere else?

I think, if you now go and look at the .spec file, your changes are lost
(it seems to me that using that format of rpmbuild, rpmbuild will start
by extracting the source rpm - including the spec file).

First, check that your changes in the spec file are still there - and
repeat them, if they're not. Then try with
rpmbuild --rebuild /usr/src/redhat/SPECS/foo.spec
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)

Nico Kadel-Garcia

unread,
Nov 23, 2002, 3:25:43 PM11/23/02
to

"Tahir Hashmi" <nos...@tahirhashmi.scriptmania.com> wrote in message
news:2ce64ea4.02112...@posting.google.com...

> "ne..." <aka...@directvinternet.com.invalid> wrote...
> > On Fri, 22 Nov 2002 at 13:10 GMT, Tahir Hashmi eloquently wrote:
> > > Hi All!
> > >
> > > How do I pass a configure option thru an SRPM? I want to do something
> > > analogous to:
> > > $ ./configure --enable-foo
> > > with the source rpm while doing a rebuild. Also, how do I examine the
> > > contents of an SRPM?
> > First you need to man rpm to learn about the options rpm has. Next
install
> > the src.rpm ( rpm -i foo.src.rpm). The go to /usr/src/redhat/SPECS, if
you
> > use RH and examine the foo.spec file. You can even edit it. The build
> > foo.rpm using the editted foo.spec file. But first man rpm.
>
> OK, here's what I did:
>
> $ rpm -i foo.src.rpm
>
> edited the following in /usr/src/redhat/SPECS/foo.spec :
>
> %build
> ./configure --prefix=%{prefix} --enable-xft <-- I added --enable-xft
> myself
> make
>
> and then did this:
>
> $ rpmbuild --rebuild foo.src.rpm
> # rpm -i foo.rpm

Hold it right there! You just blew away your editing!

You need to use "rpmbuild -bp /usr/src/redhat/SPECS/foo.spec" to take
advantage of your editing.

0 new messages