4 Commits

4 changed files with 98 additions and 1 deletions

View File

@@ -0,0 +1,55 @@
From 8d5d9e1115d0bbfd3a236cc375373ca25ea396d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@gmail.com>
Date: Fri, 17 Oct 2025 16:59:22 +0200
Subject: [PATCH] update to handle rdoc 3.4
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
---
bindings/ruby/rdoc_parser_swig.rb | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/bindings/ruby/rdoc_parser_swig.rb b/bindings/ruby/rdoc_parser_swig.rb
index 0c5bd415..fb6f1645 100644
--- a/bindings/ruby/rdoc_parser_swig.rb
+++ b/bindings/ruby/rdoc_parser_swig.rb
@@ -107,9 +107,10 @@ class RDoc::Parser::SWIG < RDoc::Parser
##
# Prepare to parse a SWIG file
+ # rdoc 3.4: stats parameter is optional
- def initialize(top_level, file_name, content, options, stats)
- super
+ def initialize(top_level, file_name, content, options, stats = nil)
+ super top_level, file_name, content, options
@known_classes = RDoc::KNOWN_CLASSES.dup
@content = handle_tab_width handle_ifdefs_in(@content)
@@ -365,10 +366,17 @@ class RDoc::Parser::SWIG < RDoc::Parser
#meth_obj.params = params
meth_obj.start_collecting_tokens
begin
- RDoc::const_get "RubyToken"
- tk = RDoc::RubyToken::Token.new nil, 1, 1
- tk.set_text body
- meth_obj.offset = offset
+ tk = nil
+ if RUBY_VERSION[0,3] == "3.4"
+ RDoc::Parser::RipperStateLex::const_get "Token"
+ tk = RDoc::Parser::RipperStateLex::Token.new nil, 1, 1
+ tk.text = body
+ else
+ RDoc::const_get "RubyToken"
+ tk = RDoc::RubyToken::Token.new nil, 1, 1
+ tk.set_text body
+ meth_obj.offset = offset
+ end
rescue NameError
# rdoc 2.5
tk = { :line_no => 1, :char_no => 1, :text => body }
--
2.51.0

24
openwsman-gcc15.patch Normal file
View File

@@ -0,0 +1,24 @@
From a279af62e16eb3357a42215aa483c92ae8c63aed Mon Sep 17 00:00:00 2001
From: Vitezslav Crhonek <vcrhonek@redhat.com>
Date: Mon, 3 Feb 2025 11:30:15 +0100
Subject: [PATCH] Fix to build with GCC 15.
Signed-off-by: Vitezslav Crhonek <vcrhonek@redhat.com>
---
src/plugins/swig/src/target_ruby.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/swig/src/target_ruby.c b/src/plugins/swig/src/target_ruby.c
index bbce3981..e17bb443 100644
--- a/src/plugins/swig/src/target_ruby.c
+++ b/src/plugins/swig/src/target_ruby.c
@@ -49,7 +49,7 @@
*/
static VALUE
-load_module()
+load_module(VALUE)
{
ruby_script(PLUGIN_FILE);
return rb_require(PLUGIN_FILE);

View File

@@ -1,3 +1,16 @@
-------------------------------------------------------------------
Fri Oct 17 15:00:44 UTC 2025 - Klaus Kämpf <kkaempf@suse.de>
- fix rdoc 3.4 compatibility
0001-update-to-handle-rdoc-3.4.patch
-------------------------------------------------------------------
Thu Jun 26 08:09:02 UTC 2025 - pgajdos@suse.com
- added patches
https://github.com/Openwsman/openwsman/commit/e619555c3484264a188396bc8b9c77c39ef47bb2
+ openwsman-gcc15.patch
-------------------------------------------------------------------
Wed Jan 22 14:54:01 UTC 2025 - Klaus Kämpf <kkaempf@suse.de>

View File

@@ -1,7 +1,7 @@
#
# spec file for package openwsman
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -159,6 +159,9 @@ Source1: %{name}.rpmlintrc
Source21: %{name}.pam.rh
Source22: %{name}.pam
Patch1: openwsman-redhat-initscript.patch
# https://github.com/Openwsman/openwsman/commit/e619555c3484264a188396bc8b9c77c39ef47bb2
Patch2: openwsman-gcc15.patch
Patch3: 0001-update-to-handle-rdoc-3.4.patch
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
%define pamfile %{S:21}
%else
@@ -392,6 +395,8 @@ It can be used to send shell commands to remote Windows hosts.
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
%patch -P 1 -p1
%endif
%patch -P 2 -p1
%patch -P 3 -p1
%build
rm -rf build