{"id":33842,"date":"2021-10-06T17:01:29","date_gmt":"2021-10-06T21:01:29","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=33842"},"modified":"2021-10-06T17:01:29","modified_gmt":"2021-10-06T21:01:29","slug":"reproducible-code-signing-on-apple-silicon","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2021\/10\/06\/reproducible-code-signing-on-apple-silicon\/","title":{"rendered":"Reproducible Code Signing on Apple Silicon"},"content":{"rendered":"<p><a href=\"https:\/\/www.smileykeith.com\/2021\/10\/05\/codesign-m1\/\">Keith Smiley<\/a>:<\/p>\n<blockquote cite=\"https:\/\/www.smileykeith.com\/2021\/10\/05\/codesign-m1\/\">\n<p>For people who expect <a href=\"https:\/\/reproducible-builds.org\">reproducible builds<\/a>, Apple Silicon machines\nprovide an interesting challenge.<\/p>\n<p>[&#8230;]<\/p>\n<p>The gist of this logic is to fetch the UUID embedded in every binary and use that to derive the identifier. The reason this isn&rsquo;t reproducible across architectures is because the UUID is based on the content of each binary, which differs across architectures.<\/p><p>[&#8230;]<\/p><p>While this was a very informative deep dive into this logic, if you rely\non reproducible binaries and want to support Apple Silicon machines, you\nneed to do 2 things for binaries without <tt>Info.plist<\/tt> files:<\/p><ol><li>Don&rsquo;t allow the linker to automatically sign your binaries by passing\n<code>-no_adhoc_codesign<\/code><\/li><li>Pass an explicit identifier when linking binaries with <code>--identifier<\/code>\nto the <code>codesign<\/code> invocation<\/li><\/ol><\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2021\/02\/18\/code-signing-when-building-on-apple-silicon\/\">Code Signing When Building on Apple Silicon<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2020\/08\/19\/apple-silicon-macs-to-require-signed-code\/\">Apple Silicon Macs to Require Signed Code<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Keith Smiley: For people who expect reproducible builds, Apple Silicon machines provide an interesting challenge. [&#8230;] The gist of this logic is to fetch the UUID embedded in every binary and use that to derive the identifier. The reason this isn&rsquo;t reproducible across architectures is because the UUID is based on the content of each [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2021-10-06T21:01:33Z","apple_news_api_id":"2b8a96f3-21a6-49f6-a166-9a2439b064f3","apple_news_api_modified_at":"2021-10-06T21:01:33Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AK4qW8yGmSfahZpokObBk8w","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[2014,262,466,30,1891,71],"class_list":["post-33842","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-apple-m1","tag-arm","tag-codesigning","tag-mac","tag-macos-11-0","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/33842","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=33842"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/33842\/revisions"}],"predecessor-version":[{"id":33843,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/33842\/revisions\/33843"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=33842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=33842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=33842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}