Hacker News new | past | comments | ask | show | jobs | submit | kpcyrd's comments login

> when there is no reasonable packaging story for the language

For context: I've been around in the Debian Rust team since 2018, but I'm also a very active package maintainer in both Arch Linux and Alpine.

Rust packaging is absolutely trivial with both Arch Linux and Alpine. For Debian specifically there's the policy of "all build inputs need to be present in the Debian archive", which means the source code needs to be spoon-fed from crates.io into the Debian archive.

This is not a problem in itself, and cargo is actually incredibly helpful when building an operating system, since things are very streamlined and machine-readable instead of everybody handrolling their own build systems with Makefiles. Debian explicitly has cargo-based tooling to create source packages. The only manual step is often annotating copyright attributions, since this can not be sufficiently done automatically.

The much bigger hurdle is the bureaucratic overhead. The librust-*-dev namespace is for the most part very well defined, but adding a new crate still requires an explicit approval process, even when uploads are sponsored by seasoned Debian Developers. There was a request for auto-approval for this namespace, like there is for llvm-* or linux-image-*, but back then (many years ago) this was declined.

With this auto-approval rule in place it would also be easier to have (temporarily) multiple versions of a crate in Debian, to make library upgrades easier. This needs to be done sparsely however, since it takes up space in Packages.xz which is also downloaded by all users with every `apt update`. There's currently no way to make a package available only for build servers (and people who want to be one), but this concept has been discussed on mailing lists for this exact reason.

This is all very specific to Debian however, I'm surprised you're blaming Rust developers for this.


> but given the relative "freshness" of your typical Rust package vs say... Debian stable

That's not how Debian development is done, fresh software is uploaded to unstable only and then eventually ends up in a stable release. As a maintainer, Debian stable is something you support, not something you develop against.


This is outdated information. Debian (and other distros) already had their own SBOM format called buildinfo files that encodes this kind of information.

In Debian stable ripgrep on amd64 is currently on version 13.0.0-4+b2.

The relevant buildinfo file can be found here:

https://buildinfos.debian.net/buildinfo-pool/r/rust-ripgrep/...

It encodes the entire Rust dependency graph that was used for this binary, with exact versions of each crate.


If you want certainty you'd use Reproducible Builds and know for sure which compiler generates this binary from the given source code.

This assumes the code is open source, you know which specific source code release was used and the author of the binary is making an effort to document the build environment that was used, e.g. through an attached SBOM.


The build server now needs the actual build dependencies instead of relying on pre-built intermediate build artifacts. This is a good thing, and should be expected from anything that claims to "build from source".


I know it’s a good thing. I’m just curious to what degree packagers see this as extra work. Seems like probably not.


It's going to be a trivial amount of extra work. Packaging build systems (well, the mainstream ones: Debian, RPMs, ebuilds etc.) have the concept of runtime and build-time dependencies, so the maintainers will just need to add a few more packages to the build deps list.


Many distributions have a policy of not using generated files, and more are implementing it after the xz hack. Most package systems have (not just Debian) have the concept of build and deploy dependencies. It is of course more work, and package systems tend to not be well documented and so it is hard to figure out, but it is possible: if you ask the experts they will help


IIRC Debian has a policy on preferring to generated files themselves. I couldn't find the link to it right now, though.



Yep, that says not to include generated files in VCS.

I've also seen the bison and flex output included in VCS, and the same guidelines apply.


s/generated/generate/


"far-left identitarian" - what's that even supposed to mean, https://en.wikipedia.org/wiki/Identitarian_movement is defined as "far-right ethno-nationalism".

"left-wing ethno-nationalism" is an oxymoron.


They are trying to "both sides" alt-right extremism in order to make it look more palatable to shift the Overton window further right.


On the subject of nonsense re-definitions, you might enjoy this comic: https://existentialcomics.com/comic/289


I'm not a fan of the "Reproducible tarballs" section, because it's explicitly about pre-processing the source code with autotools, instead of distributing a pure, unaltered git snapshot (which `git archive` can already generate in a deterministic way).

The section following then mentions signing the pre-processed source code, which I think is the wrong approach. It makes a difficult situation because of how strongly some people encourage signed source code, yet I think autotools is part of the build process and should run on the build server (and double checked by reproducible builds). If people pre-process the .orig.tar.xz they upload to Debian, this pre-processing won't be covered by reproducible builds because it happens undocumented.

The patch for "reproducible tarballs" is quite involved[0] and has rookie mistakes like "pin a specific container image using `@sha256:...` syntax, but then invoke `apt-get update` and `apt-get install` to install whatever Debian ships at that time".

[0]: https://github.com/curl/curl/pull/13250/files


Autotools is slow, ugly, and horrible. There are many better and simpler alternatives that exist now.

Source releases shouldn't be pre-processed in any way. They should build whatever they need to on-the-fly as part of the build.

Other project anti-patterns:

0. Maintaining creaky, fragile, old forks of other projects as dependencies.

1. Git submodules.

2. Too many dependencies.

3. Extremely large code bases that don't prune poor patterns, over-engineering, and dead features.

4. Lots of features. OpenSSL, I'm looking at you.

5. Not signing releases with a passphrase split between multiple developers to requires 2-person keying.

Package management/distro/builder/packager anti-patterns:

6. Patching the hell out of a project without pushing fixes upstream.

7. Inability or failure to source upstream from multiple independent sources, compare them, and verify chain/web of trust using cryptographic signatures.

8. Not following reproducible build guidelines.

9. Not using build caching like sccache.

10. Not building from reproducible sources periodically on the client-side to verify binaries are identical to those built by others.

11. Dependency hell of traditional (non-nix) packages importing zillions of packages.


Maybe you could get involved by pointing out the mistake and proposing the alternative? I imagine that downstream can't easily switch to another distribution method without notice.


Is git archive deterministic? I think github has trouble here. (No argument that is ought to be deterministic.)


The GitHub implementation of git archive does it's best to be deterministic. Some reproducible build systems like e.g. Bazel heavily rely on that.

GitHub had a bug early last year[0] that broke that determinism and it caused a huge uproar. So through a mixture of promises to individual projects and just so many projects relying on it, GitHub's git archive has been ossified into being deterministic (unless they want to lose a lot of goodwill among developers).

[0]: https://github.com/orgs/community/discussions/45830


In my experience, yes. Provided it is done with a known git binary etc.

Best to containerize workflows like this with hash-locked deps so they can be easily verified by others even far in the future with any OCI compatible toolchain.


Made an alternative PR for reproducible tarballs that should work years from now.

https://github.com/curl/curl/pull/13338


RSA has been known to be problematic for a very long time at this point, hopefully it just fades into obscurity soon and we can move on with less error-prone ciphers.


> less error-prone ciphers.

...such as?

The paper also describes how all programming languages that use BigInt data types are likely to be affected. It also specifically refers to the ECDSA TLS attack from 2015, as well as the Minerva/Raccoon attacks which work in a similar way.

As isogeny key exchange algorithms are likely to be all vulnerable after the SIKEp434, SIKEp503, SIKEp610, and SIKEp751 fiasco(s) of last year, I'm curious as to what kind of alternatives you suggest?

Honestly, at this point I'd say anyone that makes these kind of claims that there even are "less error-prone ciphers" just hasn't worked long enough in cryptography to have learned otherwise. And I'd be bold to say it's probably all not possible due to how we design the CPU hardware and their memory interactions.

Even if it's not the software (and it runs in constant time to prevent analysis) there have been lots of acoustic side channel attacks that were just analyzing the sounds that the transistors on the CPU make. So all your random no-op instructions are kind of useless against that, too.

[1] Minerva attack: https://minerva.crocs.fi.muni.cz/

[2] Racoon attack against FDDH: https://raccoon-attack.com/

[3] Key recovery attack on SIDH: https://eprint.iacr.org/2022/975.pdf

[4] Acoustic recovery of GnuPG (RSA) keys: http://cs.tau.ac.il/~tromer/acoustic/


While timing attacks are not one of the ways RSA is more error-prone, it is still more error-prone, particularly regarding client secret selection.


That is only because the way RSA key exchange has been implemented everywhere involves padding. RSA-KEM[1] has been available since forever and no padding is required, though no one uses it for some reason.

RSA-KEM is also trivial to implement as it's virtually identical to textbook RSA, with the sole restriction that m has to be randomly sampled from 1 .. n-1.

And just like that, no padding oracles.

[1] <https://en.wikipedia.org/wiki/Key_encapsulation_mechanism> , <https://datatracker.ietf.org/doc/html/rfc5990>


> less error-prone ciphers.

AKA Intentional backdoors for the NSA.


For programming, I would gladly go with the second option in return for proper flow-control mechanics and data structures.


In modern programming you would reject these arguments as invalid and refuse to perform the execve syscall with something like EINVAL. Instead we now have this additional quirk that's going to be part of the Linux lore forever and people may start relying on as a feature.


At the end of the day, any system used in the real world is going to have "lore", odd quirks that only exist because of historical reasons. Sure we can try to prevent it with good programming practices, but some things are usually only obvious in hindsight, and the real world is messy.


It's all easy if you can throw backward compatibility away after every release and tell users to fuck themselves.


I, for one, would love for the Kernel to tell users to f themselves sometimes an break compatibility. In that order.


Then nobody will want to write software for your OS. But yeah supporting shit software that connect with your software sucks


In modern programming: Someone a dozen dependency-of-dependency-of-dependency steps removed from you reads an RFC tome they found under the sofa, promptly changes the API to return EINVAL for a call that previously succeeded and breaks half the world. But at least it's modern, quirk-free and pure of thought.


I think this happened recently on macos: the libc string parsing functions started complying with the C spec and broke some code (so you now need to check errno and the return value if you want to know the result was valid or not)

I don't think it was deliberate, I suspect they may have switched libc or something.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: