From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id oD/3FDQGo19SVQAA0tVLHw (envelope-from ) for ; Wed, 04 Nov 2020 19:51:16 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id uAPFEDQGo1+DOQAAbx9fmQ (envelope-from ) for ; Wed, 04 Nov 2020 19:51:16 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D755D940111 for ; Wed, 4 Nov 2020 19:51:15 +0000 (UTC) Received: from localhost ([::1]:48590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kaOoL-0001JE-8k for larch@yhetil.org; Wed, 04 Nov 2020 14:51:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaOoA-0001Ik-5b for guix-patches@gnu.org; Wed, 04 Nov 2020 14:51:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39101) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kaOo9-0002LD-Sq for guix-patches@gnu.org; Wed, 04 Nov 2020 14:51:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kaOo9-0005ZR-Q9 for guix-patches@gnu.org; Wed, 04 Nov 2020 14:51:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#44249] [PATCH v3] gnu: emacs: Make strip-double-wrap more robust. References: In-Reply-To: Resent-From: Morgan.J.Smith@outlook.com Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 04 Nov 2020 19:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44249 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: mail@nicolasgoaziou.fr Cc: 44249@debbugs.gnu.org, Morgan Smith Received: via spool by 44249-submit@debbugs.gnu.org id=B44249.160451944721391 (code B ref 44249); Wed, 04 Nov 2020 19:51:01 +0000 Received: (at 44249) by debbugs.gnu.org; 4 Nov 2020 19:50:47 +0000 Received: from localhost ([127.0.0.1]:50647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kaOnu-0005Yx-RC for submit@debbugs.gnu.org; Wed, 04 Nov 2020 14:50:47 -0500 Received: from mail-mw2nam12olkn2057.outbound.protection.outlook.com ([40.92.23.57]:52801 helo=NAM12-MW2-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kaOnq-0005Yh-KZ for 44249@debbugs.gnu.org; Wed, 04 Nov 2020 14:50:44 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lv2O8/94s3Vt/+4POz6CwqKVKzpIKVU91dCd9LTM3mqZ+x8Xo8Ik+lBhPY9VXfMkFuHL/EYUlbmO7HYtxq7mgsP3npWJLHtrNGltLNGkQgSztMXS1BZlb9qUtAkFn0Noi09czpkU4Z3CTWGE/qu2Fzaauo8c0yaJLtiLw8r72ATCi+0dU/4yzQaanKiFS4ZQbUi7/aTsUq4K975kmjdu+NI//8pzounES0w16Zxl39dnvCq6YTz4ujtvNZsEGO/G/F1/2j0v6TyO4sF2pKeXJI1bLHdal5+1VzmDGn4hQMbi9iCHzAGvPdYnXZ3YiEE4dbijr4iGo75GIDCi12OhcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Cs0X7h10JxnrtcXdX5b3T+M5guJSFgLmBmX+2hObiTc=; b=VMcfgvaAg8R9RpZPrCmcgXd9/GsMB/Pd5l6F4gOzjQU94oGZfjE7IRVx+ZwnyUHAMrVWvddTpUOTK5cI0tzqVYe7trVwaLDbMW9AXlm58l3Xr41K0S06sS2k0NmS/nTT1d30VbyYkaWK2lZuF/SnflObjKyn2ndPmGC7LQBHSxq2Po1MW2B+IFjycCXdYO7Iv6iabJdC+Ot2iXRIonUGdcOYN7jmz5U3IgsBdvPnELPvbBeOQtS9dAcCUgp30lJGD4Fvwi5FhrsLRDc2VXBh8ojQ+q+L4LZoEyKgCmctpxklfG9OAFCKnvZ+xD/DGOqXXc++5ynZq6gjuPXh9xJnPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Cs0X7h10JxnrtcXdX5b3T+M5guJSFgLmBmX+2hObiTc=; b=kiIoTKBOd354B0nze7KqjiSd1L5MlbQ+ItckD8ZpAhQasJ2WfkAcO3895Ex7Mj6cE+VIs6nvFWPr7q5Sm66QCHYOHBCGxP8oBBqwHr3eXDgxLxJ68rjMMCrM9Ui21197wk+mz69bKa+QNBm1IA8HhISldLFgZ01MQ/P0toDOnPEZS2RmOFII22OeqOdA3/OOfzBFN5T4SBiLHE0GJGRxGlXosRVkIEhQgpXov1d4rL0yJZp5hZYPQ0XkND7qBy8Gq/u+OVQjA8LKOMQ7yb6zL77K/u5f8AvvRcYMui8gxFNpyXyylJHmw/KtQVeAyga4IqgVzyMRdQvX/TQ9vnBEKw== Received: from MW2NAM12FT038.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc65::45) by MW2NAM12HT196.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc65::152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3520.9; Wed, 4 Nov 2020 19:50:36 +0000 Received: from DM5PR1001MB2105.namprd10.prod.outlook.com (2a01:111:e400:fc65::4e) by MW2NAM12FT038.mail.protection.outlook.com (2a01:111:e400:fc65::168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.7 via Frontend Transport; Wed, 4 Nov 2020 19:50:36 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:C0B9798375548158F2692537BD793C6B8FBE3549A47B72E3C99D864B7D82544C; UpperCasedChecksum:443E07A7641884E309F4A70A8C6B336882A4A4EB21E7E7B03C39B9EF7E16AE27; SizeAsReceived:7331; Count:45 Received: from DM5PR1001MB2105.namprd10.prod.outlook.com ([fe80::2405:9d83:9d59:c5cf]) by DM5PR1001MB2105.namprd10.prod.outlook.com ([fe80::2405:9d83:9d59:c5cf%5]) with mapi id 15.20.3499.032; Wed, 4 Nov 2020 19:50:36 +0000 From: Morgan.J.Smith@outlook.com Date: Wed, 4 Nov 2020 14:47:13 -0500 Message-ID: X-Mailer: git-send-email 2.29.2 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-TMN: [jg/7r0fIwd/OI1sC3HwF9gNdjpuoJ7WH] X-ClientProxiedBy: YQBPR0101CA0071.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:1::48) To DM5PR1001MB2105.namprd10.prod.outlook.com (2603:10b6:4:2b::24) X-Microsoft-Original-Message-ID: <20201104194712.11431-1-Morgan.J.Smith@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pancake.lan (76.71.237.129) by YQBPR0101CA0071.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:1::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.18 via Frontend Transport; Wed, 4 Nov 2020 19:50:35 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 45 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 2ec7633c-f335-410a-cd6e-08d880fae5b0 X-MS-Exchange-SLBlob-MailProps: qY7UPrLqMbaVic8BE8grIa+syLdEnvPsVHGdNAI+29Cu7tlMLwnauEH6HI+R6WYeVgehkak4SHcY4S8Xqj6wMvQN4gu1htwMTFYT31xc0j6dH+TTLT4JtNhImCc6RicyYDdZs2MrApjMzo+N7BBoEaT3VzogdaMspYFeosxsiUVit5yPZ4UAmv5vfZxs0EEdgC8yFhNLcmrdfueUlkBaVNG5URofPQYZlmiSyOmRJXR56cCRxHVeWQkkUPnUHeSvLKkwRNR63YAFeI39FGytmrka56t+5gKDj7btSZvcPImS97gNxL7XKke10fygW8vtJ28e7EgIeu4W6SrAngHTrbbLduVV7M4mfGUID9JlKcl7jE6Pmhz01xAuqrWGO4rtxnSmS5UjwLR6I3KPqnLrfU1wqzfd4YjHAshLHPjQoOHsGYUlIyICk16DULpn6oitKnuo+O9dB5PmTf0iAI0qZ4LVmKuPY51A+1VBIivIoOU7MNWZolPEX9l7T23tzbXxIj6e4RaYLt93bzhr4b/hrmpt2hHBGynjoSkMWZLQjuhcEuqmaErArvbB+KVIpgDM0SCWXxKpSuibvqjNlSg6OHd6ra9FahdyWNn+u4Zpx73/QAiCgdoVDy5DHm5J/qjK3JK5PxTgquoE0avfO7H80afvqnGGj5OxSBu40u32sk9vxttXKV/CgN7y6VkQ9CooBKSrTqNO6jREeOhgUCejtQ== X-MS-TrafficTypeDiagnostic: MW2NAM12HT196: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tNY7mq5uNz9FHCCco8pn7qlTMCObdMpdBpZGd/KM4qeQ6aQoDosHUg9KHz0hSeaLGCghUvzqKEf53TG+Cw1JavOn8f2A41+s1aG+4m59DAhf4qW9Lhfkm20SVYv5g9Lghyp4XLr0rxzR/bWqHGqIlE2tTp/3JYm4+L7y4PTdT+Xgqx4fUbcGbXA3MuHC+kotPJPGlJ98zksEsUg/r0WuUg== X-MS-Exchange-AntiSpam-MessageData: MTrPy9x8kjgiG5HH2PoqkoJ4l2J8TqdZodOAKVt8jJklCXusbnonDE1d9DR1Hg1fvQjC6/67wCN93BYUzNskeO1wr9UKzfqDPaL265HJ9huHP6MKdJqQwLKSxpppa1x3mq4w1uPJ3cwDscE/SLbjgg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2ec7633c-f335-410a-cd6e-08d880fae5b0 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2020 19:50:35.9452 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: MW2NAM12FT038.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2NAM12HT196 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: ns3122888.ip-94-23-21.eu X-Spam-Score: 6.09 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=outlook.com header.s=selector1 header.b=kiIoTKBO; arc=reject (signature check failed: fail, {[1] = sig:microsoft.com:reject}); dmarc=fail reason="SPF not aligned (relaxed)" header.from=outlook.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam: Yes X-TUID: 9RCNWjGXdrUj From: Morgan Smith * gnu/packages/emacs.scm (emacs) [strip-double-wrap]: Use regex to find emacs executable. This works even when the version is changed by package transformations (e.g., version=git.master). --- (Can you reopen this bug report please?) So I see 3 possible solutions: 1. Accept my first patch and give up on match 2. Accept this patch and modify almost every emacs varient (I did test building them all) 3. Figure out some proper module inheritence I think option 3 is the most correct, but I'm lazy so I'm leaning towards option 1. --- gnu/packages/emacs.scm | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 4963379d74..4d1080f9dd 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -123,6 +123,9 @@ (build-system glib-or-gtk-build-system) (arguments `(#:tests? #f ; no check target + #:modules ((guix build glib-or-gtk-build-system) + (guix build utils) + (ice-9 match)) #:configure-flags (list "--with-modules" "--with-cairo" "--disable-build-details") @@ -196,17 +199,12 @@ (lambda* (#:key outputs #:allow-other-keys) ;; Directly copy emacs-X.Y to emacs, so that it is not wrapped ;; twice. This also fixes a minor issue, where WMs would not be - ;; able to track emacs back to emacs.desktop. The version is - ;; accessed using using THIS-PACKAGE so it "just works" for - ;; inherited Emacs packages of different versions. + ;; able to track emacs back to emacs.desktop. (with-directory-excursion (assoc-ref outputs "out") - (copy-file (string-append - "bin/emacs-" - ,(let ((this-version (package-version this-package))) - (or (false-if-exception - (version-major+minor+point this-version)) - (version-major+minor this-version)))) - "bin/emacs") + (copy-file + (match (find-files "bin" "^emacs-") + ((executable . _) executable)) + "bin/emacs") #t))) (add-before 'reset-gzip-timestamps 'make-compressed-files-writable ;; The 'reset-gzip-timestamps phase will throw a permission error @@ -328,7 +326,11 @@ languages.") ((#:phases phases) `(modify-phases ,phases (delete 'restore-emacs-pdmp) - (delete 'strip-double-wrap))))) + (delete 'strip-double-wrap))) + ((#:modules modules) + `((guix build gnu-build-system) + (guix build utils) + (ice-9 match))))) (inputs `(("guix-emacs.el" ,(search-auxiliary-file "emacs/guix-emacs.el")) ("ncurses" ,ncurses))) @@ -348,7 +350,11 @@ editor (with xwidgets support)") ((#:phases phases) `(modify-phases ,phases (delete 'restore-emacs-pdmp) - (delete 'strip-double-wrap))))) + (delete 'strip-double-wrap))) + ((#:modules modules) + `((guix build gnu-build-system) + (guix build utils) + (ice-9 match))))) (inputs `(("webkitgtk" ,webkitgtk) ("libxcomposite" ,libxcomposite) @@ -375,7 +381,11 @@ editor (console only)") ((#:phases phases) `(modify-phases ,phases (delete 'restore-emacs-pdmp) - (delete 'strip-double-wrap))))))) + (delete 'strip-double-wrap))) + ((#:modules modules) + `((guix build gnu-build-system) + (guix build utils) + (ice-9 match))))))) (define-public emacs-no-x-toolkit (package/inherit emacs @@ -392,7 +402,11 @@ editor (without an X toolkit)" ) ((#:phases phases) `(modify-phases ,phases (delete 'restore-emacs-pdmp) - (delete 'strip-double-wrap))))))) + (delete 'strip-double-wrap))) + ((#:modules modules) + `((guix build gnu-build-system) + (guix build utils) + (ice-9 match))))))) (define-public emacs-wide-int (package/inherit emacs -- 2.29.1