Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How can I see a list of flags/options used to configure and compile a certain package in yum, without having to install it first? Say apache, for example.

$ yum list available httpd
    Available Packages
    httpd.x86_64           2.2.15-15.el6.centos.1          base

I'm running CentOS 6.3.

UPDATE

I followed @jsbillings answer, but first I had to add the CentOS Source repository, as it doesn't seem to be included by default.

Added the following to /etc/yum.repos.d/CentOS-Base.repo

[base-source]
name=CentOS-$releasever - Base - Source
baseurl=http://vault.centos.org/6.3/os/Source
share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

You'll have to grab the package's source RPM. For example, with apache httpd:

yumdownloader --source httpd

You can extract just the spec file from the source rpm with:

rpm2cpio httpd-version.src.rpm | cpio -i httpd.spec

Then, search for the %build section in the RPM spec file.

Sadly, CentOS doesn't appear to keep their spec files in any kind of public repository that I can find on their web site. You'll have to use the above steps to determine how the package is built.

share|improve this answer
add comment

I think the place to look is the src package, at the spec file should be a section where the configure command is specified. But I don't know if you could do it without installing it.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.