From mboxrd@z Thu Jan 1 00:00:00 1970 From: "pelzflorian (Florian Pelz)" Subject: Re: Mailman packaging (was: Re: Python package naming: Dots vs hyphens) Date: Wed, 13 Nov 2019 22:16:55 +0000 Message-ID: <20191113221655.lihjxm5xafmstfps@florianbeaglebone.fritz.box> References: <20191106064955.rks6qsypuym6v6pt@pelzflorian.localdomain> <20191106071917.GJ14453@E5400> <20191106131833.5a2p7glowry2dhpk@pelzflorian.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="oarueo5tlsqy6rby" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:36874) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iV0wj-0003s0-9I for guix-devel@gnu.org; Wed, 13 Nov 2019 17:17:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iV0wh-0004C4-PB for guix-devel@gnu.org; Wed, 13 Nov 2019 17:17:05 -0500 Received: from pelzflorian.de ([5.45.111.108]:41384 helo=mail.pelzflorian.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iV0wh-00048N-7g for guix-devel@gnu.org; Wed, 13 Nov 2019 17:17:03 -0500 Content-Disposition: inline In-Reply-To: <20191106131833.5a2p7glowry2dhpk@pelzflorian.localdomain> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Efraim Flashner Cc: guix-devel@gnu.org, pjotr2019@thebird.nl --oarueo5tlsqy6rby Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello Efraim! I need the attached patch to be able to run `mailman start`, `mailman info` etc. I will continue to set up mailman on a server of mine and then report back. Regards, Florian --oarueo5tlsqy6rby Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-gn-mailman-Patch-configuration-to-refer-to-the-right.patch" >From 9945d2203362851fb24a829f2a27eead0273ffdc Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Sun, 10 Nov 2019 11:38:16 +0100 Subject: [PATCH] gn: mailman: Patch configuration to refer to the right binaries. * gn/packages/mailman.scm (mailman): Patch schema.cfg. --- gn/packages/mailman.scm | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/gn/packages/mailman.scm b/gn/packages/mailman.scm index 6fd6291..359fdf6 100644 --- a/gn/packages/mailman.scm +++ b/gn/packages/mailman.scm @@ -16,7 +16,8 @@ #:use-module (gnu packages python-xyz) #:use-module (gnu packages python-web) #:use-module (gnu packages time) - #:use-module (gnu packages tls)) + #:use-module (gnu packages tls) + #:use-module (gnu packages web-browsers)) (define-public mailman (package @@ -30,6 +31,32 @@ (base32 "1qph9i93ndahfxi3bb2sd0kjm2c0pkh844ai6zacfmvihl1k3pvy")))) (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-config + (lambda* (#:key outputs inputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (lynx (assoc-ref inputs "lynx"))) + (substitute* "src/mailman/config/schema.cfg" + (("bin_dir:.*") (string-append "bin_dir: " out "/bin\n")) + (("html_to_plain_text_command:.*") + (string-append "html_to_plain_text_command:" lynx "/bin/lynx" + " -dump $filename\n"))) + #t))) + (add-after 'wrap 'restore-helper-progs + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + ;; Mailman calls os.execle on these, which retains + ;; PYTHONPATH anyway and fails with wrappers. + (rename-file (string-append bin "/.master-real") + (string-append bin "/master")) + (rename-file (string-append bin "/.runner-real") + (string-append bin "/runner")) + #t)))))) + (inputs + `(("lynx" ,lynx))) (propagated-inputs `(("python-aiosmtpd" ,python-aiosmtpd) ("python-alembic" ,python-alembic) -- 2.21.0 --oarueo5tlsqy6rby--