diff options
Diffstat (limited to 'user/nextcloud')
-rw-r--r-- | user/nextcloud/APKBUILD | 18 | ||||
-rw-r--r-- | user/nextcloud/nextcloud.post-upgrade | 55 |
2 files changed, 63 insertions, 10 deletions
diff --git a/user/nextcloud/APKBUILD b/user/nextcloud/APKBUILD index e21c3bf54..b044b12af 100644 --- a/user/nextcloud/APKBUILD +++ b/user/nextcloud/APKBUILD @@ -2,8 +2,8 @@ # Contributor: Leonardo Arena <rnalrd@alpinelinux.org> # Maintainer: Max Rees <maxcrees@me.com> pkgname=nextcloud -pkgver=14.0.3 -pkgrel=1 +pkgver=14.0.13 +pkgrel=0 pkgdesc="Self-hosted file sync and groupware server" url="https://nextcloud.com" arch="noarch" @@ -171,7 +171,7 @@ doc() { initscript() { pkgdesc="Init script that runs Nextcloud with php-fpm" - depends="$pkgname php7-fpm" + depends="$pkgname=$pkgver-r$pkgrel php7-fpm" install -Dm 644 "$srcdir/fpm-pool.conf" "$subpkgdir/etc/php/php-fpm.d/$pkgname.conf" install -Dm 644 "$srcdir/$pkgname.confd" "$subpkgdir/etc/conf.d/$pkgname" @@ -185,25 +185,25 @@ initscript() { pgsql() { pkgdesc="Nextcloud PostgreSQL support" - depends="$pkgname php7-pgsql php7-pdo_pgsql" + depends="$pkgname=$pkgver-r$pkgrel php7-pgsql php7-pdo_pgsql" mkdir -p "$subpkgdir" } sqlite() { pkgdesc="Nextcloud SQLite support" - depends="$pkgname php7-sqlite3 php7-pdo_sqlite" + depends="$pkgname=$pkgver-r$pkgrel php7-sqlite3 php7-pdo_sqlite" mkdir -p "$subpkgdir" } mysql() { pkgdesc="Nextcloud MySQL support" - depends="$pkgname php7-pdo_mysql" + depends="$pkgname=$pkgver-r$pkgrel php7-pdo_mysql" mkdir -p "$subpkgdir" } _default_apps() { pkgdesc="Nextcloud default apps" - depends="$pkgname" + depends="$pkgname=$pkgver-r$pkgrel" local path; for path in $pkgdir/$_appsdir/*; do if grep -q '<default_enable\s*/>' "$path/appinfo/info.xml"; then @@ -237,13 +237,13 @@ _package_app() { systemtags) app_deps="$pkgname-workflowengine";; esac - depends="$pkgname $php_deps $app_deps" + depends="$pkgname=$pkgver-r$pkgrel $php_deps $app_deps" mkdir -p "$subpkgdir/$_appsdir" mv "$pkgdir/$_appsdir/$appname" "$subpkgdir/$_appsdir/" } -sha512sums="f3b8bf22f4c17e038352a9f6c202d79220b5d9a19a2148c486cf22558d626095ab5c35f02ddf64292165e34572e199c72a44318b5c19a6dd5113f0ee0f6e937f nextcloud-14.0.3.zip +sha512sums="ea6d688fb23bc6b6fbaa8b4c5bf8bdb8732825cf43bc3a09df288d128218b1ef5d743f042ec36d5e4813f0e0349524c2ff426abc1786cb77902ca20a3db7c392 nextcloud-14.0.13.zip 63690b8d8ffe6d4896c5b666aa9d493b501aa3e171c6557e7a003599049f0d36f266a2a257a9535dea055bca1e84208b219c6cd5e4ecd70dd064e1dd1007203a nextcloud14-dont-chmod.patch aef3c92497d738d6968e0f0b0d415b4953500db24ae14af41ef972665cf7eff00cb6c53dc953845fdbb389c3c965a75b8b14b9247513c05cf4130fe1cfc61731 dont-update-htaccess.patch d2100a837fef1eeae5f706650ab4c985d9e00f61efa5526ef76c7c1f5811c3906eb6c3c13c151eff9677a0c303faab64411a5a84d6792728bc520d2c618d7d5b disable-integrity-check-as-default.patch diff --git a/user/nextcloud/nextcloud.post-upgrade b/user/nextcloud/nextcloud.post-upgrade index e4ad291ac..8c48296ad 100644 --- a/user/nextcloud/nextcloud.post-upgrade +++ b/user/nextcloud/nextcloud.post-upgrade @@ -3,6 +3,59 @@ ver_new="$1" ver_old="$2" +maj_new="${ver_new%%.*}" +maj_old="${ver_old%%.*}" +maj_diff="$((maj_new - maj_old))" + +if [ "$(apk version -t "$ver_old" "14.0.13-r0")" = "<" ]; then + cat >&2 <<-EOF + * + * Some of Nextcloud's versions may be out of sync. + * You can check by running: + * + * apk info -v | grep '^nextcloud-.*-$ver_old' + EOF +fi + +if [ "$maj_diff" -lt 0 ]; then + cat >&2 <<-EOF + * + * Warning: Nextcloud does not support downgrading major versions. + * Only run "occ upgrade" if you have skipped major versions + * and are in the middle of fixing that! + * + EOF + exit 0 +fi + +if [ "$maj_diff" -gt 1 ]; then + cat >&2 <<-EOF + * + * Warning: Nextcloud does not support skipping major versions. + * Try the following instead: + * + EOF + + maj_old="$((maj_old + 1))" + while [ "$maj_old" -lt "$maj_new" ]; do + cat >&2 <<-EOF + * apk add nextcloud~$maj_old + * occ upgrade + EOF + maj_old="$((maj_old + 1))" + done + cat >&2 <<-EOF + * apk add nextcloud + * occ upgrade + * + EOF + exit 0 +fi + if [ "${ver_new%-r*}" != "${ver_old%-r*}" ]; then - echo '* Run "occ upgrade" to finish upgrade of your NextCloud instance!' >&2 + cat >&2 <<-EOF + * + * Run "occ upgrade" to finish upgrade of your Nextcloud instance! + * + EOF fi |