From patchwork Tue Jul 23 17:59:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Tournier X-Patchwork-Id: 66473 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 8C20D27BBEA; Tue, 23 Jul 2024 19:01:32 +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_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=ham 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 B4B3627BBE2 for ; Tue, 23 Jul 2024 19:01:31 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWJp0-000807-EE; Tue, 23 Jul 2024 14:01:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sWJor-0007vH-M5 for guix-patches@gnu.org; Tue, 23 Jul 2024 14:01:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sWJor-0008F3-Dq for guix-patches@gnu.org; Tue, 23 Jul 2024 14:01:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sWJos-0008LD-Cp; Tue, 23 Jul 2024 14:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66704] [PATCH v2] gnu: patman: Wrap program with git. References: In-Reply-To: Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, vagrant@debian.org, guix-patches@gnu.org, Steve George Resent-Date: Tue, 23 Jul 2024 18:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66704 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66704@debbugs.gnu.org Cc: Simon Tournier , Efraim Flashner , Vagrant Cascadian X-Debbugs-Original-Xcc: Efraim Flashner , Vagrant Cascadian Received: via spool by 66704-submit@debbugs.gnu.org id=B66704.172175763328079 (code B ref 66704); Tue, 23 Jul 2024 18:01:02 +0000 Received: (at 66704) by debbugs.gnu.org; 23 Jul 2024 18:00:33 +0000 Received: from localhost ([127.0.0.1]:60704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWJoO-0007HJ-Vz for submit@debbugs.gnu.org; Tue, 23 Jul 2024 14:00:33 -0400 Received: from mail-wm1-f45.google.com ([209.85.128.45]:40576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWJoL-00078u-VE for 66704@debbugs.gnu.org; Tue, 23 Jul 2024 14:00:31 -0400 Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-426659ff58bso6844975e9.2 for <66704@debbugs.gnu.org>; Tue, 23 Jul 2024 11:00:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721757564; x=1722362364; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=mRsZWurgb09BEwjEV9zBw/Gcn99s9AKDCL2KbBQG68U=; b=Nf84b2xEBY54B8b0wxOgyXlCjucxFSUuwGFm7ZqCLmrYUGjyLDuGbSXdLCvUgPwpvc rEsK/i+0ZW/2cQixuBIHT3bWObBAIBSG87B0fsVR50kQ8IvjOpgNGL0dHPCJQgyqfpFp 4qM6NUjkg2VLg7amLMpfCpToxReSpVzZWCun3oSMxAUeprmZScoUm4fsLgvyB//rpAMX nwNiKDFGHsosbRZbxCgX+ZZqTaoHGe/miFQ+4K0/P/haMuQBJ0LbZ8lRILu/5XfO2Zkf HjGrfFVd11kELDynttnPMvJJfyfERO9iOHM1fXfGn45aS3bflVMsddktY+DMsH/fhMWL /TCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721757564; x=1722362364; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mRsZWurgb09BEwjEV9zBw/Gcn99s9AKDCL2KbBQG68U=; b=AZKEZMkj5MY+J2Oc+7EicKNuMvNuj/OzE7Q3jbGIZ8f9Rq6B/tcwvibrY+HNC2qXWP NF5tHoWEmmotO80C5yLF5+UVN1heHKF2GQWVjiaBILjFmCMIOhSfIqjDlz5CGfs4LTK/ v0TrLT+ILrwKyfjo+JOks30SnhIualjO1CD7A1scH43vrAiDkal43tAa1S5A/GKosPOg bHnPsOTJ8HAmlu3lM49513tgtlC5HQzyFH9gay9T7KDQmNOmn0i6aRxs1xLBBQXCTwpI HlTG6EHbrsjB+i+Jz83n8WXSCnrN1nNZH22aUZ4OLfIi9AQCTvlDTuo6gYmXI3ZIp12Q 5HFA== X-Gm-Message-State: AOJu0YyYKlGlIMw2WO4XzjeyiJCOupu9JbSWaCe6RgfebqcV/6D71Xxt LnNIrbCM5PkJ/MCSOD+FTb7lqEjOsP7jEloOs5jm5CiqhdXPU5Mh7Yl3lA== X-Google-Smtp-Source: AGHT+IFQ/GhIwLzdGmUuWVu6ELZTIbTmht+kyghlOtpp3vlb1NKbcHx1m/k+E/Wl5TgEBaNv14rxLg== X-Received: by 2002:a05:600c:1d25:b0:426:6ea6:383d with SMTP id 5b1f17b1804b1-427df79db74mr40756595e9.2.1721757563977; Tue, 23 Jul 2024 10:59:23 -0700 (PDT) Received: from lili.. (2a02-8429-6820-f501-e58e-8032-398d-7493.rev.sfr.net. [2a02:8429:6820:f501:e58e:8032:398d:7493]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427d2a43598sm212580875e9.1.2024.07.23.10.59.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jul 2024 10:59:23 -0700 (PDT) From: Simon Tournier Date: Tue, 23 Jul 2024 19:59:18 +0200 Message-ID: <3b43a54f344bbe0824d351915fdb4db979b10a00.1721757000.git.zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.41.0 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/bootloaders.scm (patman): Replace by 'package/inherit'. [arguments]: Add 'wrap-program' that uses git dependency. [inputs]: Add git and git:send-email. Change-Id: Id4ebadd518f271baa087161b10455ec03d6f959b --- gnu/packages/bootloaders.scm | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) Hi, On Mon, 23 Oct 2023 at 21:05, Maxim Cournoyer wrote: > I see 'git send-email' in the above Good catch! Added. However, I am not happy with the mix of “styles”. And I suspect a “bug” or something lacking for packages with multiple outputs; I am going to open a report about that. Another story and not blocking, IMHO. > Did you test that this suffices to get a fully > self-contained working patman? Maybe you can send a v2 with patman. Not really tested. Well, I do not know what means: owner 66704 ! thanks that Steve sent to control. Steve, do you want to give a try and test if this patman package is a fully self-contained working patman? ;-) Cheers, simon base-commit: d007b64356764f49677c78d82643f1125b5353b7 diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 4072df50d7..e974feae5a 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -19,6 +19,7 @@ ;;; Copyright © 2021 Stefan ;;; Copyright © 2022, 2023 Maxim Cournoyer ;;; Copyright © 2023 Herman Rimm +;;; Copyright © 2023 Simon Tournier ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> ;;; ;;; This file is part of GNU Guix. @@ -71,6 +72,7 @@ (define-module (gnu packages bootloaders) #:use-module (gnu packages serialization) #:use-module (gnu packages swig) #:use-module (gnu packages valgrind) + #:use-module (gnu packages version-control) #:use-module (gnu packages virtualization) #:use-module (gnu packages xorg) #:use-module (gnu packages python-web) @@ -965,8 +967,7 @@ (define-public python-u-boot-pylib ;;; This is packaged separately, as it can be used in other contexts than for ;;; U-Boot development. (define-public patman - (package - (inherit u-boot) + (package/inherit u-boot (name "patman") (build-system pyproject-build-system) (arguments @@ -991,8 +992,21 @@ (define-public patman (lambda _ (substitute* "pyproject.toml" (("patman.__main__:run_patman") - "patman.__main__"))))))) - (inputs (list python-pygit2 python-requests python-u-boot-pylib)) + "patman.__main__")))) + (add-after 'install 'wrap-program + (lambda* (#:key inputs #:allow-other-keys) + (let ((git:send-email (assoc-ref inputs "git:send-email"))) + (wrap-program (string-append #$output "/bin/patman") + `("PATH" ":" prefix + (,(string-append #$(this-package-input "git") "/bin"))) + `("GIT_EXEC_PATH" ":" prefix + (,(string-append #$(this-package-input "git") "/libexec/git-core") + ,(string-append git:send-email "/libexec/git-core")))))))))) + (inputs `(("git" ,git) + ("git:send-email" ,git "send-email") + ("python-pygit2" ,python-pygit2) + ("python-requests" ,python-requests) + ("python-u-boot-pylib" ,python-u-boot-pylib))) (synopsis "Patch automation tool") (description "Patman is a patch automation script which: @itemize