Bug#871093: ruby-rbnacl: FTBFS: ERROR: Test "ruby2.3" failed.
Package: ruby-rbnacl Version: 5.0.0-1 Followup-For: Bug #871093 User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu artful ubuntu-patch autopkgtest The build failure is caused by a bugfix change in libsodium 1.0.13 that changed the alignment (and therefore the size) of the blake2b_state struct. Please find attached a patch for this issue. -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developerhttp://www.debian.org/ slanga...@ubuntu.com vor...@debian.org diff -Nru ruby-rbnacl-5.0.0/debian/patches/fix-blake2b_state-struct-size.patch ruby-rbnacl-5.0.0/debian/patches/fix-blake2b_state-struct-size.patch --- ruby-rbnacl-5.0.0/debian/patches/fix-blake2b_state-struct-size.patch 1969-12-31 16:00:00.0 -0800 +++ ruby-rbnacl-5.0.0/debian/patches/fix-blake2b_state-struct-size.patch 2017-08-30 21:05:40.0 -0700 @@ -0,0 +1,30 @@ +Description: pad blake2b_state struct declaration for libsodium 1.0.13 + libsodium 1.0.13 includes a bugfix to the alignment of the + crypto_generichash_blake2b_state struct, which was supposed to be declared + CRYPTO_ALIGN(64). Non-obviously, this refers to 64 *byte* alignment, not + 64 *bit* alignment, and accordingly, initialization functions that try to + zero out a struct will walk off the end and scribble on memory if the struct + they're passed isn't padded out to a multiple of 64. + . + The size of this struct rounds up to 384 bytes (6*64). On a 32-bit system + (where sizeof(size_t) == 4), the declared members of the struct only add + up to 357 bytes. Add 27 bytes of padding to our allocated struct, so that + we allocate enough memory for either 32-bit or 64-bit architectures. + (Ideally we would just declare an alignment for the struct the same as we do + in GCC, but this doesn't appear to be supported in ffi.) +Author: Steve Langasek + +Index: ruby-rbnacl-5.0.0/lib/rbnacl/hash/blake2b.rb +=== +--- ruby-rbnacl-5.0.0.orig/lib/rbnacl/hash/blake2b.rb ruby-rbnacl-5.0.0/lib/rbnacl/hash/blake2b.rb +@@ -175,7 +175,8 @@ +:f, [:uint64, 2], +:buf, [:uint8, 2 * 128], +:buflen, :size_t, +- :last_node, :uint8 ++ :last_node, :uint8, ++ :padding, [:uint8, 27] + end + end + end diff -Nru ruby-rbnacl-5.0.0/debian/patches/series ruby-rbnacl-5.0.0/debian/patches/series --- ruby-rbnacl-5.0.0/debian/patches/series 2017-07-08 23:57:19.0 -0700 +++ ruby-rbnacl-5.0.0/debian/patches/series 2017-08-30 20:51:40.0 -0700 @@ -3,3 +3,4 @@ 0003-Drop-usage-of-git-in-gemspec.patch 0004-Drop-gem-dependency-on-rbnacl-libsodium.patch 0005-Drop-development-dependency-on-bundler.patch +fix-blake2b_state-struct-size.patch
Bug#871093: ruby-rbnacl: FTBFS: ERROR: Test "ruby2.3" failed.
Source: ruby-rbnacl Version: 5.0.0-1 Severity: serious Tags: buster sid User: debian...@lists.debian.org Usertags: qa-ftbfs-20170805 qa-ftbfs Justification: FTBFS on amd64 Hi, During a rebuild of all packages in sid, your package failed to build on amd64. Relevant part (hopefully): > /usr/bin/ruby2.3 /usr/bin/gem2deb-test-runner > > ┌──┐ > │ Checking Rubygems dependency resolution on ruby2.3 > │ > └──┘ > > GEM_PATH=debian/ruby-rbnacl/usr/share/rubygems-integration/all:/var/lib/gems/2.3.0:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.3.0:/usr/share/rubygems-integration/2.3.0:/usr/share/rubygems-integration/all > ruby2.3 -e gem\ \"rbnacl\" > > ┌──┐ > │ Run tests for ruby2.3 from debian/ruby-tests.rake > │ > └──┘ > > RUBYLIB=/<>/debian/ruby-rbnacl/usr/lib/ruby/vendor_ruby:. > GEM_PATH=debian/ruby-rbnacl/usr/share/rubygems-integration/all:/var/lib/gems/2.3.0:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.3.0:/usr/share/rubygems-integration/2.3.0:/usr/share/rubygems-integration/all > ruby2.3 -S rake -f debian/ruby-tests.rake > /usr/bin/ruby2.3 /usr/bin/rspec --pattern ./spec/\*\*/\*_spec.rb --format > documentation > [32m[Coveralls] Set up the SimpleCov formatter.[0m > [32m[Coveralls] Using SimpleCov's default settings.[0m > > Randomized with seed 38405 > > RbNaCl::AEAD::ChaCha20Poly1305Legacy > decrypt > raises on a truncated message to decrypt > raises on a corrupt ciphertext > raises on a long nonce > raises when the additional data is truncated > raises on a short nonce > decrypts a message > raises when the additional data is corrupt > new > raises on a short key > raises on a nil key > accepts strings > raises on a long key > encrypt > raises on a short nonce > encrypts a message > works with an empty additional data > raises on a long nonce > works with an empty message > > RbNaCl::SecretBoxes::XSalsa20Poly1305 > open > decrypts a message > raises on a long nonce > raises on a truncated message to decrypt > raises on a short nonce > raises on a corrupt ciphertext > box > encrypts a message > raises on a long nonce > raises on a short nonce > new > accepts strings > raises on a short key > raises on a nil key > > RbNaCl::PasswordHash::SCrypt > calculates the correct digest for a reference password/salt > > RbNaCl::Boxes::Curve25519XSalsa20Poly1305::PublicKey > #to_s > returns the bytes of the key > equality > equal keys are equal > equal keys are equal to the string > keys are not equal to another key > keys are not equal to zero > new > rejects a nil key > accepts a valid key > rejects a short key > #to_bytes > returns the bytes of the key > serialization > supports #inspect > supports #to_str > supports #to_s > lexicographic sorting > can be compared lexicographically to a key smaller than it > can be compared lexicographically to a key larger than it > > RbNaCl::PasswordHash::Argon2 > creates digest string > verifies password > calculates the correct digest for a reference password/salt > fails on invalid passwords > > RbNaCl::Hash > sha512 > calculates the correct hash for an empty string > doesn't raise on a null byte > calculates the correct hash for a reference string > sha256 > calculates the correct hash for a reference string > calculates the correct hash for an empty string > doesn't raise on a null byte > > RbNaCl::Signatures::Ed25519::SigningKey > signs messages as bytes > generates keys > serializes to bytes > serializes the internal signing key to bytes > lexicographic sorting > can be compared lexicographically to a key smaller than it > can be compared lexicographically to a key larger than it > serialization > supports #to_str > supports #inspect > supports #to_s > equality > equal keys are equal > equal keys are equal to the string > keys are not equal to another key > keys are not equal to zero > > RbNaCl::Boxes::Curve25519XSalsa20Poly1305 > open > raises on a truncated message to decrypt > raises on a short nonce > decrypts a message > raises on a long nonce > raises on a corrupt ciphertext > new > raises TypeError on a nil public key > raises RbNaCl::LengthError on an invalid public key > accepts KeyPairs > raises TypeError on a nil secret key > accepts strings > raises RbNaCl::LengthError on an invalid secret key > box > raises on a long nonce > encrypts a message > rais