[pacman-dev] [PATCH 1/2] libmakepkg: always remap debug prefix

Eli Schwartz eschwartz at archlinux.org
Thu Apr 22 21:18:45 UTC 2021


On 4/22/21 4:57 PM, Morgan Adamiec wrote:
> Rust emits some debugging info even in release mode. This info includes
> the paths where the files were built. So you end up with
> "WARNING: Package contains reference to $srcdir`".

The references are only included if you don't strip the package, I
guess... I'm not even sure what the utility of options=(!debug !strip)
is, because what people actually want, I think, is a tristate:

- no-debug-strip-it-if-its-there
- debug
- debug but strip it into detached symbols

This patch only affects:

- no-debug-but-keep-it-if-its-there

The general srcdir warning is really only there to suggest that the
software might be buggy and trying to do something at runtime with a
path that won't exist on other people's machines.

It's a false positive here (only with !strip though), but so is
package.json in nodejs land.

Not sure what the solution is, maybe we could remap it to the empty
string? Or just strip the package. :p

> Plus if you're not
> building in a chroot then the package will contain your homedir and
> hence username which can be a privacy issue.


This is an invalid argument; the $srcdir is also stored in the
.BUILDINFO file, by design, and therefore also contains the same string
you're trying to redact here.

-- 
Eli Schwartz
Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20210422/72837d18/attachment.sig>


More information about the pacman-dev mailing list