[DRE-maint] Bug#1011711: ruby-jwt: FTBFS: ERROR: Test "ruby3.0" failed: expect(e).to be_a(TypeError)

Lucas Nussbaum lucas at debian.org
Thu May 26 07:09:16 BST 2022


Source: ruby-jwt
Version: 2.3.0-1
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs
User: lucas at debian.org
Usertags: ftbfs-20220525 ftbfs-bookworm

Hi,

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


Relevant part (hopefully):
>               expect(e).to be_a(TypeError)
>               expect(e.message).to eq('no implicit conversion of OpenSSL::PKey::RSA into String')
>             end
>           end
> 
>         expected #<OpenSSL::PKey::PKeyError: pkeys are immutable on OpenSSL 3.0> to be a kind of NoMethodError
>       # ./spec/jwk/decode_with_jwk_spec.rb:93:in `block (5 levels) in <top (required)>'
> 
> Finished in 9.17 seconds (files took 0.24023 seconds to load)
> 239 examples, 48 failures
> 
> Failed examples:
> 
> rspec ./spec/jwk/ec_spec.rb:11 # JWT::JWK::EC.new when a keypair with both keys given creates an instance of the class
> rspec ./spec/jwk/ec_spec.rb:19 # JWT::JWK::EC.new when a keypair with only public key is given creates an instance of the class
> rspec './spec/jwk/ec_spec.rb[1:3:1:1:1]' # JWT::JWK::EC.import when crv=P-256 when keypair is private returns a private key
> rspec './spec/jwk/ec_spec.rb[1:3:1:1:2:1]' # JWT::JWK::EC.import when crv=P-256 when keypair is private with a custom "kid" value imports that "kid" value
> rspec './spec/jwk/ec_spec.rb[1:3:1:2:1:1]' # JWT::JWK::EC.import when crv=P-256 when keypair is public returns a public key returns a hash with the public parts of the key
> rspec './spec/jwk/ec_spec.rb[1:3:2:2:1:1]' # JWT::JWK::EC.import when crv=P-384 when keypair is public returns a public key returns a hash with the public parts of the key
> rspec './spec/jwk/ec_spec.rb[1:3:2:1:1]' # JWT::JWK::EC.import when crv=P-384 when keypair is private returns a private key
> rspec './spec/jwk/ec_spec.rb[1:3:2:1:2:1]' # JWT::JWK::EC.import when crv=P-384 when keypair is private with a custom "kid" value imports that "kid" value
> rspec './spec/jwk/ec_spec.rb[1:3:3:2:1:1]' # JWT::JWK::EC.import when crv=P-521 when keypair is public returns a public key returns a hash with the public parts of the key
> rspec './spec/jwk/ec_spec.rb[1:3:3:1:1]' # JWT::JWK::EC.import when crv=P-521 when keypair is private returns a private key
> rspec './spec/jwk/ec_spec.rb[1:3:3:1:2:1]' # JWT::JWK::EC.import when crv=P-521 when keypair is private with a custom "kid" value imports that "kid" value
> rspec ./spec/jwk/ec_spec.rb:64 # JWT::JWK::EC#export when private key is requested returns a hash with the both parts of the key
> rspec ./spec/jwk/ec_spec.rb:45 # JWT::JWK::EC#export when keypair with public key is exported returns a hash with the public parts of the key
> rspec ./spec/jwk/ec_spec.rb:55 # JWT::JWK::EC#export when keypair with public key is exported when a custom "kid" is provided exports it
> rspec ./spec/jwk/ec_spec.rb:32 # JWT::JWK::EC#export when keypair with private key is exported returns a hash with the both parts of the key
> rspec ./spec/integration/readme_examples_spec.rb:261 # README.md code test claims JWK
> rspec ./spec/integration/readme_examples_spec.rb:53 # README.md code test algorithm usage ECDSA
> rspec ./spec/jwk_spec.rb:14 # JWT::JWK.import creates a ::JWT::JWK::RSA instance
> rspec ./spec/jwk_spec.rb:36 # JWT::JWK.import when keypair with defined kid is imported returns the predefined kid if jwt_data contains a kid
> rspec ./spec/jwk_spec.rb:21 # JWT::JWK.import parsed from JSON creates a ::JWT::JWK::RSA instance from JSON parsed JWK
> rspec ./spec/jwk_spec.rb:59 # JWT::JWK.new when EC key is given 
> rspec './spec/jwt_spec.rb[1:12:1]' # JWT alg: ES256 should generate a valid token
> rspec './spec/jwt_spec.rb[1:12:2]' # JWT alg: ES256 should decode a valid token
> rspec './spec/jwt_spec.rb[1:12:3]' # JWT alg: ES256 wrong key should raise JWT::DecodeError
> rspec './spec/jwt_spec.rb[1:12:4]' # JWT alg: ES256 wrong key and verify = false should not raise JWT::DecodeError
> rspec ./spec/jwt_spec.rb:342 # JWT Invalid ECDSA curve_name should raise JWT::IncorrectAlgorithm
> rspec './spec/jwt_spec.rb[1:14:4]' # JWT alg: ES512 wrong key and verify = false should not raise JWT::DecodeError
> rspec './spec/jwt_spec.rb[1:14:3]' # JWT alg: ES512 wrong key should raise JWT::DecodeError
> rspec './spec/jwt_spec.rb[1:14:2]' # JWT alg: ES512 should decode a valid token
> rspec './spec/jwt_spec.rb[1:14:1]' # JWT alg: ES512 should generate a valid token
> rspec './spec/jwt_spec.rb[1:13:2]' # JWT alg: ES384 should decode a valid token
> rspec './spec/jwt_spec.rb[1:13:3]' # JWT alg: ES384 wrong key should raise JWT::DecodeError
> rspec './spec/jwt_spec.rb[1:13:1]' # JWT alg: ES384 should generate a valid token
> rspec './spec/jwt_spec.rb[1:13:4]' # JWT alg: ES384 wrong key and verify = false should not raise JWT::DecodeError
> rspec ./spec/jwk/rsa_spec.rb:79 # JWT::JWK::RSA.import when keypair is imported with string keys from JSON returns a hash with the public parts of the key
> rspec ./spec/jwk/rsa_spec.rb:70 # JWT::JWK::RSA.import when keypair is imported with symbol keys returns a hash with the public parts of the key
> rspec ./spec/jwk/rsa_spec.rb:89 # JWT::JWK::RSA.import when private key is included in the data creates a complete keypair
> rspec ./spec/jwk/decode_with_jwk_spec.rb:75 # JWT.decode for JWK usecase when jwk keys are loaded from JSON with string keys decodes the token
> rspec ./spec/jwk/decode_with_jwk_spec.rb:60 # JWT.decode for JWK usecase when jwk keys are loaded using a proc/lambda decodes the token
> rspec ./spec/jwk/decode_with_jwk_spec.rb:13 # JWT.decode for JWK usecase when JWK features are used manually is able to decode the token
> rspec ./spec/jwk/decode_with_jwk_spec.rb:23 # JWT.decode for JWK usecase when jwk keys are given as an array and kid is in the set is able to decode the token
> rspec ./spec/jwk/decode_with_jwk_spec.rb:67 # JWT.decode for JWK usecase when jwk keys are rotated decodes the token
> rspec ./spec/jwk/decode_with_jwk_spec.rb:148 # JWT.decode for JWK usecase mixing algorithms using kid header when HMAC secret is pointed to as EC public key fails in some way
> rspec ./spec/jwk/decode_with_jwk_spec.rb:138 # JWT.decode for JWK usecase mixing algorithms using kid header when HMAC secret is pointed to as RSA public key fails in some way
> rspec ./spec/jwk/decode_with_jwk_spec.rb:158 # JWT.decode for JWK usecase mixing algorithms using kid header when ES384 key is pointed to as ES512 key fails in some way
> rspec ./spec/jwk/decode_with_jwk_spec.rb:128 # JWT.decode for JWK usecase mixing algorithms using kid header when EC key is pointed to as RSA public key fails in some way
> rspec ./spec/jwk/decode_with_jwk_spec.rb:110 # JWT.decode for JWK usecase mixing algorithms using kid header when EC key is pointed to as HMAC secret fails in some way
> rspec ./spec/jwk/decode_with_jwk_spec.rb:92 # JWT.decode for JWK usecase mixing algorithms using kid header when RSA key is pointed to as HMAC secret fails in some way
> 
> Randomized with seed 25919
> 
> Coverage report generated for RSpec to /<<PKGBUILDDIR>>/coverage. 551 / 629 LOC (87.6%) covered.
> Stopped processing SimpleCov as a previous error not related to SimpleCov has been detected
> /usr/bin/ruby3.0 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.10.3/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/exe/rspec --pattern ./spec/\*\*/\*_spec.rb --format documentation failed
> ERROR: Test "ruby3.0" failed: 


The full build log is available from:
http://qa-logs.debian.net/2022/05/25/ruby-jwt_2.3.0-1_unstable.log

All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20220525;users=lucas@debian.org
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20220525&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