Compile time options to RPM's?

Compile time options to RPM's?

Post by Ben Whale » Thu, 30 Aug 2001 12:52:12



Hi there..

I need to reinstall pine with some of the optional compile time options
that are documented in the washington.edu installation guide. I would like
to use an RPM rather than a tarball but I don't know how (or even if it's
possible) to pass compile time options to an rpm. It could be that RPM's
are precompiled, I really know very little about them. However, if they
aren't precompiled then it should be possible to pass options to the
makefiles. Can anyone comment on this for me?

Thanks in advance.

--
Ben Whaley

There are two major products that come out of Berkeley: LSD and BSD.
We don't believe this to be a coincidence.

 
 
 

Compile time options to RPM's?

Post by Jim Ankru » Thu, 30 Aug 2001 13:12:44



> Hi there..

> I need to reinstall pine with some of the optional compile time options
> that are documented in the washington.edu installation guide. I would like
> to use an RPM rather than a tarball but I don't know how (or even if it's
> possible) to pass compile time options to an rpm. It could be that RPM's
> are precompiled, I really know very little about them. However, if they
> aren't precompiled then it should be possible to pass options to the
> makefiles. Can anyone comment on this for me?

> Thanks in advance.

you can with source rpms. I'm not sure what options you need to pass,
you may need to modify some files but in a nutshell it goes something
like rpm --rebuild program.1.0.src.rpm

check out man rpm

and this might help too http://rpm.redhat.com/RPM-HOWTO

sorry I'm not much help... I just started looking at this very thing
this afternoon :)

Jim

 
 
 

Compile time options to RPM's?

Post by Hal Burgi » Thu, 30 Aug 2001 13:43:55



>you can with source rpms. I'm not sure what options you need to pass,
>you may need to modify some files but in a nutshell it goes something
>like rpm --rebuild program.1.0.src.rpm

No,no.

$su
#rpm -iv $YOUR.src.rpm
#cd /usr/src/redhat/SPECS/
edit $YOUR.spec (eg. WindowMaker.spec)
Look for configure/make statements near top. Add what you need, and
delete anything you *know* you don't need. Example:

/usr/src/redhat/SPECS/WindowMaker.spec:

===========================================
%define _sysconfdir /etc/X11
%define optflags -g
# patch5 needs autoconf to run
autoconf
%configure --enable-newstyle --enable-superfluous \
         --enable-gnome --with-appspath=/usr/lib/GNUstep/Apps

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

make
cp -f asclock/asclock.man asclock/wmclock.man
make Makefile -C asclock
make -C asclock
==========================================end example.

<save&exit>
#rpm -bb $YOUR.spec  <builds new binary from new spec file>
#rpm -Uvv /usr/src/redhat/RPMS/i386/$YOUR*rpm  <install it now>

If you want 686 or other CPU optimizations, that is another day.

--
Hal B




--

 
 
 

Compile time options to RPM's?

Post by Ben Whale » Thu, 30 Aug 2001 13:58:48


Great, thanks a lot to both of you. I will give that a shot. Thanks for
the informative and quick responses :)

--
Ben Whaley

There are two major products that come out of Berkeley: LSD and BSD.
We don't believe this to be a coincidence.

 
 
 

Compile time options to RPM's?

Post by Jim Ankru » Fri, 31 Aug 2001 00:46:58




>>you can with source rpms. I'm not sure what options you need to pass,
>>you may need to modify some files but in a nutshell it goes something
>>like rpm --rebuild program.1.0.src.rpm

> No,no.

> $su
> #rpm -iv $YOUR.src.rpm
> #cd /usr/src/redhat/SPECS/
> edit $YOUR.spec (eg. WindowMaker.spec)
> Look for configure/make statements near top. Add what you need, and
> delete anything you *know* you don't need. Example:

> /usr/src/redhat/SPECS/WindowMaker.spec:

> ===========================================
> %define _sysconfdir /etc/X11
> %define optflags -g
> # patch5 needs autoconf to run
> autoconf
> %configure --enable-newstyle --enable-superfluous \
>     --enable-gnome --with-appspath=/usr/lib/GNUstep/Apps

> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

> make
> cp -f asclock/asclock.man asclock/wmclock.man
> make Makefile -C asclock
> make -C asclock
> ==========================================end example.

> <save&exit>
> #rpm -bb $YOUR.spec  <builds new binary from new spec file>
> #rpm -Uvv /usr/src/redhat/RPMS/i386/$YOUR*rpm  <install it now>

> If you want 686 or other CPU optimizations, that is another day.

thanks for setting me straight on that :) like I said I just started
looking into this stuff yesterday. My whole intent was just to let him
know that it looked like he could do what he needed with rpm's

btw I figured out the i686 already... that looks pretty easy

rpm --rebuild --target=i686 package-name.src.rpm

heh... somehow I'm thinking there's more to it than that though. I am
confident however that someone will enlighten me soon enough :)

Jim

--

I send you this sig in order to have your advice

 
 
 

Compile time options to RPM's?

Post by Hal Burgi » Fri, 31 Aug 2001 01:03:09





>thanks for setting me straight on that :) like I said I just started
>looking into this stuff yesterday. My whole intent was just to let him
>know that it looked like he could do what he needed with rpm's

>btw I figured out the i686 already... that looks pretty easy

>rpm --rebuild --target=i686 package-name.src.rpm

>heh... somehow I'm thinking there's more to it than that though. I am
>confident however that someone will enlighten me soon enough :)

Well, er, yes.


buildarchtranslate: i686: i686
optflags: i686 -O3 -mpentiumpro -malign-loops=2 -malign-jumps=2 -malign-  functions=2   -march=pentiumpro  -fomit-frame-pointer -funroll-loops -pipe -s

optflags: i386 -O3 -m486 -fno-strength-reduce

=============

If you didn't do anything else,  --target=i686 just gives the rpm an 686
name without optimizations (unless the distros are doing this now). So
you have to define this in /etc/rpmrc (and there is a newer place for
this but I forget the name!). Those are compiler flags above. Not a
definitive list by any means, but the ones I use.

--
Hal B




--

 
 
 

Compile time options to RPM's?

Post by Jim Ankru » Fri, 31 Aug 2001 01:20:29



>>heh... somehow I'm thinking there's more to it than that though. I am
>>confident however that someone will enlighten me soon enough :)

> Well, er, yes.


> buildarchtranslate: i686: i686
> optflags: i686 -O3 -mpentiumpro -malign-loops=2 -malign-jumps=2 -malign-  functions=2   -march=pentiumpro  -fomit-frame-pointer -funroll-loops -pipe -s

> optflags: i386 -O3 -m486 -fno-strength-reduce

> =============

> If you didn't do anything else,  --target=i686 just gives the rpm an 686
> name without optimizations (unless the distros are doing this now). So
> you have to define this in /etc/rpmrc (and there is a newer place for
> this but I forget the name!). Those are compiler flags above. Not a
> definitive list by any means, but the ones I use.

heh... the coolest part of open source is all this stuff is readily
available to the average joe :) all you have to do is ask

thanks for the info :)

Jim

--

I send you this sig in order to have your advice

 
 
 

1. RPM - Bad option 'fixperms'

I have an annoying error message.  I have RedHat 4.2 and use the RPM
tool evoked by the executable "glint."  When I run this file I get an
error message saying, "bad option 'fixperms' at /usr/lib/rpmrc:9."  In
this rpmrc file there is one line that is causing this, as follows:
fixperms: a+rX,g-w,o-w

What does this line do?  It looks like file permissions or something. If
I rem it out, everything is OK, but then I worry that RPM may not
working properly behind the scenes.

Any ideas will be appreciated and thanks in advance.  When responding,
please email me too.

2. ISDN-Card

3. Compiling Python Imaging .src.rpm (was compiling .src.rpms)

4. low speed/performance on lo0

5. Apache RPM - compile options

6. i740 under Redhat

7. Cannot compile DBD::Mysql for Perl: ld problem with '-lz' option

8. Help: S3 Trio64V2/GX (86c785)

9. Rookie Question: '-Xc' Compile Option

10. Invalid option '-WStrict-prototypes' while compiling tulip.c driver for Linksys LNE100TX

11. Help: 'Malformed option' when trying to compile with PHP/FI as module.

12. Apache patch to allow 'Options None' when Options override disallowed

13. New: Change compile-time option CONFIG_APM_RTS_IS_GMT to sysctl-tunable kernel parameter