Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 created a tarball with multiple files. The rpm generator requires those files to be inside a folder. I don't want to move the files before generating the tar. Is there a way to create this folder while generating the tar or after it?

share|improve this question
up vote 2 down vote accepted

The -c option to %setup will allow you to create a directory and extract the files from the various sources within it.

share|improve this answer
For me that's not an option right now. But thank you anyway. I'll have to solve the problem in the tar, I can't change the rpm params. – Jader Dias Jun 9 '11 at 19:25
Your other alternative is to write a custom tool, since even GNU tar doesn't support this. – Ignacio Vazquez-Abrams Jun 9 '11 at 19:39

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.