nixos/matomo: point path.geoip2 outside of the nix store.
path.geoip2 pointed to the nix store which is read-only. Matomo was failing to download a geoip2 database. See #64759.
This commit is contained in:
committed by
Nikolay Amiantov
parent
04af4059cf
commit
7852ea1596
@@ -192,6 +192,7 @@ in {
|
||||
# Copy config folder
|
||||
chmod g+s "${dataDir}"
|
||||
cp -r "${cfg.package}/share/config" "${dataDir}/"
|
||||
mkdir -p "${dataDir}/misc"
|
||||
chmod -R u+rwX,g+rwX,o-rwx "${dataDir}"
|
||||
|
||||
# check whether user setup has already been done
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/plugins/GeoIp2/config/config.php
|
||||
+++ b/plugins/GeoIp2/config/config.php
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
- 'path.geoip2' => DI\string('{path.root}/misc/'),
|
||||
+ 'path.geoip2' => PIWIK_USER_PATH . '/misc/',
|
||||
];
|
||||
\ Pas de fin de ligne à la fin du fichier
|
||||
@@ -32,14 +32,19 @@ let
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
# make-localhost-default-database-server.patch:
|
||||
# This changes the default value of the database server field
|
||||
# from 127.0.0.1 to localhost.
|
||||
# unix socket authentication only works with localhost,
|
||||
# but password-based SQL authentication works with both.
|
||||
# TODO: is upstream interested in this?
|
||||
# -> discussion at https://github.com/matomo-org/matomo/issues/12646
|
||||
patches = [ ./make-localhost-default-database-host.patch ];
|
||||
patches = [
|
||||
# This changes the default value of the database server field
|
||||
# from 127.0.0.1 to localhost.
|
||||
# unix socket authentication only works with localhost,
|
||||
# but password-based SQL authentication works with both.
|
||||
# TODO: is upstream interested in this?
|
||||
# -> discussion at https://github.com/matomo-org/matomo/issues/12646
|
||||
./make-localhost-default-database-host.patch
|
||||
|
||||
# This changes the default config for path.geoip2 so that it doesn't point
|
||||
# to the nix store.
|
||||
./change-path-geoip2.patch
|
||||
];
|
||||
|
||||
# this bootstrap.php adds support for getting PIWIK_USER_PATH
|
||||
# from an environment variable. Point it to a mutable location
|
||||
@@ -73,6 +78,7 @@ let
|
||||
"misc/composer/build-xhprof.sh"
|
||||
"misc/composer/clean-xhprof.sh"
|
||||
"misc/cron/archive.sh"
|
||||
"plugins/GeoIp2/config/config.php"
|
||||
"plugins/Installation/FormDatabaseSetup.php"
|
||||
"vendor/pear/archive_tar/sync-php4"
|
||||
"vendor/szymach/c-pchart/coverage.sh"
|
||||
|
||||
Reference in New Issue
Block a user