[packages/fpm] use pld style config noreplace attributes

glen glen at pld-linux.org
Mon Aug 24 13:09:16 CEST 2015


commit c978479aee945555290128def251b481b6b59d5e
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Aug 24 14:08:18 2015 +0300

    use pld style config noreplace attributes
    
    https://github.com/bernd/fpm-cookery/issues/71#issuecomment-134127418

 config-attrs.patch | 15 +++++++++++++++
 fpm.spec           |  2 ++
 2 files changed, 17 insertions(+)
---
diff --git a/fpm.spec b/fpm.spec
index 7a5202c..0220a1e 100644
--- a/fpm.spec
+++ b/fpm.spec
@@ -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
@@ -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
diff --git a/config-attrs.patch b/config-attrs.patch
new file mode 100644
index 0000000..6266366
--- /dev/null
+++ b/config-attrs.patch
@@ -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| -%>
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/fpm.git/commitdiff/c978479aee945555290128def251b481b6b59d5e



More information about the pld-cvs-commit mailing list