You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Kathey Marsden <km...@sbcglobal.net> on 2005/10/22 04:07:06 UTC

Trouble with release instructions and md5sum.exe


For making the release (step 9) , I am having trouble getting
cygnustools md5sum.exe to work.   I am temporarily just editting
packaging.properties to get this to work as I thought it might be
related to a path problem. Anyway  this is my problem.

If I specify the md5sum.exe  executable, then I get through the md5 step
but (I think) because the output format is wrong the pgp phase hangs.
If I make a script to filter the output to be the same as md5 -q, I get
an IOException.

Any suggestions on how to get this all working on Windows.

Below is the information.

Thanks

Kathey


*script: /marsden/bin/md5.ksh*

c:/build/sdks/cygnustools/md5sum $1 | sed -e 's/ .*//'


 *packaging.properties*
# properties needed for the build.xml in tools/release
#####
#
# important directories

release.dir=${basedir}/tools/release

# location of documentation

docs.out=/derby-docs-10.1/out
bin.html=${bin.dir}/docs/html
bin.pdf=${bin.dir}/docs/pdf

# sign executables
md5.exec=/marsden/bin/md5.ksh
md5.options=

pgp.exec=gpg
pgp.options=--detach-sign --armor


*ant release output*

... [snip all fine]
md5:

BUILD FAILED
D:\svn\opensource\10.1\tools\release\build.xml:145: Following error
occured while executing this line
D:\svn\opensource\10.1\tools\release\build.xml:188: Execute failed:
java.io.IOException: CreateProcess: \marsden\bin\md5.ksh
D:\svn\opensource\10.1/tools/release/db-derby-10.1.2.0-bin.zip error=193


*manual script output*
$ /marsden/bin/md5.ksh
'D:\svn\opensource\10.1/tools/release/db-derby-10.1.2.0-bin.zip'
\d466352991c907ac4c4adbb899ff2b89

*manual md5 output*
$ C:/build/SDKs/cygnustools/md5sum
'D:\svn\opensource\10.1/tools/release/db-derby-10.1.2.0-bin.zip'
\9933c016c92bd25e33941b51b3b60702
*D:\\svn\\opensource\\10.1/tools/release/db-derby-10.1.2.0-bin.zip



Re: Trouble with release instructions and md5sum.exe

Posted by Kathey Marsden <km...@sbcglobal.net>.
Andrew McIntyre wrote:

>
> On Oct 21, 2005, at 10:16 PM, Kathey Marsden wrote:
>
> I'm not sure what example we should put into the wiki, since this 
> problem would appear to be specific to Cygwin. Perhaps a better 
> general recommendation for how to generate MD5 hashes in Windows 
> would be appropriate.
>
Thanks Andrew and Francois for the help.  Switching to a batch file got
me through this trouble.  The forward slashes in the propertes were ok
and got switched around by ant (or somebody).    If the build scripts
were switched to use md5sum instead of md5 that would be more portable
and probably eliminate any need for windows special advise, since md5sum
seems generally available on both unix and Windows.  But I'll add that
to the review.

Kathey




Re: Trouble with release instructions and md5sum.exe

Posted by Bryan Pendleton <bp...@amberpoint.com>.
>> java.io.IOException: CreateProcess: \marsden\bin\md5.ksh
>> D:\svn\opensource\10.1/tools/release/db-derby-10.1.2.0-bin.zip  error=193

I think this is Ant's (and Windows's) way of trying to tell you
that "md5.ksh" is not an executable file.

The <exec> task in Ant can only directly run things that are truly
Windows executable files, such as .exe, .bat, and .cmd files.

Possible solutions include:
1) Write a .bat file which wraps md5.ksh by invoking it using the
cygwin shell. Then change your Ant script to run the .bat file versus
the .ksh file
2) Figure out what actual command string the md5.ksh was going to
eventually run, by running the script by hand and echoing the actual
commands that it runs. Then change your Ant script to run those
commands.
3) Change your Ant script to run the Cygwin shell (which is an actual
executable), then pass the md5.ksh command line to that shell as the
'-c' argument (I think).

No matter what, you'll want to do this in a conditional fashion so that
you run the current technique on non-Windows systems, and the new
technique on Windows sytems, by detecting the operating system type.

You can do that with some pretty simple stuff like:

  <condition property="common.isUnix">
        <os family="unix"/>
     </condition>

     <condition property="common.isWindows">
        <os family="windows"/>
     </condition>

Hope this helps,

bryan




Re: Trouble with release instructions and md5sum.exe

Posted by Andrew McIntyre <mc...@gmail.com>.
On Oct 21, 2005, at 10:16 PM, Kathey Marsden wrote:

> java.io.IOException: CreateProcess: \marsden\bin\md5.ksh
> D:\svn\opensource\10.1/tools/release/db-derby-10.1.2.0-bin.zip  
> error=193

I agree with Francois, I think this the mixed slashes (and/or other  
factors) are confusing Cygwin's shell interpreter or md5 command or  
both.

> I also am not sure of the exact format of md5 -q that I am supposed to
> be matching.

The output should be a 128-bit value in hex format. From your output,  
it looks like you just need to remove the beginning slash and capture  
the resulting output in {whatever}.md5.

I'm not sure what example we should put into the wiki, since this  
problem would appear to be specific to Cygwin. Perhaps a better  
general recommendation for how to generate MD5 hashes in Windows  
would be appropriate.

andrew

Re: Trouble with release instructions and md5sum.exe

Posted by Kathey Marsden <km...@sbcglobal.net>.
Francois Orsini wrote:

>Hi kathey,
>
>Am guessing (and as you did) that the java Runtime.exec() (called by ant)
>ultimately calls Win32 CreateProcess() and causes this last one to fail as
>the path to the md5.ksh script is in a Unix form (/marsden/bin/md5.ksh) -
>Hence Win32 CreateProcess() cannot deal with Cygwin path conventions and
>would not be able to locate it...
>
>Now what's puzzling is why the MD5 hash differs between the 2 different
>invocation modes...
>
>  
>
Well I think the slashes got turned around as my error had them in the
DOS format  but probably some other problem like the fact that there is
a pipe in the script.

java.io.IOException: CreateProcess: \marsden\bin\md5.ksh
D:\svn\opensource\10.1/tools/release/db-derby-10.1.2.0-bin.zip error=193

For the hash differences I think I must have picked up the output from two different attempts.
It does match up, but the prepended '\' seems perhaps troublesome too.

$ c:/build/sdks/cygnustools/md5sum  'D:\svn\opensource\10.1/tools/release/db-
\70b4807b544384d16db0ff0a0a299dc0 *D:\\svn\\opensource\\10.1/tools/release/db-derby-10.1.2.0-bin.zip
$ md5.ksh  'D:\svn\opensource\10.1/tools/release/db-derby-10.1.2.0-bin.zip'
\70b4807b544384d16db0ff0a0a299dc0

I also am not sure of the exact format of md5 -q that I am supposed to
be matching. So, since I am the Dummy in this Releases for Dummies 
excercise,  Andrew would you mind fixing up the doc to give an example
of how the packaging.properties can be modified to work on Windows?

Thanks

Kathey



Re: Trouble with release instructions and md5sum.exe

Posted by Francois Orsini <fr...@gmail.com>.
Hi kathey,

Am guessing (and as you did) that the java Runtime.exec() (called by ant)
ultimately calls Win32 CreateProcess() and causes this last one to fail as
the path to the md5.ksh script is in a Unix form (/marsden/bin/md5.ksh) -
Hence Win32 CreateProcess() cannot deal with Cygwin path conventions and
would not be able to locate it...

Now what's puzzling is why the MD5 hash differs between the 2 different
invocation modes...

--francois