[PATCH] gnu: b4: Ensure git presence.

  • Done
  • quality assurance status badge
Details
2 participants
  • Hilton Chain
  • Nicolas Graves
Owner
unassigned
Submitted by
Nicolas Graves
Severity
normal
N
N
Nicolas Graves wrote on 11 Feb 22:07 +0100
(address . guix-patches@gnu.org)(address . ngraves@ngraves.fr)
20240211210754.19641-1-ngraves@ngraves.fr
* gnu/packages/version-control.scm (b4): Ensure git presence.
[arguments](phases): Add phase hardcode-git-bin.
[inputs]: Add git-minimal.

Change-Id: Ib2dca06009cdacc0e5ab4ab227cd30991474404c
---
gnu/packages/version-control.scm | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 8f9fae5ce2..b8b818c238 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -2925,9 +2925,15 @@ (define-public b4
;; XXX: dnspython attempts to read /etc/resolv.conf when loading
;; resolver.py, which breaks the sanity check in dependent
;; packages. This should rather be fixed in dnspython.
- (delete 'sanity-check))))
+ (delete 'sanity-check)
+ (add-after 'unpack 'harcode-git-bin
+ (lambda _ ; This ensures git is present when called.
+ (substitute* (find-files "b4" "\\.py$")
+ (("'git'")
+ (string-append
+ "'" #$(this-package-input "git") "/bin/git'"))))))))
(inputs
- (list python-dkimpy python-dnspython python-requests))
+ (list python-dkimpy python-dnspython python-requests git-minimal))
(propagated-inputs
(list patatt))
(home-page "https://git.kernel.org/pub/scm/utils/b4/b4.git")
--
2.41.0
N
N
Nicolas Graves wrote on 15 Feb 12:27 +0100
[PATCH v2] gnu: b4: Ensure git presence.
(address . 69062@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240215112727.21542-1-ngraves@ngraves.fr
* gnu/packages/version-control.scm (b4): Ensure git presence.
[arguments](phases): Add phase hardcode-git-bin.
[inputs]: Add git-minimal.

Change-Id: Ib2dca06009cdacc0e5ab4ab227cd30991474404c
---
gnu/packages/version-control.scm | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

Toggle diff (25 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 8f9fae5ce2..0b636ac02e 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -2925,9 +2925,16 @@ (define-public b4
;; XXX: dnspython attempts to read /etc/resolv.conf when loading
;; resolver.py, which breaks the sanity check in dependent
;; packages. This should rather be fixed in dnspython.
- (delete 'sanity-check))))
+ (delete 'sanity-check)
+ (add-after 'unpack 'harcode-git-bin
+ (lambda _ ; This ensures git is present when called.
+ (substitute* (find-files "b4" "\\.py$")
+ (("\\['git'")
+ (string-append
+ "['" #$(this-package-input "git-minimal")
+ "/bin/git'"))))))))
(inputs
- (list python-dkimpy python-dnspython python-requests))
+ (list python-dkimpy python-dnspython python-requests git-minimal))
(propagated-inputs
(list patatt))
(home-page "https://git.kernel.org/pub/scm/utils/b4/b4.git")
--
2.41.0
H
H
Hilton Chain wrote on 15 Feb 14:20 +0100
(name . Nicolas Graves)(address . ngraves@ngraves.fr)(address . 69062@debbugs.gnu.org)
874je9984j.wl-hako@ultrarare.space
Hi Nicolas,

On Thu, 15 Feb 2024 19:27:26 +0800,
Nicolas Graves via Guix-patches via wrote:
Toggle quote (4 lines)
>
> * gnu/packages/version-control.scm (b4): Ensure git presence.
> [arguments](phases): Add phase hardcode-git-bin.

^ <#:phases>

Toggle quote (19 lines)
> [inputs]: Add git-minimal.
>
> Change-Id: Ib2dca06009cdacc0e5ab4ab227cd30991474404c
> ---
> gnu/packages/version-control.scm | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
> index 8f9fae5ce2..0b636ac02e 100644
> --- a/gnu/packages/version-control.scm
> +++ b/gnu/packages/version-control.scm
> @@ -2925,9 +2925,16 @@ (define-public b4
> ;; XXX: dnspython attempts to read /etc/resolv.conf when loading
> ;; resolver.py, which breaks the sanity check in dependent
> ;; packages. This should rather be fixed in dnspython.
> - (delete 'sanity-check))))
> + (delete 'sanity-check)
> + (add-after 'unpack 'harcode-git-bin

^ hardcode

Toggle quote (7 lines)
> + (lambda _ ; This ensures git is present when called.
> + (substitute* (find-files "b4" "\\.py$")
> + (("\\['git'")
> + (string-append
> + "['" #$(this-package-input "git-minimal")
> + "/bin/git'"))))))))

search-input-file can be used instead.

Toggle quote (4 lines)
> (inputs
> - (list python-dkimpy python-dnspython python-requests))
> + (list python-dkimpy python-dnspython python-requests git-minimal))

Please list inputs in alphabetical order, git-minimal should be the first in
this case.

Toggle quote (6 lines)
> (propagated-inputs
> (list patatt))
> (home-page "https://git.kernel.org/pub/scm/utils/b4/b4.git")
> --
> 2.41.0

Thanks
N
N
Nicolas Graves wrote on 15 Feb 21:34 +0100
[PATCH v3] gnu: b4: Ensure git presence.
(address . 69062@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240215203415.18655-1-ngraves@ngraves.fr
* gnu/packages/version-control.scm (b4): Ensure git presence.
[arguments](#:phases): Add phase hardcode-git-bin.
[inputs]: Add git-minimal.

Change-Id: Ib2dca06009cdacc0e5ab4ab227cd30991474404c
---
gnu/packages/version-control.scm | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

Toggle diff (25 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 8f9fae5ce2..62a63e926b 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -2925,9 +2925,16 @@ (define-public b4
;; XXX: dnspython attempts to read /etc/resolv.conf when loading
;; resolver.py, which breaks the sanity check in dependent
;; packages. This should rather be fixed in dnspython.
- (delete 'sanity-check))))
+ (delete 'sanity-check)
+ ;; This ensures git is present when called.
+ (add-after 'unpack 'hardcode-git-bin
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* (find-files "b4" "\\.py$")
+ (("\\['git'")
+ (string-append
+ "['" (search-input-file inputs "/bin/git") "'"))))))))
(inputs
- (list python-dkimpy python-dnspython python-requests))
+ (list git-minimal python-dkimpy python-dnspython python-requests))
(propagated-inputs
(list patatt))
(home-page "https://git.kernel.org/pub/scm/utils/b4/b4.git")
--
2.41.0
N
N
Nicolas Graves wrote on 18 Feb 15:33 +0100
[PATCH v4] gnu: b4: Ensure git presence.
(address . 69062@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240218143309.824-1-ngraves@ngraves.fr
* gnu/packages/version-control.scm (b4): Ensure git presence.
[arguments]<#:phases>: Add phase hardcode-git-bin.
[inputs]: Add git-minimal.

Change-Id: Ib2dca06009cdacc0e5ab4ab227cd30991474404c
---
gnu/packages/version-control.scm | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

Toggle diff (25 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 51754245d3..fc378e83fe 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -2926,9 +2926,16 @@ (define-public b4
;; XXX: dnspython attempts to read /etc/resolv.conf when loading
;; resolver.py, which breaks the sanity check in dependent
;; packages. This should rather be fixed in dnspython.
- (delete 'sanity-check))))
+ (delete 'sanity-check)
+ ;; This ensures git is present when called.
+ (add-after 'unpack 'hardcode-git-bin
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* (find-files "b4" "\\.py$")
+ (("\\['git'")
+ (string-append
+ "['" (search-input-file inputs "/bin/git") "'"))))))))
(inputs
- (list python-dkimpy python-dnspython python-requests))
+ (list git-minimal python-dkimpy python-dnspython python-requests))
(propagated-inputs
(list patatt))
(home-page "https://git.kernel.org/pub/scm/utils/b4/b4.git")
--
2.41.0
H
H
Hilton Chain wrote on 24 Feb 17:45 +0100
(name . Nicolas Graves)(address . ngraves@ngraves.fr)(address . 69062-done@debbugs.gnu.org)
875xydizfp.wl-hako@ultrarare.space
Hi Nicolas,

On Sun, 18 Feb 2024 22:33:08 +0800,
Nicolas Graves via Guix-patches via wrote:
Toggle quote (36 lines)
>
> * gnu/packages/version-control.scm (b4): Ensure git presence.
> [arguments]<#:phases>: Add phase hardcode-git-bin.
> [inputs]: Add git-minimal.
>
> Change-Id: Ib2dca06009cdacc0e5ab4ab227cd30991474404c
> ---
> gnu/packages/version-control.scm | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
> index 51754245d3..fc378e83fe 100644
> --- a/gnu/packages/version-control.scm
> +++ b/gnu/packages/version-control.scm
> @@ -2926,9 +2926,16 @@ (define-public b4
> ;; XXX: dnspython attempts to read /etc/resolv.conf when loading
> ;; resolver.py, which breaks the sanity check in dependent
> ;; packages. This should rather be fixed in dnspython.
> - (delete 'sanity-check))))
> + (delete 'sanity-check)
> + ;; This ensures git is present when called.
> + (add-after 'unpack 'hardcode-git-bin
> + (lambda* (#:key inputs #:allow-other-keys)
> + (substitute* (find-files "b4" "\\.py$")
> + (("\\['git'")
> + (string-append
> + "['" (search-input-file inputs "/bin/git") "'"))))))))
> (inputs
> - (list python-dkimpy python-dnspython python-requests))
> + (list git-minimal python-dkimpy python-dnspython python-requests))
> (propagated-inputs
> (list patatt))
> (home-page "https://git.kernel.org/pub/scm/utils/b4/b4.git")
> --
> 2.41.0

Applied as e3e64acdb8ea8a9b55e376595b0fb1018e170376, thank you!
Closed
?