Hello community, here is the log from the commit of package grafana-sap-providers for openSUSE:Factory checked in at 2020-09-22 21:07:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/grafana-sap-providers (Old) and /work/SRC/openSUSE:Factory/.grafana-sap-providers.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "grafana-sap-providers" Tue Sep 22 21:07:19 2020 rev:2 rq:835260 version:1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/grafana-sap-providers/grafana-sap-providers.changes 2020-07-16 12:17:26.338903218 +0200 +++ /work/SRC/openSUSE:Factory/.grafana-sap-providers.new.4249/grafana-sap-providers.changes 2020-09-22 21:08:19.295779249 +0200 @@ -1,0 +2,8 @@ +Wed Sep 16 15:01:10 UTC 2020 - Dario Maiocchi <dmaioc...@suse.com> + +- Version 1.1: + * use recommends instead of requires on grafana (jsc#10545) + * change attributes on provisioning dir, otherwise grafana fails to start + * create grafana/user groups to fix permissions + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ grafana-sap-providers.spec ++++++ --- /var/tmp/diff_new_pack.ExG7Gq/_old 2020-09-22 21:08:22.303781881 +0200 +++ /var/tmp/diff_new_pack.ExG7Gq/_new 2020-09-22 21:08:22.307781884 +0200 @@ -1,29 +1,37 @@ # -# Copyright 2020 SUSE LLC +# spec file for package grafana-sap-providers # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# Copyright (c) 2020 SUSE LLC # -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # + + Name: grafana-sap-providers -Version: 1.0 +Version: 1.1 Release: 0 -License: Apache-2.0 Summary: Grafana configuration providers for SAP applications +License: Apache-2.0 Group: System/Monitoring Source0: provider-sles4sap.yaml Source1: LICENSE BuildArch: noarch -Requires: grafana -BuildRequires: grafana +Recommends: grafana +Requires(pre): shadow + +# TECHNICAL NOTE: +# Originally we used to require grafana but, for product management reasons, we use recommends now +# this impacts how we do pkging here: requiring shadow, creating grafana usr/group +# and modifiying files attributes (this was done automagically when requiring grafana). %description Automated configuration provisioners leveraged by other packages to enable a zero-config installation of Grafana dashboards. @@ -31,18 +39,26 @@ %prep cp %{SOURCE1} %{_builddir} +%pre +echo "Creating grafana user and group if not present" +getent group grafana > /dev/null || groupadd -r grafana +getent passwd grafana > /dev/null || useradd -r -g grafana -d %{_datadir}/grafana -s /sbin/nologin grafana + %build %install -%define dasboards_dir %{_localstatedir}/lib/grafana/dashboards -%define provisioning_dir %{_sysconfdir}/grafana/provisioning/dashboards -install -d -m0755 %{buildroot}%{dasboards_dir}/sles4sap -install -Dm644 %{SOURCE0} %{buildroot}%{provisioning_dir}/provider-sles4sap.yaml +install -d -m0755 %{buildroot}%{_localstatedir}/lib/grafana/dashboards/sles4sap +install -Dm644 %{SOURCE0} %{buildroot}%{_sysconfdir}/grafana/provisioning/dashboards/provider-sles4sap.yaml %files %defattr(-,root,root) %license LICENSE -%attr(0755,grafana,grafana) %dir %{dasboards_dir}/sles4sap -%attr(0644,root,root) %config %{provisioning_dir}/provider-sles4sap.yaml +%attr(0755,root,root) %dir %{_sysconfdir}/grafana +%attr(0755,root,root) %dir %{_sysconfdir}/grafana/provisioning +%attr(0755,root,root) %dir %{_sysconfdir}/grafana/provisioning/dashboards +%attr(0644,root,root) %config %{_sysconfdir}/grafana/provisioning/dashboards/provider-sles4sap.yaml +%attr(0755,grafana,grafana) %dir %{_localstatedir}/lib/grafana +%attr(0755,grafana,grafana) %dir %{_localstatedir}/lib/grafana/dashboards +%attr(0755,grafana,grafana) %dir %{_localstatedir}/lib/grafana/dashboards/sles4sap %changelog