[rubygem-puppet-lint/el6] Patch for puppet-lint returning 0 even when errors are found. Update spec to use more sensible f17 g

Russell Harrison rharrison at fedoraproject.org
Mon Oct 1 01:46:54 UTC 2012


commit d1948e9e4c913b463eb8a439b3d4c66b1876493d
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. Update spec to use more sensible f17 guidelines.
    https://github.com/rodjek/puppet-lint/pull/141
    
    Conflicts:
    	rubygem-puppet-lint.spec

 ...-puppet-lint.Pass-exit-value-to-the-shell.patch |   19 ++++++++++
 rubygem-puppet-lint.spec                           |   39 ++++++++++++++------
 2 files changed, 47 insertions(+), 11 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 40ef6f6..de0fb42 100644
--- a/rubygem-puppet-lint.spec
+++ b/rubygem-puppet-lint.spec
@@ -7,19 +7,23 @@
 
 Name: rubygem-%{gemname}
 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/%{gemname}-%{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: ruby
 Requires: puppet
 BuildRequires: ruby(abi) = %{rubyabi}
 BuildRequires: ruby(rubygems) 
-BuildRequires: ruby 
+BuildRequires: ruby
+BuildRequires: ruby-rdoc
 BuildArch: noarch
 Provides: rubygem(%{gemname}) = %{version}
 
@@ -27,7 +31,6 @@ Provides: rubygem(%{gemname}) = %{version}
 Checks your Puppet manifests against the Puppetlabs
 style guide and alerts you to any discrepancies.
 
-
 %package doc
 Summary: Documentation for %{name}
 Group: Documentation
@@ -37,23 +40,34 @@ BuildArch: noarch
 %description doc
 Documentation for %{name}
 
-
 %prep
-%setup -q -c -T
-mkdir -p .%{gemdir}
-gem install --local --install-dir .%{gemdir} \
-            --bindir .%{_bindir} \
-            --force %{SOURCE0}
+gem unpack %{SOURCE0}
+
+%setup -q -D -T -n  %{gemname}-%{version}
+%patch0 -p1
+
+gem spec %{SOURCE0} -l --ruby > %{gemname}.gemspec
 
 %build
+mkdir -p .%{gemdir}
+
+# Create the gem as gem install only works on a gem file
+gem build %{gemname}.gemspec
+
+
+# gem install installs into a directory.  We set that to be a local
+# directory so that we can move it into the buildroot in install
+gem install --local --install-dir ./%{gemdir} \
+            --bindir ./%{_bindir} \
+            --force --rdoc %{gemname}-%{version}.gem
 
 %install
 mkdir -p %{buildroot}%{gemdir}
-cp -ap .%{gemdir}/* \
+cp -ap ./%{gemdir}/* \
         %{buildroot}%{gemdir}/
 
 mkdir -p %{buildroot}%{_bindir}
-cp -ap .%{_bindir}/* \
+cp -ap ./%{_bindir}/* \
         %{buildroot}%{_bindir}/
 
 find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x
@@ -81,5 +95,8 @@ rm -f %{buildroot}/%{geminstdir}/.travis.yml
 %doc %{gemdir}/doc/%{gemname}-%{version}
 
 %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 07 2012 Russell Harrison <rharrison at fedoraproject.org> - 0.2.1-1
 - Initial package


More information about the scm-commits mailing list