bernd / fpm-cookery

A tool for building software packages with fpm.
Other
460 stars 88 forks source link

packaging with non-root or different attributes #119

Open glensc opened 8 years ago

glensc commented 8 years ago

i can't seem to find doc (not from fpm or fpm-cookery) how to package files with different owner or permission.

currently seems when building rpm files get owned by root and permissions stay what they were on checkout from vcs, meaning it's rather dependant on umask as well:

# ls -l tmp-build/1.2-1
-rw-rw---- 1 vagrant vagrant 4,9K aug    5 16:27 AbstractAutoload.php
# rpm -qplv pkg/php-ClassLoader-1.2-1.noarch.rpm 
-rw-rw----    1 root    root             4957 aug   25 12:27 /usr/share/php/AbstractAutoload.php

i would need to package some dirs of files like (rpm .spec syntax):

%dir %attr(771,root,http) /etc/appname
%attr(660,root,http) /etc/appname/config.php
glensc commented 8 years ago

seems fpm supports per file attributes, so via that can specify per file permissions and group

but no mapping for that in fpm-cookery?

glensc commented 8 years ago

for %dir, this works from recipe:

    directories << '/etc/appname'