Bug 1845530 - psych: FTBFS
Summary: psych: FTBFS
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: ruby
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vít Ondruch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1835836
TreeView+ depends on / blocked
 
Reported: 2020-06-09 13:17 UTC by Jun Aruga
Modified: 2020-06-19 09:40 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-19 09:40:25 UTC
Type: Bug


Attachments (Terms of Use)

Description Jun Aruga 2020-06-09 13:17:40 UTC
Description of problem:

Current rpms/ruby on rawhide fails the tests related to psych.

You can see Koschei.
https://koschei.fedoraproject.org/package/ruby

https://kojipkgs.fedoraproject.org/work/tasks/3309/45363309/build.log

```
  1) Failure:
Psych::TestNil#test_array_nil
[/builddir/build/BUILD/ruby-2.7.1/test/psych/test_nil.rb:14]:
--- expected
+++ actual
@@ -1,3 +1,3 @@
 "---
-- 
+-
 "
  2) Failure:
Psych::TestNil#test_nil
[/builddir/build/BUILD/ruby-2.7.1/test/psych/test_nil.rb:8]:
Expected /--- \n(?:\.\.\.\n)?/ to match "---\n".
  3) Error:
Psych_Unit_Tests#test_spec_domain_prefix:
Psych::SyntaxError: (<unknown>): did not find expected whitespace or
line break while scanning a tag at line 2 column 10
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:456:in `parse'
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:456:in `parse_stream'
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:390:in `parse'
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:277:in `load'
    /builddir/build/BUILD/ruby-2.7.1/test/psych/helper.rb:66:in
`assert_parse_only'
    /builddir/build/BUILD/ruby-2.7.1/test/psych/test_yaml.rb:622:in
`test_spec_domain_prefix'
  4) Error:
Psych_Unit_Tests#test_spec_application_family:
Psych::SyntaxError: (<unknown>): did not find expected whitespace or
line break while scanning a tag at line 1 column 3
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:456:in `parse'
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:456:in `parse_stream'
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:390:in `parse'
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:277:in `load'
    /builddir/build/BUILD/ruby-2.7.1/test/psych/helper.rb:66:in
`assert_parse_only'
    /builddir/build/BUILD/ruby-2.7.1/test/psych/test_yaml.rb:750:in
`test_spec_application_family'
  5) Error:
Psych_Unit_Tests#test_spec_float_explicit:
Psych::SyntaxError: (<unknown>): did not find expected whitespace or
line break while scanning a tag at line 5 column 3
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:456:in `parse'
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:456:in `parse_stream'
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:390:in `parse'
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:277:in `load'
    /builddir/build/BUILD/ruby-2.7.1/test/psych/helper.rb:66:in
`assert_parse_only'
    /builddir/build/BUILD/ruby-2.7.1/test/psych/test_yaml.rb:768:in
`test_spec_float_explicit'
  6) Error:
Psych_Unit_Tests#test_spec_explicit_families:
Psych::SyntaxError: (<unknown>): did not find expected whitespace or
line break while scanning a tag at line 8 column 6
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:456:in `parse'
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:456:in `parse_stream'
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:390:in `parse'
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:277:in `load'
    /builddir/build/BUILD/ruby-2.7.1/test/psych/helper.rb:66:in
`assert_parse_only'
    /builddir/build/BUILD/ruby-2.7.1/test/psych/test_yaml.rb:711:in
`test_spec_explicit_families'
  7) Error:
TestPsych#test_domain_types:
Psych::SyntaxError: (<unknown>): did not find expected whitespace or
line break while scanning a tag at line 1 column 5
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:456:in `parse'
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:456:in `parse_stream'
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:390:in `parse'
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:277:in `load'
    /builddir/build/BUILD/ruby-2.7.1/test/psych/test_psych.rb:185:in
`test_domain_types'
  8) Error:
TestPsych#test_callbacks:
Psych::SyntaxError: (<unknown>): did not find expected whitespace or
line break while scanning a tag at line 1 column 3
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:456:in `parse'
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:456:in `parse_stream'
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:390:in `parse'
    /builddir/build/BUILD/ruby-2.7.1/.ext/common/psych.rb:277:in `load'
    /builddir/build/BUILD/ruby-2.7.1/test/psych/test_psych.rb:300:in
`test_callbacks'
Finished tests in 978.698829s, 21.4785 tests/s, 2781.3173 assertions/s.
21021 tests, 2722072 assertions, 2 failures, 6 errors, 62 skips
```


Possbly here is the patch to fix the issues.
https://github.com/ruby/psych/commit/3f5e520fd38c39975c25a1bbd8d6c8ec9a132f2d


Version-Release number of selected component (if applicable):
ruby-2.7.1-131.fc33

How reproducible:


Steps to Reproduce:
1. For example, Psych::TestNil#test_array_nil


```
$ cat test.rb
require 'psych'
p "#{Psych.dump [nil]}"
```

Actual results:
$ ruby test.rb
"---\n-\n"


Expected results:
$ ruby test.rb
"---\n- \n"


Additional info:

Comment 1 Jun Aruga 2020-06-09 14:18:42 UTC
I sent PR here.
https://src.fedoraproject.org/rpms/ruby/pull-request/63

Comment 2 Jun Aruga 2020-06-19 09:23:48 UTC
It was merged to master branch.


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