LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-15-2007, 03:55 AM   #1
edenCC
Member
 
Registered: May 2006
Location: China
Distribution: Debian
Posts: 198
Blog Entries: 1

Rep: Reputation: 32
how to get configure options from a rpm?


Hi, guys
how can I get the configuration of a rpm?
for example, whatI have is bash-2.05b-20.i366.rpm only, no spec file, how can I get the compilation options for bash?

a common way will be highly preferred!
thanks for your detail,
 
Old 03-15-2007, 04:23 AM   #2
budword
Member
 
Registered: Apr 2003
Location: Wisconsin
Distribution: Switched to regualr Ubuntu, because I don't like KDE4, at all. Looks like vista on crack.....
Posts: 675

Rep: Reputation: 31
I think you want to download the source for the package you want, and compile from source. Then you can do whatever you want. RPM will limit your options a bit, in exchange for convenience.

Best of luck

David
 
Old 03-16-2007, 03:52 AM   #3
edenCC
Member
 
Registered: May 2006
Location: China
Distribution: Debian
Posts: 198

Original Poster
Blog Entries: 1

Rep: Reputation: 32
Quote:
Originally Posted by budword
I think you want to download the source for the package you want, and compile from source. Then you can do whatever you want. RPM will limit your options a bit, in exchange for convenience.

Best of luck

David
yes, the *.src.rpm has a spec file which has the detailed parameters,

if I don't have *.src.rpm, what can I do?
 
Old 03-16-2007, 05:19 AM   #4
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Maybe this could help:

rpm -qi package (for installed packages)
rpm -qp package (for packages that are not installed yet)

rpm -qd package will show all the documentation files that come in the package
and
rpm -qc package will list all its configuration files
 
Old 03-16-2007, 07:27 AM   #5
budword
Member
 
Registered: Apr 2003
Location: Wisconsin
Distribution: Switched to regualr Ubuntu, because I don't like KDE4, at all. Looks like vista on crack.....
Posts: 675

Rep: Reputation: 31
You can get the source code here, not the rpm or src.rpm, but the source code itself.

ftp://ftp.gnu.org/gnu/bash/

Here is an example on how to build it
2.3.10. Build BASH

Get the bash-2.05 source code package from ftp://ftp.gnu.org/gnu/bash/ and untar it into the /usr/src directory.

Note

BASH version 2.05b, the latest version at the time of this writing, will not build successfully when using the --enable-minimal-config option. This leaves two choices. We can either fix 2.05b by applying the patch posted on gnu.bash.bug under the subject, "Compile error in execute_cmd.c with --enable-minimal-config" or we can simply use the 2.05a version.

bash# cd /usr/src/bash-2.05a
bash# ./configure --enable-static-link \
--enable-minimal-config --host=i386-pc-linux-gnu
bash# make
bash# strip bash

I found that here, I think they are building boot floppys from scratch

http://www.faqs.org/docs/pocket_linux/x167.html

With any GNU program, like bash, you can always get the source, somewhere. A src.RPM is just a system to package the source code. The RPM is just a system to package the already built binary. Hope that makes sense.

David
 
Old 07-26-2007, 11:16 AM   #6
shinepuppy
LQ Newbie
 
Registered: Sep 2002
Location: Lewisville, Texas
Distribution: Debian / [K]Ubuntu
Posts: 13

Rep: Reputation: 0
I noticed that nobody answered the original posters question: "how can I get the compilation options" from a binary installed from an RPM.

I am stuck with the same problem. I need to figure out which flags and configure options fedora used to compile a package because I need to mimic them in an different environment. Does anyone have a clue how to do this? It seems idiotic to not include the compile options within the package meta data Am I just missing it?

ugh!
 
Old 07-26-2007, 11:26 AM   #7
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
As was stated above it is in the srpm. If you used the standard Fedora repos they also carry the srpms for everything. Take a look at the files in /etc/yum.repos.d/ . If you edit those files you will see that there is also a srpm repo within them. They are shut off (enable=0) by default.
 
Old 07-26-2007, 01:52 PM   #8
shinepuppy
LQ Newbie
 
Registered: Sep 2002
Location: Lewisville, Texas
Distribution: Debian / [K]Ubuntu
Posts: 13

Rep: Reputation: 0
Maybe I'm misunderstanding source RPMs. When I downloaded the src.rpm package for openssh I gain access to the 'spec' file which not only contains a list of the valid configuration parameters that fedora uses but also tons of branch statements which alters the configuration parameters used depending on the libraries installed on the system:
Code:
%if %{scard}
        --with-smartcard \
%endif
%if %{build6x}
        --with-ipv4-default \
%endif
%if %{rescue}
        --without-pam \
%else
        --with-pam \
%endif
%if %{WITH_SELINUX}
        --with-selinux \
%else
        --without-selinux \
%endif
%if %{kerberos5}
        --with-kerberos5${krb5_prefix:+=${krb5_prefix}}
%else
        --without-kerberos5
%endif
I'm not interested in compiling a custom binary of a package tailored to the exact development libraries I have installed on my machine (I can do that with source from the original developers). I specifically want to know what flags and parameters the fedora crew threw in when they prepared and compiled their binary. Do you see the difference? I'm trying to debug a problem and need to do some forensics on a current working implementation not run the fedora script which determines which flags it needs to set to compile a completely different binary on my machine.

The php binary is a fantastic example of what I'm looking for. If you run /usr/bin/php -i you'll be bombarded with all sorts of useful information including the configuration command used like so:

Code:
php -i | grep Configure
Configure Command =>  './configure' '--with-curl' '--with-mysql=/usr' '--with-apxs2=/usr/sbin/apxs' '--with-openssl' '--with-gd' '--with-jpeg' '--with-jpeg-dir=/usr' '--with-png' '--with-zlib'
Again, the specific question posed remains unanswered. If the answer is "Nope, you can't get the configuration/compile parameters used from a pre-compiled binary RPM," that's OK with me. I just have to find another way around my problem.
 
  


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
Install RPM w/ options ckoniecny Linux - General 1 02-15-2007 02:30 PM
postgresql or ./configure options nukeu666 Linux - Software 0 11-12-2005 04:47 AM
Adding ./configure options to an already installed RPM EviLBoX Linux - Software 3 10-29-2004 03:31 PM
rar.rpm options varunk123456 Linux - Software 1 04-04-2004 04:17 AM
./configure - which options? Zingaro2002 Linux - General 4 01-24-2003 01:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:39 PM.

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