diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-06-22 23:25:42 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-06-25 02:42:47 +0200 |
commit | 99b45de81c26ee1bece7393dd82ea83481e48f0d (patch) | |
tree | 8702719ec1f4d07c8d30eb7c0ba5398f19bda3a8 /community/nextcloud | |
parent | 8ba26cee862e71ac7cc67f8e6150720a6e0640ae (diff) | |
download | aports-99b45de81c26ee1bece7393dd82ea83481e48f0d.tar.bz2 aports-99b45de81c26ee1bece7393dd82ea83481e48f0d.tar.xz |
community/nextcloud: create user/group for base pkg
It somehow doesn't work when user/group is created by pre-install
script of subpackage - installed files have wrong GID.
Diffstat (limited to 'community/nextcloud')
-rw-r--r-- | community/nextcloud/APKBUILD | 14 | ||||
-rw-r--r-- | community/nextcloud/nextcloud-initscript.post-install | 4 | ||||
-rw-r--r-- | community/nextcloud/nextcloud.pre-install (renamed from community/nextcloud/nextcloud-initscript.pre-install) | 0 |
3 files changed, 9 insertions, 9 deletions
diff --git a/community/nextcloud/APKBUILD b/community/nextcloud/APKBUILD index 4ba53f4099..2e5af0d43c 100644 --- a/community/nextcloud/APKBUILD +++ b/community/nextcloud/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Leonardo Arena <rnalrd@alpinelinux.org> pkgname=nextcloud pkgver=12.0.0 -pkgrel=1 +pkgrel=2 pkgdesc="A safe home for all your data" url="http://nextcloud.com" arch="noarch" @@ -13,6 +13,7 @@ depends="$_php ${_php_mods//-/$_php-}" _apps="-activity -encryption -firstrunwizard -gallery -ldap -logreader -mysql -notifications -password_policy -pdfviewer -pgsql -sqlite -texteditor -videoplayer" +install="$pkgname.pre-install" subpackages="$pkgname-doc $pkgname-initscript ${_apps//-/$pkgname-}" source="https://download.nextcloud.com/server/releases/$pkgname-$pkgver.zip nextcloud10-dont-chmod-config.patch @@ -44,19 +45,20 @@ package() { chmod 664 ./$wwwdir/.htaccess \ ./$wwwdir/.user.ini - install -d -m 770 -g www-data ./$confdir ./$datadir + install -d -m 770 -o nextcloud -g www-data ./$confdir ./$datadir - install -m664 -g www-data "$srcdir"/$pkgname-config.php ./$confdir/config.php + install -m 660 -o nextcloud -g www-data \ + "$srcdir"/$pkgname-config.php ./$confdir/config.php ln -s /$confdir ./$wwwdir/config mkdir -p ./${_appsdir%/*} mv "$wwwdir"/apps ./$_appsdir - chgrp -R www-data ./$_appsdir + chown -R nextcloud:www-data ./$_appsdir chmod -R 770 ./$_appsdir ln -s /$_appsdir ./$wwwdir/apps install -m644 -D "$srcdir"/$pkgname.logrotate ./etc/logrotate.d/$pkgname - install -m775 -g www-data -d ./var/log/$pkgname + install -m775 -o nextcloud -g www-data -d ./var/log/$pkgname mkdir -p ./usr/share/doc/$pkgname mv ./$wwwdir/core/doc ./usr/share/doc/$pkgname/core @@ -65,7 +67,7 @@ package() { initscript() { pkgdesc="Init script that runs Nextcloud with php-fpm" depends="$pkgname $_php-fpm $_php-opcache" - install="$subpkgname.pre-install $subpkgname.post-install" + install="$subpkgname.post-install" local confdir="$subpkgdir/etc/$_php/php-fpm.d" local fpm_name="php-fpm${_php#php}" diff --git a/community/nextcloud/nextcloud-initscript.post-install b/community/nextcloud/nextcloud-initscript.post-install index 6d664a5026..7759e65fa0 100644 --- a/community/nextcloud/nextcloud-initscript.post-install +++ b/community/nextcloud/nextcloud-initscript.post-install @@ -4,15 +4,13 @@ for dir in /etc/nextcloud \ /etc/nextcloud/config.php \ /var/lib/nextcloud/data \ - /usr/share/webapps/nextcloud/apps + /var/lib/nextcloud/apps do chmod g-w $dir - chown nextcloud $dir done chgrp root /etc/nextcloud/config.php # This must be writable (only) by nextcloud user. -chown nextcloud /var/log/nextcloud chmod 750 /var/log/nextcloud cat <<EOF diff --git a/community/nextcloud/nextcloud-initscript.pre-install b/community/nextcloud/nextcloud.pre-install index e9cf53919c..e9cf53919c 100644 --- a/community/nextcloud/nextcloud-initscript.pre-install +++ b/community/nextcloud/nextcloud.pre-install |