From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qIldIJj1+2O3PgAAbAwnHQ (envelope-from ) for ; Mon, 27 Feb 2023 01:13:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id eMFVIJj1+2OHQgAA9RJhRA (envelope-from ) for ; Mon, 27 Feb 2023 01:13:12 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4ECF59088 for ; Mon, 27 Feb 2023 01:13:12 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677456792; a=rsa-sha256; cv=none; b=sbOgc2fg7LCAuYEh+YlGiVGTajq+OvxOMqfmFEcpqNILNCgDx9L1pzo5CJ9VDOwkHQATub EQk2VI0ZUI454XlBBJYzefgXVrM3UgZx0QJbAEWV17At5u1yJ4cS5zaVCXlDyr2gDMNaRp RMDd49AmFMx4mSrEP7jd9J3/TxWMaWNjR+S/GmqpF/+QsrDoD4V2sk/4LN2rQRcKJtN3JN wiLnHNx/QF8XmGrxIWat3mENrhYgLmKUYkSAEIxmnk7ydfq0f7oSwS8BCDgIzT+ROnRCOD 2uQs7TXrJ4ItlRZiQG9fVtXyh/GEhUkWAddh/CyBWgYWrsn6GkuZZ+b+3kMywA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677456792; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=v3LnjdIKgMyQTjKSx1aKjF1T265v36g/f5kXlJQ80ys=; b=P72+3+iNV7ERX2okYvDpxVlLeFUPSPMKT9RJShHaIqzSGNUkpKWfp3R2HEXMKVycyC8kSF 42lAYJ2p7qEeG1fjHFd4doyKAZ7XMTYFf7ZyLx4r+64svutKUvg4zkUOnIswTTq14jNWaE eKAO92xhmwD89DgPgPba5y2V1Sc0xxvzBSsNQXDWUcCJz/5N8pfugpBw6kXFfuMB8Pqc0f sbQZNcAyrjFGcAIlg4oi+Q0fBSKggSyFZKAkhzYNuNphFlIXgPhdPoqTbeP38qIs5BM9CT qCQ0bqKeAFUmFQbf0KHr6YX3LAyXflNnqJ5r2PK7hVAHgNQlMpTFRk04bLUmnQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWR8h-0001IW-Ah; Sun, 26 Feb 2023 19:13:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWR8d-0001Go-HW for guix-patches@gnu.org; Sun, 26 Feb 2023 19:13:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWR8a-0007ce-Su for guix-patches@gnu.org; Sun, 26 Feb 2023 19:13:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pWR8a-0005XE-Nf for guix-patches@gnu.org; Sun, 26 Feb 2023 19:13:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61829] [PATCH 07/11] services: guix-publish: Remove 'compression-level' field. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 27 Feb 2023 00:13:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61829 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61829@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61829-submit@debbugs.gnu.org id=B61829.167745673121172 (code B ref 61829); Mon, 27 Feb 2023 00:13:04 +0000 Received: (at 61829) by debbugs.gnu.org; 27 Feb 2023 00:12:11 +0000 Received: from localhost ([127.0.0.1]:45320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pWR7j-0005VL-5h for submit@debbugs.gnu.org; Sun, 26 Feb 2023 19:12:11 -0500 Received: from smtpm4.myservices.hosting ([185.26.105.235]:56126) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pWR7a-0005TP-G0 for 61829@debbugs.gnu.org; Sun, 26 Feb 2023 19:12:02 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm4.myservices.hosting (Postfix) with ESMTP id 3165C20D51 for <61829@debbugs.gnu.org>; Mon, 27 Feb 2023 01:11:54 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id DCEC98009A; Mon, 27 Feb 2023 01:11:54 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id QA1hrEoCZHdQ; Mon, 27 Feb 2023 01:11:53 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 7D16C80097; Mon, 27 Feb 2023 01:11:51 +0100 (CET) From: Bruno Victal Date: Mon, 27 Feb 2023 00:11:40 +0000 Message-Id: <014d8b0f1dc3cc1e9b05987bc71b4835e72e4a57.1677456515.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: X-Migadu-Queue-Id: 4ECF59088 X-Spam-Score: -1.99 X-Migadu-Spam-Score: -1.99 X-Migadu-Scanner: scn0.migadu.com List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-TUID: gx2Aw55Kfoi3 * gnu/services/base.scm ()[compression-level]: Remove field. (guix-publish-configuration-compression-level): Remove procedure. (default-compression): Remove compression-level helper code. --- gnu/services/base.scm | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 483a4ccd05..8d72ff900b 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -222,7 +222,6 @@ (define-module (gnu services base) guix-publish-configuration-port guix-publish-configuration-host guix-publish-configuration-compression - guix-publish-configuration-compression-level ;deprecated guix-publish-configuration-nar-path guix-publish-configuration-cache guix-publish-configuration-ttl @@ -1953,10 +1952,7 @@ (define-record-type* (default #f)) (compression guix-publish-configuration-compression (thunked) - (default (default-compression this-record - (current-source-location)))) - (compression-level %guix-publish-configuration-compression-level ;deprecated - (default #f)) + (default (default-compression this-record))) (nar-path guix-publish-configuration-nar-path ;string (default "nar")) (cache guix-publish-configuration-cache ;#f | string @@ -1970,25 +1966,14 @@ (define-record-type* (negative-ttl guix-publish-configuration-negative-ttl ;#f | integer (default #f))) -(define-deprecated (guix-publish-configuration-compression-level config) - "Return a compression level, the old way." - (match (guix-publish-configuration-compression config) - (((_ level) _ ...) level))) - -(define (default-compression config properties) +(define (default-compression config) "Return the default 'guix publish' compression according to CONFIG, and raise a deprecation warning if the 'compression-level' field was used." - (match (%guix-publish-configuration-compression-level config) - (#f - ;; Default to low compression levels when there's no cache so that users - ;; get good bandwidth by default. - (if (guix-publish-configuration-cache config) - '(("gzip" 5) ("zstd" 19)) - '(("gzip" 3) ("zstd" 3)))) ;zstd compresses faster - (level - (warn-about-deprecation 'compression-level properties - #:replacement 'compression) - `(("gzip" ,level))))) + ;; Default to low compression levels when there's no cache so that users + ;; get good bandwidth by default. + (if (guix-publish-configuration-cache config) + '(("gzip" 5) ("zstd" 19)) + '(("gzip" 3) ("zstd" 3)))) ;zstd compresses faster (define (guix-publish-shepherd-service config) (define (config->compression-options config) -- 2.39.1