[Pkg-mono-svn-commits] [SCM] xsp branch, master, updated. debian/2.10-2.4

Jo Shields directhex at apebox.org
Fri Apr 26 13:28:38 UTC 2013


The following commit has been merged in the master branch:
commit 06418aaa5698ba53a71b5ef2dc56e404dc0186c9
Author: gregor herrmann <gregoa at debian.org>
Date:   Fri Oct 5 15:50:27 2012 +0200

    Imported Debian patch 2.10-2.2

diff --git a/debian/changelog b/debian/changelog
index af6f676..6406b83 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,23 @@
+xsp (2.10-2.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix "modifies conffiles (policy 10.7.3): /etc/default/mono-xsp2" and
+    "mono-apache-server2, mono-apache-server4: modifies conffiles (policy
+    10.7.3): /etc/default/mono-apache-server[24]" and another not yet reported
+    case of the same problem in mono-xsp4:
+    for all of mono-xsp[24] and mono-apache-server[24]:
+    - don't ship the .default file
+    - create it in .postinst if necessary
+    - source it in .config to feed existing values into debconf
+    - remove it in .postrm/purge
+    (Closes: #688205, Closes: #688565)
+  * Fix "mono-apache-server{2, 4}: unowned files after purge (policy
+    6.8, 10.8): /etc/mono-server?/mono-server?-hosts.conf":
+    - remove files in .postrm/purge
+    (Closes: #668755)
+
+ -- gregor herrmann <gregoa at debian.org>  Fri, 05 Oct 2012 15:50:27 +0200
+
 xsp (2.10-2.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff --git a/debian/mono-apache-server2.config b/debian/mono-apache-server2.config
index a5e54c1..5a1d201 100644
--- a/debian/mono-apache-server2.config
+++ b/debian/mono-apache-server2.config
@@ -30,6 +30,13 @@ if [ -d /etc/mono-server/conf.d ] && [ "`ls /etc/mono-server/conf.d/ | grep -v ^
 	db_go || true
 fi
 
+# get existing values
+modmono_default="/etc/default/mono-apache-server2"
+if [ -e $modmono_default ]; then
+	. $modmono_default || true
+	db_set monoserver2/monoserver2_restartapache "start_apache"
+fi
+
 STATE=1
 while [ "$STATE"  != 0 -a "$STATE" != 2 ]; do
     case "$STATE" in
diff --git a/debian/mono-apache-server2.default b/debian/mono-apache-server2.default
deleted file mode 100644
index 8baee8f..0000000
--- a/debian/mono-apache-server2.default
+++ /dev/null
@@ -1,4 +0,0 @@
-# Defaults for mono-apache-server2
-
-# Should mono-apache-server2 start apache?
-start_apache=false
diff --git a/debian/mono-apache-server2.postinst b/debian/mono-apache-server2.postinst
index b427969..bc2015d 100644
--- a/debian/mono-apache-server2.postinst
+++ b/debian/mono-apache-server2.postinst
@@ -6,6 +6,16 @@ db_version 2.0
 
 modmono_default="/etc/default/mono-apache-server2"
 
+# create file if it doesn't exist
+if [ ! -e $modmono_default ]; then
+	cat > $modmono_default <<-END
+	# Defaults for mono-apache-server2
+
+	# Should mono-apache-server2 start apache?
+	start_apache=false
+	END
+fi
+
 restart_apache_on() {
     sed s/start_apache=false/start_apache=true/g $modmono_default > $tempfile
     cp $tempfile $modmono_default
diff --git a/debian/mono-apache-server2.postrm b/debian/mono-apache-server2.postrm
new file mode 100644
index 0000000..051edfe
--- /dev/null
+++ b/debian/mono-apache-server2.postrm
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -e
+
+if [ "$1" = "purge" ]; then
+	rm -f /etc/mono-server2/debian.webapp
+	rm -f /etc/mono-server2/mono-server2-hosts.conf
+	# remove default file created in postinst
+	rm -f /etc/default/mono-apache-server2
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/mono-apache-server4.config b/debian/mono-apache-server4.config
index 0f46026..f01dc14 100644
--- a/debian/mono-apache-server4.config
+++ b/debian/mono-apache-server4.config
@@ -30,6 +30,13 @@ if [ -d /etc/mono-server/conf.d ] && [ "`ls /etc/mono-server/conf.d/ | grep -v ^
 	db_go || true
 fi
 
+# get existing values
+modmono_default="/etc/default/mono-apache-server4"
+if [ -e $modmono_default ]; then
+	. $modmono_default || true
+	db_set monoserver4/monoserver4_restartapache "start_apache"
+fi
+
 STATE=1
 while [ "$STATE"  != 0 -a "$STATE" != 2 ]; do
     case "$STATE" in
diff --git a/debian/mono-apache-server4.default b/debian/mono-apache-server4.default
deleted file mode 100644
index ad02cb3..0000000
--- a/debian/mono-apache-server4.default
+++ /dev/null
@@ -1,4 +0,0 @@
-# Defaults for mono-apache-server4
-
-# Should mono-apache-server4 start apache?
-start_apache=false
diff --git a/debian/mono-apache-server4.postinst b/debian/mono-apache-server4.postinst
index 2fc1bb2..b8d295d 100644
--- a/debian/mono-apache-server4.postinst
+++ b/debian/mono-apache-server4.postinst
@@ -6,6 +6,16 @@ db_version 2.0
 
 modmono_default="/etc/default/mono-apache-server4"
 
+# create file if it doesn't exist
+if [ ! -e $modmono_default ]; then
+	cat > $modmono_default <<-END
+	# Defaults for mono-apache-server4
+
+	# Should mono-apache-server4 start apache?
+	start_apache=false
+	END
+fi
+
 restart_apache_on() {
     sed s/start_apache=false/start_apache=true/g $modmono_default > $tempfile
     cp $tempfile $modmono_default
diff --git a/debian/mono-apache-server4.postrm b/debian/mono-apache-server4.postrm
new file mode 100644
index 0000000..b86f884
--- /dev/null
+++ b/debian/mono-apache-server4.postrm
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -e
+
+if [ "$1" = "purge" ]; then
+	rm -f /etc/mono-server4/debian.webapp
+	rm -f /etc/mono-server4/mono-server4-hosts.conf
+	# remove default file created in postinst
+	rm -f /etc/default/mono-apache-server4
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/mono-xsp2.config b/debian/mono-xsp2.config
index 10f6fac..c5ef713 100644
--- a/debian/mono-xsp2.config
+++ b/debian/mono-xsp2.config
@@ -31,6 +31,15 @@ if [ -d /etc/xsp/conf.d ] && [ "`ls /etc/xsp/conf.d/ | grep -v ^asp.net-examples
 	db_go || true
 fi
 
+# get existing values
+xsp2_default="/etc/default/mono-xsp2"
+if [ -e $xsp2_default ]; then
+	. $xsp2_default || true
+	db_set xsp2/xsp2_autostart "$start_boot"
+	db_set xsp2/xsp2_bind      "$address"
+	db_get xsp2/xsp2_port      "$port"
+fi
+
 # Autostart
 STATE=1
 while [ "$STATE"  != 0 -a "$STATE" != 2 ]; do
diff --git a/debian/mono-xsp2.default b/debian/mono-xsp2.default
deleted file mode 100644
index 5f0a9be..0000000
--- a/debian/mono-xsp2.default
+++ /dev/null
@@ -1,16 +0,0 @@
-# Defaults for mono-xsp2, official version
-# sourced by /etc/init.d/mono-xsp2
-
-# Should we start it?
-start_boot=true
-
-# User and group by default
-user=www-data
-group=www-data
-
-# Default port
-port=8081
-address=0.0.0.0
-
-# Directory for config files
-config_files=/etc/xsp2
diff --git a/debian/mono-xsp2.postinst b/debian/mono-xsp2.postinst
index c7097c4..118cc1c 100644
--- a/debian/mono-xsp2.postinst
+++ b/debian/mono-xsp2.postinst
@@ -10,6 +10,28 @@ DESC="XSP 2 WebServer"
 CFGDIR=/etc/xsp2
 VIRTUALFILE=$CFGDIR/debian.webapp
 
+# create file if it doesn't exist
+if [ ! -e $xsp2_default ]; then
+	cat > $xsp2_default <<-END
+	# Defaults for mono-xsp2, official version
+	# sourced by /etc/init.d/mono-xsp2
+	
+	# Should we start it?
+	start_boot=true
+	
+	# User and group by default
+	user=www-data
+	group=www-data
+	
+	# Default port
+	port=8081
+	address=0.0.0.0
+	
+	# Directory for config files
+	config_files=/etc/xsp2
+	END
+fi
+
 update_port() {
     db_get xsp2/xsp2_port || true
     R=$RET
diff --git a/debian/mono-xsp2.postrm b/debian/mono-xsp2.postrm
index 9023f63..ebf3931 100644
--- a/debian/mono-xsp2.postrm
+++ b/debian/mono-xsp2.postrm
@@ -5,6 +5,8 @@ if [ "$1" = "purge" ]; then
 	rm -f /etc/xsp2/debian.webapp
 	# purge init.d script
 	update-rc.d -f mono-xsp2 remove > /dev/null 2>&1
+	# remove default file created in postinst
+	rm -f /etc/default/mono-xsp2
 fi
 
 #DEBHELPER#
diff --git a/debian/mono-xsp4.config b/debian/mono-xsp4.config
index be9f597..43accb6 100755
--- a/debian/mono-xsp4.config
+++ b/debian/mono-xsp4.config
@@ -31,6 +31,15 @@ if [ -d /etc/xsp/conf.d ] && [ "`ls /etc/xsp/conf.d/ | grep -v ^asp.net-examples
 	db_go || true
 fi
 
+# get existing values
+xsp4_default="/etc/default/mono-xsp4"
+if [ -e $xsp4_default ]; then
+	. $xsp4_default || true
+	db_set xsp4/xsp4_autostart "$start_boot"
+	db_set xsp4/xsp4_bind      "$address"
+	db_get xsp4/xsp4_port      "$port"
+fi
+
 # Autostart
 STATE=1
 while [ "$STATE"  != 0 -a "$STATE" != 2 ]; do
diff --git a/debian/mono-xsp4.default b/debian/mono-xsp4.default
deleted file mode 100644
index f334af7..0000000
--- a/debian/mono-xsp4.default
+++ /dev/null
@@ -1,16 +0,0 @@
-# Defaults for mono-xsp4, official version
-# sourced by /etc/init.d/mono-xsp4
-
-# Should we start it?
-start_boot=true
-
-# User and group by default
-user=www-data
-group=www-data
-
-# Default port
-port=8084
-address=0.0.0.0
-
-# Directory for config files
-config_files=/etc/xsp4
diff --git a/debian/mono-xsp4.postinst b/debian/mono-xsp4.postinst
index 53f08c0..53cd252 100644
--- a/debian/mono-xsp4.postinst
+++ b/debian/mono-xsp4.postinst
@@ -10,6 +10,28 @@ DESC="XSP 4 WebServer"
 CFGDIR=/etc/xsp4
 VIRTUALFILE=$CFGDIR/debian.webapp
 
+# create file if it doesn't exist
+if [ ! -e $xsp4_default ]; then
+	cat > $xsp4_default <<-END
+	# Defaults for mono-xsp4, official version
+	# sourced by /etc/init.d/mono-xsp4
+	
+	# Should we start it?
+	start_boot=true
+	
+	# User and group by default
+	user=www-data
+	group=www-data
+	
+	# Default port
+	port=8084
+	address=0.0.0.0
+	
+	# Directory for config files
+	config_files=/etc/xsp4
+	END
+fi
+
 update_port() {
     db_get xsp4/xsp4_port || true
     R=$RET
diff --git a/debian/mono-xsp4.postrm b/debian/mono-xsp4.postrm
index 9be2771..95b307d 100644
--- a/debian/mono-xsp4.postrm
+++ b/debian/mono-xsp4.postrm
@@ -5,6 +5,8 @@ if [ "$1" = "purge" ]; then
 	rm -f /etc/xsp4/debian.webapp
 	# purge init.d script
 	update-rc.d -f mono-xsp4 remove > /dev/null 2>&1
+	# remove default file created in postinst
+	rm -f /etc/default/mono-xsp4
 fi
 
 #DEBHELPER#

-- 
xsp



More information about the Pkg-mono-svn-commits mailing list