-
Notifications
You must be signed in to change notification settings - Fork 10
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
man page example for --gpg
option doesn't work
#11
Comments
Yes this is indeed a bug. |
While implementing a wrapper which sets the
|
I'm using this rather complex script to work around the "2 gpg homedirs" problem: #!/bin/bash
declare -A homedirs
touch gpg.homedirs
source gpg.homedirs
args=("$@")
for ((i=0; i<"${#args[@]}"; ++i)); do
case ${args[i]} in
--homedir) unset args[i]; homedir=${args[i+1]}; unset args[i+1]; break;;
esac
done
if [ -n "$homedir" ]; then
echo "homedir: $homedir"
echo "${homedirs[$homedir]}"
if [ -n "${homedirs[$homedir]}" ]; then
# override the home directory name
homedir="--homedir ${homedirs[$homedir]}"
else
homedirs[$homedir]=$(TMP=$BUILD_GPGHOME mktemp -d)
echo "homedirs[$homedir]=\"${homedirs[$homedir]}\"" >> gpg.homedirs
homedir="--homedir ${homedirs[$homedir]}"
fi
fi
set -x
/usr/bin/gpg $homedir "${args[@]}" |
@rwmjones what can I do to expedite this issue? |
You'll have to supply a patch. We call gpg here: It's all quite complicated and convoluted code. There's a case for making the |
The
--gpg
option is documented as:but when running
virt-builder --verbose --no-delete-on-failure --cache /var/lib/laminar/run/accountnet-sql-ledger-vm/workspace --gpg 'gpg --homedir /tmp/tmp.A8tzqrzgKj' -o appliance.qcow2 -m 4096 --smp 2 --format qcow2 --arch amd64 --size 20G --commands-from-file virt-builder-commands debian-11
, gpg gets invoked as:clearly overriding the
homedir
passed to gpg with a secondhomedir
argument derived from the value ofTMPDIR
.The text was updated successfully, but these errors were encountered: