[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#691428: unblock: scuttle/0.7.4-8



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package scuttle.

Attached is a debdiff of changes made to fix bug#688500.


Cheers,

-- 
Marcelo Jorge Vieira
xmpp:metal@jabber-br.org
http://metaldot.alucinados.com
diff -u scuttle-0.7.4/debian/control scuttle-0.7.4/debian/control
--- scuttle-0.7.4/debian/control
+++ scuttle-0.7.4/debian/control
@@ -17,7 +17,8 @@
          wwwconfig-common,
          dbconfig-common,
          php-gettext,
-         mysql-client
+         mysql-client,
+         ucf
 Suggests: mysql-server
 Description: Web-based social bookmarking system
  Allows multiple users to store, share and tag their favourite links online.
diff -u scuttle-0.7.4/debian/changelog scuttle-0.7.4/debian/changelog
--- scuttle-0.7.4/debian/changelog
+++ scuttle-0.7.4/debian/changelog
@@ -1,3 +1,10 @@
+scuttle (0.7.4-8) unstable; urgency=high
+
+  * Fixed configuration file in /var (policy 10.7) (Closes: #688500)
+    - Moving config_debconf.inc.php from /var/lib to /etc
+
+ -- Marcelo Jorge Vieira (metal) <metal@debian.org>  Mon, 22 Oct 2012 02:18:10 -0200
+
 scuttle (0.7.4-7) unstable; urgency=low
 
   * Added Italian debconf template translation (Closes: #665703)
diff -u scuttle-0.7.4/debian/scuttle.install scuttle-0.7.4/debian/scuttle.install
--- scuttle-0.7.4/debian/scuttle.install
+++ scuttle-0.7.4/debian/scuttle.install
@@ -22 +22 @@
-debian/config_debconf.inc.php var/lib/scuttle/
+debian/config_debconf.inc.php usr/share/scuttle/
diff -u scuttle-0.7.4/debian/config.inc.php.diff scuttle-0.7.4/debian/config.inc.php.diff
--- scuttle-0.7.4/debian/config.inc.php.diff
+++ scuttle-0.7.4/debian/config.inc.php.diff
@@ -21,7 +21,7 @@
  
 +# $locale and $adminemail at
 +# /var/cache/scuttle/config_debconf.php
-+include_once('/var/lib/scuttle/config_debconf.inc.php');
++include_once('/etc/scuttle/config_debconf.inc.php');
 +
  $sitename           = 'Scuttle';
 -$locale             = 'en_GB';
diff -u scuttle-0.7.4/debian/config_debconf.inc.php scuttle-0.7.4/debian/config_debconf.inc.php
--- scuttle-0.7.4/debian/config_debconf.inc.php
+++ scuttle-0.7.4/debian/config_debconf.inc.php
@@ -1,13 +1,6 @@
 <?
 
-### This file is automatically generated by scuttle
-#
-# Please do not edit this file directly. If you want to change or add
-# anything please take a look at /etc/scuttle/config.inc.php
-#
-###
-
 $adminemail = 'admin@example.org';
-$locale = 'en_GB'
+$locale = 'en_GB';
 
 ?>
diff -u scuttle-0.7.4/debian/scuttle.postrm scuttle-0.7.4/debian/scuttle.postrm
--- scuttle-0.7.4/debian/scuttle.postrm
+++ scuttle-0.7.4/debian/scuttle.postrm
@@ -43,12 +43,17 @@
 	fi
 
 	# permissions - config file
-	CONFIG_FILE="/var/lib/scuttle/config_debconf.inc.php"
+	CONFIG_FILE="/etc/scuttle/config_debconf.inc.php"
 	CONFIG_AUX=$(dpkg-statoverride --list | grep $CONFIG_FILE) || true
 	if [ -z "$CONFIG_AUX" ]; then
 		dpkg-statoverride --remove $CONFIG_FILE
 	fi
 
+        rm -f $CONFIG_FILE
+        if which ucf >/dev/null 2>&1; then
+                ucf --purge $CONFIG_FILE
+        fi
+
 	# remove scuttle cache dir
 	rm -rf /var/cache/scuttle
 fi
diff -u scuttle-0.7.4/debian/scuttle.postinst scuttle-0.7.4/debian/scuttle.postinst
--- scuttle-0.7.4/debian/scuttle.postinst
+++ scuttle-0.7.4/debian/scuttle.postinst
@@ -18,19 +18,16 @@
 		if [ -z "$CACHE_AUX" ]; then
 			dpkg-statoverride --update --add root www-data 0774 $CACHE_DIR
 		fi
-		
-		# config file debconf
-		CONFIG_FILE="/var/lib/scuttle/config_debconf.inc.php"
 
-		CONFIG_AUX=$(dpkg-statoverride --list | grep $CONFIG_FILE) || true
-		if [ -z "$CONFIG_AUX" ]; then
-			dpkg-statoverride --update --add root www-data 0640  $CONFIG_FILE
-		fi
+		# config file debconf
+		CONFIG_TEMPLATE="/usr/share/scuttle/config_debconf.inc.php"
+		CONFIG_FILE="/etc/scuttle/config_debconf.inc.php"
+		CONFIG_TMP="/etc/scuttle/config_debconf.inc.php.dpkg-new"
 
 		# set admin email in config file
 		ADMIN_EMAIL="\$_SERVER['SERVER_ADMIN']";
 		if [ -n "$ADMIN_EMAIL" ] ; then
-			sed -e "s/adminemail[^;]*/adminemail = $ADMIN_EMAIL/" -i $CONFIG_FILE
+			sed -e "s/adminemail[^;]*/adminemail = $ADMIN_EMAIL/" $CONFIG_TEMPLATE > $CONFIG_TMP
 		fi
 		
 		# debconf messages	
@@ -39,7 +36,14 @@
 
 		# set locale in config file
 		if [ -n "$LOCALE" ] ; then
-			sed -e "s/locale[^;]*/locale = '$LOCALE'/" -i $CONFIG_FILE
+			sed -e "s/locale[^;]*/locale = '$LOCALE'/" $CONFIG_TEMPLATE > $CONFIG_TMP
+		fi
+
+		ucf --debconf-ok $CONFIG_TMP $CONFIG_FILE && rm -f $CONFIG_TMP
+
+		CONFIG_AUX=$(dpkg-statoverride --list | grep $CONFIG_FILE) || true
+		if [ -z "$CONFIG_AUX" ]; then
+			dpkg-statoverride --update --add root www-data 0640  $CONFIG_FILE
 		fi
 
 		# source dbconfig-common stuff

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: