[PATCH 0/7] gnu: kubo: Unbundle more packages.

  • Done
  • quality assurance status badge
Details
2 participants
  • Sharlatan Hellseher
  • Troy Figiel
Owner
unassigned
Submitted by
Sharlatan Hellseher
Severity
normal

Debbugs page

Sharlatan Hellseher wrote 1 years ago
(address . guix-patches@gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
cover.1709812934.git.sharlatanus@gmail.com
Hi Guix!

This patch series removes more bundled sources from vendor directory of kubo
project which were already available in Guix.

It still contains a long list of not packaged sources which would be great to
have packed in Guix.

Thanks,
Oleg

Sharlatan Hellseher (7):
gnu: go-github-com-blang-semver: Update to 3.8.0.
gnu: go-github-com-blang-semver: Fix indentation.
gnu: Add go-github-com-blang-semver-v4.
gnu: kubo: Sort inputs alphabetically.
gnu: go-github-com-beorn7-perks-quantile: Update to 1.0.1.
gnu: go-github-com-beorn7-perks-quantile: Fix indentation.
gnu: kubo: Unbundle more packages.

gnu/packages/golang-xyz.scm | 67 +++++++++++++++++++++++++------------
gnu/packages/ipfs.scm | 26 +++++++-------
gnu/packages/syncthing.scm | 43 ++++++++++++------------
3 files changed, 79 insertions(+), 57 deletions(-)


base-commit: 0f2eede9f1d4574813935b7f58384036d509002d
--
2.41.0
Sharlatan Hellseher wrote 1 years ago
[PATCH 1/7] gnu: go-github-com-blang-semver: Update to 3.8.0.
(address . 69608@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
22825f6b1572b2939347d6a322361f08991d72fd.1709812934.git.sharlatanus@gmail.com
* gnu/packages/golang-xyz.scm (go-github-com-blang-semver): Update to 3.8.0.

Change-Id: I5f1eec936236e4f8984d6aabbab9a9ce99e291a3
---
gnu/packages/golang-xyz.scm | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)

Toggle diff (39 lines)
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index 0b3db6e379..5734a50c95 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -285,20 +285,18 @@ (define-public go-github-com-bitly-timer-metrics
(license license:expat)))
(define-public go-github-com-blang-semver
- (let ((commit "60ec3488bfea7cca02b021d106d9911120d25fe9")
- (revision "0"))
(package
(name "go-github-com-blang-semver")
- (version (git-version "0.0.0" revision commit))
+ (version "3.8.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/blang/semver")
- (commit commit)))
+ (commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "19pli07y5592g4dyjyj0jq5rn548vc3fz0qg3624vm1j5828p1c2"))))
+ (base32 "16s66zbfkn35msmxpkiwf5dv91kzw7yzxzkcv8ma44j7lbgzx5qk"))))
(build-system go-build-system)
(arguments
'(#:import-path "github.com/blang/semver"))
@@ -306,7 +304,7 @@ (define-public go-github-com-blang-semver
(synopsis "Semantic versioning library written in Go")
(description
"Semver is a library for Semantic versioning written in Go.")
- (license license:expat))))
+ (license license:expat)))
(define-public go-github-com-bmizerany-perks-quantile
(package
--
2.41.0
Sharlatan Hellseher wrote 1 years ago
[PATCH 2/7] gnu: go-github-com-blang-semver: Fix indentation.
(address . 69608@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
9a4ede206c28424127aa37e0fd49d190edd100c4.1709812934.git.sharlatanus@gmail.com
* gnu/packages/golang-xyz.scm (go-github-com-blang-semver): Fix
indentation.

Change-Id: I9b5e792f2ef859ad7a9d799ba1e369f96e53294b
---
gnu/packages/golang-xyz.scm | 40 ++++++++++++++++++-------------------
1 file changed, 20 insertions(+), 20 deletions(-)

Toggle diff (53 lines)
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index 5734a50c95..425a6f15af 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -285,26 +285,26 @@ (define-public go-github-com-bitly-timer-metrics
(license license:expat)))
(define-public go-github-com-blang-semver
- (package
- (name "go-github-com-blang-semver")
- (version "3.8.0")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/blang/semver")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32 "16s66zbfkn35msmxpkiwf5dv91kzw7yzxzkcv8ma44j7lbgzx5qk"))))
- (build-system go-build-system)
- (arguments
- '(#:import-path "github.com/blang/semver"))
- (home-page "https://github.com/blang/semver")
- (synopsis "Semantic versioning library written in Go")
- (description
- "Semver is a library for Semantic versioning written in Go.")
- (license license:expat)))
+ (package
+ (name "go-github-com-blang-semver")
+ (version "3.8.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/blang/semver")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "16s66zbfkn35msmxpkiwf5dv91kzw7yzxzkcv8ma44j7lbgzx5qk"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/blang/semver"))
+ (home-page "https://github.com/blang/semver")
+ (synopsis "Semantic versioning library written in Go")
+ (description
+ "Semver is a library for Semantic versioning written in Go.")
+ (license license:expat)))
(define-public go-github-com-bmizerany-perks-quantile
(package
--
2.41.0
Sharlatan Hellseher wrote 1 years ago
[PATCH 4/7] gnu: kubo: Sort inputs alphabetically.
(address . 69608@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
2e6b3bc6c6d9f14f2c50e00baa9c4ff8a939a669.1709812934.git.sharlatanus@gmail.com
* gnu/packages/ipfs.scm (kudo) [inputs]: Sort alphabetically to ease
maintenance.

Change-Id: Icb95464b5b8cf7d6e26285628198cfcd5c90e695
---
gnu/packages/ipfs.scm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

Toggle diff (45 lines)
diff --git a/gnu/packages/ipfs.scm b/gnu/packages/ipfs.scm
index 36eed11802..bad65f04a0 100644
--- a/gnu/packages/ipfs.scm
+++ b/gnu/packages/ipfs.scm
@@ -317,9 +317,9 @@ (define-public kubo
go-github-com-francoispqt-gojay
go-github-com-fsnotify-fsnotify
go-github-com-gogo-protobuf
- go-github-com-google-uuid
go-github-com-golang-groupcache-lru
go-github-com-golang-snappy
+ go-github-com-google-uuid
go-github-com-gorilla-mux
go-github-com-gorilla-websocket
go-github-com-jackpal-go-nat-pmp
@@ -344,12 +344,11 @@ (define-public kubo
go-github-com-spaolacci-murmur3
go-github-com-stretchr-testify
go-github-com-syndtr-goleveldb
- go-gopkg-in-yaml-v2
- go-gopkg-in-yaml-v3
go-go-uber-org-atomic
go-go-uber-org-multierr
go-go-uber-org-zap
go-golang-org-x-crypto
+ go-golang-org-x-exp
go-golang-org-x-lint
go-golang-org-x-mod
go-golang-org-x-net
@@ -357,10 +356,11 @@ (define-public kubo
go-golang-org-x-sync
go-golang-org-x-sys
go-golang-org-x-term
+ go-golang-org-x-text
go-golang-org-x-tools
go-golang-org-x-xerrors
- go-golang-org-x-exp
- go-golang-org-x-text
+ go-gopkg-in-yaml-v2
+ go-gopkg-in-yaml-v3
go-lukechampine-com-blake3))
(native-inputs
(append (if (%current-target-system)
--
2.41.0
Sharlatan Hellseher wrote 1 years ago
[PATCH 5/7] gnu: go-github-com-beorn7-perks-quantile: Update to 1.0.1.
(address . 69608@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
5337a784d1ae48db97e7acd3aad8bf6437de77d8.1709812934.git.sharlatanus@gmail.com
* gnu/packages/syncthing.scm (go-github-com-beorn7-perks-quantile):
Update to 1.0.1.

Change-Id: Ie8c864dbc15b3aef3e4575337b940b625d6f9bbf
---
gnu/packages/syncthing.scm | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)

Toggle diff (39 lines)
diff --git a/gnu/packages/syncthing.scm b/gnu/packages/syncthing.scm
index d09b03bcdb..4d1e1c9ada 100644
--- a/gnu/packages/syncthing.scm
+++ b/gnu/packages/syncthing.scm
@@ -707,20 +707,18 @@ (define-public go-github-com-syncthing-notify
(license expat))))
(define-public go-github-com-beorn7-perks-quantile
- (let ((commit "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9")
- (revision "0"))
(package
(name "go-github-com-beorn7-perks-quantile")
- (version (git-version "0.0.0" revision commit))
+ (version "1.0.1")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/beorn7/perks")
- (commit commit)))
+ (commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
- "1hrybsql68xw57brzj805xx2mghydpdiysv3gbhr7f5wlxj2514y"))))
+ "17n4yygjxa6p499dj3yaqzfww2g7528165cl13haj97hlx94dgl7"))))
(build-system go-build-system)
(arguments
'(#:import-path "github.com/beorn7/perks/quantile"
@@ -730,7 +728,7 @@ (define-public go-github-com-beorn7-perks-quantile
approximate quantiles over an unbounded data stream within low memory and CPU
bounds.")
(home-page "https://github.com/beorn7/perks")
- (license expat))))
+ (license expat)))
(define-public go-github-com-matttproud-golang-protobuf-extensions-pbutil
(let ((commit "c12348ce28de40eed0136aa2b644d0ee0650e56c")
--
2.41.0
Sharlatan Hellseher wrote 1 years ago
[PATCH 3/7] gnu: Add go-github-com-blang-semver-v4.
(address . 69608@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
3ed67f81b7a93d06484822244a346624804d2cb5.1709812934.git.sharlatanus@gmail.com
* gnu/packages/golang-xyz.scm (go-github-com-blang-semver-v4): New variable.

Change-Id: I87132b1b727b7e6ef4d46bb08dc5ad509db4e2e4
---
gnu/packages/golang-xyz.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index 425a6f15af..2b0aa97f99 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -306,6 +306,31 @@ (define-public go-github-com-blang-semver
"Semver is a library for Semantic versioning written in Go.")
(license license:expat)))
+(define-public go-github-com-blang-semver-v4
+ (package
+ (inherit go-github-com-blang-semver)
+ (name "go-github-com-blang-semver-v4")
+ (version "4.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/blang/semver")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "14h9ys4n4kx9cbj42lkdf4i5k3nkll6sd62jcvl7cs565v6fiknz"))))
+ (arguments
+ (list
+ #:import-path "github.com/blang/semver/v4"
+ #:unpack-path "github.com/blang/semver"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'remove-examples
+ (lambda* (#:key import-path #:allow-other-keys)
+ (delete-file-recursively
+ (string-append "src/" import-path "/examples")))))))))
+
(define-public go-github-com-bmizerany-perks-quantile
(package
(name "go-github-com-bmizerany-perks-quantile")
--
2.41.0
Sharlatan Hellseher wrote 1 years ago
[PATCH 6/7] gnu: go-github-com-beorn7-perks-quantile: Fix indentation.
(address . 69608@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
535c7e38d7cd5ccdb418f35b42e11c3ea41a6cce.1709812934.git.sharlatanus@gmail.com
* gnu/packages/syncthing.scm (go-github-com-beorn7-perks-quantile): Fix
indentation.

Change-Id: Id159b4314fc25ecebc0737221995823e28045626
---
gnu/packages/syncthing.scm | 41 +++++++++++++++++++-------------------
1 file changed, 21 insertions(+), 20 deletions(-)

Toggle diff (56 lines)
diff --git a/gnu/packages/syncthing.scm b/gnu/packages/syncthing.scm
index 4d1e1c9ada..cf417fbe91 100644
--- a/gnu/packages/syncthing.scm
+++ b/gnu/packages/syncthing.scm
@@ -707,28 +707,29 @@ (define-public go-github-com-syncthing-notify
(license expat))))
(define-public go-github-com-beorn7-perks-quantile
- (package
- (name "go-github-com-beorn7-perks-quantile")
- (version "1.0.1")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/beorn7/perks")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "17n4yygjxa6p499dj3yaqzfww2g7528165cl13haj97hlx94dgl7"))))
- (build-system go-build-system)
- (arguments
- '(#:import-path "github.com/beorn7/perks/quantile"
- #:unpack-path "github.com/beorn7/perks"))
- (synopsis "Compute approximate quantiles over an unbounded data stream")
- (description "Perks contains the Go package @code{quantile} that computes
+ (package
+ (name "go-github-com-beorn7-perks-quantile")
+ (version "1.0.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/beorn7/perks")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "17n4yygjxa6p499dj3yaqzfww2g7528165cl13haj97hlx94dgl7"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/beorn7/perks/quantile"
+ #:unpack-path "github.com/beorn7/perks"))
+ (synopsis "Compute approximate quantiles over an unbounded data stream")
+ (description
+ "Perks contains the Go package @code{quantile} that computes
approximate quantiles over an unbounded data stream within low memory and CPU
bounds.")
- (home-page "https://github.com/beorn7/perks")
- (license expat)))
+ (home-page "https://github.com/beorn7/perks")
+ (license expat)))
(define-public go-github-com-matttproud-golang-protobuf-extensions-pbutil
(let ((commit "c12348ce28de40eed0136aa2b644d0ee0650e56c")
--
2.41.0
Sharlatan Hellseher wrote 1 years ago
[PATCH 7/7] gnu: kubo: Unbundle more packages.
(address . 69608@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
2e89095c79519b44e0bec91c6d61454bc19817e0.1709812934.git.sharlatanus@gmail.com
* gnu/packages/ipfs.scm (kubo) [snippet]: Remove more available vendor
packages.
[inputs]: Add go-github-com-benbjohnson-clock and
go-github-com-blang-semver-v4. Remove go-github-com-cheggaaa-pb-v3,
fail over to vendor package explicitly as v3 is not required.

Change-Id: I8317ea656120b034a98d180278b928f0744f5fbb
---
gnu/packages/ipfs.scm | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

Toggle diff (46 lines)
diff --git a/gnu/packages/ipfs.scm b/gnu/packages/ipfs.scm
index bad65f04a0..0a1065535b 100644
--- a/gnu/packages/ipfs.scm
+++ b/gnu/packages/ipfs.scm
@@ -241,10 +241,13 @@ (define-public kubo
(snippet '(for-each delete-file-recursively
;; TODO: unbundle the rest as well
'("vendor/github.com/alecthomas"
- ;; "vendor/github.com/blang"
+ "vendor/github.com/benbjohnson/clock"
+ "vendor/github.com/beorn7/perks"
+ "vendor/github.com/blang"
"vendor/github.com/cespare"
- ;; TODO: Go files not found
- ;; "vendor/github.com/cheggaaa"
+ ;; TODO: kubo depends on v1.0.29 which is way too
+ ;; hard to back port.
+ ; "vendor/github.com/cheggaaa/pb"
"vendor/github.com/davecgh"
"vendor/github.com/dustin"
"vendor/github.com/flynn"
@@ -261,8 +264,6 @@ (define-public kubo
;; "vendor/github.com/ipld"
"vendor/github.com/jackpal"
"vendor/github.com/klauspost"
- ;; TODO: Go files not found
- ;; "vendor/github.com/lucas-clemente"
"vendor/github.com/mattn"
"vendor/github.com/mgutz"
"vendor/github.com/minio"
@@ -306,11 +307,10 @@ (define-public kubo
#~(string-append #$output "/bin/ipfs"))
"commands" "completion" "bash")))))))))
(inputs (list go-github-com-alecthomas-units
- ;; TODO: needs to be updated first
- ;; go-github-com-blang-semver
+ go-github-com-benbjohnson-clock
+ go-github-com-blang-semver-v4
go-github-com-cespare-xxhash
go-github-com-cheekybits-genny
- go-github-com-cheggaaa-pb-v3
go-github-com-davecgh-go-spew
go-github-com-dustin-go-humanize
go-github-com-flynn-noise
--
2.41.0
Troy Figiel wrote 1 years ago
(address . 69608@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
48d77090-85b6-4f25-b306-e9ead3dbd898@troyfigiel.com
Hi Oleg,

Quick note for the future, not a review.

On 2024-03-07 13:18, Sharlatan Hellseher wrote:
Toggle quote (26 lines)
> (snippet '(for-each delete-file-recursively
> ;; TODO: unbundle the rest as well
> '("vendor/github.com/alecthomas"
> - ;; "vendor/github.com/blang"
> + "vendor/github.com/benbjohnson/clock"
> + "vendor/github.com/beorn7/perks"
> + "vendor/github.com/blang"
> "vendor/github.com/cespare"
> - ;; TODO: Go files not found
> - ;; "vendor/github.com/cheggaaa"
> + ;; TODO: kubo depends on v1.0.29 which is way too
> + ;; hard to back port.
> + ; "vendor/github.com/cheggaaa/pb"
> "vendor/github.com/davecgh"
> "vendor/github.com/dustin"
> "vendor/github.com/flynn"
> @@ -261,8 +264,6 @@ (define-public kubo
> ;; "vendor/github.com/ipld"
> "vendor/github.com/jackpal"
> "vendor/github.com/klauspost"
> - ;; TODO: Go files not found
> - ;; "vendor/github.com/lucas-clemente"
> "vendor/github.com/mattn"
> "vendor/github.com/mgutz"
> "vendor/github.com/minio"

A phase that removes the "vendor" directory (if it exists), would be
nice. "vendor" is the standard location Go uses to bundle all
dependencies, so it would be a simple way to get rid of most/all bundled
dependencies of a package. I noticed Nix indeed uses a similar step in
their build process.

Best wishes,

Troy
Sharlatan Hellseher wrote 12 months ago
[PATCH 0/7] gnu: kubo: Unbundle more packages.
(address . 69608-done@debbugs.gnu.org)
87le6jhwiw.fsf@gmail.com
Pushed as 74cab6cd03..f59f85bdeb to master.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmX04hcACgkQdtcnv/Ys
0rXl2RAAhAJOzA9LFzHSF/9tC4I/T/aOJVMPMweKfp6dXXKd4ovU5peYVvS0z88U
sIK1OkRyh0naOHq9Ox/Fzn55e9tCLZE5iqcjzDrFaCVL/Daqql5lGkL5maRcynIx
ZO14Y0xV1NDFdkjSCFEfrudO8JkZxTAal64Xmaig+bhMo5q2xdFFEoPgwbk6cuLY
Y/nIyjMVd8EFc9GFDgoRfYmHbmkJJwhuayOTpR+UmBpa3QyXfm1S3DO5qlK/kP1L
c/kq5Ky3yTcLGpB7hCZJl6nmA1xBdz+iMcjdgKbjISY12C1EQOdqokzBJ/opJ0gt
WnUns+qEKKADM1D3KwSokz2nsjVb+QO9GHHjxBygLrlIyyTC0Fs+zxKgEIjFlNBP
GKMx0M/KSFnvCMTjzabF1bwMQIDHURFOYj1bzVLTsoDIYy4GrUbh+1I/+16qs3+H
2wHsu2bRf+aUB9l9CpvU8fzxlYanfgPmHaGtFXPs2wX6yIiaRDaSFbPNkrqYna3M
v0Cu4JQFQHnOBmwKY+MfiGO6/rU5Jn9VrI0WFk7ul49jC3X87qS3KHy93MN+ae0/
XQp4BRbTV+hhlnukfO1AlqSLqvCobXTCCROUFy26s+Mn+VuDm3KvySLBVvpeP1E7
bHbxc/J9Bw6J0p91Rk96KIhF90Lp3UZcfRl1E4QtBW2QFD+7So0=
=JCO6
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 69608@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 69608
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help