From patchwork Fri Mar 20 10:55:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Legoll X-Patchwork-Id: 20784 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id CAED527BBEA; Fri, 20 Mar 2020 10:56:11 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 4CF2227BBE4 for ; Fri, 20 Mar 2020 10:56:11 +0000 (GMT) Received: from localhost ([::1]:50838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFFJy-0000p4-PY for patchwork@mira.cbaines.net; Fri, 20 Mar 2020 06:56:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41172) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFFJs-0000oy-J6 for guix-patches@gnu.org; Fri, 20 Mar 2020 06:56:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFFJq-0006UR-Nx for guix-patches@gnu.org; Fri, 20 Mar 2020 06:56:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38043) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jFFJq-0006TI-7T for guix-patches@gnu.org; Fri, 20 Mar 2020 06:56:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jFFJq-0008Sc-5q for guix-patches@gnu.org; Fri, 20 Mar 2020 06:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#40145] [PATCH] gnu: Add squid. Resent-From: Vincent Legoll Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 20 Mar 2020 10:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40145 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 40145@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158470173932476 (code B ref -1); Fri, 20 Mar 2020 10:56:01 +0000 Received: (at submit) by debbugs.gnu.org; 20 Mar 2020 10:55:39 +0000 Received: from localhost ([127.0.0.1]:44016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFFJT-0008Rj-9y for submit@debbugs.gnu.org; Fri, 20 Mar 2020 06:55:39 -0400 Received: from lists.gnu.org ([209.51.188.17]:57629) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFFJS-0008Rb-Ah for submit@debbugs.gnu.org; Fri, 20 Mar 2020 06:55:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41027) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFFJQ-0000lI-LP for guix-patches@gnu.org; Fri, 20 Mar 2020 06:55:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFFJP-0005ty-8T for guix-patches@gnu.org; Fri, 20 Mar 2020 06:55:36 -0400 Received: from mail-io1-xd41.google.com ([2607:f8b0:4864:20::d41]:39385) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jFFJO-0005tY-Vn for guix-patches@gnu.org; Fri, 20 Mar 2020 06:55:35 -0400 Received: by mail-io1-xd41.google.com with SMTP id c19so5468411ioo.6 for ; Fri, 20 Mar 2020 03:55:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=PUlgllXK5jTNqTeHutn89kz74ftM+5n6tB+0183/Yiw=; b=os0JDOxhd/MDsyxy3QnkMvt6gQY+5t2iDW4NCejGBnDl9dmh4XjNIlojbO+/Vvs9ia M7UXvgQF1M8zfS+qH8ul4f+nsws0waULgOFIwD4kuFktq4rsjEWKjcd9oYwsIwGCHO7F vxV6vNR4y4/r3HLs873l+DMw+/Tr5+4rn2MGXedu2gqChzeue7p0NyHQUktDA7IsyJtB +Q1DOZYu5xNj2ZP5Fr8HkFVMcdGhDhtp9Ec9ZxZ98RftvSAHG0eUux2Bv/1baF4ahswK Jkcndd3vN2U6BIw91WjivuUdFr0hUvpfVz4DcWAsjneHCnaih23s1DW7NJQOOFbnk+el Di6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=PUlgllXK5jTNqTeHutn89kz74ftM+5n6tB+0183/Yiw=; b=Cf4YWmRL7/2+997SMeS1kM0oLGiGVcHl1oWOmqofTyiqG0x+kX5AgxwJQsb5F+Fke1 6rL4BX7SWHzDyRq7BoxDX9wIAuw81aGSSQl8HDkuUWEXjfA8duoYKqWs7KCl9vJjIJkQ XM29rscxJhpsdIRItAwTOPSnyoS3+UoZawrghSWgUna1SZURTzKbZajEX8TV8KsF1q7T geI2KxpcIhBV5UqfYJeekBOJBxZBOlQXVjjDImKCuRO8jwNkquStU6cmzUBr6QCw1LRj TwtlZZqowVNBJp3n0ZetkUAH7wA5V4BJQv7IGzJARQz6JOFiK6QelW7jBdf/pXV+v/x+ VtFg== X-Gm-Message-State: ANhLgQ3pZtgFJW3b0MgcwV1qoVMUQBTp/o97IOmkyoqKiORkvKhWK+cH AIORCSMFUC0I5JgROslr6bS7REf1wTWfbjR9oGEEPg== X-Google-Smtp-Source: ADFU+vugdFxXWXn9sOs5tveDMvkvJI+C/Jqo+A10NFG0r2MNOBDz8JlxnGDjwJESZ279MfOFQwPXScsKyuEF01el0eI= X-Received: by 2002:a5d:8d90:: with SMTP id b16mr6870190ioj.9.1584701733547; Fri, 20 Mar 2020 03:55:33 -0700 (PDT) MIME-Version: 1.0 From: Vincent Legoll Date: Fri, 20 Mar 2020 11:55:22 +0100 Message-ID: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches The attached patch adds squid caching proxy so that we can all start saving precious network bandwidth. I lightly tested it with the attached squid config file, in foreground mode, like the following: # Create temporary test space for squid mkdir /tmp/squid # Create the hashed store directories /gnu/store/szbiglrkvll6qdxcrg3ir0hz8zdc9h5f-squid-4.10/sbin/squid -N -f ./squid.conf -z # Run squid /gnu/store/szbiglrkvll6qdxcrg3ir0hz8zdc9h5f-squid-4.10/sbin/squid -N -f ./squid.conf # In another shell export http_proxy=localhost:3128 export https_proxy=localhost:3128 time wget google.fr time wget google.fr less /tmp/squid/access.log less /tmp/squid/cache.log ls -lah /tmp/squid/00/00 There's no shepherd ready to run service & config definitions, as I still don't know how to do that. I'll try to create one, if no one beats me to it, but it may already be useful as-is... From 24a81038d315a4bf757eca590c53a16eac005879 Mon Sep 17 00:00:00 2001 From: Vincent Legoll Date: Fri, 20 Mar 2020 11:45:11 +0100 Subject: [PATCH] gnu: Add squid. * gnu/packages/networking.scm (squid): New variable. --- gnu/packages/networking.scm | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index e9abac2991..6a6e836261 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -80,8 +80,10 @@ #:use-module (gnu packages code) #:use-module (gnu packages compression) #:use-module (gnu packages cpp) +; #:use-module (gnu packages cppunit) #:use-module (gnu packages crypto) #:use-module (gnu packages curl) + #:use-module (gnu packages cyrus-sasl) #:use-module (gnu packages dejagnu) #:use-module (gnu packages documentation) #:use-module (gnu packages flex) @@ -98,6 +100,7 @@ #:use-module (gnu packages kerberos) #:use-module (gnu packages ncurses) #:use-module (gnu packages nettle) + #:use-module (gnu packages openldap) #:use-module (gnu packages password-utils) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) @@ -862,6 +865,48 @@ prints timing information for each step of the HTTP request (DNS lookup, TCP connection, TLS handshake and so on) in the terminal.") (license license:expat))) +(define-public squid + (package + (name "squid") + (version "4.10") + (source + (origin + (method url-fetch) + (uri (string-append "http://www.squid-cache.org/Versions/v4/squid-" + version ".tar.xz")) + (sha256 + (base32 "07sz0adv8nkhy797675bpra7lvdkwjq9isw1ddgylhlazl511w4q")))) + (build-system gnu-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-before 'build 'fix-true-path + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "test-suite/testheaders.sh" + (("/bin/true") + (string-append (assoc-ref inputs "coreutils") + "/bin/true"))) + #t))))) + (inputs + `(("perl" ,perl) + ("openldap" ,openldap) + ("linux-pam" ,linux-pam) + ("libcap" ,libcap) + ("cyrus-sasl" ,cyrus-sasl) + ("expat" ,expat) + ("libxml2" ,libxml2) + ("openssl" ,openssl))) + (native-inputs + `(("cppunit" ,cppunit) + ("coreutils" ,coreutils) ; test suite needs /bin/true + ("pkg-config" ,pkg-config))) + (synopsis "A web caching proxy supporting HTTP, HTTPS, FTP, etc.") + (description "Squid is a caching proxy for the Web supporting HTTP, HTTPS, +FTP, and more. It reduces bandwidth and improves response times by caching and +reusing frequently-requested web pages.") + (home-page "http://www.squid-cache.org/") + (license license:gpl2))) + (define-public bwm-ng (package (name "bwm-ng") -- 2.25.1