Commit c05fd324 authored by Chaoting Liu's avatar Chaoting Liu 😖

find remote gpg setting on-the-go, and bind local gpg socket to it

parent 7b7989f6
......@@ -149,15 +149,20 @@ sign_online_database() {
# remove current signature file and remotely execute gpg --detach-sign command to sign the databases
# enable verbose to indicate the procedure
status_start 'remotely signing the database \n'
ssh $_ssh_user@$_rsync_server -p $_ssh_port rm "packages/$1/$(get_arch)/$1.db.tar.*.sig"
ssh $_ssh_user@$_rsync_server -p $_ssh_port gpg -v --batch --detach-sign "packages/$1/$(get_arch)/$1.db.tar.gz"
for ext in gz xz; do
ssh -R${_remote_socket}:$(gpgconf --list-dir agent-socket) $_ssh_user@$_rsync_server -p $_ssh_port \
gpg --batch --detach-sign packages/$1/$(get_arch)/$1.db.tar.$ext
done
newline
status_done
}
sign_online_pkg() {
# remotely execute gpg --detach-sign command to sign the package
status_start "remotely signing the pkg $2 \n"
ssh $_ssh_user@$_rsync_server -p $_ssh_port gpg -v --batch --detach-sign "packages/$1/$(get_arch)/$2"
ssh $_ssh_user@$_rsync_server -R${_remote_socket}:$(gpgconf --list-dir agent-socket) \
-p $_ssh_port gpg -v --batch --detach-sign "packages/$1/$(get_arch)/$2"
newline
status_done
}
......
......@@ -219,6 +219,7 @@ configure_buildscripts() {
echo "_ssh_user=${ssh_user}" >> "$(pwd)/$chakrafolder/user.conf"
echo "_ssh_port=${ssh_port}" >> "$(pwd)/$chakrafolder/user.conf"
echo "_rsync_server=${rsync_server}" >> "$(pwd)/$chakrafolder/user.conf"
echo "_remote_socket=$(ssh ${ssh_user}@${rsync_server} -p ${ssh_port} gpgconf --list-dir agent-socket)"
fi
fi
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment