This is an automated email from the git hooks/post-receive script.

skitt pushed a commit to branch debian-sid
in repository gweled.

commit d4c057aaff94104cb059bba7ef341ef71f4f47d4
Author: Stephen Kitt <sk...@debian.org>
Date:   Fri Feb 9 09:39:29 2018 +0100

    Ship /usr/games/gweled with the desired ownership and permissions
---
 debian/changelog | 2 ++
 debian/control   | 2 ++
 debian/postinst  | 6 ++++--
 debian/rules     | 5 +++++
 4 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index afdd6a5..ee9bde2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ gweled (0.9.1-5) UNRELEASED; urgency=medium
   * Document old patches.
   * Switch to debhelper compatibility 11, and adjust patches so the
     package can build multiple times in a row.
+  * Ship /usr/games/gweled with the desired ownership and permissions,
+    instead of using dpkg-statoverride.
 
  -- Stephen Kitt <sk...@debian.org>  Fri, 09 Feb 2018 09:02:48 +0100
 
diff --git a/debian/control b/debian/control
index 7932bfe..da9f4cc 100644
--- a/debian/control
+++ b/debian/control
@@ -3,6 +3,8 @@ Maintainer: Debian Games Team 
<pkg-games-de...@lists.alioth.debian.org>
 Uploaders: Stephen Kitt <sk...@debian.org>
 Section: games
 Priority: optional
+# We need root for dh_fixperms
+Rules-Requires-Root: binary-targets
 Build-Depends: debhelper (>= 11~),
                intltool,
                libgtk2.0-dev,
diff --git a/debian/postinst b/debian/postinst
index 55f25af..b28e237 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -32,8 +32,10 @@ case "$1" in
            chmod 664 /var/games/gweled.${scorefile}.scores;
        done
 
-       dpkg-statoverride --remove /usr/games/gweled >/dev/null 2>&1 || true
-       dpkg-statoverride --update --add root games 02755 /usr/games/gweled
+       # The package used to install an override
+       if [ "$(sudo dpkg-statoverride --list /usr/games/gweled)" = "root games 
2755 /usr/games/gweled" ]; then
+           dpkg-statoverride --remove /usr/games/gweled
+       fi
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/debian/rules b/debian/rules
index 0923d8b..d9a0e51 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,3 +16,8 @@ override_dh_auto_configure:
 override_dh_auto_install:
        dh_auto_install
        rm -rf $(CURDIR)/debian/gweled/var/games/*
+
+override_dh_fixperms:
+       dh_fixperms
+       chown root:games debian/gweled/usr/games/gweled
+       chmod 02755 debian/gweled/usr/games/gweled

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/gweled.git

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to