unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Leo Nikkilä" <hello@lnikki.la>
To: 54560@debbugs.gnu.org
Cc: "Leo Nikkilä" <hello@lnikki.la>
Subject: [bug#54560] [PATCH 04/47] gnu: go-github-com-prometheus-client-golang: Update to 1.12.1.
Date: Fri, 25 Mar 2022 15:31:28 +0200	[thread overview]
Message-ID: <20220325133211.5128-4-hello@lnikki.la> (raw)
In-Reply-To: <20220325133211.5128-1-hello@lnikki.la>

* gnu/packages/patches/go-github-com-prometheus-common-remove-readidletimeout.patch:
New patch, avoid updating go-golang-org-x-net just yet.
* gnu/packages/syncthing.scm (go-github-com-prometheus-client-golang):
Update to 1.12.1.
(go-github-com-prometheus-client-model): Update to 0.2.0.
(go-github-com-prometheus-common): Update to 0.32.1.
[patches]: Use patch.
(go-github-com-prometheus-procfs): Update to 0.7.3.
{unpack-test-data}, {delete-test-data}: New phases.
[arguments]: Enable tests.
---
 ...etheus-common-remove-readidletimeout.patch |  28 +++
 gnu/packages/syncthing.scm                    | 182 ++++++++++--------
 2 files changed, 130 insertions(+), 80 deletions(-)
 create mode 100644 gnu/packages/patches/go-github-com-prometheus-common-remove-readidletimeout.patch

diff --git a/gnu/packages/patches/go-github-com-prometheus-common-remove-readidletimeout.patch b/gnu/packages/patches/go-github-com-prometheus-common-remove-readidletimeout.patch
new file mode 100644
index 0000000000..4eea8ae5c5
--- /dev/null
+++ b/gnu/packages/patches/go-github-com-prometheus-common-remove-readidletimeout.patch
@@ -0,0 +1,28 @@
+ConfigureTransports was introduced in a newer version of
+go-golang-org-x-net:
+<https://github.com/golang/net/commit/08b38378de702b893ee869b94b32f833e2933bd2>
+
+Prior to this, Prometheus didn't configure ReadIdleTimeout:
+<https://github.com/prometheus/common/commit/b5c358997cbf126e8f8518cdc024c32da3996d48>
+
+It's somewhat unclear whether ReadIdleTimeout is absolutely required to
+work around the upstream issues with HTTP/2 mentioned in the codebase,
+however HTTP/2 can be disabled using enable_http2 if this is the case.
+
+diff --git a/config/http_config.go b/config/http_config.go
+index 4b87241..7698ba4 100644
+--- a/config/http_config.go
++++ b/config/http_config.go
+@@ -411,11 +411,10 @@ func NewRoundTripperFromConfig(cfg HTTPClientConfig, name string, optFuncs ...HT
+ 			// issues again, but will be removed once we are confident that
+ 			// things work as expected.
+ 
+-			http2t, err := http2.ConfigureTransports(rt.(*http.Transport))
++			err := http2.ConfigureTransport(rt.(*http.Transport))
+ 			if err != nil {
+ 				return nil, err
+ 			}
+-			http2t.ReadIdleTimeout = time.Minute
+ 		}
+ 
+ 		// If a authorization_credentials is provided, create a round tripper that will set the
diff --git a/gnu/packages/syncthing.scm b/gnu/packages/syncthing.scm
index 107b97e547..b9c72a3212 100644
--- a/gnu/packages/syncthing.scm
+++ b/gnu/packages/syncthing.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
+;;; Copyright © 2022 Leo Nikkilä <hello@lnikki.la>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -819,34 +820,32 @@ (define-public go-github-com-beorn7-perks-quantile
       (license expat))))
 
 (define-public go-github-com-prometheus-client-model
-  (let ((commit "14fe0d1b01d4d5fc031dd4bec1823bd3ebbe8016")
-        (revision "2"))
-    (package
-      (name "go-github-com-prometheus-client-model")
-      (version (git-version "0.0.2" revision commit))
-      (source (origin
-                (method git-fetch)
-                (uri (git-reference
-                       (url "https://github.com/prometheus/client_model")
-                       (commit commit)))
-                (file-name (git-file-name name version))
-                (sha256
-                 (base32
-                  "0zdmk6rbbx39cvfz0r59v2jg5sg9yd02b4pds5n5llgvivi99550"))))
-      (build-system go-build-system)
-      (arguments
-       '(#:import-path "github.com/prometheus/client_model"
-         #:tests? #f
-         #:phases
-         (modify-phases %standard-phases
-           ;; Source-only package
-           (delete 'build))))
-      (propagated-inputs
-       (list go-github-com-golang-protobuf-proto))
-      (synopsis "Data model artifacts for Prometheus")
-      (description "This package provides data model artifacts for Prometheus.")
-      (home-page "https://github.com/prometheus/client_model")
-      (license asl2.0))))
+  (package
+    (name "go-github-com-prometheus-client-model")
+    (version "0.2.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/prometheus/client_model")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0jffnz94d6ff39fr96b5w8i8yk26pwnrfggzz8jhi8k0yihg2c9d"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/prometheus/client_model"
+       #:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         ;; Source-only package
+         (delete 'build))))
+    (propagated-inputs (list go-github-com-golang-protobuf-proto
+                             go-github-com-golang-protobuf-ptypes))
+    (synopsis "Data model artifacts for Prometheus")
+    (description "This package provides data model artifacts for Prometheus.")
+    (home-page "https://github.com/prometheus/client_model")
+    (license asl2.0)))
 
 (define-public go-github-com-matttproud-golang-protobuf-extensions-pbutil
   (let ((commit "c12348ce28de40eed0136aa2b644d0ee0650e56c")
@@ -879,65 +878,87 @@ (define-public go-github-com-matttproud-golang-protobuf-extensions-pbutil
       (license asl2.0))))
 
 (define-public go-github-com-prometheus-common
-    (package
-      (name "go-github-com-prometheus-common")
-      (version "0.4.1")
-      (source (origin
-                (method git-fetch)
-                (uri (git-reference
-                       (url "https://github.com/prometheus/common")
-                       (commit (string-append "v" version))))
-                (file-name (git-file-name name version))
-                (sha256
-                 (base32
-                  "0sf4sjdckblz1hqdfvripk3zyp8xq89w7q75kbsyg4c078af896s"))))
-      (build-system go-build-system)
-      (arguments
-       '(#:import-path "github.com/prometheus/common"
-         #:tests? #f
-         #:phases
-         (modify-phases %standard-phases
-           ;; Source-only package
-           (delete 'build))))
-      (propagated-inputs
-       (list go-github-com-golang-protobuf-proto
-             go-github-com-matttproud-golang-protobuf-extensions-pbutil
-             go-github-com-prometheus-client-model))
-      (synopsis "Prometheus metrics")
-      (description "This package provides tools for reading and writing
+  (package
+    (name "go-github-com-prometheus-common")
+    (version "0.32.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/prometheus/common")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0501dwlv427vr78c59h4z25vxzkzjx76haydjj4pql1sx44546vv"))
+              ;; This can be removed once go-golang-org-x-net is
+              ;; updated past 08b38378de702b893ee869b94b32f833e2933bd2.
+              (patches
+               (search-patches
+                "go-github-com-prometheus-common-remove-readidletimeout.patch"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/prometheus/common"
+                     #:tests? #f
+                     #:phases
+                     (modify-phases %standard-phases
+                       ;; Source-only package
+                       (delete 'build))))
+    (propagated-inputs
+     (list go-github-com-golang-protobuf-proto
+           go-github-com-golang-protobuf-ptypes
+           go-github-com-julienschmidt-httprouter
+           go-github-com-matttproud-golang-protobuf-extensions-pbutil
+           go-github-com-prometheus-client-model))
+    (synopsis "Prometheus metrics")
+    (description "This package provides tools for reading and writing
 Prometheus metrics.")
-      (home-page "https://github.com/prometheus/common")
-      (license asl2.0)))
+    (home-page "https://github.com/prometheus/common")
+    (license asl2.0)))
 
 (define-public go-github-com-prometheus-procfs
-    (package
-      (name "go-github-com-prometheus-procfs")
-      (version "0.0.4")
-      (source (origin
-                (method git-fetch)
-                (uri (git-reference
-                       (url "https://github.com/prometheus/procfs")
-                       (commit (string-append "v" version))))
-                (file-name (git-file-name name version))
-                (sha256
-                 (base32
-                  "1z5jq5rjala0a0di4nwk1rai0z9f73qwqj6mgcbpjbg2qknlb544"))))
-      (build-system go-build-system)
-      (arguments
-       '(#:import-path "github.com/prometheus/procfs"
-         ;; The tests require Go modules, which are not yet supported in Guix's
-         ;; Go build system.
-         #:tests? #f))
-      (synopsis "Go library for reading @file{/proc}")
-      (description "The @code{procfs} Go package provides functions to retrieve
+  (package
+    (name "go-github-com-prometheus-procfs")
+    (version "0.7.3")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/prometheus/procfs")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "00z7ghcb86y2ajx0xvwmn3d18nq4djmvmjn52crgm85gsl442lb4"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/prometheus/procfs"
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'unpack-test-data
+           (lambda* (#:key tests? import-path #:allow-other-keys)
+             (when tests?
+               (with-directory-excursion (string-append "src/" import-path)
+                 (invoke "make" "fixtures")))
+             #t))
+         ;; We don't want to install fixtures and other test data.
+         (add-before 'install 'delete-test-data
+           (lambda* (#:key import-path #:allow-other-keys)
+              (with-directory-excursion (string-append "src/" import-path)
+                (delete-file "ttar")
+                (delete-file "fixtures.ttar")
+                (delete-file-recursively "fixtures"))
+             #t)))))
+    (propagated-inputs (list go-golang-org-x-sys))
+    (native-inputs (list go-github-com-google-go-cmp-cmp))
+    (synopsis "Go library for reading @file{/proc}")
+    (description "The @code{procfs} Go package provides functions to retrieve
 system, kernel, and process metrics from the @file{/proc} pseudo file system.")
-      (home-page "https://github.com/prometheus/procfs")
-      (license asl2.0)))
+    (home-page "https://github.com/prometheus/procfs")
+    (license asl2.0)))
 
 (define-public go-github-com-prometheus-client-golang
     (package
       (name "go-github-com-prometheus-client-golang")
-      (version "1.2.1")
+      (version "1.12.1")
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -946,7 +967,7 @@ (define-public go-github-com-prometheus-client-golang
                 (file-name (git-file-name name version))
                 (sha256
                  (base32
-                  "0zs49psk23n9z8wrl02d5vib5wclpym8kaxcy6n5pk696i419065"))))
+                  "0d46nindizpjgdygryc140fd94j1qfkzwyzwh9p2g3zp6v4fw0s1"))))
       (build-system go-build-system)
       (arguments
        '(#:tests? #f
@@ -958,6 +979,7 @@ (define-public go-github-com-prometheus-client-golang
       (propagated-inputs
        (list go-github-com-beorn7-perks-quantile
              go-github-com-golang-protobuf-proto
+             go-github-com-golang-protobuf-ptypes
              go-github-com-prometheus-client-model
              go-github-com-prometheus-common
              go-github-com-prometheus-procfs
-- 
2.34.0





  parent reply	other threads:[~2022-03-25 14:11 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-25  5:55 [bug#54560] [PATCH 00/47] gnu: Add go-github-com-prometheus-prometheus Leo Nikkilä
2022-03-25 13:31 ` [bug#54560] [PATCH 01/47] gnu: Add go-google-golang-org-protobuf Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 02/47] gnu: go-github-com-golang-protobuf-proto: Update to 1.5.2 Leo Nikkilä
2022-03-25 19:12     ` Maxime Devos
2022-03-25 22:55       ` Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 03/47] gnu: Add go-github-com-golang-protobuf-ptypes Leo Nikkilä
2022-03-25 19:14     ` Maxime Devos
2022-03-25 13:31   ` Leo Nikkilä [this message]
2022-03-25 19:19     ` [bug#54560] [PATCH 04/47] gnu: go-github-com-prometheus-client-golang: Update to 1.12.1 Maxime Devos
2022-03-25 19:20     ` Maxime Devos
2022-03-25 19:22     ` Maxime Devos
2022-03-25 19:23     ` Maxime Devos
2022-03-25 19:24     ` Maxime Devos
2022-03-25 22:55       ` Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 05/47] gnu: Add go-github-com-asaskevich-govalidator Leo Nikkilä
2022-03-25 19:26     ` Maxime Devos
2022-03-25 13:31   ` [bug#54560] [PATCH 06/47] gnu: Add go-github-com-dennwc-varint Leo Nikkilä
2022-03-25 19:30     ` Maxime Devos
2022-03-25 13:31   ` [bug#54560] [PATCH 07/47] gnu: Add go-github-com-edsrzf-mmap-go Leo Nikkilä
2022-03-25 19:33     ` Maxime Devos
2022-03-25 19:35     ` Maxime Devos
2022-03-25 13:31   ` [bug#54560] [PATCH 08/47] gnu: Add go-github-com-go-logfmt-logfmt Leo Nikkilä
2022-03-25 19:38     ` Maxime Devos
2022-03-25 13:31   ` [bug#54560] [PATCH 09/47] gnu: Add go-github-com-go-kit-log Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 10/47] gnu: Add go-github-com-go-stack-stack Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 11/47] gnu: Add go-github-com-josharian-intern Leo Nikkilä
2022-03-25 19:40     ` Maxime Devos
2022-03-25 19:41     ` Maxime Devos
2022-03-25 13:31   ` [bug#54560] [PATCH 12/47] gnu: Add go-github-com-julienschmidt-httprouter Leo Nikkilä
2022-03-25 19:47     ` Maxime Devos
2022-03-25 13:31   ` [bug#54560] [PATCH 13/47] gnu: Add go-github-com-mailru-easyjson Leo Nikkilä
2022-03-25 19:49     ` Maxime Devos
2022-03-25 13:31   ` [bug#54560] [PATCH 14/47] gnu: Add go-github-com-modern-go-concurrent Leo Nikkilä
2022-03-25 19:50     ` Maxime Devos
2022-03-25 19:51     ` Maxime Devos
2022-03-25 13:31   ` [bug#54560] [PATCH 15/47] gnu: Add go-github-com-modern-go-reflect2 Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 16/47] gnu: Add go-github-com-montanaflynn-stats Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 17/47] gnu: Add go-github-com-mwitkow-go-conntrack Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 18/47] gnu: Add go-github-com-oklog-run Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 19/47] gnu: Add go-github-com-oklog-ulid Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 20/47] gnu: Add go-github-com-opentracing-contrib-go-stdlib Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 21/47] gnu: Add go-github-com-puerkitobio-urlesc Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 22/47] gnu: Add go-github-com-puerkitobio-purell Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 23/47] gnu: Add go-github-com-shurcool-httpgzip Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 24/47] gnu: Add go-github-com-shurcool-httpfs Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 25/47] gnu: Add go-github-com-shurcool-vfsgen Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 26/47] gnu: Add go-github-com-simonpasquier-klog-gokit Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 27/47] gnu: Add go-github-com-simonpasquier-klog-gokit-v3 Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 28/47] gnu: Add go-github-com-tidwall-pretty Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 29/47] gnu: Add go-github-com-uber-jaeger-lib Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 30/47] gnu: Add go-github-com-uber-jaeger-client-go Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 31/47] gnu: Add go-github-com-youmark-pkcs8 Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 32/47] gnu: Add go-go-uber-org-goleak Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 33/47] gnu: Add go-gopkg-in-alecthomas-kingpin.v2 Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 34/47] gnu: Add go-github-com-json-iterator-go Leo Nikkilä
2022-03-25 13:31   ` [bug#54560] [PATCH 35/47] gnu: Add go-go-mongodb-org-mongo-driver Leo Nikkilä
2022-03-25 13:32   ` [bug#54560] [PATCH 36/47] gnu: Add go-github-com-go-openapi-errors Leo Nikkilä
2022-03-25 13:32   ` [bug#54560] [PATCH 37/47] gnu: Add go-github-com-go-openapi-swag Leo Nikkilä
2022-03-25 13:32   ` [bug#54560] [PATCH 38/47] gnu: Add go-github-com-go-openapi-jsonpointer Leo Nikkilä
2022-03-25 13:32   ` [bug#54560] [PATCH 39/47] gnu: Add go-github-com-go-openapi-jsonreference Leo Nikkilä
2022-03-25 13:32   ` [bug#54560] [PATCH 40/47] gnu: Add go-github-com-go-openapi-spec Leo Nikkilä
2022-03-25 13:32   ` [bug#54560] [PATCH 41/47] gnu: Add go-github-com-go-openapi-strfmt Leo Nikkilä
2022-03-25 13:32   ` [bug#54560] [PATCH 42/47] gnu: Add go-github-com-go-openapi-analysis Leo Nikkilä
2022-03-25 13:32   ` [bug#54560] [PATCH 43/47] gnu: Add go-github-com-go-openapi-loads Leo Nikkilä
2022-03-25 13:32   ` [bug#54560] [PATCH 44/47] gnu: Add go-github-com-go-openapi-validate Leo Nikkilä
2022-03-25 13:32   ` [bug#54560] [PATCH 45/47] gnu: Add go-github-com-prometheus-alertmanager-api Leo Nikkilä
2022-03-25 13:32   ` [bug#54560] [PATCH 46/47] gnu: Add go-github-com-prometheus-exporter-toolkit Leo Nikkilä
2022-03-25 19:52     ` Maxime Devos
2022-03-25 22:55       ` Leo Nikkilä
2022-03-25 13:32   ` [bug#54560] [PATCH 47/47] gnu: Add go-github-com-prometheus-prometheus Leo Nikkilä
2022-03-25 20:04     ` Maxime Devos
2022-03-25 20:05     ` Maxime Devos
2022-03-25 22:55       ` Leo Nikkilä
2022-03-25 19:09   ` [bug#54560] [PATCH 01/47] gnu: Add go-google-golang-org-protobuf Maxime Devos
2022-03-25 19:15   ` Maxime Devos
2022-03-25 22:55     ` Leo Nikkilä
2022-03-26  9:31       ` Maxime Devos
2022-03-25 19:55 ` [bug#54560] [PATCH 00/47] gnu: Add go-github-com-prometheus-prometheus Maxime Devos
2022-03-25 19:59 ` Maxime Devos
2022-03-25 22:53   ` Leo Nikkilä
2022-03-26  9:18     ` Maxime Devos
2022-03-26  9:36     ` Maxime Devos
2024-05-23 15:20 ` Sharlatan Hellseher
2024-08-25 23:23 ` Sharlatan Hellseher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220325133211.5128-4-hello@lnikki.la \
    --to=hello@lnikki.la \
    --cc=54560@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).