From unknown Sat Jun 21 03:31:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location Resent-From: Jim Myhrberg Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Jun 2021 11:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49271 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 49271@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162496794111989 (code B ref -1); Tue, 29 Jun 2021 11:59:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Jun 2021 11:59:01 +0000 Received: from localhost ([127.0.0.1]:53774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyCOL-00037J-4A for submit@debbugs.gnu.org; Tue, 29 Jun 2021 07:59:01 -0400 Received: from lists.gnu.org ([209.51.188.17]:37862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyCOJ-00037C-Mw for submit@debbugs.gnu.org; Tue, 29 Jun 2021 07:58:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyCOJ-0007D5-DP for bug-gnu-emacs@gnu.org; Tue, 29 Jun 2021 07:58:59 -0400 Received: from mail-oi1-x244.google.com ([2607:f8b0:4864:20::244]:43851) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyCOG-0001bm-Hn for bug-gnu-emacs@gnu.org; Tue, 29 Jun 2021 07:58:59 -0400 Received: by mail-oi1-x244.google.com with SMTP id 22so19931363oix.10 for ; Tue, 29 Jun 2021 04:58:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jimeh.me; s=google; h=mime-version:from:date:message-id:subject:to; bh=DSuFit2QXbRLgaFHBKnHSOdFphDRmbHhga8ZRVzfL88=; b=KsgH6Jjh3lm+lz4ocSyLIhJXFG08tbVLl26mOSlx6b9cyCqqkF7n83uBTCkW+r6kNj qMnEz8130JUwiqbiS5pDAGcEtY1pr3d5GcqPR3G7piNY35DRiYoBYtyYZ3jQ0AoRlLwI 1UKG+k/YBKOqaffUOzyUfVbR2MnyhWu+nchARD7/dFEmpyK9JGVE3/qdRWwZZVkUnB4s v7G2cFu//NQStl4JAG1ogqsG5jO07u0152xEzpQBafDgu4HimyOXVSvxGcUfivsmduTi uP41m20aRnkeQ4xndCwC2b7J8G8Tl+Jvz05wDJRhLRhS6+cb7f6e2OimUuLl8PXUGN2o 8K3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=DSuFit2QXbRLgaFHBKnHSOdFphDRmbHhga8ZRVzfL88=; b=fuzhyQLnxmnrUTIvekDex2mefVw3+cpWOGx26AquZYbFlq/J0m1K1HoOrvUMY3EIIe FJIhxVnBqwf31zv/HyGlWW2RpqQbyc783Xy4nYdyDN+Pv0hLVv5h/78OVBwIBCFW6zb+ a9Ekt6UfozG0VJZZ24a+dH8mkiU9aoUFqc4PY/wF4XY30O4XZZ90X5N/4W5MBBo4eYPB PavDA1ttilm7EUZhxD5EFzU/2q3PHq9AN3NQeKZf+gXhmQ2r7z/q6bdcwtrD/5XV6u5s fJZJtwXa7LdKpKpgHaB0OQ2P18YQO0BabbiQ3ONGQXTLgUFniMihbhEJ1dk5VvEUygGH H4Ew== X-Gm-Message-State: AOAM532WIkwq1x47MTr8GLpgvX0ezyoIXWdOpYFq0iYdTc5/BUn10bMT Tnjma92BIV1hz5ZoZthyJmyGMN6NLC5lFF26VbY3Phmrp4mcoygQMQc= X-Google-Smtp-Source: ABdhPJzJ3+Cuz5+AT7c8nvspUbIWawZ2fY7wOHLqcw1xbyW5s9+ntxOgsg2JZodJDR+kUu6xy7fYGukN+dwMJsVQSc0= X-Received: by 2002:aca:4d05:: with SMTP id a5mr14045161oib.163.1624967934834; Tue, 29 Jun 2021 04:58:54 -0700 (PDT) MIME-Version: 1.0 From: Jim Myhrberg Date: Tue, 29 Jun 2021 12:58:44 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::244; envelope-from=contact@jimeh.me; helo=mail-oi1-x244.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Commit 5dd2d50 seems to have moved the native-lisp folder within self-contained Emacs.app bundles: - from: "Contents/Resources/native-lisp" - to: "Contents/MacOS/lib/emacs/28.0.50/native-lisp" Unfortunately, Apple's codesign utility blows up with an error if there is any folder within "Contents/MacOS" (recursively) which contains two dots within its name. Here is an example of what the error looks like: /Users/runner/work/emacs-builds/emacs-builds/builds/Emacs.2021-06-26.b8f9e58.master.macOS-10-15.x86_64/Emacs.app: bundle format unrecognized, invalid, or unsuitable In subcomponent: /Users/runner/work/emacs-builds/emacs-builds/builds/Emacs.2021-06-26.b8f9e58.master.macOS-10-15.x86_64/Emacs.app/Contents/MacOS/lib/emacs/28.0.50 The above error is from this GitHub Actions workflow run: https://github.com/jimeh/emacs-builds/runs/2923284812?check_suite_focus=true The same issue happens locally for me too. I have so far not found a way to make codesign not blow up on such folders, so for now I've had to workaround the issue in my build script with the following changes: - https://github.com/jimeh/build-emacs-for-macos/commit/eeca7b798de236a3ffc1ab04b0f7735a37ce5af4 - https://github.com/jimeh/build-emacs-for-macos/commit/23b8236e0a66fb09810e8422bedf02f7192a53e4 In summary, I rename: - from: Emacs.app/Contents/MacOS/lib/emacs/28.0.50/native-lisp/28.0.50-852ecda2 - to: Emacs.app/Contents/MacOS/lib/emacs/28-0-50/native-lisp/28-0-50-852ecda2 (Note that I had to rename both "28.0.50" and "28.0.50-852ecda2" folders, as both trigger the error from codesign.) I create a symlink from "Contents/native-lisp" to "Contents/MacOS/lib/emacs/28-0-50/native-lisp". And finally I patch Emacs.pdmp (Emacs.app/Contents/MacOS/libexec/Emacs.pdmp), performing the following raw text replacements: - "lib/emacs/28.0.50/native-lisp/28.0.50-852ecda2/" --> "lib/emacs/28-0-50/native-lisp/28-0-50-852ecda2/" - "../native-lisp/28.0.50-852ecda2/" --> "../native-lisp/28-0-50-852ecda2/" This yields a seemingly actually working Emacs.app bundle, but it re-compiles all *.eln files in the bundle into the user cache folder. However, there's a separate bug causing re-compiling which I've reported as bug#49270, so for now I don't know if my patching would prevent Emacs from dynamically finding existing *.eln which are not referenced from Emacs.pdmp. This patching/workaround to get code signing to work feels very hacky and fragile. It would be great if we could avoid the need for this kind of patch to be able to codesign the .app bundle. The way I see it, there's three possible solutions: - Figure out a way to make Apple's codesign play nice. - Move the native-lisp folder back to "Contents/Resources/native-lisp", as codesign does not complain about folders with two dots in their names within the Resources directory. - Change paths used to store *.eln files within Contents/MacOS so no single folder name contains two dots. From unknown Sat Jun 21 03:31:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Jun 2021 19:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49271 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Jim Myhrberg Cc: 49271@debbugs.gnu.org Received: via spool by 49271-submit@debbugs.gnu.org id=B49271.162499434922250 (code B ref 49271); Tue, 29 Jun 2021 19:20:02 +0000 Received: (at 49271) by debbugs.gnu.org; 29 Jun 2021 19:19:09 +0000 Received: from localhost ([127.0.0.1]:55465 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyJGG-0005mo-TM for submit@debbugs.gnu.org; Tue, 29 Jun 2021 15:19:09 -0400 Received: from outbound.soverin.net ([116.202.126.228]:42871) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyJGF-0005mJ-A2 for 49271@debbugs.gnu.org; Tue, 29 Jun 2021 15:19:08 -0400 Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 7C0E3940; Tue, 29 Jun 2021 19:19:00 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1624994339; bh=LxmU8uBoCw5KhANoRYjxnxh2zZI+tlUhz9RuZP6f51I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=T1/2r0iNI+ehOR17SGPKDqrXl1rNO01Fy9D8/sJnh3l+RnQ/IeQ7DtvD0oF2y95gz ywiwGRdU08fcNE/gJsrneYf9OJeDhgEgK4GZ4AjSblNlMkP2JapViC3EA/poUaS/mB o0JS4HWddgigXSk+DTe8/NOz7rKl86YDZZRqRVJmsAKsQzXTL8oC0NXDr8F0/6dIdE dx+AeiGbfTqVHcIMjvrgPiDG+1qwOqK7d2vVRizwgeuIzCBya6ks2f5RE24wrxaH6B G1Wyr6Jd9YJRXBgNSkup7SKhfU/QafxbEitGgcQYFT7BvMZp6GYibTA/wb6YFFxvVe gviJdryb1pGsw== Received: from alan by faroe.holly.idiocy.org with local (Exim 4.94.2) (envelope-from ) id 1lyJG5-002OPu-Ec; Tue, 29 Jun 2021 20:18:57 +0100 Date: Tue, 29 Jun 2021 20:18:57 +0100 From: Alan Third Message-ID: Mail-Followup-To: Alan Third , Jim Myhrberg , 49271@debbugs.gnu.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Tue, Jun 29, 2021 at 12:58:44PM +0100, Jim Myhrberg wrote: > Commit 5dd2d50 seems to have moved the native-lisp folder within self-contained > Emacs.app bundles: > > - from: "Contents/Resources/native-lisp" > - to: "Contents/MacOS/lib/emacs/28.0.50/native-lisp" > > Unfortunately, Apple's codesign utility blows up with an error if there is any > folder within "Contents/MacOS" (recursively) which contains two dots within its > name. Here is an example of what the error looks like: > > /Users/runner/work/emacs-builds/emacs-builds/builds/Emacs.2021-06-26.b8f9e58.master.macOS-10-15.x86_64/Emacs.app: > bundle format unrecognized, invalid, or unsuitable > In subcomponent: > /Users/runner/work/emacs-builds/emacs-builds/builds/Emacs.2021-06-26.b8f9e58.master.macOS-10-15.x86_64/Emacs.app/Contents/MacOS/lib/emacs/28.0.50 Bummer. I had three options: * Contents/MacOS/lib * Contents/Resources/ * Contents/lib and a close reading of the Apple documentation left me none-the-wiser as to which option I should use. Executable binaries go under MacOS, but these aren't executables. Framework libraries go somewhere else entirely, but these aren't framework libraries. Resources is intended for images and things, not libs. Lib is entirely non-standard. I really don't know where the best place is. I'm still thinking Resources is definitely not the right place, but none of the other existing places make any sense, so perhaps the non-standard /Contents/lib is the best option... Can you try that? In order to sort it edit configure.ac, search for the first occurrence of "ns_applibdir" and change the path. If that fails then I guess we move them back under Resources. Unless you have any better ideas. -- Alan Third From unknown Sat Jun 21 03:31:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location Resent-From: Jim Myhrberg Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Jun 2021 10:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49271 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Third , Jim Myhrberg , 49271@debbugs.gnu.org Received: via spool by 49271-submit@debbugs.gnu.org id=B49271.16250475031653 (code B ref 49271); Wed, 30 Jun 2021 10:06:02 +0000 Received: (at 49271) by debbugs.gnu.org; 30 Jun 2021 10:05:03 +0000 Received: from localhost ([127.0.0.1]:56489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyX5a-0000Qa-P4 for submit@debbugs.gnu.org; Wed, 30 Jun 2021 06:05:03 -0400 Received: from mail-oi1-f174.google.com ([209.85.167.174]:35490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyX5Y-0000Q4-Lp for 49271@debbugs.gnu.org; Wed, 30 Jun 2021 06:05:01 -0400 Received: by mail-oi1-f174.google.com with SMTP id k206so2444362oif.2 for <49271@debbugs.gnu.org>; Wed, 30 Jun 2021 03:05:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jimeh.me; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=hiDOIZa3Q3I2yknnQpTgA2o2y2hKUd5smdolZg7BywE=; b=ImWf9D1e0TmhZvAH0J5nCaUO9Qc8wjztdAaOGobtEAsAB/xhUrarkNnwlj9XWBsDMZ mATdWgsZIf3tvKp81Hfh1tTTdXkHludlNXfQvbuv1ktxyt8XuIxXTAny3o+CVGBpO6Pl xyLteXfA/IRPx7KTVPW+ybnW1+dQBbaYReeROMbL01J6aGYXCcHRKNLn0ejarsQBZelW wOeTsFJQqZd7kUXjPiE7EmLmCg74s/0idws1eBGlEpi14qTGkkEduPE2wSShBJGEsWAe Yngdls1ecx39kppCzI08wgZ8veyz6w3Rfckqthx+73/gtwU2WQy5gl3TWjoEyycrZPTb daZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=hiDOIZa3Q3I2yknnQpTgA2o2y2hKUd5smdolZg7BywE=; b=pS80OdX65ytxQsN3qYbi8dmNRGsDPWwqnq54x4Qlu9mDkLkifBuBYWMc4vflEeE2V0 q7TvkknS/WxXWS8Es1MQiuN3awdcx6YOg6eYORVFtbeM0804rTUJUrQ0F/9ScNel6KQl nmQ96rDIV0P388uWF2UTnEc4/sYUCh+ZkMOHwngknA0HsF6ytnloWXAebYcVVhiNt3UE R4jyfty4/MJq55nVShR8ymZlzjbOLpAHeKfGJS78ST5KA1KAW00CXZb8HkhZyUo54Wpc LIFxqDm5BRi3tsKs65Q8bLzN9i8j5zQzAyk8NZuUb3cSauwZnrUQZ5+jpg4ZokRNd9v6 IUVg== X-Gm-Message-State: AOAM531de1Oe36j9dgg1WGNECKs9ewCtx+s/kxVG3svnZ03DZILHmSnz CW9e6buFabWkRA1YJVyUan69ZZtQsVt5p/g8MQpFeg== X-Google-Smtp-Source: ABdhPJwGUWUfrwI2Gj1PUiSZK/Gy+7a+4FT1ZIYD2axdxa4zctYB4kLTrJlcswnI/OOCwcqUYWBjl8jTuPr8xeqVx6s= X-Received: by 2002:aca:4d05:: with SMTP id a5mr2339701oib.163.1625047494931; Wed, 30 Jun 2021 03:04:54 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jim Myhrberg Date: Wed, 30 Jun 2021 11:04:43 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I've just tried "Contents/lib", and it allowed me to sign and notarize the .app bundle. And combined with your patch from bug#49270, all bundled *.eln files are also correctly located and loaded :) I did a bit of searching myself for alternatives and found "Contents/PlugIns" as a potentially suitable place, but a quick test revealed codesign fails the same way with it as it does with Contents/MacOS. Personally I think Contents/lib is probably fine, as both codesign and Apple's notarization process are happy with it. And the notarization process seems very picky. For example, when *.eln files were in Resources/native-lisp, my initial notarization attempts failed because it considered the *.eln files to be binaries, and they had not been signed by codesign despite the --deep flag being used. Hence I'm individually signing all the *.eln files before signing the app bundle itself to get the app through notarization. Also, I should probably mention that I generally know little about macOS app development, and have mostly just tested my way forward with figuring out how to sign and notarize Emacs :) On Tue, Jun 29, 2021 at 8:19 PM Alan Third wrote: > > On Tue, Jun 29, 2021 at 12:58:44PM +0100, Jim Myhrberg wrote: > > Commit 5dd2d50 seems to have moved the native-lisp folder within self-contained > > Emacs.app bundles: > > > > - from: "Contents/Resources/native-lisp" > > - to: "Contents/MacOS/lib/emacs/28.0.50/native-lisp" > > > > Unfortunately, Apple's codesign utility blows up with an error if there is any > > folder within "Contents/MacOS" (recursively) which contains two dots within its > > name. Here is an example of what the error looks like: > > > > /Users/runner/work/emacs-builds/emacs-builds/builds/Emacs.2021-06-26.b8f9e58.master.macOS-10-15.x86_64/Emacs.app: > > bundle format unrecognized, invalid, or unsuitable > > In subcomponent: > > /Users/runner/work/emacs-builds/emacs-builds/builds/Emacs.2021-06-26.b8f9e58.master.macOS-10-15.x86_64/Emacs.app/Contents/MacOS/lib/emacs/28.0.50 > > Bummer. > > I had three options: > > * Contents/MacOS/lib > * Contents/Resources/ > * Contents/lib > > and a close reading of the Apple documentation left me none-the-wiser > as to which option I should use. Executable binaries go under MacOS, > but these aren't executables. Framework libraries go somewhere else > entirely, but these aren't framework libraries. Resources is intended > for images and things, not libs. Lib is entirely non-standard. > > I really don't know where the best place is. I'm still thinking > Resources is definitely not the right place, but none of the other > existing places make any sense, so perhaps the non-standard > /Contents/lib is the best option... > > Can you try that? In order to sort it edit configure.ac, search for > the first occurrence of "ns_applibdir" and change the path. > > If that fails then I guess we move them back under Resources. Unless > you have any better ideas. > -- > Alan Third From unknown Sat Jun 21 03:31:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Jun 2021 12:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49271 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Jim Myhrberg Cc: alan@idiocy.org, contact@jimeh.me, 49271@debbugs.gnu.org Received: via spool by 49271-submit@debbugs.gnu.org id=B49271.162505564523622 (code B ref 49271); Wed, 30 Jun 2021 12:21:01 +0000 Received: (at 49271) by debbugs.gnu.org; 30 Jun 2021 12:20:45 +0000 Received: from localhost ([127.0.0.1]:56662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyZCv-00068w-8v for submit@debbugs.gnu.org; Wed, 30 Jun 2021 08:20:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyZCu-00068l-3Q for 49271@debbugs.gnu.org; Wed, 30 Jun 2021 08:20:44 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36426) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyZCn-00055L-RC; Wed, 30 Jun 2021 08:20:38 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3281 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyZCn-0005KW-Fz; Wed, 30 Jun 2021 08:20:37 -0400 Date: Wed, 30 Jun 2021 15:20:41 +0300 Message-Id: <83zgv7mtly.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Jim Myhrberg on Wed, 30 Jun 2021 11:04:43 +0100) References: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Jim Myhrberg > Date: Wed, 30 Jun 2021 11:04:43 +0100 > > I've just tried "Contents/lib", and it allowed me to sign and notarize > the .app bundle. And combined with your patch from bug#49270, all > bundled *.eln files are also correctly located and loaded :) > > I did a bit of searching myself for alternatives and found > "Contents/PlugIns" as a potentially suitable place, but a quick test > revealed codesign fails the same way with it as it does with > Contents/MacOS. > > Personally I think Contents/lib is probably fine, as both codesign and > Apple's notarization process are happy with it. And the notarization > process seems very picky. For example, when *.eln files were in > Resources/native-lisp, my initial notarization attempts failed because > it considered the *.eln files to be binaries, and they had not been > signed by codesign despite the --deep flag being used. Hence I'm > individually signing all the *.eln files before signing the app bundle > itself to get the app through notarization. The *.eln files are shared libraries. What is the canonical place to install shared libraries specific to an application? From unknown Sat Jun 21 03:31:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location Resent-From: Jim Myhrberg Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Jun 2021 12:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49271 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Alan Third , 49271@debbugs.gnu.org Received: via spool by 49271-submit@debbugs.gnu.org id=B49271.16250567691436 (code B ref 49271); Wed, 30 Jun 2021 12:40:02 +0000 Received: (at 49271) by debbugs.gnu.org; 30 Jun 2021 12:39:29 +0000 Received: from localhost ([127.0.0.1]:56693 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyZV3-0000N6-HQ for submit@debbugs.gnu.org; Wed, 30 Jun 2021 08:39:29 -0400 Received: from mail-ot1-f45.google.com ([209.85.210.45]:40817) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyZV1-0000Mr-2o for 49271@debbugs.gnu.org; Wed, 30 Jun 2021 08:39:27 -0400 Received: by mail-ot1-f45.google.com with SMTP id d21-20020a9d72d50000b02904604cda7e66so2505790otk.7 for <49271@debbugs.gnu.org>; Wed, 30 Jun 2021 05:39:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jimeh.me; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZgNrWNczMR7YRy+Zz1ZJWmzuJBzn0m5+XbVpeQZwG1c=; b=H2NhS7bX8TSno2oqHD0g86iZEV/XvwoRx5FFvNLrsDJ4QvKfykB3CW36MvuMmWWdBO 0+0AtstCRICJ161z1GP2lH8p+GtKmN2ZMpzLsS95Sx7MZ9dKRnwGRI/4+jt52N+4UBvk FDKXfyznLgwrsv72nhJOZUbYfDUzO2Bg1TRlA3ZgTpoqbKIYlsDEDUprVMkR7xj6SUEF VJqXwfVFJVKw/n6dqeI3y//qG2GimfzxKBBl9NfBWiz0pCns84LEDY7jVDlll4jp1qqz gwg7nBvc2+kUmsgsvDQsv1VcHhU+GYVlKBZEswqQytehI9XPms8dIbzA0qmKLW8YzVYL eKQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZgNrWNczMR7YRy+Zz1ZJWmzuJBzn0m5+XbVpeQZwG1c=; b=ePsYIzdZcbdB3Pl+vaohc9kVOAfcbch/roNGpiDIjwhMe4aYXCANT37SODS/l/nHNU BYWzurxF4v4wmuHWcZvO1ElJrWnKcdUZMD9DF6SxxPFcocw/cnPLNHHCsyzMVc2aYM59 GpP0+VQqZ9YaRMq/g3TK0P4isnROhpD23hi9Dx4NOj3/YiuTI9U/2HsWxXN44MUAK/PB fRu18egOsQfGsluflhJAvnIwn3rpXkkHw6VdfulAOOmF0ZsrXVKhQtARRNRsW8f3jg0y ZHU00pM1Lk6bCQa8qTX+Dj3zWaG/d9N4nTCJ351pfpfSPuKDtwxYz0P61OhE+H3LYpu9 z6uw== X-Gm-Message-State: AOAM532yhu/6iuyyBBNl5rII8hIkIqJlx/yn8UthEHuLjCARx53KTE0g gMq3V948INeAcJnZtK7UCf65yv97Fbc3DoHIf4Dz6w== X-Google-Smtp-Source: ABdhPJxtN7xk/6OyLS4WZLy2ipQM2HQw+Ln0acwRjnGylL1ovOL/U3b2OAWfdLBUs6JBZKP4iJm/RCiQExLawxkIa8Y= X-Received: by 2002:a9d:d42:: with SMTP id 60mr8786179oti.88.1625056761204; Wed, 30 Jun 2021 05:39:21 -0700 (PDT) MIME-Version: 1.0 References: <83zgv7mtly.fsf@gnu.org> In-Reply-To: <83zgv7mtly.fsf@gnu.org> From: Jim Myhrberg Date: Wed, 30 Jun 2021 13:39:10 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, Jun 30, 2021 at 1:20 PM Eli Zaretskii wrote: > The *.eln files are shared libraries. What is the canonical place to > install shared libraries specific to an application? This page indicates that "Contents/Frameworks" is the place for shared libraries: https://wiki.lazarus.freepascal.org/Application_Bundle I just poked around the internals of a bunch of Apple's apps and a few third party apps, and it looks like "Contents/Frameworks" is where they're storing *.dylib files among other things. So it might be the sensible place for shared libraries. However, the same "two dots in folder name" issue applies with codesign there too, so to use it we'd need to drop the emacs version (28.0.50) from all folder paths. From unknown Sat Jun 21 03:31:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Jun 2021 12:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49271 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Jim Myhrberg , 49271@debbugs.gnu.org Received: via spool by 49271-submit@debbugs.gnu.org id=B49271.16250569531722 (code B ref 49271); Wed, 30 Jun 2021 12:43:01 +0000 Received: (at 49271) by debbugs.gnu.org; 30 Jun 2021 12:42:33 +0000 Received: from localhost ([127.0.0.1]:56697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyZY1-0000Ri-2t for submit@debbugs.gnu.org; Wed, 30 Jun 2021 08:42:33 -0400 Received: from outbound.soverin.net ([116.202.126.228]:35767) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyZY0-0000RV-AW for 49271@debbugs.gnu.org; Wed, 30 Jun 2021 08:42:32 -0400 Received: from smtp.soverin.net (unknown [10.10.3.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 1371E903; Wed, 30 Jun 2021 12:42:26 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.142]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1625056945; bh=XxSw6GUKgSMEyvC6PfBcbj9AweuPFeLhnoGYoXjHGbc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M4gyP8rLFqcoG6xB7NAxulessMIVu4ysIBHNZmpudILrnqTAU8TuvMpOCSbw+UHne +x78YbM6LEACIlzV1zqZL5Va2XBj7j8VI9gwa4loufzEoi5mgTAPxdXzQ3PEIsIBsB d4r7p6Bu7YwRIPTZoZqqxf5/S2TDBpBZ4r9GgQ4Pz91sViPJUprwWCwIswO5CEngik 6sNt/4m/TnvvSpmT9igljvJwJ/gqrJ2QQQZXViRZYMyYgZ8HBftS1GCHz9m2EYUD8k qKoNXIdFA7TkZGVI+RGB1nxq+HaKdCvxBgIt01ffjY+HWU6/Hsd/IQ6b3fRa3/oj+j qKrxO8rOuBSKg== Received: by breton.holly.idiocy.org (Postfix, from userid 501) id 3F60D202CCFA20; Wed, 30 Jun 2021 13:42:21 +0100 (BST) Date: Wed, 30 Jun 2021 13:42:21 +0100 From: Alan Third Message-ID: Mail-Followup-To: Alan Third , Eli Zaretskii , Jim Myhrberg , 49271@debbugs.gnu.org References: <83zgv7mtly.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83zgv7mtly.fsf@gnu.org> X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Wed, Jun 30, 2021 at 03:20:41PM +0300, Eli Zaretskii wrote: > The *.eln files are shared libraries. What is the canonical place to > install shared libraries specific to an application? AFAICT there isn't one. Apple don't expect you to use any, or at least not to copy them into your application bundle. The Objective C equivalent are Frameworks, and there's a place for them, but they have a specific file structure and I don't think we want to try and emulate that for standard shared libraries. There also doesn't appear to be any consensus in the community as I've seen several places suggested. I'm inclined to towards Contents/lib. It works for Jim and I think it should be fairly clear to outside observers what's going on. Although I've just done another search and found multiple people suggesting Contents/Frameworks is the correct place to put them. Jim, does putting them in Frameworks work or does that have signing implications too? (None of this seems to matter at all on my machine, so I can't test it myself.) -- Alan Third From unknown Sat Jun 21 03:31:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location Resent-From: Jim Myhrberg Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Jun 2021 12:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49271 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Third , Eli Zaretskii , Jim Myhrberg , 49271@debbugs.gnu.org Received: via spool by 49271-submit@debbugs.gnu.org id=B49271.16250575262677 (code B ref 49271); Wed, 30 Jun 2021 12:53:02 +0000 Received: (at 49271) by debbugs.gnu.org; 30 Jun 2021 12:52:06 +0000 Received: from localhost ([127.0.0.1]:56728 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyZhF-0000h6-Fr for submit@debbugs.gnu.org; Wed, 30 Jun 2021 08:52:06 -0400 Received: from mail-ot1-f54.google.com ([209.85.210.54]:38719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyZh0-0000gN-My for 49271@debbugs.gnu.org; Wed, 30 Jun 2021 08:52:04 -0400 Received: by mail-ot1-f54.google.com with SMTP id x22-20020a9d6d960000b0290474a76f8bd4so949081otp.5 for <49271@debbugs.gnu.org>; Wed, 30 Jun 2021 05:51:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jimeh.me; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=c+eDngXSWnuzNHciSgtdpWtzjEGVEueeREUxPyoOOw4=; b=ho6piQnZNOCd/bd7YKLPyBccI6IJG9qA15R1rbuZ8MCFifAxo8EUFoVF73yaWmjyw3 TC8yXyjVD+IGGInNXt+64GD1R+R+tk664mTgznRjDWWMQcIOT3Ei4O0BF0AE6CkEuBFZ dT577jqmPF4yC49+QTUJ+SZoPV6bFileJmJjdFLtidG90WJmKRuKYiyhQvNFNEgeaxzA rZUt8MMB3BR3NsFfkANvoSq05BVvezYouPpjke5jYkxb9Q8r/Uo7WXFp+hHlrKsPVmqv 5R2Sz/Ss9aUDK9l/TbJcMGGqxI62PBXW5K9/Bc9SQFB3NX5bwsOackziae31Hkxj3+H4 ZASg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=c+eDngXSWnuzNHciSgtdpWtzjEGVEueeREUxPyoOOw4=; b=mBO3FhgVg+/0yJxv8fDW7e20Ga0eu6fscm9OL+hV2lIA5n/+qcOsFcET5g7cx4geou LInQ0veMX7X2x6YEc3HOX2zOmJ7G5Ex0gUtcsuuCXSNPgx4jfl+EVc3qxaUWY29rfyEo XciGEvUKIxIzFpP1d/sQqXU/WtuEzRjk3CQWDxOifgIocQpvCxmdTzLI7odKCyNWYBGB C9oh1ebzdyUbed4nv0pAbzNM62Um5UaZ5UHOBzq01zTzRCZN9ubIpsUn/8kmtXzbKjkX Lmdke/QKXIqQP9+hQY2voXO8Z7N8dK1took7SstLn3UWFiU7iY4q6lkPENm80XFBjrc3 TOIA== X-Gm-Message-State: AOAM530nUNBYVZIBTwl4XyKK6NKAzY8KWMvSS7A9GQWnA14/twNQqvL3 pa1B2BL/CABYs1dcDDHhnvvThXW4706j+Y8oMZqleA== X-Google-Smtp-Source: ABdhPJx8RfwoSXT2d+3UKGwFHEpedMGy5otLKtcmYWPc0rTaEEHwcr+/qv0kZMhMCXaYTUDjxeDsTDN9fAam1NRqMmI= X-Received: by 2002:a05:6830:1386:: with SMTP id d6mr8855803otq.115.1625057504865; Wed, 30 Jun 2021 05:51:44 -0700 (PDT) MIME-Version: 1.0 References: <83zgv7mtly.fsf@gnu.org> In-Reply-To: From: Jim Myhrberg Date: Wed, 30 Jun 2021 13:51:33 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, Jun 30, 2021 at 1:42 PM Alan Third wrote: > Jim, does putting them in Frameworks work or does that have signing > implications too? You must not have seen my email from a couple of minutes ago, I'm afraid I tested Frameworks and it has the same folder naming issues. >From the apps I poked around in, they've just put all their *.dylib files directly in the root of the Frameworks directory. > (None of this seems to matter at all on my machine, so I can't test it > myself.) What version of macOS/Xcode do you have? Case I've seen slight differences in behavior with codesign on Catalina and Big Sur at least (unrelated to the two dots issue though). I've written a small CLI tool to make life easier for myself when it comes to signing, dmg packaging, and notarizing Emacs. I'm happy to point you towards it if you want. From unknown Sat Jun 21 03:31:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Jun 2021 12:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49271 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Jim Myhrberg Cc: Eli Zaretskii , 49271@debbugs.gnu.org Received: via spool by 49271-submit@debbugs.gnu.org id=B49271.16250576002792 (code B ref 49271); Wed, 30 Jun 2021 12:54:01 +0000 Received: (at 49271) by debbugs.gnu.org; 30 Jun 2021 12:53:20 +0000 Received: from localhost ([127.0.0.1]:56732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyZiK-0000ip-7R for submit@debbugs.gnu.org; Wed, 30 Jun 2021 08:53:20 -0400 Received: from outbound.soverin.net ([116.202.126.228]:45397) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyZiI-0000id-El for 49271@debbugs.gnu.org; Wed, 30 Jun 2021 08:53:11 -0400 Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id B2106903; Wed, 30 Jun 2021 12:53:04 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1625057583; bh=58yRHi5vDuwqCtTiBBogeCERgBQ3NmOxnHBFQzd60TE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g5vyS87YOo82yxOxaP2k4zm/6hLSlU6xCOV3NNyDGMRGVXwrhPOaXNkb6qaeuwWx9 OIwb5eAr6/W50+JXSN01ko7d01SKc0VaUtELRkm7pIrNPfPn5Sv9BRFvYJcn/dgM6T D3Ess4lW5kwSbSUaxyk9Ll9b/7mPCKMqPUarW+/fdNH+e4948OdbogCt9cFLnGVU29 osrgl9Q++vuh8i9BInN3bR2pkb70Rul975YocHLNNVTldot6e/6RA2YbnMboL51vBM NvI+sONlKTEHM++lSiantFFnod7ZX/xs1XnE7cvaFO3upTHRPDux5vaDxvivunJWCW +YycJuMX6VcCA== Received: by breton.holly.idiocy.org (Postfix, from userid 501) id C2105202CCFB4B; Wed, 30 Jun 2021 13:52:57 +0100 (BST) Date: Wed, 30 Jun 2021 13:52:57 +0100 From: Alan Third Message-ID: Mail-Followup-To: Alan Third , Jim Myhrberg , Eli Zaretskii , 49271@debbugs.gnu.org References: <83zgv7mtly.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Wed, Jun 30, 2021 at 01:39:10PM +0100, Jim Myhrberg wrote: > On Wed, Jun 30, 2021 at 1:20 PM Eli Zaretskii wrote: > > > The *.eln files are shared libraries. What is the canonical place to > > install shared libraries specific to an application? > > This page indicates that "Contents/Frameworks" is the place for shared > libraries: https://wiki.lazarus.freepascal.org/Application_Bundle > > I just poked around the internals of a bunch of Apple's apps and a few > third party apps, and it looks like "Contents/Frameworks" is where > they're storing *.dylib files among other things. So it might be the > sensible place for shared libraries. However, the same "two dots in > folder name" issue applies with codesign there too, so to use it we'd > need to drop the emacs version (28.0.50) from all folder paths. I just found this page which explains the deal with the dots in directory names: https://developer.apple.com/library/archive/technotes/tn2206/_index.html search for "period". It also explains why you need to put code in certain directories. I don't know why that page has been so hard to find. Anyway, I guess we do need to change the install location so it doesn't have the dots. It shouldn't really matter for the application bundle since you can't have multiple versions of Emacs installed in one bundle (without some hardcore messing around like the emacsformacosx.com builds). -- Alan Third From unknown Sat Jun 21 03:31:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location Resent-From: Jim Myhrberg Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Jun 2021 13:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49271 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Third , Jim Myhrberg , Eli Zaretskii , 49271@debbugs.gnu.org Received: via spool by 49271-submit@debbugs.gnu.org id=B49271.16250586764697 (code B ref 49271); Wed, 30 Jun 2021 13:12:01 +0000 Received: (at 49271) by debbugs.gnu.org; 30 Jun 2021 13:11:16 +0000 Received: from localhost ([127.0.0.1]:56770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyZzn-0001Dh-KB for submit@debbugs.gnu.org; Wed, 30 Jun 2021 09:11:15 -0400 Received: from mail-ot1-f45.google.com ([209.85.210.45]:43822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyZzi-0001DP-Kz for 49271@debbugs.gnu.org; Wed, 30 Jun 2021 09:11:14 -0400 Received: by mail-ot1-f45.google.com with SMTP id i12-20020a05683033ecb02903346fa0f74dso2600571otu.10 for <49271@debbugs.gnu.org>; Wed, 30 Jun 2021 06:11:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jimeh.me; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=8fficQ5jT5/SW+eG0Np49ERKtKk57qAgVAznELkSYh8=; b=c2FTSuF8eDxAii5rMzjVMmjXlDIrF2/EAH9H4j2OGIEVbmDuTlTgCU6bo5Ve7/uxDi 0sUJPFUD61xZjh0/Rzo8aV++cCf1UFXzw5gPc3Xvd1Duu+ZjcecyJSCS80tTHxreevFZ gzQXkQ6mXVbYj8W77gjPdGv3M/5FthfuWdmDKK0tI8Nn7ycYWOX7v8bcC3IMnfPWspb9 ulhAmR6Rftl3ULH/ZAMyxzWzIl/Sx7IzrXBFzaFqDPV+mzWlXEhrYiR9pzGkmVD8u+Sm s1RA3wDUvi5gbYNkReemUgegIMbILBrxyB1S3Ia0jF8vksi+26tIlkIkxJTB+0a5TM17 RkBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=8fficQ5jT5/SW+eG0Np49ERKtKk57qAgVAznELkSYh8=; b=dmEVBAjedmceyG+O3RR/aY9YRvwF0EdFDZOuxZ9mzWO9Kv04l9fAKhkez5IBUG4Nvs DJK8e7DZnuL1yYPxNLO8ivJOe74lkX+v4b/h4sxV0xFU6Ixn2SHIbyfHkPuw7Ixw70tk 96D99gpU3KXtVzMonX69DZHVskPeQhYGnPbrGC0SvlDk0PJqoFi+q1UpXONJ5aSOo6l9 zE8R7rodY+1MjpEFUw4/85bt+mdXnqMCjdrOekvOtiFkdSSlC48yAz3jd146ZmLRteW9 gdY/mIaYtxD6ssBBnqDJSEU2a46+X9+J+bWxsVJuUiWagPXoyN1Axt4IjXdt/qIFcW6W vcRQ== X-Gm-Message-State: AOAM532B4PLB9sDLNbbJOIiVYs2dz7hVkXzjO37EjSOwSGPZiujOIGtE 1XndeDFdi/9Y7+5huS2AtKY1SgKv5cbi+eGYjS2E0A== X-Google-Smtp-Source: ABdhPJxm6RRGUs78jKnflLOkbieK01rqxrdVhfjHsXk8P7zdP3ounTAonHHLCeGTV4FNA/SH856FTdgjSBCM880wzKo= X-Received: by 2002:a9d:7547:: with SMTP id b7mr9130014otl.362.1625058664907; Wed, 30 Jun 2021 06:11:04 -0700 (PDT) MIME-Version: 1.0 References: <83zgv7mtly.fsf@gnu.org> In-Reply-To: From: Jim Myhrberg Date: Wed, 30 Jun 2021 14:10:53 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, Jun 30, 2021 at 1:53 PM Alan Third wrote: > I just found this page which explains the deal with the dots in > directory names: > > https://developer.apple.com/library/archive/technotes/tn2206/_index.html > > search for "period". > > It also explains why you need to put code in certain directories. I > don't know why that page has been so hard to find. Damn, yeah it makes sense now :) > Anyway, I guess we do need to change the install location so it > doesn't have the dots. It shouldn't really matter for the application > bundle since you can't have multiple versions of Emacs installed in > one bundle (without some hardcore messing around like the > emacsformacosx.com builds). For multi-arch builds I think special care will need to be taken anyway. The emacsformacosx.com builds for example have duplicate shared libraries for each supported architecture. Personally though I'm planning to just create separate builds/dmgs for each when I'm able to support anything other than x86_64. The main self-contained Emacs.app my builds are producing at the moment are already 500MB thanks to full native AoT and essentially copying most of GCC into the bundle for libgccjit to work. Also, I'd obviously be more than happy to help with testing any further changes to eln file locations and related things :) From unknown Sat Jun 21 03:31:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Jun 2021 19:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49271 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Jim Myhrberg Cc: Eli Zaretskii , 49271@debbugs.gnu.org Received: via spool by 49271-submit@debbugs.gnu.org id=B49271.16250799669203 (code B ref 49271); Wed, 30 Jun 2021 19:07:02 +0000 Received: (at 49271) by debbugs.gnu.org; 30 Jun 2021 19:06:06 +0000 Received: from localhost ([127.0.0.1]:58735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyfXC-0002ON-6l for submit@debbugs.gnu.org; Wed, 30 Jun 2021 15:06:06 -0400 Received: from outbound.soverin.net ([116.202.126.228]:36137) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyfX6-0002Nm-JQ for 49271@debbugs.gnu.org; Wed, 30 Jun 2021 15:06:04 -0400 Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 6EBB12FC; Wed, 30 Jun 2021 19:05:54 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1625079953; bh=eXhD80qaMSvIxQKxBfk8kkiEQ+seK1170Rap93OQONc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hmTXlbByOxzP7RNxTTox9Ipao5ItKr2ANohYQXXd2TVUIltDE9XP9kGNdJo/1Wow8 f6aOIY15FNTteyUL6XXOdUPo2PkArnMgRIUkaBaKM2IlxncuRJk2cDDd5urAyXg4Ry qZ6jdJdXR8UXWrJ/qU9fBjDwkD5g6XG4aZu4rUaT8eEt7veE279mBP3Zzeh+6HbQBP EHfSqsDQhSDB8pCJnjKo7auQS16tM8BuD7LJfFsOgmrXCUup0Ms+IR7aVJJJCQyMrU kavxLvsOImgjZwruvnBztQupTmww8oDraps8vUyE0KkFJba1RuiOHHjAU3W1j+c8uN SSMaIK65VbOSQ== Received: by breton.holly.idiocy.org (Postfix, from userid 501) id C86A6202CDB125; Wed, 30 Jun 2021 20:05:50 +0100 (BST) Date: Wed, 30 Jun 2021 20:05:50 +0100 From: Alan Third Message-ID: Mail-Followup-To: Alan Third , Jim Myhrberg , Eli Zaretskii , 49271@debbugs.gnu.org References: <83zgv7mtly.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="1jQ6yaDFItKq7seQ" Content-Disposition: inline In-Reply-To: X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --1jQ6yaDFItKq7seQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jun 30, 2021 at 02:10:53PM +0100, Jim Myhrberg wrote: > > Also, I'd obviously be more than happy to help with testing any > further changes to eln file locations and related things :) Please try the attached patch. Eli, is this an acceptable way of modifying a lisp string, or is there a better way? I considered just removing the version since it doesn't matter much for the app bundle, but then I realised that would also remove it in the eln cache in .emacs.d, which isn't ideal, so I ended up replacing the dots with underscores. -- Alan Third --1jQ6yaDFItKq7seQ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Fix-NS-self-contained-eln-location-bug-49271.patch" >From 2d408e5db6f4d111bdf687eea939b0897dad58cd Mon Sep 17 00:00:00 2001 From: Alan Third Date: Wed, 30 Jun 2021 19:58:13 +0100 Subject: [PATCH] Fix NS self contained eln location (bug#49271) * Makefile.in: * configure.ac: Change eln file install location to Contents/Frameworks. * src/comp.c (hash_native_abi): Replace dots with underscores in the eln install location as the macOS code-signing tool won't sign the files if the parent directories have dots. --- Makefile.in | 2 +- configure.ac | 4 ++-- src/comp.c | 20 +++++++++++++++++++- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in index 8fccdf7580..8c14c5cc7d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -333,7 +333,7 @@ BIN_DESTDIR= ELN_DESTDIR = $(DESTDIR)${libdir}/emacs/${version}/ else BIN_DESTDIR='${ns_appbindir}/' -ELN_DESTDIR = ${ns_applibdir}/emacs/${version}/ +ELN_DESTDIR = ${ns_applibdir}/ endif all: ${SUBDIR} info diff --git a/configure.ac b/configure.ac index 6e2cda947a..c924634d5b 100644 --- a/configure.ac +++ b/configure.ac @@ -1895,7 +1895,7 @@ AC_DEFUN ns_appdir=`pwd`/nextstep/Emacs.app ns_appbindir=${ns_appdir}/Contents/MacOS ns_applibexecdir=${ns_appdir}/Contents/MacOS/libexec - ns_applibdir=${ns_appdir}/Contents/MacOS/lib + ns_applibdir=${ns_appdir}/Contents/Frameworks ns_appresdir=${ns_appdir}/Contents/Resources ns_appsrc=Cocoa/Emacs.base ns_fontfile=macfont.o @@ -1954,7 +1954,7 @@ AC_DEFUN ns_appdir=`pwd`/nextstep/Emacs.app ns_appbindir=${ns_appdir} ns_applibexecdir=${ns_appdir}/libexec - ns_applibdir=${ns_appdir}/lib + ns_applibdir=${ns_appdir}/Frameworks ns_appresdir=${ns_appdir}/Resources ns_appsrc=GNUstep/Emacs.base ns_fontfile=nsfont.o diff --git a/src/comp.c b/src/comp.c index ea05952627..ac77ae704d 100644 --- a/src/comp.c +++ b/src/comp.c @@ -744,8 +744,26 @@ hash_native_abi (void) Vsystem_configuration_options), Fmapconcat (intern_c_string ("comp--subr-signature"), Vcomp_subr_list, build_string ("")))); + + Lisp_Object version = Vemacs_version; + +#ifdef NS_SELF_CONTAINED + /* MacOS self contained app bundles do not like having dots in the + directory names under the Contents/Frameworks directory, so + convert them to underscores. */ + + char *str = xstrdup (SSDATA(version)); + + for (ptrdiff_t c = 0 ; c < SBYTES (version) ; c++) + if (*(str + c) == '.') + *(str + c) = '_'; + + version = build_string (str); + xfree (str); +#endif + Vcomp_native_version_dir = - concat3 (Vemacs_version, build_string ("-"), Vcomp_abi_hash); + concat3 (version, build_string ("-"), Vcomp_abi_hash); } static void -- 2.29.2 --1jQ6yaDFItKq7seQ-- From unknown Sat Jun 21 03:31:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Jul 2021 07:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49271 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Third Cc: contact@jimeh.me, 49271@debbugs.gnu.org Received: via spool by 49271-submit@debbugs.gnu.org id=B49271.162512358831919 (code B ref 49271); Thu, 01 Jul 2021 07:14:01 +0000 Received: (at 49271) by debbugs.gnu.org; 1 Jul 2021 07:13:08 +0000 Received: from localhost ([127.0.0.1]:59424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyqsm-0008Il-Er for submit@debbugs.gnu.org; Thu, 01 Jul 2021 03:13:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyqsj-0008IE-Ux for 49271@debbugs.gnu.org; Thu, 01 Jul 2021 03:13:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42140) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyqsd-0001OE-36; Thu, 01 Jul 2021 03:12:59 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1537 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyqsc-0001OJ-NC; Thu, 01 Jul 2021 03:12:59 -0400 Date: Thu, 01 Jul 2021 10:13:04 +0300 Message-Id: <83v95uld6n.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Alan Third on Wed, 30 Jun 2021 20:05:50 +0100) References: <83zgv7mtly.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 30 Jun 2021 20:05:50 +0100 > From: Alan Third > Cc: Eli Zaretskii , 49271@debbugs.gnu.org > > Eli, is this an acceptable way of modifying a lisp string, or is there > a better way? > [...] > +#ifdef NS_SELF_CONTAINED > + /* MacOS self contained app bundles do not like having dots in the > + directory names under the Contents/Frameworks directory, so > + convert them to underscores. */ > + > + char *str = xstrdup (SSDATA(version)); > + > + for (ptrdiff_t c = 0 ; c < SBYTES (version) ; c++) > + if (*(str + c) == '.') > + *(str + c) = '_'; > + > + version = build_string (str); > + xfree (str); > +#endif It should work, although I'd prefer writing such code the other way around: first create an uninitialized Lisp string (with make_uninit_multibyte_string or make_uninit_string), then copy the bytes while making the conversions. The reason for this preference is that you could then make sure the produced string has the same multibyte-ness as the original, whereas the way you did it relies on whatever build_string decides, which is not necessarily the same. Thanks. From unknown Sat Jun 21 03:31:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location Resent-From: Jim Myhrberg Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Jul 2021 14:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49271 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Third Cc: Eli Zaretskii , 49271@debbugs.gnu.org Received: via spool by 49271-submit@debbugs.gnu.org id=B49271.162515121315301 (code B ref 49271); Thu, 01 Jul 2021 14:54:02 +0000 Received: (at 49271) by debbugs.gnu.org; 1 Jul 2021 14:53:33 +0000 Received: from localhost ([127.0.0.1]:33547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyy4L-0003yh-DD for submit@debbugs.gnu.org; Thu, 01 Jul 2021 10:53:33 -0400 Received: from mail-wr1-f48.google.com ([209.85.221.48]:34492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyy4I-0003yQ-BE for 49271@debbugs.gnu.org; Thu, 01 Jul 2021 10:53:32 -0400 Received: by mail-wr1-f48.google.com with SMTP id p8so8646748wrr.1 for <49271@debbugs.gnu.org>; Thu, 01 Jul 2021 07:53:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jimeh.me; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=VgBY+u3DJtHxA6ngLHkl7/1/xFF8OMM3WBOvnNG783o=; b=EXaWacgnOqFAfQoBFVfk4r12WxtdG/xN9vfq1H3F3THzWJQZafaDd3CKJfKeBueP9w KAh6lDARrWNrynmDlLGUjZCGRQJ7QkLnFtdFDEW9unYNUVe2GzCheMDyTpLAARaEt4dq USemKtQS7NnJhQyJPgysFyU+kWVkCe73YaghG15nbh6GaI/wcyb65AWfxF9o2rygV93u Jf2+uN/UlgYZr2YgWH1HVFG6xuJ+OPiR/LUwgdz1pf2tEPJQUzb6Q3rCfJAmnkul+BuW L6Mw+yDtVMtGz0bAzMY3srDT8kbWbIv/WMNY2ofvIw5z9PhCecix5l3EYGhjLCpebbhp w04A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=VgBY+u3DJtHxA6ngLHkl7/1/xFF8OMM3WBOvnNG783o=; b=Sl7Se8caFXUYejVu1DKkO3f6/7E/reJpszguBp4NIdbXnMqlWOl3J5Cw2/BJwpjwoJ TJiUbs9BcmYCo2subVzfYztnRgRkViwY0jNwsFYOCFn3Zz6vDyndbmLWoP51SiIB2Eme F1fVYaw5hKVEcSrDk7ThEo9p8LREalG/Kgz5ROR4qsDhXls0FkNQxKA+Qweqyn6UXLyj uYg/a1oNMzQgFN4y2YVopPweqpL9cF7asoAz51CGSX0qRm/pkd51EjEvJMy1x4lLnt3P TQUNLKnWG2mms9gDa4FZfyOzj0CGDLrTo7I2FgwKKZ0NmkwrhAPxNeHItwhuEwUsaeaO 8KYQ== X-Gm-Message-State: AOAM531tRy8wyjDCkOs37h9X9riHNxJ4MQmOZ9Lz1Q7aTYXq5ymGTJCG zHm/vruvxVjaVwcuJAj2fP6tuw== X-Google-Smtp-Source: ABdhPJwwESkHfD5IWIdkr1WY48DD/ofVIgYS7AqgysIvhiXr7pnECZzj0guDxV74a/rw2DUlfrwbyQ== X-Received: by 2002:adf:d212:: with SMTP id j18mr66945wrh.150.1625151204258; Thu, 01 Jul 2021 07:53:24 -0700 (PDT) Received: from smtpclient.apple ([185.195.232.156]) by smtp.gmail.com with ESMTPSA id c12sm147652wrr.90.2021.07.01.07.53.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jul 2021 07:53:23 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.80.0.2.43\)) From: Jim Myhrberg In-Reply-To: Date: Thu, 1 Jul 2021 15:53:13 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <7E142F36-1D22-424E-8B3B-7AC74C1A8772@jimeh.me> References: <83zgv7mtly.fsf@gnu.org> X-Mailer: Apple Mail (2.3654.80.0.2.43) X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On 30 Jun 2021, at 20:05, Alan Third wrote: >=20 > Please try the attached patch. I've successfully built, signed and notarized a full AoT build with this = patch. I also applied the patch from bug#49270 to ensure *.eln files are = located correctly within the bundle. Everything is working as expected, and in fact, codesign even = automatically finds and signs all *.eln files within Contents/Frameworks = when signing the app bundle itself, so I no longer need to individually = sign each *.eln file before signing the whole app bundle :)= From unknown Sat Jun 21 03:31:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Jul 2021 18:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49271 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: contact@jimeh.me, 49271@debbugs.gnu.org Received: via spool by 49271-submit@debbugs.gnu.org id=B49271.16251651629382 (code B ref 49271); Thu, 01 Jul 2021 18:47:01 +0000 Received: (at 49271) by debbugs.gnu.org; 1 Jul 2021 18:46:02 +0000 Received: from localhost ([127.0.0.1]:33701 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lz1hK-0002R3-F2 for submit@debbugs.gnu.org; Thu, 01 Jul 2021 14:46:02 -0400 Received: from outbound.soverin.net ([116.202.126.228]:42295) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lz1hE-0002QW-MC for 49271@debbugs.gnu.org; Thu, 01 Jul 2021 14:46:00 -0400 Received: from smtp.soverin.net (unknown [10.10.3.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id F40F792; Thu, 1 Jul 2021 18:45:50 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.142]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1625165150; bh=nNr1cjuTIsuGnmLk45fYh0YdHMsC2m5QlYkYeN4X73E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZeUwys/q0c+X9TcoQGOPQCJP8z7FBbBMFvmyTqstvI5qf+TS3VuCUxBz6cnHa7fq+ FHRWUpC5qGm0U/WYKLK/8tK/RQT/8CXjq+ASCx0kGqbPR3BT72mOih7y+K6fKbD8vV w70Ji86AKBd0iT6rPTpzBRTAZkN4POhd3ZgDR0gmvkIWiX62hHudZNJA8Yt4eC7IbG fVja4Ez8+dzd0WKzqG3XPjebw6vxT6adqxTPlb7rT9mquVGO1Jp14Wmg65j3wMhIZY mA+t0Uue84SpSBCGnBfJdyCctJIP7gW7MMF/b44BmPMGsib+iTG/L6bWcSNP1q3Rk7 0v6wbF96KKCuA== Received: by breton.holly.idiocy.org (Postfix, from userid 501) id 09224202CDC89B; Thu, 1 Jul 2021 19:45:46 +0100 (BST) Date: Thu, 1 Jul 2021 19:45:46 +0100 From: Alan Third Message-ID: Mail-Followup-To: Alan Third , Eli Zaretskii , contact@jimeh.me, 49271@debbugs.gnu.org References: <83zgv7mtly.fsf@gnu.org> <83v95uld6n.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="/RofLedAnAvQkvPz" Content-Disposition: inline In-Reply-To: <83v95uld6n.fsf@gnu.org> X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --/RofLedAnAvQkvPz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jul 01, 2021 at 10:13:04AM +0300, Eli Zaretskii wrote: > It should work, although I'd prefer writing such code the other way > around: first create an uninitialized Lisp string (with > make_uninit_multibyte_string or make_uninit_string), then copy the > bytes while making the conversions. The reason for this preference is > that you could then make sure the produced string has the same > multibyte-ness as the original, whereas the way you did it relies on > whatever build_string decides, which is not necessarily the same. Thanks. I think the attached is doing what you suggested. -- Alan Third --/RofLedAnAvQkvPz Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="v2-0001-Fix-NS-self-contained-eln-location-bug-49271.patch" >From 8de89ce0d2ae7f84ab2df025ae405b15994dfdb6 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Wed, 30 Jun 2021 19:58:13 +0100 Subject: [PATCH v2] Fix NS self contained eln location (bug#49271) * Makefile.in: * configure.ac: Change eln file install location to Contents/Frameworks. * src/comp.c (hash_native_abi): Replace dots with underscores in the eln install location as the macOS code-signing tool won't sign the files if the parent directories have dots. --- Makefile.in | 2 +- configure.ac | 4 ++-- src/comp.c | 35 ++++++++++++++++++++++++++++++++++- 3 files changed, 37 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in index 8fccdf7580..8c14c5cc7d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -333,7 +333,7 @@ BIN_DESTDIR= ELN_DESTDIR = $(DESTDIR)${libdir}/emacs/${version}/ else BIN_DESTDIR='${ns_appbindir}/' -ELN_DESTDIR = ${ns_applibdir}/emacs/${version}/ +ELN_DESTDIR = ${ns_applibdir}/ endif all: ${SUBDIR} info diff --git a/configure.ac b/configure.ac index 6e2cda947a..c924634d5b 100644 --- a/configure.ac +++ b/configure.ac @@ -1895,7 +1895,7 @@ AC_DEFUN ns_appdir=`pwd`/nextstep/Emacs.app ns_appbindir=${ns_appdir}/Contents/MacOS ns_applibexecdir=${ns_appdir}/Contents/MacOS/libexec - ns_applibdir=${ns_appdir}/Contents/MacOS/lib + ns_applibdir=${ns_appdir}/Contents/Frameworks ns_appresdir=${ns_appdir}/Contents/Resources ns_appsrc=Cocoa/Emacs.base ns_fontfile=macfont.o @@ -1954,7 +1954,7 @@ AC_DEFUN ns_appdir=`pwd`/nextstep/Emacs.app ns_appbindir=${ns_appdir} ns_applibexecdir=${ns_appdir}/libexec - ns_applibdir=${ns_appdir}/lib + ns_applibdir=${ns_appdir}/Frameworks ns_appresdir=${ns_appdir}/Resources ns_appsrc=GNUstep/Emacs.base ns_fontfile=nsfont.o diff --git a/src/comp.c b/src/comp.c index ea05952627..c45f9e3a7f 100644 --- a/src/comp.c +++ b/src/comp.c @@ -744,8 +744,41 @@ hash_native_abi (void) Vsystem_configuration_options), Fmapconcat (intern_c_string ("comp--subr-signature"), Vcomp_subr_list, build_string ("")))); + + Lisp_Object version = Vemacs_version; + +#ifdef NS_SELF_CONTAINED + /* MacOS self contained app bundles do not like having dots in the + directory names under the Contents/Frameworks directory, so + convert them to underscores. */ + unsigned char *to; + const unsigned char *from = SDATA (Vemacs_version); + + int multibyte = STRING_MULTIBYTE (Vemacs_version); + + version = multibyte + ? make_uninit_multibyte_string (SCHARS (Vemacs_version), + SBYTES (Vemacs_version)) + : make_uninit_string (SBYTES (Vemacs_version)); + + to = SDATA (version); + + while (from < SDATA (Vemacs_version) + SBYTES (Vemacs_version)) + { + int c = multibyte ? string_char_advance (&from) : *from++; + + if (c == '.') + c = '_'; + + if (multibyte) + to += CHAR_STRING (c, to); + else + *to++ = c; + } +#endif + Vcomp_native_version_dir = - concat3 (Vemacs_version, build_string ("-"), Vcomp_abi_hash); + concat3 (version, build_string ("-"), Vcomp_abi_hash); } static void -- 2.29.2 --/RofLedAnAvQkvPz-- From unknown Sat Jun 21 03:31:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Jul 2021 19:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49271 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Third Cc: contact@jimeh.me, 49271@debbugs.gnu.org Received: via spool by 49271-submit@debbugs.gnu.org id=B49271.162516620111013 (code B ref 49271); Thu, 01 Jul 2021 19:04:01 +0000 Received: (at 49271) by debbugs.gnu.org; 1 Jul 2021 19:03:21 +0000 Received: from localhost ([127.0.0.1]:33714 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lz1y5-0002rZ-3K for submit@debbugs.gnu.org; Thu, 01 Jul 2021 15:03:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lz1y3-0002rN-M9 for 49271@debbugs.gnu.org; Thu, 01 Jul 2021 15:03:20 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58948) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lz1xw-0007ME-7v; Thu, 01 Jul 2021 15:03:12 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1751 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lz1xv-000198-S6; Thu, 01 Jul 2021 15:03:12 -0400 Date: Thu, 01 Jul 2021 22:03:09 +0300 Message-Id: <83y2apkgb6.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Alan Third on Thu, 1 Jul 2021 19:45:46 +0100) References: <83zgv7mtly.fsf@gnu.org> <83v95uld6n.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Thu, 1 Jul 2021 19:45:46 +0100 > From: Alan Third > Cc: contact@jimeh.me, 49271@debbugs.gnu.org > > > It should work, although I'd prefer writing such code the other way > > around: first create an uninitialized Lisp string (with > > make_uninit_multibyte_string or make_uninit_string), then copy the > > bytes while making the conversions. The reason for this preference is > > that you could then make sure the produced string has the same > > multibyte-ness as the original, whereas the way you did it relies on > > whatever build_string decides, which is not necessarily the same. > > Thanks. I think the attached is doing what you suggested. Yes. But I think you can simplify (and make it a tad faster) if you just copy bytes in either case. Since a multibyte string is represented by a superset of UTF-8, you are guaranteed that no multibyte sequence will ever include '.'. So converting from multibyte sequences to characters and back, as well as calls to string_char_advance, can be avoided. Thanks. From unknown Sat Jun 21 03:31:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Jul 2021 19:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49271 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: contact@jimeh.me, 49271@debbugs.gnu.org Received: via spool by 49271-submit@debbugs.gnu.org id=B49271.162516942315911 (code B ref 49271); Thu, 01 Jul 2021 19:58:01 +0000 Received: (at 49271) by debbugs.gnu.org; 1 Jul 2021 19:57:03 +0000 Received: from localhost ([127.0.0.1]:33742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lz2o3-00048Y-HH for submit@debbugs.gnu.org; Thu, 01 Jul 2021 15:57:03 -0400 Received: from outbound.soverin.net ([116.202.126.228]:47513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lz2o1-00047d-Dj for 49271@debbugs.gnu.org; Thu, 01 Jul 2021 15:57:02 -0400 Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 261898D5; Thu, 1 Jul 2021 19:56:55 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1625169414; bh=gX/RgrWYViK3AWRpVOlWcQINJAMvGyczA/Q3wu7zEz8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nAm9kU5Zs87tgDvYm53Zc3mmBkb0d1TzwY0JE1R0z2nIoEBTwp/FmNS+gueegrmqz WJ7Pnuqqt1O3NdQjlZ0+XxFOKMVv/EDnS1jg8B6WQD6WkMWsBrgltqiCkpptndPVtG OmhS5SGo2RWn+E6/cV6PpSuRzqE9DjRpLINN+aGJmhHoPKzZBmhdx+Iw0WtJKpDw+N jCHS+kk29wNZB6KXnaQq3/5NPEpRGFpfeeVzlfz/Ch4eZLeuTkoNuvgNVTLpNixwks jhwPy/x+M3lLKAMR2CBw8blLJAwucF8J8Q1kccnRekDvGTU35a04jnltfvNz/q4NBN 4NBK0mW13Oq+w== Received: by breton.holly.idiocy.org (Postfix, from userid 501) id EDA3D202CDF43C; Thu, 1 Jul 2021 20:56:51 +0100 (BST) Date: Thu, 1 Jul 2021 20:56:51 +0100 From: Alan Third Message-ID: Mail-Followup-To: Alan Third , Eli Zaretskii , contact@jimeh.me, 49271@debbugs.gnu.org References: <83zgv7mtly.fsf@gnu.org> <83v95uld6n.fsf@gnu.org> <83y2apkgb6.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83y2apkgb6.fsf@gnu.org> X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Thu, Jul 01, 2021 at 10:03:09PM +0300, Eli Zaretskii wrote: > > Date: Thu, 1 Jul 2021 19:45:46 +0100 > > From: Alan Third > > Cc: contact@jimeh.me, 49271@debbugs.gnu.org > > > > > It should work, although I'd prefer writing such code the other way > > > around: first create an uninitialized Lisp string (with > > > make_uninit_multibyte_string or make_uninit_string), then copy the > > > bytes while making the conversions. The reason for this preference is > > > that you could then make sure the produced string has the same > > > multibyte-ness as the original, whereas the way you did it relies on > > > whatever build_string decides, which is not necessarily the same. > > > > Thanks. I think the attached is doing what you suggested. > > Yes. But I think you can simplify (and make it a tad faster) if you > just copy bytes in either case. Since a multibyte string is > represented by a superset of UTF-8, you are guaranteed that no > multibyte sequence will ever include '.'. So converting from > multibyte sequences to characters and back, as well as calls to > string_char_advance, can be avoided. I'm glad I asked about this because I had completely misunderstood how multibyte strings are represented. This makes a lot more sense. Thanks! -- Alan Third From unknown Sat Jun 21 03:31:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Jul 2021 20:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49271 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Jim Myhrberg Cc: Eli Zaretskii , 49271@debbugs.gnu.org Received: via spool by 49271-submit@debbugs.gnu.org id=B49271.162517045017469 (code B ref 49271); Thu, 01 Jul 2021 20:15:02 +0000 Received: (at 49271) by debbugs.gnu.org; 1 Jul 2021 20:14:10 +0000 Received: from localhost ([127.0.0.1]:33749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lz34c-0004Xf-40 for submit@debbugs.gnu.org; Thu, 01 Jul 2021 16:14:10 -0400 Received: from outbound.soverin.net ([116.202.126.228]:39095) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lz34a-0004XR-AS for 49271@debbugs.gnu.org; Thu, 01 Jul 2021 16:14:08 -0400 Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 52CEE8D5; Thu, 1 Jul 2021 20:14:02 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1625170441; bh=ImFbxm8s0Bl630uhFcCyCmCohGrBAAozVRdfCSwbt8I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ez86VH1jwmfiNhW2bubkGh06uQmHD29b94CsntTccb8367TdMs1/i/JjBB0T/YkUd Gpng1wHpmDXu+YljIOZCet35yJl7GDcwwj1sbPP5tPcpEx6KM+Ku7P0HuBuUytxt95 7/+jrA9Qc0T36aG3cVXIv6eJEvEOQcZKvNXl2lJ4TM1DRg9nv3DswGgK9+SMZmweFh 72KLABIIatw8B3YgBqN7rtVojygBQhUwdg5Chm+eARnBeov0ys9ujjLDEw0Ak0RQ12 KjXbJv6uyW4FpIALFIOICoTzwCOHXB/qrZ4pokyNR4F1qggrClPeJVwTJONWYkRWzQ hIrFHwXusmiSw== Received: by breton.holly.idiocy.org (Postfix, from userid 501) id E4236202CDF5D9; Thu, 1 Jul 2021 21:13:57 +0100 (BST) Date: Thu, 1 Jul 2021 21:13:57 +0100 From: Alan Third Message-ID: Mail-Followup-To: Alan Third , Jim Myhrberg , Eli Zaretskii , 49271@debbugs.gnu.org References: <83zgv7mtly.fsf@gnu.org> <7E142F36-1D22-424E-8B3B-7AC74C1A8772@jimeh.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7E142F36-1D22-424E-8B3B-7AC74C1A8772@jimeh.me> X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Thu, Jul 01, 2021 at 03:53:13PM +0100, Jim Myhrberg wrote: > I've successfully built, signed and notarized a full AoT build with > this patch. I also applied the patch from bug#49270 to ensure *.eln > files are located correctly within the bundle. > > Everything is working as expected, and in fact, codesign even > automatically finds and signs all *.eln files within > Contents/Frameworks when signing the app bundle itself, so I no > longer need to individually sign each *.eln file before signing the > whole app bundle :) I'm curious what you're actually doing. We have some code that runs on ARM based Macs only that does this codesign -s - -f $@.tmp where I think $@.tmp is... something... executable? I'm wondering if we should just install everything into the app bundle and sign the whole damn thing. I don't really understand this whole codesigning thing. It seems to make no difference here, but I'm not trying to run the app on another Mac or on an ARM Mac, so I think it's normal that I shouldn't see any difference. -- Alan Third From unknown Sat Jun 21 03:31:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location Resent-From: Jim Myhrberg Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Jul 2021 20:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49271 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Third Cc: Eli Zaretskii , 49271@debbugs.gnu.org Received: via spool by 49271-submit@debbugs.gnu.org id=B49271.162517223120190 (code B ref 49271); Thu, 01 Jul 2021 20:44:01 +0000 Received: (at 49271) by debbugs.gnu.org; 1 Jul 2021 20:43:51 +0000 Received: from localhost ([127.0.0.1]:33755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lz3XK-0005FZ-IS for submit@debbugs.gnu.org; Thu, 01 Jul 2021 16:43:50 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]:39607) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lz3XH-0005FL-Ta for 49271@debbugs.gnu.org; Thu, 01 Jul 2021 16:43:48 -0400 Received: by mail-wr1-f52.google.com with SMTP id f14so9447248wrs.6 for <49271@debbugs.gnu.org>; Thu, 01 Jul 2021 13:43:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jimeh.me; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=rvPB/+HqRVz0lgNPXSNepCJseeawXhscuOuaffXmwZY=; b=EmtwphwfxAW+euGYNbGetbKQ5f34pX6JlkX82Q3YeKdUD15kzyYG6VbWuPZBLkVA8/ WAjtSJJpFHYPcX8lL56OvmuI74LvjJElHteCbUZjarnbMj2ae591gl4I04HdT6NN3AVr G+aCuqFfIIjjPbKKaquhDkeqPaw4H3q72mjLjv668BZe0wKX0+fdgVwq2UUWtfMhkTty fyanPlRB1gWNaTvNYJmQjqfVCT9x0ALqp+j6QmVDnZfu2U/Z5FZf8xPBaLFH8ceiX1OI 5WqGi0BhKYrbPUOuWWJuEJoe9/XRI0wLNlbSPOKLnf5n2EL5WwASciZawM3z1zojaDvr qajw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=rvPB/+HqRVz0lgNPXSNepCJseeawXhscuOuaffXmwZY=; b=scT5hvg13llH0fK27oZP2qaW9Wc2ZAcJ/+sqwX0orAs65o16XmR41JTgQt+sJ/YBPs NktJ7vg1hFThHm+osoQuLZoYeocqcqocW26TfGxNBmzrt3kDpom9iZVU/8DPzfB6pDhW HT3V2b0mXSMqVJrHJJGt5XRqf/mq02UzT4TSWcN9ksKBaZfhOmE6oQCkUaw7M3mb0wws OkB+1fiMMkDUTu+moMXI2LEuGE6lKZ1t+JTNTfNYajgzKozmoVLlBeo5kTEZxX/my++x szJxeIzeSW2PYDRrwLhCRPgoKPb2DizSGH0uzAYhMlThZTNUKytAF0vp/9y0hYS9DYEC jRNQ== X-Gm-Message-State: AOAM533atnUsWhOkDVBeJzOtjmOTsSvzZzor4UXyOzL1jqco6yxyYQ/A TrEsWwreSrjC8cGXrY8KJ40kmg== X-Google-Smtp-Source: ABdhPJyayu52+KaIG1Om64kFCZuBLQcHGFIUCADn+JQyt7DVqNK/bCmmBrx1gIk75sQMq9UC+Q5aXw== X-Received: by 2002:a5d:4906:: with SMTP id x6mr1742348wrq.387.1625172221336; Thu, 01 Jul 2021 13:43:41 -0700 (PDT) Received: from smtpclient.apple ([89.238.143.233]) by smtp.gmail.com with ESMTPSA id r9sm2323531wmh.40.2021.07.01.13.43.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jul 2021 13:43:40 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.80.0.2.43\)) From: Jim Myhrberg In-Reply-To: Date: Thu, 1 Jul 2021 21:43:39 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <496EAC1F-D201-4DBA-8D0A-021E3D429B53@jimeh.me> References: <83zgv7mtly.fsf@gnu.org> <7E142F36-1D22-424E-8B3B-7AC74C1A8772@jimeh.me> X-Mailer: Apple Mail (2.3654.80.0.2.43) X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On 1 Jul 2021, at 21:13, Alan Third wrote: >=20 > I'm curious what you're actually doing. We have some code that runs on > ARM based Macs only that does this >=20 > codesign -s - -f $@.tmp >=20 > where I think $@.tmp is... something... executable? >=20 > I'm wondering if we should just install everything into the app bundle > and sign the whole damn thing. >=20 > I don't really understand this whole codesigning thing. It seems to > make no difference here, but I'm not trying to run the app on another > Mac or on an ARM Mac, so I think it's normal that I shouldn't see any > difference. I can't say I know what the `$@.tmp` thing is either, or really = understand codesign for that matter. I've managed to make it work through trial and error... lol To explain a bit more of what I'm doing though; I basically got bored of = making my laptop sound like a jet engine for 25 minutes every other day as I = made new builds from the master branch, so I set out to make nightly builds using = GitHub Actions which I could just download and/or install/upgrade via brew = cask: https://github.com/jimeh/emacs-builds With the heavy lifting done by my custom build script: https://github.com/jimeh/build-emacs-for-macos The signing and notarizing stuff also lives in the build script repo, = but as part of a new (and somewhat hacky) "emacs-builder" CLI tool written in = Go, which is designed to automated a bunch of the steps. Because of this, you can see the full build process I'm doing on GitHub = Actions: = https://github.com/jimeh/emacs-builds/runs/2957583013?check_suite_focus=3D= true As for the *.eln file, previously when they were in Contents/Resources I = had to sign each one individually before signing the bundle as a whole. But I = didn't check if that was still needed after they were moved to Contents/MacOS a = few days ago. But I have checked it with them under Contents/Frameworks, and signing = the *.eln files is no longer needed as codesign finds them when signing the .app = bundle itself.. As for exactly what I'm doing, this is essentially the main command = which signs the .app bundle: codesign --sign --deep --timestamp --force --verbose \ --options runtime --entitlements = \ /path/to/Emacs.app And the entitlements I use are: - com.apple.security.automation.apple-events - com.apple.security.cs.allow-jit - com.apple.security.cs.disable-library-validation - com.apple.security.network.client Which seem to be enough for everything I do with Emacs to work = correctly. I do also sign a custom little "emacs" shell-script in = Contents/MacOS/bin, which I add to make it easy to expose a "emacs" CLI tool, all it does is = correctly resolve the path to the .app bundle, and execute the main MacOS/Emacs = binary from its absolute real path so it can find everything it depends on = within the app bundle even when symlinked to somewhere else. I'm happy to answer any questions you might have :)= From unknown Sat Jun 21 03:31:41 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Jim Myhrberg Subject: bug#49271: closed (Re: bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location) Message-ID: References: X-Gnu-PR-Message: they-closed 49271 X-Gnu-PR-Package: emacs Reply-To: 49271@debbugs.gnu.org Date: Thu, 01 Jul 2021 21:17:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1625174221-23173-1" This is a multi-part message in MIME format... ------------=_1625174221-23173-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fail= s due to new *.eln location which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 49271@debbugs.gnu.org. --=20 49271: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D49271 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1625174221-23173-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 49271-done) by debbugs.gnu.org; 1 Jul 2021 21:16:46 +0000 Received: from localhost ([127.0.0.1]:33772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lz43B-00061F-OP for submit@debbugs.gnu.org; Thu, 01 Jul 2021 17:16:45 -0400 Received: from outbound.soverin.net ([116.202.126.228]:45991) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lz439-000611-MK for 49271-done@debbugs.gnu.org; Thu, 01 Jul 2021 17:16:44 -0400 Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 24B8C8D5; Thu, 1 Jul 2021 21:16:37 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1625174196; bh=NnsFsZFSQFekA2Y7RdOw3Ts4aVu6sEkLCpDLpniaW1M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UZeq7aj/mrRRilVS6b0SNQwNGouUqxIy/nIUSSibovfVEGA+yPGRigvXqY1xIL3xS t43/Uve2E/8e/RdXN+yd44La1QIDYQWXmuhTGNOjNKtuGSA+ssfOyPFm/Hphfs0/Uy MKtNB/G/L9gDhhy+jwqTmd2xxaZOIZj95WA3iinoOEOc37Lpz3UBXWSGmEy/WqhWgV Fjpla/Ee6c9tnq+EWqWUA9AsgLGH2AUjHuVuL+FE2dLr7SS+Zx7uF7YKQNyRoARvrD +lt2bfIfsnAvT6oz625uCMNGxykfGSs99Pgb8L/yTQ8ot9XuCznNV+RytBgvdBvUjO wmOnW5G+zxbXw== Received: by breton.holly.idiocy.org (Postfix, from userid 501) id E5CB9202CE0380; Thu, 1 Jul 2021 22:16:32 +0100 (BST) Date: Thu, 1 Jul 2021 22:16:32 +0100 From: Alan Third To: Jim Myhrberg Subject: Re: bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location Message-ID: Mail-Followup-To: Alan Third , Jim Myhrberg , Eli Zaretskii , 49271-done@debbugs.gnu.org References: <83zgv7mtly.fsf@gnu.org> <7E142F36-1D22-424E-8B3B-7AC74C1A8772@jimeh.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7E142F36-1D22-424E-8B3B-7AC74C1A8772@jimeh.me> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49271-done Cc: Eli Zaretskii , 49271-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Thu, Jul 01, 2021 at 03:53:13PM +0100, Jim Myhrberg wrote: > > On 30 Jun 2021, at 20:05, Alan Third wrote: > > > > Please try the attached patch. > > I've successfully built, signed and notarized a full AoT build with > this patch. I also applied the patch from bug#49270 to ensure *.eln > files are located correctly within the bundle. > > Everything is working as expected, and in fact, codesign even > automatically finds and signs all *.eln files within > Contents/Frameworks when signing the app bundle itself, so I no > longer need to individually sign each *.eln file before signing the > whole app bundle :) I've pushed an updated version of this patch to master, so I'll close this bug report. (I'm going to reply to your other email, but I'll redirect it to emacs-devel.) -- Alan Third ------------=_1625174221-23173-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 29 Jun 2021 11:59:01 +0000 Received: from localhost ([127.0.0.1]:53774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyCOL-00037J-4A for submit@debbugs.gnu.org; Tue, 29 Jun 2021 07:59:01 -0400 Received: from lists.gnu.org ([209.51.188.17]:37862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyCOJ-00037C-Mw for submit@debbugs.gnu.org; Tue, 29 Jun 2021 07:58:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyCOJ-0007D5-DP for bug-gnu-emacs@gnu.org; Tue, 29 Jun 2021 07:58:59 -0400 Received: from mail-oi1-x244.google.com ([2607:f8b0:4864:20::244]:43851) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyCOG-0001bm-Hn for bug-gnu-emacs@gnu.org; Tue, 29 Jun 2021 07:58:59 -0400 Received: by mail-oi1-x244.google.com with SMTP id 22so19931363oix.10 for ; Tue, 29 Jun 2021 04:58:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jimeh.me; s=google; h=mime-version:from:date:message-id:subject:to; bh=DSuFit2QXbRLgaFHBKnHSOdFphDRmbHhga8ZRVzfL88=; b=KsgH6Jjh3lm+lz4ocSyLIhJXFG08tbVLl26mOSlx6b9cyCqqkF7n83uBTCkW+r6kNj qMnEz8130JUwiqbiS5pDAGcEtY1pr3d5GcqPR3G7piNY35DRiYoBYtyYZ3jQ0AoRlLwI 1UKG+k/YBKOqaffUOzyUfVbR2MnyhWu+nchARD7/dFEmpyK9JGVE3/qdRWwZZVkUnB4s v7G2cFu//NQStl4JAG1ogqsG5jO07u0152xEzpQBafDgu4HimyOXVSvxGcUfivsmduTi uP41m20aRnkeQ4xndCwC2b7J8G8Tl+Jvz05wDJRhLRhS6+cb7f6e2OimUuLl8PXUGN2o 8K3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=DSuFit2QXbRLgaFHBKnHSOdFphDRmbHhga8ZRVzfL88=; b=fuzhyQLnxmnrUTIvekDex2mefVw3+cpWOGx26AquZYbFlq/J0m1K1HoOrvUMY3EIIe FJIhxVnBqwf31zv/HyGlWW2RpqQbyc783Xy4nYdyDN+Pv0hLVv5h/78OVBwIBCFW6zb+ a9Ekt6UfozG0VJZZ24a+dH8mkiU9aoUFqc4PY/wF4XY30O4XZZ90X5N/4W5MBBo4eYPB PavDA1ttilm7EUZhxD5EFzU/2q3PHq9AN3NQeKZf+gXhmQ2r7z/q6bdcwtrD/5XV6u5s fJZJtwXa7LdKpKpgHaB0OQ2P18YQO0BabbiQ3ONGQXTLgUFniMihbhEJ1dk5VvEUygGH H4Ew== X-Gm-Message-State: AOAM532WIkwq1x47MTr8GLpgvX0ezyoIXWdOpYFq0iYdTc5/BUn10bMT Tnjma92BIV1hz5ZoZthyJmyGMN6NLC5lFF26VbY3Phmrp4mcoygQMQc= X-Google-Smtp-Source: ABdhPJzJ3+Cuz5+AT7c8nvspUbIWawZ2fY7wOHLqcw1xbyW5s9+ntxOgsg2JZodJDR+kUu6xy7fYGukN+dwMJsVQSc0= X-Received: by 2002:aca:4d05:: with SMTP id a5mr14045161oib.163.1624967934834; Tue, 29 Jun 2021 04:58:54 -0700 (PDT) MIME-Version: 1.0 From: Jim Myhrberg Date: Tue, 29 Jun 2021 12:58:44 +0100 Message-ID: Subject: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::244; envelope-from=contact@jimeh.me; helo=mail-oi1-x244.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Commit 5dd2d50 seems to have moved the native-lisp folder within self-contained Emacs.app bundles: - from: "Contents/Resources/native-lisp" - to: "Contents/MacOS/lib/emacs/28.0.50/native-lisp" Unfortunately, Apple's codesign utility blows up with an error if there is any folder within "Contents/MacOS" (recursively) which contains two dots within its name. Here is an example of what the error looks like: /Users/runner/work/emacs-builds/emacs-builds/builds/Emacs.2021-06-26.b8f9e58.master.macOS-10-15.x86_64/Emacs.app: bundle format unrecognized, invalid, or unsuitable In subcomponent: /Users/runner/work/emacs-builds/emacs-builds/builds/Emacs.2021-06-26.b8f9e58.master.macOS-10-15.x86_64/Emacs.app/Contents/MacOS/lib/emacs/28.0.50 The above error is from this GitHub Actions workflow run: https://github.com/jimeh/emacs-builds/runs/2923284812?check_suite_focus=true The same issue happens locally for me too. I have so far not found a way to make codesign not blow up on such folders, so for now I've had to workaround the issue in my build script with the following changes: - https://github.com/jimeh/build-emacs-for-macos/commit/eeca7b798de236a3ffc1ab04b0f7735a37ce5af4 - https://github.com/jimeh/build-emacs-for-macos/commit/23b8236e0a66fb09810e8422bedf02f7192a53e4 In summary, I rename: - from: Emacs.app/Contents/MacOS/lib/emacs/28.0.50/native-lisp/28.0.50-852ecda2 - to: Emacs.app/Contents/MacOS/lib/emacs/28-0-50/native-lisp/28-0-50-852ecda2 (Note that I had to rename both "28.0.50" and "28.0.50-852ecda2" folders, as both trigger the error from codesign.) I create a symlink from "Contents/native-lisp" to "Contents/MacOS/lib/emacs/28-0-50/native-lisp". And finally I patch Emacs.pdmp (Emacs.app/Contents/MacOS/libexec/Emacs.pdmp), performing the following raw text replacements: - "lib/emacs/28.0.50/native-lisp/28.0.50-852ecda2/" --> "lib/emacs/28-0-50/native-lisp/28-0-50-852ecda2/" - "../native-lisp/28.0.50-852ecda2/" --> "../native-lisp/28-0-50-852ecda2/" This yields a seemingly actually working Emacs.app bundle, but it re-compiles all *.eln files in the bundle into the user cache folder. However, there's a separate bug causing re-compiling which I've reported as bug#49270, so for now I don't know if my patching would prevent Emacs from dynamically finding existing *.eln which are not referenced from Emacs.pdmp. This patching/workaround to get code signing to work feels very hacky and fragile. It would be great if we could avoid the need for this kind of patch to be able to codesign the .app bundle. The way I see it, there's three possible solutions: - Figure out a way to make Apple's codesign play nice. - Move the native-lisp folder back to "Contents/Resources/native-lisp", as codesign does not complain about folders with two dots in their names within the Resources directory. - Change paths used to store *.eln files within Contents/MacOS so no single folder name contains two dots. ------------=_1625174221-23173-1--