Merge lp:~mikemc/ubuntuone-windows-installer/fix-signing-certname into lp:ubuntuone-windows-installer

Proposed by Mike McCracken
Status: Merged
Approved by: dobey
Approved revision: 162
Merged at revision: 160
Proposed branch: lp:~mikemc/ubuntuone-windows-installer/fix-signing-certname
Merge into: lp:ubuntuone-windows-installer
Diff against target: 94 lines (+36/-10)
3 files modified
scripts/codesign-darwin-verify.sh (+9/-4)
scripts/codesign-darwin.sh (+8/-2)
scripts/setup-mac.py (+19/-4)
To merge this branch: bzr merge lp:~mikemc/ubuntuone-windows-installer/fix-signing-certname
Reviewer Review Type Date Requested Status
dobey (community) Approve
Brian Curtin (community) Approve
Review via email: mp+144820@code.launchpad.net

Commit message

- Allow code signing on macos with different certs, embed CN into fseventsd during build phase.

Description of the change

- Allow code signing on macos with different certs, embed CN into fseventsd during build phase.

To post a comment you must log in.
Revision history for this message
Brian Curtin (brian.curtin) :
review: Approve
Revision history for this message
dobey (dobey) :
review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

Attempt to merge into lp:ubuntuone-windows-installer failed due to conflicts:

duplicate in scripts/data/update.conf.moved

162. By Mike McCracken

merge with trunk, fix conflict

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'scripts/codesign-darwin-verify.sh'
--- scripts/codesign-darwin-verify.sh 2012-11-20 22:37:34 +0000
+++ scripts/codesign-darwin-verify.sh 2013-02-01 21:15:49 +0000
@@ -25,9 +25,14 @@
25rm tmp.req25rm tmp.req
2626
27echo "\nChecking that the app satisfies the helper's SMAuthorizedClients requirement"27echo "\nChecking that the app satisfies the helper's SMAuthorizedClients requirement"
28otool -s __TEXT __info_plist $helper | grep "^[0-9a-f]\{8,16\}" | xxd -r - - > tmp.plist28
29perl -nle 'print "identifier $1 and certificate leaf[subject.CN] = \"$2\"" if /identifier (.*) and certificate leaf\[subject.CN\] = "(.*)"/;' tmp.plist > tmp.req 29echo "\nActually skipping that because xxd is really slow for some reason"
30$codesign -v -v -R tmp.req Ubuntu\ One.app30# otool -s __TEXT __info_plist $helper | grep "^[0-9a-f]\{8,16\}" | xxd -r - - > tmp.plist
31rm tmp.plist tmp.req31# perl -nle 'print "identifier $1 and certificate leaf[subject.CN] = \"$2\"" if /identifier (.*) and certificate leaf\[subject.CN\] = "(.*)"/;' tmp.plist > tmp.req
32# $codesign -v -v -R tmp.req Ubuntu\ One.app
33# rm tmp.plist tmp.req
34
35echo "\nChecking spctl rule output, look for 'Developer ID' "
36find ./Ubuntu\ One.app -name "*.app" -print0 | xargs -0 spctl -a --verbose=9
3237
33echo Done.38echo Done.
3439
=== modified file 'scripts/codesign-darwin.sh'
--- scripts/codesign-darwin.sh 2012-11-20 22:37:34 +0000
+++ scripts/codesign-darwin.sh 2013-02-01 21:15:49 +0000
@@ -3,7 +3,7 @@
3codesign=/usr/bin/codesign3codesign=/usr/bin/codesign
44
5set -x 5set -x
6set -e6
77
8$codesign -f -s "$@" com.ubuntu.one.fsevents8$codesign -f -s "$@" com.ubuntu.one.fsevents
99
@@ -11,6 +11,12 @@
1111
12cp com.ubuntu.one.fsevents "Ubuntu One.app/Contents/Library/LaunchServices/"12cp com.ubuntu.one.fsevents "Ubuntu One.app/Contents/Library/LaunchServices/"
1313
14$codesign -f -s "$@" "Ubuntu One.app"14find Ubuntu\ One.app -name "*.dylib" -exec $codesign -f -s "$@" {} \;
15
16find Ubuntu\ One.app -iname "python" -type f -exec $codesign -f -s "$@" {} \;
17
18find Ubuntu\ One.app/Contents -name "*.app" -exec $codesign -f -s "$@" {} \;
19
20$codesign -f -s "$@" Ubuntu\ One.app
1521
16echo Done.22echo Done.
1723
=== modified file 'scripts/setup-mac.py'
--- scripts/setup-mac.py 2012-12-10 18:17:41 +0000
+++ scripts/setup-mac.py 2013-02-01 21:15:49 +0000
@@ -57,7 +57,12 @@
57# NOTE - this needs to be the full CN, not just a substring.57# NOTE - this needs to be the full CN, not just a substring.
58# /usr/bin/codesign will find the right cert if you pass it a58# /usr/bin/codesign will find the right cert if you pass it a
59# substring, but the rest of the system wants an exact match.59# substring, but the rest of the system wants an exact match.
60CODESIGN_CN = "Mac Developer: Michael McCracken (GP72FH8MSU)"60if "U1_CODESIGN_CN" not in os.environ:
61 print "Must set U1_CODESIGN_CN to the CN of the cert to use in the helper"
62 print "Exiting."
63 sys.exit()
64
65CODESIGN_CN = os.environ["U1_CODESIGN_CN"]
6166
62FSEVENTS_DAEMON_NAME = "com.ubuntu.one.fsevents"67FSEVENTS_DAEMON_NAME = "com.ubuntu.one.fsevents"
6368
@@ -481,13 +486,23 @@
481 print "building fsevents daemon"486 print "building fsevents daemon"
482 log_file_name = os.path.join(INSTALL_DIR,487 log_file_name = os.path.join(INSTALL_DIR,
483 "fsevents-daemon-build.log")488 "fsevents-daemon-build.log")
489
484 with open(log_file_name, 'w') as logfile:490 with open(log_file_name, 'w') as logfile:
485 proj_path = os.path.join(self.source_dir,491 proj_path = os.path.join(self.source_dir,
486 "ubuntuone-fsevents-daemon",492 "ubuntuone-fsevents-daemon")
487 "objc")493 objc_path = os.path.join(proj_path, "objc")
494 data_path = os.path.join(proj_path, "data")
495 plist_file_name = os.path.join(data_path,
496 "fseventsd-Info.plist")
497 with open(plist_file_name + ".tmpl", "rb") as infoplist_tmpl:
498 plist_tmpl_data = infoplist_tmpl.read()
499 plist_data = plist_tmpl_data.replace("@CODESIGN_CN@", CODESIGN_CN)
500 with open(plist_file_name, "wb") as infoplist:
501 infoplist.write(plist_data)
502
488 cmd = ("cd %s && "503 cmd = ("cd %s && "
489 "xcodebuild -scheme FsEvents SYMROOT=%r clean build" %504 "xcodebuild -scheme FsEvents SYMROOT=%r clean build" %
490 (proj_path, INSTALL_DIR))505 (objc_path, INSTALL_DIR))
491 retval = subprocess.call(cmd,506 retval = subprocess.call(cmd,
492 shell=True,507 shell=True,
493 stderr=subprocess.STDOUT,508 stderr=subprocess.STDOUT,

Subscribers

People subscribed via source and target branches