From 29a686688674dc875775305312513405fa396a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 5 Jan 2018 17:15:41 +0100 Subject: daemon: Add gzip log compression. * nix/nix-daemon/guix-daemon.cc (GUIX_OPT_LOG_COMPRESSION): New macro. (options): Mark "disable-log-compression" as hidden and add "log-compression". (parse_opt): Handle GUIX_OPT_LOG_COMPRESSION. * nix/libstore/build.cc (DerivationGoal): Add 'gzLogFile'. (openLogFile): Initialize it when 'logCompression' is COMPRESSION_GZIP. (closeLogFile, handleChildOutput): Honor 'gzLogFile'. * nix/libstore/globals.hh (Settings)[compressLog]: Remove. [logCompression]: New field. (CompressionType): New enum. * nix/libstore/globals.cc (Settings::Settings): Initialize it. (update): Remove '_get' call for 'compressLog'. * nix/local.mk (guix_daemon_LDADD, guix_register_LDADD): Add -lz. * guix/store.scm (log-file): Handle '.gz' log files. * tests/guix-daemon.sh: Add test with '--log-compression=gzip'. * doc/guix.texi (Invoking guix-daemon): Adjust accordingly. * config-daemon.ac: Check for libz and zlib.h. --- nix/local.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nix/local.mk') diff --git a/nix/local.mk b/nix/local.mk index 9e0c457bec..d802da6170 100644 --- a/nix/local.mk +++ b/nix/local.mk @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès +# Copyright © 2012, 2013, 2014, 2015, 2016, 2018 Ludovic Courtès # Copyright © 2016 Mathieu Lirzin # # This file is part of GNU Guix. @@ -132,7 +132,7 @@ guix_daemon_CPPFLAGS = \ -I$(top_srcdir)/%D%/libstore guix_daemon_LDADD = \ - libstore.a libutil.a libformat.a -lbz2 \ + libstore.a libutil.a libformat.a -lz -lbz2 \ $(SQLITE3_LIBS) $(LIBGCRYPT_LIBS) guix_daemon_headers = \ @@ -149,7 +149,7 @@ guix_register_CPPFLAGS = \ # XXX: Should we start using shared libs? guix_register_LDADD = \ - libstore.a libutil.a libformat.a -lbz2 \ + libstore.a libutil.a libformat.a -lz -lbz2 \ $(SQLITE3_LIBS) $(LIBGCRYPT_LIBS) -- cgit v1.2.3