all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#33587: [PROPOSED] Default to disabling ImageMagick
@ 2018-12-02 18:09 Paul Eggert
  2018-12-02 18:15 ` Eli Zaretskii
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Paul Eggert @ 2018-12-02 18:09 UTC (permalink / raw)
  To: 33587; +Cc: Paul Eggert

From: Paul Eggert <eggert@Penguin.CS.UCLA.EDU>

ImageMagick has continuing stability and security problems, suggesting
that 'configure' should disable it by default.  See Glenn Morris's notes
at: https://lists.gnu.org/r/emacs-devel/2018-12/msg00036.html
* INSTALL, etc/NEWS: Mention this.
* configure.ac (imagemagick): Default to off.
---
 INSTALL      | 4 +++-
 configure.ac | 2 +-
 etc/NEWS     | 4 ++++
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/INSTALL b/INSTALL
index 0c56fff6d4..9696904dce 100644
--- a/INSTALL
+++ b/INSTALL
@@ -294,7 +294,9 @@ or more of these options:
   --without-gif          for GIF image support
   --without-png          for PNG image support
   --without-rsvg         for SVG image support
-  --without-imagemagick  for Imagemagick support
+
+Although ImageMagick support is disabled by default due to security
+and stability concerns, you can enable it with --with-imagemagick.
 
 Use --without-toolkit-scroll-bars to disable Motif or Xaw3d scroll bars.
 
diff --git a/configure.ac b/configure.ac
index 8b34c3b658..b70393925a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -354,7 +354,7 @@ AC_DEFUN
 OPTION_DEFAULT_ON([libsystemd],[don't compile with libsystemd support])
 OPTION_DEFAULT_OFF([cairo],[compile with Cairo drawing (experimental)])
 OPTION_DEFAULT_ON([xml2],[don't compile with XML parsing support])
-OPTION_DEFAULT_ON([imagemagick],[don't compile with ImageMagick image support])
+OPTION_DEFAULT_OFF([imagemagick],[compile with ImageMagick image support])
 OPTION_DEFAULT_ON([json], [don't compile with native JSON support])
 
 OPTION_DEFAULT_ON([xft],[don't use XFT for anti aliased fonts])
diff --git a/etc/NEWS b/etc/NEWS
index 6297d07879..07c6f74c44 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -37,6 +37,10 @@ functions 'json-serialize', 'json-insert', 'json-parse-string', and
 'json-parse-buffer' are typically much faster than their Lisp
 counterparts from json.el.
 
+** Emacs no longer defaults to using ImageMagick to display images,
+due to security and stability concerns.  To override the default, use
+'configure --with-imagemagick'.
+
 ** The etags program now uses the C library's regular expression matcher
 when possible, and a compatible regex substitute otherwise.  This will
 let developers maintain Emacs's own regex code without having to also
-- 
2.19.2






^ permalink raw reply related	[flat|nested] 14+ messages in thread
* Re: [PATCH] Add native image scaling
@ 2019-01-02 16:11 Eli Zaretskii
  2019-01-02 21:12 ` [PATCH v2] Add native image scaling (bug#33587) Alan Third
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2019-01-02 16:11 UTC (permalink / raw)
  To: Alan Third; +Cc: emacs-devel

> Date: Tue, 1 Jan 2019 21:47:19 +0000
> From: Alan Third <alan@idiocy.org>
> Cc: emacs-devel@gnu.org
> 
> This is a completely rewritten version that doesn't do anything
> different with the image cache. I think this is pretty complete as it
> is, excepting Windows support. I don't know how to add Windows support
> to match the way it's done in NS and X, however if we can't resize the
> images up-front, it should be possible to add some size info to the
> image struct and do the resize on display.

Thanks, I have only minor comments, after which this can be pushed.
Support for MS-Windows can be added later.

> +#ifdef HAVE_XRENDER
> +static bool x_create_x_image_and_pixmap (struct frame *, int, int, int,
> +					 XImagePtr *, Pixmap *, Picture *);
> +#else
>  static bool x_create_x_image_and_pixmap (struct frame *, int, int, int,
>  					 XImagePtr *, Pixmap *);
> +#endif
>  static void x_destroy_x_image (XImagePtr ximg);

Here and elsewhere, I'd prefer not to change the signature of
functions with and without the scaling support.  Instead, let's use
the same signature, where the extra argument(s) are left unused when
scaling is not supported.  If some data types will be undefined
without including headers which are available only when the feature is
supported, we can either use a void pointer, or have a dummy
data type definition for those arguments.

> +DEFUN ("image-scaling-p", Fimage_scaling_p, Simage_scaling_p, 0, 1, 0,
> +       doc: /* Test whether FRAME supports resizing images.
> +Return t if FRAME supports native scaling, nil otherwise.  */)
> +     (Lisp_Object frame)

This primitive should be documented both in NEWS and in the ELisp
manual.

Thanks!



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-05-14  6:15 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-02 18:09 bug#33587: [PROPOSED] Default to disabling ImageMagick Paul Eggert
2018-12-02 18:15 ` Eli Zaretskii
2018-12-02 19:13 ` Andreas Schwab
2018-12-02 23:51   ` Paul Eggert
2018-12-03 21:09     ` Alan Third
2018-12-03 19:08 ` Glenn Morris
2018-12-03 19:35   ` Paul Eggert
2018-12-03 19:40     ` Glenn Morris
2018-12-04 16:51   ` David Engster
2018-12-04 17:00     ` Glenn Morris
2018-12-04 17:38       ` David Engster
2018-12-04 18:16       ` Glenn Morris
2018-12-10 17:49 ` Paul Eggert
  -- strict thread matches above, loose matches on Subject: below --
2019-01-02 16:11 [PATCH] Add native image scaling Eli Zaretskii
2019-01-02 21:12 ` [PATCH v2] Add native image scaling (bug#33587) Alan Third
2019-01-04 14:31   ` Eli Zaretskii
2019-01-04 19:09     ` Alan Third
2019-01-04 20:21       ` Eli Zaretskii
2019-01-04 22:45         ` Alan Third
2019-01-10 19:42           ` Alan Third
2019-01-10 23:40             ` Paul Eggert
2019-05-14  6:15               ` bug#33587: [PROPOSED] Default to disabling ImageMagick Paul Eggert

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.