On 2023/07/31 00:24:10 +0800, lux <lx@shellcodes.org> wrote:
> Hi, Emacs 29.1 was released yesterday, I update to 29.1.
>
> I attach a port file.
for updates please send a diff instead of a tarball; it's easier to
review, apply etc... especially in a case like this where some files
needs to be removed.
I'm attaching a diff mostly equivalent to your tarball.
There are a couple of issues:
- x11/gtk3,-guic needs to be changed to x11/gtk4,-guic (done in diff below)
- the hash is different on each build i guess (I got a different one
from yours) so this needs to be sorted out (not done in diff below)
otherwise, it seem to be working fine. I'm composing this mail from
emacs-29.1-athena :)
Index: Makefile
===================================================================
RCS file: /home/cvs/ports/editors/emacs/Makefile,v
retrieving revision 1.111
diff -u -p -r1.111 Makefile
--- Makefile 24 Apr 2023 11:40:37 -0000 1.111
+++ Makefile 31 Jul 2023 08:49:52 -0000
@@ -1,7 +1,6 @@
COMMENT= GNU editor: extensible, customizable, self-documenting
-VERSION= 28.2
-REVISION= 4
+VERSION= 29.1
DISTNAME= emacs-${VERSION}
CATEGORIES= editors
Index: distinfo
===================================================================
RCS file: /home/cvs/ports/editors/emacs/distinfo,v
retrieving revision 1.17
diff -u -p -r1.17 distinfo
--- distinfo 22 Sep 2022 07:16:16 -0000 1.17
+++ distinfo 31 Jul 2023 08:39:36 -0000
@@ -1,2 +1,2 @@
-SHA256 (emacs-28.2.tar.xz) = 7iEYIjPvMjLcl7SGry2G4UBC27ZbvFNd9WLDqFgjJIg=
-SIZE (emacs-28.2.tar.xz) = 47722600
+SHA256 (emacs-29.1.tar.xz) = 0viBpcwjHi9aA+hvRYSwQ4+D7ddZignSSiG9jQA+LgE=
+SIZE (emacs-29.1.tar.xz) = 52081008
Index: patches/patch-Makefile_in
===================================================================
RCS file: /home/cvs/ports/editors/emacs/patches/patch-Makefile_in,v
retrieving revision 1.8
diff -u -p -r1.8 patch-Makefile_in
--- patches/patch-Makefile_in 19 Apr 2022 11:54:34 -0000 1.8
+++ patches/patch-Makefile_in 31 Jul 2023 08:39:36 -0000
@@ -3,7 +3,7 @@
Index: Makefile.in
--- Makefile.in.orig
+++ Makefile.in
-@@ -693,7 +693,7 @@ install-info: info
+@@ -792,7 +792,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; \
-@@ -717,7 +717,7 @@ install-man:
+@@ -816,7 +816,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-etc_emacsclient-mail_desktop
===================================================================
RCS file: patches/patch-etc_emacsclient-mail_desktop
diff -N patches/patch-etc_emacsclient-mail_desktop
--- patches/patch-etc_emacsclient-mail_desktop 16 Apr 2023 20:46:36 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,28 +0,0 @@
-"Fix emacsclient-mail.desktop code injection vulnerability" (CVE-2023-27985, CVE-2023-27986)
-https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-29&id=3c1693d08b0a71d40a77e7b40c0ebc42dca2d2cc
-https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-29&id=c8ec0017cb96d4ac98be21e1fe9a95e1aa723e99
-
-Index: etc/emacsclient-mail.desktop
---- etc/emacsclient-mail.desktop.orig
-+++ etc/emacsclient-mail.desktop
-@@ -1,7 +1,10 @@
- [Desktop Entry]
- Categories=Network;Email;
- Comment=GNU Emacs is an extensible, customizable text editor - and more
--Exec=sh -c "exec emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" --eval \\\\(message-mailto\\\\ \\\\\\"%u\\\\\\"\\\\)"
-+# We want to pass the following commands to the shell wrapper:
-+# u=$(echo "$1" | sed 's/[\"]/\\&/g'); exec emacsclient --alternate-editor= --display="$DISPLAY" --eval "(message-mailto \"$u\")"
-+# Special chars '"', '$', and '\' must be escaped as '\\"', '\\$', and '\\\\'.
-+Exec=sh -c "u=\\$(echo \\"\\$1\\" | sed 's/[\\\\\\"]/\\\\\\\\&/g'); exec emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" --eval \\"(message-mailto \\\\\\"\\$u\\\\\\")\\"" sh %u
- Icon=emacs
- Name=Emacs (Mail, Client)
- MimeType=x-scheme-handler/mailto;
-@@ -13,7 +16,7 @@ Actions=new-window;new-instance;
-
- [Desktop Action new-window]
- Name=New Window
--Exec=emacsclient --alternate-editor= --create-frame --eval "(message-mailto \\"%u\\")"
-+Exec=sh -c "u=\\$(echo \\"\\$1\\" | sed 's/[\\\\\\"]/\\\\\\\\&/g'); exec emacsclient --alternate-editor= --create-frame --eval \\"(message-mailto \\\\\\"\\$u\\\\\\")\\"" sh %u
-
- [Desktop Action new-instance]
- Name=New Instance
Index: patches/patch-lib-src_etags_c
===================================================================
RCS file: patches/patch-lib-src_etags_c
diff -N patches/patch-lib-src_etags_c
--- patches/patch-lib-src_etags_c 14 Mar 2023 13:09:48 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,329 +0,0 @@
-"Fixed ctags local command execute vulnerability" (CVE-2022-45939)
-https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-28&id=5d05ea803e9996c4c1edbe0fa0f6f5b05d2ffc87
-https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=d48bb4874bc6cd3e69c7a15fc3c91cc141025c51
-
-"Fix etags local command injection vulnerability" (CVE-2022-48337)
-https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-28&id=e339926272a598bd9ee7e02989c1662b89e64cf0
-https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=01a4035c869b91c153af9a9132c87adb7669ea1c
-
-Index: lib-src/etags.c
---- lib-src/etags.c.orig
-+++ lib-src/etags.c
-@@ -382,7 +382,7 @@ static void just_read_file (FILE *);
-
- static language *get_language_from_langname (const char *);
- static void readline (linebuffer *, FILE *);
--static ptrdiff_t readline_internal (linebuffer *, FILE *, char const *);
-+static ptrdiff_t readline_internal (linebuffer *, FILE *, char const *, const bool);
- static bool nocase_tail (const char *);
- static void get_tag (char *, char **);
- static void get_lispy_tag (char *);
-@@ -406,7 +406,10 @@ static void free_fdesc (fdesc *);
- static void pfnote (char *, bool, char *, ptrdiff_t, intmax_t, intmax_t);
- static void invalidate_nodes (fdesc *, node **);
- static void put_entries (node *);
-+static void clean_matched_file_tag (char const * const, char const * const);
-
-+static char *escape_shell_arg_string (char *);
-+static void do_move_file (const char *, const char *);
- static char *concat (const char *, const char *, const char *);
- static char *skip_spaces (char *);
- static char *skip_non_spaces (char *);
-@@ -1339,7 +1342,7 @@ main (int argc, char **argv)
- if (parsing_stdin)
- fatal ("cannot parse standard input "
- "AND read file names from it");
-- while (readline_internal (&filename_lb, stdin, "-") > 0)
-+ while (readline_internal (&filename_lb, stdin, "-", false) > 0)
- process_file_name (filename_lb.buffer, lang);
- }
- else
-@@ -1387,9 +1390,6 @@ main (int argc, char **argv)
- /* From here on, we are in (CTAGS && !cxref_style) */
- if (update)
- {
-- char *cmd =
-- xmalloc (strlen (tagfile) + whatlen_max +
-- sizeof "mv..OTAGS;grep -Fv '\t\t' OTAGS >;rm OTAGS");
- for (i = 0; i < current_arg; ++i)
- {
- switch (argbuffer[i].arg_type)
-@@ -1400,17 +1400,8 @@ main (int argc, char **argv)
- default:
- continue; /* the for loop */
- }
-- char *z = stpcpy (cmd, "mv ");
-- z = stpcpy (z, tagfile);
-- z = stpcpy (z, " OTAGS;grep -Fv '\t");
-- z = stpcpy (z, argbuffer[i].what);
-- z = stpcpy (z, "\t' OTAGS >");
-- z = stpcpy (z, tagfile);
-- strcpy (z, ";rm OTAGS");
-- if (system (cmd) != EXIT_SUCCESS)
-- fatal ("failed to execute shell command");
-+ clean_matched_file_tag (tagfile, argbuffer[i].what);
- }
-- free (cmd);
- append_to_tagfile = true;
- }
-
-@@ -1439,7 +1430,52 @@ main (int argc, char **argv)
- return EXIT_SUCCESS;
- }
-
-+/*
-+ * Equivalent to: mv tags OTAGS;grep -Fv ' filename ' OTAGS >tags;rm OTAGS
-+ */
-+static void
-+clean_matched_file_tag (const char* tagfile, const char* match_file_name)
-+{
-+ FILE *otags_f = fopen ("OTAGS", "wb");
-+ FILE *tag_f = fopen (tagfile, "rb");
-
-+ if (otags_f == NULL)
-+ pfatal ("OTAGS");
-+
-+ if (tag_f == NULL)
-+ pfatal (tagfile);
-+
-+ int buf_len = strlen (match_file_name) + sizeof ("\t\t ") + 1;
-+ char *buf = xmalloc (buf_len);
-+ snprintf (buf, buf_len, "\t%s\t", match_file_name);
-+
-+ linebuffer line;
-+ linebuffer_init (&line);
-+ while (readline_internal (&line, tag_f, tagfile, true) > 0)
-+ {
-+ if (ferror (tag_f))
-+ pfatal (tagfile);
-+
-+ if (strstr (line.buffer, buf) == NULL)
-+ {
-+ fprintf (otags_f, "%s\n", line.buffer);
-+ if (ferror (tag_f))
-+ pfatal (tagfile);
-+ }
-+ }
-+ free (buf);
-+ free (line.buffer);
-+
-+ if (fclose (otags_f) == EOF)
-+ pfatal ("OTAGS");
-+
-+ if (fclose (tag_f) == EOF)
-+ pfatal (tagfile);
-+
-+ do_move_file ("OTAGS", tagfile);
-+ return;
-+}
-+
- /*
- * Return a compressor given the file name. If EXTPTR is non-zero,
- * return a pointer into FILE where the compressor-specific
-@@ -1669,13 +1705,18 @@ process_file_name (char *file, language *lang)
- else
- {
- #if MSDOS || defined (DOS_NT)
-- char *cmd1 = concat (compr->command, " \"", real_name);
-- char *cmd = concat (cmd1, "\" > ", tmp_name);
-+ int buf_len = strlen (compr->command) + strlen (" \"\" > \"\"") + strlen (real_name) + strlen (tmp_name) + 1;
-+ char *cmd = xmalloc (buf_len);
-+ snprintf (cmd, buf_len, "%s \"%s\" > \"%s\"", compr->command, real_name, tmp_name);
- #else
-- char *cmd1 = concat (compr->command, " '", real_name);
-- char *cmd = concat (cmd1, "' > ", tmp_name);
-+ char *new_real_name = escape_shell_arg_string (real_name);
-+ char *new_tmp_name = escape_shell_arg_string (tmp_name);
-+ int buf_len = strlen (compr->command) + strlen (" > ") + strlen (new_real_name) + strlen (new_tmp_name) + 1;
-+ char *cmd = xmalloc (buf_len);
-+ snprintf (cmd, buf_len, "%s %s > %s", compr->command, new_real_name, new_tmp_name);
-+ free (new_real_name);
-+ free (new_tmp_name);
-
No comments:
Post a Comment