You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@toree.apache.org by lr...@apache.org on 2026/09/16 09:00:00 UTC
(incubator-toree) 01/05: Read the GPG passphrase from MAVEN_GPG_PASSPHRASE in Makefile
This is an automated email from the ASF dual-hosted git repository.
lresende pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-toree.git
commit 29e03a613542539bc8106c090d4b8159c826a8c7
Author: Luciano Resende <lr...@apple.com>
AuthorDate: Sat Sep 12 23:12:38 2026 +0200
Read the GPG passphrase from MAVEN_GPG_PASSPHRASE in Makefile
The release tooling used two names for one secret. release-build.sh collects
the passphrase into MAVEN_GPG_PASSPHRASE, the name maven-gpg-plugin reads by
default, while the Makefile, sign-file and the sbt build read GPG_PASSWORD.
Nothing bridged them, so make release signed with an empty passphrase and
succeeded only where a gpg agent already held the key cached.
Settle on MAVEN_GPG_PASSPHRASE everywhere rather than bridging the two, so the
passphrase has a single name across the Makefile, sign-file, build.sbt and
release-build.sh. GPG_PASSWORD is no longer consulted; anyone setting it in a
local script has to rename it.
---
Makefile | 12 ++++++------
RELEASE_NOTES.md | 3 +++
build.sbt | 2 +-
etc/tools/sign-file | 4 ++--
4 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/Makefile b/Makefile
index b2735005..e4a878d3 100644
--- a/Makefile
+++ b/Makefile
@@ -36,7 +36,7 @@ IMAGE?=jupyter/all-spark-notebook:latest
EXAMPLE_IMAGE?=apache/toree-examples
TOREE_DEV_IMAGE?=apache/toree-dev
GPG?=gpg
-GPG_PASSWORD?=
+MAVEN_GPG_PASSPHRASE?=
BINDER_IMAGE?=apache/toree-binder
DOCKER_WORKDIR?=/srv/toree
DOCKER_ARGS?=
@@ -237,7 +237,7 @@ system-test: pip-release .toree-dev-image
# Jars
################################################################################
publish-jars:
- @$(ENV_OPTS) GPG_PASSWORD='$(GPG_PASSWORD)' GPG=$(GPG) sbt publish-signed
+ @$(ENV_OPTS) MAVEN_GPG_PASSPHRASE='$(MAVEN_GPG_PASSPHRASE)' GPG=$(GPG) sbt publish-signed
################################################################################
# PIP PACKAGE
@@ -279,10 +279,10 @@ dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz: dist/toree
pip-release: dist/toree-pip/toree-$(BASE_VERSION).tar.gz dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz
dist/toree-pip/toree-$(BASE_VERSION).tar.gz.asc dist/toree-pip/toree-$(BASE_VERSION).tar.gz.sha512: dist/toree-pip/toree-$(BASE_VERSION).tar.gz
- @GPG_PASSWORD='$(GPG_PASSWORD)' GPG=$(GPG) etc/tools/./sign-file dist/toree-pip/toree-$(BASE_VERSION).tar.gz
+ @MAVEN_GPG_PASSPHRASE='$(MAVEN_GPG_PASSPHRASE)' GPG=$(GPG) etc/tools/./sign-file dist/toree-pip/toree-$(BASE_VERSION).tar.gz
dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.asc dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.sha512: dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz
- @GPG_PASSWORD='$(GPG_PASSWORD)' GPG=$(GPG) etc/tools/./sign-file dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz
+ @MAVEN_GPG_PASSPHRASE='$(MAVEN_GPG_PASSPHRASE)' GPG=$(GPG) etc/tools/./sign-file dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz
sign-pip: dist/toree-pip/toree-$(BASE_VERSION).tar.gz.asc dist/toree-pip/toree-$(BASE_VERSION).tar.gz.sha512 dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.asc dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.sha512
@@ -318,7 +318,7 @@ dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz: dist/toree
bin-release: dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz
dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz.asc dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz.sha512: dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz
- @GPG_PASSWORD='$(GPG_PASSWORD)' GPG=$(GPG) etc/tools/./sign-file dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz
+ @MAVEN_GPG_PASSPHRASE='$(MAVEN_GPG_PASSPHRASE)' GPG=$(GPG) etc/tools/./sign-file dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz
sign-bin: dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz.asc dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz.sha512
@@ -334,7 +334,7 @@ dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz:
src-release: dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz
dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz.asc dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz.sha512: dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz
- @GPG_PASSWORD='$(GPG_PASSWORD)' GPG=$(GPG) etc/tools/./sign-file dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz
+ @MAVEN_GPG_PASSPHRASE='$(MAVEN_GPG_PASSPHRASE)' GPG=$(GPG) etc/tools/./sign-file dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz
sign-src: dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz.asc dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz.sha512
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index adb37acc..724c59b0 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -51,6 +51,9 @@
- pip packages remain as `toree` and `apache-toree` (no change)
- Staging layout on dist.apache.org: the `toree` directory holding the binary
and source artifacts is now `apache-toree`
+* The GPG passphrase is read from `MAVEN_GPG_PASSPHRASE` throughout the release
+ tooling; the `GPG_PASSWORD` variable previously understood by the Makefile,
+ `sign-file` and the sbt build is no longer consulted.
* Release artifacts no longer ship `.md5` checksums, which the ASF has
deprecated for release distribution. `.asc` signatures and `.sha512`
checksums are unchanged.
diff --git a/build.sbt b/build.sbt
index 09724d53..30e924f8 100644
--- a/build.sbt
+++ b/build.sbt
@@ -90,7 +90,7 @@ ThisBuild / libraryDependencies ++= Seq(
)
// Publish settings
-ThisBuild / pgpPassphrase := Some(Properties.envOrElse("GPG_PASSWORD","").toArray)
+ThisBuild / pgpPassphrase := Some(Properties.envOrElse("MAVEN_GPG_PASSPHRASE","").toArray)
ThisBuild / publishTo := {
if (isSnapshot.value)
Some("Apache Staging Repo" at "https://repository.apache.org/content/repositories/snapshots/")
diff --git a/etc/tools/sign-file b/etc/tools/sign-file
index fb854a56..a23e5c78 100755
--- a/etc/tools/sign-file
+++ b/etc/tools/sign-file
@@ -33,8 +33,8 @@ FWDIR="$(cd `dirname $0`/../../; pwd)"
file_to_sign="${FWDIR}/$1"
if [[ -f "${file_to_sign}" ]]; then
echo "Generating signature and sums for ${file_to_sign}"
- echo ${GPG_PASSWORD} | ${GPG} --passphrase-fd 0 --armor --output "${file_to_sign}.asc" --detach-sig "${file_to_sign}"
- echo ${GPG_PASSWORD} | ${GPG} --passphrase-fd 0 --print-md SHA512 "${file_to_sign}" > "${file_to_sign}.sha512"
+ echo ${MAVEN_GPG_PASSPHRASE} | ${GPG} --passphrase-fd 0 --armor --output "${file_to_sign}.asc" --detach-sig "${file_to_sign}"
+ echo ${MAVEN_GPG_PASSPHRASE} | ${GPG} --passphrase-fd 0 --print-md SHA512 "${file_to_sign}" > "${file_to_sign}.sha512"
exit 0
else
echo "ERROR: File ${file_to_sign} does not exist"