On 12/2/26 7:27 PM, Daniel Richard G. wrote:
call. The lock file being deleted here is typically the upstream one.
This file may be undesirable when building against system crates, but it
still provides information that may be useful to the package maintainer.
(To get it back, I typically have to unpack the source again.) I would
also note that the file is not restored by a "d/rules clean" action.
Instead of deleting the file, I would suggest moving it out of the way
with a rename, to something like "Cargo.lock.upstream". This should
serve the original purpose of deletion, without throwing away any
information. For completeness, dh_clean could even rename it back.
The Cargo.lock file is a build input that Debian explicitly doesn't use. There's
some risk of vulnerability scanners incorrectly picking up those files and
reporting problems that aren't present in Debian.
Keeping that in mind, what would be a usecase that would require putting the
file into the binary package, that can't be satisfied with reading it from the
source .tar.gz?
Sincerely,
kpcyrd