From 22023dba550d8e1ddaec57f1433aa9992fd496b1 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Thu, 25 May 2023 23:06:29 -0400 Subject: [PATCH 01/11] improve ruby-2.5 compatibility (epel8) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An unfortunate bug in rdoc-5.0 causes a build failure on epel8. This is fixed in ruby-2.6/rdoc-6.0.2¹. Until/unless the fix is backported to RHEL-8 (which seems unlikely), we can only patch around this. Thanks, as usual, to Dan Allen for going above and beyond to patch this upstream. ¹ https://github.com/ruby/rdoc/pull/586 https://github.com/ruby/rdoc/commit/a1631aa --- ...block-in-manify-method-in-manpage-co.patch | 25 ++++++ ...t-in-chained-method-call-to-be-compa.patch | 85 +++++++++++++++++++ rubygem-asciidoctor.spec | 11 ++- 3 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 0001-use-single-line-block-in-manify-method-in-manpage-co.patch create mode 100644 0002-change-dot-layout-in-chained-method-call-to-be-compa.patch diff --git a/0001-use-single-line-block-in-manify-method-in-manpage-co.patch b/0001-use-single-line-block-in-manify-method-in-manpage-co.patch new file mode 100644 index 0000000..2db9cdb --- /dev/null +++ b/0001-use-single-line-block-in-manify-method-in-manpage-co.patch @@ -0,0 +1,25 @@ +From cc9a8d3cd12f2c15e43bd263b8b8a9b32d097831 Mon Sep 17 00:00:00 2001 +From: Dan Allen +Date: Thu, 25 May 2023 18:39:56 -0600 +Subject: [PATCH] use single-line block in manify method in manpage converter + to make it easier to patch + +--- + lib/asciidoctor/converter/manpage.rb | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/lib/asciidoctor/converter/manpage.rb b/lib/asciidoctor/converter/manpage.rb +index bcf2b784..a7aba996 100644 +--- a/lib/asciidoctor/converter/manpage.rb ++++ b/lib/asciidoctor/converter/manpage.rb +@@ -716,9 +716,7 @@ def manify str, opts = {} + .gsub(LiteralBackslashRx) { $1 ? $& : '\\(rs' } # literal backslash (not a troff escape sequence) + .gsub(EllipsisCharRefRx, '...') # horizontal ellipsis + .gsub(LeadingPeriodRx, '\\\&.') # leading . is used in troff for macro call or other formatting; replace with \&. +- .gsub(EscapedMacroRx) do # drop orphaned \c escape lines, unescape troff macro, quote adjacent character, isolate macro line +- (rest = $3.lstrip).empty? ? %(.#{$1}"#{$2}") : %(.#{$1}"#{$2.rstrip}"#{LF}#{rest}) +- end ++ .gsub(EscapedMacroRx) { (rest = $3.lstrip).empty? ? %(.#{$1}"#{$2}") : %(.#{$1}"#{$2.rstrip}"#{LF}#{rest}) } # drop orphaned \c escape lines, unescape troff macro, quote adjacent character, isolate macro line + .gsub('-', '\-') + .gsub('<', '<') + .gsub('>', '>') diff --git a/0002-change-dot-layout-in-chained-method-call-to-be-compa.patch b/0002-change-dot-layout-in-chained-method-call-to-be-compa.patch new file mode 100644 index 0000000..351d5cc --- /dev/null +++ b/0002-change-dot-layout-in-chained-method-call-to-be-compa.patch @@ -0,0 +1,85 @@ +From b7c03964cfc96af9ced5db3c1a6c7a7663de5cb2 Mon Sep 17 00:00:00 2001 +From: Dan Allen +Date: Fri, 26 May 2023 01:44:09 -0600 +Subject: [PATCH] change dot layout in chained method call to be compatible + with rdoc generator from Ruby 2.5 + +--- + lib/asciidoctor/converter/manpage.rb | 64 ++++++++++++++-------------- + 1 file changed, 32 insertions(+), 32 deletions(-) + +diff --git a/lib/asciidoctor/converter/manpage.rb b/lib/asciidoctor/converter/manpage.rb +index a7aba996..be52e9be 100644 +--- a/lib/asciidoctor/converter/manpage.rb ++++ b/lib/asciidoctor/converter/manpage.rb +@@ -712,38 +712,38 @@ def manify str, opts = {} + else + str = str.tr_s WHITESPACE, ' ' + end +- str = str +- .gsub(LiteralBackslashRx) { $1 ? $& : '\\(rs' } # literal backslash (not a troff escape sequence) +- .gsub(EllipsisCharRefRx, '...') # horizontal ellipsis +- .gsub(LeadingPeriodRx, '\\\&.') # leading . is used in troff for macro call or other formatting; replace with \&. +- .gsub(EscapedMacroRx) { (rest = $3.lstrip).empty? ? %(.#{$1}"#{$2}") : %(.#{$1}"#{$2.rstrip}"#{LF}#{rest}) } # drop orphaned \c escape lines, unescape troff macro, quote adjacent character, isolate macro line +- .gsub('-', '\-') +- .gsub('<', '<') +- .gsub('>', '>') +- .gsub('+', '+') # plus sign; alternately could use \c(pl +- .gsub(' ', '\~') # non-breaking space +- .gsub('©', '\(co') # copyright sign +- .gsub('®', '\(rg') # registered sign +- .gsub('™', '\(tm') # trademark sign +- .gsub('°', '\(de') # degree sign +- .gsub(' ', ' ') # thin space +- .gsub('–', '\(en') # en dash +- .gsub(EmDashCharRefRx, '\(em') # em dash +- .gsub('‘', '\(oq') # left single quotation mark +- .gsub('’', '\(cq') # right single quotation mark +- .gsub('“', '\(lq') # left double quotation mark +- .gsub('”', '\(rq') # right double quotation mark +- .gsub('←', '\(<-') # leftwards arrow +- .gsub('→', '\(->') # rightwards arrow +- .gsub('⇐', '\(lA') # leftwards double arrow +- .gsub('⇒', '\(rA') # rightwards double arrow +- .gsub('​', '\:') # zero width space +- .gsub('&', '&') # literal ampersand (NOTE must take place after any other replacement that includes &) +- .gsub('\'', '\*(Aq') # apostrophe / neutral single quote +- .gsub(MockMacroRx, '\1') # mock boundary +- .gsub(ESC_BS, '\\') # unescape troff backslash (NOTE update if more escapes are added) +- .gsub(ESC_FS, '.') # unescape full stop in troff commands (NOTE must take place after gsub(LeadingPeriodRx)) +- .rstrip # strip trailing space ++ str = str. ++ gsub(LiteralBackslashRx) { $1 ? $& : '\\(rs' }. # literal backslash (not a troff escape sequence) ++ gsub(EllipsisCharRefRx, '...'). # horizontal ellipsis ++ gsub(LeadingPeriodRx, '\\\&.'). # leading . is used in troff for macro call or other formatting; replace with \&. ++ gsub(EscapedMacroRx) { (rest = $3.lstrip).empty? ? %(.#{$1}"#{$2}") : %(.#{$1}"#{$2.rstrip}"#{LF}#{rest}) }. # drop orphaned \c escape lines, unescape troff macro, quote adjacent character, isolate macro line ++ gsub('-', '\-'). ++ gsub('<', '<'). ++ gsub('>', '>'). ++ gsub('+', '+'). # plus sign; alternately could use \c(pl ++ gsub(' ', '\~'). # non-breaking space ++ gsub('©', '\(co'). # copyright sign ++ gsub('®', '\(rg'). # registered sign ++ gsub('™', '\(tm'). # trademark sign ++ gsub('°', '\(de'). # degree sign ++ gsub(' ', ' '). # thin space ++ gsub('–', '\(en'). # en dash ++ gsub(EmDashCharRefRx, '\(em'). # em dash ++ gsub('‘', '\(oq'). # left single quotation mark ++ gsub('’', '\(cq'). # right single quotation mark ++ gsub('“', '\(lq'). # left double quotation mark ++ gsub('”', '\(rq'). # right double quotation mark ++ gsub('←', '\(<-'). # leftwards arrow ++ gsub('→', '\(->'). # rightwards arrow ++ gsub('⇐', '\(lA'). # leftwards double arrow ++ gsub('⇒', '\(rA'). # rightwards double arrow ++ gsub('​', '\:'). # zero width space ++ gsub('&', '&'). # literal ampersand (NOTE must take place after any other replacement that includes &) ++ gsub('\'', '\*(Aq'). # apostrophe / neutral single quote ++ gsub(MockMacroRx, '\1'). # mock boundary ++ gsub(ESC_BS, '\\'). # unescape troff backslash (NOTE update if more escapes are added) ++ gsub(ESC_FS, '.'). # unescape full stop in troff commands (NOTE must take place after gsub(LeadingPeriodRx)) ++ rstrip # strip trailing space + opts[:append_newline] ? %(#{str}#{LF}) : str + end + diff --git a/rubygem-asciidoctor.spec b/rubygem-asciidoctor.spec index 899d317..95a3ef1 100644 --- a/rubygem-asciidoctor.spec +++ b/rubygem-asciidoctor.spec @@ -7,10 +7,16 @@ Summary: A fast, open source AsciiDoc implementation in Ruby Name: rubygem-%{gem_name} Version: 2.0.20 -Release: 1%{?dist} +Release: 2%{?dist} License: MIT URL: https://asciidoctor.org Source0: https://github.com/asciidoctor/asciidoctor/archive/%{gittag}/%{gem_name}-%{version}%{pre}.tar.gz +# improve ruby-2.5 compatibility +# https://github.com/asciidoctor/asciidoctor/issues/4462 +# https://github.com/asciidoctor/asciidoctor/commit/cc9a8d3c +Patch0: 0001-use-single-line-block-in-manify-method-in-manpage-co.patch +# https://github.com/asciidoctor/asciidoctor/commit/b7c03964 +Patch1: 0002-change-dot-layout-in-chained-method-call-to-be-compa.patch %if 0%{?el7} Requires: ruby(release) BuildRequires: ruby(release) @@ -121,6 +127,9 @@ cp -a .%{gem_instdir}/man/*.1 \ %doc %{gem_docdir} %changelog +* Thu May 25 2023 Todd Zullinger - 2.0.20-2 +- improve ruby-2.5 compatibility (epel8) + * Thu May 18 2023 Todd Zullinger - 2.0.20-1 - update to asciidoctor 2.0.20 (rhbz#2208089) From 91ff5bc8e010666d55ac5e3e140c1ca9eba11d08 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jul 2023 17:20:40 +0000 Subject: [PATCH 02/11] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rubygem-asciidoctor.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-asciidoctor.spec b/rubygem-asciidoctor.spec index 95a3ef1..5f43a8b 100644 --- a/rubygem-asciidoctor.spec +++ b/rubygem-asciidoctor.spec @@ -7,7 +7,7 @@ Summary: A fast, open source AsciiDoc implementation in Ruby Name: rubygem-%{gem_name} Version: 2.0.20 -Release: 2%{?dist} +Release: 3%{?dist} License: MIT URL: https://asciidoctor.org Source0: https://github.com/asciidoctor/asciidoctor/archive/%{gittag}/%{gem_name}-%{version}%{pre}.tar.gz @@ -127,6 +127,9 @@ cp -a .%{gem_instdir}/man/*.1 \ %doc %{gem_docdir} %changelog +* Fri Jul 21 2023 Fedora Release Engineering - 2.0.20-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Thu May 25 2023 Todd Zullinger - 2.0.20-2 - improve ruby-2.5 compatibility (epel8) From 4e8fb62bfb150fffea44f03ebc022e27f7e72448 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 29 Sep 2023 15:23:35 +0900 Subject: [PATCH 03/11] Apply the upstream PR to support ruby 3.3 Logger --- 0003-support-ruby33-Logger.patch | 39 ++++++++++++++++++++++++++++++++ rubygem-asciidoctor.spec | 7 +++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 0003-support-ruby33-Logger.patch diff --git a/0003-support-ruby33-Logger.patch b/0003-support-ruby33-Logger.patch new file mode 100644 index 0000000..eadf945 --- /dev/null +++ b/0003-support-ruby33-Logger.patch @@ -0,0 +1,39 @@ +From 4c93df1eeff84463c6fc299b62b78c20c3163a09 Mon Sep 17 00:00:00 2001 +From: Mamoru TASAKA +Date: Fri, 29 Sep 2023 15:00:12 +0900 +Subject: [PATCH] Support ruby3.3 Logger by properly initialize super class + +Upcoming ruby3.3 will have enhanced Logger class: +https://github.com/ruby/ruby/commit/194520f80e1cdb71faa055d731450855a1ddb8d1 +which initializes newly added instance variables. +Without initializing such variables (in super class), now using +subclass of Logger will cause exception. + +To avoid this, first call super, then execute additional subclass +initialization. + +Closes #4493 . +--- + lib/asciidoctor/logging.rb | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/lib/asciidoctor/logging.rb b/lib/asciidoctor/logging.rb +index 7664c7e75d..1f846c4fba 100644 +--- a/lib/asciidoctor/logging.rb ++++ b/lib/asciidoctor/logging.rb +@@ -42,6 +42,7 @@ class MemoryLogger < ::Logger + attr_reader :messages + + def initialize ++ super nil + self.level = WARN + @messages = [] + end +@@ -69,6 +70,7 @@ class NullLogger < ::Logger + attr_reader :max_severity + + def initialize ++ super nil + self.level = WARN + end + diff --git a/rubygem-asciidoctor.spec b/rubygem-asciidoctor.spec index 5f43a8b..e596361 100644 --- a/rubygem-asciidoctor.spec +++ b/rubygem-asciidoctor.spec @@ -7,7 +7,7 @@ Summary: A fast, open source AsciiDoc implementation in Ruby Name: rubygem-%{gem_name} Version: 2.0.20 -Release: 3%{?dist} +Release: 4%{?dist} License: MIT URL: https://asciidoctor.org Source0: https://github.com/asciidoctor/asciidoctor/archive/%{gittag}/%{gem_name}-%{version}%{pre}.tar.gz @@ -17,6 +17,8 @@ Source0: https://github.com/asciidoctor/asciidoctor/archive/%{gittag}/%{gem_name Patch0: 0001-use-single-line-block-in-manify-method-in-manpage-co.patch # https://github.com/asciidoctor/asciidoctor/commit/b7c03964 Patch1: 0002-change-dot-layout-in-chained-method-call-to-be-compa.patch +# https://github.com/asciidoctor/asciidoctor/pull/4494 +Patch2: 0003-support-ruby33-Logger.patch %if 0%{?el7} Requires: ruby(release) BuildRequires: ruby(release) @@ -127,6 +129,9 @@ cp -a .%{gem_instdir}/man/*.1 \ %doc %{gem_docdir} %changelog +* Fri Sep 29 2023 Mamoru TASAKA - 2.0.20-4 +- Apply the upstream PR to support ruby 3.3 Logger + * Fri Jul 21 2023 Fedora Release Engineering - 2.0.20-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 334f9c42aae4061486805795ffd7a93b1a422960 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 12:28:57 +0000 Subject: [PATCH 04/11] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- rubygem-asciidoctor.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-asciidoctor.spec b/rubygem-asciidoctor.spec index e596361..c2ccaf6 100644 --- a/rubygem-asciidoctor.spec +++ b/rubygem-asciidoctor.spec @@ -7,7 +7,7 @@ Summary: A fast, open source AsciiDoc implementation in Ruby Name: rubygem-%{gem_name} Version: 2.0.20 -Release: 4%{?dist} +Release: 5%{?dist} License: MIT URL: https://asciidoctor.org Source0: https://github.com/asciidoctor/asciidoctor/archive/%{gittag}/%{gem_name}-%{version}%{pre}.tar.gz @@ -129,6 +129,9 @@ cp -a .%{gem_instdir}/man/*.1 \ %doc %{gem_docdir} %changelog +* Mon Jan 22 2024 Fedora Release Engineering - 2.0.20-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Sep 29 2023 Mamoru TASAKA - 2.0.20-4 - Apply the upstream PR to support ruby 3.3 Logger From 7300f0454da98da5e5cb28d7431c88c8ecb8d96a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jan 2024 16:34:50 +0000 Subject: [PATCH 05/11] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- rubygem-asciidoctor.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-asciidoctor.spec b/rubygem-asciidoctor.spec index c2ccaf6..291b5ea 100644 --- a/rubygem-asciidoctor.spec +++ b/rubygem-asciidoctor.spec @@ -7,7 +7,7 @@ Summary: A fast, open source AsciiDoc implementation in Ruby Name: rubygem-%{gem_name} Version: 2.0.20 -Release: 5%{?dist} +Release: 6%{?dist} License: MIT URL: https://asciidoctor.org Source0: https://github.com/asciidoctor/asciidoctor/archive/%{gittag}/%{gem_name}-%{version}%{pre}.tar.gz @@ -129,6 +129,9 @@ cp -a .%{gem_instdir}/man/*.1 \ %doc %{gem_docdir} %changelog +* Fri Jan 26 2024 Fedora Release Engineering - 2.0.20-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Jan 22 2024 Fedora Release Engineering - 2.0.20-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 468fa4fa10524daa3b282c3c03af325c39c925c7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 19:03:32 +0000 Subject: [PATCH 06/11] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- rubygem-asciidoctor.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-asciidoctor.spec b/rubygem-asciidoctor.spec index 291b5ea..80db961 100644 --- a/rubygem-asciidoctor.spec +++ b/rubygem-asciidoctor.spec @@ -7,7 +7,7 @@ Summary: A fast, open source AsciiDoc implementation in Ruby Name: rubygem-%{gem_name} Version: 2.0.20 -Release: 6%{?dist} +Release: 7%{?dist} License: MIT URL: https://asciidoctor.org Source0: https://github.com/asciidoctor/asciidoctor/archive/%{gittag}/%{gem_name}-%{version}%{pre}.tar.gz @@ -129,6 +129,9 @@ cp -a .%{gem_instdir}/man/*.1 \ %doc %{gem_docdir} %changelog +* Fri Jul 19 2024 Fedora Release Engineering - 2.0.20-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jan 26 2024 Fedora Release Engineering - 2.0.20-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 1b5b583b1ab017dd88405199c07da24a9263e562 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Thu, 14 Nov 2024 16:33:39 +0900 Subject: [PATCH 07/11] Backport upstream PR to remove base64 dependency Backport upstream fix for ruby34 formatting change --- 0004-remove-base64-dependency.patch | 63 +++++++++++++++++++++++++++++ 0005-normalize-inspect-output.patch | 42 +++++++++++++++++++ rubygem-asciidoctor.spec | 10 ++++- 3 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 0004-remove-base64-dependency.patch create mode 100644 0005-normalize-inspect-output.patch diff --git a/0004-remove-base64-dependency.patch b/0004-remove-base64-dependency.patch new file mode 100644 index 0000000..74f1c57 --- /dev/null +++ b/0004-remove-base64-dependency.patch @@ -0,0 +1,63 @@ +From fb4d1d6295153f1722711ee0b232f980b0793b1c Mon Sep 17 00:00:00 2001 +From: Dan Allen +Date: Thu, 7 Mar 2024 16:35:09 -0700 +Subject: [PATCH] resolves #4561 remove use of base64 library to prevent + warning in Ruby >= 3.3 + +--- + CHANGELOG.adoc | 1 + + Gemfile | 1 + + asciidoctor.gemspec | 2 +- + lib/asciidoctor.rb | 1 - + lib/asciidoctor/abstract_node.rb | 12 ++++++------ + 5 files changed, 9 insertions(+), 8 deletions(-) + +diff --git a/lib/asciidoctor.rb b/lib/asciidoctor.rb +index 18b6743bfc..08a5db02c0 100644 +--- a/lib/asciidoctor.rb ++++ b/lib/asciidoctor.rb +@@ -7,7 +7,6 @@ + # this require is satisfied by the Asciidoctor.js build; it augments the Ruby environment for Asciidoctor.js + require 'asciidoctor/js' + else +- autoload :Base64, 'base64' + require 'cgi/util' + autoload :OpenURI, 'open-uri' + autoload :Pathname, 'pathname' +diff --git a/lib/asciidoctor/abstract_node.rb b/lib/asciidoctor/abstract_node.rb +index a60ab7956c..07ad0291d1 100644 +--- a/lib/asciidoctor/abstract_node.rb ++++ b/lib/asciidoctor/abstract_node.rb +@@ -355,8 +355,8 @@ def media_uri target, asset_dir_key = 'imagesdir' + # + # First, and foremost, the target image path is cleaned if the document safe mode level + # is set to at least SafeMode::SAFE (a condition which is true by default) to prevent access +- # to ancestor paths in the filesystem. The image data is then read and converted to +- # Base64. Finally, a data URI is built which can be used in an image tag. ++ # to ancestor paths in the filesystem. The image data is then read and converted to base64. ++ # Finally, a data URI is built which can be used in an image tag. + # + # target_image - A String path to the target image + # asset_dir_key - The String attribute key used to lookup the directory where +@@ -377,8 +377,8 @@ def generate_data_uri target_image, asset_dir_key = nil + end + + if ::File.readable? image_path +- # NOTE base64 is autoloaded by reference to ::Base64 +- %(data:#{mimetype};base64,#{::Base64.strict_encode64 ::File.binread image_path}) ++ # NOTE pack 'm0' is equivalent to Base64.strict_encode64 ++ %(data:#{mimetype};base64,#{[(::File.binread image_path)].pack 'm0'}) + else + logger.warn %(image to embed not found or not readable: #{image_path}) + %(data:#{mimetype};base64,) +@@ -411,8 +411,8 @@ def generate_data_uri_from_uri image_uri, cache_uri = false + + begin + mimetype, bindata = ::OpenURI.open_uri(image_uri, URI_READ_MODE) {|f| [f.content_type, f.read] } +- # NOTE base64 is autoloaded by reference to ::Base64 +- %(data:#{mimetype};base64,#{::Base64.strict_encode64 bindata}) ++ # NOTE pack 'm0' is equivalent to Base64.strict_encode64 ++ %(data:#{mimetype};base64,#{[bindata].pack 'm0'}) + rescue + logger.warn %(could not retrieve image data from URI: #{image_uri}) + image_uri diff --git a/0005-normalize-inspect-output.patch b/0005-normalize-inspect-output.patch new file mode 100644 index 0000000..ae17d99 --- /dev/null +++ b/0005-normalize-inspect-output.patch @@ -0,0 +1,42 @@ +From e5442fc2848680eada862841b0e92dc9265e1a29 Mon Sep 17 00:00:00 2001 +From: Dan Allen +Date: Thu, 31 Oct 2024 04:20:33 -0600 +Subject: [PATCH] resolves #4634 normalize output from inspect when comparing + to fixture + +--- + test/extensions_test.rb | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +diff --git a/test/extensions_test.rb b/test/extensions_test.rb +index 93c475a070..20df46cb34 100644 +--- a/test/extensions_test.rb ++++ b/test/extensions_test.rb +@@ -1468,17 +1468,17 @@ def process parent, reader, attributes + ++++ + EOS + expected = <<~'EOS'.chop +- target="", attributes={} +- target="value,key=val", attributes={1=>"value", "key"=>"val", "name"=>"value"} +- target="", attributes={"text"=>""} +- target="[text]", attributes={"text"=>"[text]"} +- target="target", attributes={} +- target="target", attributes={1=>"value", "key"=>"val", "name"=>"value"} +- target="target", attributes={"text"=>""} +- target="target", attributes={"text"=>"[text]"} +- target="target", attributes={} ++ target="",attributes={} ++ target="value,key=val",attributes={1=>"value","key"=>"val","name"=>"value"} ++ target="",attributes={"text"=>""} ++ target="[text]",attributes={"text"=>"[text]"} ++ target="target",attributes={} ++ target="target",attributes={1=>"value","key"=>"val","name"=>"value"} ++ target="target",attributes={"text"=>""} ++ target="target",attributes={"text"=>"[text]"} ++ target="target",attributes={} + EOS +- output = convert_string_to_embedded input ++ output = ((convert_string_to_embedded input).gsub ' => ', '=>').gsub ', ', ',' + assert_equal expected, output + ensure + Asciidoctor::Extensions.unregister_all diff --git a/rubygem-asciidoctor.spec b/rubygem-asciidoctor.spec index 80db961..9583175 100644 --- a/rubygem-asciidoctor.spec +++ b/rubygem-asciidoctor.spec @@ -7,7 +7,7 @@ Summary: A fast, open source AsciiDoc implementation in Ruby Name: rubygem-%{gem_name} Version: 2.0.20 -Release: 7%{?dist} +Release: 8%{?dist} License: MIT URL: https://asciidoctor.org Source0: https://github.com/asciidoctor/asciidoctor/archive/%{gittag}/%{gem_name}-%{version}%{pre}.tar.gz @@ -19,6 +19,10 @@ Patch0: 0001-use-single-line-block-in-manify-method-in-manpage-co.patch Patch1: 0002-change-dot-layout-in-chained-method-call-to-be-compa.patch # https://github.com/asciidoctor/asciidoctor/pull/4494 Patch2: 0003-support-ruby33-Logger.patch +# https://github.com/asciidoctor/asciidoctor/pull/4562/ +Patch3: 0004-remove-base64-dependency.patch +# https://github.com/asciidoctor/asciidoctor/commit/e5442fc2 +Patch4: 0005-normalize-inspect-output.patch %if 0%{?el7} Requires: ruby(release) BuildRequires: ruby(release) @@ -129,6 +133,10 @@ cp -a .%{gem_instdir}/man/*.1 \ %doc %{gem_docdir} %changelog +* Thu Nov 14 2024 Mamoru TASAKA - 2.0.20-8 +- Backport upstream PR to remove base64 dependency +- Backport upstream fix for ruby34 formatting change + * Fri Jul 19 2024 Fedora Release Engineering - 2.0.20-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From fd4e80e38fe732e4adb6cdfcbc33f37abfd57289 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 22:58:59 +0000 Subject: [PATCH 08/11] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- rubygem-asciidoctor.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-asciidoctor.spec b/rubygem-asciidoctor.spec index 9583175..4a4a67f 100644 --- a/rubygem-asciidoctor.spec +++ b/rubygem-asciidoctor.spec @@ -7,7 +7,7 @@ Summary: A fast, open source AsciiDoc implementation in Ruby Name: rubygem-%{gem_name} Version: 2.0.20 -Release: 8%{?dist} +Release: 9%{?dist} License: MIT URL: https://asciidoctor.org Source0: https://github.com/asciidoctor/asciidoctor/archive/%{gittag}/%{gem_name}-%{version}%{pre}.tar.gz @@ -133,6 +133,9 @@ cp -a .%{gem_instdir}/man/*.1 \ %doc %{gem_docdir} %changelog +* Sat Jan 18 2025 Fedora Release Engineering - 2.0.20-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Thu Nov 14 2024 Mamoru TASAKA - 2.0.20-8 - Backport upstream PR to remove base64 dependency - Backport upstream fix for ruby34 formatting change From 75de982163f9561955e1914cdf2a33a2f6e15dbf Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 12:16:36 +0000 Subject: [PATCH 09/11] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- rubygem-asciidoctor.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-asciidoctor.spec b/rubygem-asciidoctor.spec index 4a4a67f..2b49f3a 100644 --- a/rubygem-asciidoctor.spec +++ b/rubygem-asciidoctor.spec @@ -7,7 +7,7 @@ Summary: A fast, open source AsciiDoc implementation in Ruby Name: rubygem-%{gem_name} Version: 2.0.20 -Release: 9%{?dist} +Release: 10%{?dist} License: MIT URL: https://asciidoctor.org Source0: https://github.com/asciidoctor/asciidoctor/archive/%{gittag}/%{gem_name}-%{version}%{pre}.tar.gz @@ -133,6 +133,9 @@ cp -a .%{gem_instdir}/man/*.1 \ %doc %{gem_docdir} %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 2.0.20-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Sat Jan 18 2025 Fedora Release Engineering - 2.0.20-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 3d7bae2b69eec067c59ec5909177e896b2a03a32 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Wed, 5 Nov 2025 23:11:47 +0900 Subject: [PATCH 10/11] Add logger dep for ruby3_5 --- rubygem-asciidoctor.spec | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/rubygem-asciidoctor.spec b/rubygem-asciidoctor.spec index 2b49f3a..4ece2a2 100644 --- a/rubygem-asciidoctor.spec +++ b/rubygem-asciidoctor.spec @@ -7,7 +7,7 @@ Summary: A fast, open source AsciiDoc implementation in Ruby Name: rubygem-%{gem_name} Version: 2.0.20 -Release: 10%{?dist} +Release: 11%{?dist} License: MIT URL: https://asciidoctor.org Source0: https://github.com/asciidoctor/asciidoctor/archive/%{gittag}/%{gem_name}-%{version}%{pre}.tar.gz @@ -35,6 +35,7 @@ BuildRequires: rubygem(coderay) BuildRequires: rubygem(concurrent-ruby) BuildRequires: rubygem(erubi) BuildRequires: rubygem(haml) +BuildRequires: rubygem(logger) BuildRequires: rubygem(minitest) BuildRequires: rubygem(nokogiri) BuildRequires: rubygem(rouge) @@ -48,7 +49,7 @@ Provides: rubygem(%{gem_name}) = %{version} %endif %if %{?pre:1} -%global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}%{pre} +%global gem_instdir() %{gem_dir}/gems/%{gem_name}-%{version}%{pre} %global gem_cache %{gem_dir}/cache/%{gem_name}-%{version}%{pre}.gem %global gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}%{pre}.gemspec %global gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}%{pre} @@ -78,6 +79,11 @@ sed -i -e 's/#\(s\.test_files\)/\1/' %{gem_name}.gemspec # Fix shebang (avoid Requires: /usr/bin/env) sed -i -e 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' bin/%{gem_name} +# ref: https://github.com/asciidoctor/asciidoctor/issues/4684 +# the upstream plans to remove logger dep, but for now +# add logger dep explicitly for ruby3_5 +%gemspec_add_dep -g logger -s ./%{gem_name}.gemspec + %build gem build %{gem_name}.gemspec %gem_install -n %{gem_name}-%{version}%{pre}.gem @@ -133,6 +139,9 @@ cp -a .%{gem_instdir}/man/*.1 \ %doc %{gem_docdir} %changelog +* Wed Nov 05 2025 Mamoru TASAKA - 2.0.20-11 +- Add logger dep for ruby3_5 + * Fri Jul 25 2025 Fedora Release Engineering - 2.0.20-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 838fb1a9ee4eea381ee1239c1eca4b4f29594aac Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Mon, 15 Dec 2025 10:34:06 +0100 Subject: [PATCH 11/11] updated to 2.0.26 (resolves rhbz#2265214) - droped upstreamed patches --- ...block-in-manify-method-in-manpage-co.patch | 25 ------ ...t-in-chained-method-call-to-be-compa.patch | 85 ------------------- 0003-support-ruby33-Logger.patch | 39 --------- 0004-remove-base64-dependency.patch | 63 -------------- 0005-normalize-inspect-output.patch | 42 --------- rubygem-asciidoctor.spec | 20 ++--- sources | 2 +- 7 files changed, 7 insertions(+), 269 deletions(-) delete mode 100644 0001-use-single-line-block-in-manify-method-in-manpage-co.patch delete mode 100644 0002-change-dot-layout-in-chained-method-call-to-be-compa.patch delete mode 100644 0003-support-ruby33-Logger.patch delete mode 100644 0004-remove-base64-dependency.patch delete mode 100644 0005-normalize-inspect-output.patch diff --git a/0001-use-single-line-block-in-manify-method-in-manpage-co.patch b/0001-use-single-line-block-in-manify-method-in-manpage-co.patch deleted file mode 100644 index 2db9cdb..0000000 --- a/0001-use-single-line-block-in-manify-method-in-manpage-co.patch +++ /dev/null @@ -1,25 +0,0 @@ -From cc9a8d3cd12f2c15e43bd263b8b8a9b32d097831 Mon Sep 17 00:00:00 2001 -From: Dan Allen -Date: Thu, 25 May 2023 18:39:56 -0600 -Subject: [PATCH] use single-line block in manify method in manpage converter - to make it easier to patch - ---- - lib/asciidoctor/converter/manpage.rb | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/lib/asciidoctor/converter/manpage.rb b/lib/asciidoctor/converter/manpage.rb -index bcf2b784..a7aba996 100644 ---- a/lib/asciidoctor/converter/manpage.rb -+++ b/lib/asciidoctor/converter/manpage.rb -@@ -716,9 +716,7 @@ def manify str, opts = {} - .gsub(LiteralBackslashRx) { $1 ? $& : '\\(rs' } # literal backslash (not a troff escape sequence) - .gsub(EllipsisCharRefRx, '...') # horizontal ellipsis - .gsub(LeadingPeriodRx, '\\\&.') # leading . is used in troff for macro call or other formatting; replace with \&. -- .gsub(EscapedMacroRx) do # drop orphaned \c escape lines, unescape troff macro, quote adjacent character, isolate macro line -- (rest = $3.lstrip).empty? ? %(.#{$1}"#{$2}") : %(.#{$1}"#{$2.rstrip}"#{LF}#{rest}) -- end -+ .gsub(EscapedMacroRx) { (rest = $3.lstrip).empty? ? %(.#{$1}"#{$2}") : %(.#{$1}"#{$2.rstrip}"#{LF}#{rest}) } # drop orphaned \c escape lines, unescape troff macro, quote adjacent character, isolate macro line - .gsub('-', '\-') - .gsub('<', '<') - .gsub('>', '>') diff --git a/0002-change-dot-layout-in-chained-method-call-to-be-compa.patch b/0002-change-dot-layout-in-chained-method-call-to-be-compa.patch deleted file mode 100644 index 351d5cc..0000000 --- a/0002-change-dot-layout-in-chained-method-call-to-be-compa.patch +++ /dev/null @@ -1,85 +0,0 @@ -From b7c03964cfc96af9ced5db3c1a6c7a7663de5cb2 Mon Sep 17 00:00:00 2001 -From: Dan Allen -Date: Fri, 26 May 2023 01:44:09 -0600 -Subject: [PATCH] change dot layout in chained method call to be compatible - with rdoc generator from Ruby 2.5 - ---- - lib/asciidoctor/converter/manpage.rb | 64 ++++++++++++++-------------- - 1 file changed, 32 insertions(+), 32 deletions(-) - -diff --git a/lib/asciidoctor/converter/manpage.rb b/lib/asciidoctor/converter/manpage.rb -index a7aba996..be52e9be 100644 ---- a/lib/asciidoctor/converter/manpage.rb -+++ b/lib/asciidoctor/converter/manpage.rb -@@ -712,38 +712,38 @@ def manify str, opts = {} - else - str = str.tr_s WHITESPACE, ' ' - end -- str = str -- .gsub(LiteralBackslashRx) { $1 ? $& : '\\(rs' } # literal backslash (not a troff escape sequence) -- .gsub(EllipsisCharRefRx, '...') # horizontal ellipsis -- .gsub(LeadingPeriodRx, '\\\&.') # leading . is used in troff for macro call or other formatting; replace with \&. -- .gsub(EscapedMacroRx) { (rest = $3.lstrip).empty? ? %(.#{$1}"#{$2}") : %(.#{$1}"#{$2.rstrip}"#{LF}#{rest}) } # drop orphaned \c escape lines, unescape troff macro, quote adjacent character, isolate macro line -- .gsub('-', '\-') -- .gsub('<', '<') -- .gsub('>', '>') -- .gsub('+', '+') # plus sign; alternately could use \c(pl -- .gsub(' ', '\~') # non-breaking space -- .gsub('©', '\(co') # copyright sign -- .gsub('®', '\(rg') # registered sign -- .gsub('™', '\(tm') # trademark sign -- .gsub('°', '\(de') # degree sign -- .gsub(' ', ' ') # thin space -- .gsub('–', '\(en') # en dash -- .gsub(EmDashCharRefRx, '\(em') # em dash -- .gsub('‘', '\(oq') # left single quotation mark -- .gsub('’', '\(cq') # right single quotation mark -- .gsub('“', '\(lq') # left double quotation mark -- .gsub('”', '\(rq') # right double quotation mark -- .gsub('←', '\(<-') # leftwards arrow -- .gsub('→', '\(->') # rightwards arrow -- .gsub('⇐', '\(lA') # leftwards double arrow -- .gsub('⇒', '\(rA') # rightwards double arrow -- .gsub('​', '\:') # zero width space -- .gsub('&', '&') # literal ampersand (NOTE must take place after any other replacement that includes &) -- .gsub('\'', '\*(Aq') # apostrophe / neutral single quote -- .gsub(MockMacroRx, '\1') # mock boundary -- .gsub(ESC_BS, '\\') # unescape troff backslash (NOTE update if more escapes are added) -- .gsub(ESC_FS, '.') # unescape full stop in troff commands (NOTE must take place after gsub(LeadingPeriodRx)) -- .rstrip # strip trailing space -+ str = str. -+ gsub(LiteralBackslashRx) { $1 ? $& : '\\(rs' }. # literal backslash (not a troff escape sequence) -+ gsub(EllipsisCharRefRx, '...'). # horizontal ellipsis -+ gsub(LeadingPeriodRx, '\\\&.'). # leading . is used in troff for macro call or other formatting; replace with \&. -+ gsub(EscapedMacroRx) { (rest = $3.lstrip).empty? ? %(.#{$1}"#{$2}") : %(.#{$1}"#{$2.rstrip}"#{LF}#{rest}) }. # drop orphaned \c escape lines, unescape troff macro, quote adjacent character, isolate macro line -+ gsub('-', '\-'). -+ gsub('<', '<'). -+ gsub('>', '>'). -+ gsub('+', '+'). # plus sign; alternately could use \c(pl -+ gsub(' ', '\~'). # non-breaking space -+ gsub('©', '\(co'). # copyright sign -+ gsub('®', '\(rg'). # registered sign -+ gsub('™', '\(tm'). # trademark sign -+ gsub('°', '\(de'). # degree sign -+ gsub(' ', ' '). # thin space -+ gsub('–', '\(en'). # en dash -+ gsub(EmDashCharRefRx, '\(em'). # em dash -+ gsub('‘', '\(oq'). # left single quotation mark -+ gsub('’', '\(cq'). # right single quotation mark -+ gsub('“', '\(lq'). # left double quotation mark -+ gsub('”', '\(rq'). # right double quotation mark -+ gsub('←', '\(<-'). # leftwards arrow -+ gsub('→', '\(->'). # rightwards arrow -+ gsub('⇐', '\(lA'). # leftwards double arrow -+ gsub('⇒', '\(rA'). # rightwards double arrow -+ gsub('​', '\:'). # zero width space -+ gsub('&', '&'). # literal ampersand (NOTE must take place after any other replacement that includes &) -+ gsub('\'', '\*(Aq'). # apostrophe / neutral single quote -+ gsub(MockMacroRx, '\1'). # mock boundary -+ gsub(ESC_BS, '\\'). # unescape troff backslash (NOTE update if more escapes are added) -+ gsub(ESC_FS, '.'). # unescape full stop in troff commands (NOTE must take place after gsub(LeadingPeriodRx)) -+ rstrip # strip trailing space - opts[:append_newline] ? %(#{str}#{LF}) : str - end - diff --git a/0003-support-ruby33-Logger.patch b/0003-support-ruby33-Logger.patch deleted file mode 100644 index eadf945..0000000 --- a/0003-support-ruby33-Logger.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 4c93df1eeff84463c6fc299b62b78c20c3163a09 Mon Sep 17 00:00:00 2001 -From: Mamoru TASAKA -Date: Fri, 29 Sep 2023 15:00:12 +0900 -Subject: [PATCH] Support ruby3.3 Logger by properly initialize super class - -Upcoming ruby3.3 will have enhanced Logger class: -https://github.com/ruby/ruby/commit/194520f80e1cdb71faa055d731450855a1ddb8d1 -which initializes newly added instance variables. -Without initializing such variables (in super class), now using -subclass of Logger will cause exception. - -To avoid this, first call super, then execute additional subclass -initialization. - -Closes #4493 . ---- - lib/asciidoctor/logging.rb | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/lib/asciidoctor/logging.rb b/lib/asciidoctor/logging.rb -index 7664c7e75d..1f846c4fba 100644 ---- a/lib/asciidoctor/logging.rb -+++ b/lib/asciidoctor/logging.rb -@@ -42,6 +42,7 @@ class MemoryLogger < ::Logger - attr_reader :messages - - def initialize -+ super nil - self.level = WARN - @messages = [] - end -@@ -69,6 +70,7 @@ class NullLogger < ::Logger - attr_reader :max_severity - - def initialize -+ super nil - self.level = WARN - end - diff --git a/0004-remove-base64-dependency.patch b/0004-remove-base64-dependency.patch deleted file mode 100644 index 74f1c57..0000000 --- a/0004-remove-base64-dependency.patch +++ /dev/null @@ -1,63 +0,0 @@ -From fb4d1d6295153f1722711ee0b232f980b0793b1c Mon Sep 17 00:00:00 2001 -From: Dan Allen -Date: Thu, 7 Mar 2024 16:35:09 -0700 -Subject: [PATCH] resolves #4561 remove use of base64 library to prevent - warning in Ruby >= 3.3 - ---- - CHANGELOG.adoc | 1 + - Gemfile | 1 + - asciidoctor.gemspec | 2 +- - lib/asciidoctor.rb | 1 - - lib/asciidoctor/abstract_node.rb | 12 ++++++------ - 5 files changed, 9 insertions(+), 8 deletions(-) - -diff --git a/lib/asciidoctor.rb b/lib/asciidoctor.rb -index 18b6743bfc..08a5db02c0 100644 ---- a/lib/asciidoctor.rb -+++ b/lib/asciidoctor.rb -@@ -7,7 +7,6 @@ - # this require is satisfied by the Asciidoctor.js build; it augments the Ruby environment for Asciidoctor.js - require 'asciidoctor/js' - else -- autoload :Base64, 'base64' - require 'cgi/util' - autoload :OpenURI, 'open-uri' - autoload :Pathname, 'pathname' -diff --git a/lib/asciidoctor/abstract_node.rb b/lib/asciidoctor/abstract_node.rb -index a60ab7956c..07ad0291d1 100644 ---- a/lib/asciidoctor/abstract_node.rb -+++ b/lib/asciidoctor/abstract_node.rb -@@ -355,8 +355,8 @@ def media_uri target, asset_dir_key = 'imagesdir' - # - # First, and foremost, the target image path is cleaned if the document safe mode level - # is set to at least SafeMode::SAFE (a condition which is true by default) to prevent access -- # to ancestor paths in the filesystem. The image data is then read and converted to -- # Base64. Finally, a data URI is built which can be used in an image tag. -+ # to ancestor paths in the filesystem. The image data is then read and converted to base64. -+ # Finally, a data URI is built which can be used in an image tag. - # - # target_image - A String path to the target image - # asset_dir_key - The String attribute key used to lookup the directory where -@@ -377,8 +377,8 @@ def generate_data_uri target_image, asset_dir_key = nil - end - - if ::File.readable? image_path -- # NOTE base64 is autoloaded by reference to ::Base64 -- %(data:#{mimetype};base64,#{::Base64.strict_encode64 ::File.binread image_path}) -+ # NOTE pack 'm0' is equivalent to Base64.strict_encode64 -+ %(data:#{mimetype};base64,#{[(::File.binread image_path)].pack 'm0'}) - else - logger.warn %(image to embed not found or not readable: #{image_path}) - %(data:#{mimetype};base64,) -@@ -411,8 +411,8 @@ def generate_data_uri_from_uri image_uri, cache_uri = false - - begin - mimetype, bindata = ::OpenURI.open_uri(image_uri, URI_READ_MODE) {|f| [f.content_type, f.read] } -- # NOTE base64 is autoloaded by reference to ::Base64 -- %(data:#{mimetype};base64,#{::Base64.strict_encode64 bindata}) -+ # NOTE pack 'm0' is equivalent to Base64.strict_encode64 -+ %(data:#{mimetype};base64,#{[bindata].pack 'm0'}) - rescue - logger.warn %(could not retrieve image data from URI: #{image_uri}) - image_uri diff --git a/0005-normalize-inspect-output.patch b/0005-normalize-inspect-output.patch deleted file mode 100644 index ae17d99..0000000 --- a/0005-normalize-inspect-output.patch +++ /dev/null @@ -1,42 +0,0 @@ -From e5442fc2848680eada862841b0e92dc9265e1a29 Mon Sep 17 00:00:00 2001 -From: Dan Allen -Date: Thu, 31 Oct 2024 04:20:33 -0600 -Subject: [PATCH] resolves #4634 normalize output from inspect when comparing - to fixture - ---- - test/extensions_test.rb | 20 ++++++++++---------- - 1 file changed, 10 insertions(+), 10 deletions(-) - -diff --git a/test/extensions_test.rb b/test/extensions_test.rb -index 93c475a070..20df46cb34 100644 ---- a/test/extensions_test.rb -+++ b/test/extensions_test.rb -@@ -1468,17 +1468,17 @@ def process parent, reader, attributes - ++++ - EOS - expected = <<~'EOS'.chop -- target="", attributes={} -- target="value,key=val", attributes={1=>"value", "key"=>"val", "name"=>"value"} -- target="", attributes={"text"=>""} -- target="[text]", attributes={"text"=>"[text]"} -- target="target", attributes={} -- target="target", attributes={1=>"value", "key"=>"val", "name"=>"value"} -- target="target", attributes={"text"=>""} -- target="target", attributes={"text"=>"[text]"} -- target="target", attributes={} -+ target="",attributes={} -+ target="value,key=val",attributes={1=>"value","key"=>"val","name"=>"value"} -+ target="",attributes={"text"=>""} -+ target="[text]",attributes={"text"=>"[text]"} -+ target="target",attributes={} -+ target="target",attributes={1=>"value","key"=>"val","name"=>"value"} -+ target="target",attributes={"text"=>""} -+ target="target",attributes={"text"=>"[text]"} -+ target="target",attributes={} - EOS -- output = convert_string_to_embedded input -+ output = ((convert_string_to_embedded input).gsub ' => ', '=>').gsub ', ', ',' - assert_equal expected, output - ensure - Asciidoctor::Extensions.unregister_all diff --git a/rubygem-asciidoctor.spec b/rubygem-asciidoctor.spec index 4ece2a2..7cff70d 100644 --- a/rubygem-asciidoctor.spec +++ b/rubygem-asciidoctor.spec @@ -6,23 +6,11 @@ Summary: A fast, open source AsciiDoc implementation in Ruby Name: rubygem-%{gem_name} -Version: 2.0.20 -Release: 11%{?dist} +Version: 2.0.26 +Release: 1%{?dist} License: MIT URL: https://asciidoctor.org Source0: https://github.com/asciidoctor/asciidoctor/archive/%{gittag}/%{gem_name}-%{version}%{pre}.tar.gz -# improve ruby-2.5 compatibility -# https://github.com/asciidoctor/asciidoctor/issues/4462 -# https://github.com/asciidoctor/asciidoctor/commit/cc9a8d3c -Patch0: 0001-use-single-line-block-in-manify-method-in-manpage-co.patch -# https://github.com/asciidoctor/asciidoctor/commit/b7c03964 -Patch1: 0002-change-dot-layout-in-chained-method-call-to-be-compa.patch -# https://github.com/asciidoctor/asciidoctor/pull/4494 -Patch2: 0003-support-ruby33-Logger.patch -# https://github.com/asciidoctor/asciidoctor/pull/4562/ -Patch3: 0004-remove-base64-dependency.patch -# https://github.com/asciidoctor/asciidoctor/commit/e5442fc2 -Patch4: 0005-normalize-inspect-output.patch %if 0%{?el7} Requires: ruby(release) BuildRequires: ruby(release) @@ -139,6 +127,10 @@ cp -a .%{gem_instdir}/man/*.1 \ %doc %{gem_docdir} %changelog +* Mon Dec 15 2025 Dominik Mierzejewski - 2.0.26-1 +- updated to 2.0.26 (resolves rhbz#2265214) +- droped upstreamed patches + * Wed Nov 05 2025 Mamoru TASAKA - 2.0.20-11 - Add logger dep for ruby3_5 diff --git a/sources b/sources index 4d8a0c4..7fdf3a8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (asciidoctor-2.0.20.tar.gz) = b6b730de8f83e36630dc6146b4c0e07a26b502b695e78e50fc87790391126d52ef0b6b02b82ecb225adff680c94305b4e31403cc067bdbf1740e2d759417f440 +SHA512 (asciidoctor-2.0.26.tar.gz) = 5e42079374fb1767dd0fd6767fd1e718d2c1c673e131ef1ae401c7b17e5b413168de3b25889eda35d2021ded55855b83b78f6110729e1a7765f757b37bbf5858