aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorktprograms <ktprograms@gmail.com>2021-11-26 21:00:59 +0800
committerAndy Postnikov <apostnikov@gmail.com>2021-11-30 22:30:23 +0000
commit9a77c8479743d511607304f501dfce471a308c05 (patch)
tree8cc26596fd76c4e1273389f7f8a07181b8fa2550
parentfc9841f0057d4ee4994ac7dc0f118c71f7cca1da (diff)
downloadaports-9a77c8479743d511607304f501dfce471a308c05.tar.gz
aports-9a77c8479743d511607304f501dfce471a308c05.tar.bz2
aports-9a77c8479743d511607304f501dfce471a308c05.tar.xz
community/nextcloud: miscellaneous improvements
fpm-pool.conf: Need to specify user and group else php-fpm8 cannot start nextcloud-initscript.post-install: Using install in APKBUILD caused /var/tmp to become 755, so create with mkdir in the post install. Also because of the switch to php8, the settings are in /etc/php8/fpm.d/nextcloud.conf nextcloud-mysql.cnf: MariaDB 10.6 has started deprecating write support for compressed tables, but Nextcloud requires write support. See https://github.com/nextcloud/server/issues/25436
-rw-r--r--community/nextcloud/APKBUILD10
-rw-r--r--community/nextcloud/fpm-pool.conf3
-rw-r--r--community/nextcloud/nextcloud-initscript.post-install6
-rw-r--r--community/nextcloud/nextcloud-mysql.cnf3
4 files changed, 17 insertions, 5 deletions
diff --git a/community/nextcloud/APKBUILD b/community/nextcloud/APKBUILD
index 3dc27bfefa..c69c479463 100644
--- a/community/nextcloud/APKBUILD
+++ b/community/nextcloud/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=nextcloud
pkgver=22.2.1
-pkgrel=1
+pkgrel=2
_replaced_ver=21
pkgdesc="A safe home for all your data"
url="https://nextcloud.com/"
@@ -42,6 +42,7 @@ source="https://download.nextcloud.com/server/releases/nextcloud-$pkgver.tar.bz2
$pkgname.logrotate
$pkgname.confd
$pkgname.cron
+ $pkgname-mysql.cnf
fpm-pool.conf
occ
"
@@ -176,8 +177,6 @@ initscript() {
mkdir -p "$subpkgdir"/etc/init.d
ln -s $fpm_name "$subpkgdir"/etc/init.d/$pkgname
-
- install -m 700 -o nextcloud -d "$subpkgdir"/var/tmp/$pkgname
}
pgsql() {
@@ -198,7 +197,9 @@ mysql() {
pkgdesc="Nextcloud MySQL support"
depends="$pkgname $_php-pdo_mysql"
replaces="nextcloud$_replaced_ver-mysql"
+
mkdir -p "$subpkgdir"
+ install -m 644 -D "$srcdir"/nextcloud-mysql.cnf "$subpkgdir"/etc/my.cnf.d/$pkgname.cnf
}
_default_apps() {
@@ -256,6 +257,7 @@ df1a16414a278c205876ec86c210a02a9009954e2d4f9033ff3c9b76c371e2764ef3587db5a4b8f7
7388458a9e8b7afd3d3269718306410ffa59c3c23da4bef367a4d7f6d2570136fae9dd421b19c1441e7ffb15a5405e18bb5da67b1a15f9f45e8b98d3fda532ba nextcloud.logrotate
dcc57735d7d4af4a7ebbdd1186d301e51d2ae4675022aea6bf1111222dfa188a3a490ebd6e7c8a7ac30046cb7d93f81cec72a51acbc60d0c10b7fb64630c637a nextcloud.confd
cf129b405601cc6ac09b2e976bb1e2673e41d4e15e0e21466767b7a1481476825fa327b0e515f454b3c9ae67ca245fd8762885ff9a4df800189de53ae88b7cc2 nextcloud.cron
-ee9073a6df4286cba2d1d855cf40863968f20677729b2c7848ab50a70d4915b8e84c957a850a03a707231256c11312e5792e7817dd50afbf73efe767fef2112d fpm-pool.conf
+b9ad5434c384c96608f00d65c45f782e279c6756da8fb706f62ecaf7b7aa420077cb6989da5e85becc47418884ec0672e7db874174454ca679fdca84a50f537f nextcloud-mysql.cnf
+78ef204ee7c12b228c0b7b04333514e561c1c8e19153f5507224fa4fdd112aaaa6331747014f3b72181298f52ecd4223bcff4bd963b49b49153265254b07e79b fpm-pool.conf
959852e34f010e635470829d66713f3e22c47717ec2c6487759eed2b6aeff9fd1421fe0271d494a02781bd1c98beb2823583623ee2cf03057cd5db794627d6c2 occ
"
diff --git a/community/nextcloud/fpm-pool.conf b/community/nextcloud/fpm-pool.conf
index 69fef6e37a..cae9acce21 100644
--- a/community/nextcloud/fpm-pool.conf
+++ b/community/nextcloud/fpm-pool.conf
@@ -30,6 +30,9 @@ process_control_timeout = 10s
[nextcloud]
+user = nextcloud
+group = www-data
+
; The address on which to accept FastCGI requests.
; Valid syntaxes are:
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
diff --git a/community/nextcloud/nextcloud-initscript.post-install b/community/nextcloud/nextcloud-initscript.post-install
index 7759e65fa0..e16e94472f 100644
--- a/community/nextcloud/nextcloud-initscript.post-install
+++ b/community/nextcloud/nextcloud-initscript.post-install
@@ -13,11 +13,15 @@ chgrp root /etc/nextcloud/config.php
# This must be writable (only) by nextcloud user.
chmod 750 /var/log/nextcloud
+mkdir /var/tmp/nextcloud # If /var/tmp doesn't exist there's a big problem
+chown nextcloud /var/tmp/nextcloud
+chmod 700 /var/tmp/nextcloud
+
cat <<EOF
*
* Point your web server to /run/nextcloud/fastcgi.sock and start Nextcloud with
* /etc/init.d/nextcloud start. You can modify php-fpm settings in
-* /etc/php7/fpm.d/nextcloud.conf.
+* /etc/php8/fpm.d/nextcloud.conf.
*
EOF
diff --git a/community/nextcloud/nextcloud-mysql.cnf b/community/nextcloud/nextcloud-mysql.cnf
new file mode 100644
index 0000000000..ff90630b68
--- /dev/null
+++ b/community/nextcloud/nextcloud-mysql.cnf
@@ -0,0 +1,3 @@
+[server]
+# See https://github.com/nextcloud/server/issues/25436
+innodb_read_only_compressed=off