Hello community,

here is the log from the commit of package golang-github-prometheus-prometheus 
for openSUSE:Factory checked in at 2019-08-09 16:50:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/golang-github-prometheus-prometheus (Old)
 and      
/work/SRC/openSUSE:Factory/.golang-github-prometheus-prometheus.new.9556 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "golang-github-prometheus-prometheus"

Fri Aug  9 16:50:44 2019 rev:4 rq:721459 version:2.11.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/golang-github-prometheus-prometheus/golang-github-prometheus-prometheus.changes
  2019-07-22 12:18:34.571692930 +0200
+++ 
/work/SRC/openSUSE:Factory/.golang-github-prometheus-prometheus.new.9556/golang-github-prometheus-prometheus.changes
        2019-08-09 16:50:44.309504960 +0200
@@ -1,0 +2,25 @@
+Fri Aug  2 11:22:25 UTC 2019 - Jan Fajerski <[email protected]>
+
+- Add network-online (Wants and After) dependency to systemd unit bsc#1143913
+
+-------------------------------------------------------------------
+Wed Jul 31 10:46:13 UTC 2019 - Andreas Schneider <[email protected]>
+
+- Build with PIE
+  + Added 0004-prometheus-buildmode-pie.patch
+
+-------------------------------------------------------------------
+Wed Jul 31 06:47:55 UTC 2019 - Andreas Schneider <[email protected]>
+
+- Only package required files (reduces rpm size by 4 MB)
+- Add sysconfig file
+- Add firewall config file
+- Use variables for defining user and group
+
+-------------------------------------------------------------------
+Thu Jul 25 16:34:29 UTC 2019 - Joao Cavalheiro <[email protected]>
+
+- Add support for Uyuni/SUSE Manager service discovery
+  + Added 0003-Add-Uyuni-service-discovery.patch
+
+-------------------------------------------------------------------

New:
----
  0003-Add-Uyuni-service-discovery.patch
  0004-prometheus-buildmode-pie.patch
  prometheus.firewall.xml
  prometheus.sysconfig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ golang-github-prometheus-prometheus.spec ++++++
--- /var/tmp/diff_new_pack.MDX0gX/_old  2019-08-09 16:50:44.881504847 +0200
+++ /var/tmp/diff_new_pack.MDX0gX/_new  2019-08-09 16:50:44.881504847 +0200
@@ -17,6 +17,9 @@
 #
 
 
+%global prometheus_user prometheus
+%global prometheus_group %{prometheus_user}
+
 %{go_nostrip}
 
 Name:           golang-github-prometheus-prometheus
@@ -29,23 +32,19 @@
 Source:         prometheus-%{version}.tar.xz
 Source1:        prometheus.service
 Source2:        prometheus.yml
+Source3:        prometheus.sysconfig
+Source4:        prometheus.firewall.xml
 Patch1:         0001-Do-not-force-the-pure-Go-name-resolver.patch
 # Lifted from Debian's prometheus package
 Patch2:         0002-Default-settings.patch
-%ifarch aarch64
-# For some reason the aarch64 build fails with:
-#   + promu build
-#    >   prometheus
-#   # github.com/prometheus/prometheus/cmd/prometheus
-#   /usr/lib64/go/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
-#   
/usr/lib64/gcc/aarch64-suse-linux/4.8/../../../../aarch64-suse-linux/bin/ld: 
cannot find -lpthread
-#   
/usr/lib64/gcc/aarch64-suse-linux/4.8/../../../../aarch64-suse-linux/bin/ld: 
cannot find -lc
-#   collect2: error: ld returned 1 exit status
-# Adding glibc-devel-static fixes it, but it's odd that this isn't
-# also a problem on x86_64.
-BuildRequires:  glibc-devel-static
-%endif
+# Uyuni service discovery support
+Patch3:         0003-Add-Uyuni-service-discovery.patch
+# Add -buildmode=pie
+Patch4:         0004-prometheus-buildmode-pie.patch
 BuildRequires:  fdupes
+# Adding glibc-devel-static seems to be required for linking if building
+# with -buildmode=pie
+BuildRequires:  glibc-devel-static
 BuildRequires:  golang-github-prometheus-promu
 BuildRequires:  golang-packaging
 BuildRequires:  xz
@@ -53,6 +52,7 @@
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %{?systemd_requires}
 Requires(pre):  shadow
+Requires(post): %fillup_prereq
 %{go_provides}
 
 %description
@@ -66,34 +66,46 @@
  - multiple modes of graphing and dashboarding support
 
 %prep
-%setup -q -n prometheus-%{version}
-%patch1 -p 1
-%patch2 -p 1
+%autosetup -p1 -n prometheus-%{version}
 
 %build
 %goprep github.com/prometheus/prometheus
 GOPATH=%{_builddir}/go promu build
 
 %install
-%goinstall
 install -D -m0755 %{_builddir}/prometheus-%{version}/prometheus 
%{buildroot}/%{_bindir}/prometheus
 install -D -m0755 %{_builddir}/prometheus-%{version}/promtool 
%{buildroot}/%{_bindir}/promtool
-%gosrc
-install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/prometheus.service
-install -Dd -m 0755 %{buildroot}%{_sbindir}
+install -m 0755 -d %{buildroot}%{_datarootdir}/prometheus
+cp -fr console_libraries/ consoles/ %{buildroot}%{_datarootdir}/prometheus
+
+install -m 0755 -d %{buildroot}%{_unitdir}
+install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/prometheus.service
+
+install -d -m 0755 %{buildroot}%{_sbindir}
 ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcprometheus
-install -D -m 0644 %{SOURCE2} 
%{buildroot}%{_sysconfdir}/prometheus/prometheus.yml
-install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus
-install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus/metrics
-%gofilelist
-%fdupes %{buildroot}/%{_prefix}
+
+install -d -m 0755 %{buildroot}%{_sysconfdir}/prometheus
+install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/prometheus/prometheus.yml
+
+install -m 0755 -d %{buildroot}%{_fillupdir}
+install -m 0644 %{SOURCE3} %{buildroot}%{_fillupdir}/sysconfig.prometheus
+
+install -m 0755 -d %{buildroot}%{_libdir}/firewalld/services/
+install -m 0644 %{SOURCE4} 
%{buildroot}%{_libdir}/firewalld/services/prometheus.xml
+
+install -d -m 0755 %{buildroot}%{_sharedstatedir}/prometheus
+install -d -m 0755 %{buildroot}%{_sharedstatedir}/prometheus/data
+install -d -m 0755 %{buildroot}%{_sharedstatedir}/prometheus/metrics
+
+%fdupes %{buildroot}/%{_datarootdir}
 
 %pre
+getent group %{prometheus_group} >/dev/null || %{_sbindir}/groupadd -r 
%{prometheus_group}
+getent passwd %{prometheus_user} >/dev/null || %{_sbindir}/useradd -r -g 
%{prometheus_group} -d %{_localstatedir}/lib/prometheus -s /sbin/nologin 
%{prometheus_user}
 %service_add_pre prometheus.service
-getent group prometheus >/dev/null || %{_sbindir}/groupadd -r prometheus
-getent passwd prometheus >/dev/null || %{_sbindir}/useradd -r -g prometheus -d 
%{_localstatedir}/lib/prometheus -s /sbin/nologin prometheus
 
 %post
+%fillup_only -n prometheus
 %service_add_post prometheus.service
 
 %preun
@@ -102,7 +114,10 @@
 %postun
 %service_del_postun prometheus.service
 
-%files -f file.lst
+%verifyscript
+%fillup_only -n prometheus
+
+%files
 %defattr(-,root,root,-)
 %doc README.md
 %license LICENSE
@@ -110,9 +125,15 @@
 %{_bindir}/promtool
 %{_unitdir}/prometheus.service
 %{_sbindir}/rcprometheus
-%dir %attr(0750, prometheus, prometheus) %{_localstatedir}/lib/prometheus
-%dir %attr(0750, prometheus, prometheus) 
%{_localstatedir}/lib/prometheus/metrics
+%{_datarootdir}/prometheus
+%{_fillupdir}/sysconfig.prometheus
+%dir %attr(0700,%{prometheus_user},%{prometheus_group}) 
%{_sharedstatedir}/prometheus
+%dir %attr(0700,%{prometheus_user},%{prometheus_group}) 
%{_sharedstatedir}/prometheus/data
+%dir %attr(0700,%{prometheus_user},%{prometheus_group}) 
%{_sharedstatedir}/prometheus/metrics
 %dir %{_sysconfdir}/prometheus
 %config(noreplace) %{_sysconfdir}/prometheus/prometheus.yml
+%dir %{_libdir}/firewalld
+%dir %{_libdir}/firewalld/services
+%{_libdir}/firewalld/services/prometheus.xml
 
 %changelog

++++++ 0003-Add-Uyuni-service-discovery.patch ++++++
++++ 1996 lines (skipped)

++++++ 0004-prometheus-buildmode-pie.patch ++++++
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}}
++++++ prometheus.firewall.xml ++++++
<?xml version="1.0" encoding="utf-8"?>
<service>
    <short>Prometheus</short>
    <description>Prometheus monitoring system and time series 
database.</description>
    <port protocol="tcp" port="9090"/>
</service>
++++++ prometheus.service ++++++
--- /var/tmp/diff_new_pack.MDX0gX/_old  2019-08-09 16:50:44.929504838 +0200
+++ /var/tmp/diff_new_pack.MDX0gX/_new  2019-08-09 16:50:44.929504838 +0200
@@ -1,6 +1,8 @@
 [Unit]
 Description=Monitoring system and time series database
 Documentation=https://prometheus.io/docs/introduction/overview/
+Wants=network-online.target
+After=network-online.target
 
 [Service]
 Restart=always

++++++ prometheus.sysconfig ++++++
## Path:
## Description: Prometheus monitoring server settings
## Type:        string
## Default:     ""
## ServiceRestart: prometheus
#
# Command line options for prometheus
#
ARGS=""

Reply via email to