From patchwork Fri Mar 25 13:32:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Leo_Nikkil=C3=A4?= X-Patchwork-Id: 38102 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4CEEC27BBEA; Fri, 25 Mar 2022 14:21:55 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9CDE627BBE9 for ; Fri, 25 Mar 2022 14:21:54 +0000 (GMT) Received: from localhost ([::1]:39626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nXkp7-0006cu-Q6 for patchwork@mira.cbaines.net; Fri, 25 Mar 2022 10:21:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXkeC-0001Fu-2J for guix-patches@gnu.org; Fri, 25 Mar 2022 10:10:43 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58217) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nXke8-0004nB-D2 for guix-patches@gnu.org; Fri, 25 Mar 2022 10:10:35 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nXke8-0003Fr-8C for guix-patches@gnu.org; Fri, 25 Mar 2022 10:10:32 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54560] [PATCH 47/47] gnu: Add go-github-com-prometheus-prometheus. Resent-From: Leo =?utf-8?q?Nikkil=C3=A4?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 25 Mar 2022 14:10:32 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54560 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54560@debbugs.gnu.org Cc: Leo =?utf-8?q?Nikkil=C3=A4?= Received: via spool by 54560-submit@debbugs.gnu.org id=B54560.164821740712139 (code B ref 54560); Fri, 25 Mar 2022 14:10:32 +0000 Received: (at 54560) by debbugs.gnu.org; 25 Mar 2022 14:10:07 +0000 Received: from localhost ([127.0.0.1]:52062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nXkdh-00039J-Gq for submit@debbugs.gnu.org; Fri, 25 Mar 2022 10:10:07 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:60475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nXk58-0001qU-AS for 54560@debbugs.gnu.org; Fri, 25 Mar 2022 09:34:22 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id B52133200A64; Fri, 25 Mar 2022 09:34:16 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 25 Mar 2022 09:34:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lnikki.la; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; bh=dfaj6w5cGihzPS YapW4fjbbPqY6aJfWtiSWkCiFEtJs=; b=vzIvNQQ1PhlqvsLHR2YDKEG1qUaEi3 4RbL/SDoKfyC9eroke4x76sjiB8q7R2RRQnhhBRmRc2yfwpPR40pMV4B7t3Rp8O5 He+XNeMar/vJuLdyTic7j48Xn7T8PxElPxONFLX9pMLMauAUZ0xwH4lvjyXZ08A6 AOo66lfPEejG3EWBEzIfQCMZqgMW4eSSV0deiQKcsiNKYEaCHaAGjLq9GhFNQXAT Hhi560kMLaeYsdWc5B+358z35I3KBdebZ3CdnFbXYZV/+b68y/Txyp+Ftr05Wc8v xzw4RVjyWlJrhWwthzc9r9r07znK//BP3dZWGW2b4PSDL241ChuuAorA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=dfaj6w5cGihzPSYapW4fjbbPqY6aJfWtiSWkCiFEt Js=; b=Gj4pfsALerv6UITjZW+jZdS7HpCWPO1TXReLXzXK/R1AdUl8TATpY4gpC G5Ohvs5y5DNJyCoanNOTNmA9hpIVhDsTRalc5oNcrmeLn/NKXlRUXj2HtzzRdw2O KgYStxbLPxO1dTLoDDLPdBB+qa7hemlpURGz/THlcTvdhOU5uczS5LPoNKrzCM/A mA1P/iwdY7FbwVzLa6/K+SGNIzVqsoQ0TiH3MxI1vHJ062PH6T88aFGIUBuNq3AY 9+oojDCsEn4hF9rfMc/qqxNk/FAomf1zk8Wexe5UIrr3QO2otcWyhNQXd2UpCA9F kKZWZGDb0Q6tVLv3DC4zCXzixmp8Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudehuddgheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhggtgfgsehtke ertdertdejnecuhfhrohhmpefnvghoucfpihhkkhhilhomuceohhgvlhhloheslhhnihhk khhirdhlrgeqnecuggftrfgrthhtvghrnheptedtheeggfeljeefjedtgedukeegfeegvd ehveffveeflefhfeeiheehudelvddtnecuffhomhgrihhnpehgihhthhhusgdrtghomhdp khekshdrihhopdhhthhtphdqghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhephhgvlhhloheslhhnihhkkhhirdhlrg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 25 Mar 2022 09:34:15 -0400 (EDT) From: Leo =?utf-8?q?Nikkil=C3=A4?= Date: Fri, 25 Mar 2022 15:32:11 +0200 Message-Id: <20220325133211.5128-47-hello@lnikki.la> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220325133211.5128-1-hello@lnikki.la> References: <20220325133211.5128-1-hello@lnikki.la> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 25 Mar 2022 10:09:18 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/go-github-com-prometheus-prometheus-remove-deps.patch: New patch, reduce go-github-com-prometheus-prometheus dependency tree. * gnu/packages/monitoring.scm (go-github-com-prometheus-prometheus): New variable. --- gnu/packages/monitoring.scm | 83 +++++++++++++++++++ ...om-prometheus-prometheus-remove-deps.patch | 33 ++++++++ 2 files changed, 116 insertions(+) create mode 100644 gnu/packages/patches/go-github-com-prometheus-prometheus-remove-deps.patch diff --git a/gnu/packages/monitoring.scm b/gnu/packages/monitoring.scm index 7935c92815..968eb6b1ee 100644 --- a/gnu/packages/monitoring.scm +++ b/gnu/packages/monitoring.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2021, 2022 Marius Bakke ;;; Copyright © 2021 Stefan Reichör ;;; Copyright © 2021 Raphaël Mélotte +;;; Copyright © 2022 Leo Nikkilä ;;; ;;; This file is part of GNU Guix. ;;; @@ -48,6 +49,7 @@ (define-module (gnu packages monitoring) #:use-module (gnu packages django) #:use-module (gnu packages gd) #:use-module (gnu packages gettext) + #:use-module (gnu packages golang) #:use-module (gnu packages image) #:use-module (gnu packages mail) #:use-module (gnu packages ncurses) @@ -61,6 +63,7 @@ (define-module (gnu packages monitoring) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages rrdtool) + #:use-module (gnu packages syncthing) #:use-module (gnu packages time) #:use-module (gnu packages tls) #:use-module (gnu packages web)) @@ -499,6 +502,86 @@ (define-public go-github-com-prometheus-node-exporter (home-page "https://github.com/prometheus/node_exporter") (license license:asl2.0))) +(define-public go-github-com-prometheus-prometheus + (package + (name "go-github-com-prometheus-prometheus") + (version "2.33.5") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/prometheus/prometheus") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0arz7ksrfavzg3vm5rlf6y3gbj8l59cg4x4zw6gmmd1dkflm2jx3")) + (patches (search-patches + "go-github-com-prometheus-prometheus-remove-deps.patch")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/prometheus/prometheus/cmd/prometheus" + #:unpack-path "github.com/prometheus/prometheus" + #:install-source? #f + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-source + (lambda* (#:key import-path #:allow-other-keys) + ;; `k8s.io/klog' is replaced by `simonpasquier/klog-gokit' + (substitute* (find-files (string-append "src/" import-path) + "\\.go") + (("k8s.io/klog/v2") "github.com/simonpasquier/klog-gokit/v3") + (("k8s.io/klog") "github.com/simonpasquier/klog-gokit")) + #t))))) + (native-inputs (list go-github-com-alecthomas-template + go-github-com-alecthomas-units + go-github-com-aws-aws-sdk-go + go-github-com-cespare-xxhash + go-github-com-dennwc-varint + go-github-com-edsrzf-mmap-go + go-github-com-fsnotify-fsnotify + go-github-com-go-kit-log + go-github-com-go-logfmt-logfmt + go-github-com-go-openapi-strfmt + go-github-com-gogo-protobuf + go-github-com-golang-snappy + go-github-com-json-iterator-go + go-github-com-mwitkow-go-conntrack + go-github-com-oklog-run + go-github-com-oklog-ulid + go-github-com-opentracing-contrib-go-stdlib + go-github-com-opentracing-opentracing-go + go-github-com-pkg-errors + go-github-com-prometheus-alertmanager-api + go-github-com-prometheus-client-golang + go-github-com-prometheus-client-model + go-github-com-prometheus-common + go-github-com-prometheus-exporter-toolkit + go-github-com-shurcool-httpfs + go-github-com-shurcool-vfsgen + go-github-com-simonpasquier-klog-gokit + go-github-com-simonpasquier-klog-gokit-v3 + go-github-com-stretchr-testify + go-github-com-uber-jaeger-client-go + go-github-com-uber-jaeger-lib + go-go-uber-org-atomic + go-go-uber-org-goleak + go-golang-org-x-net + go-golang-org-x-sync + go-golang-org-x-sys + go-golang-org-x-time + go-golang-org-x-tools + go-gopkg-in-alecthomas-kingpin.v2 + go-gopkg-in-yaml-v2 + go-gopkg-in-yaml-v3)) + (synopsis "Monitoring system and time series database") + (description + "Prometheus is a systems and service monitoring system. It +collects metrics from configured targets at given intervals, evaluates +rule expressions, displays the results, and can trigger alerts when +specified conditions are observed.") + (home-page "https://github.com/prometheus/prometheus") + (license license:asl2.0))) + (define-public temper-exporter (let ((commit "a87bbab19c05609d62d9e4c7941178700c1ef84d") (revision "0")) diff --git a/gnu/packages/patches/go-github-com-prometheus-prometheus-remove-deps.patch b/gnu/packages/patches/go-github-com-prometheus-prometheus-remove-deps.patch new file mode 100644 index 0000000000..4d4626d2d1 --- /dev/null +++ b/gnu/packages/patches/go-github-com-prometheus-prometheus-remove-deps.patch @@ -0,0 +1,33 @@ +This patch reduces the Prometheus dependency tree, most of which +consists of unpackaged Go libraries, by removing certain discovery +plugins. + +diff --git a/discovery/install/install.go b/discovery/install/install.go +index e16b348f6..a3944cf9f 100644 +--- a/discovery/install/install.go ++++ b/discovery/install/install.go +@@ -17,24 +17,9 @@ package install + + import ( +- _ "github.com/prometheus/prometheus/discovery/aws" // register aws +- _ "github.com/prometheus/prometheus/discovery/azure" // register azure +- _ "github.com/prometheus/prometheus/discovery/consul" // register consul +- _ "github.com/prometheus/prometheus/discovery/digitalocean" // register digitalocean +- _ "github.com/prometheus/prometheus/discovery/dns" // register dns + _ "github.com/prometheus/prometheus/discovery/eureka" // register eureka + _ "github.com/prometheus/prometheus/discovery/file" // register file +- _ "github.com/prometheus/prometheus/discovery/gce" // register gce +- _ "github.com/prometheus/prometheus/discovery/hetzner" // register hetzner + _ "github.com/prometheus/prometheus/discovery/http" // register http +- _ "github.com/prometheus/prometheus/discovery/kubernetes" // register kubernetes +- _ "github.com/prometheus/prometheus/discovery/linode" // register linode + _ "github.com/prometheus/prometheus/discovery/marathon" // register marathon +- _ "github.com/prometheus/prometheus/discovery/moby" // register moby +- _ "github.com/prometheus/prometheus/discovery/openstack" // register openstack + _ "github.com/prometheus/prometheus/discovery/puppetdb" // register puppetdb +- _ "github.com/prometheus/prometheus/discovery/scaleway" // register scaleway + _ "github.com/prometheus/prometheus/discovery/triton" // register triton +- _ "github.com/prometheus/prometheus/discovery/uyuni" // register uyuni +- _ "github.com/prometheus/prometheus/discovery/xds" // register xds +- _ "github.com/prometheus/prometheus/discovery/zookeeper" // register zookeeper + )