Wednesday, August 26, 2026

[update] emacs-31.1

If anyone wants to give it a try. The no_x11 FLAVOR seems to work fine here. I'm not sure yet why they appear to add .png files to the info/ subdirectory. *shrug* https://www.gnu.org/software/emacs/news/NEWS.31.1 Index: Makefile =================================================================== RCS file: /cvs/ports/editors/emacs/Makefile,v diff -u -p -r1.131 Makefile --- Makefile 24 Aug 2026 19:31:23 -0000 1.131 +++ Makefile 25 Aug 2026 08:22:37 -0000 @@ -1,8 +1,7 @@ COMMENT= GNU editor: extensible, customizable, self-documenting -VERSION= 30.2 +VERSION= 31.1 DISTNAME= emacs-${VERSION} -REVISION= 4 CATEGORIES= editors Index: distinfo =================================================================== RCS file: /cvs/ports/editors/emacs/distinfo,v diff -u -p -r1.23 distinfo --- distinfo 6 Sep 2025 16:35:56 -0000 1.23 +++ distinfo 25 Aug 2026 08:23:15 -0000 @@ -1,2 +1,2 @@ -SHA256 (emacs-30.2.tar.xz) = s/NvGKbdJxVxM3AWYlfeL64B+dOM/oeM7Zsebe1b79k= -SIZE (emacs-30.2.tar.xz) = 55320324 +SHA256 (emacs-31.1.tar.xz) = HaV5DZWAyBkytb9wBjMRRGjaezQS1p+qdn2uv5dPRYY= +SIZE (emacs-31.1.tar.xz) = 57977476 Index: patches/patch-Makefile_in =================================================================== RCS file: /cvs/ports/editors/emacs/patches/patch-Makefile_in,v diff -u -p -r1.11 patch-Makefile_in --- patches/patch-Makefile_in 6 Sep 2025 16:35:56 -0000 1.11 +++ patches/patch-Makefile_in 25 Aug 2026 08:27:31 -0000 @@ -3,7 +3,7 @@ Index: Makefile.in --- Makefile.in.orig +++ Makefile.in -@@ -808,7 +808,7 @@ install-info: info +@@ -800,7 +800,7 @@ install-info: info for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \ (cd "$${thisdir}"; \ ${INSTALL_DATA} ${srcdir}/info/$$f "$(DESTDIR)${infodir}/$$f"); \ @@ -12,7 +12,7 @@ Index: Makefile.in rm -f "$(DESTDIR)${infodir}/$$f.gz"; \ ${GZIP_PROG} -9n "$(DESTDIR)${infodir}/$$f"; \ done; \ -@@ -833,7 +833,7 @@ install-man: +@@ -823,7 +823,7 @@ install-man: dest=`echo "$${page}" | sed -e 's/\.1$$//' -e '$(TRANSFORM)'`.1; \ (cd "$${thisdir}"; \ ${INSTALL_DATA} ${mansrcdir}/$${page} "$(DESTDIR)${man1dir}/$${dest}"); \ Index: patches/patch-lisp_net_tramp-gvfs_el =================================================================== RCS file: patches/patch-lisp_net_tramp-gvfs_el diff -N patches/patch-lisp_net_tramp-gvfs_el --- patches/patch-lisp_net_tramp-gvfs_el 24 Aug 2026 19:31:23 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,134 +0,0 @@ -Fix shell injections in tramp - -https://www.openwall.com/lists/oss-security/2026/08/21/1 - -Index: lisp/net/tramp-gvfs.el ---- lisp/net/tramp-gvfs.el.orig -+++ lisp/net/tramp-gvfs.el -@@ -1241,7 +1241,7 @@ file names." - (when (string-match - (rx bos "/" (+ (not "/")) (group "/.." (? "/"))) localname) - (setq localname (replace-match "/" t t localname 1))) -- (when (string-match (rx bol "/.." (? "/")) localname) -+ (when (string-match (rx bos "/.." (? "/")) localname) - (setq localname (replace-match "/" t t localname)))) - ;; There might be a double slash. Remove this. - (while (string-match "//" localname) -@@ -1335,8 +1335,8 @@ If FILE-SYSTEM is non-nil, return file system attribut - (with-parsed-tramp-file-name filename nil - (setq localname (file-name-unquote localname)) - (if (or (and (string-match-p -- (rx bol (| "afp" (: "dav" (? "s")) "smb") eol) method) -- (string-match-p (rx bol (? "/") (+ (not "/")) eol) localname)) -+ (rx bos (| "afp" (: "dav" (? "s")) "smb") eos) method) -+ (string-match-p (rx bos (? "/") (+ (not "/")) eos) localname)) - (string-equal localname "/")) - (tramp-gvfs-get-root-attributes filename) - (assoc -@@ -1370,7 +1370,11 @@ If FILE-SYSTEM is non-nil, return file system attribut - (lambda (x) - (unibyte-string (string-to-number (match-string 1 x) 16))) - res-symlink-target) -- 'utf-8))) -+ 'utf-8)) -+ ;; If the resulting localname looks remote, we must quote it -+ ;; for security reasons. -+ (when (tramp-tramp-file-p res-symlink-target) -+ (setq res-symlink-target (file-name-quote res-symlink-target 'top)))) - ;; ... number links - (setq res-numlinks - (string-to-number -@@ -1773,14 +1777,14 @@ ID-FORMAT valid values are `string' and `integer'." - "Retrieve file name from D-Bus OBJECT-PATH." - (dbus-unescape-from-identifier - (replace-regexp-in-string -- (rx bol (* nonl) "/" (group (+ (not "/"))) eol) "\\1" object-path))) -+ (rx bos (* nonl) "/" (group (+ (not "/"))) eos) "\\1" object-path))) - - (defun tramp-gvfs-url-host (url) - "Return the host name part of URL, a string. - We cannot use `url-host', because `url-generic-parse-url' returns - a downcased host name only." - (and (stringp url) -- (string-match (rx bol (+ alnum) "://" (group (+ (not (any "/:"))))) url) -+ (string-match (rx bos (+ alnum) "://" (group (+ (not (any "/:"))))) url) - (match-string 1 url))) - - ;; This is used in GNU ELPA package tramp-locproc.el. -@@ -1934,7 +1938,7 @@ Their full names are \"org.gtk.vfs.MountTracker.mounte - (cadr (assoc "ssl" (cadr mount-spec))))) - (uri (tramp-gvfs-dbus-byte-array-to-string - (cadr (assoc "uri" (cadr mount-spec)))))) -- (when (string-match (rx bol (group (| "afp" "smb"))) method) -+ (when (string-match (rx bos (group (| "afp" "smb"))) method) - (setq method (match-string 1 method))) - (when (and (string-equal "dav" method) (string-equal "true" ssl)) - (setq method "davs")) -@@ -2034,7 +2038,7 @@ Their full names are \"org.gtk.vfs.MountTracker.mounte - (or - (cadr (assoc "share" (cadr mount-spec))) - (cadr (assoc "volume" (cadr mount-spec))))))) -- (when (string-match (rx bol (group (| "afp" "smb"))) method) -+ (when (string-match (rx bos (group (| "afp" "smb"))) method) - (setq method (match-string 1 method))) - (when (and (string-equal "dav" method) (string-equal "true" ssl)) - (setq method "davs")) -@@ -2067,7 +2071,7 @@ Their full names are \"org.gtk.vfs.MountTracker.mounte - (string-equal host (tramp-file-name-host vec)) - (string-equal port (tramp-file-name-port vec)) - (string-match-p -- (rx bol "/" (literal (or share ""))) -+ (rx bos "/" (literal (or share ""))) - (tramp-file-name-unquote-localname vec))) - ;; Set mountpoint and location. - (tramp-set-file-property vec "/" "fuse-mountpoint" fuse-mountpoint) -@@ -2093,7 +2097,7 @@ Their full names are \"org.gtk.vfs.MountTracker.mounte - (defun tramp-gvfs-mount-spec-entry (key value) - "Construct a mount-spec entry to be used in a mount_spec. - It was \"a(say)\", but has changed to \"a{sv})\"." -- (if (string-match-p (rx bol "(aya{sv})") tramp-gvfs-mountlocation-signature) -+ (if (string-match-p (rx bos "(aya{sv})") tramp-gvfs-mountlocation-signature) - (list :dict-entry key - (list :variant (tramp-gvfs-dbus-string-to-byte-array value))) - (list :struct key (tramp-gvfs-dbus-string-to-byte-array value)))) -@@ -2112,9 +2116,9 @@ It was \"a(say)\", but has changed to \"a{sv})\"." - (tramp-media-device-port media) (tramp-file-name-port vec))) - (localname (tramp-file-name-unquote-localname vec)) - (share (when (string-match -- (rx bol (? "/") (group (+ (not "/")))) localname) -+ (rx bos (? "/") (group (+ (not "/")))) localname) - (match-string 1 localname))) -- (ssl (if (string-match-p (rx bol (| "davs" "nextcloud")) method) -+ (ssl (if (string-match-p (rx bos (| "davs" "nextcloud")) method) - "true" "false")) - (mount-spec - `(:array -@@ -2123,7 +2127,7 @@ It was \"a(say)\", but has changed to \"a{sv})\"." - (list (tramp-gvfs-mount-spec-entry "type" "smb-share") - (tramp-gvfs-mount-spec-entry "server" host) - (tramp-gvfs-mount-spec-entry "share" share))) -- ((string-match-p (rx bol (| "davs" "nextcloud")) method) -+ ((string-match-p (rx bos (| "davs" "nextcloud")) method) - (list (tramp-gvfs-mount-spec-entry "type" "dav") - (tramp-gvfs-mount-spec-entry "host" host) - (tramp-gvfs-mount-spec-entry "ssl" ssl))) -@@ -2137,7 +2141,7 @@ It was \"a(say)\", but has changed to \"a{sv})\"." - ((string-equal "nextcloud" method) - (list (tramp-gvfs-mount-spec-entry "type" "owncloud") - (tramp-gvfs-mount-spec-entry "host" host))) -- ((string-match-p (rx bol "http") method) -+ ((string-match-p (rx bos "http") method) - (list (tramp-gvfs-mount-spec-entry "type" "http") - (tramp-gvfs-mount-spec-entry - "uri" -@@ -2154,8 +2158,8 @@ It was \"a(say)\", but has changed to \"a{sv})\"." - ,@(when port - (list (tramp-gvfs-mount-spec-entry "port" port))))) - (mount-pref -- (if (and (string-match-p (rx bol "dav") method) -- (string-match (rx bol (? "/") (+ (not "/"))) localname)) -+ (if (and (string-match-p (rx bos "dav") method) -+ (string-match (rx bos (? "/") (+ (not "/"))) localname)) - (match-string 0 localname) - (tramp-gvfs-get-remote-prefix vec)))) - Index: patches/patch-lisp_net_tramp-rclone_el =================================================================== RCS file: patches/patch-lisp_net_tramp-rclone_el diff -N patches/patch-lisp_net_tramp-rclone_el --- patches/patch-lisp_net_tramp-rclone_el 24 Aug 2026 19:31:23 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,25 +0,0 @@ -Fix shell injections in tramp - -https://www.openwall.com/lists/oss-security/2026/08/21/1 - -Index: lisp/net/tramp-rclone.el ---- lisp/net/tramp-rclone.el.orig -+++ lisp/net/tramp-rclone.el -@@ -191,7 +191,7 @@ arguments to pass to the OPERATION." - (with-tramp-connection-property nil "rclone-device-names" - (tramp-compat-seq-keep - (lambda (line) -- (when (string-match (rx bol (group (+ (not blank))) ":" eol) line) -+ (when (string-match (rx bos (group (+ (not blank))) ":" eos) line) - `(nil ,(match-string 1 line)))) - (tramp-process-lines nil tramp-rclone-program "listremotes")))) - -@@ -365,7 +365,7 @@ file names." - (tramp-rclone-maybe-open-connection v) - ;; TODO: This shall be handled by `expand-file-name'. - (setq localname -- (replace-regexp-in-string (rx bol ".") "" (or localname ""))) -+ (replace-regexp-in-string (rx bos ".") "" (or localname ""))) - (format "%s%s" (tramp-fuse-mounted-p v) localname))) - ;; It is a local file name. - filename)) Index: patches/patch-lisp_net_tramp-smb_el =================================================================== RCS file: patches/patch-lisp_net_tramp-smb_el diff -N patches/patch-lisp_net_tramp-smb_el --- patches/patch-lisp_net_tramp-smb_el 24 Aug 2026 19:31:23 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,34 +0,0 @@ -Fix shell injections in tramp - -https://www.openwall.com/lists/oss-security/2026/08/21/1 - -Index: lisp/net/tramp-smb.el ---- lisp/net/tramp-smb.el.orig -+++ lisp/net/tramp-smb.el -@@ -1550,7 +1550,7 @@ VEC or USER, or if there is no home directory, return - "Return the share name of LOCALNAME." - (save-match-data - (let ((localname (tramp-file-name-unquote-localname vec))) -- (when (string-match (rx bol (? "/") (group (+ (not "/"))) "/") localname) -+ (when (string-match (rx bos (? "/") (group (+ (not "/"))) "/") localname) - (match-string 1 localname))))) - - (defun tramp-smb-get-localname (vec) -@@ -1561,7 +1561,7 @@ If VEC has no cifs capabilities, exchange \"/\" by \"\ - (setq - localname - (if (string-match -- (rx bol (? "/") (+ (not "/")) (group "/" (* nonl))) localname) -+ (rx bos (? "/") (+ (not "/")) (group "/" (* nonl))) localname) - ;; There is a share, separated by "/". - (if (not (tramp-smb-get-cifs-capabilities vec)) - (mapconcat -@@ -1569,7 +1569,7 @@ If VEC has no cifs capabilities, exchange \"/\" by \"\ - (match-string 1 localname) "") - (match-string 1 localname)) - ;; There is just a share. -- (if (string-match (rx bol (? "/") (group (+ (not "/"))) eol) localname) -+ (if (string-match (rx bos (? "/") (group (+ (not "/"))) eol) localname) - (match-string 1 localname) - ""))) - Index: patches/patch-lisp_net_tramp_el =================================================================== RCS file: patches/patch-lisp_net_tramp_el diff -N patches/patch-lisp_net_tramp_el --- patches/patch-lisp_net_tramp_el 24 Aug 2026 19:31:23 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,65 +0,0 @@ -Fix shell injections in tramp - -https://www.openwall.com/lists/oss-security/2026/08/21/1 - -Index: lisp/net/tramp.el ---- lisp/net/tramp.el.orig -+++ lisp/net/tramp.el -@@ -973,11 +973,11 @@ Used in `tramp-make-tramp-file-name'.") - - (defun tramp-build-prefix-regexp () - "Return `tramp-prefix-regexp'." -- (rx bol (literal (tramp-build-prefix-format)))) -+ (rx bos (literal (tramp-build-prefix-format)))) - - (defvar tramp-prefix-regexp nil ; Initialized when defining `tramp-syntax'! - "Regexp matching the very beginning of Tramp file names. --Should always start with \"^\". Derived from `tramp-prefix-format'.") -+Should always start with \"\\\\=`\". Derived from `tramp-prefix-format'.") - - (defconst tramp-method-regexp-alist - `((default . ,(rx (| (literal tramp-default-method-marker) (>= 2 alnum)))) -@@ -1019,8 +1019,11 @@ Used in `tramp-make-tramp-file-name'.") - "Regexp matching delimiter between method and user or host names. - Derived from `tramp-postfix-method-format'.") - --(defconst tramp-user-regexp (rx (+ (not (any "/:|" blank)))) -- "Regexp matching user names.") -+(defconst tramp-user-regexp -+ (rx (| (+ (not (any "/\\^$?*:;|[]{}()<>`'\"" blank))) -+ ;; Environment variable. -+ (: "$" (+ (any "_" alnum))))) -+ "Regexp matching user names.") - - (defconst tramp-prefix-domain-format "%" - "String matching delimiter between user and domain names.") -@@ -1801,6 +1804,8 @@ default values are used." - (hop (match-string (nth 5 tramp-file-name-structure) name)) - domain port v) - (when user -+ (while (string-match (rx bos "$" (group (+ (any "_" alnum))) eos) user) -+ (setq user (getenv (match-string 1 user)))) - (when (string-match tramp-user-with-domain-regexp user) - (setq domain (match-string 2 user) - user (match-string 1 user)))) -@@ -2491,9 +2496,9 @@ Fall back to normal file name handler if no Tramp file - ;; `file-remote-p' is called for everything, even for symbolic - ;; links which look remote. We don't want to get an error. - (non-essential (or non-essential (eq operation 'file-remote-p)))) -+ (setq filename (tramp-replace-environment-variables filename)) - (if (tramp-tramp-file-p filename) - (save-match-data -- (setq filename (tramp-replace-environment-variables filename)) - (with-parsed-tramp-file-name filename nil - (let ((current-connection tramp-current-connection) - (foreign -@@ -6537,6 +6542,9 @@ to cache the result. Return the modified ATTR." - (caar attr)) - (decode-coding-string - (match-string 1 (caar attr)) 'utf-8)))) -+ ;; Quote remote-like symlink. -+ (when (and (stringp (car attr)) (tramp-tramp-file-p (car attr))) -+ (setcar attr (file-name-quote (car attr) 'top))) - ;; Set file's gid change bit. - (setcar - (nthcdr 9 attr) Index: patches/patch-lisp_vc_vc_el =================================================================== RCS file: patches/patch-lisp_vc_vc_el diff -N patches/patch-lisp_vc_vc_el --- patches/patch-lisp_vc_vc_el 23 Feb 2025 22:40:55 -0000 1.11 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,20 +0,0 @@ -Drop messages that slow down VC with big repositories. - -Index: lisp/vc/vc.el ---- lisp/vc/vc.el.orig -+++ lisp/vc/vc.el -@@ -3849,13 +3849,11 @@ It returns the last revision that changed LINE number - (defun vc-file-tree-walk (dirname func &rest args) - "Walk recursively through DIRNAME. - Invoke FUNC f ARGS on each VC-managed file f underneath it." -- (vc-file-tree-walk-internal (expand-file-name dirname) func args) -- (message "Traversing directory %s...done" dirname)) -+ (vc-file-tree-walk-internal (expand-file-name dirname) func args)) - - (defun vc-file-tree-walk-internal (file func args) - (if (not (file-directory-p file)) - (when (vc-backend file) (apply func file args)) -- (message "Traversing directory %s..." (abbreviate-file-name file)) - (let ((dir (file-name-as-directory file))) - (mapcar - (lambda (f) (or Index: patches/patch-src_treesit_c =================================================================== RCS file: patches/patch-src_treesit_c diff -N patches/patch-src_treesit_c --- patches/patch-src_treesit_c 8 May 2026 06:59:39 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,269 +0,0 @@ -Fix linkage with treesitter-0.26. - -https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-emacs/006-tree-sitter-0.26.patch - -Also: -The tree-sitter library throws a syntax error if the -predicate names in a query don't end with question mark - -https://github.com/emacs-mirror/emacs/commit/b01435306a36e4e75671fbe7bacea351f89947d5 - -Index: src/treesit.c ---- src/treesit.c.orig -+++ src/treesit.c -@@ -34,7 +34,11 @@ along with GNU Emacs. If not, see <https://www.gnu.or - # include "w32common.h" - - /* In alphabetical order. */ -+#if TREE_SITTER_LANGUAGE_VERSION >= 15 -+#undef ts_language_abi_version -+#else - #undef ts_language_version -+

No comments:

Post a Comment