GNU bug report logs - #55693
[PATCH 0/2] gnu: Add gitlint.

Previous Next

Package: guix-patches;

Reported by: Brian Kubisiak <brian <at> kubisiak.com>

Date: Sat, 28 May 2022 23:54:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55693 in the body.
You can then email your comments to 55693 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#55693; Package guix-patches. (Sat, 28 May 2022 23:54:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Brian Kubisiak <brian <at> kubisiak.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 28 May 2022 23:54:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Brian Kubisiak <brian <at> kubisiak.com>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/2] gnu: Add gitlint.
Date: Sat, 28 May 2022 16:53:30 -0700
Brian Kubisiak (2):
      gnu: python-sh: Update to 1.14.2.
      gnu: Add gitlint.

gnu/packages/python-xyz.scm      |  4 ++--
gnu/packages/version-control.scm | 26 ++++++++++++++++++++++++++
2 files changed, 28 insertions(+), 2 deletions(-)





Information forwarded to guix-patches <at> gnu.org:
bug#55693; Package guix-patches. (Sat, 28 May 2022 23:56:01 GMT) Full text and rfc822 format available.

Message #8 received at 55693 <at> debbugs.gnu.org (full text, mbox):

From: Brian Kubisiak <brian <at> kubisiak.com>
To: 55693 <at> debbugs.gnu.org
Subject: [PATCH 1/2] gnu: python-sh: Update to 1.14.2.
Date: Sat, 28 May 2022 16:55:09 -0700
* gnu/packages/python-xyz.scm (python-sh): Update to 1.14.2.
---
 gnu/packages/python-xyz.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 156d318944..222485ef6c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1612,14 +1612,14 @@ (define-public python-pyls-black
 (define-public python-sh
   (package
     (name "python-sh")
-    (version "1.12.14")
+    (version "1.14.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "sh" version))
        (sha256
         (base32
-         "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
+         "03gyss1rhj4in7pgysg4q0hxp3230whinlpy1532ljs99lrx0ywx"))))
     (build-system python-build-system)
     (arguments
      '(#:phases
-- 
2.36.1






Information forwarded to guix-patches <at> gnu.org:
bug#55693; Package guix-patches. (Sat, 28 May 2022 23:56:01 GMT) Full text and rfc822 format available.

Message #11 received at 55693 <at> debbugs.gnu.org (full text, mbox):

From: Brian Kubisiak <brian <at> kubisiak.com>
To: 55693 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: Add gitlint.
Date: Sat, 28 May 2022 16:55:21 -0700
* gnu/packages/version-control.scm (gitlint): New variable.
---
 gnu/packages/version-control.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 9d0786d2d9..a4766d5853 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -3371,3 +3371,29 @@ (define-public git-filter-repo
 Git project instead of @command{git filter-branch}.")
     (license (list license:expat ;; Main license.
                    license:gpl2)))) ;; For test harness.
+
+(define-public gitlint
+  (package
+    (name "gitlint")
+    (version "0.17.0")
+    (source (origin
+              (method url-fetch)
+              ;; the gitlint-core pypi package contains the actual gitlint
+              ;; code; the gitlint package only pulls in gitlint-core with
+              ;; stricter dependency versioning
+              (uri (pypi-uri "gitlint-core" version))
+              (sha256
+               (base32
+                "14cn89biys8r7mwcdgllv371k34km9k1941ylxf53a7sxwrzsbbp"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python-arrow" ,python-arrow)
+       ("python-click" ,python-click)
+       ("python-sh" ,python-sh)))
+    (propagated-inputs (list git))
+    (home-page "https://jorisroovers.com/gitlint/")
+    (synopsis "Linting for your git commit messages")
+    (description
+     "Gitlint is a git commit message linter written in python: it checks your
+commit messages for style.")
+    (license license:expat)))
-- 
2.36.1






Information forwarded to guix-patches <at> gnu.org:
bug#55693; Package guix-patches. (Sun, 29 May 2022 10:52:01 GMT) Full text and rfc822 format available.

Message #14 received at 55693 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Brian Kubisiak <brian <at> kubisiak.com>, 55693 <at> debbugs.gnu.org
Subject: Re: [bug#55693] [PATCH 2/2] gnu: Add gitlint.
Date: Sun, 29 May 2022 12:51:32 +0200
[Message part 1 (text/plain, inline)]
Brian Kubisiak schreef op za 28-05-2022 om 16:55 [-0700]:
> +    (propagated-inputs (list git))

Propagtion is not required, a regular input + substitute* 'git' by
(search-input-file inputs "bin/git") in  gitlint-core/gitlint/shell.py
should be sufficient.

Greetings,
Maxime
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55693; Package guix-patches. (Sun, 29 May 2022 21:38:01 GMT) Full text and rfc822 format available.

Message #17 received at 55693 <at> debbugs.gnu.org (full text, mbox):

From: Brian Kubisiak <brian <at> kubisiak.com>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 55693 <at> debbugs.gnu.org
Subject: Re: [bug#55693] [PATCH 2/2] gnu: Add gitlint.
Date: Sun, 29 May 2022 14:37:02 -0700
> > +    (propagated-inputs (list git))
>
> Propagtion is not required, a regular input + substitute* 'git' by
> (search-input-file inputs "bin/git") in  gitlint-core/gitlint/shell.py
> should be sufficient.

shell.py only uses the 'subprocess' code path on windows (or if the
GITLINT_USE_SH_LIB environment variable is set, for testing). On
linux, git is called through 'from sh import git' (through the
python-sh library), which will look for git on $PATH and requires this
to be a propagated input.

Thanks,
Brian





Information forwarded to guix-patches <at> gnu.org:
bug#55693; Package guix-patches. (Sun, 29 May 2022 21:44:01 GMT) Full text and rfc822 format available.

Message #20 received at 55693 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Brian Kubisiak <brian <at> kubisiak.com>
Cc: 55693 <at> debbugs.gnu.org
Subject: Re: [bug#55693] [PATCH 2/2] gnu: Add gitlint.
Date: Sun, 29 May 2022 23:43:05 +0200
[Message part 1 (text/plain, inline)]
Brian Kubisiak schreef op zo 29-05-2022 om 14:37 [-0700]:
> > > +    (propagated-inputs (list git))
> > 
> > Propagtion is not required, a regular input + substitute* 'git' by
> > (search-input-file inputs "bin/git") in  gitlint-
> > core/gitlint/shell.py
> > should be sufficient.
> 
> shell.py only uses the 'subprocess' code path on windows (or if the
> GITLINT_USE_SH_LIB environment variable is set, for testing). On
> linux, git is called through 'from sh import git' (through the
> python-sh library), which will look for git on $PATH and requires
> this to be a propagated input.

Then we can patch python-sh or disable GITLINT_USE_SH_LIB instead, to
avoid propagation.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55693; Package guix-patches. (Mon, 30 May 2022 23:18:01 GMT) Full text and rfc822 format available.

Message #23 received at 55693 <at> debbugs.gnu.org (full text, mbox):

From: Brian Kubisiak <brian <at> kubisiak.com>
To: 55693 <at> debbugs.gnu.org
Subject: [PATCH v2 1/2] gnu: python-sh: Update to 1.14.2.
Date: Mon, 30 May 2022 16:17:47 -0700
* gnu/packages/python-xyz.scm (python-sh): Update to 1.14.2.
---
 gnu/packages/python-xyz.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 156d318944..222485ef6c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1612,14 +1612,14 @@ (define-public python-pyls-black
 (define-public python-sh
   (package
     (name "python-sh")
-    (version "1.12.14")
+    (version "1.14.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "sh" version))
        (sha256
         (base32
-         "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
+         "03gyss1rhj4in7pgysg4q0hxp3230whinlpy1532ljs99lrx0ywx"))))
     (build-system python-build-system)
     (arguments
      '(#:phases
-- 
2.36.1






Information forwarded to guix-patches <at> gnu.org:
bug#55693; Package guix-patches. (Mon, 30 May 2022 23:19:01 GMT) Full text and rfc822 format available.

Message #26 received at 55693 <at> debbugs.gnu.org (full text, mbox):

From: Brian Kubisiak <brian <at> kubisiak.com>
To: 55693 <at> debbugs.gnu.org
Subject: [PATCH v2 2/2] gnu: Add gitlint.
Date: Mon, 30 May 2022 16:17:55 -0700
* gnu/packages/version-control.scm (gitlint): New variable.
---
 gnu/packages/version-control.scm | 39 ++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 9d0786d2d9..abc93ecd8e 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -3371,3 +3371,42 @@ (define-public git-filter-repo
 Git project instead of @command{git filter-branch}.")
     (license (list license:expat ;; Main license.
                    license:gpl2)))) ;; For test harness.
+
+(define-public gitlint
+  (package
+    (name "gitlint")
+    (version "0.17.0")
+    (source (origin
+              (method url-fetch)
+              ;; the gitlint-core pypi package contains the actual gitlint
+              ;; code; the gitlint package only pulls in gitlint-core with
+              ;; stricter dependency versioning
+              (uri (pypi-uri "gitlint-core" version))
+              (sha256
+               (base32
+                "14cn89biys8r7mwcdgllv371k34km9k1941ylxf53a7sxwrzsbbp"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'loosen-requirements
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "gitlint/shell.py"
+               (("'git'") (string-append "'"
+                                         (search-input-file inputs "bin/git")
+                                         "'"))
+               ;; force using subprocess instead of sh so git does not need to
+               ;; be a propagated input
+               (("if USE_SH_LIB") "if False"))
+             #t)))))
+    (inputs
+     `(("git" ,git)
+       ("python-arrow" ,python-arrow)
+       ("python-click" ,python-click)
+       ("python-sh" ,python-sh)))
+    (home-page "https://jorisroovers.com/gitlint/")
+    (synopsis "Linting for your git commit messages")
+    (description
+     "Gitlint is a git commit message linter written in python: it checks your
+commit messages for style.")
+    (license license:expat)))
-- 
2.36.1






Information forwarded to guix-patches <at> gnu.org:
bug#55693; Package guix-patches. (Wed, 01 Jun 2022 23:05:02 GMT) Full text and rfc822 format available.

Message #29 received at 55693 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Brian Kubisiak <brian <at> kubisiak.com>, 55693 <at> debbugs.gnu.org
Subject: Re: [bug#55693] [PATCH v2 2/2] gnu: Add gitlint.
Date: Thu, 02 Jun 2022 01:04:30 +0200
[Message part 1 (text/plain, inline)]
Brian Kubisiak schreef op ma 30-05-2022 om 16:17 [-0700]:
> +             #t)))))

Trailing #t aren't required anymore since a long time, it can be
removed.

> +    (inputs
> +     `(("git" ,git)
> +       ("python-arrow" ,python-arrow)
> +       ("python-click" ,python-click)
> +       ("python-sh" ,python-sh)))

Input labels aren't required anymore.  Try running "guix style -S
inputs".  Also, IIUC, Hartmut Goebel would prefer not using quasiquote
(`):

  (arguments
    (list #:phases
          #~(modify-phases [stuff]
              [stuff]
              ...)))

to avoid the complicated quasiquote/unquote construct, with which I
agree though it's AFAIK not (yet?) elevated to ‘official Guix style’ or
such.

Otherwise LGTM, though I haven't looked at most of the source code of
gitlint (for malware or such) or in detail at the description and
synopsis (for clarity and such).

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55693; Package guix-patches. (Thu, 02 Jun 2022 01:57:02 GMT) Full text and rfc822 format available.

Message #32 received at 55693 <at> debbugs.gnu.org (full text, mbox):

From: Brian Kubisiak <brian <at> kubisiak.com>
To: 55693 <at> debbugs.gnu.org
Subject: [PATCH v3 1/2] gnu: python-sh: Update to 1.14.2.
Date: Wed, 1 Jun 2022 18:56:40 -0700
* gnu/packages/python-xyz.scm (python-sh): Update to 1.14.2.
---
 gnu/packages/python-xyz.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 156d318944..222485ef6c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1612,14 +1612,14 @@ (define-public python-pyls-black
 (define-public python-sh
   (package
     (name "python-sh")
-    (version "1.12.14")
+    (version "1.14.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "sh" version))
        (sha256
         (base32
-         "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
+         "03gyss1rhj4in7pgysg4q0hxp3230whinlpy1532ljs99lrx0ywx"))))
     (build-system python-build-system)
     (arguments
      '(#:phases
-- 
2.36.1






Information forwarded to guix-patches <at> gnu.org:
bug#55693; Package guix-patches. (Thu, 02 Jun 2022 01:57:02 GMT) Full text and rfc822 format available.

Message #35 received at 55693 <at> debbugs.gnu.org (full text, mbox):

From: Brian Kubisiak <brian <at> kubisiak.com>
To: 55693 <at> debbugs.gnu.org
Subject: [PATCH v3 2/2] gnu: Add gitlint.
Date: Wed, 1 Jun 2022 18:56:46 -0700
* gnu/packages/version-control.scm (gitlint): New variable.
---
 gnu/packages/version-control.scm | 37 ++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 9d0786d2d9..e8a356df62 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -3371,3 +3371,40 @@ (define-public git-filter-repo
 Git project instead of @command{git filter-branch}.")
     (license (list license:expat ;; Main license.
                    license:gpl2)))) ;; For test harness.
+
+(define-public gitlint
+  (package
+    (name "gitlint")
+    (version "0.17.0")
+    (source (origin
+              (method url-fetch)
+              ;; the gitlint-core pypi package contains the actual gitlint
+              ;; code; the gitlint package only pulls in gitlint-core with
+              ;; stricter dependency versioning
+              (uri (pypi-uri "gitlint-core" version))
+              (sha256
+               (base32
+                "14cn89biys8r7mwcdgllv371k34km9k1941ylxf53a7sxwrzsbbp"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'build 'loosen-requirements
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "gitlint/shell.py"
+                (("'git'") (string-append
+                            "'"
+                            (search-input-file inputs "bin/git")
+                            "'"))
+                ;; force using subprocess instead of sh so git does not need
+                ;; to be a propagated input
+                (("if USE_SH_LIB") "if False")))))))
+    (inputs
+     (list git python-arrow python-click python-sh))
+    (home-page "https://jorisroovers.com/gitlint/")
+    (synopsis "Linting for your git commit messages")
+    (description
+     "Gitlint is a git commit message linter written in python: it checks your
+commit messages for style.")
+    (license license:expat)))
-- 
2.36.1






Information forwarded to guix-patches <at> gnu.org:
bug#55693; Package guix-patches. (Sun, 05 Jun 2022 21:20:02 GMT) Full text and rfc822 format available.

Message #38 received at 55693 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: Brian Kubisiak <brian <at> kubisiak.com>, 55693 <at> debbugs.gnu.org
Subject: Re: bug#55693: [PATCH 0/2] gnu: Add gitlint.
Date: Sun, 05 Jun 2022 23:19:34 +0200
Hi,

Maxime Devos <maximedevos <at> telenet.be> skribis:

> Input labels aren't required anymore.  Try running "guix style -S
> inputs".  Also, IIUC, Hartmut Goebel would prefer not using quasiquote
> (`):
>
>   (arguments
>     (list #:phases
>           #~(modify-phases [stuff]
>               [stuff]
>               ...)))
>
> to avoid the complicated quasiquote/unquote construct, with which I
> agree though it's AFAIK not (yet?) elevated to ‘official Guix style’ or
> such.

I too prefer:

  (list #:foo #~(…))

over:

  `(#:foo ,#~(…))

Otherwise that’s too much line noise IMO, especially for a newcomer.

Ludo’.




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sun, 05 Jun 2022 21:26:01 GMT) Full text and rfc822 format available.

Notification sent to Brian Kubisiak <brian <at> kubisiak.com>:
bug acknowledged by developer. (Sun, 05 Jun 2022 21:26:01 GMT) Full text and rfc822 format available.

Message #43 received at 55693-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Brian Kubisiak <brian <at> kubisiak.com>
Cc: 55693-done <at> debbugs.gnu.org
Subject: Re: bug#55693: [PATCH 0/2] gnu: Add gitlint.
Date: Sun, 05 Jun 2022 23:25:18 +0200
Hi,

Brian Kubisiak <brian <at> kubisiak.com> skribis:

> * gnu/packages/python-xyz.scm (python-sh): Update to 1.14.2.

[...]

> * gnu/packages/version-control.scm (gitlint): New variable.

Applied both.

> +    (synopsis "Linting for your git commit messages")
> +    (description
> +     "Gitlint is a git commit message linter written in python: it checks your
> +commit messages for style.")

I capitalized proper nouns here.

Thank you and thanks Maxime!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 04 Jul 2022 11:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 268 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.