diff --git a/haproxy_exporter-0.13.0.tar.gz b/haproxy_exporter-0.13.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..9567be96fcc74a4bf8f6b50be7be845511754bd2 Binary files /dev/null and b/haproxy_exporter-0.13.0.tar.gz differ diff --git a/haproxy_exporter.spec b/haproxy_exporter.spec new file mode 100644 index 0000000000000000000000000000000000000000..c73255ac5466e0aa1e3eb8d63c4db6bbb7933f9f --- /dev/null +++ b/haproxy_exporter.spec @@ -0,0 +1,40 @@ +%undefine _missing_build_ids_terminate_build + +Name: haproxy_exporter +Version: 0.13.0 +Release: 1 +Summary: A simple server for prometheus consumption +License: Apache-2.0 and MIT +URL: https://github.com/prometheus/haproxy_exporter + +Source0: https://github.com/prometheus/haproxy_exporter/archive/v%{version}/%{name}-%{version}.tar.gz +Source1: vendor.tar.gz +Patch0: using-vendor.patch + +BuildRequires: make golang promu + +%description +Simple server that scrapes HAProxy stats and exports them +via HTTP for Prometheus consumption + +%prep +%autosetup -b0 -a1 -n %{name}-%{version} -p1 + + +%build +promu build + +%install +install -d -p %{buildroot}%{_bindir} +install -m 755 %{_builddir}/%{name}-%{version}/%{name}-%{version} %{buildroot}%{_bindir}/haproxy_exporter + +%check + +%files +%license LICENSE +%doc README.md +%{_bindir}/haproxy_exporter + +%changelog +* Thu Jun 9 2022 lijian - 0.13.0-1 +- Package init diff --git a/haproxy_exporter.yaml b/haproxy_exporter.yaml new file mode 100644 index 0000000000000000000000000000000000000000..531ecee0d9ce786077418eb89ca977a63ac66f3f --- /dev/null +++ b/haproxy_exporter.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: prometheus/haproxy_exporter +tag_prefix: "^v" +seperator: "." diff --git a/using-vendor.patch b/using-vendor.patch new file mode 100644 index 0000000000000000000000000000000000000000..78714b8345eec0823411cfc47d4806aaef28ad1d --- /dev/null +++ b/using-vendor.patch @@ -0,0 +1,26 @@ +From 777b9d553fe3e380807e4668aee5ae4ac8eff6c3 Mon Sep 17 00:00:00 2001 +From: jianli-97 +Date: Fri, 10 Jun 2022 16:18:00 +0800 +Subject: [PATCH] newpatch + +Signed-off-by: jianli-97 +--- + .promu.yml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/.promu.yml b/.promu.yml +index c3b3984..e396389 100644 +--- a/.promu.yml ++++ b/.promu.yml +@@ -5,7 +5,7 @@ go: + repository: + path: github.com/prometheus/haproxy_exporter + build: +- flags: -a -tags netgo ++ flags: -a -tags netgo --mod=vendor + ldflags: | + -X github.com/prometheus/common/version.Version={{.Version}} + -X github.com/prometheus/common/version.Revision={{.Revision}} +-- +2.33.0 + diff --git a/vendor.tar.gz b/vendor.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..8a0444c0c844bfe8d8daee6e49a74ae40031bb51 Binary files /dev/null and b/vendor.tar.gz differ