From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#49271: 28.0.50: native-comp: Signing macOS self-contained .app bundle fails due to new *.eln location Date: Thu, 01 Jul 2021 10:13:04 +0300 Message-ID: <83v95uld6n.fsf@gnu.org> References: <83zgv7mtly.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10486"; mail-complaints-to="usenet@ciao.gmane.io" Cc: contact@jimeh.me, 49271@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 01 09:14:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lyqtm-0002WE-72 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Jul 2021 09:14:10 +0200 Original-Received: from localhost ([::1]:56962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyqtk-0007gN-GA for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Jul 2021 03:14:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyqte-0007fz-Ut for bug-gnu-emacs@gnu.org; Thu, 01 Jul 2021 03:14:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47878) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyqte-0002BZ-Nb for bug-gnu-emacs@gnu.org; Thu, 01 Jul 2021 03:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lyqtd-0008K9-Ub for bug-gnu-emacs@gnu.org; Thu, 01 Jul 2021 03:14:01 -0400 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 49271-submit@debbugs.gnu.org id=B49271.162512358831919 (code B ref 49271); Thu, 01 Jul 2021 07:14:01 +0000 Original-Received: (at 49271) by debbugs.gnu.org; 1 Jul 2021 07:13:08 +0000 Original-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 Original-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 Original-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 Original-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 In-Reply-To: (message from Alan Third on Wed, 30 Jun 2021 20:05:50 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:209244 Archived-At: > 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.