0

How to create a Spec File with fpm tool for rpm packages? (or) all files installed through rpm are root-owned and is there a way that i can set the ownership to some other user?

i can use %files (or) %defattr, but i am not sure how to add these directives with fpm tool.

Madhavan
  • 133
  • 1
  • 7

2 Answers2

2

There's no src.rpm created. The author of FPM has stated it won't ever be done since its hard to do.

That said you can edit the spec file before building the rpm by adding the -e flag. So for example

fpm -s python -t rpm -e requests
Mike
  • 22,310
  • 7
  • 56
  • 79
2

You can coerce fpm into consuming a SPEC file using the following method:

export FPM_EDITOR="cat <spec_file >"
fpm -e ...<your args>...

What this basically does is to cat the spec_file in the working dir into FPM at run time, as such FPM will then use that as if the default editor (vi) has saved it.

chicks
  • 3,793
  • 10
  • 27
  • 36