Update Cargo.lock for Rust >= 1.80
Strictly parse configuration file
Now, revocatio closes with an error when it encounters an unknown option
in the config file. This is slightly dangerous because it's not possible
to report this failure via the failure hook, but presumably users will
try to run revocatio and notice the crash while tweaking their
configuration.
Fixes: https://todo.sr.ht/~reesmichael1/revocatio/26
Fix configuration for build server
Migrate from deprecated git-repository -> gix
Add support for tar archives
This should work with verifying both files and directories in a tree
structure specified in the config file, in uncompressed, xz, and gz
formats, along with the usual file size and modification time checks.
Implements: https://todo.sr.ht/~reesmichael1/revocatio/14
Fix failing test from new error catching
Fix compilation error in test build
Add support for checking Git repositories
This is a simple check which just verifies that a valid Git repository
exists in the given path and that the latest commit is from the last N
days. It may not always be desirable to actually check the commit time,
but then the user can configure it with an absurdly high number of days
as a workaround.
Implements: https://todo.sr.ht/~reesmichael1/revocatio/15
Allow for giving borg passphrase via BORG_PASSPHRASE
We could still think about interfacing with secret storage eventually,
but this is a good intermediate step. I think it should be possible to
set this environment variable via secret storage when calling the
program if someone *really* cares to do that.
Closes: https://todo.sr.ht/~reesmichael1/revocatio/10
Rework report commands with new hooks system
Rather than have a single command with a hardcoded report format, we now
support calling several commands on both success and failure, with
options for what report format to use.
The idea is that the user can create their own hooks and build reports
out of the data we make available. We'll probably expand this further
over time, but this is a good start.
This commit doesn't include any testing support for the new hooks, but
I'm ready for a break from this feature and want to move on to something
else. I'll open a new issue to add the tests before the v0.2.0 release.
Implements: https://todo.sr.ht/~reesmichael1/revocatio/20
Implements: https://todo.sr.ht/~reesmichael1/revocatio/21
Add install steps to README
Add glob option to default Borg config
Add keywords and categories in preparation for publish
Remove build and deploy steps from CI process
In preparation for the public release, I'm moving the deploy process to
my own private build server. It feels weird to have deployments to my
personal server on every commit to what's supposed to be a public
project.
I also added a badge to the README, mostly so that there's still a
reason to keep the build job around! It's also good to verify that our
tests pass on every commit.
Clean up unwraps throughout codebase
Don't crash on trying to extract invalid gzip data
There's an interesting dilemma about how to handle invalid compression.
It might make sense to tell the user if files aren't being compressed
correctly, but this would be inconsistent with all of the other checks,
which instead only report if all files available are somehow invalid.
For now, we'll just treat any corrupted files as invalid, and then the
test will fail if/once all files in the window are corrupted.
Fixes: https://todo.sr.ht/~reesmichael1/revocatio/23
Add some polish to README
Fix confusing error message on generic I/O errors
We previously assumed that any I/O error was from reading the config
file. However, by now there are lots of places where I/O errors can come
from, which led to confusing/misleading error messages.
Fixes: https://todo.sr.ht/~reesmichael1/revocatio/24
Clean up old code from reorganization