From patchwork Sun May 15 22:02:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thiago Jung Bauermann X-Patchwork-Id: 39411 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 BC09827BBEA; Sun, 15 May 2022 23:04:49 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3107D27BBE9 for ; Sun, 15 May 2022 23:04:49 +0100 (BST) Received: from localhost ([::1]:50794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nqMM3-0006du-4m for patchwork@mira.cbaines.net; Sun, 15 May 2022 18:04:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqMLK-0006cQ-3d for guix-patches@gnu.org; Sun, 15 May 2022 18:04:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57042) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nqMLJ-0008I6-QP for guix-patches@gnu.org; Sun, 15 May 2022 18:04:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nqMLJ-0007gC-Ln for guix-patches@gnu.org; Sun, 15 May 2022 18:04:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55436] [PATCH 1/3] gnu: public-inbox: Some packaging fixes References: <20220515215420.503806-1-bauermann@kolabnow.com> In-Reply-To: <20220515215420.503806-1-bauermann@kolabnow.com> Resent-From: Thiago Jung Bauermann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 15 May 2022 22:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55436 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55436@debbugs.gnu.org Cc: Thiago Jung Bauermann Received: via spool by 55436-submit@debbugs.gnu.org id=B55436.165265219329445 (code B ref 55436); Sun, 15 May 2022 22:04:01 +0000 Received: (at 55436) by debbugs.gnu.org; 15 May 2022 22:03:13 +0000 Received: from localhost ([127.0.0.1]:50933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqMKM-0007eQ-21 for submit@debbugs.gnu.org; Sun, 15 May 2022 18:03:13 -0400 Received: from mx.kolabnow.com ([212.103.80.153]:64944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqMKJ-0007e1-SQ for 55436@debbugs.gnu.org; Sun, 15 May 2022 18:03:00 -0400 Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id B300C40EBA for <55436@debbugs.gnu.org>; Mon, 16 May 2022 00:02:53 +0200 (CEST) Authentication-Results: ext-mx-out003.mykolab.com (amavisd-new); dkim=pass (4096-bit key) reason="pass (just generated, assumed good)" header.d=kolabnow.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :message-id:date:date:subject:subject:from:from:received :received:received; s=dkim20160331; t=1652652168; x=1654466569; bh=SkieCuHggSvdszLlRYheIAuEgFGtuELiK9GVk8HDBjs=; b=Wb8rcmM7oy0S tFmDWzii2GJvvJtvgjaE8jgFeNVtOBzayCHbBm0rUOMwc4XQj5sCSu1U9oxGRAcc 3VmroIYTY6e7cBgRcX1JcmX3nfEjdvBWY/BiKxpb+2cqxDVBZ2Df57ok0i/WHwCi qSZAMzUSCwjnIrmkumYPci4LOXRtt44s0syxNyQSFHP/CgfzNjWTT0RBcskANzVy b1D8F9hRlkJGYPqGhYo6onMjrNF4MIYtNZTfAQnv6mHxQYLvmpV87dNT3CrAFcC2 9NPx8wq6tUxNW7dpccYmM/4ijtIdCQNLygnoduzmv4YcERzvpNmwxEq7poTl9ko1 R5mN5urCnSSLgdQY4eEWluQZ5Ap+8HmCfNn6MWdXDSqLP+buoIR3LpENEYZjhvFC EH1nHXTHQmOjQFZCHL/J1pQjr7w4ojflrJ0s1Ru/gHEXjI6OvId/aj8lIBls/vmj LWhtVrYHx7IVRaixU/cPWOKJTMAo8FzN0ONWGsUR8eHNd1yXEEzGsULgpcUnORmw 3OtXiY1zRRIuDPr/u0PBTkvRFA0sPOYpR1mRV6zWWy6BoQtCSFf8YWr0Ppf/qgEo XxBT6ai8k4wgvRZUlm+rIYCGTZ5ahSHyOSz+p6HtCGv4rUruDIt112+HekEoNrzz ue9j8oIECaAhzxP6h7RZCIVqzi87raw= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out003.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QTCGbl1d9Mrc for <55436@debbugs.gnu.org>; Mon, 16 May 2022 00:02:48 +0200 (CEST) Received: from int-mx003.mykolab.com (unknown [10.9.13.3]) by mx.kolabnow.com (Postfix) with ESMTPS id 8761940DC5 for <55436@debbugs.gnu.org>; Mon, 16 May 2022 00:02:47 +0200 (CEST) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx003.mykolab.com (Postfix) with ESMTPS id A51262448; Mon, 16 May 2022 00:02:46 +0200 (CEST) Date: Sun, 15 May 2022 19:02:28 -0300 Message-Id: <20220515220230.504057-1-bauermann@kolabnow.com> MIME-Version: 1.0 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: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Thiago Jung Bauermann X-ACL-Warn: , Thiago Jung Bauermann via Guix-patches X-Patchwork-Original-From: Thiago Jung Bauermann via Guix-patches via From: Thiago Jung Bauermann X-getmail-retrieved-from-mailbox: Patches The file ‘script/public-inbox-compact’ doesn't call ‘xapian-compact’ directly anymore, so the substitution in the ‘qualify-paths’ phase doesn't do anything. Now there's a reference to ‘xapian-compact’ in ‘lib/PublicInbox/Xapcmd.pm’, so substitute the path there. And move xapian from native-inputs to inputs and use its input path in the substitution, since ‘xapian-compact’ is called during normal execution of public-inbox. Also add ‘bash-minimal’ to the package's inputs, since it uses ‘wrap-program’. Finally, take the opportunity to change build phases to not return #t unconditionally, since that isn't necessary anymore. * gnu/packages/mail.scm (public-inbox)[arguments]<#:phases>: Don't return #t from each phase. {qualify-paths}: Substitute ‘xapian-compact’ path in the correct file. Use ‘search-input-file’ rather than ‘which’ to find it. [native-inputs]: Move ‘xapian’ from here ... [inputs]: ... to here. Add ‘bash-minimal’. --- gnu/packages/mail.scm | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index c4ccc53e84ef..0728d65d1d10 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -47,6 +47,7 @@ ;;; Copyright © 2021 Philip McGrath ;;; Copyright © 2022 Andrew Tropin ;;; Copyright © 2022 Justin Veilleux +;;; Copyright © 2022 Thiago Jung Bauermann ;;; ;;; This file is part of GNU Guix. ;;; @@ -4101,12 +4102,12 @@ (define-public public-inbox '(#:phases (modify-phases %standard-phases (add-before 'configure 'qualify-paths - (lambda _ + (lambda* (#:key inputs #:allow-other-keys) ;; Use absolute paths for 'xapian-compact'. - (let ((xapian-compact (which "xapian-compact"))) - (substitute* "script/public-inbox-compact" - (("xapian-compact") xapian-compact))) - #t)) + (substitute* "lib/PublicInbox/Xapcmd.pm" + (("'xapian-compact'") + (format #f "'~a'" (search-input-file inputs + "/bin/xapian-compact")))))) (add-before 'check 'pre-check (lambda _ (substitute* "t/spawn.t" @@ -4117,8 +4118,7 @@ (define-public public-inbox ;; XXX: This test fails due to zombie process is not reaped by ;; the builder. (substitute* "t/httpd-unix.t" - (("^SKIP: \\{") "SKIP: { skip('Guix');")) - #t)) + (("^SKIP: \\{") "SKIP: { skip('Guix');")))) (add-after 'install 'wrap-programs (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) @@ -4133,14 +4133,13 @@ (define-public public-inbox ;; perl module. `("PATH" ":" prefix (,(dirname (search-input-file inputs "/bin/git")))))) - (find-files (string-append out "/bin")))) - #t))))) + (find-files (string-append out "/bin"))))))))) (native-inputs - (list xapian - ;; For testing. + (list ;; For testing. lsof openssl)) (inputs - (list git + (list bash-minimal + git perl-dbd-sqlite perl-dbi perl-email-address-xs @@ -4162,7 +4161,8 @@ (define-public public-inbox ;; ("highlight" ,highlight) ;; For testing. perl-ipc-run - perl-xml-feed)) + perl-xml-feed + xapian)) (home-page "https://public-inbox.org/README.html") (synopsis "Archive mailing lists in Git repositories") (description