Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to get the compile options of a yum package? In this particular case, I am trying to get them for the standard BIND installation with CentOS, but if there is a generic way for YUM packages that would be good to know as well.

So to be clear this would be all the options passed during the build process of the bind binaries in the yum package during the compile process.

share|improve this question
up vote 5 down vote accepted

The generic way is to download the source RPM and look in the .spec file. Install the yum-utils package, and run yumdownloader --source bind, and then unpack the downloaded source RPM (with either rpm -ivh or rpm2cpio) and look.

Many programs also have an application-specific way of getting compile options. Unfortunately (see comments) the RHEL 5 / CentOS 5 version of BIND does not have any such option, so you're pretty much reduced to looking at the build options in the spec file. Newer versions of BIND, however, do provide a way: run /usr/sbin/named -V for version number and build options. (Many programs happen to follow this -V convention, perl and Apache httpd among them. But it's by no means standard.)

share|improve this answer
-V was the first thing I ran, for some reason the stock named in CentOS says it is an invalid option. (also tried -v which only shows the version number and --version which is another unknown) – Kyle Brandt Nov 16 '10 at 16:38
Whoops -- you're right. From the changelog, that added in 9.6.0a1, and RHEL/CentOS 5 have version 9.3.x. I'll edit my answer. Yet another reason for RHEL 6. :) – mattdm Nov 16 '10 at 16:43

Your Answer


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.