On 16/01/2012 11:26, Konstantin Kolinko wrote: > How to avoid being asked for passphrase if > 1. I do not have gpg installed > 2. Do not want to generate asc files > > It seems that buildbot also has problem with this. > > Maybe check that "gpg.exec" points to an existing executable.
I'll add another property. I was trying to avoid having to do that. Mark > > > 2012/1/16 <ma...@apache.org>: >> Author: markt >> Date: Mon Jan 16 11:11:11 2012 >> New Revision: 1231923 >> >> URL: http://svn.apache.org/viewvc?rev=1231923&view=rev >> Log: >> Automate OpenPGP signature generation for release process. >> >> Modified: >> tomcat/trunk/build.properties.default >> tomcat/trunk/build.xml >> >> Modified: tomcat/trunk/build.properties.default >> URL: >> http://svn.apache.org/viewvc/tomcat/trunk/build.properties.default?rev=1231923&r1=1231922&r2=1231923&view=diff >> ============================================================================== >> --- tomcat/trunk/build.properties.default (original) >> +++ tomcat/trunk/build.properties.default Mon Jan 16 11:11:11 2012 >> @@ -46,6 +46,9 @@ test.accesslog=false >> # Workaround against http://bugs.sun.com/view_bug.do?bug_id=6202721 >> test.jvmarg.egd=-Djava.security.egd=file:/dev/./urandom >> >> +# Location of GPG executable (used only for releases) >> +gpg.exec=/path/to/gpg >> + >> # ----- Default Base Path for Dependent Packages ----- >> # Please note this path must be absolute, not relative, >> # as it is referenced with different working directory >> >> Modified: tomcat/trunk/build.xml >> URL: >> http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1231923&r1=1231922&r2=1231923&view=diff >> ============================================================================== >> --- tomcat/trunk/build.xml (original) >> +++ tomcat/trunk/build.xml Mon Jan 16 11:11:11 2012 >> @@ -1724,7 +1724,7 @@ Apache Tomcat ${version} native binaries >> </target> >> >> <target name="release" >> - >> depends="clean,clean-depend,dist-deployer,installer,package-zip,package-winzip,package-tgz,package-deployer-zip,package-deployer-tgz,javadoc,package-docs-tgz,package-src-zip,package-src-tgz,package-src-jar" >> + >> depends="clean,clean-depend,release-init,dist-deployer,installer,package-zip,package-winzip,package-tgz,package-deployer-zip,package-deployer-tgz,javadoc,package-docs-tgz,package-src-zip,package-src-tgz,package-src-jar" >> description="Create a Tomcat 8 packaged distribution"> >> >> <copy file="KEYS" >> @@ -1758,11 +1758,19 @@ Apache Tomcat ${version} native binaries >> <include name="*.zip"/> >> <include name="*.tar.gz"/> >> <include name="*.md5"/> >> + <include name="*.asc"/> >> </fileset> >> </copy> >> >> </target> >> >> + <!-- Sets properties only required for releases --> >> + <target name="release-init"> >> + <input message="Enter GPG pass-phrase" addproperty="gpg.passphrase" > >> + <handler type="secure"/> >> + </input> >> + </target> >> + >> <!-- Packages the core zip distro --> >> <target name="package-zip" depends="dist-static"> >> <fixcrlf srcdir="${tomcat.dist}" eol="crlf" >> @@ -2528,6 +2536,26 @@ Read the Building page on the Apache Tom >> <basename file="${file}" property="filename" /> >> <checksum file="${file}" property="value" /> >> <echo file="${file}.md5" >> message="${value}${md5sum.binary-prefix}${filename}" /> >> + <!-- Anything that requires an md5 hash, also needs a signature --> >> + <antcall target="sign" > >> + <param name="file" value="${file}" /> >> + </antcall> >> + </target> >> + >> + <!-- Helper target, used to create a detached ascii OpenPGP signature. >> --> >> + <!-- Uses GPG with default key. Requires 'file' as a parameter. Only >> --> >> + <!-- executes if gpg passphrase is set which is only set when using the >> --> >> + <!-- release target. >> --> >> + <target name="sign" if="gpg.passphrase"> >> + <fail unless="file" /> >> + <exec executable="${gpg.exec}" failonerror="true" >> + inputstring="${gpg.passphrase}"> >> + <arg value="--passphrase-fd"/> >> + <arg value="0"/> >> + <arg value="-a"/> >> + <arg value="-b"/> >> + <arg value="${file}"/> >> + </exec> >> </target> >> >> </project> >> >> >> >> --------------------------------------------------------------------- >> 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