[Pkg-owncloud-commits] [owncloud] 54/63: Use dpkg-statoverride to fix permissions
David Prévot
taffit at moszumanska.debian.org
Tue Dec 22 16:51:09 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch stable8.0
in repository owncloud.
commit ade05b773a334abd33602c966976a54e83210cd6
Author: David Prévot <taffit at debian.org>
Date: Thu Oct 22 12:44:02 2015 -0400
Use dpkg-statoverride to fix permissions
---
debian/lintian-overrides | 4 ----
debian/postinst | 12 ++++++++++--
debian/rules | 9 ---------
3 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/debian/lintian-overrides b/debian/lintian-overrides
index 477b56d..940ac43 100644
--- a/debian/lintian-overrides
+++ b/debian/lintian-overrides
@@ -1,7 +1,3 @@
-# User www-data has to write here.
-non-standard-dir-perm var/lib/owncloud/assets/ 2770 != 0755
-non-standard-dir-perm var/lib/owncloud/data/ 2770 != 0755
-non-standard-dir-perm var/lib/owncloud/backup/ 2770 != 0755
# This symlink points to a file provided by libjs-jcrop, which is a dependency.
package-contains-broken-symlink usr/share/owncloud/core/vendor/jcrop ../../../javascript/jcrop
# This symlink points to a directory provided by libjs-pdf, which is a dependency.
diff --git a/debian/postinst b/debian/postinst
index 0d22245..8aed4b3 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -14,9 +14,17 @@ if [ "$1" = "configure" ] ; then
file=/var/log/owncloud.log
if [ ! -f $file ]; then
touch $file
- chown www-data:adm $file
- chmod 0640 $file
+ dpkg-statoverride --add --update www-data adm 0640 $file
fi
+ # Fix permissions
+ if ! dpkg-statoverride --list /etc/owncloud/ >/dev/null 2>&1; then
+ dpkg-statoverride --update --add www-data www-data 755 /etc/owncloud/
+ fi
+ for i in assets data backup themes/default ; do \
+ if ! dpkg-statoverride --list /var/lib/owncloud/$i 2>&1; then
+ dpkg-statoverride --update --add www-data www-data 2770 /var/lib/owncloud/$i
+ fi
+ done
# Update the database on upgrade
# Don’t let it fail, since it exits with 3 if no upgrade is necessary
if [ -e /etc/owncloud/config.php ] ; then
diff --git a/debian/rules b/debian/rules
index 08981a0..b53b396 100755
--- a/debian/rules
+++ b/debian/rules
@@ -35,15 +35,6 @@ override_dh_install:
sed -i "s/@VERSION@/$(VERSION) (Debian)/" \
debian/owncloud/usr/share/owncloud/lib/private/util.php
-override_dh_fixperms:
- dh_fixperms -X var/lib/owncloud
- chown www-data:www-data debian/owncloud/etc/owncloud/
- for i in assets data backup themes/default ; do \
- chown www-data:www-data debian/owncloud/var/lib/owncloud/$$i && \
- chmod 2770 debian/owncloud/var/lib/owncloud/$$i ; \
- done
- chmod +x debian/owncloud/usr/share/owncloud/occ
-
override_dh_installchangelogs:
dh_installchangelogs $(CURDIR)/debian/upstream/changelog
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list