From unknown Sun Jun 15 01:08:15 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#69950] [PATCH emacs-team] gnu: emacs: Only verify integrity of bound symbols. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: andrew@trop.in, cox.katherine.e+guix@gmail.com, liliana.prikler@gmail.com, guix-patches@gnu.org Resent-Date: Fri, 22 Mar 2024 21:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69950 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69950@debbugs.gnu.org Cc: andrew@trop.in, cox.katherine.e+guix@gmail.com, liliana.prikler@gmail.com X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: andrew@trop.in, cox.katherine.e+guix@gmail.com, liliana.prikler@gmail.com Received: via spool by submit@debbugs.gnu.org id=B.171114429221617 (code B ref -1); Fri, 22 Mar 2024 21:52:02 +0000 Received: (at submit) by debbugs.gnu.org; 22 Mar 2024 21:51:32 +0000 Received: from localhost ([127.0.0.1]:51730 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnmnT-0005ca-NP for submit@debbugs.gnu.org; Fri, 22 Mar 2024 17:51:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:42960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnmnS-0005cQ-Fz for submit@debbugs.gnu.org; Fri, 22 Mar 2024 17:51:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rnmmm-0000Uj-Az for guix-patches@gnu.org; Fri, 22 Mar 2024 17:50:48 -0400 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rnmmk-0002IE-Cs for guix-patches@gnu.org; Fri, 22 Mar 2024 17:50:48 -0400 Received: by mail-ed1-x543.google.com with SMTP id 4fb4d7f45d1cf-563cb3ba9daso2875661a12.3 for ; Fri, 22 Mar 2024 14:50:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711144243; x=1711749043; darn=gnu.org; h=to:content-transfer-encoding:mime-version:subject:date:from :message-id:from:to:cc:subject:date:message-id:reply-to; bh=usTgLNzoD+ESaTwB3shZeDSuKp7ZTld9JMyO1ApdNqE=; b=QHBYMsRG8ppHSvCtXPbbsK79WUZxW7HuUS74ZZisKBbMFWxNcQzPHiCuKU3NaNdXwq 3c2wibl0nbycHc7bsoWQ0iDuVbwf38H+qojyXwQenvqKUHiClSFP6b/YN37nUDDOnqkp RRp28GHNh/x39lnIRdR0nUtc9QjS0w4LkVHEkJ3GEcmj59QGrXkjS5BiuxgmXFgiUFK9 wtctarA7FLMTg9Uj3NILOuM3mOWzWXclR96xiPfgcS53qSqPkKCU6E2kfhyqhSMdAFUk p9CMqfYQFaix31sNuqadvC0Lslb7c4WzPH8Wg4RIvx3+gDRY1mE6kZD6rGwVsXBa0JYU po2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711144243; x=1711749043; h=to:content-transfer-encoding:mime-version:subject:date:from :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=usTgLNzoD+ESaTwB3shZeDSuKp7ZTld9JMyO1ApdNqE=; b=q0mFAqS372tzGSbhpXe9sYW8+I+VeFpnyT0/8JjaSFsruainI1qgdzGiQ0ZBW72dJ3 LR7LHYTKCpPgJ8L62UwKbE7jk5Ef7Rk6LzSxIrmGMF/OHCmBZrgbpaYCI11C4RIo4iM0 KOl1MruceQ/gBPMtVMfqxsfB4MzA3Tp7wEMG3JeGs4GKSj3JMu0nriERBqOZwS6Xj8aJ tuGwDWBGUILbAlv0Iur+x9M7E4Ed1z5AZjh47HTDmao7nrE1EHSqZ3ao7f8KUY+mjt4p dVE0sbQj9MVEaQPPBwctjzkEWdU0Szkjg/ag3eOSO5UJEtP8eksZPfwnwWlm1rofcgdH sqbw== X-Gm-Message-State: AOJu0Yz1Vyq/OrUBUdJ1gUop2zDurWbWVoR/thtNhn2LSvpO+qYGVSo4 vVTBsH2Ls7pvLZBEHJRUs9B++0UQkiQz0r7MT6rAR0+g6w2Q0G1W5F9Zh399QLw= X-Google-Smtp-Source: AGHT+IGLCVanQbQCyWf1K1W5feeKec0qKjvr2QaVvvef07LsGfaqrfG5LARwCmwPf4VUEzyuN07+fw== X-Received: by 2002:a50:ab49:0:b0:56b:bfa5:4b44 with SMTP id t9-20020a50ab49000000b0056bbfa54b44mr569334edc.33.1711144243148; Fri, 22 Mar 2024 14:50:43 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id ek25-20020a056402371900b0056bf60cac59sm147090edb.60.2024.03.22.14.50.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 14:50:42 -0700 (PDT) Message-ID: <9e22ef64adefbc226d0e4ceb99b5823d9df99a3f.1711144224.git.liliana.prikler@gmail.com> From: Liliana Marie Prikler Date: Fri, 22 Mar 2024 22:45:13 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::543; envelope-from=liliana.prikler@gmail.com; helo=mail-ed1-x543.google.com X-Spam_score_int: -7 X-Spam_score: -0.8 X-Spam_bar: / X-Spam_report: (-0.8 / 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, FREEMAIL_FROM=0.001, MALFORMED_FREEMAIL=1.318, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 (--) Some variants, like emacs-no-x, come with a reduced set of preloaded symbols, so don't expect them to always be native. * gnu/packages/aux-files/emacs/comp-integrity.el (expect-native-if-bound): New function. (x-setup-function-keys, dynamic-setting-handle-config-changed-event) (fontset-plain-name, fringe-mode, image-type, regexp-opt, scroll-bar-scale): Use ‘expect-native-if-bound’. (x-handle-no-bitmap-icon): Likewise, was already conditional. --- .../aux-files/emacs/comp-integrity.el | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/gnu/packages/aux-files/emacs/comp-integrity.el b/gnu/packages/aux-files/emacs/comp-integrity.el index 191e2ddb98..abe7e7c0c9 100644 --- a/gnu/packages/aux-files/emacs/comp-integrity.el +++ b/gnu/packages/aux-files/emacs/comp-integrity.el @@ -24,6 +24,9 @@ (defmacro expect-native (fun &optional feature) `(progn (expect-help ,fun native ,feature))) + (defmacro expect-native-if-bound (fun) + `(and (boundp ',fun) (expect-help ,fun native))) + (defmacro expect-builtin (fun &optional feature) `(progn (expect-help ,fun built-in ,feature)))) @@ -38,7 +41,7 @@ (expect-native use-default-char-width-table) (expect-native cl-generic-p) (expect-native cl-struct-define) -(expect-native x-setup-function-keys) +(expect-native-if-bound x-setup-function-keys) (expect-native encode-composition-rule) (expect-native custom-declare-face) (expect-native minibuffer-prompt-properties--setter) @@ -48,7 +51,7 @@ (expect-native dnd-open-file) (expect-native dos-mode25 dos-fns) (expect-native find-file-text dos-w32) -(expect-native dynamic-setting-handle-config-changed-event) +(expect-native-if-bound dynamic-setting-handle-config-changed-event) (expect-native easy-menu-item-present-p) (expect-native eldoc-mode) (expect-native electric-indent-mode) @@ -60,12 +63,12 @@ (expect-native fill-region) (expect-native font-lock-change-mode) (expect-native font-lock-add-keywords) -(expect-native fontset-plain-name) +(expect-native-if-bound fontset-plain-name) (expect-native format-read) (expect-native frame-edges) -(expect-native fringe-mode) +(expect-native-if-bound fringe-mode) (expect-native help-quick) -(expect-native image-type) +(expect-native-if-bound image-type) (expect-native indent-region) (expect-native indian-compose-regexp) (expect-native msdos-setup-keyboard term/internal) @@ -86,7 +89,7 @@ (expect-native convert-define-charset-argument) (expect-native coding-system-change-eol-conversion) (expect-native store-substring mule-util) -(expect-native mouse-wheel-change-button) +(expect-native-if-bound mouse-wheel-change-button) (expect-native advice-function-mapc) (expect-native comment-string-strip) (if (>= emacs-major-version 30) @@ -99,12 +102,12 @@ (expect-native show-paren-function) (expect-native pgtk-dnd-init-frame pgtk-dnd) (expect-native prog-context-menu) -(expect-native regexp-opt) +(expect-native-if-bound regexp-opt) (expect-native get-register) (expect-native query-replace-descr) (expect-native rfn-eshadow-setup-minibuffer) (expect-native read-multiple-choice) -(expect-native scroll-bar-scale) +(expect-native-if-bound scroll-bar-scale) (expect-native gui-select-text) (expect-native seq-first) (expect-native hack-read-symbol-shorthands) @@ -126,5 +129,4 @@ (expect-native define-widget) (expect-native window-right) (expect-native x-dnd-init-frame x-dnd) -(and (boundp 'x-handle-no-bitmap-icon) - (expect-native x-handle-no-bitmap-icon)) +(expect-native-if-bound x-handle-no-bitmap-icon) base-commit: 058532bdd8953feefbd84fd7514822886c7f1a7e -- 2.41.0 From unknown Sun Jun 15 01:08:15 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#69950] [PATCH emacs-team] gnu: emacs: Only verify integrity of bound symbols. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 11 Apr 2024 14:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69950 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler , 69950@debbugs.gnu.org Cc: cox.katherine.e+guix@gmail.com, liliana.prikler@gmail.com Received: via spool by 69950-submit@debbugs.gnu.org id=B69950.171284680227688 (code B ref 69950); Thu, 11 Apr 2024 14:47:02 +0000 Received: (at 69950) by debbugs.gnu.org; 11 Apr 2024 14:46:42 +0000 Received: from localhost ([127.0.0.1]:57105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ruvh8-0007BZ-HQ for submit@debbugs.gnu.org; Thu, 11 Apr 2024 10:46:39 -0400 Received: from out-177.mta0.migadu.com ([91.218.175.177]:21738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ruvgx-00078M-HL for 69950@debbugs.gnu.org; Thu, 11 Apr 2024 10:46:26 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=key1; t=1712846763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pMk39ihKciWjk67zTn38KXOK9KaEEjHX0gXwlBl+7go=; b=oRYfcew+dSkCiBf2LFtkV4lfKJPjTa1IoXCEnIY/6PxYljeqaI4hPisMbhXAQ888ye+p0u arTAkzUbPUjOKZXFsPNn8w/Ze3JLopypedf7FJodB+P1r5MO6BkbEwNfOopfCJsWl/0eF7 St6S6dGgjkoe8SHT5a8QFiyVNZM09ZHXDN9LQo18ULmE9wVsLJOi1YoxtYqr1QljHEpTta 9kUpJNwUoEWa6fVifOWJqlItA8AwA0de042DT5vIpyVOB3NiRLLFO3Z2stiL++RERPcbnq J5inKaQax6wtmvtCxzq1NGBf8IRjA2wzZmu3Xyx7QGHe1+O+1Bk/5/lAOGG23A== From: Andrew Tropin In-Reply-To: <9e22ef64adefbc226d0e4ceb99b5823d9df99a3f.1711144224.git.liliana.prikler@gmail.com> References: <9e22ef64adefbc226d0e4ceb99b5823d9df99a3f.1711144224.git.liliana.prikler@gmail.com> Date: Thu, 11 Apr 2024 17:45:57 +0300 Message-ID: <87wmp4yn2y.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Migadu-Flow: FLOW_OUT 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 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2024-03-22 22:45, Liliana Marie Prikler wrote: > Some variants, like emacs-no-x, come with a reduced set of preloaded symb= ols, > so don't expect them to always be native. > > * gnu/packages/aux-files/emacs/comp-integrity.el (expect-native-if-bound)= : New > function. > (x-setup-function-keys, dynamic-setting-handle-config-changed-event) > (fontset-plain-name, fringe-mode, image-type, regexp-opt, scroll-bar-scal= e): > Use =E2=80=98expect-native-if-bound=E2=80=99. > (x-handle-no-bitmap-icon): Likewise, was already conditional. > --- > .../aux-files/emacs/comp-integrity.el | 22 ++++++++++--------- > 1 file changed, 12 insertions(+), 10 deletions(-) > > diff --git a/gnu/packages/aux-files/emacs/comp-integrity.el b/gnu/package= s/aux-files/emacs/comp-integrity.el > index 191e2ddb98..abe7e7c0c9 100644 > --- a/gnu/packages/aux-files/emacs/comp-integrity.el > +++ b/gnu/packages/aux-files/emacs/comp-integrity.el > @@ -24,6 +24,9 @@ > (defmacro expect-native (fun &optional feature) > `(progn (expect-help ,fun native ,feature))) >=20=20 > + (defmacro expect-native-if-bound (fun) > + `(and (boundp ',fun) (expect-help ,fun native))) > + > (defmacro expect-builtin (fun &optional feature) > `(progn (expect-help ,fun built-in ,feature)))) >=20=20 > @@ -38,7 +41,7 @@ > (expect-native use-default-char-width-table) > (expect-native cl-generic-p) > (expect-native cl-struct-define) > -(expect-native x-setup-function-keys) > +(expect-native-if-bound x-setup-function-keys) > (expect-native encode-composition-rule) > (expect-native custom-declare-face) > (expect-native minibuffer-prompt-properties--setter) > @@ -48,7 +51,7 @@ > (expect-native dnd-open-file) > (expect-native dos-mode25 dos-fns) > (expect-native find-file-text dos-w32) > -(expect-native dynamic-setting-handle-config-changed-event) > +(expect-native-if-bound dynamic-setting-handle-config-changed-event) > (expect-native easy-menu-item-present-p) > (expect-native eldoc-mode) > (expect-native electric-indent-mode) > @@ -60,12 +63,12 @@ > (expect-native fill-region) > (expect-native font-lock-change-mode) > (expect-native font-lock-add-keywords) > -(expect-native fontset-plain-name) > +(expect-native-if-bound fontset-plain-name) > (expect-native format-read) > (expect-native frame-edges) > -(expect-native fringe-mode) > +(expect-native-if-bound fringe-mode) > (expect-native help-quick) > -(expect-native image-type) > +(expect-native-if-bound image-type) > (expect-native indent-region) > (expect-native indian-compose-regexp) > (expect-native msdos-setup-keyboard term/internal) > @@ -86,7 +89,7 @@ > (expect-native convert-define-charset-argument) > (expect-native coding-system-change-eol-conversion) > (expect-native store-substring mule-util) > -(expect-native mouse-wheel-change-button) > +(expect-native-if-bound mouse-wheel-change-button) > (expect-native advice-function-mapc) > (expect-native comment-string-strip) > (if (>=3D emacs-major-version 30) > @@ -99,12 +102,12 @@ > (expect-native show-paren-function) > (expect-native pgtk-dnd-init-frame pgtk-dnd) > (expect-native prog-context-menu) > -(expect-native regexp-opt) > +(expect-native-if-bound regexp-opt) > (expect-native get-register) > (expect-native query-replace-descr) > (expect-native rfn-eshadow-setup-minibuffer) > (expect-native read-multiple-choice) > -(expect-native scroll-bar-scale) > +(expect-native-if-bound scroll-bar-scale) > (expect-native gui-select-text) > (expect-native seq-first) > (expect-native hack-read-symbol-shorthands) > @@ -126,5 +129,4 @@ > (expect-native define-widget) > (expect-native window-right) > (expect-native x-dnd-init-frame x-dnd) > -(and (boundp 'x-handle-no-bitmap-icon) > - (expect-native x-handle-no-bitmap-icon)) > +(expect-native-if-bound x-handle-no-bitmap-icon) > > base-commit: 058532bdd8953feefbd84fd7514822886c7f1a7e Hi Liliana, Looks good! =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmYX96UACgkQIgjSCVjB 3rBIzQ//eNQ588FvbEDXwP4cfapguimU0OnJg+S7eVhrTzklg990pW7E7SD53WYq SUwxRTVbPfh/aifmPKjclIYATYrr396r0GC6CTjlMdXbA1cDxc+5M+fxrTQXw0WL bszDod9tMQTzA+U6mBPF+R9AXpetC5SkRl5v55fwwqfJ16Ass3MXdG2WgMptHnFh y9DbKT80ONffL9vBktMJwnNSgaQHX1Xjhw7LTO/pq9yvuLpGcsJe6bbISpgb88Bl e99z+i/BNxo0F9GyvrxEk8ouTdct+EYMH3adbgDCIm6y6oKf5tIgfENvXhrG6i8i +TBzbf1/CCyraif5CxeK1g1hrttah9P1OW/l3+CEeSolKfOUAKPGrkdiXPeVGlsq p7MWbpZAlI3sMcBWupd40G47VXg7cM1RLPsgcDHDu8S8bs0u5SbMM9hpJlys+sTX m0S25uPbDmGI9sEgdA3FR1xMTMgWP7Ps9/mR45a93bHSsRZMuyrwpBkTQBBIXY10 FjKIZCyJlwCTGugJhBcmBH0iV13CQuP/V35xL5aXrc+KHzy6zV7mIu9l9V0+//kZ RRFtCchcmYqiSL1U5rtp7mB5JrlvCnhU82x3k4+ALiLX4pE3vnQtGd6kSEtNLy3e y7uc2xPUtmV0zzas6/d4g1EssEuLJifjXCGcQPABy2ypxYHq0H4= =5OEr -----END PGP SIGNATURE----- --=-=-=--