summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Buquet2018-12-28 09:41:19 +0900
committerMaxime Buquet2018-12-28 09:41:19 +0900
commitf490fdedb50968f6acad7d598b35e0644a7434b7 (patch)
tree092b8fe2b28d85d787adb107c82ccc094feee78b
parentce8584ac122faa3ee63cab3786ba86c7ec20fb24 (diff)
downloadaur-f490fdedb50968f6acad7d598b35e0644a7434b7.tar.gz
Rework permissions and ownership for movim
This change is likely to break current setups. The default user is now called "movim", created with the sysuser configuration file, to avoid sharing ownership with other applications (that would use http). This will require a change in your php-fpm or apache setup. You should change it to use "movim". ``` user = movim group = http ``` Also, symlinks for the "cache" and "users" folders that were previously created with the install script, (and thus not owned by the package), are now created directly in the package. You will be told by pacman that these files exist and the package can't be installed. Please remove them before installing the new package. Specifically, the two following symlinks: /usr/share/webapps/movim/cache and /usr/share/webapps/movim/users
-rw-r--r--PKGBUILD11
1 files changed, 5 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 9969bf44d2d2..408c04c9c569 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -47,10 +47,10 @@ package() {
# Cache
install -m750 -d "$pkgdir/var/cache/webapps/$_pkgbase/cache"\
"$pkgdir/var/cache/webapps/$_pkgbase/users"
- chown -R root:http "$pkgdir/var/cache/webapps/$_pkgbase"
+ chown -R movim:movim "$pkgdir/var/cache/webapps/$_pkgbase"
chmod -R u+rwX,g+rwX,o-rwx "$pkgdir/var/cache/webapps/$_pkgbase"
- # XXX: Symlinks created post_upgrade. Waiting for upstream to fix
- # https://github.com/movim/movim/issues/509.
+ ln -s "/var/cache/webapps/$_pkgbase/cache" "$pkgdir/usr/share/webapps/$_pkgbase"
+ ln -s "/var/cache/webapps/$_pkgbase/users" "$pkgdir/usr/share/webapps/$_pkgbase"
cp -r app database lib locales src themes vendor \
"$pkgdir/usr/share/webapps/$_pkgbase"
@@ -61,18 +61,17 @@ package() {
# Configuration file
install -m750 -d "$pkgdir/etc/webapps/$_pkgbase"
install -Dm750 config/db.example.inc.php "$pkgdir/etc/webapps/$_pkgbase/db.inc.php"
- chown -R root:http "$pkgdir/etc/webapps/$_pkgbase"
chmod -R u+rwX,g+rwX,o-rwx "$pkgdir/etc/webapps/$_pkgbase"
ln -s "/etc/webapps/$_pkgbase" "$pkgdir/usr/share/webapps/$_pkgbase/config"
# Log files
install -m770 -d "$pkgdir/var/log/webapps/$_pkgbase"
- chown -R root:http "$pkgdir/var/log/webapps/$_pkgbase"
+ chown -R movim:movim "$pkgdir/var/log/webapps/$_pkgbase"
ln -s "/var/log/webapps/$_pkgbase" "$pkgdir/usr/share/webapps/$_pkgbase/log"
# Systemd files
install -m755 -d "$pkgdir/etc/default"
- install -g http -Dm640 "$srcdir/movim.env" "$pkgdir/etc/default/$_pkgbase"
+ install -Dm640 "$srcdir/movim.env" "$pkgdir/etc/default/$_pkgbase"
install -Dm644 "$srcdir/movim.service" "$pkgdir/usr/lib/systemd/system/movim.service"
install -Dm644 "$srcdir/sysuser.conf" "$pkgdir/usr/lib/sysusers.d/movim.conf"
}