matomo/matomo.spec
Eric Schirra b8164d19e8 Accepting request 632251 from home:ecsos:server
- update to 3.6.0
  This a update and security release.
  # New Features
    * A new role has introduced called "write" which has less 
      permissions than an admin but more than a view only user 
      (see FAQ).
    * Custom currencies can now be added using the currencies[]
      configuration key.
    * A new segment eventValue lets you select all users who 
      tracked a custom event with a given value or range of values.
  # New config.ini.php settings
    * archiving_profile = 0, if set to 1, core:archive profiling 
      information will be recorded in a log file. the log file is 
      determined by the archive_profiling_log option.
    * archive_profiling_log =, if set to an absolute path, 
      core:archive profiling information will be logged 
      to specified file.
    * enable_internet_features=0 will now fully disable Internet 
      access by preventing all outgoing connections. Note: changing 
      this setting is not recommended for security, because you 
      will lose the easy auto-update and email notifications.
    * login_whitelist_ip[] now supports hostnames so you can 
      whitelist your IP addresses and/or Hostnames and keep your 
      Matomo secure.
  # Updated commands
    * New parameter --concurrent-archivers to define the number of 
      maximum archivers to run in parallel on this server. 
      Useful to prevent archiving processes piling up and 
      ultimately failing.
  # New APIs
    * Added new event API.addGlossaryItems which lets you add items 
      to the glossary.
    * Added new event Tracker.detectReferrerSocialNetwork which 
      lets you add custom social network detections
    * Added new event Report.unsubscribe which is triggered 
      whenever someone unsubscribe from a report
    * Added new API method UsersManager.getAvailableRoles to fetch 
      a list of all available roles that can be granted to a user.
    * Added new API method UsersManager.getAvailableCapabilities to 
      fetch a list of all available capabilities that can be 
      granted to a user.
    * Added new API method UsersManager.addCapabilities to grant 
      one or multiple capabilities to a user.
    * Added new API method UsersManager.removeCapabilities to 
      remove one or multiple capabilities from a user.
    * The API method UsersManager.setUserAccess now accepts an 
      array to pass a role and multiple capabilities at once.
    * Plugin classes can overwrite the method 
      requiresInternetConnection to define if they should be 
      automatically unloaded if no internet connection is available 
      (enable_internet_features = 0)
    * Added two new methods to the JS tracker: removeEcommerceItem 
      and clearEcommerceCart to allow better control over what is 
      in the ecommerce cart.
    * Tracking API requests now include &consent=1 in the Tracking 
      API URL When consent has been given by a user.
  # Breaking Changes
    * Changed some menu items to use translation keys instead 
      (see PR #12885).
    * The methods assertResponseCode() and assertHttpResponseText()
      in Piwik\Tests\Framework\TestCase\SystemTestCase have been
      deprecated and will be removed in Matomo 4.0. Please use 
      Piwik\Http instead.
    * The classes PHPUnit\Framework\Constraint\HttpResponseText 
      and PHPUnit\Framework\Constraint\ResponseCode have been
      deprecated and will be removed in Matomo 4.0. Please use
      Piwik\Http instead.
    * Creating links through the Proxy has been deprecated. 
      Use rel="nofollow" instead.
    * The console option --piwik-domain has been deprecated and
      will be removed in Matomo 4.0. Use --matomo-domain instead
    * Social networks are now detected as new referrer type (ID=7),
      which allows improved reports and better segmentation
    * New settings form field UI component "Field Array" that lets 
      users enter multiple values for one setting as a flat array

OBS-URL: https://build.opensuse.org/request/show/632251
OBS-URL: https://build.opensuse.org/package/show/network:utilities/matomo?expand=0&rev=10
2018-08-30 07:04:29 +00:00

172 lines
5.9 KiB
RPMSpec

#
# spec file for package matomo
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
%define apxs %{_sbindir}/apxs2
%define ap_sysconfdir %(%{apxs} -q SYSCONFDIR)
%define ap_serverroot %(%{apxs} -q PREFIX)
%if 0%{?suse_version}
%define ap_usr wwwrun
%define ap_grp www
%else
%define ap_usr nobody
%define ap_grp nogroup
%endif
%if 0%{?suse_version} >= 1210
%define has_systemd 1
%endif
Name: matomo
Version: 3.6.0
Release: 0
Summary: Web analytics platform
License: GPL-2.0-only
Group: Productivity/Networking/Web/Utilities
Url: http://matomo.org/
Source0: http://builds.matomo.org/piwik.zip
Source1: %{name}.conf
Source2: %{name}-README.SUSE
Source99: %{name}.rpmlintrc
BuildArch: noarch
BuildRequires: apache2-devel
BuildRequires: cron
BuildRequires: fdupes
BuildRequires: mariadb
%if 0%{?has_systemd}
BuildRequires: systemd
%{?systemd_requires}
%else
PreReq: %insserv_prereq
%endif
BuildRequires: unzip
Requires: apache2
Requires: cron
Requires: mariadb
Requires: mod_php_any >= 5.5.9
Requires: php-curl
Requires: php-gd
Requires: php-json
Requires: php-mysql
Recommends: php-geoip
Recommends: apache2-mod_geoip
Conflicts: piwik
%description
Matomo, formerly Piwik, is a web analytics platform that gives
insights into a website's visitors and marketing campaigns, so the
strategy and online experience of visitors may be optimized.
%prep
%setup -q -n piwik
install -m644 %{SOURCE2} README.SUSE
# remove unwanted files
find . -type f -name .htaccess -delete
find . -type f -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' {} \;
%build
#%%configure
#make %%{?_smp_mflags}
%install
# make directories
install -d -m0755 %{buildroot}/%{ap_serverroot}/%{name}
install -d -m0755 %{buildroot}/%{_sysconfdir}/%{name}
install -d -m0755 %{buildroot}/%{_defaultdocdir}/%{name}
# copy src from build to buildroot
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
# 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
%fdupes %{buildroot}/%{_prefix}
%fdupes %{buildroot}/srv
%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
%postun
%if 0%{?has_systemd}
%service_del_postun apache2.service
%else
%restart_on_update apache2
%endif
%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
%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)
%dir %{ap_serverroot}/%{name}
%dir /var/log/%{name}
%config(noreplace) %attr(600,%{ap_usr},%{ap_grp}) %{_sysconfdir}/%{name}/*php
%{_sysconfdir}/%{name}/environment/*php
%attr(0770,%{ap_usr},%{ap_grp}) %{ap_serverroot}/%{name}/console
%attr(0770,%{ap_usr},%{ap_grp}) %{ap_serverroot}/%{name}/misc/cron/archive.sh
%attr(0770,%{ap_usr},%{ap_grp}) %{ap_serverroot}/%{name}/misc/log-analytics/import_logs.py
%attr(0770,%{ap_usr},%{ap_grp}) %{ap_serverroot}/%{name}/misc/composer/clean-xhprof.sh
%attr(0770,%{ap_usr},%{ap_grp}) %{ap_serverroot}/%{name}/misc/composer/build-xhprof.sh
%attr(0770,%{ap_usr},%{ap_grp}) %{ap_serverroot}/%{name}/vendor/leafo/lessphp/package.sh
%attr(0770,%{ap_usr},%{ap_grp}) %{ap_serverroot}/%{name}/vendor/leafo/lessphp/lessify
%attr(0770,%{ap_usr},%{ap_grp}) %{ap_serverroot}/%{name}/vendor/leafo/lessphp/plessc
%attr(0770,%{ap_usr},%{ap_grp}) %{ap_serverroot}/%{name}/vendor/pear/archive_tar/sync-php4
%attr(0770,%{ap_usr},%{ap_grp}) %{ap_serverroot}/%{name}/vendor/tecnickcom/tcpdf/tools/tcpdf_addfont.php
%{ap_serverroot}/%{name}/*
%changelog