[debian-edu-commits] debian-edu/italc.git (#117) - master (branch) updated: debian/1_2.0.0-3-19-gd25ec20

Mike Gabriel sunweaver at alioth.debian.org
Mon Aug 12 09:01:11 UTC 2013


The branch, master has been updated
       via  d25ec2045bd0efc40d64514669c04522c377dcd4 (commit)
      from  f3e0fcd9deeaabec9147f46ee32bf317593a1c6a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d25ec2045bd0efc40d64514669c04522c377dcd4
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Aug 12 11:00:52 2013 +0200

    Auto-configure iTALC.conf through debconf.

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog                            |    1 +
 debian/config/{iTALC.conf => iTALC.conf.in} |   12 +++++++++---
 debian/italc-client.install                 |    3 ++-
 debian/italc-client.postinst                |   19 ++++++++++++++++++-
 debian/italc-client.prerm                   |    4 ++--
 debian/rules                                |    2 +-
 6 files changed, 33 insertions(+), 8 deletions(-)
 rename debian/config/{iTALC.conf => iTALC.conf.in} (64%)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index e71f813..c0ea011 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,7 @@ italc (1:2.0.0-4) UNRELEASED; urgency=low
       configure of libitalccore.
     + Make sure .qm files shipped by upstream get moved out of the way before
       build and get restored properly during clean up.
+    + Auto-configure iTALC.conf through debconf.
   * Update documentation file: README.setup.
 
  -- Mike Gabriel <sunweaver at debian.org>  Sun, 11 Aug 2013 03:20:31 +0200
diff --git a/debian/config/iTALC.conf b/debian/config/iTALC.conf.in
similarity index 64%
rename from debian/config/iTALC.conf
rename to debian/config/iTALC.conf.in
index e6a2e87..04fac04 100644
--- a/debian/config/iTALC.conf
+++ b/debian/config/iTALC.conf.in
@@ -1,9 +1,15 @@
+#debconf# CONFIGURATION TRIGGER #####
+#debconf#
+#debconf# Note: if you want to automatically have your iTALC instance re-configured via
+#debconf# debconf, then make sure you replace your existing configuration file with this
+#debconf# file.
+#debconf#
 [Authentication]
 KeyAuthenticationEnabled=1
-LogonAuthenticationEnabled=1
-LogonGroups="italc-admins,italc-supporters,italc-teachers,italc-students"
+LogonAuthenticationEnabled=0
+LogonGroups="ITALC_GROUP_ADMIN,ITALC_GROUP_SUPPORTER,ITALC_GROUP_TEACHER,ITALC_GROUP_STUDENT"
 PermissionRequiredWithKeyAuthentication=1
-PermissionRequiredWithLogonAuthentication=1
+PermissionRequiredWithLogonAuthentication=0
 PrivateKeyBaseDir=$GLOBALAPPDATA/keys/private
 PublicKeyBaseDir=$GLOBALAPPDATA/keys/public
 SameUserConfirmationDisabled=0
diff --git a/debian/italc-client.install b/debian/italc-client.install
index bb6a23e..7ae9222 100644
--- a/debian/italc-client.install
+++ b/debian/italc-client.install
@@ -1,4 +1,5 @@
 usr/bin/ica
 usr/bin/italc_auth_helper
 usr/share/italc/*
-../../debian/desktop/italc-client.desktop /usr/share/applications/
\ No newline at end of file
+../../debian/desktop/italc-client.desktop /usr/share/applications/
+../../debian/config/iTALC.conf.in /usr/share/italc/
\ No newline at end of file
diff --git a/debian/italc-client.postinst b/debian/italc-client.postinst
index 3fd9e92..98eec05 100755
--- a/debian/italc-client.postinst
+++ b/debian/italc-client.postinst
@@ -120,6 +120,15 @@ case "$1" in
 					fi
 				fi
 
+				# role dependent manipulation of iTALC.conf
+				if [ -f /etc/xdg/iTALC\ Solutions/iTALC.conf ]; then
+					if head -1 /etc/xdg/iTALC\ Solutions/iTALC.conf | grep "#debconf# CONFIGURATION TRIGGER" 1>/dev/null; then
+						ROLE=$(echo $role | tr [a-z] [A-Z])
+						sed -i /etc/xdg/iTALC\ Solutions/iTALC.conf \
+						    -e "s/ITALC_GROUP_$ROLE/$group/"
+					fi
+				fi
+
 				if [ "$italc_key_access_for_groups" = "true" ]; then
 					if [ -f /etc/italc/keys/private/$role/key ]; then
 						chmod -Rf a-w,o-rx "/etc/italc/keys/private/$role"
@@ -140,9 +149,17 @@ case "$1" in
 					fi
 				fi
 
-
 			done
 
+			# manipulate role-independent things iniTALC.conf
+			if [ -f /etc/xdg/iTALC\ Solutions/iTALC.conf ]; then
+				if head -1 /etc/xdg/iTALC\ Solutions/iTALC.conf | grep "#debconf# CONFIGURATION TRIGGER" 1>/dev/null; then
+					ROLE=$(echo $role | tr [a-z] [A-Z])
+					sed -i /etc/xdg/iTALC\ Solutions/iTALC.conf \
+					    -e "/^#debconf#.*/d" \
+					    -e "s/ITALC_GROUP_STUDENT/$student_group/"
+				fi
+			fi
 		fi
 		;;
 
diff --git a/debian/italc-client.prerm b/debian/italc-client.prerm
index a1da9ec..5527384 100755
--- a/debian/italc-client.prerm
+++ b/debian/italc-client.prerm
@@ -28,8 +28,8 @@ case "$1" in
 		for role in admin supporter teacher student; do
 			db_get italc-client/group-italc-$role
 			group=$(echo $RET | cut -d" " -f1)
-			if echo "$group" | egrep -v '^[[:digit:]]{1,5}$'; then
-				getent group $group >/dev/null && delgroup $group || \
+			if echo "$group" | egrep -v '^[[:digit:]]{1,5}$' 1>/dev/null; then
+				getent group $group 1>/dev/null && delgroup $group && [ `id $group` -ge 100 ] || \
 				    echo "Failed to remove group »$group« from the system."
 			fi
 		done
diff --git a/debian/rules b/debian/rules
index d12e436..f754070 100755
--- a/debian/rules
+++ b/debian/rules
@@ -30,7 +30,7 @@ configure/libitalccore::
 
 common-install-arch:: debian/italc.xpm
 	install -D -m 644 debian/italc.xpm debian/italc-master/usr/share/pixmaps/italc.xpm
-	install -D -m 644 debian/config/iTALC.conf debian/italc-client/etc/xdg/iTALC\ Solutions/iTALC.conf
+	install -D -m 644 debian/config/iTALC.conf.in debian/italc-client/etc/xdg/iTALC\ Solutions/iTALC.conf
 	ln -s ../xdg/iTALC\ Solutions/iTALC.conf debian/italc-client/etc/italc/italc.conf
 
 clean::


hooks/post-receive
-- 
italc.git (Debian package italc)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "italc.git" (Debian package italc).




More information about the debian-edu-commits mailing list