[DRE-maint] Bug#1022302: ruby-mime-types: FTBFS: ERROR: Test "ruby3.1" failed. Psych::DisallowedClass: Tried to load unspecified class: MIME::Type

Lucas Nussbaum lucas at debian.org
Sun Oct 23 13:44:00 BST 2022


Source: ruby-mime-types
Version: 3.3.1-2
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs
User: lucas at debian.org
Usertags: ftbfs-20221023 ftbfs-bookworm

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.


Relevant part (hopefully):
> /usr/bin/ruby3.1 /usr/bin/gem2deb-test-runner
> 
> ┌──────────────────────────────────────────────────────────────────────────────┐
> │ Checking Rubygems dependency resolution on ruby3.1                           │
> └──────────────────────────────────────────────────────────────────────────────┘
> 
> GEM_PATH=/<<PKGBUILDDIR>>/debian/ruby-mime-types/usr/share/rubygems-integration/all:/<<PKGBUILDDIR>>/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/3.1.0:/var/lib/gems/3.1.0:/usr/local/lib/ruby/gems/3.1.0:/usr/lib/ruby/gems/3.1.0:/usr/lib/x86_64-linux-gnu/ruby/gems/3.1.0:/usr/share/rubygems-integration/3.1.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/3.1.0 ruby3.1 -e gem\ \"mime-types\"
> 
> ┌──────────────────────────────────────────────────────────────────────────────┐
> │ Run tests for ruby3.1 from debian/ruby-tests.rake                            │
> └──────────────────────────────────────────────────────────────────────────────┘
> 
> RUBYLIB=. GEM_PATH=/<<PKGBUILDDIR>>/debian/ruby-mime-types/usr/share/rubygems-integration/all:/<<PKGBUILDDIR>>/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/3.1.0:/var/lib/gems/3.1.0:/usr/local/lib/ruby/gems/3.1.0:/usr/lib/ruby/gems/3.1.0:/usr/lib/x86_64-linux-gnu/ruby/gems/3.1.0:/usr/share/rubygems-integration/3.1.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/3.1.0 ruby3.1 -S rake -f debian/ruby-tests.rake
> /usr/bin/ruby3.1 -w -I"test" /usr/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/rake_test_loader.rb "test/test_mime_type.rb" "test/test_mime_types.rb" "test/test_mime_types_cache.rb" "test/test_mime_types_class.rb" "test/test_mime_types_lazy.rb" "test/test_mime_types_loader.rb" -v
> Run options: -v --seed 57816
> 
> # Running:
> 
> MIME::Types::#[]#test_0005_can be searched with the complete flag = 0.00 s = .
> MIME::Types::#[]#test_0001_can be searched with a MIME::Type = 0.00 s = .
> MIME::Types::#[]#test_0002_can be searched with a regular expression = 0.00 s = .
> MIME::Types::#[]#test_0003_sorts by priority with multiple matches = 0.00 s = .
> MIME::Types::#[]#test_0006_can be searched with the registered flag = 0.00 s = .
> MIME::Types::#[]#test_0004_can be searched with a string = 0.00 s = .
> MIME::Types::#[]#test_0007_properly returns an empty result on a regular expression miss = 0.00 s = .
> MIME::Type::#to_s, #to_str#test_0002_acts like a string of the canonical content_type for comparison = 0.00 s = .
> MIME::Type::#to_s, #to_str#test_0003_acts like a string for other purposes = 0.00 s = .
> MIME::Type::#to_s, #to_str#test_0001_represents itself as a string of the canonical content_type = 0.00 s = .
> MIME::Types::registry::.add#test_0001_successfully adds a new type = 0.14 s = .
> MIME::Types::registry::.add#test_0005_successfully adds from another MIME::Types = 0.15 s = .
> MIME::Types::registry::.add#test_0002_complains about adding a duplicate type = 0.11 s = .
> MIME::Types::registry::.add#test_0003_does not complain about adding a duplicate type when quiet = 0.11 s = .
> MIME::Types::registry::.add#test_0004_successfully adds from an array = 0.10 s = .
> MIME::Type::#xref_urls#test_0001_translates according to given rules = 0.00 s = .
> MIME::Types::#add#test_0001_successfully adds a new type = 0.00 s = .
> MIME::Types::#add#test_0004_successfully adds from an array = 0.00 s = .
> MIME::Types::#add#test_0002_complains about adding a duplicate type = 0.00 s = .
> MIME::Types::#add#test_0003_does not complain about adding a duplicate type when quiet = 0.00 s = .
> MIME::Types::#add#test_0005_successfully adds from another MIME::Types = 0.00 s = .
> MIME::Type::#eql?#test_0001_is not true for a non-MIME::Type = 0.00 s = .
> MIME::Type::#eql?#test_0002_is not true for a different MIME::Type = 0.00 s = .
> MIME::Type::#eql?#test_0003_is true for an equivalent MIME::Type = 0.00 s = .
> MIME::Types::registry::.count#test_0001_can count the number of types inside = 0.10 s = .
> MIME::Type::#media_type#test_0001_extracts the media type as lowercase = 0.00 s = .
> MIME::Type::#media_type#test_0002_does not remove x- prefixes = 0.00 s = .
> MIME::Type::#default_encoding#test_0002_is base64 for non-text/* types = 0.00 s = .
> MIME::Type::#default_encoding#test_0001_is quoted-printable for text/* types = 0.00 s = .
> MIME::Type::.i18n_key#test_0003_converts text/vCard to text.vcard = 0.00 s = .
> MIME::Type::.i18n_key#test_0004_returns nil when the value provided is not a valid content type = 0.00 s = .
> MIME::Type::.i18n_key#test_0001_converts text/plain to text.plain = 0.00 s = .
> MIME::Type::.i18n_key#test_0002_does not remove x-prefixes = 0.00 s = .
> MIME::Type::#priority_compare#test_0006_sorts (5) based on the use-instead value = 0.00 s = .
> MIME::Type::#priority_compare#test_0003_sorts (3) based on the registration state = 0.00 s = .
> MIME::Type::#priority_compare#test_0002_sorts (2) based on extensions = 0.00 s = .
> MIME::Type::#priority_compare#test_0001_sorts (1) based on the simplified type = 0.00 s = .
> MIME::Type::#priority_compare#test_0004_sorts (4) based on the completeness = 0.00 s = .
> MIME::Type::#priority_compare#test_0005_sorts (5) based on obsolete status = 0.00 s = .
> MIME::Type::#<=>#test_0003_correctly compares types that sort earlier = 0.00 s = .
> MIME::Type::#<=>#test_0006_correctly compares types against strings that sort earlier = 0.00 s = .
> MIME::Type::#<=>#test_0004_correctly compares types that sort later = 0.00 s = .
> MIME::Type::#<=>#test_0005_correctly compares types against equivalent strings = 0.00 s = .
> MIME::Type::#<=>#test_0007_correctly compares types against strings that sort later = 0.00 s = .
> MIME::Type::#<=>#test_0001_correctly compares identical types = 0.00 s = .
> MIME::Type::#<=>#test_0002_correctly compares equivalent types = 0.00 s = .
> MIME::Type::#<=>#test_0008_correctly compares against nil = 0.00 s = .
> MIME::Type::#like?#test_0001_compares two MIME::Types on #simplified values without x- prefixes = 0.00 s = .
> MIME::Type::#like?#test_0002_compares MIME::Type against string without x- prefixes = 0.00 s = .
> MIME::Types::is enumerable#test_0004_is countable with an enumerator = 0.00 s = .
> MIME::Types::is enumerable#test_0003_will create a lazy enumerator = 0.00 s = .
> MIME::Types::is enumerable#test_0001_correctly uses an Enumerable method like #any? = 0.00 s = .
> MIME::Types::is enumerable#test_0002_implements each with no parameters to return an Enumerator = 0.00 s = .
> MIME::Types::registry::.[]#test_0003_sorts by priority with multiple matches = 0.14 s = .
> MIME::Types::registry::.[]#test_0001_can be searched with a MIME::Type = 0.11 s = .
> MIME::Types::registry::.[]#test_0002_can be searched with a regular expression = 0.11 s = .
> MIME::Types::registry::.[]#test_0006_can be searched with the registered flag = 0.12 s = .
> MIME::Types::registry::.[]#test_0004_can be searched with a string = 0.12 s = .
> MIME::Types::registry::.[]#test_0005_can be searched with the complete flag = 0.15 s = .
> MIME::Type::.simplified#test_0005_returns nil when the value provided is not a valid content type = 0.00 s = .
> MIME::Type::.simplified#test_0002_does not remove x- prefixes by default = 0.00 s = .
> MIME::Type::.simplified#test_0003_removes x- prefixes when requested = 0.00 s = .
> MIME::Type::.simplified#test_0004_lowercases mixed-case types = 0.00 s = .
> MIME::Type::.simplified#test_0001_leaves normal types alone = 0.00 s = .
> MIME::Type::#encoding, #encoding=#test_0001_returns #default_encoding if not set explicitly = 0.00 s = .
> MIME::Type::#encoding, #encoding=#test_0003_resets to the default encoding when set to nil or :default = 0.00 s = .
> MIME::Type::#encoding, #encoding=#test_0002_returns the set value when set = 0.00 s = .
> MIME::Type::#encoding, #encoding=#test_0004_raises a MIME::Type::InvalidEncoding for an invalid encoding = 0.00 s = .
> MIME::Type::#to_h#test_0006_has the obsolete and use-instead keys if set = 0.00 s = .
> MIME::Type::#to_h#test_0005_has the obsolete key if set = 0.00 s = .
> MIME::Type::#to_h#test_0007_has the signature key if set = 0.00 s = .
> MIME::Type::#to_h#test_0001_has the required keys (content-type, registered, encoding) = 0.00 s = .
> MIME::Type::#to_h#test_0003_has the extensions key if set = 0.00 s = .
> MIME::Type::#to_h#test_0002_has the docs key if there are documents = 0.00 s = .
> MIME::Type::#to_h#test_0004_has the preferred-extension key if set = 0.00 s = .
> MIME::Type::#raw_sub_type#test_0002_does not remove x- prefixes = 0.00 s = .
> MIME::Type::#raw_sub_type#test_0001_extracts the sub type as case-preserved = 0.00 s = .
> MIME::Type::#use_instead#test_0002_is nil if not set and the type is obsolete = 0.00 s = .
> MIME::Type::#use_instead#test_0003_is a different type if set and the type is obsolete = 0.00 s = .
> MIME::Type::#use_instead#test_0001_is nil unless the type is obsolete = 0.00 s = .
> MIME::Type::#binary?#test_0001_defaults to false for text/* types = 0.00 s = .
> MIME::Type::#binary?#test_0002_defaults to true for non-text/* types = 0.00 s = .
> MIME::Type::#complete?#test_0001_is true when there are extensions = 0.00 s = .
> MIME::Type::#complete?#test_0002_is false when there are no extensions = 0.00 s = .
> MIME::Types::Container#test_0001_marshals and unmarshals correctly = 0.00 s = .
> MIME::Type::#extensions, #extensions=#test_0001_returns an array of extensions = 0.00 s = .
> MIME::Type::#extensions, #extensions=#test_0002_sets a single extension when provided a single value = 0.00 s = .
> MIME::Type::#extensions, #extensions=#test_0003_deduplicates extensions = 0.00 s = .
> MIME::Types::lazy loading::.lazy_load?#test_0003_is false when RUBY_MIME_TYPES_LAZY_LOAD is false = 0.11 s = .
> MIME::Types::lazy loading::.lazy_load?#test_0002_is nil when RUBY_MIME_TYPES_LAZY_LOAD is unset = 0.12 s = .
> MIME::Types::lazy loading::.lazy_load?#test_0001_is true when RUBY_MIME_TYPES_LAZY_LOAD is set = 0.12 s = .
> MIME::Type::#raw_media_type#test_0002_does not remove x- prefixes = 0.00 s = .
> MIME::Type::#raw_media_type#test_0001_extracts the media type as case-preserved = 0.00 s = .
> MIME::Type::#ascii?#test_0002_defaults to false for non-text/* types = 0.00 s = .
> MIME::Type::#ascii?#test_0001_defaults to true for text/* types = 0.00 s = .
> MIME::Types::Cache::.load#test_0002_does not use cache when missing = 0.00 s = .
> MIME::Types::Cache::.load#test_0001_does not use cache when RUBY_MIME_TYPES_CACHE is unset = 0.00 s = .
> MIME::Types::Cache::.load#test_0003_registers the data to be updated by #add_extensions = 0.04 s = .
> MIME::Types::Cache::.load#test_0005_outputs an error when there is a marshal file incompatibility = 0.18 s = .
> MIME::Types::Cache::.load#test_0004_outputs an error when there is an invalid version = 0.22 s = .
> MIME::Types::#type_for#test_0001_finds all types for a given extension = 0.00 s = .
> MIME::Types::#type_for#test_0003_finds multiple extensions = 0.00 s = .
> MIME::Types::#type_for#test_0005_modifying type extensions causes reindexing = 0.00 s = .
> MIME::Types::#type_for#test_0002_separates the extension from filenames = 0.00 s = .
> MIME::Types::#type_for#test_0004_does not find unknown extensions = 0.00 s = .
> MIME::Type::#sub_type#test_0001_extracts the sub type as lowercase = 0.00 s = .
> MIME::Type::#sub_type#test_0002_does not remove x- prefixes = 0.00 s = .
> MIME::Type::.new#test_0002_creates a valid content type just from a string = 0.00 s = .
> MIME::Type::.new#test_0001_fails if an invalid content type is provided = 0.00 s = .
> MIME::Type::.new#test_0003_yields the content type in a block = 0.00 s = .
> MIME::Type::.new#test_0004_creates a valid content type from a hash = 0.00 s = .
> MIME::Type::.new#test_0005_creates a valid content type from an array = 0.00 s = .
> MIME::Types::registry::.type_for#test_0001_finds all types for a given extension = 0.13 s = .
> MIME::Types::registry::.type_for#test_0002_separates the extension from filenames = 0.14 s = .
> MIME::Types::registry::.type_for#test_0003_finds multiple extensions = 0.14 s = .
> MIME::Types::registry::.type_for#test_0005_modifying type extensions causes reindexing = 0.14 s = .
> MIME::Types::registry::.type_for#test_0004_does not find unknown extensions = 0.15 s = .
> MIME::Types::Loader#test_0002_loads JSON files correctly = 0.01 s = .
> MIME::Types::Loader#test_0001_loads YAML files correctly = 0.02 s = E
> MIME::Types::registry::is enumerable#test_0001_correctly uses an Enumerable method like #any? = 0.16 s = .
> MIME::Types::registry::is enumerable#test_0002_implements each with no parameters to return an Enumerator = 0.16 s = .
> MIME::Types::registry::is enumerable#test_0004_is countable with an enumerator = 0.16 s = .
> MIME::Types::registry::is enumerable#test_0003_will create a lazy enumerator = 0.23 s = .
> MIME::Type::#preferred_extension, #preferred_extension=#test_0001_is nil when not set and there are no extensions = 0.00 s = .
> MIME::Type::#preferred_extension, #preferred_extension=#test_0002_is the first extension when not set but there are extensions = 0.00 s = .
> MIME::Type::#preferred_extension, #preferred_extension=#test_0003_is the extension provided when set = 0.00 s = .
> MIME::Type::#preferred_extension, #preferred_extension=#test_0004_is adds the preferred extension if it does not exist = 0.00 s = .
> MIME::Type::#to_json#test_0001_converts to JSON when requested = 0.00 s = .
> MIME::Types::Cache::.save#test_0001_does not create cache when RUBY_MIME_TYPES_CACHE is unset = 0.00 s = .
> MIME::Types::Cache::.save#test_0002_creates the cache  = 0.02 s = .
> MIME::Types::Cache::.save#test_0003_uses the cache = 0.06 s = .
> MIME::Type::#friendly#test_0003_returns nothing for an unknown language = 0.00 s = .
> MIME::Type::#friendly#test_0004_merges new values from an array parameter = 0.00 s = .
> MIME::Type::#friendly#test_0002_returns English when requested = 0.00 s = .
> MIME::Type::#friendly#test_0005_merges new values from a hash parameter = 0.00 s = .
> MIME::Type::#friendly#test_0001_returns English by default = 0.00 s = .
> MIME::Type::#friendly#test_0006_raises an ArgumentError if an unknown value is provided = 0.00 s = .
> MIME::Type::#add_extensions#test_0001_does not modify extensions when provided nil = 0.00 s = .
> MIME::Type::#add_extensions#test_0002_remains deduplicated with duplicate values = 0.00 s = .
> MIME::Type::#xrefs, #xrefs=#test_0001_returns the expected results = 0.00 s = .
> MIME::Types::#count#test_0001_can count the number of types inside = 0.00 s = .
> MIME::Type::#raw_media_type#test_0001_extracts the media type as case-preserved = 0.00 s = .
> MIME::Type::#raw_media_type#test_0002_does not remove x- prefixes = 0.00 s = .
> MIME::Types::lazy loading#test_0001_loads lazily when RUBY_MIME_TYPES_LAZY_LOAD is set = 0.33 s = .
> MIME::Type::#content_type#test_0001_preserves the original case = 0.00 s = .
> MIME::Type::#content_type#test_0002_does not remove x- prefixes = 0.00 s = .
> 
> Finished in 4.168485s, 35.0247 runs/s, 71.0090 assertions/s.
> 
>   1) Error:
> MIME::Types::Loader#test_0001_loads YAML files correctly:
> Psych::DisallowedClass: Tried to load unspecified class: MIME::Type
>     /usr/lib/ruby/3.1.0/psych/class_loader.rb:99:in `find'
>     /usr/lib/ruby/3.1.0/psych/class_loader.rb:28:in `load'
>     /usr/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:424:in `resolve_class'
>     /usr/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:213:in `visit_Psych_Nodes_Mapping'
>     /usr/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
>     /usr/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
>     /usr/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
>     /usr/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:338:in `block in register_empty'
>     /usr/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:338:in `each'
>     /usr/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:338:in `register_empty'
>     /usr/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:146:in `visit_Psych_Nodes_Sequence'
>     /usr/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
>     /usr/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
>     /usr/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
>     /usr/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:318:in `visit_Psych_Nodes_Document'
>     /usr/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
>     /usr/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
>     /usr/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
>     /usr/lib/ruby/3.1.0/psych.rb:335:in `safe_load'
>     /usr/lib/ruby/3.1.0/psych.rb:370:in `load'
>     /<<PKGBUILDDIR>>/debian/ruby-mime-types/usr/share/rubygems-integration/all/gems/mime-types-3.3.1/lib/mime/types/loader.rb:113:in `load_from_yaml'
>     /<<PKGBUILDDIR>>/debian/ruby-mime-types/usr/share/rubygems-integration/all/gems/mime-types-3.3.1/lib/mime/types/loader.rb:49:in `block in load_yaml'
>     /<<PKGBUILDDIR>>/debian/ruby-mime-types/usr/share/rubygems-integration/all/gems/mime-types-3.3.1/lib/mime/types/loader.rb:48:in `each'
>     /<<PKGBUILDDIR>>/debian/ruby-mime-types/usr/share/rubygems-integration/all/gems/mime-types-3.3.1/lib/mime/types/loader.rb:48:in `load_yaml'
>     /<<PKGBUILDDIR>>/test/test_mime_types_loader.rb:26:in `block (2 levels) in <top (required)>'
> 
> 146 runs, 296 assertions, 0 failures, 1 errors, 0 skips
> rake aborted!
> Command failed with status (1): [ruby -w -I"test" /usr/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/rake_test_loader.rb "test/test_mime_type.rb" "test/test_mime_types.rb" "test/test_mime_types_cache.rb" "test/test_mime_types_class.rb" "test/test_mime_types_lazy.rb" "test/test_mime_types_loader.rb" -v]
> 
> Tasks: TOP => default
> (See full trace by running task with --trace)
> ERROR: Test "ruby3.1" failed.


The full build log is available from:
http://qa-logs.debian.net/2022/10/23/ruby-mime-types_3.3.1-2_unstable.log

All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20221023;users=lucas@debian.org
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20221023&fusertaguser=lucas@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

If you reassign this bug to another package, please marking it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects

If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.



More information about the Pkg-ruby-extras-maintainers mailing list