r599 - in /branches/experimental/boinc/debian: boinc-client.postinst changelog

fst-guest at users.alioth.debian.org fst-guest at users.alioth.debian.org
Thu Mar 15 09:46:21 CET 2007


Author: fst-guest
Date: Thu Mar 15 08:46:19 2007
New Revision: 599

URL: http://svn.debian.org/wsvn/pkg-boinc/?sc=1&rev=599
Log:
Don't override permissions and ownership of conffiles if the admin used
dpkg-statoverride to set custom permissions and ownership.

Modified:
    branches/experimental/boinc/debian/boinc-client.postinst
    branches/experimental/boinc/debian/changelog

Modified: branches/experimental/boinc/debian/boinc-client.postinst
URL: http://svn.debian.org/wsvn/pkg-boinc/branches/experimental/boinc/debian/boinc-client.postinst?rev=599&op=diff
==============================================================================
--- branches/experimental/boinc/debian/boinc-client.postinst (original)
+++ branches/experimental/boinc/debian/boinc-client.postinst Thu Mar 15 08:46:19 2007
@@ -15,6 +15,15 @@
         mv -f "$BOINC_DIR/$1" "$CONF_DIR/$1"
     fi
     ln -sf "$CONF_DIR/$1" "$BOINC_DIR/$1"
+}
+
+ch_stat()
+{
+    # Don't do anything if an override exists.
+    if ! dpkg-statoverride --list "$3" >/dev/null 2>&1; then
+        chmod "$1" "$3"
+        chown "$2" "$3"
+    fi
 }
 
 case "$1" in
@@ -42,17 +51,12 @@
         mv_conffile gui_rpc_auth.cfg
         mv_conffile remote_hosts.cfg
 
-        # Set reasonable permissions for boinc-client's conffiles, see #407678.
-        chmod 0644 "$CONF_DIR/cc_config.xml"
-        chmod 0644 "$CONF_DIR/global_prefs_override.xml"
-        chmod 0640 "$CONF_DIR/gui_rpc_auth.cfg"
-        chmod 0644 "$CONF_DIR/remote_hosts.cfg"
-
-        chown root:boinc \
-            "$CONF_DIR/cc_config.xml" \
-            "$CONF_DIR/global_prefs_override.xml" \
-            "$CONF_DIR/gui_rpc_auth.cfg" \
-            "$CONF_DIR/remote_hosts.cfg"
+        # Set reasonable permissions for boinc-client's conffiles (see #407678)
+        # but only if no 'stat override' exists.
+        ch_stat 0644 root:boinc "$CONF_DIR/cc_config.xml"
+        ch_stat 0644 root:boinc "$CONF_DIR/global_prefs_override.xml"
+        ch_stat 0640 root:boinc "$CONF_DIR/gui_rpc_auth.cfg"
+        ch_stat 0644 root:boinc "$CONF_DIR/remote_hosts.cfg"
 
         # Make a symlink to ca-certificates certs file. BOINC's original file
         # is in curl/ca-bundle.crt (which is not in our tarball, because the

Modified: branches/experimental/boinc/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-boinc/branches/experimental/boinc/debian/changelog?rev=599&op=diff
==============================================================================
--- branches/experimental/boinc/debian/changelog (original)
+++ branches/experimental/boinc/debian/changelog Thu Mar 15 08:46:19 2007
@@ -23,9 +23,10 @@
       lib/std_fixes.h, config.h and version.h manually because they are now
       installed by the upstream makefiles.
     - Added lib/md5_file.h to boinc-dev as requested by Alex Owen.
-  * Change the permissions and ownership of boinc-client's conffiles in it's
-    postinst from 0644 boinc:boinc to 0640 root:boinc for gui_rpc_auth.cfg and
-    to 0644 root:boinc for the rest. (closes: #407678)
+  * debian/boinc-client.postinst: Change the permissions and ownership of
+    boinc-client's conffiles from 0644 boinc:boinc to 0640 root:boinc for
+    gui_rpc_auth.cfg and to 0644 root:boinc for the rest but only if no
+    'stat override' exists. (closes: #407678)
   * Replaced the conffile log_flags.xml with cc_config.xml:
     - Added debian/boinc-client.preinst which removes the obsolete conffile
       /etc/boinc-client/log_flags.xml if it was not modified locally.
@@ -56,7 +57,7 @@
   * debian/boinc-server.README.Debian: Added README.Debian which is at the
     moment only a pointer to http://wiki.debian.org/BOINC/Server.
 
- -- Frank S. Thomas <frank at thomas-alfeld.de>  Wed, 14 Mar 2007 12:33:21 +0100
+ -- Frank S. Thomas <frank at thomas-alfeld.de>  Thu, 15 Mar 2007 09:37:42 +0100
 
 boinc (5.4.11-5) unstable; urgency=low
 




More information about the pkg-boinc-commits mailing list