[packages/gem2rpm] fix for os-release containing quotes
glen
glen at pld-linux.org
Tue Aug 25 10:11:52 CEST 2015
commit e2fce429a8a10539a3ddd797239da1fb93b48063
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Aug 25 11:11:33 2015 +0300
fix for os-release containing quotes
https://github.com/fedora-ruby/gem2rpm/pull/48
gem2rpm.spec | 3 +++
os-release-quotes.patch | 10 ++++++++++
2 files changed, 13 insertions(+)
---
diff --git a/gem2rpm.spec b/gem2rpm.spec
index 710b1b3..77da151 100644
--- a/gem2rpm.spec
+++ b/gem2rpm.spec
@@ -12,6 +12,7 @@ Source0: https://github.com/fedora-ruby/gem2rpm/archive/v%{version}/%{name}-%{ve
# Source0-md5: b1b60ade93fd61c22c17cfe4b95c3609
Source2: pld.spec.erb
Patch0: gems.patch
+Patch1: os-release-quotes.patch
Patch2: style.patch
URL: https://github.com/fedora-ruby/gem2rpm
BuildRequires: rpm-rubyprov
@@ -21,6 +22,7 @@ BuildRequires: rpmbuild(macros) >= 1.656
BuildRequires: glibc-localedb-all
%endif
%endif
+Requires: pld-release
Requires: ruby-rubygems
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -42,6 +44,7 @@ Documentation for %{name}.
%setup -q
%{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
%patch0 -p1
+%patch1 -p1
%patch2 -p1
cp -p %{SOURCE2} templates
diff --git a/os-release-quotes.patch b/os-release-quotes.patch
new file mode 100644
index 0000000..427c0bd
--- /dev/null
+++ b/os-release-quotes.patch
@@ -0,0 +1,10 @@
+--- gem2rpm-0.11.1/lib/gem2rpm/distro.rb 2015-05-06 17:43:19.000000000 +0300
++++ gem2rpm-0.11.1/lib/gem2rpm/distro.rb 2015-08-25 11:07:03.137289555 +0300
+@@ -33,5 +35,5 @@
+ begin
+- os_release.os = content[/^ID=(.*)$/, 1].to_sym
+- os_release.version = content[/^VERSION_ID=(.*)$/, 1]
++ os_release.os = content[/^ID=['"]?(.*?)['"]?$/, 1].to_sym
++ os_release.version = content[/^VERSION_ID=['"]?(.*?)['"]?$/, 1]
+ rescue
+ end
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gem2rpm.git/commitdiff/e2fce429a8a10539a3ddd797239da1fb93b48063
More information about the pld-cvs-commit
mailing list