Growl 1.3.3 build fails with "this identity cannot be used for signing code"

1,435 views
Skip to first unread message

David Hislop

unread,
Mar 25, 2012, 8:28:43 PM3/25/12
to Growl Development
Please bear with me, first attempt at building Growl, so I'm sure that
there's something I've done wrong. I did search this group and
couldn't find anything that would help with my second problem.

Built Growl 1.3.3 and got past the two issues on the Growl Source
Installation page at http://growl.info/documentation/developer/growl-source-install.php
by creating a self-signed certificate and submitting again for the
HgRevision.h issue.

The two problems:

1. The build now failed in Brushed and Bubbles with
3rd Party Mac Developer Application: this identity cannot be used for
signing code
Command /usr/bin/codesign failed with exit code 1

2. Turned off code signing by setting Code Signing Identity to Don't
Code Sign. Same result: build still fails in Brushed and Bubbles with
3rd Party Mac Developer Application: this identity cannot be used for
signing code
Command /usr/bin/codesign failed with exit code 1

I don't mind so much not being able to sign the code and, in any case,
there's a potential solution to that at http://macscripter.net/viewtopic.php?id=37460
that I'll try, but shouldn't a build with code signing turned off not
execute code sign?

In case it's relevant, here is the failing command for Brushed:
CodeSign /Users/david/Library/Developer/Xcode/DerivedData/Growl-
bliqxgpjeeraaucokizasvxsmuos/Build/Products/Debug/Brushed.growlView
cd /Users/david/Documents/src/growl
setenv CODESIGN_ALLOCATE /Applications/Xcode.app/Contents/
Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/
codesign_allocate
/usr/bin/codesign --force --sign
34be9a9396bacd14fa4f5251bda11345173054c1 /Users/david/Library/
Developer/Xcode/DerivedData/Growl-bliqxgpjeeraaucokizasvxsmuos/Build/
Products/Debug/Brushed.growlView

regards - David

Christopher Forsythe

unread,
Mar 25, 2012, 8:40:07 PM3/25/12
to growl-de...@googlegroups.com
Did you create the certificate with code signing and install it into your keychain? If so, which keychain?

Chris


--
You received this message because you are subscribed to the Google Groups "Growl Development" group.
To post to this group, send email to growl-de...@googlegroups.com.
To unsubscribe from this group, send email to growl-developm...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/growl-development?hl=en.


Kent Sorensen

unread,
Mar 25, 2012, 8:48:56 PM3/25/12
to growl-de...@googlegroups.com
The code certificate has to be created with code signing privileged. To do that, check the "override defaults" checkbox when you create the certificate. The instructions really ought to mention this gotcha. Then skip past the next few screens til you get to the part where you can allow code signing. The Growl project has two different certificates in the project file :

3rd Party Mac Developer Application: The Growl Project, LLC
and just

3rd Party Mac Developer Application

I think you have to create both, and give both signing privileges.

Then you are going to hit some issues in the project that to me shows that the repo is incomplete, or at the very least not what 1.3.3 was actually built from.
You're going to get Xcode complaining about some files missing new lines at the end. That's easily fixed. I seem to recall there was one other niggling little issue but it currently escapes me.

However, if you build the "Growl.app" target you will get errors in GrowlMenu.m and h. They simply don't match. That's where I stopped spending time on this.

Kent

Christopher Forsythe

unread,
Mar 25, 2012, 8:50:31 PM3/25/12
to growl-de...@googlegroups.com
On Sun, Mar 25, 2012 at 7:48 PM, Kent Sorensen <ke...@snak.com> wrote:
The code certificate has to be created with code signing privileged. To do that, check the "override defaults" checkbox when you create the certificate. The instructions really ought to mention this gotcha. Then skip past the next few screens til you get to the part where you can allow code signing. The Growl project has two different certificates in the project file :

3rd Party Mac Developer Application: The Growl Project, LLC
and just
3rd Party Mac Developer Application

I think you have to create both, and give both signing privileges.

Then you are going to hit some issues in the project that to me shows that the repo is incomplete, or at the very least not what 1.3.3 was actually built from.

What's on google code is *absolutely* what we build Growl 1.3.3 with. It was built using xcode 4.2.1 if I remember correctly.

David Hislop

unread,
Mar 27, 2012, 12:39:38 AM3/27/12
to Growl Development
OK, thanks, I created a new "3rd Party Mac Developer Application"
certificate with code signing extended key usage and placed it in the
login keychain (for no other reason than I have some other
certificates there).

Cleaned and rebuilt Growl and it failed with a "No newline at end of
file" in GrowlVersionUtilities.m. Fixed that.
Same error in NSStringAdditions.m. Fixed that.
Same in GrowlNotificationRowView.h and fixed that.

After that, errors in GrowlMenu.m. "Attributes on method
implementation and its declaration must match" in two places:
- (IBAction) openGrowlPreferences:(id)sender {
[[GrowlApplicationController sharedInstance] showPreferences];
}

- (IBAction) startStopGrowl:(id)sender {
BOOL squelch = [preferences squelchMode] ? NO : YES;
[preferences setSquelchMode:squelch];
}

In GrowlMenu.h I changed
- (void) openGrowlPreferences:(id)sender;
- (void) startStopGrowl:(id)sender;
to
- (IBAction) openGrowlPreferences:(id)sender;
- (IBAction) startStopGrowl:(id)sender;

... and the Build succeeded.

Haven't installed and run it, but it is looking promising.

So now, two questions:
1. Why did turning Code Signing off not actually stop code signing?
Because I still have it off, but I was prompted to allow the keychain
to be accessed for code signing.
2. Did I mess something up to get the missing \n and wrong types
above?

Thanks for the help.

regards - David

Christopher Forsythe

unread,
Mar 27, 2012, 12:53:40 AM3/27/12
to growl-de...@googlegroups.com
Inline questions answered below

It really just depends on how you disabled it. Signing works for different build styles, against different targets. The Growl.app target builds upon a large assortment of other targets, and I think we had to sign everything. Generating the cert makes things much simpler, since you just build how we build.
 
2. Did I mess something up to get the missing \n and wrong types
above?


Nope. Xcode 4.3+ is a lot more strict about that sort of thing than 4.2.1 was. Same with the other errors that you saw. I don't know if the change you made was correct after the \n's since I haven't looked at it really, but I don't think it was a bad change. That's the only way you learn sometimes though, trial by error is always fun.

Feel free to hit us up in #growl on freenode.

Chris.

David Hislop

unread,
Mar 27, 2012, 1:53:35 AM3/27/12
to Growl Development
I disabled code signing in the Xcode project Build Settings [Basic]
[Combined] Setting > Code Signing > Code Signing Identity = "Don't
Code Sign".

However, I just noticed that I did that for the Growl.app target only,
not the whole Growl project.

So that's most likely the reason for the code signing on Brushed and
Bubbles still proceeding.

BTW, I'm assuming that someone who knows what they're doing will
update the repository with those newlines and types :-)

regards - David

On Mar 27, 3:53 pm, Christopher Forsythe <ch...@growl.info> wrote:
> Inline questions answered below
>

Rudy Richter

unread,
Mar 28, 2012, 8:43:32 AM3/28/12
to growl-de...@googlegroups.com
actually nope, the repository by way of the Growl.app 1.3.3 tag is fixed in time and will not be receiving any further attention.  It built with the dev tools that were available at that time (Xcode 4.2.1). When 1.4 is pushed it will build with Xcode 4.3.1.  We're absolutely not going back and revising closed branches so they build with current tools.

-rudy
Reply all
Reply to author
Forward
0 new messages