guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: privoxy: Fix daemon with default configurati


From: guix-commits
Subject: branch master updated: gnu: privoxy: Fix daemon with default configuration.
Date: Thu, 18 Jun 2020 03:39:53 -0400

This is an automated email from the git hooks/post-receive script.

ambrevar pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new e418c3d  gnu: privoxy: Fix daemon with default configuration.
e418c3d is described below

commit e418c3d076ec301a2deda42568035d75f5ed174d
Author: Brice Waegeneire <brice@waegenei.re>
AuthorDate: Thu Jun 18 09:37:06 2020 +0200

    gnu: privoxy: Fix daemon with default configuration.
    
    * gnu/packages/tor.scm (privoxy)[arguments]: Add --localstatedir=/var to
    configure flags.  Patch default configuration to disable logging and thus
    allowing non-root users to use it.
    
    Signed-off-by: Pierre Neidhardt <mail@ambrevar.xyz>
---
 gnu/packages/tor.scm | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm
index 2f2623b..19ab5cf 100644
--- a/gnu/packages/tor.scm
+++ b/gnu/packages/tor.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
+;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -141,8 +142,28 @@ rejects UDP traffic from the application you're using.")
        ;; $out/etc/privoxy.
        #:configure-flags (list (string-append "--sysconfdir="
                                               (assoc-ref %outputs "out")
-                                              "/etc/privoxy"))
-       #:tests? #f))
+                                              "/etc/privoxy")
+                               "--localstatedir=/var")
+       #:tests? #f                      ; no test suite
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-default-logging
+           (lambda _
+             (with-fluids ((%default-port-encoding "ISO-8859-1"))
+               ;; Do not create /var/run nor /var/log/privoxy/logfile.
+               (substitute* "GNUmakefile.in"
+                 (("(logfile \\|\\| exit )1" _ match)
+                  (string-append match "0"))
+                 (("(\\$\\(DESTDIR\\)\\$\\(SHARE_DEST\\)) \\\\" _ match)
+                  match)
+                 ((".*\\$\\(LOG_DEST\\) \\$\\(DESTDIR\\)\\$\\(PID_DEST\\).*")
+                  ""))
+               ;; Disable logging in the default configuration to allow for
+               ;; non-root users using it as is.
+               (substitute* "config"
+                 (("^logdir") "#logdir")
+                 (("^logfile") "#logfile")))
+             #t)))))
     (inputs
      `(("w3m" ,w3m)
        ("pcre" ,pcre)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]