unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Replace 'pp' with 'prin1' to generate ELPA archive-contents
@ 2022-10-22 10:52 Philip Kaludercic
  2022-10-22 11:56 ` Stefan Kangas
  0 siblings, 1 reply; 27+ messages in thread
From: Philip Kaludercic @ 2022-10-22 10:52 UTC (permalink / raw)
  To: emacs-devel

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


I've just tried replacing the 'pp' call with 'prin1' in elpa-admin's
`elpaa-update-archive-contents', and on my checkout the size dropped
from ~130 kb to 100 kb.  It is not much, but I don't understand why the
archive contents should be pretty printed, and even a few kilobyte less
can make a difference for some people.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-elpa-admin.el-elpaa-update-archive-contents-Use-prin.patch --]
[-- Type: text/x-patch, Size: 847 bytes --]

From 592e208beae6f921772967ab2b800606a647899b Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
Date: Sat, 22 Oct 2022 12:49:49 +0200
Subject: [PATCH] * elpa-admin.el (elpaa--update-archive-contents): Use 'prin1'

---
 elpa-admin.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elpa-admin.el b/elpa-admin.el
index 00c3393499..f358fe0d68 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -167,7 +167,7 @@ Delete backup files also."
                            (string-lessp (symbol-name (car x)) (symbol-name (car y))))))
     (elpaa--message "new AC: %S" ac)
     (with-temp-buffer
-      (pp ac (current-buffer))
+      (prin1 ac (current-buffer))
       (write-region nil nil filename)
       (let ((default-directory (expand-file-name dir)))
         (elpaa--html-make-index (cdr ac))))))
-- 
2.38.0


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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-22 10:52 Replace 'pp' with 'prin1' to generate ELPA archive-contents Philip Kaludercic
@ 2022-10-22 11:56 ` Stefan Kangas
  2022-10-22 13:45   ` Philip Kaludercic
  2022-10-22 15:00   ` Stefan Monnier
  0 siblings, 2 replies; 27+ messages in thread
From: Stefan Kangas @ 2022-10-22 11:56 UTC (permalink / raw)
  To: Philip Kaludercic, emacs-devel

Philip Kaludercic <philipk@posteo.net> writes:

> I've just tried replacing the 'pp' call with 'prin1' in elpa-admin's
> `elpaa-update-archive-contents', and on my checkout the size dropped
> from ~130 kb to 100 kb.  It is not much, but I don't understand why the
> archive contents should be pretty printed, and even a few kilobyte less
> can make a difference for some people.

If we care about 30kb, how adding gzip support instead?



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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-22 11:56 ` Stefan Kangas
@ 2022-10-22 13:45   ` Philip Kaludercic
  2022-10-22 15:01     ` Stefan Kangas
  2022-10-22 15:00   ` Stefan Monnier
  1 sibling, 1 reply; 27+ messages in thread
From: Philip Kaludercic @ 2022-10-22 13:45 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: emacs-devel

Stefan Kangas <stefankangas@gmail.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> I've just tried replacing the 'pp' call with 'prin1' in elpa-admin's
>> `elpaa-update-archive-contents', and on my checkout the size dropped
>> from ~130 kb to 100 kb.  It is not much, but I don't understand why the
>> archive contents should be pretty printed, and even a few kilobyte less
>> can make a difference for some people.
>
> If we care about 30kb, how adding gzip support instead?

That is a good point, I have tried out a few different compression
algorithms on the archive contents generated with `prin1', and it seems
that bz2 would give the best results -- though in the end there is just
a difference of ±2kb:

  -rw-r--r-- 1 philip philip   100950 Oct 22 12:49 archive-contents
  -rw-r--r-- 1 philip philip    23952 Oct 22 12:49 archive-contents.bz2
  -rw-r--r-- 1 philip philip    28537 Oct 22 12:49 archive-contents.gz
  -rw-r--r-- 1 philip philip    25080 Oct 22 12:49 archive-contents.xz
  -rw-r--r-- 1 philip philip    26997 Oct 22 12:49 archive-contents.zst

I don't know if it makes sense to provide all of these, in case the
client doesn't have bz2 installed or if the overhead of trying out
multiple HTTP requests would outweigh the advantage of compressing in
the first place.

Another thing I just thought of is that HTTP can serve gzip'ed content,
but unless I am mistaken the elpa.gnu.org server doesn't make use of
this capability, even though url.el appears to send the right header
(Accept-Encoding: gzip).  My guess would be that enabling this would
improve the situation immediately more than any hacking on
elpa-admin.el/package.el.



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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-22 11:56 ` Stefan Kangas
  2022-10-22 13:45   ` Philip Kaludercic
@ 2022-10-22 15:00   ` Stefan Monnier
  2022-10-22 15:05     ` Philip Kaludercic
  1 sibling, 1 reply; 27+ messages in thread
From: Stefan Monnier @ 2022-10-22 15:00 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Philip Kaludercic, emacs-devel

Stefan Kangas [2022-10-22 04:56:47] wrote:
> Philip Kaludercic <philipk@posteo.net> writes:
>> I've just tried replacing the 'pp' call with 'prin1' in elpa-admin's
>> `elpaa-update-archive-contents', and on my checkout the size dropped
>> from ~130 kb to 100 kb.  It is not much, but I don't understand why the
>> archive contents should be pretty printed, and even a few kilobyte less
>> can make a difference for some people.
> If we care about 30kb, how adding gzip support instead?

Gzippping this file and the tarballs would be a very welcome
change, yes.  The main issue is to make sure all the expected clients
can decompress those files.

IOW we need to add support for that to `package.el`.
The sooner the better.

AFAIK it's pretty easy to add support to Apache to auto-generate the
`.gz` files on the fly.  I tried setting up the server to do the
opposite (automatically serving the uncompressed version of the file
when the file name without `.gz` is requested) but couldn't get it
to work.


        Stefan




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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-22 13:45   ` Philip Kaludercic
@ 2022-10-22 15:01     ` Stefan Kangas
  2022-10-22 15:33       ` Philip Kaludercic
  0 siblings, 1 reply; 27+ messages in thread
From: Stefan Kangas @ 2022-10-22 15:01 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: emacs-devel, Stefan Monnier

Philip Kaludercic <philipk@posteo.net> writes:

> I have tried out a few different compression algorithms on the archive
> contents generated with `prin1', and it seems that bz2 would give the
> best results -- though in the end there is just a difference of ±2kb:

The main benefit of using gzip is that it's more portable, as it's
almost always installed on any given system.  Given the small file
sizes, that consideration is probably more important than the exact
compression ratio.

> Another thing I just thought of is that HTTP can serve gzip'ed
> content, but unless I am mistaken the elpa.gnu.org server doesn't make
> use of this capability, even though url.el appears to send the right
> header (Accept-Encoding: gzip).  My guess would be that enabling this
> would improve the situation immediately more than any hacking on
> elpa-admin.el/package.el.

Makes sense.  Did you check what melpa.org does about that, BTW?



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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-22 15:00   ` Stefan Monnier
@ 2022-10-22 15:05     ` Philip Kaludercic
  2022-10-25 19:28       ` Stefan Monnier
  0 siblings, 1 reply; 27+ messages in thread
From: Philip Kaludercic @ 2022-10-22 15:05 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Stefan Kangas, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Stefan Kangas [2022-10-22 04:56:47] wrote:
>> Philip Kaludercic <philipk@posteo.net> writes:
>>> I've just tried replacing the 'pp' call with 'prin1' in elpa-admin's
>>> `elpaa-update-archive-contents', and on my checkout the size dropped
>>> from ~130 kb to 100 kb.  It is not much, but I don't understand why the
>>> archive contents should be pretty printed, and even a few kilobyte less
>>> can make a difference for some people.
>> If we care about 30kb, how adding gzip support instead?
>
> Gzippping this file and the tarballs would be a very welcome
> change, yes.  The main issue is to make sure all the expected clients
> can decompress those files.
>
> IOW we need to add support for that to `package.el`.
> The sooner the better.
>
> AFAIK it's pretty easy to add support to Apache to auto-generate the
> `.gz` files on the fly.  I tried setting up the server to do the
> opposite (automatically serving the uncompressed version of the file
> when the file name without `.gz` is requested) but couldn't get it
> to work.

I am not an Apache expert, but from what I read the "SetOutputFilter
DEFLATE" directive should enable gzip compression for requests where the
client supports it.



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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-22 15:01     ` Stefan Kangas
@ 2022-10-22 15:33       ` Philip Kaludercic
  0 siblings, 0 replies; 27+ messages in thread
From: Philip Kaludercic @ 2022-10-22 15:33 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: emacs-devel, Stefan Monnier

Stefan Kangas <stefankangas@gmail.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> I have tried out a few different compression algorithms on the archive
>> contents generated with `prin1', and it seems that bz2 would give the
>> best results -- though in the end there is just a difference of ±2kb:
>
> The main benefit of using gzip is that it's more portable, as it's
> almost always installed on any given system.  Given the small file
> sizes, that consideration is probably more important than the exact
> compression ratio.

Yes, right.

>> Another thing I just thought of is that HTTP can serve gzip'ed
>> content, but unless I am mistaken the elpa.gnu.org server doesn't make
>> use of this capability, even though url.el appears to send the right
>> header (Accept-Encoding: gzip).  My guess would be that enabling this
>> would improve the situation immediately more than any hacking on
>> elpa-admin.el/package.el.
>
> Makes sense.  Did you check what melpa.org does about that, BTW?

I hadn't previously, but they appear to do so.



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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-22 15:05     ` Philip Kaludercic
@ 2022-10-25 19:28       ` Stefan Monnier
  2022-10-26  6:43         ` Philip Kaludercic
  0 siblings, 1 reply; 27+ messages in thread
From: Stefan Monnier @ 2022-10-25 19:28 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: Stefan Kangas, emacs-devel

>> AFAIK it's pretty easy to add support to Apache to auto-generate the
>> `.gz` files on the fly.  I tried setting up the server to do the
>> opposite (automatically serving the uncompressed version of the file
>> when the file name without `.gz` is requested) but couldn't get it
>> to work.
>
> I am not an Apache expert, but from what I read the "SetOutputFilter
> DEFLATE" directive should enable gzip compression for requests where the
> client supports it.

We already did that for `.tar` files (and a few others).
I have now changed the config to also apply compression to
`archive-contents` (and to the new `elpa-packages.eld`).


        Stefan




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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-25 19:28       ` Stefan Monnier
@ 2022-10-26  6:43         ` Philip Kaludercic
  2022-10-26 11:20           ` Eli Zaretskii
  2022-10-26 12:10           ` Stefan Monnier
  0 siblings, 2 replies; 27+ messages in thread
From: Philip Kaludercic @ 2022-10-26  6:43 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Stefan Kangas, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> AFAIK it's pretty easy to add support to Apache to auto-generate the
>>> `.gz` files on the fly.  I tried setting up the server to do the
>>> opposite (automatically serving the uncompressed version of the file
>>> when the file name without `.gz` is requested) but couldn't get it
>>> to work.
>>
>> I am not an Apache expert, but from what I read the "SetOutputFilter
>> DEFLATE" directive should enable gzip compression for requests where the
>> client supports it.
>
> We already did that for `.tar` files (and a few others).

Aren't the .tar files already compressed?

> I have now changed the config to also apply compression to
> `archive-contents` (and to the new `elpa-packages.eld`).

Great!



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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-26  6:43         ` Philip Kaludercic
@ 2022-10-26 11:20           ` Eli Zaretskii
  2022-10-26 11:39             ` Philip Kaludercic
  2022-10-26 12:10           ` Stefan Monnier
  1 sibling, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2022-10-26 11:20 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: monnier, stefan, emacs-devel

> From: Philip Kaludercic <philipk@posteo.net>
> Cc: Stefan Kangas <stefan@marxist.se>,  emacs-devel@gnu.org
> Date: Wed, 26 Oct 2022 06:43:20 +0000
> 
> Aren't the .tar files already compressed?

No, they are basically just a concatenation of the original files'
contents, with some headers that describe the files' names and
attributes.



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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-26 11:20           ` Eli Zaretskii
@ 2022-10-26 11:39             ` Philip Kaludercic
  0 siblings, 0 replies; 27+ messages in thread
From: Philip Kaludercic @ 2022-10-26 11:39 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: monnier, stefan, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Philip Kaludercic <philipk@posteo.net>
>> Cc: Stefan Kangas <stefan@marxist.se>,  emacs-devel@gnu.org
>> Date: Wed, 26 Oct 2022 06:43:20 +0000
>> 
>> Aren't the .tar files already compressed?
>
> No, they are basically just a concatenation of the original files'
> contents, with some headers that describe the files' names and
> attributes.

Of course, I meant to ask whether elpa.gnu.org was serving .tar.gz (or
some other format) files or just plain tarballs.  It turns out that this
is not the case, which means that the HTTP compression is not
pointless.



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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-26  6:43         ` Philip Kaludercic
  2022-10-26 11:20           ` Eli Zaretskii
@ 2022-10-26 12:10           ` Stefan Monnier
  2022-10-26 12:18             ` Eli Zaretskii
  2022-10-26 14:33             ` Stefan Kangas
  1 sibling, 2 replies; 27+ messages in thread
From: Stefan Monnier @ 2022-10-26 12:10 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: Stefan Kangas, emacs-devel

>> We already did that for `.tar` files (and a few others).
>
> Aren't the .tar files already compressed?

No, otherwise they'd be `.tar.gz`, `.tar.lz`, etc...
We don't compress them so that you can install them even from Emacsen
that don't have access to a `.gz` decompressor.

And yes, it would be nice to change this so that `elpa.gnu.org` could
store the tarballs compressed and have Apache decompress them on the
rare occasion where the client doesn't have a `.gz` decompressor.
But I couldn't figure out how to convince Apache to do that (see
https://stackoverflow.com/questions/26895894/get-apache-to-auto-decompress-a-file-but-only-if-needed
for what happened last time I tried).


        Stefan




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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-26 12:10           ` Stefan Monnier
@ 2022-10-26 12:18             ` Eli Zaretskii
  2022-10-26 14:11               ` Po Lu
  2022-10-26 14:33             ` Stefan Kangas
  1 sibling, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2022-10-26 12:18 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: philipk, stefan, emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Stefan Kangas <stefan@marxist.se>,  emacs-devel@gnu.org
> Date: Wed, 26 Oct 2022 08:10:13 -0400
> 
> And yes, it would be nice to change this so that `elpa.gnu.org` could
> store the tarballs compressed and have Apache decompress them on the
> rare occasion where the client doesn't have a `.gz` decompressor.

How about making zlib a required library for Emacs?  I think most
systems have that nowadays, and we could provide our copy of the
library as part of our sources for those who might not have it.
Several projects I regularly build already do that, AFAICT.



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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-26 12:18             ` Eli Zaretskii
@ 2022-10-26 14:11               ` Po Lu
  2022-10-26 15:02                 ` Stefan Monnier
  0 siblings, 1 reply; 27+ messages in thread
From: Po Lu @ 2022-10-26 14:11 UTC (permalink / raw)
  To: emacs-devel, Eli Zaretskii, Stefan Monnier; +Cc: philipk, stefan



On October 26, 2022 8:18:20 PM GMT+08:00, Eli Zaretskii <eliz@gnu.org> wrote:

>How about making zlib a required library for Emacs?

This would be a little drastic, but what about not supporting package installation from ELPA if zlib isn't installed?



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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-26 12:10           ` Stefan Monnier
  2022-10-26 12:18             ` Eli Zaretskii
@ 2022-10-26 14:33             ` Stefan Kangas
  2022-10-26 15:03               ` Stefan Monnier
  1 sibling, 1 reply; 27+ messages in thread
From: Stefan Kangas @ 2022-10-26 14:33 UTC (permalink / raw)
  To: Stefan Monnier, Philip Kaludercic; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> No, otherwise they'd be `.tar.gz`, `.tar.lz`, etc...
> We don't compress them so that you can install them even from Emacsen
> that don't have access to a `.gz` decompressor.

Could we provide both the .tar and .tar.gz, and leave it up to
package.el to download whichever one is supported?

Or do we have very limited disk space?



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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-26 14:11               ` Po Lu
@ 2022-10-26 15:02                 ` Stefan Monnier
  2022-10-26 15:18                   ` Robert Pluim
  2022-10-27  0:49                   ` Po Lu
  0 siblings, 2 replies; 27+ messages in thread
From: Stefan Monnier @ 2022-10-26 15:02 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel, Eli Zaretskii, philipk, stefan

Po Lu [2022-10-26 22:11:38] wrote:
> On October 26, 2022 8:18:20 PM GMT+08:00, Eli Zaretskii <eliz@gnu.org> wrote:
>>How about making zlib a required library for Emacs?
> This would be a little drastic,

zlib is ON by default, is required internally by gnutls which is also ON
by default, and is a requirement for the native compiler as well (which
is not ON by default), so it's not *that* drastic.

> but what about not supporting package installation from ELPA if zlib
> isn't installed?

Maybe if we relax this to "either compiled with zlib or can find `gzip`
in `exec-path`", it might be tolerable.


        Stefan




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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-26 14:33             ` Stefan Kangas
@ 2022-10-26 15:03               ` Stefan Monnier
  0 siblings, 0 replies; 27+ messages in thread
From: Stefan Monnier @ 2022-10-26 15:03 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Philip Kaludercic, emacs-devel

Stefan Kangas [2022-10-26 07:33:56] wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> No, otherwise they'd be `.tar.gz`, `.tar.lz`, etc...
>> We don't compress them so that you can install them even from Emacsen
>> that don't have access to a `.gz` decompressor.
> Could we provide both the .tar and .tar.gz, and leave it up to
> package.el to download whichever one is supported?

I'd rather not.

> Or do we have very limited disk space?

There's that as well.


        Stefan




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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-26 15:02                 ` Stefan Monnier
@ 2022-10-26 15:18                   ` Robert Pluim
  2022-10-26 15:25                     ` Stefan Monnier
  2022-10-27  0:49                   ` Po Lu
  1 sibling, 1 reply; 27+ messages in thread
From: Robert Pluim @ 2022-10-26 15:18 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Po Lu, emacs-devel, Eli Zaretskii, philipk, stefan

>>>>> On Wed, 26 Oct 2022 11:02:00 -0400, Stefan Monnier <monnier@iro.umontreal.ca> said:

    Stefan> Po Lu [2022-10-26 22:11:38] wrote:
    >> On October 26, 2022 8:18:20 PM GMT+08:00, Eli Zaretskii <eliz@gnu.org> wrote:
    >>> How about making zlib a required library for Emacs?
    >> This would be a little drastic,

    Stefan> zlib is ON by default, is required internally by gnutls which is also ON
    Stefan> by default, and is a requirement for the native compiler as well (which
    Stefan> is not ON by default), so it's not *that* drastic.

And letʼs not forget that the default value of `package-archives'
contains https URLs, so anyone building Emacs without GnuTLS is
already causing themselves problems with package downloads.

    >> but what about not supporting package installation from ELPA if zlib
    >> isn't installed?

    Stefan> Maybe if we relax this to "either compiled with zlib or can find `gzip`
    Stefan> in `exec-path`", it might be tolerable.

The latter would imply http downloads only for packages, which is not
something we should promote.

Robert
-- 



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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-26 15:18                   ` Robert Pluim
@ 2022-10-26 15:25                     ` Stefan Monnier
  2022-10-26 15:31                       ` Robert Pluim
  0 siblings, 1 reply; 27+ messages in thread
From: Stefan Monnier @ 2022-10-26 15:25 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Po Lu, emacs-devel, Eli Zaretskii, philipk, stefan

Robert Pluim [2022-10-26 17:18:49] wrote:

>>>>>> On Wed, 26 Oct 2022 11:02:00 -0400, Stefan Monnier <monnier@iro.umontreal.ca> said:
>
>     Stefan> Po Lu [2022-10-26 22:11:38] wrote:
>     >> On October 26, 2022 8:18:20 PM GMT+08:00, Eli Zaretskii <eliz@gnu.org> wrote:
>     >>> How about making zlib a required library for Emacs?
>     >> This would be a little drastic,
>
>     Stefan> zlib is ON by default, is required internally by gnutls which is also ON
>     Stefan> by default, and is a requirement for the native compiler as well (which
>     Stefan> is not ON by default), so it's not *that* drastic.
>
> And letʼs not forget that the default value of `package-archives'
> contains https URLs, so anyone building Emacs without GnuTLS is
> already causing themselves problems with package downloads.

Not really:

(defcustom package-archives `(("gnu" .
                               ,(format "http%s://elpa.gnu.org/packages/"
                                        (if (gnutls-available-p) "s" "")))
                              ("nongnu" .
                               ,(format "http%s://elpa.nongnu.org/nongnu/"
                                        (if (gnutls-available-p) "s" ""))))

>     Stefan> Maybe if we relax this to "either compiled with zlib or can find `gzip`
>     Stefan> in `exec-path`", it might be tolerable.
>
> The latter would imply http downloads only for packages, which is not
> something we should promote.

We're not promoting them, we're not just doing all we can to
prevent them.


        Stefan




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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-26 15:25                     ` Stefan Monnier
@ 2022-10-26 15:31                       ` Robert Pluim
  2022-10-27  0:50                         ` Po Lu
  0 siblings, 1 reply; 27+ messages in thread
From: Robert Pluim @ 2022-10-26 15:31 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Po Lu, emacs-devel, Eli Zaretskii, philipk, stefan

>>>>> On Wed, 26 Oct 2022 11:25:16 -0400, Stefan Monnier <monnier@iro.umontreal.ca> said:

    >> And letʼs not forget that the default value of `package-archives'
    >> contains https URLs, so anyone building Emacs without GnuTLS is
    >> already causing themselves problems with package downloads.

    Stefan> Not really:

    Stefan> (defcustom package-archives `(("gnu" .
    Stefan>                                ,(format "http%s://elpa.gnu.org/packages/"
    Stefan>                                         (if (gnutls-available-p) "s" "")))
    Stefan>                               ("nongnu" .
    Stefan>                                ,(format "http%s://elpa.nongnu.org/nongnu/"
    Stefan>                                         (if (gnutls-available-p) "s" ""))))

Oh, Iʼd looked at the result, not the source. But I guess itʼs kind of
a moot point, as I doubt there are any distributions that donʼt build
Emacs with GnuTLS. [1]

Robert

Footnotes:
[1]  A dozen will now be pointed out to me :-)

-- 



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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-26 15:02                 ` Stefan Monnier
  2022-10-26 15:18                   ` Robert Pluim
@ 2022-10-27  0:49                   ` Po Lu
  2022-10-27 15:17                     ` Stefan Monnier
  1 sibling, 1 reply; 27+ messages in thread
From: Po Lu @ 2022-10-27  0:49 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel, Eli Zaretskii, philipk, stefan

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> zlib is ON by default, is required internally by gnutls which is also ON
> by default, and is a requirement for the native compiler as well (which
> is not ON by default), so it's not *that* drastic.

Neither of those three features are supported on MS-DOS, along with
networking in general, so I doubt the package system works there in the
first place.



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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-26 15:31                       ` Robert Pluim
@ 2022-10-27  0:50                         ` Po Lu
  2022-10-27  8:33                           ` Robert Pluim
  0 siblings, 1 reply; 27+ messages in thread
From: Po Lu @ 2022-10-27  0:50 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Stefan Monnier, emacs-devel, Eli Zaretskii, philipk, stefan

Robert Pluim <rpluim@gmail.com> writes:

> Oh, Iʼd looked at the result, not the source. But I guess itʼs kind of
> a moot point, as I doubt there are any distributions that donʼt build
> Emacs with GnuTLS.

FWIW, the old GNU/Linux distributions (Fedora 10, 9, 7) that I use to
test backwards compatibility in the X build ship a GnuTLS that doesn't
work with modern Emacs.



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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-27  0:50                         ` Po Lu
@ 2022-10-27  8:33                           ` Robert Pluim
  2022-10-27 10:38                             ` Po Lu
  0 siblings, 1 reply; 27+ messages in thread
From: Robert Pluim @ 2022-10-27  8:33 UTC (permalink / raw)
  To: Po Lu; +Cc: Stefan Monnier, emacs-devel, Eli Zaretskii, philipk, stefan

>>>>> On Thu, 27 Oct 2022 08:50:38 +0800, Po Lu <luangruo@yahoo.com> said:

    Po Lu> Robert Pluim <rpluim@gmail.com> writes:
    >> Oh, Iʼd looked at the result, not the source. But I guess itʼs kind of
    >> a moot point, as I doubt there are any distributions that donʼt build
    >> Emacs with GnuTLS.

    Po Lu> FWIW, the old GNU/Linux distributions (Fedora 10, 9, 7) that I use to
    Po Lu> test backwards compatibility in the X build ship a GnuTLS that doesn't
    Po Lu> work with modern Emacs.

The newest of those is from 2008. I highly doubt anybody still running
such a release wants a modern Emacs.

Robert
-- 



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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-27  8:33                           ` Robert Pluim
@ 2022-10-27 10:38                             ` Po Lu
  2022-10-27 11:40                               ` Robert Pluim
  0 siblings, 1 reply; 27+ messages in thread
From: Po Lu @ 2022-10-27 10:38 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Stefan Monnier, emacs-devel, Eli Zaretskii, philipk, stefan

Robert Pluim <rpluim@gmail.com> writes:

> The newest of those is from 2008. I highly doubt anybody still running
> such a release wants a modern Emacs.

I do.



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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-27 10:38                             ` Po Lu
@ 2022-10-27 11:40                               ` Robert Pluim
  2022-10-27 11:48                                 ` Po Lu
  0 siblings, 1 reply; 27+ messages in thread
From: Robert Pluim @ 2022-10-27 11:40 UTC (permalink / raw)
  To: Po Lu; +Cc: Stefan Monnier, emacs-devel, Eli Zaretskii, philipk, stefan

>>>>> On Thu, 27 Oct 2022 18:38:23 +0800, Po Lu <luangruo@yahoo.com> said:

    Po> Robert Pluim <rpluim@gmail.com> writes:
    >> The newest of those is from 2008. I highly doubt anybody still running
    >> such a release wants a modern Emacs.

    Po> I do.

To do actual work? OK, but you know how to work around the consequences.

Robert
-- 



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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-27 11:40                               ` Robert Pluim
@ 2022-10-27 11:48                                 ` Po Lu
  0 siblings, 0 replies; 27+ messages in thread
From: Po Lu @ 2022-10-27 11:48 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Stefan Monnier, emacs-devel, Eli Zaretskii, philipk, stefan

Robert Pluim <rpluim@gmail.com> writes:

> To do actual work?

If making sure Emacs builds with old versions of X libraries counts,
yes.



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

* Re: Replace 'pp' with 'prin1' to generate ELPA archive-contents
  2022-10-27  0:49                   ` Po Lu
@ 2022-10-27 15:17                     ` Stefan Monnier
  0 siblings, 0 replies; 27+ messages in thread
From: Stefan Monnier @ 2022-10-27 15:17 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel, Eli Zaretskii, philipk, stefan

Po Lu [2022-10-27 08:49:03] wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> zlib is ON by default, is required internally by gnutls which is also ON
>> by default, and is a requirement for the native compiler as well (which
>> is not ON by default), so it's not *that* drastic.
> Neither of those three features are supported on MS-DOS, along with
> networking in general,

Good: it means that the use of zlib would have no effect on MS-DOS.

> so I doubt the package system works there in the first place.

I expect that `list-packages` doesn't work, nor does `package-install`,
but you should still be able to use `package-install-(file|from-buffer)`.


        Stefan




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

end of thread, other threads:[~2022-10-27 15:17 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-22 10:52 Replace 'pp' with 'prin1' to generate ELPA archive-contents Philip Kaludercic
2022-10-22 11:56 ` Stefan Kangas
2022-10-22 13:45   ` Philip Kaludercic
2022-10-22 15:01     ` Stefan Kangas
2022-10-22 15:33       ` Philip Kaludercic
2022-10-22 15:00   ` Stefan Monnier
2022-10-22 15:05     ` Philip Kaludercic
2022-10-25 19:28       ` Stefan Monnier
2022-10-26  6:43         ` Philip Kaludercic
2022-10-26 11:20           ` Eli Zaretskii
2022-10-26 11:39             ` Philip Kaludercic
2022-10-26 12:10           ` Stefan Monnier
2022-10-26 12:18             ` Eli Zaretskii
2022-10-26 14:11               ` Po Lu
2022-10-26 15:02                 ` Stefan Monnier
2022-10-26 15:18                   ` Robert Pluim
2022-10-26 15:25                     ` Stefan Monnier
2022-10-26 15:31                       ` Robert Pluim
2022-10-27  0:50                         ` Po Lu
2022-10-27  8:33                           ` Robert Pluim
2022-10-27 10:38                             ` Po Lu
2022-10-27 11:40                               ` Robert Pluim
2022-10-27 11:48                                 ` Po Lu
2022-10-27  0:49                   ` Po Lu
2022-10-27 15:17                     ` Stefan Monnier
2022-10-26 14:33             ` Stefan Kangas
2022-10-26 15:03               ` Stefan Monnier

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).