Hello community,

here is the log from the commit of package matomo for openSUSE:Factory checked 
in at 2018-11-26 10:31:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/matomo (Old)
 and      /work/SRC/openSUSE:Factory/.matomo.new.19453 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "matomo"

Mon Nov 26 10:31:30 2018 rev:7 rq:651455 version:3.7.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/matomo/matomo.changes    2018-10-22 
11:24:05.791110610 +0200
+++ /work/SRC/openSUSE:Factory/.matomo.new.19453/matomo.changes 2018-11-26 
10:32:32.996870216 +0100
@@ -1,0 +2,26 @@
+Thu Nov 22 18:07:12 UTC 2018 - Jan Engelhardt <[email protected]>
+
+- 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 - [email protected]
+
+- Update to 3.7.0
+  This is an update and security release.
+  Detail changelog see: https://matomo.org/changelog/matomo-3-7-0/
+
+-------------------------------------------------------------------
+Sat Nov 17 11:23:15 UTC 2018 - [email protected]
+
+- Remove verification for systemd
+- Add systemd-timer for auto archiving of reports.
+  Now you can use cron or systemd.timer.
+- Add core:update during update of package
+- Add logrotate
+- Add rpmlintrc
+- Upgrade README.SUSE
+
+-------------------------------------------------------------------

Old:
----
  piwik.zip

New:
----
  matomo-3.7.0.tar.gz
  matomo-archive.cron
  matomo-archive.service
  matomo-archive.timer
  matomo.logrotate

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

Other differences:
------------------
++++++ matomo.spec ++++++
--- /var/tmp/diff_new_pack.n9E2It/_old  2018-11-26 10:32:38.628863618 +0100
+++ /var/tmp/diff_new_pack.n9E2It/_new  2018-11-26 10:32:38.636863609 +0100
@@ -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/
 #
 
 
@@ -30,41 +30,50 @@
 %define ap_grp nogroup
 %endif
 
-%if 0%{?suse_version} >= 1210
-%define has_systemd 1
-%endif
-
 Name:           matomo
-Version:        3.6.1
+Version:        3.7.0
 Release:        0
 Summary:        Web analytics platform
-License:        GPL-2.0-only
+License:        GPL-3.0-or-later
 Group:          Productivity/Networking/Web/Utilities
 Url:            http://matomo.org/
-Source0:        http://builds.matomo.org/piwik.zip
-Source1:        %{name}.conf
-Source2:        %{name}-README.SUSE
+Source0:        http://builds.matomo.org/%{name}-%{version}.tar.gz
+Source2:        %{name}.conf
+Source3:        %{name}.logrotate
+Source4:        %{name}-README.SUSE
+Source10:       %{name}-archive.cron
+Source11:       %{name}-archive.service
+Source12:       %{name}-archive.timer
 Source99:       %{name}.rpmlintrc
 BuildArch:      noarch
+%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
+BuildRequires:  logrotate
 BuildRequires:  mariadb
-%if 0%{?has_systemd}
+#BuildRequires:  php-json
+#BuildRequires:  php-mbstring
+#BuildRequires:  php-pdo
 BuildRequires:  systemd
-%{?systemd_requires}
-%else
-PreReq:         %insserv_prereq
-%endif
 BuildRequires:  unzip
 Requires:       apache2
 Requires:       cron
+Requires:       logrotate
 Requires:       mariadb
 Requires:       mod_php_any >= 5.5.9
 Requires:       php-curl
 Requires:       php-gd
 Requires:       php-json
+Requires:       php-mbstring
 Requires:       php-mysql
+Requires:       php-pdo
+%{?systemd_requires}
 Recommends:     php-geoip
 Recommends:     apache2-mod_geoip
 
@@ -76,19 +85,17 @@
 strategy and online experience of visitors may be optimized.
 
 %prep
-%setup -q -n piwik
-install -m644 %{SOURCE2} README.SUSE
+%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
-#%%configure
-#make %%{?_smp_mflags}
+# nothing to build
 
 %install
 # make directories
@@ -99,56 +106,62 @@
 mv *SUSE %{buildroot}/%{_defaultdocdir}/%{name}
 mv LEGALNOTICE %{buildroot}/%{_defaultdocdir}/%{name}
 mv LICENSE %{buildroot}/%{_defaultdocdir}/%{name}
-
 mv "misc/How to install Matomo.html" %{buildroot}/%{_defaultdocdir}/%{name}
 mv *md %{buildroot}/%{_defaultdocdir}/%{name}
 cp -dR * %{buildroot}/%{ap_serverroot}/%{name}
 # install matomo.conf to apache conf.d
-install -D -m0640 %{SOURCE1} %{buildroot}/%{ap_sysconfdir}/conf.d/%{name}.conf
+install -D -m0640 %{SOURCE2} %{buildroot}/%{ap_sysconfdir}/conf.d/%{name}.conf
+# install logrotate
+install -D -m0644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/logrotate.d/%{name}
 # move config to etc/matomo and make symlink
 mv %{buildroot}/%{ap_serverroot}/%{name}/config/* \
                       %{buildroot}/%{_sysconfdir}/%{name}
 rm -d %{buildroot}/%{ap_serverroot}/%{name}/config
 ln -s %{_sysconfdir}/%{name} %{buildroot}/%{ap_serverroot}/%{name}/config
-# install cronscript
-install -d -m0755 %{buildroot}/%{_sysconfdir}/cron.d
-install -d -m0755 %{buildroot}/var/log/%{name}
-cat >>%{buildroot}%{_sysconfdir}/cron.d/%{name}-archive <<EOF
-# without CLI
-#5 * * * * wwwrun %{_bindir}/php 
%{ap_serverroot}/%{name}/misc/cron/archive.php --url=http://localhost/matomo/ > 
/var/log/%{name}/%{name}-archive.log
-# with CLI
-5 * * * * wwwrun %{_bindir}/php %{ap_serverroot}/%{name}/console core:archive 
--url=http://localhost/matomo/ > /var/log/%{name}/%{name}-archive.log
-EOF
+# install cronscript and systemd-timer
+install -d -m 0755 %{buildroot}/%{_sysconfdir}/cron.d
+install -d -m 0755 %{buildroot}/var/log/%{name}
+install -D -m 0644 %{SOURCE10} 
%{buildroot}/%{_sysconfdir}/cron.d/%{name}-archive
+install -D -m 0644 %{SOURCE11} %{buildroot}%{_unitdir}/%{name}-archive.service
+install -D -m 0644 %{SOURCE12} %{buildroot}%{_unitdir}/%{name}-archive.timer
+sed -i -e 's|@ap_serverroot@|%{ap_serverroot}|g' 
%{buildroot}%{_unitdir}/%{name}-archive.service
 
 %fdupes %{buildroot}/%{_prefix}
 %fdupes %{buildroot}/srv
 
+%pre
+%service_add_pre matomo-archive.timer matomo-archive.service
+
 %post
 chown -R %{ap_usr}:%{ap_grp} %{ap_serverroot}/%{name}
-%if 0%{?has_systemd}
-%service_add_post apache2.service
-%else
-%restart_on_update apache2
-%endif
-# TODO
-#if [ "$1" = 2 ]; then
-#      %%{_bindir}/php %%{ap_serverroot}/%%{name}/console core:update
-#fi
+%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
+  su wwwrun -s /bin/sh -c "%{_bindir}/php %{ap_serverroot}/%{name}/console 
config:set 'Tracker.record_statistics="0"'" || :
+  su wwwrun -s /bin/sh -c "%{_bindir}/php %{ap_serverroot}/%{name}/console 
config:set 'General.maintenance_mode="1"'" || :
+  su wwwrun -s /bin/sh -c "%{_bindir}/php %{ap_serverroot}/%{name}/console 
core:update --yes" || :
+  su wwwrun -s /bin/sh -c "%{_bindir}/php %{ap_serverroot}/%{name}/console 
config:set 'General.maintenance_mode="0"'" || :
+  su wwwrun -s /bin/sh -c "%{_bindir}/php %{ap_serverroot}/%{name}/console 
config:set 'Tracker.record_statistics="1"'" || :
+  :
+fi
+
+%preun
+%service_del_preun matomo-archive.timer matomo-archive.service
 
 %postun
-%if 0%{?has_systemd}
-%service_del_postun apache2.service
-%else
-%restart_on_update apache2
-%endif
+%service_del_postun matomo-archive.timer matomo-archive.service apache2.service
 
 %files
 %defattr(-,root,root,-)
 #%%doc README.SUSE CHANGELOG.md CONTRIBUTING.md LEGALNOTICE README.md 
SECURITY.md
 %dir %{_defaultdocdir}/%{name}
 %{_defaultdocdir}/%{name}/*
-%config(noreplace) %{_sysconfdir}/cron.d/%{name}-archive
 %config(noreplace) %{ap_sysconfdir}/conf.d/%{name}.conf
+%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
+%config(noreplace) %{_sysconfdir}/cron.d/%{name}-archive
+%config(noreplace) %{_unitdir}/%{name}-archive.service
+%config(noreplace) %{_unitdir}/%{name}-archive.timer
 %dir %attr(0750,%{ap_usr},%{ap_grp}) %{_sysconfdir}/%{name}
 %dir %attr(0750,%{ap_usr},%{ap_grp}) %{_sysconfdir}/%{name}/environment
 %defattr(640,%{ap_usr},%{ap_grp},750)

++++++ matomo-README.SUSE ++++++
--- /var/tmp/diff_new_pack.n9E2It/_old  2018-11-26 10:32:38.668863571 +0100
+++ /var/tmp/diff_new_pack.n9E2It/_new  2018-11-26 10:32:38.668863571 +0100
@@ -42,3 +42,9 @@
 To prevent some critical issue, you must set the following in your php.ini 
file: 
   always_populate_raw_post_data=-1
 After making this change, restart your web server
+
+f) auto archiving
+For autoarchiving you have two options.
+With cron or with systemd.timer.
+For cron you must uncomment the line in /etc/cron.d/matomo-archive
+For systemd.timer you must start and enable matomo-archive.timer

++++++ matomo-archive.cron ++++++
#
# cron for matomo Auto-Archiving of Your Reports
#

# without CLI
#5 * * * * wwwrun %{_bindir}/php %{ap_serverroot}/%{name}/misc/cron/archive.php 
--url=http://localhost/matomo/ > /var/log/%{name}/%{name}-archive.log

# with CLI
5 * * * * wwwrun %{_bindir}/php %{ap_serverroot}/%{name}/console core:archive 
--url=http://localhost/matomo/ > /var/log/%{name}/%{name}-archive.log
++++++ matomo-archive.service ++++++
[Unit]
Description=Auto-Archiving of matomo Reports

[Service]
Type=oneshot
User=wwwrun
Group=www
ExecStart=/bin/bash -ce "/usr/bin/php /srv/www/matomo/console core:archive 
--url=http://localhost/matomo/ >> /var/log/matomo/matomo-archive.log 2>&1"
#StandardOutput=file:/var/log/matomo/matomo-archive.log
#StandardError=file:/var/log/matomo/matomo-archive.log
++++++ matomo-archive.timer ++++++
[Unit]
Description=Auto-Archiving of matomo Reports

[Timer]
OnCalendar=*-*-* *:05:00
AccuracySec=12h
Persistent=true

[Install]
WantedBy=timers.target
++++++ matomo.logrotate ++++++
/var/log/matomo/matomo-archive.log
{
su wwwrun www
rotate 30
daily
missingok
notifempty
delaycompress
compress
}
++++++ matomo.rpmlintrc ++++++
--- /var/tmp/diff_new_pack.n9E2It/_old  2018-11-26 10:32:38.776863445 +0100
+++ /var/tmp/diff_new_pack.n9E2It/_new  2018-11-26 10:32:38.780863440 +0100
@@ -1,3 +1,11 @@
 #  Output filters 
 addFilter("hidden-file-or-dir")
-addFilter("macro-in-comment")
\ No newline at end of file
+addFilter("macro-in-comment")
+addFilter("suse-missing-rclink matomo-archive")
+addFilter("non-etc-or-var-file-marked-as-conffile 
/usr/lib/systemd/system/matomo-archive.service")
+addFilter("non-etc-or-var-file-marked-as-conffile 
/usr/lib/systemd/system/matomo-archive.timer")
+addFilter("zero-length 
/srv/www/matomo/plugins/Morpheus/stylesheets/base/font.css")
+addFilter("pem-certificate")
+addFilter("non-conffile-in-etc /etc/matomo/environment/dev.php")
+addFilter("non-conffile-in-etc /etc/matomo/environment/test.php")
+addFilter("non-conffile-in-etc /etc/matomo/environment/ui-test.php")


Reply via email to