Re: Help needed: rspec errors in package

2020-05-06 Thread Dan Allen
> @Vit Ondruch - if you have any idea on why it can't find the binary path, that would be good, am I missing a requires on itself or some such? It turns out this is an appropriate question for this list. Why is the following call failing inside the package build environment? Gem.bin_path 'asciid

Re: Help needed: rspec errors in package

2020-05-06 Thread Dan Allen
Please direct debugging suggestions to the following issue. I don't like that we're discussing the test suite outside of the project because it splits the discussion. https://github.com/asciidoctor/asciidoctor-pdf/issues/1542 -Dan On Wed, May 6, 2020 at 6:42 AM Vít Ondruch wrote: > ~~~ > > 1

Re: Help needed: rspec errors in package

2020-05-06 Thread Vít Ondruch
~~~ 11) Asciidoctor::PDF::Converter - Image Remote Cache should cache remote image if cache-uri document attribute is set Failure/Error: Helpers.require_library 'open-uri/cached', 'open-uri-cached' unless defined? ::OpenURI::Cache LoadError: asciidoctor: FAILED: required ge

Re: Help needed: rspec errors in package

2020-05-06 Thread Vít Ondruch
Dne 06. 05. 20 v 12:15 Dan Allen napsal(a): > > > @Vit Ondruch - if you have any idea > on why it can't find the binary path, that would be good, am I > missing a requires on itself or some such? > > > That would be a better question to ask me, given I wrot

Re: Help needed: rspec errors in package

2020-05-06 Thread Dan Allen
> That works on Fedora Rawhide if this is the expected output: Well, I don't know how that is possible. (The only difference is that I used pdf-reader 2.4.0). What I do know is that the PDF it is making is invalid. -Dan On Wed, May 6, 2020 at 3:58 AM Vít Ondruch wrote: > That works on Fedora R

Re: Help needed: rspec errors in package

2020-05-06 Thread Dan Allen
@Vit Ondruch - if you have any idea on why it can't > find the binary path, that would be good, am I missing a requires on itself > or some such? > > That would be a better question to ask me, given I wrote the test suite ;) Yes, the CLI tests use an extremely stripped down shell environment to m

Re: Help needed: rspec errors in package

2020-05-06 Thread Christopher Brown
Dan, Thanks for looking into this - have patched and tested and looks good: https://kojipkgs.fedoraproject.org//work/tasks/1299/44151299/build.log @Vit Ondruch - if you have any idea on why it can't find the binary path, that would be good, am I missing a requires on itself or some such? Cheer

Re: Help needed: rspec errors in package

2020-05-06 Thread Vít Ondruch
But Prawn's test suite is enforcing old pdf-reader 1.4.1 ... Vít Dne 06. 05. 20 v 11:58 Vít Ondruch napsal(a): > > That works on Fedora Rawhide if this is the expected output: > > ~~~ > > $ ruby -e " > require 'prawn' > require 'pdf/reader' > require 'pdf/inspector' > > Prawn::Document.generate

Re: Help needed: rspec errors in package

2020-05-06 Thread Vít Ondruch
That works on Fedora Rawhide if this is the expected output: ~~~ $ ruby -e " require 'prawn' require 'pdf/reader' require 'pdf/inspector' Prawn::Document.generate 'test.pdf' do   text 'yo' end puts ((PDF::Reader.new 'test.pdf').page 1).text File.open 'test.pdf' do |fd|   pdf = PDF::Inspector::

Re: Help needed: rspec errors in package

2020-05-06 Thread Dan Allen
Here's a test script to prove it: require 'prawn' require 'pdf/reader' require 'pdf/inspector' Prawn::Document.generate 'test.pdf' do text 'yo' end puts ((PDF::Reader.new 'test.pdf').page 1).text File.open 'test.pdf' do |fd| pdf = PDF::Inspector::Text.analyze fd puts pdf.strings end I ra

Re: Help needed: rspec errors in package

2020-05-06 Thread Dan Allen
Vit, It seems to be due to this change: https://github.com/prawnpdf/pdf-core/commit/1b179c18359f1642f9294c8c23a8f1be51b48414 This is making the font in the PDF (or at least the font metadata) corrupt. A PDF generated using Prawn 2.2.2 w/ pdf-core 0.8.1 cannot be read by PDF::Reader. It says there

Re: Help needed: rspec errors in package

2020-05-06 Thread Vít Ondruch
Dan, thx for looking into this. Do you have more details? Is there some patch we need to add on top of Prawn to fix this? I am asking because I am not sure there is easy way do revert the pdf-core update (we can always bump epoch, but this sucks for other reasons). Vít Dne 06. 05. 20 v 10:31 Da

Re: Help needed: rspec errors in package

2020-05-06 Thread Dan Allen
I've done some tests and what I've determined is that prawn 2.2.2 is incompatible with pdf-core 0.8.1. These gems are extremely tightly coupled because they're essentially one library. Thus, I think it's a mistake for Fedora to be packaging pdf-core 0.8.1 at this time. It should either wait for the

Re: Help needed: rspec errors in package

2020-05-06 Thread Dan Allen
> I would like to urge everybody to avoid such strict version requirements, especially without any justification, as in this Prawn case. I agree. I'm currently looking into how to run the Asciidoctor PDF test suite against a prerelease of Prawn that doesn't have this restriction. Unfortunately, be

Re: Help needed: rspec errors in package

2020-05-06 Thread Vít Ondruch
Hi Chris, I think that part of the issues is that upstream is very likely using Bundler whereas you are running the test suite without it. This has its own set of pros and cons. For Fedora, the main benefit of running test suite without using Bundler is reduced amount of dependencies. For example

Re: Help needed: rspec errors in package

2020-05-05 Thread Dan Allen
Christopher, I discovered the issue. Fedora uses a new version of the pdf-core gem (0.8.1) than what prawn requests (0.7.0). There was a change introduced in that version to truncate any float value in the PDF to an integer if the decimal is zero. See https://github.com/prawnpdf/pdf-core/commit/3b

Help needed: rspec errors in package

2020-05-05 Thread Christopher Brown
Hi there, I have bumped the version of a package I maintain in Fedora and am seeing an increase in errors from the test suite run. https://kojipkgs.fedoraproject.org//work/tasks/6453/44116453/build.log I'm specifically trying to understand the errors regarding being unable to locate the binary a