Bug 2171711 - rubygem-asciidoctor: FTBFS in Fedora rawhide/f38
Summary: rubygem-asciidoctor: FTBFS in Fedora rawhide/f38
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rubygem-asciidoctor
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dan Allen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F38FTBFS
TreeView+ depends on / blocked
 
Reported: 2023-02-20 12:02 UTC by Fedora Release Engineering
Modified: 2023-03-11 03:05 UTC (History)
6 users (show)

Fixed In Version: rubygem-asciidoctor-2.0.18-3.fc39 rubygem-asciidoctor-2.0.18-3.fc38
Clone Of:
Environment:
Last Closed: 2023-02-21 18:31:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Fedora Release Engineering 2023-02-20 12:02:56 UTC
rubygem-asciidoctor failed to build from source in Fedora rawhide/f38

https://koji.fedoraproject.org/koji/taskinfo?taskID=96440606


For details on the mass rebuild see:

https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Please fix rubygem-asciidoctor at your earliest convenience and set the bug's status to
ASSIGNED when you start fixing it. If the bug remains in NEW state for 8 weeks,
rubygem-asciidoctor will be orphaned. Before branching of Fedora 39,
rubygem-asciidoctor will be retired, if it still fails to build.

For more details on the FTBFS policy, please visit:
https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/

Comment 1 Todd Zullinger 2023-02-20 16:50:51 UTC
This appears to be an issue where asciidoctor's test suite does not yet support rouge 4.1.0.  In rouge-4.1.0, the CSS changed rather dramatically due to 6f5aecd2 (Update GitHub theme, add dark mode (#1918), 2023-01-24)¹.  I filed an issue upstream² because I'm not sure if it's simply a matter of updating the test regex or if more substantial changes will be needed to support rouge >= 4.1.0.

¹ https://github.com/rouge-ruby/rouge/commit/6f5aecd2
² https://github.com/asciidoctor/asciidoctor/issues/4406

Comment 2 Dan Allen 2023-02-20 19:54:28 UTC
For now I think you could patch the test suite to skip the test. It's not critical to the operation of Asciidoctor, especially since it's an optional integration. We will get the test corrected upstream when there is time to do so.

Comment 3 Todd Zullinger 2023-02-21 01:51:52 UTC
Thanks for the details Dan.  I wasn't sure whether skipping the test or just patching it so it passed would be a reasonable way to fix things or if it would simply paper over a real issue.  I filed a PR with a first crack at adjusting the test to work with old and new rouge releases.

There is still another issue left, which isn't related.  (I didn't mention it initially as I was naïvely hoping it might be related to the first issue.)

```
+ LANG=C.UTF-8
+ ruby -Ilib:test -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
Run options: --seed 15502
# Running:
.............................asciidoctor: ERROR: fixtures/iso-8859-1.txt: line 1: include file not readable: /builddir/build/BUILD/asciidoctor-2.0.18/usr/share/gems/gems/asciidoctor-2.0.18/test/fixtures/iso-8859-1.txt
asciidoctor: WARNING: fixtures/iso-8859-1.txt: line 0: unterminated literal block
F............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S................S.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Finished in 6.458021s, 413.2845 runs/s, 1470.8841 assertions/s.
  1) Failure:
ReaderTest::TestPreprocessorReader::TestIncludeDirective#test_should_fail_to_read_include_file_if_not_UTF_8_encoded_and_encoding_is_not_specified [/builddir/build/BUILD/asciidoctor-2.0.18/usr/share/gems/gems/asciidoctor-2.0.18/test/reader_test.rb:817]:
invalid byte sequence in UTF-8.
StandardError expected but nothing was raised.
2669 runs, 9499 assertions, 1 failures, 0 errors, 2 skips
```

I added a check for the iso-8859-1.txt and its parent directory just before running the test suite to confirm they're present and seem to have the proper permissions:

```
+ ls -ld /builddir/build/BUILDROOT/rubygem-asciidoctor-2.0.18-3.fc39.noarch/usr/share/gems/gems/asciidoctor-2.0.18/test/fixtures /builddir/build/BUILDROOT/rubygem-asciidoctor-2.0.18-3.fc39.noarch/usr/share/gems/gems/asciidoctor-2.0.18/test/fixtures/iso-8859-1.txt
drwxr-xr-x. 1 mockbuild mock 2016 Feb 20 22:30 /builddir/build/BUILDROOT/rubygem-asciidoctor-2.0.18-3.fc39.noarch/usr/share/gems/gems/asciidoctor-2.0.18/test/fixtures
-rw-r--r--. 1 mockbuild mock   19 Feb 20 22:30 /builddir/build/BUILDROOT/rubygem-asciidoctor-2.0.18-3.fc39.noarch/usr/share/gems/gems/asciidoctor-2.0.18/test/fixtures/iso-8859-1.txt
```

I don't know my way around the test suite well enough to spot what's really going wrong here and why this test which has passed previously is now reliably failing.

Comment 4 Dan Allen 2023-02-21 10:47:58 UTC
A patch is now available for the Rouge stylesheet assertion. The new assertion is portable across all versions of Rouge as it requests the default stylesheet directly and compares against it. We no longer have to worry about what's in it.

See https://github.com/asciidoctor/asciidoctor/commit/066a4618b92fb08d6c9928e134d86bbbcaa4f8f2

The encoding test assertion you encountered is due to a change in Ruby 3.2. A fix is also available for that test assertion as well (which require a change to the core code).

See https://github.com/asciidoctor/asciidoctor/commit/b3c05398b1b4b483fe5f9c9ef89dc772863cf6f1

Comment 5 Todd Zullinger 2023-02-21 18:28:13 UTC
Excellent, thanks Dan!  I've incorporated both of those fixes in the rawhide and f38 branches.  Builds are underway now.

Comment 6 Fedora Update System 2023-02-21 18:29:53 UTC
FEDORA-2023-4afe7e32aa has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-4afe7e32aa

Comment 7 Fedora Update System 2023-02-21 18:31:29 UTC
FEDORA-2023-4afe7e32aa has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2023-02-21 19:29:24 UTC
FEDORA-2023-0aecc792b3 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-0aecc792b3

Comment 9 Dan Allen 2023-02-21 19:49:24 UTC
Thanks for making those updates and publishing a new version of the package, Todd! Much appreciated.

Comment 10 Fedora Update System 2023-02-22 13:31:51 UTC
FEDORA-2023-0aecc792b3 has been pushed to the Fedora 38 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-0aecc792b3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2023-03-11 03:05:35 UTC
FEDORA-2023-0aecc792b3 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.