[Pkg-rust-maintainers] Bug#1017533: dh-cargo: Order of cargo:X-Cargo-Built-Using subtitution varies depending on the locale env vars that are set

Rob Shearman rob at graphiant.com
Wed Aug 17 17:20:52 BST 2022


Package: dh-cargo
Version: 24
Severity: normal
X-Debbugs-Cc: rob at graphiant.com

The order of the cargo:X-Cargo-Built-Using substitution generated by dh-cargo-
built-using for binary Rust packages can vary if LC_ALL is set when building.

This means that the contents of the binary package can vary depending on the
environment, which is highlighted as a problem by tools like reprotest.

For example:

    $ LANG=fr_CH.UTF-8 LANGUAGE=fr_CH.UTF-8:fr LC_ALL=fr_CH.UTF-8 dpkg-
buildpackage -uc -us &> /dev/null && cat debian/built-using-repro.substvars
    cargo:Built-Using=
    cargo:X-Cargo-Built-Using=rust-lazycell (= 1.3.0-3), rust-lazy-static (=
1.4.0-1)
    shlibs:Depends=libc6 (>= 2.18), libgcc-s1 (>= 4.2)
    misc:Depends=
    misc:Pre-Depends=
    $ LANG=en_GB.UTF-8 LANGUAGE='en_GB:en' dpkg-buildpackage -uc -us &>
/dev/null && cat debian/built-using-repro.substvars
    cargo:Built-Using=
    cargo:X-Cargo-Built-Using=rust-lazy-static (= 1.4.0-1), rust-lazycell (=
1.3.0-3)
    shlibs:Depends=libc6 (>= 2.18), libgcc-s1 (>= 4.2)
    misc:Depends=
    misc:Pre-Depends=

-- System Information:
Debian Release: 11.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable-
debug'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-16-amd64 (SMP w/5 CPU threads)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8),
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dh-cargo depends on:
ii  cargo      0.47.0-3+b1
ii  debhelper  13.3.4
ii  perl       5.32.1-4+deb11u2
ii  python3    3.9.2-3

dh-cargo recommends no packages.

dh-cargo suggests no packages.



More information about the Pkg-rust-maintainers mailing list