• Bug#1102276: fails to compile: the name `hkdf` is defined multiple time

    From Jonas Smedegaard@21:1/5 to All on Mon Apr 7 09:40:01 2025
    Quoting Jonas Smedegaard (2025-04-07 09:29:04)
    Package: librust-secret-service-dev
    Version: 4.0.0-4
    Severity: grave

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512

    Builds involving this package fails to build:

    error[E0428]: the name `hkdf` is defined multiple times
    --> /build/rust-email-lib-0+20250111/debian/cargo_registry/secret-service-4.0.0/src/session.rs:131:1
    |
    111 | fn hkdf(ikm: Vec<u8>, salt: Option<&[u8]>, okm: &mut [u8]) {
    | ---------------------------------------------------------- previous definition of the value `hkdf` here
    ...
    131 | fn hkdf(ikm: Vec<u8>, salt: Option<&[u8]>, okm: &mut [u8]) {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `hkdf` redefined here
    |
    = note: `hkdf` must be defined only once in the value namespace of this module

    error[E0428]: the name `encrypt` is defined multiple times
    --> /build/rust-email-lib-0+20250111/debian/cargo_registry/secret-service-4.0.0/src/session.rs:267:1
    |
    242 | pub fn encrypt(data: &[u8], key: &AesKey, iv: &[u8]) -> Vec<u8> {
    | --------------------------------------------------------------- previous definition of the value `encrypt` here
    ...
    267 | pub fn encrypt(data: &[u8], key: &AesKey, iv: &[u8]) -> Vec<u8> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `encrypt` redefined here
    |
    = note: `encrypt` must be defined only once in the value namespace of this module

    error[E0428]: the name `decrypt` is defined multiple times
    --> /build/rust-email-lib-0+20250111/debian/cargo_registry/secret-service-4.0.0/src/session.rs:284:1
    |
    254 | pub fn decrypt(encrypted_data: &[u8], key: &AesKey, iv: &[u8]) -> Result<Vec<u8>, Error> {
    | ---------------------------------------------------------------------------------------- previous definition of the value `decrypt` here
    ...
    284 | pub fn decrypt(encrypted_data: &[u8], key: &AesKey, iv: &[u8]) -> Result<Vec<u8>, Error> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `decrypt` redefined here
    |
    = note: `decrypt` must be defined only once in the value namespace of this module

    Possibly the cause of this issue is that the Debian packaging carries a
    patch that mangles upstream default feature to enforce a specific
    crypto engine: That might very well wreak havoc for any reverse
    dependency expecting to be able to, well, *choose* a crypto engine.

    Just a guess, and since the patch is totally undocumented - i.e. lacks
    DEP-3 patch headers and is not mentioned in changelog, I give up
    speculating any further...

    - Jonas

    --
    * Jonas Smedegaard - idealist & Internet-arkitekt
    * Tlf.: +45 40843136 Website: http://dr.jones.dk/
    * Sponsorship: https://ko-fi.com/drjones

    [x] quote me freely [ ] ask before reusing [ ] keep private --==============B67214262810504243=MIME-Version: 1.0
    Content-Transfer-Encoding: 7bit
    Content-Description: signature
    Content-Type: application/pgp-signature; name="signature.asc"; charset="us-ascii"

    -----BEGIN PGP SIGNATURE-----

    wsG6BAABCgBvBYJn84DTCRAsfDFGwaABIUcUAAAAAAAeACBzYWx0QG5vdGF0aW9u cy5zZXF1b2lhLXBncC5vcmeZx0jdns/W48ShpC6u9TvegNs/8qdSwjzoCavNcE0z 3RYhBJ/j6cNmkaaf9TzGhCx8MUbBoAEhAABN0w/4h70U9kDd1qLaeQXK0FeX0yt/ YC/OeVGV2Eg/0gInvxojTSvjmqVaXdIzyg+/gqk9Q4L00WLyM/+l9vJqVV62++jV v1xkOZJTRfFX1dFf1823j+0TMXcwkI5eRK8WOhOhbaeipHp5AKvu1r7M2lUXJ1sg 7kgyDuQzOexI7QKHfVLK7Afr0PqwWIvv/DzxUXEn2EswMhTSWA2XwfsW8KaUsIEG vvjHoEJpKzSyNNyzvBOxQhPiE5Lqu9dzJqZMER7MWafacVJW50HPMArWcuKwNwbC RBX4KEtNMRrSlYY+hvlx/MoND3BYd8JVx1WDXPz3Q8vdsNRgg4c0JarYbFZoHNAz rThc5gWVSKQdFAFxrBKGmWpQuCAbZCeSg8wFHuMI