Skip to content

Commit

Permalink
use pld style config noreplace attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Aug 24, 2015
1 parent 18532f9 commit c978479
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions config-attrs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use pld style config noreplace attributes

https://github.com/bernd/fpm-cookery/issues/71#issuecomment-134127418

--- fpm-1.4.0/templates/rpm.erb~ 2015-08-24 14:06:26.000000000 +0300
+++ fpm-1.4.0/templates/rpm.erb 2015-08-24 14:07:00.841529419 +0300
@@ -238,7 +238,7 @@
%defattr(<%= attributes[:rpm_defattrfile] %>,<%= attributes[:rpm_user] || "root" %>,<%= attributes[:rpm_group] || "root" %>,<%= attributes[:rpm_defattrdir] %>)
<%# Output config files and then regular files. -%>
<% config_files.each do |path| -%>
-%config(noreplace) <%= rpm_file_entry(path) %>
+%config(noreplace) %verify(not md5 mtime size) <%= rpm_file_entry(path) %>
<% end -%>
<%# list directories %>
<% directories.each do |path| -%>
2 changes: 2 additions & 0 deletions fpm.spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Source0: http://rubygems.org/downloads/%{name}-%{version}.gem
# Source0-md5: 4d82b0484db150928330b04bb44c92a2
Patch0: templates.patch
Patch1: tmppath.patch
Patch2: config-attrs.patch
URL: https://github.com/jordansissel/fpm
BuildRequires: rpm-rubyprov
BuildRequires: rpmbuild(macros) >= 1.665
Expand Down Expand Up @@ -47,6 +48,7 @@ wasting pointless hours debugging bad rpm specs!
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*

# cleanup backups after patching
Expand Down

0 comments on commit c978479

Please sign in to comment.