mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #1308] Redesign the cargo install experience #646
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#646
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @briansmith on GitHub (Dec 1, 2020).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1308
I did
cargo install trust-dnswhich installed a binarynamedin/.cargo/bin/named. There's nothing wrong with that, but I wonder if the names of trust-dns binaries should be prefixed withtrust-dnsto avoid any potential for collisions?Also, because somebody can use
cargo install trust-dnsto installnamed, and because a Cargo.lock is used, it seems like a patch and new release is needed any time a security update is made to a dependency (including any transitive dependency) of trust-dns, if that security update is at all relevant to trust-dns's use of the dependency. Otherwise, people runningcargo installmight get a version with a vulnerability. Maybe it would make more sense for the binaries likenamedto be in their own crate(s) that are versioned independently so that library users would be less affected by such situations.Or, perhaps Trust-DNS binaries are not to be installed with
cargo install? Just because you can, doesn't mean you should.Really my goal here is to just to start a conversation to make sure these issues have been considered.
@briansmith commented on GitHub (Dec 1, 2020):
This also has some ramifications for yanking. One might argue that any crate with binaries and fixed Cargo.lock should be yanked so that
cargo install $crate --version "$version"will fail for all versions with the vulnerability.@briansmith commented on GitHub (Dec 2, 2020):
...and you might not want to yank the Trust-DNS libraries just for issues specific to the binaries.
@bluejekyll commented on GitHub (Dec 2, 2020):
That's a good point on the naming of the binary. We should definitely consider that.
Today, we actually do have the named binary in it's own crate. The only complexity is that the release process for trust-dns is to push all crates together (for consistency). So today, trust-dns is only the named binary.
My personal preference has been to rely on the rustsec advisory system for vulnerabilities, rather than yanking. Though, that doesn't handle the install process your pointing out is an issue, and so maybe yanking binaries is the correct thing? This is a really good question.
@briansmith commented on GitHub (Dec 2, 2020):
To clarify my comments above about
cargo install, I guess as of Cargo 1.37 or so they apply mostly whencargo install --lockedis used and/or when a dependency crate with a security issue hasn't published a minor version update that fixes the security issue.In the case of
cargo install --locked, note that thecargo installdocumentation suggests using--lockedto get (more) reproducible builds. AFAICT there's no easy way to save the Cargo.lock used bycargo installif one doesn't use--locked. I suspect many people, as soon as they learn about these things, will switch to using--locked.In the case where the crate hasn't published a minor version update that fixes the security issue, I would say that's likely to happen more frequently than people would like.
@briansmith commented on GitHub (Dec 2, 2020):
I actually wonder, for Trust-DNS in particular, if it is desired to be available by
cargo installat all. Maybe the Trust-DNS binaries should only be installable from GitHub. That way patches and other non-Cargo dependencies could be used when building the binary, which might be necessary if an important change hasn't been accepted yet by a dependency crate.