Backport git patches to support 2.5
This commit is contained in:
parent
7e1a791315
commit
fa331df4dd
34
openwsman-2.6.2-0006-Find-Ruby-2.5.patch
Normal file
34
openwsman-2.6.2-0006-Find-Ruby-2.5.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From 86f06c1e30b2fddeac6be8f8508ac225ebd0d4e1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de>
|
||||
Date: Fri, 24 Nov 2017 16:39:22 +0100
|
||||
Subject: [PATCH 06/20] Find Ruby 2.5
|
||||
|
||||
---
|
||||
cmake/modules/FindRuby.cmake | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/cmake/modules/FindRuby.cmake b/cmake/modules/FindRuby.cmake
|
||||
index 1671f029..bc6d48d4 100644
|
||||
--- a/cmake/modules/FindRuby.cmake
|
||||
+++ b/cmake/modules/FindRuby.cmake
|
||||
@@ -21,7 +21,7 @@ endif (RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
|
||||
# RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"libdir"@:>@)'`
|
||||
# RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'`
|
||||
|
||||
-FIND_PROGRAM(RUBY_EXECUTABLE NAMES ruby ruby22 ruby21 ruby20 ruby19 ruby1.8 ruby18 )
|
||||
+FIND_PROGRAM(RUBY_EXECUTABLE NAMES ruby.ruby2.5 ruby.ruby2.4 ruby.ruby2.3 ruby.ruby2.2 ruby ruby22 ruby21 ruby20 ruby19 ruby1.8 ruby18 )
|
||||
|
||||
EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['MAJOR']"
|
||||
OUTPUT_VARIABLE RUBY_VERSION_MAJOR)
|
||||
@@ -91,7 +91,7 @@ FIND_PATH(RUBY_INCLUDE_PATH
|
||||
/usr/lib/ruby/1.8/i586-linux-gnu/ )
|
||||
|
||||
FIND_LIBRARY(RUBY_LIBRARY
|
||||
- NAMES ruby ruby1.9 ruby1.8
|
||||
+ NAMES ruby2.5 ruby2.4 ruby2.3 ruby2.2 ruby2.1 ruby ruby1.9 ruby1.8
|
||||
PATHS
|
||||
${RUBY_POSSIBLE_LIB_PATH}
|
||||
${RUBY_RUBY_LIB_PATH}
|
||||
--
|
||||
2.15.1
|
||||
|
@ -0,0 +1,58 @@
|
||||
From 0082a57f47aafb4ba3def4754602bdc0750ead6d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de>
|
||||
Date: Fri, 24 Nov 2017 16:40:07 +0100
|
||||
Subject: [PATCH 08/20] Make ruby_parser_swig Ruby2.5-aware
|
||||
|
||||
---
|
||||
bindings/ruby/rdoc_parser_swig.rb | 24 ++++++++++++++++++------
|
||||
1 file changed, 18 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/bindings/ruby/rdoc_parser_swig.rb b/bindings/ruby/rdoc_parser_swig.rb
|
||||
index 6f72f791..0c5bd415 100644
|
||||
--- a/bindings/ruby/rdoc_parser_swig.rb
|
||||
+++ b/bindings/ruby/rdoc_parser_swig.rb
|
||||
@@ -364,11 +364,17 @@ class RDoc::Parser::SWIG < RDoc::Parser
|
||||
|
||||
#meth_obj.params = params
|
||||
meth_obj.start_collecting_tokens
|
||||
- tk = RDoc::RubyToken::Token.new nil, 1, 1
|
||||
- tk.set_text body
|
||||
+ begin
|
||||
+ RDoc::const_get "RubyToken"
|
||||
+ tk = RDoc::RubyToken::Token.new nil, 1, 1
|
||||
+ tk.set_text body
|
||||
+ meth_obj.offset = offset
|
||||
+ rescue NameError
|
||||
+ # rdoc 2.5
|
||||
+ tk = { :line_no => 1, :char_no => 1, :text => body }
|
||||
+ end
|
||||
meth_obj.add_token tk
|
||||
meth_obj.comment = strip_stars comment
|
||||
- meth_obj.offset = offset
|
||||
meth_obj.line = file_content[0, offset].count("\n") + 1
|
||||
|
||||
body
|
||||
@@ -381,11 +387,17 @@ class RDoc::Parser::SWIG < RDoc::Parser
|
||||
find_modifiers comment, meth_obj
|
||||
|
||||
meth_obj.start_collecting_tokens
|
||||
- tk = RDoc::RubyToken::Token.new nil, 1, 1
|
||||
- tk.set_text body
|
||||
+ begin
|
||||
+ RDoc::const_get "RubyToken"
|
||||
+ tk = RDoc::RubyToken::Token.new nil, 1, 1
|
||||
+ tk.set_text body
|
||||
+ meth_obj.offset = offset
|
||||
+ rescue NameError
|
||||
+ # rdoc 2.5
|
||||
+ tk = { :line_no => 1, :char_no => 1, :text => body }
|
||||
+ end
|
||||
meth_obj.add_token tk
|
||||
meth_obj.comment = strip_stars(comment) + meth_obj.comment.to_s
|
||||
- meth_obj.offset = offset
|
||||
meth_obj.line = file_content[0, offset].count("\n") + 1
|
||||
|
||||
body
|
||||
--
|
||||
2.15.1
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
Name: openwsman
|
||||
Version: 2.6.3
|
||||
Release: 9.git%{shortcommit}%{?dist}
|
||||
Release: 10.git%{shortcommit}%{?dist}
|
||||
Summary: Open source Implementation of WS-Management
|
||||
|
||||
License: BSD
|
||||
@ -27,6 +27,9 @@ Patch1: openwsman-2.4.0-pamsetup.patch
|
||||
Patch2: openwsman-2.4.12-ruby-binding-build.patch
|
||||
Patch3: openwsman-2.6.2-python3.patch
|
||||
Patch4: openwsman-2.6.2-openssl-1.1-fix.patch
|
||||
# Patch5, 6 are github backport fixes for ruby 2.5
|
||||
Patch5: openwsman-2.6.2-0006-Find-Ruby-2.5.patch
|
||||
Patch6: openwsman-2.6.2-0008-Make-ruby_parser_swig-Ruby2.5-aware.patch
|
||||
BuildRequires: swig
|
||||
BuildRequires: libcurl-devel libxml2-devel pam-devel sblim-sfcc-devel
|
||||
BuildRequires: python3 python3-devel python2 python2-devel ruby ruby-devel rubygems-devel perl-interpreter
|
||||
@ -150,13 +153,8 @@ popd
|
||||
%patch2 -p1 -b .ruby-binding-build
|
||||
%patch3 -p1 -b .python3
|
||||
%patch4 -p1 -b .openssl-1.1-fix
|
||||
|
||||
# support ruby 2.2
|
||||
pushd bindings/ruby
|
||||
cat rdoc2.1 | sed -e 's|rdoc2_1|rdoc2_2|' > rdoc2.2
|
||||
chmod 0755 rdoc2.2
|
||||
ln -sf %{_bindir}/rdoc rdoc2_2.rb
|
||||
popd
|
||||
%patch5 -p1 -b .ruby25_1
|
||||
%patch6 -p1 -b .ruby25_2
|
||||
|
||||
%build
|
||||
# Removing executable permissions on .c and .h files to fix rpmlint warnings.
|
||||
@ -184,9 +182,9 @@ make
|
||||
|
||||
# Make the freshly build openwsman libraries available to build the gem's
|
||||
# binary extension.
|
||||
export LIBRARY_PATH=/builddir/build/BUILD/%{name}-%{commit}/build/src/lib
|
||||
export CPATH=/builddir/build/BUILD/%{name}-%{commit}/include/
|
||||
export LD_LIBRARY_PATH=/builddir/build/BUILD/%{name}-%{commit}/build/src/lib/
|
||||
export LIBRARY_PATH=%{_builddir}/%{name}-%{commit}/build/src/lib
|
||||
export CPATH=%{_builddir}/%{name}-%{commit}/include/
|
||||
export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{commit}/build/src/lib/
|
||||
|
||||
%gem_install -n ./bindings/ruby/%{name}-%{version}.gem
|
||||
|
||||
@ -319,6 +317,9 @@ rm -f /var/log/wsmand.log
|
||||
%{_bindir}/winrs
|
||||
|
||||
%changelog
|
||||
* Sat Jan 6 2018 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.6.3-10.git4391e5c
|
||||
- Backport git patches to support 2.5
|
||||
|
||||
* Wed Oct 04 2017 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.6.3-9.git
|
||||
- Remove unnecessary net-tools requirement
|
||||
Resolves: #1496142
|
||||
|
Loading…
Reference in New Issue
Block a user