[28509] in Source-Commits

home help back first fref pref prev next nref lref last post

pyhesiodfs commit [debian]: Fix postinst so that the package works on jessie

daemon@ATHENA.MIT.EDU (Victor Vasiliev)
Sun Apr 26 12:24:30 2015

Date: Sun, 26 Apr 2015 12:24:23 -0400
From: Victor Vasiliev <vasilvv@mit.edu>
Message-Id: <201504261624.t3QGON54028207@drugstore.mit.edu>
To: source-commits@mit.edu

https://github.com/mit-athena/pyhesiodfs/commit/faf196dab6cf2bf81a24efd9e8da1470ecc42680
commit faf196dab6cf2bf81a24efd9e8da1470ecc42680
Author: Lizhou Sha <slz@mit.edu>
Date:   Sat Apr 18 15:44:16 2015 -0400

    Fix postinst so that the package works on jessie
    
    - debian/debathena-pyhesiodfs.postinst: Add user pyhesiodfs to group
      fuse only if the local group exists. As of Debian Jessie, the group
      fuse is no longer used. (Trac: #1523)
    
    Signed-off-by: Lizhou Sha <slz@mit.edu>

 debian/changelog                     |    8 ++++++++
 debian/debathena-pyhesiodfs.postinst |   10 ++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index faef09f..0433898 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+debathena-pyhesiodfs (1.1-0debathena3) unstable; urgency=low
+
+  * debian/debathena-pyhesiodfs.postinst: Add user pyhesiodfs to group fuse
+    only if the local group exists. As of Debian Jessie, the group fuse is no
+    longer used. (Trac: #1523)
+
+ -- Lizhou Sha <slz@mit.edu>  Sat, 18 Apr 2015 15:31:05 -0400
+
 debathena-pyhesiodfs (1.1-0debathena2) unstable; urgency=low
 
   * Add git-buildpackage configuration
diff --git a/debian/debathena-pyhesiodfs.postinst b/debian/debathena-pyhesiodfs.postinst
index 8c045ac..d027c26 100644
--- a/debian/debathena-pyhesiodfs.postinst
+++ b/debian/debathena-pyhesiodfs.postinst
@@ -25,8 +25,14 @@ set -e
 
 case "$1" in
     configure)
-        adduser pyhesiodfs fuse
-        
+	# Adding pyhesiodfs only if the local user group fuse exists.
+	# The group fuse no longer exists in jessie.
+	# If the group fuse is needed, it should have been added when the package
+	# fuse, a dependency, was configured, before this script is run.
+	if grep -q "^fuse:" /etc/group; then
+	    adduser pyhesiodfs fuse
+	fi
+
 	if hash invoke-rc.d 2>/dev/null; then
 	    # If /dev/fuse has group root, restart udev to work around
 	    # <https://bugs.launchpad.net/ubuntu/+source/fuse/+bug/293502>

home help back first fref pref prev next nref lref last post