Bug#850967: Clarify /usr/bin/foo should not be hardcoded even in upstream parts
On Wed, 11 Jan 2017 13:51:27 -0500 Daniel Kahn Gillmor <dkg@debian.org> wrote:
> Please do not do this to gpg-agent unless upstream is fine with this
> change. I have more important things i want to consider divergence from
> upstream about, and i don't think this particular scenario is a healthy
> use of debian policy.
>
> I laud Ian's goals of making debugging easier, but the particular
> pattern he describes (wrapping stuff and putting the wrappers in $PATH)
> is not the only way to ease debugging, and is at least as vulnerable to
> the problems he associates with other techniques ("too easy to forget to
> put back", etc) as they are.
As another technical alternative, which I haven't seen mentioned
elsewhere in this thread or related bug reports: when I need to override
a packaged binary or file temporarily for debugging purposes, without
forgetting to restore it later, I tend to use "mount --bind
/my/replacement /usr/bin/foo". For instance, for local testing while
developing dh-cargo, which required a newer version of Cargo than
packaged in Debian at the time, I built a local version of Cargo and did
"mount --bind ~/src/cargo/target/debug/cargo /usr/bin/cargo". That
allowed me to easily test-build packages before the availability of a
Debian package of a sufficiently new Cargo.
This technique also has the advantage of vanishing on reboot, reverting
back to the system binary.
This seems appropriate for a local debugging technique with a temporary
lifetime. Such local interposition hacks help determine or debug a
solution to some problem, which should ideally then lead to a fix to the
software itself, fixing the problem for everyone and allowing the
software to work out of the box for more people.
Reply to: