-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change the default data directory #220
Comments
The backward compatible implementation should be as simple as swapping those two lines. |
Besides the two lines that @aymericbeaumet mentions and the documentation, there are a couple of other places that would need to be touched:
diff --git a/bin/_blackbox_common.sh b/bin/_blackbox_common.sh
index 08671e5..213277a 100755
--- a/bin/_blackbox_common.sh
+++ b/bin/_blackbox_common.sh
@@ -92,11 +92,14 @@ SECRING="${KEYRINGDIR}/secring.gpg"
# Checks if $1 is 0 bytes, and if $1/keyrings
# is a directory
function is_blackbox_repo() {
- if [[ -n "$1" ]] && [[ -d "$1/keyrings" ]]; then
- return 0 # Yep, its a repo
- else
- return 1
- fi
+ for candidate_path in ${BLACKBOXDATA_CANDIDATES[@]}; do
+ # Just want to test the top-level dir
+ candidate_dir=${candidate_path%%/*}
+ if [[ -n "$1" ]] && [[ -d "$1/$candidate_dir" ]]; then
+ return 0 # Yep, its a repo
+ fi
+ done
+ return 1
}
# Return error if not on cryptlist. In case it matters, because that code fragment is just barely big enough that some copyright lawyer might decide to be a jerk about it if you wanted to include it: I, Robin Munn, hereby declare that new lines in the code fragment above (presented in standard Now that the annoying legal requirements are dealt with, this might be a moot point since the With that function either changed or deleted, and the output of |
One more change needed, as I discovered in testing: |
@aymericbeaumet I think, the gpg config in the homebrew formula should be also changed. |
The default data directory blackbox is looking for is
keyrings/live
. This merged PR #218 allows the discovery of alternative vault paths (.blackbox
for now). But the priority order still makeskeyrings/live
the first one it looks for, and the one blackbox is going to create during ablackbox_initialize
.Even though changing the default directory to
.blackbox
should not be breaking, I suggest we do it during a major version bump as it affects assumptions users have on the project.The text was updated successfully, but these errors were encountered: