[Pkg-rust-maintainers] Bug#946616: Bug#946616: Bug#946616: dh_auto_install should honor --destdir
infinity0 at debian.org
Tue Jan 7 21:37:56 GMT 2020
Control: notfixed -1 22
Control: tags -1 + wontfix
Sadly this broke the build for binary-crate packages and I've had to revert it in 23. I won't be bringing it back.
The reason is that debhelper passes in an automatic value for $destdir which is different if the package has only a binary crate (debian/$binpkg) vs if the package has both a library and binary crate (debian/tmp).
debhelper does not allow dh-cargo to see what the user actually gave on the command line, so there is no way to tell if the user asked for --destdir=debian/tmp on purpose, or if it was the default value. In the default case, we want to *always* install into debian/$binpkg and never debian/tmp.
So rather than require most binary crates have to manually specify --destdir, I've moved this functionality into the DESTDIR environment variable. It's there if you need it, but it won't be coming from --destdir.
> Hi, this makes sense and I'll get around to it some time.
> OTOH, let me point out that we do also already have a similar mechanism (DEB_CARGO_INSTALL_PREFIX), which is not as general as destdir, but which should cover the most common cases of needing this for Debian rust packages. See dotenv in debcargo-conf for an example. This may or may not cover your use-case but I thought I'd mention it anyway.
> Paride Legovini:
>> Package: dh-cargo
>> Version: 21
>> Severity: normal
>> After trying to use `dh_auto_install --destdir` as documented in
>> dh_auto_install(1) I noticed that the option doesn't produce any effect.
>> I had a quick look at  and it seems that the option is currently
>> being ignored.
>> When packaging "binary" crates (= not libraries) it is sometimes very
>> useful to have the files installed in debian/tmp instead of to
>> debian/pkgname, as this allows more freedom to choose how to actually
>> install the files in the Debian package using e.g. dh_install and dh-exec.
>>  /usr/share/perl5/Debian/Debhelper/Buildsystem/cargo.pm
>> -- System Information:
>> Debian Release: bullseye/sid
>> APT prefers unstable-debug
>> APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental')
>> Architecture: amd64 (x86_64)
>> Kernel: Linux 5.3.0-2-amd64 (SMP w/4 CPU cores)
>> Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
>> Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), LANGUAGE=en_IE.UTF-8 (charmap=UTF-8)
>> Shell: /bin/sh linked to /bin/dash
>> Init: systemd (via /run/systemd/system)
>> LSM: AppArmor: enabled
>> Versions of packages dh-cargo depends on:
>> ii cargo 0.40.0-2
>> ii debhelper 12.7.2
>> ii perl 5.30.0-9
>> ii python3 3.7.5-3
>> dh-cargo recommends no packages.
>> dh-cargo suggests no packages.
>> -- no debconf information
>> Pkg-rust-maintainers mailing list
>> Pkg-rust-maintainers at alioth-lists.debian.net
More information about the Pkg-rust-maintainers