From 332f19e553d9b2d64fe2ce33428a09db05b6f3f662ae836bbc4fe89386f99ad1 Mon Sep 17 00:00:00 2001 From: Eric Schirra Date: Fri, 23 Nov 2018 21:32:38 +0000 Subject: [PATCH] Accepting request 651441 from home:jengelh:branches:network:utilities - Join %service_* calls, find calls, everything that iterates (except for fdupes, where /usr files naturally should be separated from /srv). - Require user/group package. OBS-URL: https://build.opensuse.org/request/show/651441 OBS-URL: https://build.opensuse.org/package/show/network:utilities/matomo?expand=0&rev=16 --- matomo.changes | 8 ++++++++ matomo.spec | 29 +++++++++++++---------------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/matomo.changes b/matomo.changes index 2a63f45..06a4abb 100644 --- a/matomo.changes +++ b/matomo.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Nov 22 18:07:12 UTC 2018 - Jan Engelhardt + +- Join %service_* calls, find calls, everything that iterates + (except for fdupes, where /usr files naturally should be + separated from /srv). +- Require user/group package. + ------------------------------------------------------------------- Tue Nov 20 06:49:47 UTC 2018 - ecsos@opensuse.org diff --git a/matomo.spec b/matomo.spec index 7ad5c96..8043e51 100644 --- a/matomo.spec +++ b/matomo.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -46,8 +46,12 @@ Source11: %{name}-archive.service Source12: %{name}-archive.timer Source99: %{name}.rpmlintrc BuildArch: noarch -#Requires(post): user(wwwrun) -#Requires(post): group(www) +%if 0%{?suse_version} >= 1500 +Requires(pre): user(%ap_usr) +Requires(pre): group(%ap_grp) +%else +Requires(pre): aaa_base +%endif BuildRequires: apache2-devel BuildRequires: cron BuildRequires: fdupes @@ -84,12 +88,11 @@ strategy and online experience of visitors may be optimized. %setup -q -n matomo install -m644 %{SOURCE4} README.SUSE # remove unwanted files -find . -type f -name .htaccess -delete -find . -type f -name .travis.sh -delete +find . -type f "(" -name .htaccess -o -name .travis.sh ")" -delete #find . -name ".git*" -exec rm -Rf "{}" "+" find . -type f "(" -name "*.c" -o -name "*.h" ")" -delete # env-script-interpreter -find . -type f -exec sed -i -e 's|\/usr\/bin\/env php|\/usr\/bin\/php|g' {} \; +find . -type f -exec sed -i -e 's|\/usr\/bin\/env php|\/usr\/bin\/php|g' {} + %build # nothing to build @@ -127,14 +130,11 @@ sed -i -e 's|@ap_serverroot@|%{ap_serverroot}|g' %{buildroot}%{_unitdir}/%{name} %fdupes %{buildroot}/srv %pre -%service_add_pre matomo-archive.timer -%service_add_pre matomo-archive.service +%service_add_pre matomo-archive.timer matomo-archive.service %post chown -R %{ap_usr}:%{ap_grp} %{ap_serverroot}/%{name} -%service_add_post matomo-archive.timer -%service_add_post matomo-archive.service -%service_add_post apache2.service +%service_add_post matomo-archive.timer matomo-archive.service apache2.service # Update matomo if this is an upgrade $1 == 2 echo "matomo: Update matomo:core..." if [ $1 -gt 1 ]; then @@ -147,13 +147,10 @@ if [ $1 -gt 1 ]; then fi %preun -%service_del_preun matomo-archive.timer -%service_del_preun matomo-archive.service +%service_del_preun matomo-archive.timer matomo-archive.service %postun -%service_del_postun matomo-archive.timer -%service_del_postun matomo-archive.service -%service_del_postun apache2.service +%service_del_postun matomo-archive.timer matomo-archive.service apache2.service %files %defattr(-,root,root,-)