Re: [Pythonmac-SIG] codesigning py2app/wxPython app failing

2015-08-23 Thread Brendan Simon (eTRIX)
On 23/08/2015 8:00 pm, [email protected] wrote:
> Re: [Pythonmac-SIG] codesigning py2app/wxPython app failing
> From:
> Kevin Walzer 
> Date:
> 23/08/2015 2:22 pm
>
> To:
> Glyph 
> CC:
> [email protected]
>
>
> On 8/23/15 12:11 AM, Glyph wrote:
>> I was /going/ to say something about how "codesigning" certificates
>> have different X509 extensions in them, but then I clicked the link
>> to "sslstart.com " and I got redirected to
>> mac-protect dot info (not in URL syntax because it looks to be
>> malware) saw this popup:
>
> I saw that too, but I suspect Brendan simply mistyped the domain.
> startssl.com is a valid CA for codesigning certs, and they have the
> lowest-cost certificates in the business.
Yes that was my bad.  startssl.com is correct.

___
Pythonmac-SIG maillist  -  [email protected]
https://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] codesigning py2app/wxPython app failing

2015-08-23 Thread Brendan Simon (eTRIX)
On 23/08/2015 8:00 pm, [email protected] wrote:
>
> Subject:
> Re: [Pythonmac-SIG] codesigning py2app/wxPython app failing
> From:
> Kevin Walzer 
> Date:
> 23/08/2015 1:08 pm
>
> To:
> [email protected]
>
>
> On 8/22/15 10:44 PM, Brendan Simon (eTRIX) wrote:
>>
>> $ codesign - -f --deep -s dist/.app
>>
> The "deep" flag doesn't work anymore. Pretty much every binary object
> must be signed.
>
> Here's what I use to codesign one of my apps (the specific example is
> Perl, my current Python project is awaiting an update, but I'll roll
> something similar for the Python project).
>
> First I start with the dylibs:
>
> find build/FileMorph.app -type f -name "*.bundle"  -exec codesign
> --verbose --signature-size 9400 -f -s "My Credentials" {} \;
> find build/FileMorph.app -type f -name "*.dylib"  -exec codesign
> --verbose --signature-size 9400 -f -s "My Credentials" {} \;
>
> Next, the frameworks and executables:
>
> codesign  --verbose --signature-size 9400 -f -s "My Credentials"
> build/FileMorph.app/Contents/Frameworks/Tk.framework/Versions/8.6/Resources/Wish.app/Contents/MacOS/Wish
> codesign  --verbose --signature-size 9400 -f -s "My Credentials"
> build/FileMorph.app/Contents/Frameworks/Tk.framework/Versions/Current
> codesign --verbose --signature-size 9400 -f -s "My Credentials"
> build/FileMorph.app/Contents/Frameworks/Tcl.framework/Versions/Current
> codesign  --verbose --signature-size 9400 -f -s "My Credentials"
> build/FileMorph.app/Contents/MacOS/perl
>
> Finally, the app itself:
>
> codesign  --signature-size 9400 -f -s "My Credentials" --verbose=2 
> build/FileMorph.app

Thanks for the help :)  Unfortunately I haven't made any progress :(
I've tried singing some of the binaries and frameworks from a bash
script (and manually) but I still get errors :(



export CODESIGN_ALLOCATE="/usr/bin/codesign_allocate"
#export
CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate"

$ find dist/.app -type f -name "*.dylib"

dist/.app/Contents/Frameworks/libncursesw.5.dylib
dist/.app/Contents/Frameworks/libwx_osx_cocoau-3.0.0.2.0.dylib

$ find dist/.app -type f -name "*.dylib" -exec codesign -
--signature-size 9400 -f -s  {} \;

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate:
for architecture x86_64 object:
/dist/.app/Contents/Frameworks/libncursesw.5.dylib malformed
object (load command 3 cmdsize not a multiple of 8)

dist/.app.app/Contents/Frameworks/libncursesw.5.dylib: code
failed to satisfy specified code requirement(s)
dist/.app.app/Contents/Frameworks/libwx_osx_cocoau-3.0.0.2.0.dylib:
code failed to satisfy specified code requirement(s)

# codesign /Python.framework/Versions/Current/Python

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate:
for architecture x86_64 object:
/Users/brendan/eclipse-workspaces/sureshotgps/SA-v5.6/src/dist/SureAnalysis-signed-ss.app/Contents/Frameworks/Python.framework/Versions/2.7/Python
malformed object (load command 3 cmdsize not a multiple of 8)

# codesign /Python.framework/Versions/Current

dist/SureAnalysis-signed-ss.app/Contents/Frameworks/Python.framework/Versions/Current/Python:
code failed to satisfy specified code requirement(s)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate:
for architecture x86_64 object:
/Users/brendan/eclipse-workspaces/sureshotgps/SA-v5.6/src/dist/SureAnalysis-signed-ss.app/Contents/Frameworks/Python.framework/Versions/2.7/Python
malformed object (load command 3 cmdsize not a multiple of 8)

# codesign /Python.framework/Versions/Current

dist/..app/Contents/Frameworks/Python.framework/Versions/Current:
code failed to satisfy specified code requirement(s)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate:
for architecture x86_64 object:
/dist/.app/Contents/MacOS/python malformed object (load
command 10 cmdsize not a multiple of 8)

# codesign /Contents/MacOS/python

dist/SureAnalysis-signed-ss.app/Contents/MacOS/python: code failed to
satisfy specified code requirement(s)

# codesign dist/.app

dist/..app: code object is not signed at all
In subcomponent:
/dist/..app/Contents/Frameworks/libncursesw.5.dylib



Is this a codesign_allocate issue?
The codesign_allocate tool in /usr/bin does NOT ask me for username and
password, however if I use the one in /Applications/Xcode.app/ then a
dialog pops up a number of times asking me for username and password. 
That looks promising by I still get the following error.

"the codesign_allocate helper tool cannot be found or used"

So I still with /usr/bin/codesign_allocate

Any other suggestions for me to try ???

Thanks, Brendan.

___
Pythonmac-SIG maillist  -  [email protected]
https://mail.python.org/mailman/list

Re: [Pythonmac-SIG] codesigning py2app/wxPython app failing

2015-08-23 Thread Kevin Walzer

On 8/23/15 8:09 AM, Brendan Simon (eTRIX) wrote:

Thanks for the help :)  Unfortunately I haven't made any progress :(
I've tried singing some of the binaries and frameworks from a bash 
script (and manually) but I still get errors :(


I don't quite understand codesign_allocate and why you are using it 
instead of codesign, but in my experience setting a signature size, i.e. 
--signature-size 9400, sometimes fixes codesign failures.


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com

___
Pythonmac-SIG maillist  -  [email protected]
https://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG