[SCM] quassel packaging branch, master, updated. debian/1%0.12.4-2-10-ga4bf6be

Felix Geyer fgeyer at moszumanska.debian.org
Thu Feb 8 20:37:25 UTC 2018


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/quassel.git;a=commitdiff;h=6710252

The following commit has been merged in the master branch:
commit 6710252a41c5314f282eb002442544ee7282e462
Author: Felix Geyer <fgeyer at debian.org>
Date:   Tue Feb 6 19:40:16 2018 +0100

    quassel-core postinst: chmod/chown only after creating the files/dirs.
---
 debian/changelog             |  1 +
 debian/quassel-core.postinst | 18 ++++++++----------
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index e4a7b94..e065d3a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,7 @@ quassel (1:0.12.4-3) UNRELEASED; urgency=medium
     - Add Fix_the_ssl_check_with_Qt_5.6_and_gcc_5.patch,
       cherry picked from upstream.
   * Switch to debhelper compat level 10.
+  * quassel-core postinst: chmod/chown only after creating the files/dirs.
 
  -- Felix Geyer <fgeyer at debian.org>  Thu, 20 Oct 2016 20:42:43 +0200
 
diff --git a/debian/quassel-core.postinst b/debian/quassel-core.postinst
index b05b47f..af48a68 100644
--- a/debian/quassel-core.postinst
+++ b/debian/quassel-core.postinst
@@ -11,12 +11,6 @@ QUASSEL_LOG=/var/log/quassel
 #QUASSEL_CONFIG=$QUASSEL_HOME/.config/quassel-irc.org
 QUASSEL_CERT=$QUASSEL_HOME/quasselCert.pem
 
-if [ ! -d $QUASSEL_HOME ] ; then
-  # create $HOME
-  echo "Creating $QUASSEL_HOME directory ..."
-  mkdir -p $QUASSEL_HOME
-fi
-
 # create group
 echo "Creating $QUASSEL_GROUP group ..."
 addgroup --quiet --system $QUASSEL_GROUP
@@ -26,12 +20,17 @@ echo "Creating $QUASSEL_USER user ..."
 adduser --quiet --system --ingroup $QUASSEL_GROUP \
 --home $QUASSEL_HOME --no-create-home $QUASSEL_USER
 
-chown $QUASSEL_USER:$QUASSEL_GROUP $QUASSEL_HOME
+if [ ! -d $QUASSEL_HOME ] ; then
+  # create $HOME
+  echo "Creating $QUASSEL_HOME directory ..."
+  mkdir -p $QUASSEL_HOME
+  chown $QUASSEL_USER:$QUASSEL_GROUP $QUASSEL_HOME
+fi
 
 if [ ! -d $QUASSEL_LOG ] ; then
   echo "Creating $QUASSEL_LOG directory ..."
   mkdir -p $QUASSEL_LOG
-  chown $QUASSEL_USER:$QUASSEL_GROUP -R $QUASSEL_LOG
+  chown $QUASSEL_USER:$QUASSEL_GROUP $QUASSEL_LOG
 fi
 
 # generate a SSL certificate for 18 months (support time) + 6 months (development time)
@@ -42,10 +41,9 @@ if [ ! -e $QUASSEL_CERT ] ; then
   echo "Generating SSL certificate as $QUASSEL_CERT ..."
   su $QUASSEL_USER -s /bin/sh -c "openssl req -x509 -nodes -batch -days 680 -newkey rsa \
     -keyout $QUASSEL_CERT -out $QUASSEL_CERT"
+  su $QUASSEL_USER -s /bin/sh -c "chmod o= $QUASSEL_CERT"
 fi
 
-chmod 0440 $QUASSEL_CERT
-
 
 #DEBHELPER#
 

-- 
quassel packaging



More information about the pkg-kde-commits mailing list