diff --git a/0001-Preserve-timestamps-when-installing-files.patch b/0001-12669-Preserve-timestamps-when-installing-files.patch similarity index 68% rename from 0001-Preserve-timestamps-when-installing-files.patch rename to 0001-12669-Preserve-timestamps-when-installing-files.patch index c7f9ad6..3526051 100644 --- a/0001-Preserve-timestamps-when-installing-files.patch +++ b/0001-12669-Preserve-timestamps-when-installing-files.patch @@ -1,22 +1,21 @@ -From 850bfabe67ab2ab62f0d3f16acc941a6043ca92d Mon Sep 17 00:00:00 2001 +From 6ec28631f5d0a1d5f3a9f9c4879950089fce5ed2 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Wed, 15 Feb 2012 10:07:11 -0500 -Subject: [PATCH/facter] Preserve timestamps when installing files +Subject: [PATCH/facter] (#12669) 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 | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/install.rb b/install.rb -index ab233c3..e1785a2 100755 +index c5c3a11..909171f 100755 --- a/install.rb +++ b/install.rb -@@ -102,7 +102,7 @@ def do_libs(libs, strip = 'lib/') +@@ -103,7 +103,7 @@ def do_libs(libs, strip = 'lib/') op = File.dirname(olf) FileUtils.makedirs(op, {:mode => 0755, :verbose => true}) FileUtils.chmod(0755, op) @@ -25,7 +24,7 @@ index ab233c3..e1785a2 100755 end end -@@ -113,7 +113,7 @@ def do_man(man, strip = 'man/') +@@ -114,7 +114,7 @@ def do_man(man, strip = 'man/') om = File.dirname(omf) FileUtils.makedirs(om, {:mode => 0755, :verbose => true}) FileUtils.chmod(0755, om) @@ -34,7 +33,7 @@ index ab233c3..e1785a2 100755 gzip = %x{which gzip} gzip.chomp! %x{#{gzip} -f #{omf}} -@@ -412,12 +412,12 @@ def install_binfile(from, op_file, target) +@@ -400,12 +400,12 @@ def install_binfile(from, op_file, target) installed_wrapper = false if File.exists?("#{from}.bat") @@ -49,20 +48,20 @@ index ab233c3..e1785a2 100755 installed_wrapper = true end -@@ -431,13 +431,13 @@ set RUBY_BIN=%RUBY_BIN:\\=/% +@@ -419,13 +419,13 @@ set RUBY_BIN=%RUBY_BIN:\\=/% "%RUBY_BIN%ruby.exe" -x "%RUBY_BIN%facter" %* EOS - File.open(tmp_file2, "w") { |cw| cw.puts cwv } -- FileUtils.install(tmp_file2, File.join(target, "#{op_file}.bat"), :mode => 0755, :verbose => true) -+ FileUtils.install(tmp_file2, File.join(target, "#{op_file}.bat"), :mode => 0755, :preserve => true, :verbose => true) + 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) - File.unlink(tmp_file2) + tmp_file2.unlink installed_wrapper = true end end -- FileUtils.install(tmp_file, File.join(target, op_file), :mode => 0755, :verbose => true) -+ FileUtils.install(tmp_file, File.join(target, op_file), :mode => 0755, :preserve => true, :verbose => true) - File.unlink(tmp_file) +- 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 -- diff --git a/0001-Make-ec2-facts-work-on-CentOS-again.patch b/0001-Make-ec2-facts-work-on-CentOS-again.patch deleted file mode 100644 index bcdfd24..0000000 --- a/0001-Make-ec2-facts-work-on-CentOS-again.patch +++ /dev/null @@ -1,57 +0,0 @@ -From b842c77bf6957c318d1a74c70f584f56751ff43c Mon Sep 17 00:00:00 2001 -From: Jeremy Katz -Date: Wed, 15 Feb 2012 09:22:49 -0500 -Subject: [PATCH/facter] Make ec2 facts work on CentOS again - -Refactoring the ec2 facts lost the support for CentOS where the -hardware address in arp -an is uppercased. Fix and add a unit -test now that there are those ---- - lib/facter/util/ec2.rb | 2 +- - spec/fixtures/unit/util/ec2/centos-arp-ec2.out | 1 + - spec/unit/util/ec2_spec.rb | 7 +++++++ - 3 files changed, 9 insertions(+), 1 deletions(-) - create mode 100644 spec/fixtures/unit/util/ec2/centos-arp-ec2.out - -diff --git a/lib/facter/util/ec2.rb b/lib/facter/util/ec2.rb -index bcfda60..d42254a 100644 ---- a/lib/facter/util/ec2.rb -+++ b/lib/facter/util/ec2.rb -@@ -46,7 +46,7 @@ module Facter::Util::EC2 - arp_table = Facter::Util::Resolution.exec(arp_command) - if not arp_table.nil? - arp_table.each_line do |line| -- return true if line.include?(mac_address) -+ return true if line.downcase.include?(mac_address) - end - end - return false -diff --git a/spec/fixtures/unit/util/ec2/centos-arp-ec2.out b/spec/fixtures/unit/util/ec2/centos-arp-ec2.out -new file mode 100644 -index 0000000..24d2ec0 ---- /dev/null -+++ b/spec/fixtures/unit/util/ec2/centos-arp-ec2.out -@@ -0,0 +1 @@ -+? (10.240.93.1) at FE:FF:FF:FF:FF:FF [ether] on eth0 -\ No newline at end of file -diff --git a/spec/unit/util/ec2_spec.rb b/spec/unit/util/ec2_spec.rb -index 62fdcb7..f1fbe3c 100755 ---- a/spec/unit/util/ec2_spec.rb -+++ b/spec/unit/util/ec2_spec.rb -@@ -22,6 +22,13 @@ describe Facter::Util::EC2 do - Facter::Util::EC2.has_ec2_arp?.should == true - end - -+ it "should succeed if arp table contains FE:FF:FF:FF:FF:FF" do -+ ec2arp = my_fixture_read("centos-arp-ec2.out") -+ Facter::Util::Resolution.expects(:exec).with("arp -an").\ -+ at_least_once.returns(ec2arp) -+ Facter::Util::EC2.has_ec2_arp?.should == true -+ end -+ - it "should fail if arp table does not contain fe:ff:ff:ff:ff:ff" do - ec2arp = my_fixture_read("linux-arp-not-ec2.out") - Facter::Util::Resolution.expects(:exec).with("arp -an"). --- -1.7.6 - diff --git a/facter-1.6.5.tar.gz.asc b/facter-1.6.5.tar.gz.asc deleted file mode 100644 index 27c3c3d..0000000 --- a/facter-1.6.5.tar.gz.asc +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG/MacGPG2 v2.0.17 (Darwin) -Comment: GPGTools - http://gpgtools.org - -iQIcBAABAgAGBQJPIFqMAAoJEBBUt6JL1uwwT5cP/jEqju21TRu75ols8i1TcRxB -nErei95jzwfQf3NIY8e+8zC3SQY5bYCH+QCXVoEcVZPefRGVAhOIIM/Eh/Sx+zVt -okRpvql/cYbq7wVyzfSctNWAvsK5p41BvKSRapxRHhlfMMdxYLV8v/yfTwUQnhIu -5UK04N+3QsnQ2B27gqEbkRMwaUiCVm7YPJ7Jc2lnqmCHHyqPC6dyHNyLaaPWkeDO -iEZsaoYac+DOdfaKQT1pG7ucwqYRdQYyzhlUJmTtiY93oQpgfr//YrdA8Edvp/E6 -0VvVntuRY2TIeYVBHf960lnzeu0cYzYMxTh9IcFKxnemf0q0GV9PuUHw1KJMQ1Ot -h2bTZneUg4qMUCW3neiqfHakTpOJODsILmC6l0xzNIDZlQGeYpUDBwotmXVD7ks4 -YFAtLIygIAVElG3JupQyL3iTwWD+7tVO3U/dtXf9XUFO4DP8QlifgMffqhB0oPhw -C/k4AftCmWqxYKHFM5hledBsWR6K/iOEHahyG/J5VOyrNluNBNaBTvILNWCKld9S -QeKyD8RlGVr8d6rIHFd1uGTm0oNWUoLht4ZvfE5I3Z/0MDd8B3i+/Wvyem/uE7/y -eRAG+O+pBCNXYX1hHLB2rHAglXuR82V27botCj4AJZGpmjBScSMisPwAF6eBvyuj -vg7pGbWelsVTTq3Tk7fK -=KHea ------END PGP SIGNATURE----- diff --git a/facter-1.6.6.tar.gz.asc b/facter-1.6.6.tar.gz.asc new file mode 100644 index 0000000..473584e --- /dev/null +++ b/facter-1.6.6.tar.gz.asc @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.11 (Darwin) + +iQIcBAABAgAGBQJPRrX/AAoJEBBUt6JL1uww5jMP/1EdteiAyZDJfKaJ5sguDpt8 +OEfxjBRDZblCFwOUIpt62enP3nwdepaToWAJF2ehL74K5jKMuDhlJAxN0WLq+m8q +qm3hHWIKBac6CgeBFUX81DlLog+p9EU2HCBhzajBohfwCXjn74kczwskIhR9vrcx +wH3/oG3BKKO51Gi/k6uXHkKJvIPpomAqGxvm5VpjE9e3vUkQMlxWL4jCeDIexByL +ykviFtsdgzQRBOTSQRtz2okDJxZVVRux+Y4qQnsQe8C2YrDoXK8lzwhHjNVq1fr/ +XFM/4OXQawPmE7Jw+5DoAtJR4Ur3tRqHfkCK7dITv4tK4WuSCrrZa6r1bGWMhnwD +WFPF5+aXIoX3IMtG0YFcarOPNj+X9Z+cs1oUBC2/eZQwStp9zRoLUSMV5w59Shgi +6LnV7Rfk50C9QZhK8o/FxsRQthLLyMhYf9SPPJTBw2oCqTDgDLLcgnEYLUHYCDr+ +xscTEGa9p1maWfy2T2BnLEZOjDe8od3dXFH+7f7YjAMCXxbWM4PWb9EPQeCyXPX3 +9I620FNeiIFOLw3SLV77clgFufPHTYisyyp3/4ch83wzQRJMMdGSnX8BzBY57N/d +PJblmp+hBOXXYBqJq4QPOzMVrf2dsMXfwRJf9S/XVcjx9ryVrC0eEUZJZRdMZl/6 +JFLvLFKS/8y++eI5Gem4 +=ztk/ +-----END PGP SIGNATURE----- diff --git a/facter.spec b/facter.spec index e69c8a5..d5aa138 100644 --- a/facter.spec +++ b/facter.spec @@ -15,8 +15,8 @@ %global debug_package %{nil} Name: facter -Version: 1.6.5 -Release: 5%{?dist} +Version: 1.6.6 +Release: 1%{?dist} Summary: Command and ruby library for gathering system information Group: System Environment/Base @@ -24,10 +24,8 @@ License: ASL 2.0 URL: http://www.puppetlabs.com/puppet/related-projects/%{name}/ Source0: http://downloads.puppetlabs.com/%{name}/%{name}-%{version}.tar.gz Source1: http://downloads.puppetlabs.com/%{name}/%{name}-%{version}.tar.gz.asc -# https://bugzilla.redhat.com/790849 -Patch0: 0001-Make-ec2-facts-work-on-CentOS-again.patch -# https://github.com/puppetlabs/facter/pull/171 -Patch1: 0001-Preserve-timestamps-when-installing-files.patch +# https://github.com/puppetlabs/facter/commit/6ec2863 +Patch0: 0001-12669-Preserve-timestamps-when-installing-files.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ruby >= 1.8.1 @@ -64,7 +62,6 @@ key off the values returned by facts. %prep %setup -q %patch0 -p1 -%patch1 -p1 %build @@ -94,6 +91,9 @@ rspec spec %changelog +* Mon Mar 05 2012 Todd Zullinger - 1.6.6-1 +- Update to 1.6.6 + * Sun Feb 19 2012 Todd Zullinger - 1.6.5-5 - Disable useless debuginfo generation (#795106, thanks to Ville Skyttä) - Update summary and description diff --git a/sources b/sources index 29d7416..fa7d556 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cc3c69d73e86a14832772d2add8b57f9 facter-1.6.5.tar.gz +47670a59301d6c3e31a1c68747b139c8 facter-1.6.6.tar.gz