matomo-org / matomo-package Goto Github PK
View Code? Open in Web Editor NEWMatomo release script (official package), and debian/ubuntu package (allows sysadmins to deploy Matomo within seconds using "apt-get install piwik -V")
Matomo release script (official package), and debian/ubuntu package (allows sysadmins to deploy Matomo within seconds using "apt-get install piwik -V")
Got feedback from Microsoft Web Application Gallery:
There was a problem with this submission and it has been marked as test failed.
The link for the package was invalid.
Can you please re-submit and correct the issue?
Let's fix this for 2.11.0 release
After every debian piwik package update I always should apply manually
chown -R piwik:piwik /usr/share/piwik/tmp/
when Piwik runas as piwik user
It's changing somehow to www-data user.
Apache 2.4 uses a new syntax for access control:
2.2 configuration:
Order deny,allow
Deny from all
2.4 configuration:
Require all denied
See the documentation on upgrading from 2.2 to 2.4.
The new automatic install script for Apache 2.4 proposed in #39 could be used to link different config files, depending whether Apache 2.2 or 2.4 is used.
Currently the piwik-archive
cron does not save any logging information at all (by default). But since a log directory is created by the package anyway (/var/log/piwik), wouldn't it be nice to let the cron job save its result to a log file in that directory? For instance /var/log/piwik/archive.log.
The only caveat would be that the job needs to be run by root instead of www-data. Would that be considered a bad practice?
Hi Aurélien,
We are gratefully using your debian-apt-repository for installing Piwik on our servers.
As you may know, the 2.x-branch has been declared LTS, in anticipation to the new stable 3.x version of Piwik.
One of the requirements for Piwik3 is PHP5.6, which is NOT available in Debian Wheezy(oldstable).
What are your plans with the repository for debian.piwik.org?
Will you build and host the packages for both the 2.x-lts and 3.x-stable Piwik-releases?
Do you have plans to keep supporting Wheezy(oldstable), or drop support and only support Jessie(stable)?
We sincerely hope you will keep supporting Wheezy and Piwik 2.x-lts.
I know this will require some reorganisation to the apt-repository, something like dotdeb would be nice: https://packages.dotdeb.org/dists/
Many thanks in advance!
According to http://piwik.org/docs/setup-auto-archiving/
1 - the correct way to execute the cron is by executing archive.php
2 - to match the doc, the cron file should be "piwik-archive" not "piwik"
Following the instructions from debian.piwik.org on a fresh installation on Debian Jessie (running in a container) fails while configuring the piwik package with the following errors:
The configuration file {/usr/share/piwik/config/config.ini.php} has not been found or could not be read.
» Please check that /usr/share/piwik/config/config.ini.php is readable by the user 'root'.
[Zend_Db_Adapter_Exception]
SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
[PDOException]
SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
core:update [--yes]
dpkg: error processing package piwik (--configure):
subprocess installed post-installation script returned error exit status 255
Btw, when I manually install the mysql-server the error is replaced with an "Access Denied to root@localhost" or something like that. But I would assume that the piwik package should take care of all of that.
/usr/share/piwik/config/config.ini.php
doesn't seem to exist on my system. How can I fix this?
When we've installed piwik 2.0.7-1 with apt-get we've noticed that apache http server seems to come bundled as a dependency. This is a problem if you're running a different web server like nginx.
Although the installation appears to succeed we see a lot of errors in logs and we end up with unnecessary packages installed:
part of the output from apt-get install piwik is as follows:
Setting up mysql-common (5.5.38-0ubuntu0.12.04.1) ...
Setting up libmysqlclient18 (5.5.38-0ubuntu0.12.04.1) ...
Setting up php5-common (5.3.10-1ubuntu3.14) ...
Setting up php5-cli (5.3.10-1ubuntu3.14) ...
Creating config file /etc/php5/cli/php.ini with new version
update-alternatives: using /usr/bin/php5 to provide /usr/bin/php (php) in auto mode.
Setting up libapr1 (1.4.6-1) ...
Setting up libaprutil1 (1.3.12+dfsg-3) ...
Setting up libaprutil1-dbd-sqlite3 (1.3.12+dfsg-3) ...
Setting up libaprutil1-ldap (1.3.12+dfsg-3) ...
Setting up apache2.2-bin (2.2.22-1ubuntu1.7) ...
Setting up apache2-utils (2.2.22-1ubuntu1.7) ...
Setting up apache2.2-common (2.2.22-1ubuntu1.7) ...
Enabling site default.
Enabling module alias.
Enabling module autoindex.
Enabling module dir.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module status.
Enabling module auth_basic.
Enabling module deflate.
Enabling module authz_default.
Enabling module authz_user.
Enabling module authz_groupfile.
Enabling module authn_file.
Enabling module authz_host.
Enabling module reqtimeout.
Setting up apache2-mpm-prefork (2.2.22-1ubuntu1.7) ...
Creating config file /etc/php5/apache2/php.ini with new version
Steps to reproduce:
vagrant init hashicorp/precise64
vagrant ssh
apt-get install nginx
echo 'deb http://debian.piwik.org/ piwik main' > /etc/apt/sources.list.d/piwik.list
curl -k https://debian.piwik.org/repository.gpg | apt-key add -
service nginx start
Hi @aureq!
Piwik 2.12.1 will be released in couple hours, this will be an excellent stable version of Piwik - could we release the Debian package for letting the community use the very best Piwik has to offer?
this enables advanced piwik features by default
First of all thanks for this package!
after installing piwik complained about not finding the gd library.
please add php5-gd
to Recommends:
The package dependency doesn't require "php5-curl" during the installation. Though, this package is necessary in order to run the cron correctly.
Debian 8/Jessie and Ubuntu 14/Trusty use Apache 2.4 which has not /etc/apache2/conf.d anymore but /etc/apache2/conf-available and /etc/apache2/conf-enabled which is not recognized by Debian package installer (and I gutes other distros, too)
Given that Piwik is compatible with PHP 7.0 for the most part as per this report and that using the dotdeb packages one can install PHP 7.0 on Debian Jessie cleanly, I wonder when/if updating this package's dependencies is planned?
Right now using this package would require installation of PHP 5.x even though PHP 7.x might be available/already installed.
I few warnings came up:
Hi,
It would be nice if you can add support for user (webui) changeable logo in debian package.
It currently does not work because:
I made the following changes to enable logo upload through webui:
ad 1) i enabled write access for www-data:
dpkg-statoverride --update --add root www-data 775 /usr/share/piwik/misc/user
ad 2) i allowed access to this directory through apache conf.d snippet
cat >/etc/apache2/conf.d/piwik_logo.conf <<EOT
# allow access to the customization directory
<Directory /usr/share/piwik/misc/user>
Options None
Order allow,deny
Allow From ALL
</Directory>
EOT
And many thx for your debian package!
Go to settings => System check.
File integrity
File integrity check failed and reported some errors. This is most likely due to a partial or failed upload of some of the Piwik files. You should reupload all the Piwik files in BINARY mode and refresh this page until it shows no error.
This used to be correct, but there are now two sub-modules that we need to keep in the core release. We need a way to define sub modules that should be there in our packaged builds.
Since 2.10.0 the release tarball contains .git
files in some places. These do not contain the actual submodule repository but simply represent a relative link pointing outside the source tree:
$ cat ./libs/PiwikTracker/.git
gitdir: ../../.git/modules/libs/PiwikTracker
As a result git add
wreaks havoc when trying to check in newer piwik releases into an existing source tree:
$ git add .
fatal: Not a git repository: libs/PiwikTracker/../../.git/modules/libs/PiwikTracker
This seems to have appeared in 2.10.0:
$ for v in 2.8.0 2.9.0 2.10.0 2.11.0 2.12.0; do echo $v && curl http://builds.piwik.org/piwik-$v.tar.gz 2>/dev/null | tar tz | grep '\.git$'; done
2.8.0
2.9.0
2.10.0
piwik/libs/PiwikTracker/.git
2.11.0
piwik/libs/PiwikTracker/.git
2.12.0
piwik/libs/PiwikTracker/.git
piwik/misc/log-analytics/.git
Todo:
Note: all tests
folders are already deleted with find ./ -name 'tests' -type d -prune -exec rm -rf {} \;
I will add to delete all Tests
folders as well
The logrotate rule is installed in /etc/logrotate.d/piwik-archive/logorate
instead of /etc/logrotate.d/piwik-archive
I've just helped someone updating their debian package and there were a few minor usability things that weren't clear.
It once asked re whether to enable automatic database update and we thought we enable a setting to do this in the future automatically (the updates). Instead it would be maybe better to ask whether "someone wants to update the DB now". It would be also maybe good to mention that this is recommended unless it is a high traffic website. Also we weren't sure what would happen if we said "No" and didn't perform the update. Would we get the queries and be able to execute them manually? Maybe it would be good to mention the workflow if someone selects "no".
Also it asked whether to overwrite global.ini.php and the person was about to say "No keep my local file" but this can lead to problems with Piwik. Ideally the updater would always replace the global config I'd say
To save much space, see matomo-org/matomo#8144 (comment)
As discussed with @mattab we need to streamline the package creation process and reduce to the maximum the number of custom steps.
When I select automatic db upgrade I got in first installation this error message several times:
[Zend_Db_Adapter_Exception]
SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)
without requests for host,user, password setup ...
Perhaps you can check from another Debian package howto include packe/functions of "dbconfig-common" (e.g. from package "icinga2-ido-mysql". "phpmyadmin" )
It looks like that this is very easy to integrate into postinst script:
. /usr/share/dbconfig-common/dpkg/postinst.mysql
dbc_generate_include_owner="root:www-data"
dbc_generate_include_perms="0640"
dbc_generate_include=php:/etc/phpmyadmin/config-db.php
and postrm script:
if [ "$1" = "purge" ]; then
rm -f /etc/phpmyadmin/config-db.php
if which ucf >/dev/null 2>&1; then
ucf --debconf-ok --purge /etc/phpmyadmin/config-db.php
fi
fi
Currently, installer fails on Debian 8+ as /etc/apache2/conf.d' has been replaced by
/etc/apache2/conf-available&
/etc/apache2/conf-enabled`
#59 submitted for this functionality
This issue is related to #62
Matomo needs a better and fully/mostly automated build environment. This issue is to track that work.
.deb
into debian.matomo.org
for publicationTrying to install the package gives me this error:
Setting up matomo (3.5.1-2) ...
/var/lib/dpkg/info/matomo.postinst: 70: /var/lib/dpkg/info/matomo.postinst: a2enconf: not found
dpkg: error processing package matomo (--configure):
subprocess installed post-installation script returned error exit status 127
Processing triggers for php7.0-fpm (7.0.30-0+deb9u1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up php-curl (1:7.0+49) ...
Errors were encountered while processing:
matomo
E: Sub-process /usr/bin/dpkg returned an error code (1)
Obviously the problem is caused by me having nginx installed, not Apache.
On a side note, the Github URL is wrong on this page: http://debian.piwik.org/
Hi @aureq !
Is it possible to build a Debian package with the latest version 3.3.0 and never the less with the new name Matomo?
Torsten
The "Verify" instructions on https://debian.piwik.org/ are not very good
- Verify the repository gpg key.
wget http://debian.piwik.org/repository.gpg -qO - | sha256sum
The value returned should be
0d7c880f6c838bba2d02817dcacfc97fc538b1ebcdb41c3106595265c0d371d4
Ok, I verified the downloaded file.
- Install the signing key on your computer.
wget -qO - http://debian.piwik.org/repository.gpg | sudo apt-key add -
And now I do not use the verified file but download the file again, that could now be manipulated without me knowing...
Also: For increased security, the links should be https which seems supported and is also used in the sources list URLs.
Hello Aurélien Requiem,
I use your convenient service. The debian package works great.
Could you build a debian-package for the new piwik version (2.7.0)?
I would be delighted.
Thanks & Greetings,
Michael
done!
Following Daniel comment on commit b42576f it's not necessary to use option -ai386.
The debian/control script should set priority to optional. This would be more in keeping with the debain guidelines
https://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.html#s-priority
In my case I included piwik in a repository and it got pulled into a build it shouldn't have simply because priority is set to important.
Thanks
Regarding GRANT FILE ON piwik.* TO piwik@localhost;
in README.Debian
.
This should be GRANT FILE ON *.* TO piwik@localhost;
:
It is impossible to grant FILE on a single database only, and makes no sense inherently.
Like it was written, the statement results in ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
.
See http://stackoverflow.com/questions/13552206/grant-file-on-just-one-database for an explanation.
Found in 2.10.0, usr/share/piwik/vendor/doctrine/cache/.git/
In this repository, files have wrong permissions (0755 instead of 0644).
Accessing the site is giving me:
An error occurred
Matomo couldn't write to some directories .
Try to Execute the following commands on your server, to allow Write access on these directories:
chown -R root:root /usr/share/matomo
chmod -R 0755 /usr/share/matomo/tmp
chmod -R 0755 /usr/share/matomo/tmp/assets/
chmod -R 0755 /usr/share/matomo/tmp/cache/
chmod -R 0755 /usr/share/matomo/tmp/logs/
chmod -R 0755 /usr/share/matomo/tmp/tcpdf/
chmod -R 0755 /usr/share/matomo/tmp/templates_c/
Obviously, the server is not running as root, so it cannot write to these directories. But, I don't want it to write to /usr/share/ anyway.
Looking at index.php, it appears to define the paths with no way for me to customise them. Presumably, I need to set PIWIK_DOCUMENT_ROOT to /var/www/mysite/ and PIWIK_INCLUDE_PATH to /usr/share/matomo/.
Is there something I'm missing that would allow me to change these paths?
I'm using nginx if it makes a difference.
Following the steps to install the official piwik
Debian package on Debian testing (stretch), I am unable to get past apt-get update
, which gives me a GPG error.
sudo apt-get update
Hit:1 http://ftp.acc.umu.se/debian stretch InRelease
Ign:2 https://debian.piwik.org piwik InRelease
Hit:3 https://debian.piwik.org piwik Release
Hit:4 http://security.debian.org/debian-security stretch/updates InRelease
Get:5 https://debian.piwik.org piwik Release.gpg [197 B]
Ign:5 https://debian.piwik.org piwik Release.gpg
Fetched 197 B in 0s (294 B/s)
Reading package lists... Done
W: GPG error: https://debian.piwik.org piwik Release: The following signatures were invalid: 1FD752571FE36FF23F78F91B81E2E78B66FED89E
W: The repository 'https://debian.piwik.org piwik Release' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
While vague, this seems to be the issue: The following signatures were invalid: 1FD752571FE36FF23F78F91B81E2E78B66FED89E
. Note that they fingerprint is correct according to apt-key list
(see output below).
I believe that the problem is that the PGP key used to sign the repository uses DSA 1024 bit, as there's a push to abandon weak/old (digest) algorithms before January 1, 2017. Official Debian repos use RSA 4096. Here's a quote:
Fixing half-broken repositories: Repositories with DSA keys need to be migrated to RSA first. Migrating from DSA to RSA is best done by signing the repository with two keys (old and new one) and shipping the new one to the users.
Would it be possible to follow the recommendation and transition to a stronger repository key?
Just to clarify that the Piwik repository key has been added to apt
on my machine, according to the official instructions.
sudo apt-key list
/etc/apt/trusted.gpg
--------------------
pub dsa1024 2013-12-19 [SC]
1FD7 5257 1FE3 6FF2 3F78 F91B 81E2 E78B 66FE D89E
uid [ unknown] Piwik Open Source Analytics (Debian Package) <[email protected]>
sub elg4096 2013-12-19 [E]
/etc/apt/trusted.gpg.d/debian-archive-jessie-automatic.gpg
----------------------------------------------------------
pub rsa4096 2014-11-21 [SC] [expires: 2022-11-19]
126C 0D24 BD8A 2942 CC7D F8AC 7638 D044 2B90 D010
uid [ unknown] Debian Archive Automatic Signing Key (8/jessie) <[email protected]>
(... several keys follow ...)
Oringinally reported in matomo-org/matomo#8532:
After every debian piwik package update I always should apply manually
chown -R piwik:piwik /usr/share/piwik/tmp/
when Piwik runas as piwik user
It's changing somehow to www-data user.
Several 403 errors
# aptitude update
Ign https://debian.piwik.org piwik Release.gpg
Ign https://debian.piwik.org piwik Release
Hit http://security.debian.org wheezy/updates Release.gpg
Hit http://security.debian.org wheezy/updates Release
Err https://debian.piwik.org piwik/main Sources
The requested URL returned error: 403
Err https://debian.piwik.org piwik/main amd64 Packages
The requested URL returned error: 403
Hit http://ftp.de.debian.org wheezy Release.gpg
Ign https://debian.piwik.org piwik/main Translation-en
Hit http://security.debian.org wheezy/updates/main Sources
Hit http://ftp.de.debian.org wheezy-updates Release.gpg
Hit http://security.debian.org wheezy/updates/main amd64 Packages
Hit http://security.debian.org wheezy/updates/main Translation-en
Hit http://ftp.de.debian.org wheezy Release
Hit http://ftp.de.debian.org wheezy-updates Release
Hit http://ftp.de.debian.org wheezy/main Sources
Hit http://ftp.de.debian.org wheezy/main amd64 Packages
Hit http://ftp.de.debian.org wheezy/main Translation-en
Hit http://ftp.de.debian.org wheezy-updates/main Sources
Hit http://ftp.de.debian.org wheezy-updates/main amd64 Packages/DiffIndex
Hit http://ftp.de.debian.org wheezy-updates/main Translation-en/DiffIndex
88% [Working]W: Failed to fetch https://debian.piwik.org/dists/piwik/main/source/Sources: The requested URL returned error: 403
W: Failed to fetch https://debian.piwik.org/dists/piwik/main/binary-amd64/Packages: The requested URL returned error: 403
E: Some index files failed to download. They have been ignored, or old ones used instead.
E: Couldn't rebuild package cache
Hello!
(Attention, the Problem occured 2Weeks ago. I had posted it to http://forum.piwik.org/t/bug-debian-install-missing-config-ini-php-not-found-apache-and-database-error/17291 at first.)
When Installing Piwik on Debian Server (minimal, 8.2) there were several mistakes in automatic configuration:
I wass following the installation instructions at http://debian.piwik.org/
here a piece of my log immediately after selecting that I want to enable automatic database upgrade:
`Lighttpd not installed, skipping
APACHE IS INSTALLED
Apache2 not installed, skipping
The configuration file {/usr/share/piwik/config/config.ini.php} has not been found or could not be read.
If the file exists, please check that /usr/share/piwik/config/config.ini.php is readable by the user 'root'.
#####THIS AREA IS RED #####
[Zend_Db_Adapter_Exception]
SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)
[PDOException]
SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)
gREEN:
core:update [--yes]
dpkg: Fehler beim Bearbeiten des Paketes piwik (--configure):
Unterprozess installiertes post-installation-Skript gab den Fehlerwert 255 zurück
Fehler traten auf beim Bearbeiten von:
piwik
E: Sub-process /usr/bin/dpkg returned an error code (1)
`
So at first piwik couldnt find apache2, although it is installed, then a configuration file was missing, but this should be created during installation and at least there was a database error.
Maybe there should be added something like it is when installing PHPMYADMIN, there it asks all the necessary things like Webserver to be used (I use Apache), password of the database, ...
Of course piwik cant access my database without using a password.
The problem with the missing config.ini.php could be solved by copying the global.ini.php. But I don't know if it is correct
A Few Days later I had a big Problem with all my PHP - Mysql programs but I don't know if its the fault of Piwik.
Yours,
Harald
The script misc/translationTool.sh has been removed from the official repository and should not be installed any more.
Hello!
In 2.10 we have a new sub-folder in config/
containing 2 new config files. I guess these files should be handled like the other config files (e.g. config/global.php
…).
This folder might see new files added in the future, so if it's possible to handle the whole folder that would be great. This folder will not contain any user config file.
Folder: config/environment/
(https://github.com/piwik/piwik/tree/master/config/environment)
Contains:
cli.php
test.php
I use unattended-upgrades for nightly (security) updates. Works well as long as package upgrades are "self-contained", that is necessary server restarts/reloads etc are handled by the package upgrade itself.
For the piwik package this does not seem to be the case. One has to manually run the DB update script:
php /usr/share/piwik/console core:update
I think the postinst script should include the db update step.
In debian/dirs, the directory "usr/share/piwik/libs/Zend/Feed/Pubsubhubbub/Http" was manually created but is no longer required as of piwik 2.0
This should be fixed.
currently the piwik package needs interaction in the webportal, this should be avoided
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.