From: Jim Myhrberg <contact@jimeh.me>
To: Alan Third <alan@idiocy.org>, Jim Myhrberg <contact@jimeh.me>,
49271@debbugs.gnu.org
Subject: bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location
Date: Wed, 30 Jun 2021 11:04:43 +0100 [thread overview]
Message-ID: <CAGaZ61uipOOVTo1-6wGsUn3+Apsqe+eXKyYQ8VKaL27ZCoXXKw@mail.gmail.com> (raw)
In-Reply-To: <YNtyIckj9eDA60FP@idiocy.org>
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 <alan@idiocy.org> 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/<something>
> * 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
next prev parent reply other threads:[~2021-06-30 10:04 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-29 11:58 bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location Jim Myhrberg
2021-06-29 19:18 ` Alan Third
2021-06-30 10:04 ` Jim Myhrberg [this message]
2021-06-30 12:20 ` Eli Zaretskii
2021-06-30 12:39 ` Jim Myhrberg
2021-06-30 12:52 ` Alan Third
2021-06-30 13:10 ` Jim Myhrberg
2021-06-30 19:05 ` Alan Third
2021-07-01 7:13 ` Eli Zaretskii
2021-07-01 18:45 ` Alan Third
2021-07-01 19:03 ` Eli Zaretskii
2021-07-01 19:56 ` Alan Third
2021-07-01 14:53 ` Jim Myhrberg
2021-07-01 20:13 ` Alan Third
2021-07-01 20:43 ` Jim Myhrberg
2021-07-01 21:16 ` Alan Third
2021-06-30 12:42 ` Alan Third
2021-06-30 12:51 ` Jim Myhrberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGaZ61uipOOVTo1-6wGsUn3+Apsqe+eXKyYQ8VKaL27ZCoXXKw@mail.gmail.com \
--to=contact@jimeh.me \
--cc=49271@debbugs.gnu.org \
--cc=alan@idiocy.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).