unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Updated GnuTLS from MSYS2 and Emacs's `dynamic-library-alist'
@ 2015-04-30 11:46 Alexander Shukaev
  2015-04-30 13:43 ` Andy Moreton
  2015-04-30 14:09 ` Eli Zaretskii
  0 siblings, 2 replies; 8+ messages in thread
From: Alexander Shukaev @ 2015-04-30 11:46 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 674 bytes --]

Hello Devs,

Recently, the GnuTLS from MSYS2 has been updated to the 3.4 version.  As a
result, the name of corresponding DLL has changed.  Currently to
"libgnutls-30.dll", but maybe it's a mistake and we will change it to
"libgnutls-34.dll".  In any case, currently Emacs has the following GnuTLS
setting in the `dynamic-library-alist':

(gnutls "libgnutls-28.dll" "libgnutls-26.dll")


What would be your recommendation to properly add new versions of GnuTLS?
Upstream or should I create a custom MSYS2 patch?  Note that aside from Git
version, we also support release versions such as 24.5, and it seems like a
patch is inevitable in this case right?

Regards,
Alexander

[-- Attachment #2: Type: text/html, Size: 1294 bytes --]

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

* Re: Updated GnuTLS from MSYS2 and Emacs's `dynamic-library-alist'
  2015-04-30 11:46 Updated GnuTLS from MSYS2 and Emacs's `dynamic-library-alist' Alexander Shukaev
@ 2015-04-30 13:43 ` Andy Moreton
  2015-04-30 14:17   ` Eli Zaretskii
  2015-04-30 14:09 ` Eli Zaretskii
  1 sibling, 1 reply; 8+ messages in thread
From: Andy Moreton @ 2015-04-30 13:43 UTC (permalink / raw)
  To: emacs-devel

On Thu 30 Apr 2015, Alexander Shukaev wrote:

> Hello Devs,
>
> Recently, the GnuTLS from MSYS2 has been updated to the 3.4 version. As a
> result, the name of corresponding DLL has changed. Currently to
> "libgnutls-30.dll", but maybe it's a mistake and we will change it to
> "libgnutls-34.dll". In any case, currently Emacs has the following GnuTLS
> setting in the `dynamic-library-alist':
>
>     (gnutls "libgnutls-28.dll" "libgnutls-26.dll")

The number in the DLL name is the ABI version of the library interface,
which does change with every release. 

gnutls-30.dll is already supported in emacs master - see term/w32-win.el
where it sets dynamic-library-alist. The interface for gnutls-30.dll has
come incompatible changes from previous versions, so which DLLs are
supported depend on which gnutls version was used to build emacs.


> What would be your recommendation to properly add new versions of GnuTLS?
> Upstream or should I create a custom MSYS2 patch? Note that aside from Git
> version, we also support release versions such as 24.5, and it seems like a
> patch is inevitable in this case right?

For emacs 25 (git master) this already works.

For emacs 24, the gnutls changes (commit dc79845a "Support GnuTLS v3.4
and later on MS-Windows") need to be backported to the emacs24 branch,
so somebody needs to do that work.

    AndyM




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

* Re: Updated GnuTLS from MSYS2 and Emacs's `dynamic-library-alist'
  2015-04-30 11:46 Updated GnuTLS from MSYS2 and Emacs's `dynamic-library-alist' Alexander Shukaev
  2015-04-30 13:43 ` Andy Moreton
@ 2015-04-30 14:09 ` Eli Zaretskii
  1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2015-04-30 14:09 UTC (permalink / raw)
  To: Alexander Shukaev; +Cc: emacs-devel

> Date: Thu, 30 Apr 2015 13:46:37 +0200
> From: Alexander Shukaev <haroogan@gmail.com>
> 
> Recently, the GnuTLS from MSYS2 has been updated to the 3.4 version. As a
> result, the name of corresponding DLL has changed. Currently to
> "libgnutls-30.dll", but maybe it's a mistake and we will change it to
> "libgnutls-34.dll".

It's not a mistake.  The "30" part is not coming from the version of
the package, it is a combination of the ABI version and the "age"
value.  If you are interested in this stuff (you shouldn't be, it has
no meaning for humans), read the GnuTLS configuration files, they
explain how "30" is computed.

> In any case, currently Emacs has the following GnuTLS
> setting in the `dynamic-library-alist':
> 
>     (gnutls "libgnutls-28.dll" "libgnutls-26.dll")

Only if you are looking at an old git checkout, or at Emacs 24.5.  The
current git HEAD already has a fix for this change.

> What would be your recommendation to properly add new versions of GnuTLS?

It requires changes on the C level, due to ABI incompatibility.  See
the changes mad in this commit:

  commit dc79845aac339db1cdcbbfc48d8f1569ed9a5aa2
  Author: Chris Zheng <chriszheng99@gmail.com>
  Date:   Sat Apr 11 18:06:52 2015 +0300

      Support GnuTLS v3.4 and later on MS-Windows

      * src/gnutls.c (syms_of_gnutls) <libgnutls-version>: New DEFSYM.
      * lisp/term/w32-win.el (dynamic-library-alist): Determine which
      GnuTLS DLL to load according to value of libgnutls-version.

      Fixes: bug#20294

> Upstream or should I create a custom MSYS2 patch? Note that aside from Git
> version, we also support release versions such as 24.5, and it seems like a
> patch is inevitable in this case right?

Stefan decided not to release any more 24.x versions, unless there's
some crucial bug or issue with 24.5, so we currently don't see any
reason to release a patched 24.x.  In fact, AFAIU, this latest version
of GnuTLS is not stable enough yet to recommend it for general
population, and AFIR even had some minor security issues.  So I think
users of Emacs 24.5 will be better off using the 3.3 series of GnuTLS.



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

* Re: Updated GnuTLS from MSYS2 and Emacs's `dynamic-library-alist'
  2015-04-30 13:43 ` Andy Moreton
@ 2015-04-30 14:17   ` Eli Zaretskii
  2015-04-30 15:06     ` Alexander Shukaev
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2015-04-30 14:17 UTC (permalink / raw)
  To: Andy Moreton; +Cc: emacs-devel

> From: Andy Moreton <andrewjmoreton@gmail.com>
> Date: Thu, 30 Apr 2015 14:43:48 +0100
> 
> For emacs 24, the gnutls changes (commit dc79845a "Support GnuTLS v3.4
> and later on MS-Windows") need to be backported to the emacs24 branch,
> so somebody needs to do that work.

As I explained elsewhere, I don't think this is a good idea.



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

* Re: Updated GnuTLS from MSYS2 and Emacs's `dynamic-library-alist'
  2015-04-30 14:17   ` Eli Zaretskii
@ 2015-04-30 15:06     ` Alexander Shukaev
  2015-04-30 15:47       ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Alexander Shukaev @ 2015-04-30 15:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Andy Moreton, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 344 bytes --]

>
> ​
> As I explained elsewhere, I don't think this is a good idea.
>

​As I understand it​

(gnutls
"libgnutls-
​30​
.dll" "libgnutls-28.dll" "libgnutls-26.dll")

makes loading of GnuTLS 3.4 completely optional, i.e. people may still have
"libgnutls-28.dll" and use it instead.  So why not backport this commit
then?

[-- Attachment #2: Type: text/html, Size: 1544 bytes --]

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

* Re: Updated GnuTLS from MSYS2 and Emacs's `dynamic-library-alist'
  2015-04-30 15:06     ` Alexander Shukaev
@ 2015-04-30 15:47       ` Eli Zaretskii
  2015-04-30 16:05         ` Alexander Shukaev
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2015-04-30 15:47 UTC (permalink / raw)
  To: Alexander Shukaev; +Cc: andrewjmoreton, emacs-devel

> Date: Thu, 30 Apr 2015 17:06:51 +0200
> From: Alexander Shukaev <haroogan@gmail.com>
> Cc: Andy Moreton <andrewjmoreton@gmail.com>, emacs-devel <emacs-devel@gnu.org>
> 
> ​As I understand it​
> 
> (gnutls 
> "libgnutls-
> ​30​
> .dll" "libgnutls-28.dll" "libgnutls-26.dll")
> 
> makes loading of GnuTLS 3.4 completely optional, i.e. people may still have
> "libgnutls-28.dll" and use it instead. So why not backport this commit then?

That's not what needs to be done.  Emacs compiled for GnuTLS versions
before 3.4.0 is incompatible with the GnuTLS DLL versions 3.4.0.  The
new ABI introduces a binary incompatibility, so you need to recompile
Emacs with the newer GnuTLS headers to be able to load the 3.4.0 DLL.
And if you recompile Emacs like that, it will be incompatible with the
older DLLs.  Trying to load incompatible DLLs will likely cause a
crash.

So the change you need to do is more than just the one you show.

Once again, I don't recommend that, if you are building a binary for
more than just your own consumption.  But that's up to you.




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

* Re: Updated GnuTLS from MSYS2 and Emacs's `dynamic-library-alist'
  2015-04-30 15:47       ` Eli Zaretskii
@ 2015-04-30 16:05         ` Alexander Shukaev
  2015-04-30 16:20           ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Alexander Shukaev @ 2015-04-30 16:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: andrewjmoreton, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1329 bytes --]

OK, I see the relevant bit here [1], thanks.

[1] https://github.com/emacs-mirror/emacs/commit/dc79845

On Thu, Apr 30, 2015 at 5:47 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Thu, 30 Apr 2015 17:06:51 +0200
> > From: Alexander Shukaev <haroogan@gmail.com>
> > Cc: Andy Moreton <andrewjmoreton@gmail.com>, emacs-devel <
> emacs-devel@gnu.org>
> >
> > ​As I understand it​
> >
> > (gnutls
> > "libgnutls-
> > ​30​
> > .dll" "libgnutls-28.dll" "libgnutls-26.dll")
> >
> > makes loading of GnuTLS 3.4 completely optional, i.e. people may still
> have
> > "libgnutls-28.dll" and use it instead. So why not backport this commit
> then?
>
> That's not what needs to be done.  Emacs compiled for GnuTLS versions
> before 3.4.0 is incompatible with the GnuTLS DLL versions 3.4.0.  The
> new ABI introduces a binary incompatibility, so you need to recompile
> Emacs with the newer GnuTLS headers to be able to load the 3.4.0 DLL.
> And if you recompile Emacs like that, it will be incompatible with the
> older DLLs.  Trying to load incompatible DLLs will likely cause a
> crash.
>
> So the change you need to do is more than just the one you show.
>
> Once again, I don't recommend that, if you are building a binary for
> more than just your own consumption.  But that's up to you.
>

[-- Attachment #2: Type: text/html, Size: 2173 bytes --]

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

* Re: Updated GnuTLS from MSYS2 and Emacs's `dynamic-library-alist'
  2015-04-30 16:05         ` Alexander Shukaev
@ 2015-04-30 16:20           ` Eli Zaretskii
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2015-04-30 16:20 UTC (permalink / raw)
  To: Alexander Shukaev; +Cc: andrewjmoreton, emacs-devel

> Date: Thu, 30 Apr 2015 18:05:55 +0200
> From: Alexander Shukaev <haroogan@gmail.com>
> Cc: andrewjmoreton@gmail.com, emacs-devel <emacs-devel@gnu.org>
> 
> OK, I see the relevant bit here [1], thanks.
> 
> [1] https://github.com/emacs-mirror/emacs/commit/dc79845

Yes.  And note that if you build Emacs with GnuTLS 3.4.0, the users
will be able to use only versions of GnuTLS 3.4.0 and later, Emacs
will refuse to load older DLLs, due to incompatibility.  So using
3.4.0 is no longer optional with such an Emacs binary.



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

end of thread, other threads:[~2015-04-30 16:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-30 11:46 Updated GnuTLS from MSYS2 and Emacs's `dynamic-library-alist' Alexander Shukaev
2015-04-30 13:43 ` Andy Moreton
2015-04-30 14:17   ` Eli Zaretskii
2015-04-30 15:06     ` Alexander Shukaev
2015-04-30 15:47       ` Eli Zaretskii
2015-04-30 16:05         ` Alexander Shukaev
2015-04-30 16:20           ` Eli Zaretskii
2015-04-30 14:09 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).