Compare commits

...
Sign in to create a new pull request.

6 commits

Author SHA1 Message Date
Dominik 'Rathann' Mierzejewski
838fb1a9ee updated to 2.0.26 (resolves rhbz#2265214)
- droped upstreamed patches
2025-12-15 13:10:36 +01:00
Mamoru TASAKA
3d7bae2b69 Add logger dep for ruby3_5 2025-11-05 23:11:47 +09:00
Fedora Release Engineering
75de982163 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 12:16:36 +00:00
Fedora Release Engineering
fd4e80e38f Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-18 22:58:59 +00:00
Mamoru TASAKA
1b5b583b1a Backport upstream PR to remove base64 dependency
Backport upstream fix for ruby34 formatting change
2024-11-14 16:33:39 +09:00
Fedora Release Engineering
468fa4fa10 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-19 19:03:32 +00:00
5 changed files with 30 additions and 161 deletions

View file

@ -1,25 +0,0 @@
From cc9a8d3cd12f2c15e43bd263b8b8a9b32d097831 Mon Sep 17 00:00:00 2001
From: Dan Allen <dan.j.allen@gmail.com>
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('&lt;', '<')
.gsub('&gt;', '>')

View file

@ -1,85 +0,0 @@
From b7c03964cfc96af9ced5db3c1a6c7a7663de5cb2 Mon Sep 17 00:00:00 2001
From: Dan Allen <dan.j.allen@gmail.com>
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('&lt;', '<')
- .gsub('&gt;', '>')
- .gsub('&#43;', '+') # plus sign; alternately could use \c(pl
- .gsub('&#160;', '\~') # non-breaking space
- .gsub('&#169;', '\(co') # copyright sign
- .gsub('&#174;', '\(rg') # registered sign
- .gsub('&#8482;', '\(tm') # trademark sign
- .gsub('&#176;', '\(de') # degree sign
- .gsub('&#8201;', ' ') # thin space
- .gsub('&#8211;', '\(en') # en dash
- .gsub(EmDashCharRefRx, '\(em') # em dash
- .gsub('&#8216;', '\(oq') # left single quotation mark
- .gsub('&#8217;', '\(cq') # right single quotation mark
- .gsub('&#8220;', '\(lq') # left double quotation mark
- .gsub('&#8221;', '\(rq') # right double quotation mark
- .gsub('&#8592;', '\(<-') # leftwards arrow
- .gsub('&#8594;', '\(->') # rightwards arrow
- .gsub('&#8656;', '\(lA') # leftwards double arrow
- .gsub('&#8658;', '\(rA') # rightwards double arrow
- .gsub('&#8203;', '\:') # zero width space
- .gsub('&amp;', '&') # 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('&lt;', '<').
+ gsub('&gt;', '>').
+ gsub('&#43;', '+'). # plus sign; alternately could use \c(pl
+ gsub('&#160;', '\~'). # non-breaking space
+ gsub('&#169;', '\(co'). # copyright sign
+ gsub('&#174;', '\(rg'). # registered sign
+ gsub('&#8482;', '\(tm'). # trademark sign
+ gsub('&#176;', '\(de'). # degree sign
+ gsub('&#8201;', ' '). # thin space
+ gsub('&#8211;', '\(en'). # en dash
+ gsub(EmDashCharRefRx, '\(em'). # em dash
+ gsub('&#8216;', '\(oq'). # left single quotation mark
+ gsub('&#8217;', '\(cq'). # right single quotation mark
+ gsub('&#8220;', '\(lq'). # left double quotation mark
+ gsub('&#8221;', '\(rq'). # right double quotation mark
+ gsub('&#8592;', '\(<-'). # leftwards arrow
+ gsub('&#8594;', '\(->'). # rightwards arrow
+ gsub('&#8656;', '\(lA'). # leftwards double arrow
+ gsub('&#8658;', '\(rA'). # rightwards double arrow
+ gsub('&#8203;', '\:'). # zero width space
+ gsub('&amp;', '&'). # 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

View file

@ -1,39 +0,0 @@
From 4c93df1eeff84463c6fc299b62b78c20c3163a09 Mon Sep 17 00:00:00 2001
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
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

View file

@ -6,19 +6,11 @@
Summary: A fast, open source AsciiDoc implementation in Ruby
Name: rubygem-%{gem_name}
Version: 2.0.20
Release: 6%{?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
%if 0%{?el7}
Requires: ruby(release)
BuildRequires: ruby(release)
@ -31,6 +23,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)
@ -44,7 +37,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}
@ -74,6 +67,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
@ -129,6 +127,26 @@ cp -a .%{gem_instdir}/man/*.1 \
%doc %{gem_docdir}
%changelog
* Mon Dec 15 2025 Dominik Mierzejewski <dominik@greysector.net> - 2.0.26-1
- updated to 2.0.26 (resolves rhbz#2265214)
- droped upstreamed patches
* Wed Nov 05 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.0.20-11
- Add logger dep for ruby3_5
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.20-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.20-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Thu Nov 14 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 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 <releng@fedoraproject.org> - 2.0.20-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.20-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

View file

@ -1 +1 @@
SHA512 (asciidoctor-2.0.20.tar.gz) = b6b730de8f83e36630dc6146b4c0e07a26b502b695e78e50fc87790391126d52ef0b6b02b82ecb225adff680c94305b4e31403cc067bdbf1740e2d759417f440
SHA512 (asciidoctor-2.0.26.tar.gz) = 5e42079374fb1767dd0fd6767fd1e718d2c1c673e131ef1ae401c7b17e5b413168de3b25889eda35d2021ded55855b83b78f6110729e1a7765f757b37bbf5858