This is an automated email from the ASF dual-hosted git repository. eolivelli pushed a commit to branch branch-4.17 in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
commit 1f43f2c12d2c41a0b98d2dfbaa4e8496644602de Author: Lari Hotari <[email protected]> AuthorDate: Thu Mar 21 06:28:29 2024 -0700 Improve release script instructions (#4236) (cherry picked from commit 47bf54d5f281ec8b386f13b0b7300a07baf22f81) --- dev/release/000-run-docker.sh | 26 +++++++++++++++++++++++--- dev/release/Dockerfile | 6 ++++-- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/dev/release/000-run-docker.sh b/dev/release/000-run-docker.sh index ab7a313d44..248c2e7fec 100755 --- a/dev/release/000-run-docker.sh +++ b/dev/release/000-run-docker.sh @@ -50,7 +50,9 @@ fi docker build -t "${IMAGE_NAME}-${USER_NAME}" - <<UserSpecificDocker FROM --platform=linux/amd64 ${IMAGE_NAME} RUN groupadd --non-unique -g ${GROUP_ID} ${USER_NAME} && \ - useradd -l -g ${GROUP_ID} -u ${USER_ID} -k /root -m ${USER_NAME} + useradd -l -g ${GROUP_ID} -u ${USER_ID} -k /root -m ${USER_NAME} && \ + ([ "$(dirname "$HOME")" -eq "/home" ] || ln -s /home $(dirname "$HOME")) && \ + mkdir -p /gpg && chown ${USER_ID}:${GROUP_ID} /gpg && chmod 700 /gpg ENV HOME /home/${USER_NAME} UserSpecificDocker @@ -72,7 +74,13 @@ RC_DIR="bookkeeper-${VERSION}-rc${RC_NUM}" RC_TAG="v${VERSION}-rc${RC_NUM}" CMD=" -gpg-agent --daemon --pinentry-program /usr/bin/pinentry --homedir \$HOME/.gnupg --use-standard-socket +# copy ~/.gnupg to /gpg in the container to workaround issue with permissions +cp -Rdp \$HOME/.gnupg /gpg +# remove any previous sockets +rm -rf /gpg/.gnupg/S.* +# set GNUPGHOME to /gpg/.gnupg +export GNUPGHOME=/gpg/.gnupg +gpg-agent --daemon --pinentry-program /usr/bin/pinentry --allow-loopback-pinentry --default-cache-ttl 3600 echo echo 'Welcome to Apache BookKeeper Release Build Env' echo @@ -92,9 +100,21 @@ echo 'RC_TAG = $RC_TAG' echo echo 'Before executing any release scripts, PLEASE configure your git to cache your github password:' echo +echo ' // take a backup of ~/.gitconfig, remember to restore it after the release process' +echo ' \$ cp ~/.gitconfig ~/.gitconfig.bak.\$(date -I)' +echo ' // remove any previous credential helper configuration' +echo ' \$ git config --global -l --name-only | grep credential | uniq | xargs -i{} git config --global --unset-all {}' +echo ' // fix permission warning with git in docker on MacOS' +echo ' \$ git config --global --add safe.directory $PWD' +echo ' \$ git config --global --add safe.directory \$PWD' echo ' // configure credential helper to cache your github password for 1 hr during the whole release process ' echo ' \$ git config --global credential.helper \"cache --timeout=3600\" ' -echo ' \$ git push apache --dry-run ' +echo ' // in another terminal get a GitHub token to be used as a password for the release process, assuming you are using GitHub CLI.' +echo ' \$ gh auth token ' +echo ' // attempt to push to apache remote to cache your password' +echo ' \$ git push apache HEAD:test --dry-run ' +echo ' // cache gpg password by signing a dummy file' +echo ' \$ echo dummy > /tmp/dummy && gpg -sa /tmp/dummy' echo bash " diff --git a/dev/release/Dockerfile b/dev/release/Dockerfile index 06e34d38af..23c28954c1 100644 --- a/dev/release/Dockerfile +++ b/dev/release/Dockerfile @@ -18,6 +18,8 @@ # FROM --platform=linux/amd64 maven:3.9.0-eclipse-temurin-8 +ARG DEBIAN_FRONTEND=noninteractive +RUN apt-get update && \ + apt-get dist-upgrade -y && \ + apt-get install -y g++ cmake gnupg2 vim subversion less zip unzip -RUN apt-get update -RUN apt-get install -y g++ cmake gnupg2 vim subversion
