Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/docker-registry/files/
Date: Sat, 28 Sep 2019 21:57:06
Message-Id: 1569707805.e14174e202816166c529e6f9348edcfb744db11a.zmedico@gentoo
1 commit: e14174e202816166c529e6f9348edcfb744db11a
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Sat Sep 28 07:41:37 2019 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 28 21:56:45 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e14174e2
7
8 app-emulation/docker-registry: remove unused patch
9
10 Closes: https://github.com/gentoo/gentoo/pull/13066
11 Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
12 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
13
14 ...ocker-registry-2.6.1-notifications-expvar.patch | 64 ----------------------
15 1 file changed, 64 deletions(-)
16
17 diff --git a/app-emulation/docker-registry/files/docker-registry-2.6.1-notifications-expvar.patch b/app-emulation/docker-registry/files/docker-registry-2.6.1-notifications-expvar.patch
18 deleted file mode 100644
19 index 1d40edf1f0c..00000000000
20 --- a/app-emulation/docker-registry/files/docker-registry-2.6.1-notifications-expvar.patch
21 +++ /dev/null
22 @@ -1,64 +0,0 @@
23 -From 9a58c91051e03b46f1461e371a7bf527c1284612 Mon Sep 17 00:00:00 2001
24 -From: Noah Treuhaft <noah.treuhaft@××××××.com>
25 -Date: Wed, 8 Feb 2017 11:38:44 -0800
26 -Subject: [PATCH] notifications: fix expvar for Go 1.7
27 -
28 -Remove EndpointConfig.Transport from the return value of the
29 -registry.notifications.endpoints expvar.Func. It results in an empty
30 -value for that expvar variable under Go 1.7 because it is a non-nil
31 -*http.Transport, which Go 1.7 can no longer encode as JSON.
32 -
33 -Signed-off-by: Noah Treuhaft <noah.treuhaft@××××××.com>
34 ----
35 - notifications/endpoint.go | 2 +-
36 - notifications/metrics_test.go | 28 ++++++++++++++++++++++++++++
37 - 2 files changed, 29 insertions(+), 1 deletion(-)
38 - create mode 100644 notifications/metrics_test.go
39 -
40 -diff --git a/src/github.com/docker/distribution/notifications/endpoint.go b/src/github.com/docker/distribution/notifications/endpoint.go
41 -index 29a9e27b5..44d0f6d7b 100644
42 ---- a/src/github.com/docker/distribution/notifications/endpoint.go
43 -+++ b/src/github.com/docker/distribution/notifications/endpoint.go
44 -@@ -13,7 +13,7 @@ type EndpointConfig struct {
45 - Threshold int
46 - Backoff time.Duration
47 - IgnoredMediaTypes []string
48 -- Transport *http.Transport
49 -+ Transport *http.Transport `json:"-"`
50 - }
51 -
52 - // defaults set any zero-valued fields to a reasonable default.
53 -diff --git a/src/github.com/docker/distribution/notifications/metrics_test.go b/src/github.com/docker/distribution/notifications/metrics_test.go
54 -new file mode 100644
55 -index 000000000..03a08e2c8
56 ---- /dev/null
57 -+++ b/notifications/metrics_test.go
58 -@@ -0,0 +1,28 @@
59 -+package notifications
60 -+
61 -+import (
62 -+ "encoding/json"
63 -+ "expvar"
64 -+ "testing"
65 -+)
66 -+
67 -+func TestMetricsExpvar(t *testing.T) {
68 -+ endpointsVar := expvar.Get("registry").(*expvar.Map).Get("notifications").(*expvar.Map).Get("endpoints")
69 -+
70 -+ var v interface{}
71 -+ if err := json.Unmarshal([]byte(endpointsVar.String()), &v); err != nil {
72 -+ t.Fatalf("unexpected error unmarshaling endpoints: %v", err)
73 -+ }
74 -+ if v != nil {
75 -+ t.Fatalf("expected nil, got %#v", v)
76 -+ }
77 -+
78 -+ NewEndpoint("x", "y", EndpointConfig{})
79 -+
80 -+ if err := json.Unmarshal([]byte(endpointsVar.String()), &v); err != nil {
81 -+ t.Fatalf("unexpected error unmarshaling endpoints: %v", err)
82 -+ }
83 -+ if slice, ok := v.([]interface{}); !ok || len(slice) != 1 {
84 -+ t.Logf("expected one-element []interface{}, got %#v", v)
85 -+ }
86 -+}