Wireshark-dev: [Wireshark-dev] win32-setup.sh fails to set executable bit for upx.exe - any ide
From: Ulf Lamping <[email protected]>
Date: Thu, 29 Nov 2007 23:56:45 +0100
Hi List!

I've tired to find the cause of my problems with the upx compression of the U3/PortableApps packaging.
The root cause is, that the upx.exe "installed" into 
wireshark-win32-libs doesn't get the executable bit set for cygwin - 
therefore the "access denied" I get (mentioned earlier). Setting this 
bit "manually" works, but that's not really the way to go ;-)

This should be automatically done while "installing" the upx.exe from the zip file, done at win32-setup.sh starting at line 99:
   echo "Verifying that the DLLs and EXEs in $DEST_PATH/$DEST_SUBDIR 
are executable."
   for i in `/usr/bin/find $DEST_PATH/$DEST_SUBDIR \( -name *\.dll -o 
-name *\.exe \)` ; do
       if [ ! -x "$i" ] ; then
           echo "Changing file permissions (add executable bit) to:"
           echo "$i"
           chmod a+x "$i"

The output while the upx zip is unpacked:

1>****** upx301w.zip ******
1>No HTTP proxy specified (http_proxy and HTTP_PROXY are empty).
1>Downloading upx301w.zip into C:\WIRESH~2, installing into .
1>File `upx301w.zip' already there; not retrieving.
1>Extracting C:\WIRESH~2/upx301w.zip into C:\WIRESH~2/.
1>Verifying that the DLLs and EXEs in C:\WIRESH~2/. are executable.
1>Wireshark is ready to build.

... so I guess the find call doesn't find the upx.exe, so chmod isn't called. As a remark, AFAIK this is the first time for an exe needs this bit, so the find call might never have been worked correctly before.

As I'm not a bash/find wizard, someone with an idea why this fails and the best way to fix it?
Regards, ULFL