summary refs log tree commit diff
AgeCommit message (Collapse)Author
2022-06-19githooks: add Change-Id commit-msg hookedef
This adds a randomly generated Change-Id to every commit message that doesn't have one yet. Change-Id: Ic0d1bb74dc60633cd70550e0dde6b0b8340c89bd
2022-06-18githooks: initedef
A place for git hooks to live, with an installation script that wires up core.hooksPath correctly. Change-Id: Icf6250764cf580067871580d74f6d5ddc52820eb
2022-06-17ripple/minitrace: add set_tid_address, set_robust_list, and getrandomV
With this, minitrace has all the syscalls needed to run cc1. Change-Id: Iaeef58769f69d64e192af2270eb520e891daec94
2022-06-13ripple/fossil: use std::os::unix::preludeedef
We were accidentally grabbing things from the prelude module already, and this is the cleaner fix. Change-Id: I2c6b669164df11f467eae495d109e096eb267b59
2022-06-12ripple/fossil/chunker: use hex_literal rather than hex escapesedef
A little more explicit, and a bit more readable. Change-Id: Id462c46236e1de547aabd36409260bd1c99f6f88
2022-06-12third_party/cachunker: initedef
This is the BuzHash content-defined chunker extracted from Lennart Poettering's casync, almost verbatim, along with Rust bindings so we can actually use it safely. The bindings are a little bit constrained, since they don't support streaming use, unlike the code they are wrapping. This suffices for our use case: performance and correctness comparison to our native Rust implementation, which should behave identically and perform better. Change-Id: Iee4296f661b036620bafef5a6c6671fe1a750bb6
2022-06-12ripple/website: add SPDX annotationsedef
We haven't picked a license for our web content yet, so this is LicenseRef-NONE for now. Change-Id: Iabfc35860cb8ad0025624161214b1cbb6574e0c5
2022-06-12ripple/shell.nix: provide a wrapper for SUID fusermount(1)edef
fusermount(1) gets shadowed by pkgs.fuse, but we actually need the SUID-root one in the system PATH. This adds a wrapper script that hunts down a SUID-root binary from PATH. Change-Id: Icc5c6789d7b74bf8f6e3c50529333eb6b894527f
2022-06-06fleet/hosts/trieste/web: fix homepage 404ingV
Unless Caddy recently changed how it resolves directives, this has been broken since the initial deployment. `error` directives are processed before `respond` directives[1], and unlike CSS, matcher precision does not impact directive precedence. Sticking a `route` directive around the two of them makes things work as expected. [1]: https://caddyserver.com/docs/caddyfile/directives#directive-order Change-Id: Ic05c6ba9a7143c3a58c2bf7ccd0498a7337257f8
2022-06-06fleet/hosts/trieste/cgit: switch implementation to cgit-pinkV
cgit-pink purports to be actively maintained, unlike its upstream. Change-Id: I4d76324ddb24f5fd3e53aeed6fa6ed17713ee15d
2022-06-04fleet: upgrade to NixOS 22.05V
Change-Id: Ie5542d079ee7b2de06e0faed52343905b3287b39
2022-05-30fleet/hosts/{kaikou,trieste,vityaz}: add my SSH certificateV
This will live alongside the existing keys until I'm completely comfortable with the new setup. Change-Id: Ia26299c0a1ff60fff37104c0fb8eaf31f17a3df5
2022-05-14fleet/modules/web: drop Content-Security-Policy header, for nowV
Blocking inline scripts was causing Gerrit to load fonts from Google's CDN. Rather than adding the appropriate exception for this one instance, and giving myself a false sense of safety (which will inevitably result in me running into other subtle issues of this kind in the future), I'm going to disable the entire thing until I have time to set up reporting. Change-Id: I7c48e4f7d113ecc15dec0bb930918ccc691b124f
2022-05-14fleet/hosts/kaikou: add skeleton Gerrit configV
Change-Id: Ibf68b5b4d7377ea5863315ffd5b6ed24c2874961
2022-05-11fleet/hosts/kaikou: a build automation serverV
This will host a Gerrit instance and run CI jobs for us. Change-Id: Ida683bfa910843cc4bcc8a96f2872364067a17ea
2022-05-10ripple/fossil: permit importing trees from git reposedef
Change-Id: I8329f14bddaaa2d141e82c087821e4602bd1259a
2022-05-05ripple/fossil/mount: document how . and .. workedef
Change-Id: I6c4d471b2840613d30ee95efe14547f2f9c0db6b
2022-05-05ripple/fossil/Cargo.toml: sort depsedef
Change-Id: I0710d80e34bcad1d4b1406731f2d790a0e6972f4
2022-05-05ripple/fossil/mount: terminate out-of-bounds Node::find earlyedef
Node::find would walk the tree all the way down and to the right if given an out of bounds index. This doesn't affect the return value (None), but it does waste some cycles walking down all the way to the deepest rightmost leaf. Change-Id: Ic2f72aa96291a25819fc6c3c2f060fe0182a7663
2022-05-04ripple/fossil/mount: don't allocate on readdiredef
Change-Id: I319a2de0da0ff71f0f337e5a17ef199f23254b11
2022-05-04ripple/fossil/mount: back memtree with a single Vecedef
A single linear array does everything we need here, since we don't actually use the cheap writes the BTreeMaps would permit us, and we save ourselves the hassle of maintaining two parallel lookup structures. Change-Id: I418b0aaa7a3191fab3195f36f2c68ac0f5f0382b
2022-05-03ripple/fossil: handle missing blobs more gracefullyedef
Change-Id: I8a928b57ecc81bea31d757e73b9ece9474628db4
2022-05-03ripple/fossil/mount: expose arbitrary directories by digestedef
This makes the filesystem more like eg /nix/store. ~/src/ripple> ./target/release/add fossil puma5z7rnb4tmnqk8ixgryobay9ifg8txh69635snkgx8dis6quo ~/src/ripple> ./target/release/mount & ~/src/ripple> ls mnt/puma5z7rnb4tmnqk8ixgryobay9ifg8txh69635snkgx8dis6quo benches build.rs Cargo.toml src Change-Id: Ic35f81ffec521f49ce2e4a414919e1ff717d7041
2022-05-03ripple/fossil/mount: make node references more flexibleedef
Essentially, memtree::Node becomes more of a NodeRef, and Node gets renamed to NodeBuf. This permits calling Node::find with an arbitrary owned Directory, without having to move it into the enum. Change-Id: I93838932a00f2e2073e3c7ddf7ce8d302ed4ed59
2022-05-03ripple/fossil/mount: memtree API cleanupedef
This replaces the tuples with a DirectoryEntry struct. Change-Id: I42a49fee03f7abfac9143c48106ebeb964814ca9
2022-05-03ripple/fossil: fix clippy nitedef
Change-Id: I2c9b2a15ac066ec2295d54665afd301f396efdc1
2022-05-03ripple/fossil: don't expose protobufs in the frontendedef
Previously, the CLI took Directory protobufs as input or wrote them as output. Now we just deal in store hashes. Change-Id: I5e0f0f33929ede43d971080c33bdb865f1832b2e
2022-05-03ripple/fossil: add digest_from_str and digest_stredef
These decode digests to and from zbase32 for user-facing uses. Change-Id: Ibd2db960044a97812d18d1a3c107521d78bd7f24
2022-05-03ripple/fossil/chunker: clean up SAFETY commentsedef
stdlib code seems to place these before the blocks, so let's copy their style. Change-Id: Ic77ed43bc8c6807c5ddb126e624f263f8bca5b66
2022-05-03ripple/fossil/add: only accept a single directory argedef
This changes it from building an implicit top-level directory containing all its args, to simply accepting a directory. Change-Id: Iaf00e07d8568367b9eb27f365e8a2eaac3576974
2022-05-03ripple/fossil: expose add_directoryedef
Change-Id: I8e976279bd7aaaaf325129dc5c68a6ca5c750dc6
2022-05-03ripple/fossil: don't recursively fsyncedef
`add` takes about 10 seconds to run on a full LLVM tree, unless it were to spend 4 minutes mostly waiting for a series of tiny fsyncs. It did. Change-Id: I492604bae68e3472f8626a112a33d023947e0e86
2022-05-03ripple/fossil: make store path configurableedef
Change-Id: Ic410619a6115a7059b79593c6fade38236d4e8c1
2022-05-03ripple/fossil: use clapedef
This adds clap to all our binaries. Only add currently takes any args, but previously, the others did not reject args as they should. Change-Id: I6257fb3b218c624ee0124f6ed7313a579db88c4c
2022-05-02ripple/fossil/chunker: iterate smarteredef
This drops the manual `len <= MIN_CHUNK_SIZE` check, and instead combines it into acquiring the to-be-scanned chunk. The pointer-based design doesn't need the iterator to be enumerated from the start of the buffer, so we don't need to use take/skip. Throughput improves about 5%. Change-Id: Ic430c7afde68bf1acfba1a2137a0b8ac064176ea
2022-05-02ripple/fossil/chunker: use const computation for DISCRIMINATORedef
While `const fn` isn't permitted float computation, regular `const` is. This deals with LLVM's reluctance to inline discriminator_from_average, without forcing us to hardcode a magic number. Change-Id: Ibdbfa4c733468517a2feff1ec0deedd1d9b70d47
2022-05-02ripple/fossil/chunker: remove hasher initialisation bounds checkedef
We already check for `self.buffer.len() <= MIN_CHUNK_SIZE`, but LLVM doesn't seem to notice. This boosts throughput by 35%. Change-Id: I1a0e07d276dcc285f8dec3149a629cb6e865c286
2022-05-02ripple/fossil/chunker: factor out Chunker::cutedef
Change-Id: I4fed55703cd02833f377ed0bbc659f3fcfdb949f
2022-05-02ripple/fossil/chunker: eliminate indexing and bounds checksedef
This improves performance by ~12%. Change-Id: I5612b624da77b138fcfb44cbb439b0106580ed70
2022-05-02ripple/fossil/chunker: hardcode the discriminatoredef
This improves performance by ~17%. I had *expected* that rustc would have reduce it to a constant already, but alas. Change-Id: I5c15fe90244da64498d2d6562262db58242ffb24
2022-05-01ripple/fossil: benchmark Chunker using Criterionedef
Performance hovers around 300MiB/s on my machine. Change-Id: I387ccbf065c0b667824ede0675e6a295722f6d4b
2022-05-01ripple/fossil/chunker: DRY out super::* from the testsedef
Change-Id: I7f7c5556dda64f0055f1b6d2da37c36b5c684092
2022-05-01ripple/fossil/chunker: DRY out WINDOW_SIZEedef
Change-Id: Ib5a0bc2fb5b725dfe1f7f4557838529711407203
2022-05-01ripple/fossil/chunker: simplify and test Chunker::size_hintedef
Full test coverage for fossil/chunker! :) Change-Id: I0436a266220bbed6d85c291dcca827d1770294dd
2022-05-01ripple/fossil/chunker: remove Rolling::try_from_sliceedef
We never actually use this directly, and the resulting branch is test coverage noise. Change-Id: Id32b056ca0cd57965d829085d768012e5a9e05ce
2022-05-01ripple/fossil/chunker: test early cutoff for <= MIN_CHUNK_SIZEedef
Full test coverage for Chunker::next! Change-Id: I4f3dbad7e0a56f46d5714e0dd8e07f00ce255928
2022-05-01ripple/fossil/chunker: drop unused derivesedef
Free test coverage win! :) Change-Id: I9bab30e0f0da2810c770cbd8ba5603f0eb2b28e7
2022-05-01ripple/fossil/chunker: clarify MAX_CHUNK_SIZE testedef
Change-Id: Ia5adb5a9056fd0e9ddcd8667c56129219b9d6f52
2022-05-01ripple/fossil/chunker: handle and test boundary condition correctnessedef
This ensures that MIN_CHUNK_SIZE-sized chunks can actually be emitted, and adds tests for both MIN_CHUNK_SIZE and MAX_CHUNK_SIZE chunks. The behaviour for all cases now verifiably matches casync. Change-Id: Ie0bfaf50ec02658069da83ebb30210e6e1963de6
2022-05-01ripple/fossil/chunker: use b-strings for test dataedef
This takes up 80% less vertical space for something that isn't readable to humans to begin with. Change-Id: I04aa27755f0b8d6cdaa83d766f8bf0ecbe3b7a46