Goal

The obnam invocations in the test suite are becoming quite long, because everything is expressed using command line options. This is about to get worse once I implement using credentials for opening a client chunk. I want to keep the options, but I also want to have a configuration file for convenience.

Plan

  • I will use my own clingwrap crate too configuration file support. In addition, I'll use the directories-next crate to determine the default location.
  • Add a reading a default configuration file, if it exists. Use the XDG directory specification for the location.
  • Add a global option --config to specify additional configuration files to read.
  • Add setting the backup repository location via the configuration file.
  • Change the subplot to use the configuration file in all cases.

Notes

  • Ran test suite to make sure it still passes. It did.
  • Added a configuration file module (src/config.rs) that, for now, only allows empty configuration files.
  • Made sure every leaf command gets access to the configuration.
  • Added a subcommand obnam config.
  • Added the field store to the configuration. Changed the subplot to use it.
  • Tidied the branch history, pushed to create a patch, waited for CI to succeed, merged.

Summary

This was a simple goals, but it sets up a way to simplify repeated invocations by using configuration files, so it's an important goal. I'm glad I got it done, given how warm it is today.

Comments?

If you have feedback on this development session, please use the following fediverse thread: https://toot.liw.fi/@liw/114845618243244184.