Mark,

On 9/29/23 11:18, Mark Thomas wrote:
29 Sept 2023 16:08:37 schu...@apache.org:

This is an automated email from the ASF dual-hosted git repository.

schultz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new 622a3d0a0b Check GPG viability without actually creating a file.
622a3d0a0b is described below

commit 622a3d0a0b79bfaa5686f810295890c5a53987d0
Author: Christopher Schultz <ch...@christopherschultz.net>
AuthorDate: Fri Sep 29 11:07:41 2023 -0400

    Check GPG viability without actually creating a file.

Tx Chris.

Of course. Can you check that it works in your environment(s)?

I only tested this far on MacOS but Linux should work the same and the only thing Windows-specific that I was even slightly worried about was the "-o -" switch for gpg which outputs to stdout.

Thanks,
-chris

build.xml | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/build.xml b/build.xml
index f3d9d845a0..d1af5a62e2 100644
--- a/build.xml
+++ b/build.xml
@@ -2788,13 +2788,21 @@ asf.ldap.username=${release.asfusername}

   <!-- Test GPG by signing build.xml as a sample file. -->
   <target name="gpg-init-3" if="gpg.passphrase">
-    <delete file="build.xml.asc" quiet="true" />
-    <antcall target="sign">
-      <param name="file" value="build.xml" />
-    </antcall>
-    <uptodate srcfile="build.xml" targetfile="build.xml.asc" property="gpg.success" />
-    <delete file="build.xml.asc" quiet="true" />
-    <fail unless="gpg.success" />
+    <exec executable="${gpg.exec}"
+          inputstring="${gpg.passphrase}"
+          failonerror="true"
+          discardOutput="true"
+          logError="true">
+      <arg value="--batch"/>
+      <arg value="--pinentry-mode"/>
+      <arg value="loopback"/>
+      <arg value="--passphrase-fd"/>
+      <arg value="0"/>
+      <arg value="-o" /><!-- write to stdout -->
+      <arg value="-" />
+      <arg value="--detach-sign"/>
+      <arg value="build.xml"/>
+    </exec>
   </target>

   <!-- Packages the core zip distro -->


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to