[rubygem-puppet-lint] Patch for puppet-lint returning 0 even when errors are found. Fix gem2rpm spec to use gemfile from %

Russell Harrison rharrison at fedoraproject.org
Mon Oct 1 01:39:11 UTC 2012


commit f4789650b9f8fe7d0081221b33e2e50b423665d6
Author: Russell Harrison <rharrison at fedoraproject.org>
Date:   Wed Sep 12 10:24:25 2012 -0400

    Patch for puppet-lint returning 0 even when errors are found. Fix gem2rpm spec to use gemfile from %build for gem install
    https://github.com/rodjek/puppet-lint/pull/141

 ...-puppet-lint.Pass-exit-value-to-the-shell.patch |   19 +++++++++++++++++++
 rubygem-puppet-lint.spec                           |   13 +++++++++----
 2 files changed, 28 insertions(+), 4 deletions(-)
---
diff --git a/rubygem-puppet-lint.Pass-exit-value-to-the-shell.patch b/rubygem-puppet-lint.Pass-exit-value-to-the-shell.patch
new file mode 100644
index 0000000..13def0e
--- /dev/null
+++ b/rubygem-puppet-lint.Pass-exit-value-to-the-shell.patch
@@ -0,0 +1,19 @@
+From 9dadebfbb13a2626f9dc457b586ed0ca380f0107 Mon Sep 17 00:00:00 2001
+From: Jan Vansteenkiste <jan at vstone.eu>
+Date: Thu, 30 Aug 2012 10:56:50 +0200
+Subject: [PATCH 1/7] Pass exit value to the shell
+
+
+diff --git a/bin/puppet-lint b/bin/puppet-lint
+index 509d03b..3e83f38 100755
+--- a/bin/puppet-lint
++++ b/bin/puppet-lint
+@@ -4,4 +4,4 @@ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
+ 
+ require 'puppet-lint'
+ 
+-PuppetLint::Bin.new(ARGV).run
++exit PuppetLint::Bin.new(ARGV).run
+-- 
+1.7.11.4
+
diff --git a/rubygem-puppet-lint.spec b/rubygem-puppet-lint.spec
index 018c964..6a0d68f 100644
--- a/rubygem-puppet-lint.spec
+++ b/rubygem-puppet-lint.spec
@@ -4,12 +4,15 @@
 
 Name: rubygem-%{gem_name}
 Version: 0.2.1
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: Ensure your Puppet manifests conform with the Puppetlabs style guide
 Group: Development/Languages
 License: MIT
 URL: http://puppet-lint.com/
 Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
+# Patch already accepted upstream and will be in the next release
+# https://github.com/rodjek/puppet-lint/pull/141
+Patch0: rubygem-puppet-lint.Pass-exit-value-to-the-shell.patch
 Requires: ruby(abi) = %{rubyabi}
 Requires: ruby(rubygems) 
 Requires: puppet
@@ -25,7 +28,6 @@ Provides: rubygem(%{gem_name}) = %{version}
 Checks your Puppet manifests against the Puppetlabs
 style guide and alerts you to any discrepancies.
 
-
 %package doc
 Summary: Documentation for %{name}
 Group: Documentation
@@ -39,6 +41,7 @@ Documentation for %{name}
 gem unpack %{SOURCE0}
 
 %setup -q -D -T -n  %{gem_name}-%{version}
+%patch0 -p1
 
 gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
 
@@ -53,7 +56,7 @@ gem build %{gem_name}.gemspec
 # directory so that we can move it into the buildroot in install
 gem install --local --install-dir ./%{gem_dir} \
             --bindir ./%{_bindir} \
-            --force --rdoc %{SOURCE0}
+            --force --rdoc %{gem_name}-%{version}.gem
 
 %install
 mkdir -p %{buildroot}%{gem_dir}
@@ -94,10 +97,12 @@ rspec -Ilib spec
 %doc %{gem_docdir}
 
 %changelog
+* Wed Sep 12 2012 Russell Harrison <rharrison at fedoraproject.org> 0.2.1-2
+- Patch to pass exit value to the shell https://github.com/rodjek/puppet-lint/pull/141
+
 * Fri Sep  7 2012 Russell Harrison <rharrison at fedoraproject.org> - 0.2.1-1
 - New upstream version
 - Updated URL for new upstream website
 
 * Sun Aug 26 2012 Russell Harrison <rharrison at fedoraproject.org> - 0.2.0-1
 - Initial package
-


More information about the scm-commits mailing list