Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fixes #114.
|
|
As proposed by Alexander Batischev.
Sponsored-by: author
|
|
Create a tokio runtime so that the non-async function for chunkify can
call an async function and have that create and run background tasks.
Brown paper bag mistake: I did the development of this in a separate
program with an async main function. When I integrated it into Obnam
proper, which doesn't have an async main function (yet), I didn't
actually test it works, only that it compiles. Stupid, stupid, stupid.
I know better.
Sponsored-by: author
|
|
Sponsored-by: author
|
|
Many thanks to Daniel Silverstone for helping me get through this.
Sponsored-by: author
|
|
This should make it easier to introduce async, later.
|
|
This is a little cleaner than having main print an error message by
returning an Err value as a Result. For one thing, we can be more sure
we log the error.
Sponsored-by: author
|
|
Change calls to set_message to pass ownership of the message, rather
than just letting it borrow the message.
Sponsored-by: author
|
|
The weird thing about this commit is that all the tests for it already
exist: the subplot compares manifests of "live" and restored data, and
that includes the mtime. The subplot passes on CI, and it passed for me
too — until today.
Today, if I run `./check` on the main branch (which is currently at
481c5d8df21c72db3a3d76e851d25426f3e40647), subplot fails because the
symlinks' mtime is wrong. Most often it's just the nsec part that's
wrong: tests run fast enough that they finish within a second, and they
rarely happen at the edge of the second.
I don't understand why this didn't happen to me before, and why it
doesn't happen to CI — and to Lars, for that matter. git-bisect points
at 755c18a11f87040245964cf411ea8f518b61e0f5, which is a couple months
old, so we should've spotted the breakage by now.
Needless to say, I didn't do any major overhauls of my system lately,
just your usual `apt upgrade` (Debian bullseye/testing amd64). Did some
change in Subplot or Summain obfuscate this? It bothers me that I don't
understand how we could miss this for so long.
|
|
Fixes #119.
|
|
|
|
Also, refactor the client code to split out the HTTP bits more
clearly. The refactor should've been separately, but got entangled
with other changes during frantic debugging.
|
|
|
|
Previously we were deriving a key that was of the wrong length for the
aead crate. Now we make it the right length.
|
|
This makes is harder to accidentally use the wrong metadata for a
chunk.
|
|
This means the config is always the config, and not sometimes the
config or the config and passwords.
Also, there's no config option for encrypting, anymore. It will not be
optional now.
|
|
|
|
This makes it harder to lose the metadata for a chunk, or to use
unrelated metadata and chunk. Also, soon I will refactor things for
encrypting chunks, which will need metadata embedded in the encrypted
chunk.
Sponsored-by: author
|
|
This makes the code doing HTTP requests simpler for easier
comprehension and debugging.
|
|
All unclear error messages should now be clearer. For example, all the
ones related to a file mention the file name and the attempted
operation that failed.
|
|
|
|
|
|
|
|
This adds the machinery. We have to keep the compiled SQL query while
the iterator is in use, so we wrap it in an `SqlResults` struct which
the iterator borrows.
|
|
`LocalGeneration::sql::files()` runs an SQL query, iterates over the
results and collects the rows into a `Vec`. This can fail at any step:
the query might fail to run, or one of the rows might fail to be fetched
or processed.
Right now, we lump all those failures into a `Result` that wraps the
whole return value. This is only possible because we process each row
before returning. Once `Vec` is replaced by an iterator, we won't have
that luxury anymore, so we now wrap each individual element into its own
`Result` (as well as wrapping the whole vector into a `Result` of its
own).
|
|
Backup roots and log file can now say ~/foo/bar to refer to files
relative to the user's home directory.
|
|
Fixes #78.
|
|
|
|
This allows Init::run to not need to be given it as an argument.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This reads a passphrase and derives two passwords from that, and
stores them next to the configuration file. The passwords aren't yet
used for anything, that will come later.
|
|
|
|
|