pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/editors



Module Name:    pkgsrc
Committed By:   wiz
Date:           Thu Nov 12 08:11:12 UTC 2026

Modified Files:
        pkgsrc/editors/emacs31: Makefile distinfo
        pkgsrc/editors/emacs31-nox11: Makefile
Added Files:
        pkgsrc/editors/emacs31/patches: patch-lisp_files.el

Log Message:
emacs31*: add security bug fix patch from upstream

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 pkgsrc/editors/emacs31/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/editors/emacs31/distinfo
cvs rdiff -u -r1.3 -r1.4 pkgsrc/editors/emacs31-nox11/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/editors/emacs31/patches/patch-lisp_files.el

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/editors/emacs31/Makefile
diff -u pkgsrc/editors/emacs31/Makefile:1.10 pkgsrc/editors/emacs31/Makefile:1.11
--- pkgsrc/editors/emacs31/Makefile:1.10        Wed Nov 11 11:52:55 2026
+++ pkgsrc/editors/emacs31/Makefile     Thu Nov 12 08:11:12 2026
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.10 2026/11/11 11:52:55 wiz Exp $
+# $NetBSD: Makefile,v 1.11 2026/11/12 08:11:12 wiz Exp $
 
 CONFLICTS+=    emacs31-nox11-[0-9]*
 
 .include "../../editors/emacs31/Makefile.common"
 
-PKGREVISION=   9
+PKGREVISION=   10
 
 .include "options.mk"
 

Index: pkgsrc/editors/emacs31/distinfo
diff -u pkgsrc/editors/emacs31/distinfo:1.1 pkgsrc/editors/emacs31/distinfo:1.2
--- pkgsrc/editors/emacs31/distinfo:1.1 Tue Aug 25 17:22:38 2026
+++ pkgsrc/editors/emacs31/distinfo     Thu Nov 12 08:11:12 2026
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.1 2026/08/25 17:22:38 wiz Exp $
+$NetBSD: distinfo,v 1.2 2026/11/12 08:11:12 wiz Exp $
 
 BLAKE2s (emacs-31.1.tar.xz) = 7ba508747b7a4daf6744b45e548e4e1fe8d10563b9d8ed08233d69c07986e69f
 SHA512 (emacs-31.1.tar.xz) = 25cb810d09eaaa58306f4c10f406466c424517657dd1c9db056dadb624f0bc33db58f3bcdf527d81e5059e492b81c237f164eb3997bf4357bd84c696537f6836
 Size (emacs-31.1.tar.xz) = 57977476 bytes
+SHA1 (patch-lisp_files.el) = 79dff4ea0089bd03e7fd2cdd67f85382360486d3

Index: pkgsrc/editors/emacs31-nox11/Makefile
diff -u pkgsrc/editors/emacs31-nox11/Makefile:1.3 pkgsrc/editors/emacs31-nox11/Makefile:1.4
--- pkgsrc/editors/emacs31-nox11/Makefile:1.3   Wed Oct 14 19:32:14 2026
+++ pkgsrc/editors/emacs31-nox11/Makefile       Thu Nov 12 08:11:12 2026
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.3 2026/10/14 19:32:14 markd Exp $
+# $NetBSD: Makefile,v 1.4 2026/11/12 08:11:12 wiz Exp $
 
 PKGNAME=       ${DISTNAME:S/emacs/emacs31/:S/-/-nox11-/}
-PKGREVISION=   2
+PKGREVISION=   3
 
 CONFLICTS+=    emacs31-[0-9]*
 

Added files:

Index: pkgsrc/editors/emacs31/patches/patch-lisp_files.el
diff -u /dev/null pkgsrc/editors/emacs31/patches/patch-lisp_files.el:1.1
--- /dev/null   Thu Nov 12 08:11:12 2026
+++ pkgsrc/editors/emacs31/patches/patch-lisp_files.el  Thu Nov 12 08:11:12 2026
@@ -0,0 +1,116 @@
+$NetBSD: patch-lisp_files.el,v 1.1 2026/11/12 08:11:12 wiz Exp $
+
+X3r0Day discovered that Emacs 31.1 did not adequately validate the
+contents of .dir-locals.el before executing code there.
+
+For full details on the vulnerability please see
+<https://debbugs.gnu.org/82213>.
+
+--- lisp/files.el.orig 2026-07-31 10:15:51.000000000 +0000
++++ lisp/files.el
+@@ -3506,44 +3506,42 @@ Also applies to `magic-fallback-mode-alist'.")
+   "Upper limit on `magic-mode-alist' regexp matches.
+ Also applies to `magic-fallback-mode-alist'.")
+ 
+-(defun set-auto-mode--find-matching-alist-entry (alist name case-insensitive)
++(defun set-auto-mode--from-matching-alist-entry ( alist name case-insensitive
++                                                  keep-mode-if-same dir-local)
+   "Find first matching entry in ALIST for file NAME.
+ 
+ If CASE-INSENSITIVE, the file system of file NAME is case-insensitive."
+-  (let (mode)
+-    (while name
+-      (let ((newmode
+-             (if case-insensitive
+-                 ;; Filesystem is case-insensitive.
+-                 (let ((case-fold-search t))
+-                   (assoc-default name alist 'string-match))
+-               ;; Filesystem is case-sensitive.
+-               (or
+-                ;; First match case-sensitively.
+-                (let ((case-fold-search nil))
+-                  (assoc-default name alist 'string-match))
+-                ;; Fallback to case-insensitive match.
+-                (and auto-mode-case-fold
+-                     (let ((case-fold-search t))
+-                       (assoc-default name alist 'string-match)))))))
+-        (when newmode
+-          (when mode
+-            ;; We had already found a mode but in a (REGEXP MODE t)
+-            ;; entry, so we still have to run MODE.  Let's do it now.
+-            ;; FIXME: It's kind of ugly to run the function here.
+-            ;; An alternative could be to return a list of functions and
+-            ;; callers.
+-            (set-auto-mode-0 mode t))
+-          (setq mode newmode))
+-        (if (and newmode
+-                 (not (functionp newmode))
+-                 (consp newmode)
+-                 (cadr newmode))
+-            ;; It's a (REGEXP MODE t): Keep looking but remember the MODE.
+-            (setq mode (car newmode)
+-                  name (substring name 0 (match-beginning 0)))
+-          (setq name nil))))
+-    mode))
++  (let (was-set)
++    (while
++        (let* ((newmode
++                (if case-insensitive
++                    ;; Filesystem is case-insensitive.
++                    (let ((case-fold-search t))
++                      (assoc-default name alist 'string-match))
++                  ;; Filesystem is case-sensitive.
++                  (or
++                   ;; First match case-sensitively.
++                   (let ((case-fold-search nil))
++                     (assoc-default name alist 'string-match))
++                   ;; Fallback to case-insensitive match.
++                   (and auto-mode-case-fold
++                        (let ((case-fold-search t))
++                          (assoc-default name alist 'string-match))))))
++               ;; Extract MODE from (REGEXP MODE t) entries.
++               (mode-t (when (and (not (functionp newmode))
++                                  (consp newmode)
++                                  (cadr newmode))
++                         (setq name (substring name 0 (match-beginning 0)))
++                         (car newmode)))
++               (mode (or mode-t newmode)))
++          (when newmode
++            (if (and dir-local
++                     (not (set-auto-mode--dir-local-valid-p mode)))
++                (message "Ignoring invalid mode `%S'" mode)
++              (set-auto-mode-0 mode keep-mode-if-same)
++              (setq was-set t))
++            mode-t)))
++    was-set))
+ 
+ (defun set-auto-mode--apply-alist (alist keep-mode-if-same dir-local)
+   "Helper function for `set-auto-mode'.
+@@ -3555,8 +3553,7 @@ extra checks should be done."
+ DIR-LOCAL non-nil means this call is via directory-locals, and
+ extra checks should be done."
+   (if buffer-file-name
+-      (let (mode
+-            (name buffer-file-name)
++      (let ((name buffer-file-name)
+             (remote-id (file-remote-p buffer-file-name))
+             (case-insensitive-p (file-name-case-insensitive-p
+                                  buffer-file-name)))
+@@ -3566,15 +3563,8 @@ extra checks should be done."
+         (when (and (stringp remote-id)
+                    (string-match (regexp-quote remote-id) name))
+           (setq name (substring name (match-end 0))))
+-        (setq mode (set-auto-mode--find-matching-alist-entry
+-                    alist name case-insensitive-p))
+-        (when (and dir-local mode
+-                   (not (set-auto-mode--dir-local-valid-p mode)))
+-          (message "Ignoring invalid mode `%S'" mode)
+-          (setq mode nil))
+-        (when mode
+-          (set-auto-mode-0 mode keep-mode-if-same)
+-          t))))
++        (set-auto-mode--from-matching-alist-entry
++         alist name case-insensitive-p keep-mode-if-same dir-local))))
+ 
+ (defun set-auto-mode--dir-local-valid-p (mode)
+   "Say whether MODE can be used in a .dir-local.el `auto-mode-alist'."



Home | Main Index | Thread Index | Old Index