From: Brice Waegeneire <brice@waegenei.re>
To: Pierre Neidhardt <mail@ambrevar.xyz>
Cc: 32934@debbugs.gnu.org
Subject: bug#32934: [PATCH] gnu: privoxy: Fix default logging configuration.
Date: Mon, 15 Jun 2020 11:41:22 +0200 [thread overview]
Message-ID: <20200615094122.5629-1-brice@waegenei.re> (raw)
In-Reply-To: <87d0spmqdo.fsf@ambrevar.xyz>
Fixes <https://issues.guix.info/32934>.
* gnu/packages/tor.scm (privoxy)[arguments]<configure-flags>: Add
'localstatedir'.
<phases>: Add 'patch-default-logging'.
---
Hello Pierre,
This patch should allow one to use privoxy's default configuration as is:
--8<---------------cut here---------------start------------->8---
$ /gnu/store/1705l8br2bc4lvs7wf7mpzj4ss0zkl9c-privoxy-3.0.28/sbin/privoxy /gnu/store/1705l8br2bc4lvs7wf7mpzj4ss0zkl9c-privoxy-3.0.28/etc/privoxy/config
$ echo $?
0
--8<---------------cut here---------------end--------------->8---
- Brice
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 2f2623b0e6..19ab5cf374 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)
--
2.26.2
next prev parent reply other threads:[~2020-06-15 9:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-04 20:02 bug#32934: privoxy daemon fails to start Pierre Neidhardt
2020-06-15 9:41 ` Brice Waegeneire [this message]
2020-06-18 7:40 ` bug#32934: [PATCH] gnu: privoxy: Fix default logging configuration Pierre Neidhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200615094122.5629-1-brice@waegenei.re \
--to=brice@waegenei.re \
--cc=32934@debbugs.gnu.org \
--cc=mail@ambrevar.xyz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).