GNU bug report logs - #53213
[PATCH] daemon: Always default to gzip for log compression.

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Wed, 12 Jan 2022 17:22:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53213 in the body.
You can then email your comments to 53213 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#53213; Package guix-patches. (Wed, 12 Jan 2022 17:22:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ludovic Courtès <ludo <at> gnu.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 12 Jan 2022 17:22:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: guix-patches <at> gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH] daemon: Always default to gzip for log compression.
Date: Wed, 12 Jan 2022 18:21:18 +0100
* nix/libstore/globals.cc (Settings::Settings): Have 'logCompression'
default to COMPRESSION_GZIP unconditionally.
* gnu/services/base.scm (<guix-configuration>)[log-compression]: Default
to 'gzip.
* doc/guix.texi (Invoking guix-daemon, Base Services): Adjust accordingly.
---
 doc/guix.texi           | 4 ++--
 gnu/services/base.scm   | 2 +-
 nix/libstore/globals.cc | 4 ----
 3 files changed, 3 insertions(+), 7 deletions(-)

Hello!

I think bzip2 compression of the build logs doesn’t buy us much, it
doesn’t play well with ‘guix publish’, and bzip2 is generally rather
uncommon these days—hence this patch.

Thoughts?

Ludo’.

diff --git a/doc/guix.texi b/doc/guix.texi
index 876172fa3a..084d3c92fe 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -1690,7 +1690,7 @@ Compress build logs according to @var{type}, one of @code{gzip},
 
 Unless @option{--lose-logs} is used, all the build logs are kept in the
 @var{localstatedir}.  To save space, the daemon automatically compresses
-them with Bzip2 by default.
+them with gzip by default.
 
 @item --discover[=yes|no]
 Whether to discover substitute servers on the local network using mDNS
@@ -16608,7 +16608,7 @@ The number of seconds of silence and the number of seconds of activity,
 respectively, after which a build process times out.  A value of zero
 disables the timeout.
 
-@item @code{log-compression} (default: @code{'bzip2})
+@item @code{log-compression} (default: @code{'gzip})
 The type of compression used for build logs---one of @code{gzip},
 @code{bzip2}, or @code{none}.
 
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index e46bb591a9..71e2baf959 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1565,7 +1565,7 @@ (define-record-type* <guix-configuration>
   (timeout          guix-configuration-timeout    ;integer
                     (default 0))
   (log-compression  guix-configuration-log-compression
-                    (default 'bzip2))
+                    (default 'gzip))
   (discover?        guix-configuration-discover?
                     (default #f))
   (extra-options    guix-configuration-extra-options ;list of strings
diff --git a/nix/libstore/globals.cc b/nix/libstore/globals.cc
index 0cc001fbe4..d4f9a46a74 100644
--- a/nix/libstore/globals.cc
+++ b/nix/libstore/globals.cc
@@ -45,11 +45,7 @@ Settings::Settings()
     useChroot = false;
     impersonateLinux26 = false;
     keepLog = true;
-#if HAVE_BZLIB_H
-    logCompression = COMPRESSION_BZIP2;
-#else
     logCompression = COMPRESSION_GZIP;
-#endif
     maxLogSize = 0;
     cacheFailure = false;
     pollInterval = 5;

base-commit: cd68fc1e42f3f233ba5ccfd1323e46509a970d6b
-- 
2.33.0





Information forwarded to guix-patches <at> gnu.org:
bug#53213; Package guix-patches. (Fri, 14 Jan 2022 02:39:01 GMT) Full text and rfc822 format available.

Message #8 received at 53213 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 53213 <at> debbugs.gnu.org
Subject: Re: bug#53213: [PATCH] daemon: Always default to gzip for log
 compression.
Date: Thu, 13 Jan 2022 21:37:55 -0500
Hi Ludo,

Ludovic Courtès <ludo <at> gnu.org> writes:

> * nix/libstore/globals.cc (Settings::Settings): Have 'logCompression'
> default to COMPRESSION_GZIP unconditionally.
> * gnu/services/base.scm (<guix-configuration>)[log-compression]: Default
> to 'gzip.
> * doc/guix.texi (Invoking guix-daemon, Base Services): Adjust accordingly.
> ---
>  doc/guix.texi           | 4 ++--
>  gnu/services/base.scm   | 2 +-
>  nix/libstore/globals.cc | 4 ----
>  3 files changed, 3 insertions(+), 7 deletions(-)
>
> Hello!
>
> I think bzip2 compression of the build logs doesn’t buy us much, it
> doesn’t play well with ‘guix publish’, and bzip2 is generally rather
> uncommon these days—hence this patch.
>
> Thoughts?
>
> Ludo’.

I haven't tried it, but the idea and code LGTM.

Thanks!

Maxim




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Tue, 18 Jan 2022 17:54:02 GMT) Full text and rfc822 format available.

Notification sent to Ludovic Courtès <ludo <at> gnu.org>:
bug acknowledged by developer. (Tue, 18 Jan 2022 17:54:02 GMT) Full text and rfc822 format available.

Message #13 received at 53213-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 53213-done <at> debbugs.gnu.org
Subject: Re: bug#53213: [PATCH] daemon: Always default to gzip for log
 compression.
Date: Tue, 18 Jan 2022 18:53:05 +0100
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:

> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>> * nix/libstore/globals.cc (Settings::Settings): Have 'logCompression'
>> default to COMPRESSION_GZIP unconditionally.
>> * gnu/services/base.scm (<guix-configuration>)[log-compression]: Default
>> to 'gzip.
>> * doc/guix.texi (Invoking guix-daemon, Base Services): Adjust accordingly.
>> ---
>>  doc/guix.texi           | 4 ++--
>>  gnu/services/base.scm   | 2 +-
>>  nix/libstore/globals.cc | 4 ----
>>  3 files changed, 3 insertions(+), 7 deletions(-)
>>
>> Hello!
>>
>> I think bzip2 compression of the build logs doesn’t buy us much, it
>> doesn’t play well with ‘guix publish’, and bzip2 is generally rather
>> uncommon these days—hence this patch.
>>
>> Thoughts?
>>
>> Ludo’.
>
> I haven't tried it, but the idea and code LGTM.

Pushed in 575e52ac2b090fd194086e9c1c53bbf8055acbc2, thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 16 Feb 2022 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 63 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.