Skip to content

Commit 9a81694

Browse files
committed
HBASE-27312 Update create-release to work with maven-gpg-plugin-3.0.1 and gnupg >= 2.1.x
1 parent f238a92 commit 9a81694

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

dev-support/create-release/README.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ $ scp ~/gpg.example.apache.pub example.gce.host:
105105
# gpg-agent's extra socket (this will restrict what commands the remote node is allowed to have
106106
# your agent handle. Note that the gpg guide above can help you set this up in your ssh config
107107
# rather than typing it in ssh like this every time.
108+
# Note that as of maven-gpg-plugin, with gnupg >= 2.1, the plugin uses `--pinentry-mode error`,
109+
# which is apparently not supported over the `extra` socket. These instructions may require
110+
# tweaking.
108111
$ ssh -i ~/.ssh/my_id \
109112
-R "/run/user/1000/gnupg/S.gpg-agent:$(gpgconf --list-dir agent-extra-socket)" \
110113
-R "/run/user/1000/gnupg/S.gpg-agent.extra:$(gpgconf --list-dir agent-extra-socket)" \

dev-support/create-release/do-release-docker.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ if [ "${HOST_OS}" == "DARWIN" ]; then
310310
fi
311311
log "Launching ssh reverse tunnel from the container to gpg agent."
312312
log " we should clean this up for you. If that fails the PID is in gpg-proxy.ssh.pid"
313-
ssh -p 62222 -R "/home/${USER}/.gnupg/S.gpg-agent:$(gpgconf --list-dir agent-extra-socket)" \
313+
ssh -p 62222 -R "/home/${USER}/.gnupg/S.gpg-agent:$(gpgconf --list-dir agent-socket)" \
314314
-i "${HOME}/.ssh/id_rsa" -N -n localhost >gpg-proxy.ssh.log 2>&1 &
315315
echo $! > "${WORKDIR}/gpg-proxy.ssh.pid"
316316
else
@@ -320,7 +320,7 @@ else
320320
# agent socket and agent extra socket to your local gpg-agent's extra socket. See the README.txt
321321
# for an example.
322322
GPG_PROXY_MOUNT=(--mount \
323-
"type=bind,src=$(gpgconf --list-dir agent-extra-socket),dst=/home/${USER}/.gnupg/S.gpg-agent")
323+
"type=bind,src=$(gpgconf --list-dir agent-socket),dst=/home/${USER}/.gnupg/S.gpg-agent")
324324
fi
325325

326326
banner "Building $RELEASE_TAG; output will be at $WORKDIR/output"

dev-support/create-release/mac-sshd-gpg-agent/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#
3333
# test like:
3434
#
35-
# ssh -p 62222 -R "/home/${USER}/.gnupg/S.gpg-agent:$(gpgconf --list-dir agent-extra-socket)" \
35+
# ssh -p 62222 -R "/home/${USER}/.gnupg/S.gpg-agent:$(gpgconf --list-dir agent-socket)" \
3636
# -i "${HOME}/.ssh/id_rsa" -N -n localhost
3737
#
3838
# launch a docker container to do work that shares the mount for the gpg agent

dev-support/create-release/release-util.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
DRY_RUN=${DRY_RUN:-1} #default to dry run
3131
DEBUG=${DEBUG:-0}
3232
GPG=${GPG:-gpg}
33-
GPG_ARGS=(--no-autostart --batch)
33+
GPG_ARGS=(-v --no-autostart --batch --pinentry-mode error)
3434
if [ -n "${GPG_KEY}" ]; then
3535
GPG_ARGS=("${GPG_ARGS[@]}" --local-user "${GPG_KEY}")
3636
fi
@@ -639,10 +639,16 @@ make_binary_release() {
639639
# a third to assemble the binary artifact. Trying to do
640640
# all in the one invocation fails; a problem in our
641641
# assembly spec to in maven. TODO. Meantime, three invocations.
642-
"${MVN[@]}" clean install -DskipTests
643-
"${MVN[@]}" site -DskipTests
642+
cmd=("${MVN[@]}" clean install -DskipTests)
643+
echo "${cmd[*]}"
644+
"${cmd[@]}"
645+
cmd=("${MVN[@]}" site -DskipTests)
646+
echo "${cmd[*]}"
647+
"${cmd[@]}"
644648
kick_gpg_agent
645-
"${MVN[@]}" install assembly:single -DskipTests -Dcheckstyle.skip=true "${PUBLISH_PROFILES[@]}"
649+
cmd=("${MVN[@]}" install assembly:single -DskipTests -Dcheckstyle.skip=true "${PUBLISH_PROFILES[@]}")
650+
echo "${cmd[*]}"
651+
"${cmd[@]}"
646652

647653
# Check there is a bin gz output. The build may not produce one: e.g. hbase-thirdparty.
648654
local f_bin_prefix="./${PROJECT}-assembly/target/${base_name}"

0 commit comments

Comments
 (0)