forked from pool/golang-github-prometheus-prometheus
Accepting request 1068675 from server:monitoring
OBS-URL: https://build.opensuse.org/request/show/1068675 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/golang-github-prometheus-prometheus?expand=0&rev=26
This commit is contained in:
commit
4336279c1b
30
Makefile
Normal file
30
Makefile
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
NAME = prometheus
|
||||||
|
SPEC = golang-github-prometheus-prometheus.spec
|
||||||
|
|
||||||
|
default: clean tar
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(NAME)-*.tar $(NAME)-*.tar.gz
|
||||||
|
|
||||||
|
tar:
|
||||||
|
osc service disabledrun
|
||||||
|
@version=$$( awk '/^Version:/ {print $$2;exit;}' $(SPEC) ) && \
|
||||||
|
echo "Package version is $$version" && \
|
||||||
|
basename=$(NAME)-$$version && \
|
||||||
|
tar=$$basename.tar && \
|
||||||
|
web_ui=web-ui-$$version.tar && \
|
||||||
|
wd=$$(pwd) && \
|
||||||
|
tmpdir=$$(mktemp -d -p /tmp) && \
|
||||||
|
cd $$tmpdir && \
|
||||||
|
tar -zxf $$wd/$$tar.gz && \
|
||||||
|
cd $$basename && \
|
||||||
|
make assets npm_licenses assets-compress && \
|
||||||
|
tar -cf $$wd/$$web_ui web/ui/static/react && \
|
||||||
|
find web/ui/static -type f -name '*.gz' -exec tar -rf $$wd/$$web_ui "{}" \; && \
|
||||||
|
tar -rf $$wd/$$web_ui web/ui/embed.go && \
|
||||||
|
cd .. && \
|
||||||
|
echo "Creating web assets tarball" && \
|
||||||
|
mv $$basename/npm_licenses.tar.bz2 $$wd && \
|
||||||
|
cd $$wd && \
|
||||||
|
gzip -f $$web_ui && \
|
||||||
|
rm -rf $$tmpdir
|
9
PACKAGING_README.md
Normal file
9
PACKAGING_README.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Packaging prometheus
|
||||||
|
|
||||||
|
In addition to the source code in the tarball, this package also
|
||||||
|
needs the assets for the web UI. These can be generated by the
|
||||||
|
`Makefile` that is present in this package.
|
||||||
|
To do that, you need to have `make` and `npm` installed locally.
|
||||||
|
|
||||||
|
For the OBS workflow you also need `obs-service-go_modules` as well
|
||||||
|
as `obs-service-tar_scm` and `obs-service-recompress`.
|
7
_service
7
_service
@ -4,7 +4,7 @@
|
|||||||
<param name="scm">git</param>
|
<param name="scm">git</param>
|
||||||
<param name="exclude">.git</param>
|
<param name="exclude">.git</param>
|
||||||
<param name="versionformat">@PARENT_TAG@</param>
|
<param name="versionformat">@PARENT_TAG@</param>
|
||||||
<param name="revision">v2.41.0</param>
|
<param name="revision">v2.42.0</param>
|
||||||
<param name="versionrewrite-pattern">v(.*)</param>
|
<param name="versionrewrite-pattern">v(.*)</param>
|
||||||
<param name="match-tag">v2*</param>
|
<param name="match-tag">v2*</param>
|
||||||
</service>
|
</service>
|
||||||
@ -12,10 +12,7 @@
|
|||||||
<param name="file">*.tar</param>
|
<param name="file">*.tar</param>
|
||||||
<param name="compression">gz</param>
|
<param name="compression">gz</param>
|
||||||
</service>
|
</service>
|
||||||
<service name="set_version" mode="disabled">
|
|
||||||
<param name="basename">prometheus</param>
|
|
||||||
</service>
|
|
||||||
<service name="go_modules" mode="disabled">
|
<service name="go_modules" mode="disabled">
|
||||||
<param name="archive">prometheus-2.41.0.tar.gz</param>
|
<param name="archive">prometheus-2.42.0.tar.gz</param>
|
||||||
</service>
|
</service>
|
||||||
</services>
|
</services>
|
||||||
|
@ -1,3 +1,56 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 28 15:44:01 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
|
||||||
|
|
||||||
|
- fix boo#1208752
|
||||||
|
- adjust packaging to build webassets locally, outside of OBS
|
||||||
|
* to get the UI working, newer versions of prometheus need the
|
||||||
|
react app assets
|
||||||
|
* as running `npm install` inside of OBS is not possible, the
|
||||||
|
required dependencies need to be prepared outside of OBS
|
||||||
|
* added a PACKAGING_README.md file, that explains how the new
|
||||||
|
web-ui-*.tar.gz and npm_licenses.tar.bz2 tarballs can be
|
||||||
|
created
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 2 07:19:41 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
|
||||||
|
|
||||||
|
- update to 2.42.0:
|
||||||
|
This release comes with a bunch of feature coverage for native
|
||||||
|
histograms and breaking changes.
|
||||||
|
|
||||||
|
If you are trying native histograms already, we recommend you
|
||||||
|
remove the `wal` directory when upgrading.
|
||||||
|
Because the old WAL record for native histograms is not
|
||||||
|
backward compatible in v2.42.0, this will lead to some data
|
||||||
|
loss for the latest data.
|
||||||
|
|
||||||
|
Additionally, if you scrape "float histograms" or use recording
|
||||||
|
rules on native histograms in v2.42.0 (which writes float
|
||||||
|
histograms),
|
||||||
|
it is a one-way street since older versions do not support
|
||||||
|
float histograms.
|
||||||
|
|
||||||
|
* [CHANGE] **breaking** TSDB: Changed WAL record format for the
|
||||||
|
experimental native histograms. #11783
|
||||||
|
* [FEATURE] Add 'keep_firing_for' field to alerting rules.
|
||||||
|
#11827
|
||||||
|
* [FEATURE] Promtool: Add support of selecting timeseries for
|
||||||
|
TSDB dump. #11872
|
||||||
|
* [ENHANCEMENT] Agent: Native histogram support. #11842
|
||||||
|
* [ENHANCEMENT] Rules: Support native histograms in recording
|
||||||
|
rules. #11838
|
||||||
|
* [ENHANCEMENT] SD: Add container ID as a meta label for pod
|
||||||
|
targets for Kubernetes. #11844
|
||||||
|
* [ENHANCEMENT] SD: Add VM size label to azure service
|
||||||
|
discovery. #11650
|
||||||
|
* [ENHANCEMENT] Support native histograms in federation. #11830
|
||||||
|
* [ENHANCEMENT] TSDB: Add gauge histogram support.
|
||||||
|
#11783 #11840 #11814
|
||||||
|
* [ENHANCEMENT] TSDB/Scrape: Support FloatHistogram that
|
||||||
|
represents buckets as float64 values. #11522 #11817 #11716
|
||||||
|
* [ENHANCEMENT] UI: Show individual scrape pools on /targets
|
||||||
|
page. #11142
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jan 10 14:18:30 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
|
Tue Jan 10 14:18:30 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: golang-github-prometheus-prometheus
|
Name: golang-github-prometheus-prometheus
|
||||||
Version: 2.41.0
|
Version: 2.42.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: The Prometheus monitoring system and time series database
|
Summary: The Prometheus monitoring system and time series database
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
@ -35,12 +35,15 @@ Group: System/Monitoring
|
|||||||
URL: https://prometheus.io/
|
URL: https://prometheus.io/
|
||||||
# also includes web assets generated with `make assets`
|
# also includes web assets generated with `make assets`
|
||||||
Source: prometheus-%{version}.tar.gz
|
Source: prometheus-%{version}.tar.gz
|
||||||
# generated after applying 0003-Bump-client_golang-to-1.12.1.patch
|
|
||||||
Source1: vendor.tar.gz
|
Source1: vendor.tar.gz
|
||||||
Source2: prometheus.service
|
Source2: web-ui-%{version}.tar.gz
|
||||||
Source3: prometheus.yml
|
Source3: prometheus.service
|
||||||
Source4: prometheus.sysconfig
|
Source4: prometheus.yml
|
||||||
Source5: prometheus.firewall.xml
|
Source5: prometheus.sysconfig
|
||||||
|
Source6: prometheus.firewall.xml
|
||||||
|
Source7: npm_licenses.tar.bz2
|
||||||
|
Source8: Makefile
|
||||||
|
Source9: PACKAGING_README.md
|
||||||
Patch1: 0001-Do-not-force-the-pure-Go-name-resolver.patch
|
Patch1: 0001-Do-not-force-the-pure-Go-name-resolver.patch
|
||||||
# Lifted from Debian's prometheus package
|
# Lifted from Debian's prometheus package
|
||||||
Patch2: 0002-Default-settings.patch
|
Patch2: 0002-Default-settings.patch
|
||||||
@ -78,7 +81,8 @@ Prometheus's main features are:
|
|||||||
- multiple modes of graphing and dashboarding support
|
- multiple modes of graphing and dashboarding support
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -a1 -p1 -n prometheus-%{version}
|
%setup -q -a1 -n prometheus-%{version}
|
||||||
|
%autosetup -D -a2 -p1 -n prometheus-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%goprep github.com/prometheus/prometheus
|
%goprep github.com/prometheus/prometheus
|
||||||
@ -87,9 +91,9 @@ GOPATH=%{_builddir}/go promu build -v
|
|||||||
%install
|
%install
|
||||||
install -D -m0755 %{_builddir}/prometheus-%{version}/prometheus %{buildroot}/%{_bindir}/prometheus
|
install -D -m0755 %{_builddir}/prometheus-%{version}/prometheus %{buildroot}/%{_bindir}/prometheus
|
||||||
install -D -m0755 %{_builddir}/prometheus-%{version}/promtool %{buildroot}/%{_bindir}/promtool
|
install -D -m0755 %{_builddir}/prometheus-%{version}/promtool %{buildroot}/%{_bindir}/promtool
|
||||||
install -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/prometheus.service
|
install -D -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/prometheus.service
|
||||||
|
|
||||||
install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/prometheus/prometheus.yml
|
install -D -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/prometheus/prometheus.yml
|
||||||
|
|
||||||
install -d -m 0755 %{buildroot}%{_sbindir}
|
install -d -m 0755 %{buildroot}%{_sbindir}
|
||||||
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcprometheus
|
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcprometheus
|
||||||
@ -98,16 +102,18 @@ install -m 0755 -d %{buildroot}%{_datarootdir}/prometheus
|
|||||||
cp -fr console_libraries/ consoles/ %{buildroot}%{_datarootdir}/prometheus
|
cp -fr console_libraries/ consoles/ %{buildroot}%{_datarootdir}/prometheus
|
||||||
|
|
||||||
install -m 0755 -d %{buildroot}%{_fillupdir}
|
install -m 0755 -d %{buildroot}%{_fillupdir}
|
||||||
install -m 0644 %{SOURCE4} %{buildroot}%{_fillupdir}/sysconfig.prometheus
|
install -m 0644 %{SOURCE5} %{buildroot}%{_fillupdir}/sysconfig.prometheus
|
||||||
|
|
||||||
%if 0%{?suse_version} == 1500 && 0%{?sle_version} < 150300
|
%if 0%{?suse_version} == 1500 && 0%{?sle_version} < 150300
|
||||||
install -m 0755 -d %{buildroot}%{_prefix}/lib/firewalld/services/
|
install -m 0755 -d %{buildroot}%{_prefix}/lib/firewalld/services/
|
||||||
install -m 0644 %{SOURCE5} %{buildroot}%{_prefix}/lib/firewalld/services/prometheus.xml
|
install -m 0644 %{SOURCE6} %{buildroot}%{_prefix}/lib/firewalld/services/prometheus.xml
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus
|
install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus
|
||||||
install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus/data
|
install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus/data
|
||||||
install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus/metrics
|
install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus/metrics
|
||||||
|
|
||||||
|
install -D -m0644 %{SOURCE7} %{buildroot}/%{_defaultlicensedir}/%{name}/npm_licenses.tar.bz2
|
||||||
%gofilelist
|
%gofilelist
|
||||||
|
|
||||||
%fdupes %{buildroot}/%{_prefix}
|
%fdupes %{buildroot}/%{_prefix}
|
||||||
@ -135,6 +141,7 @@ install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus/metrics
|
|||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
%license %{_defaultlicensedir}/%{name}
|
||||||
%{_bindir}/prometheus
|
%{_bindir}/prometheus
|
||||||
%{_bindir}/promtool
|
%{_bindir}/promtool
|
||||||
%{_unitdir}/prometheus.service
|
%{_unitdir}/prometheus.service
|
||||||
|
3
npm_licenses.tar.bz2
Normal file
3
npm_licenses.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:be250b0fed039b63c1eb6be3e0fd088c012b38b4b99fe0251de236e26c90fd68
|
||||||
|
size 150687
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:54335745a205d2e117e0f6dfd24e1f361e94aa0ed2ad671a63de9fa817789bb1
|
|
||||||
size 6295431
|
|
3
prometheus-2.42.0.tar.gz
Normal file
3
prometheus-2.42.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:76cb8451cda26e3ca965ee4e1ff6d1568465f09b497b883027a6e42fcbace5db
|
||||||
|
size 6329585
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:db00f0c8609146ea5f60a56cee773d8d0ed35f7c203cd85880cbbce1be9ad0d8
|
oid sha256:b80508113f08dc052576587658024c96973c8cc7a9843707f2a1d4963d43f6ef
|
||||||
size 12555170
|
size 12072331
|
||||||
|
3
web-ui-2.42.0.tar.gz
Normal file
3
web-ui-2.42.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:6d56177129390906641bb69926fb1bafc015e201c12849cbedd8aa0dc72d79ef
|
||||||
|
size 9128064
|
Loading…
Reference in New Issue
Block a user