GNU bug report logs - #52296
[PATCH 1/4] gnu: Add git-absorb

Previous Next

Package: guix-patches;

Reported by: jgart <jgart <at> dismail.de>

Date: Sun, 5 Dec 2021 06:59:01 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

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 52296 in the body.
You can then email your comments to 52296 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#52296; Package guix-patches. (Sun, 05 Dec 2021 06:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to jgart <jgart <at> dismail.de>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 05 Dec 2021 06:59:02 GMT) Full text and rfc822 format available.

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

From: jgart <jgart <at> dismail.de>
To: Guix Patches <guix-patches <at> gnu.org>
Subject: [PATCH 1/4] gnu: Add git-absorb
Date: Sun, 5 Dec 2021 01:57:50 -0500
Hi Guixers,

Here is git-absorb.

git absorb will automatically identify which commits are safe to modify,
and which staged changes belong to each of those commits. It will then
write fixup! commits for each of those changes.




Information forwarded to guix-patches <at> gnu.org:
bug#52296; Package guix-patches. (Sun, 05 Dec 2021 07:03:02 GMT) Full text and rfc822 format available.

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

From: jgart <jgart <at> dismail.de>
To: 52296 <at> debbugs.gnu.org
Cc: jgart <jgart <at> dismail.de>
Subject: [PATCH 1/4] gnu: Add rust-memchr-2.3.
Date: Sun,  5 Dec 2021 02:01:25 -0500
* gnu/packages/crates-io.scm (rust-memchr-2.3): New variable.
---
 gnu/packages/crates-io.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 7d5833ffc0..8bc49fcce6 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -21,6 +21,7 @@
 ;;; Copyright © 2021 Petr Hodina <phodina <at> protonmail.com>
 ;;; Copyright © 2021 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2021 Jacob Hrbek <kreyren <at> rixotstudio.cz>
+;;; Copyright © 2021 jgart <jgart <at> dismail.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29019,6 +29020,26 @@ (define-public rust-measureme-0.7
 unstable -Z self-profile flag.")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-memchr-2.3
+  (package
+    (name "rust-memchr")
+    (version "2.3.4")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "memchr" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "098m9clfs495illlw00hv2gg67mhm7jflld3msyclvi5m9xc9q8f"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:skip-build? #t #:cargo-inputs (("rust-libc" ,rust-libc-0.2))))
+    (home-page "https://github.com/BurntSushi/memchr")
+    (synopsis "Safe interface to memchr.")
+    (description "Safe interface to memchr.")
+    (license 
+      (list license:unlicense license:expat))))
+
 (define-public rust-memchr-2
   (package
     (name "rust-memchr")
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#52296; Package guix-patches. (Sun, 05 Dec 2021 07:03:02 GMT) Full text and rfc822 format available.

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

From: jgart <jgart <at> dismail.de>
To: 52296 <at> debbugs.gnu.org
Cc: jgart <jgart <at> dismail.de>
Subject: [PATCH 2/4] gnu: Add rust-slog-async-2.5.
Date: Sun,  5 Dec 2021 02:01:26 -0500
* gnu/packages/crates-io.scm (rust-slog-async-2.5): New variable.
---
 gnu/packages/crates-io.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 8bc49fcce6..73244fdd6e 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -49134,6 +49134,31 @@ (define-public rust-slog-2
             license:expat
             license:asl2.0))))
 
+(define-public rust-slog-async-2.5
+  (package
+    (name "rust-slog-async")
+    (version "2.5.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "slog-async" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "1fzvx0n2q02bjrcjjylsgdr74d2yp1zc17s9fdkgkqkwwin37csi"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:skip-build?
+        #t
+        #:cargo-inputs
+        (("rust-crossbeam-channel" ,rust-crossbeam-channel-0.4)
+         ("rust-slog" ,rust-slog-2)
+         ("rust-take-mut" ,rust-take-mut-0.2)
+         ("rust-thread-local" ,rust-thread-local-1))))
+    (home-page "https://github.com/slog-rs/slog")
+    (synopsis "Asynchronous drain for slog-rs")
+    (description "Asynchronous drain for slog-rs")
+    (license (list license:mpl2.0 license:expat license:asl2.0))))
+
 (define-public rust-slog-async-2
   (package
     (name "rust-slog-async")
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#52296; Package guix-patches. (Sun, 05 Dec 2021 07:03:02 GMT) Full text and rfc822 format available.

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

From: jgart <jgart <at> dismail.de>
To: 52296 <at> debbugs.gnu.org
Cc: jgart <jgart <at> dismail.de>
Subject: [PATCH 3/4] gnu: Add rust-tempfile-3.1.
Date: Sun,  5 Dec 2021 02:01:27 -0500
* gnu/packages/crates-io.scm (rust-tempfile-3.1): New variable.
---
 gnu/packages/crates-io.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 73244fdd6e..ad90a2d4a4 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -53408,6 +53408,34 @@ (define-public rust-tempdir-0.3
     (license (list license:asl2.0
                    license:expat))))
 
+(define-public rust-tempfile-3.1
+  (package
+    (name "rust-tempfile")
+    (version "3.1.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "tempfile" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "1a9cfdqw70n7bcnkx05aih9xdba8lqazmqlkjpkmn2la6gcj8vks"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:skip-build?
+        #t
+        #:cargo-inputs
+        (("rust-cfg-if" ,rust-cfg-if-0.1)
+         ("rust-libc" ,rust-libc-0.2)
+         ("rust-rand" ,rust-rand-0.7)
+         ("rust-redox-syscall" ,rust-redox-syscall-0.1)
+         ("rust-remove-dir-all" ,rust-remove-dir-all-0.5)
+         ("rust-winapi" ,rust-winapi-0.3))))
+    (home-page "http://stebalien.com/projects/tempfile-rs")
+    (synopsis "A library for managing temporary files and directories.")
+    (description
+      "This package provides a library for managing temporary files and directories.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-tempfile-3
   (package
     (name "rust-tempfile")
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#52296; Package guix-patches. (Sun, 05 Dec 2021 07:03:03 GMT) Full text and rfc822 format available.

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

From: jgart <jgart <at> dismail.de>
To: 52296 <at> debbugs.gnu.org
Cc: jgart <jgart <at> dismail.de>
Subject: [PATCH 4/4] gnu: Add git-absorb.
Date: Sun,  5 Dec 2021 02:01:28 -0500
* gnu/packages/rust-apps.scm (git-absorb): New variable.
---
 gnu/packages/rust-apps.scm | 47 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index be60f3f376..6ce98610f5 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2021 Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2021 Petr Hodina <phodina <at> protonmail.com>
+;;; Copyright © 2021 jgart <jgart <at> dismail.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1204,6 +1205,52 @@ (define-public tealdeer
 Full featured offline client with caching support.")
     (license (list license:expat license:asl2.0))))
 
+(define-public git-absorb
+  (package
+    (name "git-absorb")
+    (version "0.6.6")
+    (source
+     (origin
+       ;; crates.io does not include the manual page.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/tummychow/git-absorb")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "04v10bn24acify34vh5ayymsr1flcyb05f3az9k1s2m6nlxy5gb9"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:cargo-inputs
+        (("rust-anyhow" ,rust-anyhow-1)
+         ("rust-clap" ,rust-clap-2)
+         ("rust-git2" ,rust-git2-0.13)
+         ("rust-memchr" ,rust-memchr-2.3)
+         ("rust-slog" ,rust-slog-2)
+         ("rust-slog-async" ,rust-slog-async-2.5)
+         ("rust-slog-term" ,rust-slog-term-2))
+        #:cargo-development-inputs
+        (("rust-tempfile" ,rust-tempfile-3.1))
+        #:phases
+        (modify-phases %standard-phases
+         (add-after 'install 'install-manual-page
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out   (assoc-ref outputs "out"))
+                    (man   (string-append out "/share/man/man1")))
+               (install-file "Documentation/git-absorb.1" man)))))))
+    (inputs
+     `(("zlib" ,zlib)))
+    (home-page "https://github.com/tummychow/git-absorb")
+    (synopsis "Git tool for making automatic fixup commits")
+    (description
+"@code{git absorb} allows the user to automatically absorb staged changes
+into their current branch.  @code{git absorb} will automatically identify
+which commits are safe to modify, and which staged changes belong to each
+of those commits.  It will then write @code{fixup!} commits for each of
+those changes.")
+    (license license:bsd-3)))
+
 (define-public zoxide
   (package
     (name "zoxide")
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#52296; Package guix-patches. (Sun, 05 Dec 2021 13:08:37 GMT) Full text and rfc822 format available.

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

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: jgart via Guix-patches via <guix-patches <at> gnu.org>
Cc: 52296 <at> debbugs.gnu.org, jgart <jgart <at> dismail.de>
Subject: Re: [bug#52296] [PATCH 1/4] gnu: Add rust-memchr-2.3.
Date: Sun, 05 Dec 2021 14:05:36 +0100
Hello,

jgart via Guix-patches via <guix-patches <at> gnu.org> writes:

> * gnu/packages/crates-io.scm (rust-memchr-2.3): New variable.

We usually don't add a new Rust package for minor version bumps after
1.0. The way to go would be to relax version requirements in
Cargo.toml so we can use rust-memchr-2. See for example
rust-average-0.13 package.

The same goes for rust-slog-async-2.5 and rust-tempfile-3.1.

Could you give it a try?


Regards,
-- 
Nicolas Goaziou




Information forwarded to guix-patches <at> gnu.org:
bug#52296; Package guix-patches. (Sun, 05 Dec 2021 13:09:04 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#52296; Package guix-patches. (Sun, 05 Dec 2021 18:09:07 GMT) Full text and rfc822 format available.

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

From: jgart <jgart <at> dismail.de>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: 52296 <at> debbugs.gnu.org, jgart via Guix-patches via <guix-patches <at> gnu.org>
Subject: Re: [bug#52296] [PATCH 1/4] gnu: Add rust-memchr-2.3.
Date: Sun, 5 Dec 2021 10:06:46 -0500
On Sun, 05 Dec 2021 14:05:36 +0100 Nicolas Goaziou <mail <at> nicolasgoaziou.fr> wrote:
> Hello,
> 
> jgart via Guix-patches via <guix-patches <at> gnu.org> writes:
> 
> > * gnu/packages/crates-io.scm (rust-memchr-2.3): New variable.
> 
> We usually don't add a new Rust package for minor version bumps after
> 1.0. The way to go would be to relax version requirements in
> Cargo.toml so we can use rust-memchr-2. See for example
> rust-average-0.13 package.
> 
> The same goes for rust-slog-async-2.5 and rust-tempfile-3.1.

Hi Nicolas,

Thank you for taking the time to review this patch set.

rust-slog and rust-slog-async have the exact same version in the toml file:

```
[dependencies.slog]
version = "~2.5"

[dependencies.slog-async]
version = "~2.5"
```

The versions currently packaged in guix are slog 2.5.2 and slog-async 2.6.0.

I'm stumped on how to differentiate those two using `substitute*`

What do you suggest I do here?





Information forwarded to guix-patches <at> gnu.org:
bug#52296; Package guix-patches. (Sun, 05 Dec 2021 18:09:12 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#52296; Package guix-patches. (Sun, 05 Dec 2021 18:14:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: jgart <jgart <at> dismail.de>
Cc: 52296 <at> debbugs.gnu.org, jgart via Guix-patches via <guix-patches <at> gnu.org>
Subject: Re: [bug#52296] [PATCH 1/4] gnu: Add rust-memchr-2.3.
Date: Sun, 05 Dec 2021 19:13:51 +0100
Hello,

jgart <jgart <at> dismail.de> writes:

> rust-slog and rust-slog-async have the exact same version in the toml file:
>
> ```
> [dependencies.slog]
> version = "~2.5"
>
> [dependencies.slog-async]
> version = "~2.5"
> ```
>
> The versions currently packaged in guix are slog 2.5.2 and slog-async 2.6.0.
>
> I'm stumped on how to differentiate those two using `substitute*`
>
> What do you suggest I do here?

In a subtle fashion, I would change both to "^2" and cross fingers.

Regards,
-- 
Nicolas Goaziou




Information forwarded to guix-patches <at> gnu.org:
bug#52296; Package guix-patches. (Sun, 05 Dec 2021 18:15:01 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#52296; Package guix-patches. (Mon, 06 Dec 2021 03:19:01 GMT) Full text and rfc822 format available.

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

From: jgart <jgart <at> dismail.de>
To: 52296 <at> debbugs.gnu.org
Cc: jgart <jgart <at> dismail.de>
Subject: [PATCH v2] gnu: Add git-absorb.
Date: Sun,  5 Dec 2021 22:16:27 -0500
Hi Nicolas,

Here's the updated and smaller patchset. It worked! :)

all best,

jgart

* gnu/packages/rust-apps.scm (git-absorb): New variable.
---
 gnu/packages/rust-apps.scm | 53 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index be60f3f376..02f9592adc 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2021 Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2021 Petr Hodina <phodina <at> protonmail.com>
+;;; Copyright © 2021 jgart <jgart <at> dismail.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1204,6 +1205,58 @@ (define-public tealdeer
 Full featured offline client with caching support.")
     (license (list license:expat license:asl2.0))))
 
+(define-public git-absorb
+  (package
+    (name "git-absorb")
+    (version "0.6.6")
+    (source
+     (origin
+       ;; crates.io does not include the manual page.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/tummychow/git-absorb")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "04v10bn24acify34vh5ayymsr1flcyb05f3az9k1s2m6nlxy5gb9"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:cargo-inputs
+        (("rust-anyhow" ,rust-anyhow-1)
+         ("rust-clap" ,rust-clap-2)
+         ("rust-git2" ,rust-git2-0.13)
+         ("rust-memchr" ,rust-memchr-2)
+         ("rust-slog" ,rust-slog-2)
+         ("rust-slog-async" ,rust-slog-async-2)
+         ("rust-slog-term" ,rust-slog-term-2))
+        #:cargo-development-inputs
+        (("rust-tempfile" ,rust-tempfile-3))
+        #:phases
+        (modify-phases %standard-phases
+          (add-after 'unpack 'fix-version-requirements
+            (lambda _
+              (substitute* "Cargo.toml"
+                (("2.5") "2")
+                (("~2.3\"") "2\"")
+                (("3.1") "3"))))
+          (add-after 'install 'install-manual-page
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let* ((out   (assoc-ref outputs "out"))
+                     (man   (string-append out "/share/man/man1")))
+                (install-file "Documentation/git-absorb.1" man)))))))
+    (inputs
+     `(("zlib" ,zlib)))
+    (home-page "https://github.com/tummychow/git-absorb")
+    (synopsis "Git tool for making automatic fixup commits")
+    (description
+"@code{git absorb} allows the user to automatically absorb staged changes
+into their current branch.  @code{git absorb} will automatically identify
+which commits are safe to modify, and which staged changes belong to each
+of those commits.  It will then write @code{fixup!} commits for each of
+those changes.")
+    (license license:bsd-3)))
+
 (define-public zoxide
   (package
     (name "zoxide")
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#52296; Package guix-patches. (Mon, 06 Dec 2021 09:51:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: jgart via Guix-patches via <guix-patches <at> gnu.org>
Cc: jgart <jgart <at> dismail.de>, 52296-done <at> debbugs.gnu.org
Subject: Re: [bug#52296] [PATCH v2] gnu: Add git-absorb.
Date: Mon, 06 Dec 2021 10:49:59 +0100
Hello,

jgart via Guix-patches via <guix-patches <at> gnu.org> writes:

> Here's the updated and smaller patchset. It worked! :)

Great! I fixed indentation and appliet it. Thank you.

Regards,
-- 
Nicolas Goaziou




Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Mon, 06 Dec 2021 09:51:02 GMT) Full text and rfc822 format available.

Notification sent to jgart <jgart <at> dismail.de>:
bug acknowledged by developer. (Mon, 06 Dec 2021 09:51:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#52296; Package guix-patches. (Mon, 06 Dec 2021 09:57:01 GMT) Full text and rfc822 format available.

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

From: jgart <jgart <at> dismail.de>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: 52296-done <at> debbugs.gnu.org,
 jgart via Guix-patches via <guix-patches <at> gnu.org>
Subject: Re: [bug#52296] [PATCH v2] gnu: Add git-absorb.
Date: Mon, 6 Dec 2021 04:56:10 -0500
On Mon, 06 Dec 2021 10:49:59 +0100 Nicolas Goaziou <mail <at> nicolasgoaziou.fr> wrote:
> Hello,
> 
> jgart via Guix-patches via <guix-patches <at> gnu.org> writes:
> 
> > Here's the updated and smaller patchset. It worked! :)
> 
> Great! I fixed indentation and appliet it. Thank you.
> 
> Regards,
> -- 
> Nicolas Goaziou

Thank you! Much appreciated




Information forwarded to guix-patches <at> gnu.org:
bug#52296; Package guix-patches. (Mon, 06 Dec 2021 09:57:02 GMT) Full text and rfc822 format available.

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

This bug report was last modified 2 years and 75 days ago.

Previous Next


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