Skip to content

Commit b1a648f

Browse files
authored
HBASE-27312 Update create-release to work with maven-gpg-plugin-3.0.1 and gnupg >= 2.1.x
Signed-off-by: Duo Zhang <zhangduo@apache.org>
1 parent 41c7bd3 commit b1a648f

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 3.0.1, with gnupg >= 2.1, the plugin uses
109+
# `--pinentry-mode error`, which is apparently not supported over the `extra` socket. These
110+
# instructions may require 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
@@ -311,7 +311,7 @@ if [ "${HOST_OS}" == "DARWIN" ]; then
311311
fi
312312
log "Launching ssh reverse tunnel from the container to gpg agent."
313313
log " we should clean this up for you. If that fails the PID is in gpg-proxy.ssh.pid"
314-
ssh -p 62222 -R "/home/${USER}/.gnupg/S.gpg-agent:$(gpgconf --list-dir agent-extra-socket)" \
314+
ssh -p 62222 -R "/home/${USER}/.gnupg/S.gpg-agent:$(gpgconf --list-dir agent-socket)" \
315315
-i "${HOME}/.ssh/id_rsa" -N -n localhost >gpg-proxy.ssh.log 2>&1 &
316316
echo $! > "${WORKDIR}/gpg-proxy.ssh.pid"
317317
else
@@ -321,7 +321,7 @@ else
321321
# agent socket and agent extra socket to your local gpg-agent's extra socket. See the README.txt
322322
# for an example.
323323
GPG_PROXY_MOUNT=(--mount \
324-
"type=bind,src=$(gpgconf --list-dir agent-extra-socket),dst=/home/${USER}/.gnupg/S.gpg-agent")
324+
"type=bind,src=$(gpgconf --list-dir agent-socket),dst=/home/${USER}/.gnupg/S.gpg-agent")
325325
fi
326326

327327
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=(--no-autostart --batch --pinentry-mode error)
3434
if [ -n "${GPG_KEY}" ]; then
3535
GPG_ARGS=("${GPG_ARGS[@]}" --local-user "${GPG_KEY}")
3636
fi
@@ -670,10 +670,16 @@ make_binary_release() {
670670
# a third to assemble the binary artifact. Trying to do
671671
# all in the one invocation fails; a problem in our
672672
# assembly spec to in maven. TODO. Meantime, three invocations.
673-
"${MVN[@]}" clean install -DskipTests
674-
"${MVN[@]}" site -DskipTests
673+
cmd=("${MVN[@]}" clean install -DskipTests)
674+
echo "${cmd[*]}"
675+
"${cmd[@]}"
676+
cmd=("${MVN[@]}" site -DskipTests)
677+
echo "${cmd[*]}"
678+
"${cmd[@]}"
675679
kick_gpg_agent
676-
"${MVN[@]}" install assembly:single -DskipTests -Dcheckstyle.skip=true "${PUBLISH_PROFILES[@]}"
680+
cmd=("${MVN[@]}" install assembly:single -DskipTests -Dcheckstyle.skip=true "${PUBLISH_PROFILES[@]}")
681+
echo "${cmd[*]}"
682+
"${cmd[@]}"
677683

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

0 commit comments

Comments
 (0)