* [bug#73993] [PATCH] gnu: git-sizer: Pin git version.
@ 2024-10-24 19:05 Greg Hogan
2024-11-29 9:40 ` Liliana Marie Prikler
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Greg Hogan @ 2024-10-24 19:05 UTC (permalink / raw)
To: 73993; +Cc: Greg Hogan
When I submitted this package the placement of git in native-inputs was
incorrect. This patch switches that dependency to the pinned version of
git in inputs and therefore hard-codes the path.
* gnu/packages/version-control.scm (git-sizer)
[arguments]<#:phases>: Use gexps and hard-code git path in 'fix-paths.
[propagated-inputs]: Remove git.
[native-inputs]: Add git-minimal/pinned.
Change-Id: Ide0c5a3df7c0cf0ecdaa5446b5d13970dae96560
---
gnu/packages/version-control.scm | 44 +++++++++++++++++---------------
1 file changed, 24 insertions(+), 20 deletions(-)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 6bd37fee82..78342fbe31 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -4364,26 +4364,30 @@ (define-public git-sizer
"1b4sl4djnfaxwph41y4bh9yal4bpd1nz4403ryp7nzna7h2x0zis"))))
(build-system go-build-system)
(arguments
- '(#:import-path "github.com/github/git-sizer"
- #:install-source? #f
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'fix-paths
- (lambda* (#:key outputs #:allow-other-keys)
- (substitute* '("src/github.com/github/git-sizer/git_sizer_test.go")
- (("bin/git-sizer")
- (string-append (assoc-ref outputs "out")
- "/bin/git-sizer")))))
- (replace 'check
- (lambda* (#:key tests? import-path #:allow-other-keys)
- (when tests?
- (for-each (lambda (test)
- (invoke "go" "test" "-v" "-run" test import-path))
- ;; TestExec and TestSubmodule require a copy of the
- ;; Git repository.
- '("TestBomb" "TestFromSubdir" "TestRefgroups"
- "TestRefSelections" "TestTaggedTags"))))))))
- (native-inputs (list git))
+ (list
+ #:import-path "github.com/github/git-sizer"
+ #:install-source? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-paths
+ (lambda _
+ (let ((git #$git-minimal/pinned))
+ (substitute* '("src/github.com/github/git-sizer/git_sizer_test.go")
+ (("bin/git-sizer")
+ (string-append #$output "/bin/git-sizer")))
+ (substitute* '("src/github.com/github/git-sizer/git/git.go")
+ (("gitBin, err := findGitBin\\(\\)")
+ (string-append "gitBin := \"" git "/bin/git\"\n\tvar err error"))))))
+ (replace 'check
+ (lambda* (#:key tests? import-path #:allow-other-keys)
+ (when tests?
+ (for-each (lambda (test)
+ (invoke "go" "test" "-v" "-run" test import-path))
+ ;; TestExec and TestSubmodule require a copy of the
+ ;; Git repository.
+ '("TestBomb" "TestFromSubdir" "TestRefgroups"
+ "TestRefSelections" "TestTaggedTags"))))))))
+ (inputs (list git-minimal/pinned))
(propagated-inputs
(list go-github-com-cli-safeexec
go-github-com-davecgh-go-spew
base-commit: ac19ae37b5000c224c4cd167b239cc3027d01b30
--
2.46.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [bug#73993] [PATCH] gnu: git-sizer: Pin git version.
2024-10-24 19:05 [bug#73993] [PATCH] gnu: git-sizer: Pin git version Greg Hogan
@ 2024-11-29 9:40 ` Liliana Marie Prikler
2024-12-05 21:06 ` Greg Hogan
2024-12-05 21:04 ` [bug#73993] [PATCH v2 0/3] Pin git for git-sizer Greg Hogan
2024-12-09 15:30 ` [bug#73993] [PATCH v3] " Greg Hogan
2 siblings, 1 reply; 9+ messages in thread
From: Liliana Marie Prikler @ 2024-11-29 9:40 UTC (permalink / raw)
To: Greg Hogan, 73993
Am Donnerstag, dem 24.10.2024 um 19:05 +0000 schrieb Greg Hogan:
> When I submitted this package the placement of git in native-inputs
> was incorrect. This patch switches that dependency to the pinned
> version of git in inputs and therefore hard-codes the path.
>
> * gnu/packages/version-control.scm (git-sizer)
> [arguments]<#:phases>: Use gexps and hard-code git path in 'fix-
> paths.
> [propagated-inputs]: Remove git.
> [native-inputs]: Add git-minimal/pinned.
The ChangeLog here is wrong. git is removed from native-inputs and
git-minimal/pinned added to inputs.
I would suggest making the change to G-Expressions in a separate patch
for easier review.
Cheers
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#73993] [PATCH v2 0/3] Pin git for git-sizer.
2024-10-24 19:05 [bug#73993] [PATCH] gnu: git-sizer: Pin git version Greg Hogan
2024-11-29 9:40 ` Liliana Marie Prikler
@ 2024-12-05 21:04 ` Greg Hogan
2024-12-05 21:04 ` [bug#73993] [PATCH v2 1/3] gnu: git-sizer: Propagate git Greg Hogan
` (2 more replies)
2024-12-09 15:30 ` [bug#73993] [PATCH v3] " Greg Hogan
2 siblings, 3 replies; 9+ messages in thread
From: Greg Hogan @ 2024-12-05 21:04 UTC (permalink / raw)
To: 73993; +Cc: Greg Hogan
The git package can be updated more readily if we reduce the number of
dependent packages. As in this patchset, we can depend on the pinned
version of git if we hard-code the location of the git executable and
do not propagate the dependency, which could cause profile conflicts.
The first patch fixes the issue where git was neither hard-coded nor
propagated and only worked because git is typically available in a user
profile. This can be tested with "guix shell --container git-sizer".
Greg Hogan (3):
gnu: git-sizer: Propagate git.
gnu: git-sizer: Use gexps.
gnu: git-sizer: Pin git version.
gnu/packages/version-control.scm | 44 +++++++++++++++++---------------
1 file changed, 24 insertions(+), 20 deletions(-)
base-commit: 006679d1e6ca7acea0629b4f019c8cf89cde08be
--
2.47.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#73993] [PATCH v2 1/3] gnu: git-sizer: Propagate git.
2024-12-05 21:04 ` [bug#73993] [PATCH v2 0/3] Pin git for git-sizer Greg Hogan
@ 2024-12-05 21:04 ` Greg Hogan
2024-12-05 21:04 ` [bug#73993] [PATCH v2 2/3] gnu: git-sizer: Use gexps Greg Hogan
2024-12-05 21:04 ` [bug#73993] [PATCH v2 3/3] gnu: git-sizer: Pin git version Greg Hogan
2 siblings, 0 replies; 9+ messages in thread
From: Greg Hogan @ 2024-12-05 21:04 UTC (permalink / raw)
To: 73993; +Cc: Greg Hogan
Fix the current version of this package, which depends on git from PATH.
* gnu/packages/version-control.scm (git-sizer)
[native-inputs]: Move git ...
[propagated-inputs]: ... to here.
Change-Id: Iea70a16845e93f5c3740da5596e61cc2d7fd17b9
---
gnu/packages/version-control.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 289b981911..86e241ad27 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -4480,9 +4480,9 @@ (define-public git-sizer
;; Git repository.
'("TestBomb" "TestFromSubdir" "TestRefgroups"
"TestRefSelections" "TestTaggedTags"))))))))
- (native-inputs (list git))
(propagated-inputs
- (list go-github-com-cli-safeexec
+ (list git
+ go-github-com-cli-safeexec
go-github-com-davecgh-go-spew
go-github-com-pmezard-go-difflib
go-github-com-spf13-pflag
--
2.47.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [bug#73993] [PATCH v2 2/3] gnu: git-sizer: Use gexps.
2024-12-05 21:04 ` [bug#73993] [PATCH v2 0/3] Pin git for git-sizer Greg Hogan
2024-12-05 21:04 ` [bug#73993] [PATCH v2 1/3] gnu: git-sizer: Propagate git Greg Hogan
@ 2024-12-05 21:04 ` Greg Hogan
2024-12-05 21:04 ` [bug#73993] [PATCH v2 3/3] gnu: git-sizer: Pin git version Greg Hogan
2 siblings, 0 replies; 9+ messages in thread
From: Greg Hogan @ 2024-12-05 21:04 UTC (permalink / raw)
To: 73993; +Cc: Greg Hogan
* gnu/packages/version-control.scm (git-sizer)
[arguments]<#:phases>: Use gexps.
Change-Id: Ic2c797c59b7f5f0d30b4b799eb293be4973f7e13
---
gnu/packages/version-control.scm | 39 ++++++++++++++++----------------
1 file changed, 20 insertions(+), 19 deletions(-)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 86e241ad27..37ee819688 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -4461,25 +4461,26 @@ (define-public git-sizer
"1b4sl4djnfaxwph41y4bh9yal4bpd1nz4403ryp7nzna7h2x0zis"))))
(build-system go-build-system)
(arguments
- '(#:import-path "github.com/github/git-sizer"
- #:install-source? #f
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'fix-paths
- (lambda* (#:key outputs #:allow-other-keys)
- (substitute* '("src/github.com/github/git-sizer/git_sizer_test.go")
- (("bin/git-sizer")
- (string-append (assoc-ref outputs "out")
- "/bin/git-sizer")))))
- (replace 'check
- (lambda* (#:key tests? import-path #:allow-other-keys)
- (when tests?
- (for-each (lambda (test)
- (invoke "go" "test" "-v" "-run" test import-path))
- ;; TestExec and TestSubmodule require a copy of the
- ;; Git repository.
- '("TestBomb" "TestFromSubdir" "TestRefgroups"
- "TestRefSelections" "TestTaggedTags"))))))))
+ (list
+ #:import-path "github.com/github/git-sizer"
+ #:install-source? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-paths
+ (lambda _
+ (let ((git #$git))
+ (substitute* '("src/github.com/github/git-sizer/git_sizer_test.go")
+ (("bin/git-sizer")
+ (string-append #$output "/bin/git-sizer"))))))
+ (replace 'check
+ (lambda* (#:key tests? import-path #:allow-other-keys)
+ (when tests?
+ (for-each (lambda (test)
+ (invoke "go" "test" "-v" "-run" test import-path))
+ ;; TestExec and TestSubmodule require a copy of the
+ ;; Git repository.
+ '("TestBomb" "TestFromSubdir" "TestRefgroups"
+ "TestRefSelections" "TestTaggedTags"))))))))
(propagated-inputs
(list git
go-github-com-cli-safeexec
--
2.47.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [bug#73993] [PATCH v2 3/3] gnu: git-sizer: Pin git version.
2024-12-05 21:04 ` [bug#73993] [PATCH v2 0/3] Pin git for git-sizer Greg Hogan
2024-12-05 21:04 ` [bug#73993] [PATCH v2 1/3] gnu: git-sizer: Propagate git Greg Hogan
2024-12-05 21:04 ` [bug#73993] [PATCH v2 2/3] gnu: git-sizer: Use gexps Greg Hogan
@ 2024-12-05 21:04 ` Greg Hogan
2024-12-06 21:19 ` Liliana Marie Prikler
2 siblings, 1 reply; 9+ messages in thread
From: Greg Hogan @ 2024-12-05 21:04 UTC (permalink / raw)
To: 73993; +Cc: Greg Hogan
* gnu/packages/version-control.scm (git-sizer)
[arguments]<#:phases>: Hard-code git path in 'fix-paths.
[propagated-inputs]: Remove git.
[inputs]: Add git-minimal/pinned.
Change-Id: Icc21f92e0261ff05f3411970e6f4792763a94f80
---
gnu/packages/version-control.scm | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 37ee819688..8c7d817523 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -4468,10 +4468,13 @@ (define-public git-sizer
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-paths
(lambda _
- (let ((git #$git))
+ (let ((git #$git-minimal/pinned))
(substitute* '("src/github.com/github/git-sizer/git_sizer_test.go")
(("bin/git-sizer")
- (string-append #$output "/bin/git-sizer"))))))
+ (string-append #$output "/bin/git-sizer")))
+ (substitute* '("src/github.com/github/git-sizer/git/git.go")
+ (("gitBin, err := findGitBin\\(\\)")
+ (string-append "gitBin := \"" git "/bin/git\"\n\tvar err error"))))))
(replace 'check
(lambda* (#:key tests? import-path #:allow-other-keys)
(when tests?
@@ -4481,9 +4484,9 @@ (define-public git-sizer
;; Git repository.
'("TestBomb" "TestFromSubdir" "TestRefgroups"
"TestRefSelections" "TestTaggedTags"))))))))
+ (inputs (list git-minimal/pinned))
(propagated-inputs
- (list git
- go-github-com-cli-safeexec
+ (list go-github-com-cli-safeexec
go-github-com-davecgh-go-spew
go-github-com-pmezard-go-difflib
go-github-com-spf13-pflag
--
2.47.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [bug#73993] [PATCH] gnu: git-sizer: Pin git version.
2024-11-29 9:40 ` Liliana Marie Prikler
@ 2024-12-05 21:06 ` Greg Hogan
0 siblings, 0 replies; 9+ messages in thread
From: Greg Hogan @ 2024-12-05 21:06 UTC (permalink / raw)
To: Liliana Marie Prikler; +Cc: 73993
On Fri, Nov 29, 2024 at 4:40 AM Liliana Marie Prikler
<liliana.prikler@gmail.com> wrote:
>
> Am Donnerstag, dem 24.10.2024 um 19:05 +0000 schrieb Greg Hogan:
> > When I submitted this package the placement of git in native-inputs
> > was incorrect. This patch switches that dependency to the pinned
> > version of git in inputs and therefore hard-codes the path.
> >
> > * gnu/packages/version-control.scm (git-sizer)
> > [arguments]<#:phases>: Use gexps and hard-code git path in 'fix-
> > paths.
> > [propagated-inputs]: Remove git.
> > [native-inputs]: Add git-minimal/pinned.
> The ChangeLog here is wrong. git is removed from native-inputs and
> git-minimal/pinned added to inputs.
>
> I would suggest making the change to G-Expressions in a separate patch
> for easier review.
>
> Cheers
Thanks for reviewing and catching the errors in the commit message. I
have split v2 into three commits because the current package is broken
as git needs to be either propagated or hard-coded. The git dependency
should have been in propagated-inputs, and is now in inputs.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#73993] [PATCH v2 3/3] gnu: git-sizer: Pin git version.
2024-12-05 21:04 ` [bug#73993] [PATCH v2 3/3] gnu: git-sizer: Pin git version Greg Hogan
@ 2024-12-06 21:19 ` Liliana Marie Prikler
0 siblings, 0 replies; 9+ messages in thread
From: Liliana Marie Prikler @ 2024-12-06 21:19 UTC (permalink / raw)
To: Greg Hogan, 73993
Am Donnerstag, dem 05.12.2024 um 21:04 +0000 schrieb Greg Hogan:
> * gnu/packages/version-control.scm (git-sizer)
> [arguments]<#:phases>: Hard-code git path in 'fix-paths.
> [propagated-inputs]: Remove git.
> [inputs]: Add git-minimal/pinned.
>
> Change-Id: Icc21f92e0261ff05f3411970e6f4792763a94f80
> ---
General note: when someone comments on your patch, don't forget to CC
them in upcoming revisions :)
> gnu/packages/version-control.scm | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-
> control.scm
> index 37ee819688..8c7d817523 100644
> --- a/gnu/packages/version-control.scm
> +++ b/gnu/packages/version-control.scm
> @@ -4468,10 +4468,13 @@ (define-public git-sizer
> #~(modify-phases %standard-phases
> (add-after 'unpack 'fix-paths
> (lambda _
> - (let ((git #$git))
> + (let ((git #$git-minimal/pinned))
I'd rather avoid binding git per gexp here.
> (substitute* '("src/github.com/github/git-
> sizer/git_sizer_test.go")
> (("bin/git-sizer")
> - (string-append #$output "/bin/git-sizer"))))))
> + (string-append #$output "/bin/git-sizer")))
> + (substitute* '("src/github.com/github/git-
> sizer/git/git.go")
> + (("gitBin, err := findGitBin\\(\\)")
> + (string-append "gitBin := \"" git
> "/bin/git\"\n\tvar err error"))))))
You can use (search-input-file …) instead.
> (replace 'check
> (lambda* (#:key tests? import-path #:allow-other-keys)
> (when tests?
> @@ -4481,9 +4484,9 @@ (define-public git-sizer
> ;; Git repository.
> '("TestBomb" "TestFromSubdir"
> "TestRefgroups"
> "TestRefSelections"
> "TestTaggedTags"))))))))
> + (inputs (list git-minimal/pinned))
> (propagated-inputs
> - (list git
> - go-github-com-cli-safeexec
> + (list go-github-com-cli-safeexec
> go-github-com-davecgh-go-spew
> go-github-com-pmezard-go-difflib
> go-github-com-spf13-pflag
I don't see a good reason to move git first to propagated-inputs and
then to inputs. I would squash this and 1/3 into one patch that
doesn't necessarily rely on G-Expressions in the middle :)
Cheers
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#73993] [PATCH v3] gnu: git-sizer: Pin git version.
2024-10-24 19:05 [bug#73993] [PATCH] gnu: git-sizer: Pin git version Greg Hogan
2024-11-29 9:40 ` Liliana Marie Prikler
2024-12-05 21:04 ` [bug#73993] [PATCH v2 0/3] Pin git for git-sizer Greg Hogan
@ 2024-12-09 15:30 ` Greg Hogan
2 siblings, 0 replies; 9+ messages in thread
From: Greg Hogan @ 2024-12-09 15:30 UTC (permalink / raw)
To: 73993; +Cc: liliana.prikler, Greg Hogan
* gnu/packages/version-control.scm (git-sizer)
[arguments]<#:phases>: Hard-code git path in 'fix-paths.
[native-inputs]: Remove git.
[inputs]: Add git-minimal/pinned.
Change-Id: If6178a0e1c453ea47a1f70cd507639b5be2142b0
---
gnu/packages/version-control.scm | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 3339e79390..eb9dcfa198 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -4479,7 +4479,12 @@ (define-public git-sizer
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-paths
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (substitute* '("src/github.com/github/git-sizer/git/git.go")
+ (("gitBin, err := findGitBin\\(\\)")
+ (string-append "gitBin := \""
+ (search-input-file inputs "bin/git")
+ "\"\n\tvar err error")))
(substitute* '("src/github.com/github/git-sizer/git_sizer_test.go")
(("bin/git-sizer")
(string-append (assoc-ref outputs "out")
@@ -4493,7 +4498,7 @@ (define-public git-sizer
;; Git repository.
'("TestBomb" "TestFromSubdir" "TestRefgroups"
"TestRefSelections" "TestTaggedTags"))))))))
- (native-inputs (list git))
+ (inputs (list git-minimal/pinned))
(propagated-inputs
(list go-github-com-cli-safeexec
go-github-com-davecgh-go-spew
base-commit: 9d09b0cf841fb657a1aec12e9bab68e00c2b493c
--
2.46.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-12-09 15:40 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-24 19:05 [bug#73993] [PATCH] gnu: git-sizer: Pin git version Greg Hogan
2024-11-29 9:40 ` Liliana Marie Prikler
2024-12-05 21:06 ` Greg Hogan
2024-12-05 21:04 ` [bug#73993] [PATCH v2 0/3] Pin git for git-sizer Greg Hogan
2024-12-05 21:04 ` [bug#73993] [PATCH v2 1/3] gnu: git-sizer: Propagate git Greg Hogan
2024-12-05 21:04 ` [bug#73993] [PATCH v2 2/3] gnu: git-sizer: Use gexps Greg Hogan
2024-12-05 21:04 ` [bug#73993] [PATCH v2 3/3] gnu: git-sizer: Pin git version Greg Hogan
2024-12-06 21:19 ` Liliana Marie Prikler
2024-12-09 15:30 ` [bug#73993] [PATCH v3] " Greg Hogan
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).