[Pkg-rust-maintainers] Bug#1120220: rust-rustls-pemfile: FTBFS: left: "Err(Custom { kind: InvalidData, error: \"section end \\"RSA PRIVATE KEY\\" missing\" })"

Santiago Vila sanvila at debian.org
Thu Nov 6 12:00:39 GMT 2025


Package: src:rust-rustls-pemfile
Version: 2.2.0-3
Severity: serious
Tags: ftbfs forky sid

Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202511/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:rust-rustls-pemfile, so that this is still
visible in the BTS web page for this package.

Thanks.

--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean --buildsystem cargo
   dh_auto_clean -O--buildsystem=cargo
debian cargo wrapper: options = ['parallel=2'], profiles = [], parallel = ['-j2'], lto = 
debian cargo wrapper: rust_type = x86_64-unknown-linux-gnu, gnu_type = x86_64-linux-gnu
debian cargo wrapper: running subprocess (['env', 'RUST_BACKTRACE=1', '/usr/bin/cargo', 'clean', '--verbose', '--verbose'],) {'check': True}
     Removed 0 files
   dh_autoreconf_clean -O--buildsystem=cargo
   dh_clean -XCargo.toml.orig -O--buildsystem=cargo
 debian/rules binary
dh binary --buildsystem cargo
   dh_update_autotools_config -O--buildsystem=cargo
   dh_autoreconf -O--buildsystem=cargo
   dh_auto_configure -O--buildsystem=cargo
debian cargo wrapper: options = ['parallel=2'], profiles = [], parallel = ['-j2'], lto = 
debian cargo wrapper: rust_type = x86_64-unknown-linux-gnu, gnu_type = x86_64-linux-gnu
debian cargo wrapper: linking /usr/share/cargo/registry/* into /<<PKGBUILDDIR>>/debian/cargo_registry/
   dh_auto_build -O--buildsystem=cargo
   debian/rules override_dh_auto_test
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_auto_test -- test --all
debian cargo wrapper: options = ['parallel=2'], profiles = [], parallel = ['-j2'], lto = 
debian cargo wrapper: rust_type = x86_64-unknown-linux-gnu, gnu_type = x86_64-linux-gnu
debian cargo wrapper: running subprocess (['env', 'RUST_BACKTRACE=1', '/usr/bin/cargo', '-Zavoid-dev-deps', 'test', '--verbose', '--verbose', '-j2', '--target', 'x86_64-unknown-linux-gnu', '--all'],) {}
warning: unused manifest key: disabled
   Compiling zeroize v1.8.1
     Running `CARGO=/usr/bin/cargo CARGO_CRATE_NAME=zeroize CARGO_MANIFEST_DIR=/<<PKGBUILDDIR>>/debian/cargo_registry/zeroize-1.8.1 CARGO_MANIFEST_PATH=/<<PKGBUILDDIR>>/debian/cargo_registry/zeroize-1.8.1/Cargo.toml CARGO_PKG_AUTHORS='The RustCrypto Project Developers' CARGO_PKG_DESCRIPTION='Securely clear secrets from memory with a simple trait built on
stable Rust primitives which guarantee memory is zeroed using an
operation will not be '\''optimized away'\'' by the compiler.
Uses a portable pure Rust implementation that works everywhere,
even WASM'\!'
' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='Apache-2.0 OR MIT [too-long-redacted] stry=/usr/share/cargo/registry`
warning: unnecessary qualification
   --> /usr/share/cargo/registry/zeroize-1.8.1/src/lib.rs:415:63
    |
415 |             volatile_set((self as *mut Self).cast::<u8>(), 0, mem::size_of::<Self>());
    |                                                               ^^^^^^^^^^^^^^^^^^^^
    |
note: the lint level is defined here
   --> /usr/share/cargo/registry/zeroize-1.8.1/src/lib.rs:7:41
    |
  7 | #![warn(missing_docs, rust_2018_idioms, unused_qualifications)]
    |                                         ^^^^^^^^^^^^^^^^^^^^^
help: remove the unnecessary path segments
    |
415 -             volatile_set((self as *mut Self).cast::<u8>(), 0, mem::size_of::<Self>());
415 +             volatile_set((self as *mut Self).cast::<u8>(), 0, size_of::<Self>());
    |

warning: unnecessary qualification
   --> /usr/share/cargo/registry/zeroize-1.8.1/src/lib.rs:460:43
    |
460 |         let size = self.len().checked_mul(mem::size_of::<Z>()).unwrap();
    |                                           ^^^^^^^^^^^^^^^^^
    |
help: remove the unnecessary path segments
    |
460 -         let size = self.len().checked_mul(mem::size_of::<Z>()).unwrap();
460 +         let size = self.len().checked_mul(size_of::<Z>()).unwrap();
    |

warning: unnecessary qualification
   --> /usr/share/cargo/registry/zeroize-1.8.1/src/lib.rs:840:16
    |
840 |     let size = mem::size_of::<F>();
    |                ^^^^^^^^^^^^^^^^^
    |
help: remove the unnecessary path segments
    |
840 -     let size = mem::size_of::<F>();
840 +     let size = size_of::<F>();
    |

   Compiling rustls-pki-types v1.13.0
     Running `CARGO=/usr/bin/cargo CARGO_CRATE_NAME=rustls_p [too-long-redacted] stry=/usr/share/cargo/registry`
warning: `zeroize` (lib) generated 3 warnings
   Compiling rustls-pemfile v2.2.0 (/<<PKGBUILDDIR>>)
     Running `CARGO=/usr/bin/cargo CARGO_CRATE_NAME=rustls_p [too-long-redacted] stry=/usr/share/cargo/registry`
     Running `CARGO=/usr/bin/cargo CARGO_CRATE_NAME=rustls_p [too-long-redacted] stry=/usr/share/cargo/registry`
     Running `CARGO=/usr/bin/cargo CARGO_CRATE_NAME=integrat [too-long-redacted] stry=/usr/share/cargo/registry`
    Finished `test` profile [unoptimized + debuginfo] target(s) in 1.32s
     Running `CARGO=/usr/bin/cargo CARGO_MANIFEST_DIR=/<<PKGBUILDDIR>> CARGO_MANIFEST_PATH=/<<PKGBUILDDIR>>/Cargo.toml CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='Basic .pem file parser for keys and certificates' CARGO_PKG_HOMEPAGE='https://github.com/rustls/pemfile' CARGO_PKG_LICENSE='Apache-2.0 OR ISC OR MIT' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=rustls-pemfile CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/rustls/pemfile' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=2.2.0 CARGO_PKG_VERSION_MAJOR=2 CARGO_PKG_VERSION_MINOR=2 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/<<PKGBUILDDIR>>/target/x86_64-unknown-linux-gnu/debug/deps:/<<PKGBUILDDIR>>/target/x86_64-unknown-linux-gnu/debug:/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib' /<<PKGBUILDDIR>>/target/x86_64-unknown-linux-gnu/debug/deps/rustls_pemfile-a38c4ac11cc18e53`

running 7 tests
test tests::unit::rejects_bad_start ... ok
test tests::unit::rejects_invalid_base64 ... ok
test tests::unit::skips_leading_junk ... ok
test tests::unit::skips_non_utf8_junk ... ok
test tests::unit::skips_trailing_junk ... ok
test tests::unit::skips_unrecognised_section ... ok
test tests::unit::rejects_unclosed_start_section ... FAILED

failures:

---- tests::unit::rejects_unclosed_start_section stdout ----

thread 'tests::unit::rejects_unclosed_start_section' panicked at src/tests.rs:64:9:
assertion `left == right` failed
  left: "Err(Custom { kind: InvalidData, error: \"section end \\\"RSA PRIVATE KEY\\\" missing\" })"
 right: "Err(Custom { kind: InvalidData, error: \"section end \\\"-----END RSA PRIVATE KEY-----\\\" missing\" })"
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /usr/src/rustc-1.90.0/library/std/src/panicking.rs:697:5
   1: core::panicking::panic_fmt
             at /usr/src/rustc-1.90.0/library/core/src/panicking.rs:75:14
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed
             at /usr/src/rustc-1.90.0/library/core/src/panicking.rs:403:5
   4: rustls_pemfile::tests::unit::rejects_unclosed_start_section
             at /usr/share/cargo/registry/rustls-pemfile-2.2.0/src/tests.rs:64:9
   5: rustls_pemfile::tests::unit::rejects_unclosed_start_section::{{closure}}
             at /usr/share/cargo/registry/rustls-pemfile-2.2.0/src/tests.rs:61:40
   6: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.90.0/library/core/src/ops/function.rs:253:5
   7: core::ops::function::FnOnce::call_once
             at /usr/src/rustc-1.90.0/library/core/src/ops/function.rs:253:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.


failures:
    tests::unit::rejects_unclosed_start_section

test result: FAILED. 6 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s

error: test failed, to rerun pass `--lib`
dh_auto_test: error: /usr/share/cargo/bin/cargo test --all returned exit code 101
make[1]: *** [debian/rules:6: override_dh_auto_test] Error 25
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:3: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------



More information about the Pkg-rust-maintainers mailing list