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

I am creating customized rpm through source. I want to know what is the use of %files section. These are the files that rpm will include in the package or it needs these files for rpm creation purpose? How to know which files should be listed under %files section and what is the exact path of these files?

Follwoing error is coming:

/bin/sh ../../libtool --mode=install ../../build/shtool install -c -m 644 /usr/local/openldap-2.4.31-root/usr/lib
libtool: install: error: cannot install '' to a directory not ending in usr/local/lib

Please provide your valuable suggestions.

Thanking you.

share|improve this question

They enumerate the files and their corresponding ownership and permissions within the generated package. There is no fixed way to know which files should be listed within, but in general if you only generate one package then it will contain all files installed.

share|improve this answer
how to get the listing of installed files in order to mention in spec file? – Infotechie Apr 30 '12 at 5:06
Have you... even actually tried it out yet? Or are you just asking a bunch of theoretical questions? – Ignacio Vazquez-Abrams Apr 30 '12 at 5:07
Obviously, I have tried and getting errors if I am not mentioning these files. – Infotechie Apr 30 '12 at 5:12
So... then... mention them. – Ignacio Vazquez-Abrams Apr 30 '12 at 5:25
I have updated the question with the error details. May be this will be helpful in understanding problem. Thanks – Infotechie Apr 30 '12 at 12:55

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.