[packages/puppet] add preserve timestamps patch from fedora
glen
glen at pld-linux.org
Sun Aug 26 16:43:18 CEST 2012
commit a1a906d975b7d9dcaeb35f6adda70170eef48519
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Aug 26 17:43:01 2012 +0300
add preserve timestamps patch from fedora
install-p.patch | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
puppet.spec | 4 ++-
2 files changed, 90 insertions(+), 1 deletion(-)
---
diff --git a/puppet.spec b/puppet.spec
index 99be814..310ce19 100644
--- a/puppet.spec
+++ b/puppet.spec
@@ -5,11 +5,12 @@
Summary: A network tool for managing many disparate systems
Name: puppet
Version: 2.7.18
-Release: 0.3
+Release: 0.4
License: GPL v2+
Group: Networking/Admin
Source0: http://puppetlabs.com/downloads/puppet/%{name}-%{version}.tar.gz
# Source0-md5: 210725704692a0ca7b8ffc312471796e
+Patch0: install-p.patch
URL: http://www.puppetlabs.com/
BuildRequires: docutils
BuildRequires: rpmbuild(macros) >= 1.484
@@ -51,6 +52,7 @@ Vim syntax for puppet .pp files
%prep
%setup -q
+%patch0 -p1
# puppet-queue.conf is more of an example, used for stompserver
mv conf/puppet-queue.conf examples/etc/puppet/
diff --git a/install-p.patch b/install-p.patch
new file mode 100644
index 0000000..6fb536a
--- /dev/null
+++ b/install-p.patch
@@ -0,0 +1,87 @@
+From cfce8cf0baa7a96498f0ddc2c46170ed38c9aea7 Mon Sep 17 00:00:00 2001
+From: Todd Zullinger <tmz at pobox.com>
+Date: Thu, 12 Jul 2012 00:34:28 -0400
+Subject: [PATCH/puppet] Preserve timestamps when installing files
+
+Without the preserve option, ruby's FileUtils.install method uses the
+current time for all installed files. For backup systems, package
+installs, and general pedantic sysadmins, preserving timestamps makes a
+small improvement in the world.
+---
+ install.rb | 16 ++++++++--------
+ 1 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/install.rb b/install.rb
+index a55d929..c77edff 100755
+--- a/install.rb
++++ b/install.rb
+@@ -84,7 +84,7 @@ def do_configs(configs, target, strip = 'conf/')
+ if $haveftools
+ File.install(cf, ocf, 0644, true)
+ else
+- FileUtils.install(cf, ocf, {:mode => 0644, :verbose => true})
++ FileUtils.install(cf, ocf, {:mode => 0644, :preserve => true, :verbose => true})
+ end
+ end
+
+@@ -94,7 +94,7 @@ def do_configs(configs, target, strip = 'conf/')
+ if $haveftools
+ File.install(src_dll, dst_dll, 0644, true)
+ else
+- FileUtils.install(src_dll, dst_dll, {:mode => 0644, :verbose => true})
++ FileUtils.install(src_dll, dst_dll, {:mode => 0644, :preserve => true, :verbose => true})
+ end
+
+ require 'win32/registry'
+@@ -130,7 +130,7 @@ def do_libs(libs, strip = 'lib/')
+ else
+ FileUtils.makedirs(op, {:mode => 0755, :verbose => true})
+ FileUtils.chmod(0755, op)
+- FileUtils.install(lf, olf, {:mode => 0644, :verbose => true})
++ FileUtils.install(lf, olf, {:mode => 0644, :preserve => true, :verbose => true})
+ end
+ end
+ end
+@@ -146,7 +146,7 @@ def do_man(man, strip = 'man/')
+ else
+ FileUtils.makedirs(om, {:mode => 0755, :verbose => true})
+ FileUtils.chmod(0755, om)
+- FileUtils.install(mf, omf, {:mode => 0644, :verbose => true})
++ FileUtils.install(mf, omf, {:mode => 0644, :preserve => true, :verbose => true})
+ end
+ gzip = %x{which gzip}
+ gzip.chomp!
+@@ -420,12 +420,12 @@ def install_binfile(from, op_file, target)
+ installed_wrapper = false
+
+ if File.exists?("#{from}.bat")
+- FileUtils.install("#{from}.bat", File.join(target, "#{op_file}.bat"), :mode => 0755, :verbose => true)
++ FileUtils.install("#{from}.bat", File.join(target, "#{op_file}.bat"), :mode => 0755, :preserve => true, :verbose => true)
+ installed_wrapper = true
+ end
+
+ if File.exists?("#{from}.cmd")
+- FileUtils.install("#{from}.cmd", File.join(target, "#{op_file}.cmd"), :mode => 0755, :verbose => true)
++ FileUtils.install("#{from}.cmd", File.join(target, "#{op_file}.cmd"), :mode => 0755, :preserve => true, :verbose => true)
+ installed_wrapper = true
+ end
+
+@@ -439,13 +439,13 @@ set RUBY_BIN=%RUBY_BIN:\\=/%
+ "%RUBY_BIN%ruby.exe" -x "%RUBY_BIN%puppet" %*
+ EOS
+ File.open(tmp_file2.path, "w") { |cw| cw.puts cwv }
+- FileUtils.install(tmp_file2.path, File.join(target, "#{op_file}.bat"), :mode => 0755, :verbose => true)
++ FileUtils.install(tmp_file2.path, File.join(target, "#{op_file}.bat"), :mode => 0755, :preserve => true, :verbose => true)
+
+ tmp_file2.unlink
+ installed_wrapper = true
+ end
+ end
+- FileUtils.install(tmp_file.path, File.join(target, op_file), :mode => 0755, :verbose => true)
++ FileUtils.install(tmp_file.path, File.join(target, op_file), :mode => 0755, :preserve => true, :verbose => true)
+ tmp_file.unlink
+ end
+
+--
+1.7.6
+
More information about the pld-cvs-commit
mailing list