Open glensc opened 9 years ago
Commented in your other issue, the default is "noreplace", per https://github.com/jordansissel/fpm/blob/master/templates/rpm.erb#L241
i would prefer %config(noreplace) %verify(not md5 mtime size)
, should the default be changed? made configurable from recipe?
Not sure why the spec says that about config_files
. I didn't write that. :smile: To make %config
configurable for RPM packages it needs to be configurable in fpm first.
I would also like to avoid having too many platform specific options in fpm-cookery. It is an abstraction over different packaging systems and there are tons of platform specific features in every one. Supporting everything under the sun would make fpm-cookery pretty bloated in my opinion and it would probably be easier to just create RPM spec files in the first place.
I agree that it would be good to make it even easier to set arbitrary fpm options to be able to access the full power of fpm. The fpm_attributes
works for that but is a bit difficult to use because you have to find out how each fpm command line option translates to a config key in fpm_attributes
. I guess that can only be solved by documenting them.
was dealing with config files for rpm targets: I have marked one file as such, e.g. created the package with
$ fpm -f -s dir -t rpm -n foo -v 1.0.0 --iteration 2 --description "A sample package" --config-files /etc/send_nsca.cfg opt/sbin/send_nsca=/sbin/send_nsca opt/etc/send_nsca.cfg=/etc/send_nsca.cfg
$ rpm -qp --filesbypkg foo-1.0.0-1.x86_64.rpm
foo /etc/send_nsca.cfg
foo /sbin/send_nsca
then installed the rpm via
# yum localinstall foo-1.0.0-1.x86_64.rpm
# rpm -qc foo
/etc/send_nsca.cfg
then I edited that file, (only uncommented one line), then created a new package (just bumbed revision number via the iteration option) and udated it
# yum localupdate foo-1.0.0-2.x86_64.rpm
and what I find in /etc is only the original config file (with my line commented out), but no .rpmnew one
# find /etc -iname "*send_*"
/etc/send_nsca.cfg
#
am I missing something? thx
the spec says there's
config_files
, useful for.deb
, but not so useful for.rpm
.but i wonder what that statement mean? as if i build
.rpm
package usingconfig_files
, the files are marked as%config
:meaning it's marked as
%config
, however, %config does have attributes, which really define it's usability, i.e default is to overwrite existing file preserve it as .rpmsave, but more useful is to preserve existing file and store new one as .rpmnew, which can be controlled as (in .spec):so, i wonder which
%config
fpm-cookery (fpm?) uses, and can it be further tuned (like set those attributes per file or glob)