From 6f684e2beab0d2168479e9403974d6cb94b726c4 Mon Sep 17 00:00:00 2001 From: Andreas Gerstmayr Date: Fri, 18 Jun 2021 16:20:24 +0200 Subject: [PATCH] update to upstream version 7.5.8 and remove unused dependencies selfsigned, http-signature and gofpdf --- 001-wrappers-grafana-cli.patch | 2 +- 005-remove-saml-dependency.patch | 37 ----------- 005-remove-unused-dependencies.patch | 63 +++++++++++++++++++ ...duplicate-grafana-aws-sdk-dependency.patch | 12 ---- 008-remove-unused-frontend-crypto.patch | 14 ++--- Makefile | 1 + distro-defaults.ini | 14 ++++- grafana.spec | 17 ++--- sources | 6 +- 9 files changed, 95 insertions(+), 71 deletions(-) delete mode 100644 005-remove-saml-dependency.patch create mode 100644 005-remove-unused-dependencies.patch delete mode 100644 007-remove-duplicate-grafana-aws-sdk-dependency.patch diff --git a/001-wrappers-grafana-cli.patch b/001-wrappers-grafana-cli.patch index 722d61f..01fe90e 100644 --- a/001-wrappers-grafana-cli.patch +++ b/001-wrappers-grafana-cli.patch @@ -44,6 +44,6 @@ index 9cad151c0d..a786edc596 100755 + cd "${GRAFANA_HOME}" + exec "$EXECUTABLE" "$OPTS" "$@" +else -+ echo "Please run this script as user \"${GRAFANA_USER}\" or root." ++ echo "$0: please run this script as user \"${GRAFANA_USER}\" or root." + exit 5 +fi diff --git a/005-remove-saml-dependency.patch b/005-remove-saml-dependency.patch deleted file mode 100644 index 57c5ab7..0000000 --- a/005-remove-saml-dependency.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/go.mod b/go.mod -index 2161850265..9864be5f22 100644 ---- a/go.mod -+++ b/go.mod -@@ -21,7 +21,6 @@ require ( - github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b - github.com/centrifugal/centrifuge v0.13.0 - github.com/cortexproject/cortex v1.4.1-0.20201022071705-85942c5703cf -- github.com/crewjam/saml v0.4.6-0.20201227203850-bca570abb2ce - github.com/davecgh/go-spew v1.1.1 - github.com/denisenkom/go-mssqldb v0.0.0-20200910202707-1e08a3fab204 - github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 // indirect -diff --git a/go.sum b/go.sum -index df1510fa41..5e43389d91 100644 ---- a/go.sum -+++ b/go.sum -@@ -283,8 +283,6 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr - github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= - github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= - github.com/crewjam/httperr v0.0.0-20190612203328-a946449404da/go.mod h1:+rmNIXRvYMqLQeR4DHyTvs6y0MEMymTz4vyFpFkKTPs= --github.com/crewjam/saml v0.4.6-0.20201227203850-bca570abb2ce h1:pAuTpLhCqC20s2RLhUirfw606jReW+8z2U5EvG+0S7E= --github.com/crewjam/saml v0.4.6-0.20201227203850-bca570abb2ce/go.mod h1:/gCaeLf13J8/621RNZ6TaExji/8xCWcn6UmdJ57wURQ= - github.com/crossdock/crossdock-go v0.0.0-20160816171116-049aabb0122b/go.mod h1:v9FBN7gdVTpiD/+LZ7Po0UKvROyT87uLVxTHVky/dlQ= - github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= - github.com/cznic/b v0.0.0-20180115125044-35e9bbe41f07/go.mod h1:URriBxXwVq5ijiJ12C7iIZqlA69nTlI+LgI6/pwftG8= -diff --git a/pkg/extensions/main.go b/pkg/extensions/main.go -index 24031ace2e..6ec4349c33 100644 ---- a/pkg/extensions/main.go -+++ b/pkg/extensions/main.go -@@ -6,7 +6,6 @@ import ( - - _ "github.com/beevik/etree" - _ "github.com/cortexproject/cortex/pkg/util" -- _ "github.com/crewjam/saml" - _ "github.com/gobwas/glob" - "github.com/grafana/grafana/pkg/registry" - "github.com/grafana/grafana/pkg/services/licensing" diff --git a/005-remove-unused-dependencies.patch b/005-remove-unused-dependencies.patch new file mode 100644 index 0000000..19d72f0 --- /dev/null +++ b/005-remove-unused-dependencies.patch @@ -0,0 +1,63 @@ +diff --git a/go.mod b/go.mod +index 426b70ab7a..dc0c9a61ef 100644 +--- a/go.mod ++++ b/go.mod +@@ -21,7 +21,6 @@ require ( + github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b + github.com/centrifugal/centrifuge v0.13.0 + github.com/cortexproject/cortex v1.4.1-0.20201022071705-85942c5703cf +- github.com/crewjam/saml v0.4.6-0.20201227203850-bca570abb2ce + github.com/davecgh/go-spew v1.1.1 + github.com/denisenkom/go-mssqldb v0.0.0-20200910202707-1e08a3fab204 + github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 // indirect +@@ -57,7 +56,6 @@ require ( + github.com/jmespath/go-jmespath v0.4.0 + github.com/jonboulle/clockwork v0.2.2 // indirect + github.com/json-iterator/go v1.1.10 +- github.com/jung-kurt/gofpdf v1.16.2 + github.com/lib/pq v1.9.0 + github.com/linkedin/goavro/v2 v2.10.0 + github.com/magefile/mage v1.11.0 +diff --git a/go.sum b/go.sum +index 98874d6a7c..03243066ac 100644 +--- a/go.sum ++++ b/go.sum +@@ -282,8 +282,6 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr + github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= + github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= + github.com/crewjam/httperr v0.0.0-20190612203328-a946449404da/go.mod h1:+rmNIXRvYMqLQeR4DHyTvs6y0MEMymTz4vyFpFkKTPs= +-github.com/crewjam/saml v0.4.6-0.20201227203850-bca570abb2ce h1:pAuTpLhCqC20s2RLhUirfw606jReW+8z2U5EvG+0S7E= +-github.com/crewjam/saml v0.4.6-0.20201227203850-bca570abb2ce/go.mod h1:/gCaeLf13J8/621RNZ6TaExji/8xCWcn6UmdJ57wURQ= + github.com/crossdock/crossdock-go v0.0.0-20160816171116-049aabb0122b/go.mod h1:v9FBN7gdVTpiD/+LZ7Po0UKvROyT87uLVxTHVky/dlQ= + github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= + github.com/cznic/b v0.0.0-20180115125044-35e9bbe41f07/go.mod h1:URriBxXwVq5ijiJ12C7iIZqlA69nTlI+LgI6/pwftG8= +@@ -914,10 +912,6 @@ github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7 + github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= + github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= + github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +-github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +-github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +-github.com/jung-kurt/gofpdf v1.16.2 h1:jgbatWHfRlPYiK85qgevsZTHviWXKwB1TTiKdz5PtRc= +-github.com/jung-kurt/gofpdf v1.16.2/go.mod h1:1hl7y57EsiPAkLbOwzpzqgx1A30nQCk/YmFV8S2vmK0= + github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= + github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 h1:uC1QfSlInpQF+M0ao65imhwqKnz3Q2z/d8PWZRMQvDM= + github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= +diff --git a/pkg/extensions/main.go b/pkg/extensions/main.go +index 24031ace2e..081475fc89 100644 +--- a/pkg/extensions/main.go ++++ b/pkg/extensions/main.go +@@ -6,14 +6,12 @@ import ( + + _ "github.com/beevik/etree" + _ "github.com/cortexproject/cortex/pkg/util" +- _ "github.com/crewjam/saml" + _ "github.com/gobwas/glob" + "github.com/grafana/grafana/pkg/registry" + "github.com/grafana/grafana/pkg/services/licensing" + "github.com/grafana/grafana/pkg/services/validations" + _ "github.com/grafana/loki/pkg/logproto" + _ "github.com/grpc-ecosystem/go-grpc-middleware" +- _ "github.com/jung-kurt/gofpdf" + _ "github.com/linkedin/goavro/v2" + _ "github.com/pkg/errors" + _ "github.com/robfig/cron" diff --git a/007-remove-duplicate-grafana-aws-sdk-dependency.patch b/007-remove-duplicate-grafana-aws-sdk-dependency.patch deleted file mode 100644 index 8bfd8ed..0000000 --- a/007-remove-duplicate-grafana-aws-sdk-dependency.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/go.mod b/go.mod -index 2161850265..db36c1ceed 100644 ---- a/go.mod -+++ b/go.mod -@@ -42,7 +42,6 @@ require ( - github.com/google/go-cmp v0.5.4 - github.com/google/uuid v1.2.0 - github.com/gosimple/slug v1.9.0 -- github.com/grafana/grafana-aws-sdk v0.3.0 - github.com/grafana/grafana-aws-sdk v0.4.0 - github.com/grafana/grafana-plugin-model v0.0.0-20190930120109-1fc953a61fb4 - github.com/grafana/grafana-plugin-sdk-go v0.88.0 diff --git a/008-remove-unused-frontend-crypto.patch b/008-remove-unused-frontend-crypto.patch index 8008075..2409e23 100644 --- a/008-remove-unused-frontend-crypto.patch +++ b/008-remove-unused-frontend-crypto.patch @@ -1,17 +1,17 @@ diff --git a/package.json b/package.json -index 280e171804..13468e56bd 100644 +index 9c5a2d93e2..7f65949ea4 100644 --- a/package.json +++ b/package.json -@@ -295,7 +295,8 @@ +@@ -294,6 +294,9 @@ + "whatwg-fetch": "3.1.0" }, "resolutions": { ++ "crypto-browserify": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.1.tgz", ++ "selfsigned": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.1.tgz", ++ "http-signature": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.1.tgz", "caniuse-db": "1.0.30000772", -- "react-use-measure": "https://github.com/mckn/react-use-measure.git#remove-cjs-export" -+ "react-use-measure": "https://github.com/mckn/react-use-measure.git#remove-cjs-export", -+ "crypto-browserify": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.1.tgz" + "react-use-measure": "https://github.com/mckn/react-use-measure.git#remove-cjs-export" }, - "workspaces": { - "packages": [ diff --git a/scripts/webpack/webpack.common.js b/scripts/webpack/webpack.common.js index 3e56d31c37..a03ed1a67a 100644 --- a/scripts/webpack/webpack.common.js diff --git a/Makefile b/Makefile index 9269789..6fcdf3c 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,7 @@ grafana-vendor-$(VER).tar.xz: grafana-$(VER).tar.gz # Remove files with licensing issues find grafana-$(VER) -type d -name 'node-notifier' -prune -exec rm -r {} \; find grafana-$(VER) -type f -name '*.exe' -delete + rm -r grafana-$(VER)/node_modules/visjs-network/examples ./list_bundled_nodejs_packages.py grafana-$(VER)/ >> $@.manifest # Create tarball diff --git a/distro-defaults.ini b/distro-defaults.ini index f0eee30..daa0679 100644 --- a/distro-defaults.ini +++ b/distro-defaults.ini @@ -69,7 +69,7 @@ socket = /tmp/grafana.sock # CDN Url cdn_url = -# Sets the maximum time in minutes before timing out read of an incoming request and closing idle connections. +# Sets the maximum time in minutes before timing out read of an incoming request and closing idle connections. # `0` means there is no timeout for reading the request. read_timeout = 0 @@ -155,9 +155,17 @@ tls_handshake_timeout_seconds = 10 # waiting for the server to approve. expect_continue_timeout_seconds = 1 +# Optionally limits the total number of connections per host, including connections in the dialing, +# active, and idle states. On limit violation, dials will block. +# A value of zero (0) means no limit. +max_conns_per_host = 0 + # The maximum number of idle connections that Grafana will keep alive. max_idle_connections = 100 +# The maximum number of idle connections per host that Grafana will keep alive. +max_idle_connections_per_host = 2 + # How many seconds the data proxy keeps an idle connection open before timing out. idle_conn_timeout_seconds = 90 @@ -520,11 +528,11 @@ active_sync_enabled = true #################################### AWS ########################### [aws] -# Enter a comma-separated list of allowed AWS authentication providers. +# Enter a comma-separated list of allowed AWS authentication providers. # Options are: default (AWS SDK Default), keys (Access && secret key), credentials (Credentials field), ec2_iam_role (EC2 IAM Role) allowed_auth_providers = default,keys,credentials -# Allow AWS users to assume a role using temporary security credentials. +# Allow AWS users to assume a role using temporary security credentials. # If true, assume role will be enabled for all AWS authentication providers that are specified in aws_auth_providers assume_role_enabled = true diff --git a/grafana.spec b/grafana.spec index f459232..6b8cfb4 100644 --- a/grafana.spec +++ b/grafana.spec @@ -19,8 +19,8 @@ end} %endif Name: grafana -Version: 7.5.7 -Release: 2%{?dist} +Version: 7.5.8 +Release: 1%{?dist} Summary: Metrics dashboard and graph editor License: ASL 2.0 URL: https://grafana.org @@ -62,12 +62,10 @@ Patch3: 003-fix-dashboard-abspath-test.patch # therefore loading this memory dump fails on s390x Patch4: 004-skip-x86-goldenfiles-tests.patch -Patch5: 005-remove-saml-dependency.patch +Patch5: 005-remove-unused-dependencies.patch Patch6: 006-fix-gtime-test-32bit.patch -Patch7: 007-remove-duplicate-grafana-aws-sdk-dependency.patch - Patch8: 008-remove-unused-frontend-crypto.patch # The Makefile removes a few files with crypto implementations @@ -178,15 +176,15 @@ Provides: bundled(golang(github.com/hashicorp/go-plugin)) = 1.4.0 Provides: bundled(golang(github.com/hashicorp/go-version)) = 1.2.1 Provides: bundled(golang(github.com/inconshreveable/log15)) = 0.0.0-20180818164646.67afb5ed74ec Provides: bundled(golang(github.com/influxdata/influxdb-client-go/v2)) = 2.2.0 -Provides: bundled(golang(github.com/jaegertracing/jaeger)) = 1.22.0 +Provides: bundled(golang(github.com/jaegertracing/jaeger)) = 1.22.1-0.20210304164023.2fff3ca58910 Provides: bundled(golang(github.com/jmespath/go-jmespath)) = 0.4.0 Provides: bundled(golang(github.com/json-iterator/go)) = 1.1.10 -Provides: bundled(golang(github.com/jung-kurt/gofpdf)) = 1.16.2 Provides: bundled(golang(github.com/lib/pq)) = 1.9.0 Provides: bundled(golang(github.com/linkedin/goavro/v2)) = 2.10.0 Provides: bundled(golang(github.com/magefile/mage)) = 1.11.0 Provides: bundled(golang(github.com/mattn/go-isatty)) = 0.0.12 Provides: bundled(golang(github.com/mattn/go-sqlite3)) = 1.14.6 +Provides: bundled(golang(github.com/mwitkow/go-conntrack)) = 0.0.0-20190716064945.2f068394615f Provides: bundled(golang(github.com/opentracing/opentracing-go)) = 1.2.0 Provides: bundled(golang(github.com/patrickmn/go-cache)) = 2.1.0+incompatible Provides: bundled(golang(github.com/pkg/errors)) = 0.9.1 @@ -474,7 +472,6 @@ rm -r plugins-bundled %endif %patch5 -p1 %patch6 -p1 -%patch7 -p1 %patch8 -p1 %patch9 -p1 %if %{enable_fips_mode} @@ -658,6 +655,10 @@ GOLANG_FIPS=1 go test -v ./pkg/util -run TestEncryption %changelog +* Mon Jun 21 2021 Andreas Gerstmayr 7.5.8-1 +- update to 7.5.8 tagged upstream community sources, see CHANGELOG +- remove unused dependencies selfsigned, http-signature and gofpdf + * Fri Jun 11 2021 Andreas Gerstmayr 7.5.7-2 - remove unused cryptographic implementations - use cryptographic functions from OpenSSL if FIPS mode is enabled diff --git a/sources b/sources index a3d0a2c..6cbb4c7 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (grafana-7.5.7.tar.gz) = e8adbfffca91bfb43cf810b9e6b0fa6a0abe765ae4a45f6a1add09c35b1a5bc1f241dc91fad69669b437bfcd107b46f7a09bee9d3272670aaf6e4e501a84edec -SHA512 (grafana-webpack-7.5.7.tar.gz) = 9a4fc0ff83ef607cf15529aa32b48178de4fdcc16deafd0409ffd6e21d284fe9f897986ba7b68ffdbf1984731cd040d789aa3246896b9da73d31d57b8a0b3389 -SHA512 (grafana-vendor-7.5.7.tar.xz) = 0b22e9d9bb3f6a9ab0dabdca76d2ec43e43f79ea2a3d34d09d1855d5c4aadf1fcc42ebd127d989b71a93bd527971ad7796fd48a99421df8f4376d9247d67d2ce +SHA512 (grafana-7.5.8.tar.gz) = c213951342818b821bdce2eee72a04b2395de8c2e3f81884a82f03947938b16e3518a354045f6853b29860e7b065a824b660af88df90fb951b6278826fffd5bb +SHA512 (grafana-webpack-7.5.8.tar.gz) = c668e0edcb5ae5ebd803e796b4168690e1378ce666ad964535482fc7f2aa1cd440a2f12aed1204cb4f4751a641c6f498311db768add6510e5f235cb9cc622e74 +SHA512 (grafana-vendor-7.5.8.tar.xz) = 1bd8508532998b6b5a94d3ae3ef59be5a1dff3a036a634f06fb18bc28ffa0b24bde581075ce5246a8fa8123d63cc4d3f6e5fde5bbdc83b8ae3c0cd301fabe7e0