[Pkg-rust-maintainers] Bug#1017964: rust-pleaser FTBFS/autopkgtest failure with nix 0.25

Peter Green plugwash at debian.org
Tue Aug 23 02:12:02 BST 2022


Package: rust-pleaser
Version: 0.5.1-4
Severity: serious


rust-pleaser fails to build with the new version of rust-nix.

error[E0061]: this function takes 0 arguments but 1 argument was supplied
     --> src/lib.rs:416:19
      |
416  |     ro.hostname = gethostname(&mut buf)
      |                   ^^^^^^^^^^^ -------- supplied 1 argument
      |                   |
      |                   expected 0 arguments
      |
note: function defined here
     --> /tmp/tmp.ADzPxvKlSH/registry/nix-0.25.0/src/unistd.rs:1020:8
      |
1020 | pub fn gethostname() -> Result<OsString> {
      |        ^^^^^^^^^^^

The API of gethostname has changed. Now instead of taking a buffer
from the caller it retuns a Result<OsString>

Adjusting the code was easy enough, but I notice that the buffer size
used by the new version of gethostname is about 4 times larger than
the one used previously in pleaser. I have not investigated whether
this increase in potential string length has any security implications
for pleaser.

Patch at

https://salsa.debian.org/rust-team/debcargo-conf/-/blob/master/src/pleaser/debian/patches/nix-0.25.patch

Review by someone who knows the codebase would be appreciated.



More information about the Pkg-rust-maintainers mailing list