1 Commits

Author SHA1 Message Date
dfa71123e2 client: fix base path location deduction when sourced
- Since these files are only ever sourced, deduction must be relative to
  `BASH_SOURCE` (or else realpath will break)

- Fixes client-side `plugins` completion
  * realpath breakage was introduced in #301
2026-02-18 18:10:19 -08:00
10 changed files with 30 additions and 102 deletions

View File

@@ -18,60 +18,6 @@
# Changelog (`docker-finance`)
## 1.3.0 - 2026-02-27
This release focuses on `dfi` code/usage enhancements, a ROOT.cern (`root`) patch release and **breaking** changes to the `dfi` client-side default layout (filesystem).
Also included are dfi-docs updates: [how to get started](https://gitea.evergreencrypto.co/EvergreenCrypto/dfi-docs/src/branch/master/markdown/How-do-I-get-started.md), categorical [plugins](https://gitea.evergreencrypto.co/EvergreenCrypto/dfi-docs/src/branch/master/markdown/How-do-I-use-it.md#plugins) and a new demo of the [Bitcoin plugin](https://gitea.evergreencrypto.co/EvergreenCrypto/dfi-docs/src/branch/master/markdown/How-do-I-use-it.md#plugins-bitcoin).
### 1.3.0 - Fixes
- Fix `root` plugin code documentation (custom plugin location) ([#302](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/302))
### 1.3.0 - Enhancements
- 🚨**Breaking** Change layout of default client/container paths (environment, bind-mounts) ([#301](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/301)) ([#303](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/303))
* Defaults are now consolidated under a single parent directory
* Basenames are now simply-named to avoid verbosity and confusion
* For smoothest transition:
1. Create a parent umbrella directory called `./docker-finance`
2. Rename (or symlink) your `docker-finance` repository (`DOCKER_FINANCE_CLIENT_REPO`) to `./docker-finance/repo`
3. Rename (or symlink) your `docker-finance.d` directory (`DOCKER_FINANCE_CLIENT_CONF`) to `./docker-finance/conf.d`
4. Rename (or symlink) your `finance-flow` directory (`DOCKER_FINANCE_CLIENT_FLOW`) to `./docker-finance/flow`
- Within your `./docker-finance/flow/profiles` directory, rename all subprofile `docker-finance.d` directories to `conf.d`
6. Rename (or symlink) your custom `plugins` directory (`DOCKER_FINANCE_CLIENT_PLUGINS`) to `./docker-finance/plugins`
7. Rename (or symlink) your `share.d` directory (`DOCKER_FINANCE_CLIENT_SHARED`) to `./docker-finance/share.d`
8. Manually update all `./docker-finance/conf.d` environment files for all platforms/tags to reflect the new client-side locations:
- e.g.; `$EDITOR ./docker-finance/conf.d/client/Linux-x86_64/archlinux/default/env/$(whoami)@$(uname -n)`
9. Manually update your `superscript.bash`; changing `docker-finance.d` to `conf.d` where applicable:
- e.g.; `sed -i 's:/docker-finance.d/:/conf.d/:g' ./docker-finance/conf.d/container/shell/superscript.bash`
10. Manually remove the docker-finance `source` completion line from `~/.bashrc` (or `~/.bash_aliases`)
11. Re-run install:
- i.e.; `./docker-finance/repo/client/install.bash && source ~/.bashrc`
12. *Optional* Re-run `gen type=env` to produce the new container-side bind-mount locations:
- i.e.; `dfi archlinux/${USER}:default gen type=env confirm=no`
13. 🥳 Your new defaults can now be changed and paths moved/renamed as you please: simply update your environment file in `conf.d`:
- i.e.; `dfi archlinux/${USER}:default edit type=env`
- ⚠ If changing the expected repository location, you'll need to manually update the `conf.d` environment file as well as your aliases/source (`~/.bashrc`)
- Allow undesirable characters in variable-text columns for respective hledger-flow accounts, related refactoring ([#297](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/297))
- Add `root` interpreter common exit function and test case, refactor CI workflow ([#298](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/298))
- Silence client's `exec` noise, when not debugging ([#299](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/299))
- Pull tags from remote in client Bitcoin plugin ([#300](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/300))
- Decrease bootstrap wait time for client Tor plugin ([#305](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/305))
- Improve usage help for client/container `plugins` commmand, add help to client `plugins` completion ([#306](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/306))
### 1.3.0 - Updates
- Update all repo-related domain links to gitea.evergreencrypto.co ([#296](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/296))
* You can still find this repository mirrored to gitea.com
- Bump `root` to 6.38.02-1 ([#304](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/304)) ([#307](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/pulls/307))
### 1.3.0 - Contributors
- Aaron Fiore
## 1.2.0 - 2026-02-06
This point release focuses on providing a new CI system using [Gitea Actions](https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/actions).

View File

@@ -27,7 +27,7 @@ RUN sed -i 's/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/%wheel ALL=(ALL:ALL) NOPASSWD
USER builder
WORKDIR /home/builder
RUN git clone --depth=1 https://gitlab.archlinux.org/archlinux/packaging/packages/root -b 6.38.02-1
RUN git clone --depth=1 https://gitlab.archlinux.org/archlinux/packaging/packages/root -b 6.38.00-3
WORKDIR /home/builder/root

View File

@@ -67,7 +67,7 @@ fi
# Client-specific environment, including bind mounts (client view)
if [ -z "$global_client_base_path" ]; then
global_client_base_path="$(realpath -s "${BASH_SOURCE[0]}" | rev | cut -d'/' -f7- | rev)"
global_client_base_path="$(dirname $(realpath -s "$BASH_SOURCE" | rev | cut -d'/' -f6- | rev))"
fi
if [ -z "$DOCKER_FINANCE_CLIENT_CONF" ]; then

View File

@@ -20,7 +20,7 @@
#
# Release version (tag format)
version: "v1.3.0"
version: "v1.2.0"
# Container dependencies (used by `version` command)
# NOTE: this must stay inline with Dockerfiles

View File

@@ -2,7 +2,7 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2024,2026 Aaron Fiore (Founder, Evergreen Crypto LLC)
# Copyright (C) 2024 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -99,7 +99,7 @@ function tor::start()
&& echo 'socks5 $_ip 9050' >>$_proxychains" || lib_utils::die_fatal
# Test Tor connection
local -r _sleep="20s"
local -r _sleep="30s"
lib_utils::print_info "${global_container}: testing connection (bootstrapping ~${_sleep})"
sleep "$_sleep" # Give time to bootstrap

View File

@@ -2,7 +2,7 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2024-2026 Aaron Fiore (Founder, Evergreen Crypto LLC)
# Copyright (C) 2024-2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -131,7 +131,7 @@ function docker-finance::completion()
find "${DOCKER_FINANCE_CLIENT_REPO}"/client/plugins/docker "${_args[@]}" -printf 'repo/%P\n' 2>/dev/null
})
declare -r _plugins
mapfile -t _reply < <(compgen -W "help ${_plugins[*]}" -- "$_cur")
mapfile -t _reply < <(compgen -W "${_plugins[*]}" -- "$_cur")
;;
esac
declare -r _reply

View File

@@ -90,7 +90,7 @@ function lib_env::env()
# Environment location
# NOTE: keep aligned with gen.bash
local _env_dir
_env_dir="$(realpath -s "${BASH_SOURCE[0]}" | rev | cut -d'/' -f7- | rev)/conf.d/${global_tag_dir}/env"
_env_dir="$(dirname $(realpath -s "$BASH_SOURCE" | rev | cut -d'/' -f6- | rev))/conf.d/${global_tag_dir}/env"
local _env_file="${_env_dir}/${global_conf_filename}"
# shellcheck source=/dev/null

View File

@@ -2,7 +2,7 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2024,2026 Aaron Fiore (Founder, Evergreen Crypto LLC)
# Copyright (C) 2024 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -71,32 +71,14 @@ function lib_plugins::__parse_args()
\e[32mUsage:\e[0m
$ $global_usage <help | [TAB COMPLETION]> [args]
\e[32mArguments:\e[0m
[None | help]: show this usage help
[TAB COMPLETION]: run given shell plugin
custom = custom plugins in custom plugin location
repo = repository plugins in repository location
[args]: arguments to plugin
$ $global_usage <repo${global_arg_delim_1}plugin | custom${global_arg_delim_1}plugin> [args]
\e[32mExamples:\e[0m
\e[37;2m# See this usage help\e[0m
$ $global_usage help
\e[37;2m# The output of tab completion\e[0m
$ $global_usage \\\t\\\t
custom/example.bash help repo/bitcoin.bash repo/example.bash repo/tor.bash
\e[37;2m# Execute a repository shell plugin in '${_repo}'\e[0m
\e[37;2m# Execute a repository plugin in '${_repo}'\e[0m
$ $global_usage repo${global_arg_delim_1}example.bash \"I'm in repo\"
\e[37;2m# Execute a custom shell plugin in '${_custom}'\e[0m
\e[37;2m# Execute a custom plugin in '${_custom}'\e[0m
$ $global_usage custom${global_arg_delim_1}example.bash \"I'm in custom\"
"

View File

@@ -2,7 +2,7 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2024-2026 Aaron Fiore (Founder, Evergreen Crypto LLC)
# Copyright (C) 2024-2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -71,7 +71,7 @@ function lib_plugins::__parse_args()
\e[32mUsage:\e[0m
$ $global_usage <help | [TAB COMPLETION]> [args]
$ $global_usage [help | [TAB COMPLETION]] [args]
\e[32mArguments:\e[0m
@@ -91,8 +91,8 @@ function lib_plugins::__parse_args()
\e[37;2m# The output of tab completion\e[0m
$ $global_usage \\\t\\\t
custom/billing/invoice.bash custom/example.bash repo/example.bash
custom/billing/manage.bash help repo/timew_to_timeclock.bash
custom/billing/invoice.bash help repo/timew_to_timeclock.bash
custom/billing/manage.bash repo/example.bash
\e[37;2m# Execute a repository shell plugin in '${_repo}'\e[0m
$ $global_usage repo${global_arg_delim_1}example.bash \"I'm in repo\"

View File

@@ -141,7 +141,7 @@ class Plugin final
//!
//! Will load:
//!
//! &emsp; ${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc
//! &emsp; ${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc
//!
//! and pass `using bar = char; bar b;` to the plugin's loader (plugin-implementation defined).
//!
@@ -178,12 +178,12 @@ void load(const common::PluginPath& path, const common::PluginArgs& args)
//! Will load:
//!
//! &emsp; `${DOCKER_FINANCE_CONTAINER_REPO}/plugins/root/example/example.cc`\n
//! &emsp; `${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc`
//! &emsp; `${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc`
//!
//! And pass plugin-implementation defined auto-loader arguments:
//!
//! &emsp; `using foo = int; foo f;` for `${DOCKER_FINANCE_CONTAINER_REPO}/plugins/root/example/example.cc`\n
//! &emsp; `using bar = char; bar b;` for `${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc`
//! &emsp; `using bar = char; bar b;` for `${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc`
//!
//! \warning
//! To utilize plugin auto-(un)loader functionality, the plugin's parent directory *MUST* align with the plugin's namespace\n
@@ -228,7 +228,7 @@ void load(
//!
//! Will load:
//!
//! &emsp; ${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc
//! &emsp; ${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc
//!
//! and pass `using bar = char; bar b;` to the plugin's loader (plugin-implementation defined).
//!
@@ -260,7 +260,7 @@ void load(const std::string& path, const std::string& arg = {})
//! Will load both:
//!
//! &emsp; ${DOCKER_FINANCE_CONTAINER_REPO}/plugins/root/example/example.cc\n
//! &emsp; ${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc
//! &emsp; ${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc
//!
//! \warning
//! To utilize plugin auto-(un)loader functionality, the plugin's parent directory *MUST* align with the plugin's namespace\n
@@ -306,7 +306,7 @@ void load(const std::initializer_list<std::string>& paths)
//!
//! Will unload:
//!
//! &emsp; ${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc
//! &emsp; ${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc
//!
//! and pass `using bar = char; bar b;` to the plugin's unloader (plugin-implementation defined).
//!
@@ -343,12 +343,12 @@ void unload(const common::PluginPath& path, const common::PluginArgs& args)
//! Will unload:
//!
//! &emsp; `${DOCKER_FINANCE_CONTAINER_REPO}/plugins/root/example/example.cc`\n
//! &emsp; `${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc`
//! &emsp; `${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc`
//!
//! And pass plugin-implementation defined auto-unloader arguments:
//!
//! &emsp; `using foo = int; foo f;` for `${DOCKER_FINANCE_CONTAINER_REPO}/plugins/root/example/example.cc`\n
//! &emsp; `using bar = char; bar b;` for `${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc`
//! &emsp; `using bar = char; bar b;` for `${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc`
//!
//! \warning
//! To utilize plugin auto-(un)loader functionality, the plugin's parent directory *MUST* align with the plugin's namespace\n
@@ -393,7 +393,7 @@ void unload(
//!
//! Will unload:
//!
//! &emsp; ${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc
//! &emsp; ${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc
//!
//! and pass `using bar = char; bar b;` to the plugin's unloader (plugin-implementation defined).
//!
@@ -425,7 +425,7 @@ void unload(const std::string& path, const std::string& arg = {})
//! Will unload both:
//!
//! &emsp; ${DOCKER_FINANCE_CONTAINER_REPO}/plugins/root/example/example.cc\n
//! &emsp; ${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc
//! &emsp; ${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc
//!
//! \warning
//! To utilize plugin auto-(un)loader functionality, the plugin's parent directory *MUST* align with the plugin's namespace\n
@@ -497,12 +497,12 @@ void reload(const common::PluginPath& path, const common::PluginArgs& args)
//! Will reload:
//!
//! &emsp; `${DOCKER_FINANCE_CONTAINER_REPO}/plugins/root/example/example.cc`\n
//! &emsp; `${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc`
//! &emsp; `${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc`
//!
//! And pass plugin-implementation defined auto-loader arguments:
//!
//! &emsp; `using foo = int; foo f;` for `${DOCKER_FINANCE_CONTAINER_REPO}/plugins/root/example/example.cc`\n
//! &emsp; `using bar = char; bar b;` for `${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc`
//! &emsp; `using bar = char; bar b;` for `${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc`
//!
//! \warning
//! To utilize plugin auto-(un)loader functionality, the plugin's parent directory *MUST* align with the plugin's namespace\n
@@ -547,7 +547,7 @@ void reload(
//!
//! Will reload:
//!
//! &emsp; ${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc
//! &emsp; ${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc
//!
//! and pass `using bar = char; bar b;` to the plugin's auto-unloader (plugin-implementation defined).
//!
@@ -581,7 +581,7 @@ void reload(
//! Will reload both:
//!
//! &emsp; ${DOCKER_FINANCE_CONTAINER_REPO}/plugins/root/example/example.cc\n
//! &emsp; ${DOCKER_FINANCE_CONTAINER_PLUGINS}/root/example/example.cc
//! &emsp; ${DOCKER_FINANCE_CLIENT_PLUGINS}/root/example/example.cc
//!
//! \warning
//! To utilize plugin auto-(un)loader functionality, the plugin's parent directory *MUST* align with the plugin's namespace\n