diff -Nru golang-github-prometheus-common-0.15.0/debian/changelog golang-github-prometheus-common-0.15.0/debian/changelog --- golang-github-prometheus-common-0.15.0/debian/changelog 2021-01-26 20:19:08.000000000 +0000 +++ golang-github-prometheus-common-0.15.0/debian/changelog 2021-06-23 17:25:06.000000000 +0000 @@ -1,3 +1,11 @@ +golang-github-prometheus-common (0.15.0-2ubuntu1) impish; urgency=medium + + * Cherry pick code from upstream to fix an issue with RootCA comparison. As + of go 1.16 these RootCAs will never be equal, so we just compare the + subjects instead of the entire value. (LP: #1930772) + + -- William 'jawn-smith' Wilson Wed, 23 Jun 2021 17:25:06 +0000 + golang-github-prometheus-common (0.15.0-2) unstable; urgency=medium * Team upload. diff -Nru golang-github-prometheus-common-0.15.0/debian/control golang-github-prometheus-common-0.15.0/debian/control --- golang-github-prometheus-common-0.15.0/debian/control 2021-01-26 20:07:34.000000000 +0000 +++ golang-github-prometheus-common-0.15.0/debian/control 2021-06-23 17:25:06.000000000 +0000 @@ -1,5 +1,6 @@ Source: golang-github-prometheus-common -Maintainer: Debian Go Packaging Team +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Go Packaging Team Uploaders: Martina Ferrari , Anthony Fok , Lucas Kanashiro , diff -Nru golang-github-prometheus-common-0.15.0/debian/patches/0003-fix-rootca-comparison-in-TestTLSConfig.patch golang-github-prometheus-common-0.15.0/debian/patches/0003-fix-rootca-comparison-in-TestTLSConfig.patch --- golang-github-prometheus-common-0.15.0/debian/patches/0003-fix-rootca-comparison-in-TestTLSConfig.patch 1970-01-01 00:00:00.000000000 +0000 +++ golang-github-prometheus-common-0.15.0/debian/patches/0003-fix-rootca-comparison-in-TestTLSConfig.patch 2021-06-23 17:25:06.000000000 +0000 @@ -0,0 +1,29 @@ +Description: Stop direct comparison of RootCAs + As of go 1.16, the behavior of creating RootCAs has changed, and they will never be equal. + Because of this, we should just check that the subjects are the same rather than all of the + data being exactly the same. +Origin: upstream, https://github.com/prometheus/common/commit/10e1378a4a94394e5671c529b7d87833c2b70d13 +Bug: https://github.com/prometheus/common/issues/267 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/golang-github-prometheus-common/+bug/1930772 +Last-Update: 2021-06-23 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: golang-github-prometheus-common-0.15.0/config/http_config_test.go +=================================================================== +--- golang-github-prometheus-common-0.15.0.orig/config/http_config_test.go ++++ golang-github-prometheus-common-0.15.0/config/http_config_test.go +@@ -408,6 +408,14 @@ func TestTLSConfig(t *testing.T) { + t.Fatalf("Unexpected client certificate result: \n\n%+v\n expected\n\n%+v", cert, clientCertificate) + } + ++ // tlsConfig.rootCAs.LazyCerts contains functions getCert() in go 1.16, which are ++ // never equal. Compare the Subjects instead. ++ if !reflect.DeepEqual(tlsConfig.RootCAs.Subjects(), expectedTLSConfig.RootCAs.Subjects()) { ++ t.Fatalf("Unexpected RootCAs result: \n\n%+v\n expected\n\n%+v", tlsConfig.RootCAs.Subjects(), expectedTLSConfig.RootCAs.Subjects()) ++ } ++ tlsConfig.RootCAs = nil ++ expectedTLSConfig.RootCAs = nil ++ + // non-nil functions are never equal. + tlsConfig.GetClientCertificate = nil + if !reflect.DeepEqual(tlsConfig, expectedTLSConfig) { diff -Nru golang-github-prometheus-common-0.15.0/debian/patches/series golang-github-prometheus-common-0.15.0/debian/patches/series --- golang-github-prometheus-common-0.15.0/debian/patches/series 2021-01-23 00:51:23.000000000 +0000 +++ golang-github-prometheus-common-0.15.0/debian/patches/series 2021-06-23 17:25:06.000000000 +0000 @@ -1,2 +1,3 @@ 01-Fix_log_test.patch 0002-Revert-API-break-in-NewClientFromConfig.patch +0003-fix-rootca-comparison-in-TestTLSConfig.patch