1
0

Accepting request 723936 from home:jfajerski:branches:server:monitoring

document changes a bit better

OBS-URL: https://build.opensuse.org/request/show/723936
OBS-URL: https://build.opensuse.org/package/show/server:monitoring/golang-github-prometheus-prometheus?expand=0&rev=19
This commit is contained in:
Tim Serong 2019-08-16 08:40:50 +00:00 committed by Git OBS Bridge
parent 2f88fef4ba
commit 5b1dc77f7b
3 changed files with 18 additions and 27 deletions

View File

@ -1,13 +0,0 @@
Index: prometheus-2.11.1/.promu.yml
===================================================================
--- prometheus-2.11.1.orig/.promu.yml 2019-07-31 12:44:46.190247145 +0200
+++ prometheus-2.11.1/.promu.yml 2019-07-31 12:45:18.354547518 +0200
@@ -10,7 +10,7 @@ build:
path: ./cmd/prometheus
- name: promtool
path: ./cmd/promtool
- flags: -mod=vendor -a
+ flags: -mod=vendor -buildmode=pie -a
ldflags: |
-X github.com/prometheus/common/version.Version={{.Version}}
-X github.com/prometheus/common/version.Revision={{.Revision}}

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Fri Aug 16 06:46:24 UTC 2019 - Jan Fajerski <jan.fajerski@suse.com>
- remove 0004-prometheus-buildmode-pie.patch
+ this patch produces binaries that crash immediately
- add -v to promu build command for better build debugging
- reorder some %install tasks
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Aug 2 11:22:25 UTC 2019 - Jan Fajerski <jan.fajerski@suse.com> Fri Aug 2 11:22:25 UTC 2019 - Jan Fajerski <jan.fajerski@suse.com>

View File

@ -39,8 +39,6 @@ Patch1: 0001-Do-not-force-the-pure-Go-name-resolver.patch
Patch2: 0002-Default-settings.patch Patch2: 0002-Default-settings.patch
# Uyuni service discovery support # Uyuni service discovery support
Patch3: 0003-Add-Uyuni-service-discovery.patch Patch3: 0003-Add-Uyuni-service-discovery.patch
# Add -buildmode=pie
Patch4: 0004-prometheus-buildmode-pie.patch
BuildRequires: fdupes BuildRequires: fdupes
# Adding glibc-devel-static seems to be required for linking if building # Adding glibc-devel-static seems to be required for linking if building
# with -buildmode=pie # with -buildmode=pie
@ -70,22 +68,20 @@ Prometheus's main features are:
%build %build
%goprep github.com/prometheus/prometheus %goprep github.com/prometheus/prometheus
GOPATH=%{_builddir}/go promu build 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 -m 0755 -d %{buildroot}%{_datarootdir}/prometheus install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/prometheus.service
cp -fr console_libraries/ consoles/ %{buildroot}%{_datarootdir}/prometheus
install -m 0755 -d %{buildroot}%{_unitdir} install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/prometheus/prometheus.yml
install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/prometheus.service
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
install -d -m 0755 %{buildroot}%{_sysconfdir}/prometheus install -m 0755 -d %{buildroot}%{_datarootdir}/prometheus
install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/prometheus/prometheus.yml cp -fr console_libraries/ consoles/ %{buildroot}%{_datarootdir}/prometheus
install -m 0755 -d %{buildroot}%{_fillupdir} install -m 0755 -d %{buildroot}%{_fillupdir}
install -m 0644 %{SOURCE3} %{buildroot}%{_fillupdir}/sysconfig.prometheus install -m 0644 %{SOURCE3} %{buildroot}%{_fillupdir}/sysconfig.prometheus
@ -93,11 +89,11 @@ install -m 0644 %{SOURCE3} %{buildroot}%{_fillupdir}/sysconfig.prometheus
install -m 0755 -d %{buildroot}%{_libdir}/firewalld/services/ install -m 0755 -d %{buildroot}%{_libdir}/firewalld/services/
install -m 0644 %{SOURCE4} %{buildroot}%{_libdir}/firewalld/services/prometheus.xml install -m 0644 %{SOURCE4} %{buildroot}%{_libdir}/firewalld/services/prometheus.xml
install -d -m 0755 %{buildroot}%{_sharedstatedir}/prometheus install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus
install -d -m 0755 %{buildroot}%{_sharedstatedir}/prometheus/data install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus/data
install -d -m 0755 %{buildroot}%{_sharedstatedir}/prometheus/metrics install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus/metrics
%gofilelist
%fdupes %{buildroot}/%{_datarootdir} %fdupes %{buildroot}/%{_prefix}
%pre %pre
getent group %{prometheus_group} >/dev/null || %{_sbindir}/groupadd -r %{prometheus_group} getent group %{prometheus_group} >/dev/null || %{_sbindir}/groupadd -r %{prometheus_group}