0

RPMs have been built using FPM. When the --rpm-user and --rpm-group parameters are used the %defattr(-,user,group,-) attribute is part of the %files, but not part of the %directory section.

How to define the user and group for directories inside and RPM using FPM?

Evan Carroll
  • 28,578
  • 45
  • 164
  • 290
JavaRocky
  • 101
  • 1
  • 3
  • Related: https://github.com/jordansissel/fpm/issues/245 – JavaRocky Sep 25 '12 at 05:55
  • 1
    Does the recently-added `--directory` flag for FPM solve the problem? See https://github.com/jordansissel/fpm/blob/master/CHANGELIST and https://github.com/jordansissel/fpm/pull/260 – Lars Rohrbach Nov 15 '12 at 06:49
  • @LarsRohrbach Please add this comment as an answer. I have confirmed that the mentioned flag solved the issue. – 030 Mar 21 '16 at 19:06
  • @Alfred Done, but it's unclear to me whether `--directory` is the correct solution, or `--directories`. Feel free to edit my answer if you wish. – Lars Rohrbach Mar 22 '16 at 05:21

1 Answers1

3

A --directories parameter was added to FPM, which may solve this problem.

From https://github.com/jordansissel/fpm/pull/260:

I've added a --directories argument to FPM which causes the values to be added as %dir entries under the file list, so they take the --rpm-user and --rpm-group as owners and get removed when the RPM gets removed. As you can see, it works just like --config-files.

There is also a separate --directory flag, which lets you mark a directory as being owned by a package.

Lars Rohrbach
  • 5,143
  • 2
  • 20
  • 24