Here are a couple of patches which fix that issue different ways:

* mt-daapd-635297-debconf.patch asks the user for an admin password.
* mt-daapd-635297-no-startup.patch disables the automatic startup.
diff -uN mt-daapd-0.9~r1696.dfsg/debian//changelog mt-daapd-0.9~r1696.dfsg.new/debian//changelog
--- mt-daapd-0.9~r1696.dfsg/debian//changelog	2011-07-25 02:34:50.000000000 +0200
+++ mt-daapd-0.9~r1696.dfsg.new/debian//changelog	2011-07-25 02:08:23.391557136 +0200
@@ -1,3 +1,14 @@
+mt-daapd (0.9~r1696.dfsg-16.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Prompt for an admin password using debconf (Closes: #635297)
+    + debian/rules: Call dh_installdebconf
+    + debian/config: Added; prompt for an admin password
+    + debian/templates: Added;
+    + debian/postinst: write the admin password to /etc/mt-daapd.conf
+
+ -- Mirsal Ennaime <mir...@mirsal.fr>  Mon, 25 Jul 2011 00:30:50 +0200
+
 mt-daapd (0.9~r1696.dfsg-16) unstable; urgency=low
 
   * debian/patches/18_itunes10_fix.dpatch:
diff -uN mt-daapd-0.9~r1696.dfsg/debian//config mt-daapd-0.9~r1696.dfsg.new/debian//config
--- mt-daapd-0.9~r1696.dfsg/debian//config	1970-01-01 01:00:00.000000000 +0100
+++ mt-daapd-0.9~r1696.dfsg.new/debian//config	2011-07-25 00:11:35.555554028 +0200
@@ -0,0 +1,5 @@
+#!/bin/sh
+set -e
+. /usr/share/debconf/confmodule
+db_input high mt-daapd/admin_pw || true
+db_go || true
Common subdirectories: mt-daapd-0.9~r1696.dfsg/debian//patches and mt-daapd-0.9~r1696.dfsg.new/debian//patches
diff -uN mt-daapd-0.9~r1696.dfsg/debian//postinst mt-daapd-0.9~r1696.dfsg.new/debian//postinst
--- mt-daapd-0.9~r1696.dfsg/debian//postinst	2011-07-25 02:34:50.000000000 +0200
+++ mt-daapd-0.9~r1696.dfsg.new/debian//postinst	2011-07-25 17:25:41.075562676 +0200
@@ -1,6 +1,7 @@
 #!/bin/sh
 
 set -e
+. /usr/share/debconf/confmodule
 
 # First time install
 if ! getent passwd mt-daapd > /dev/null 2>&1; then
@@ -23,4 +24,12 @@
     dpkg-statoverride --update --add mt-daapd root 0600 /etc/mt-daapd.conf
 fi
 
+# Debconf
+if [ "$1" = "configure" -o "$1" = "reconfigure" ]; then
+    db_get mt-daapd/admin_pw
+    sed -i "s/^admin_pw\ =\ .*$/admin_pw = $RET/" /etc/mt-daapd.conf
+    db_unregister mt-daapd/admin_pw
+    db_stop
+fi
+
 #DEBHELPER#
diff -uN mt-daapd-0.9~r1696.dfsg/debian//rules mt-daapd-0.9~r1696.dfsg.new/debian//rules
--- mt-daapd-0.9~r1696.dfsg/debian//rules	2011-07-25 02:34:50.000000000 +0200
+++ mt-daapd-0.9~r1696.dfsg.new/debian//rules	2011-07-25 00:00:33.499553736 +0200
@@ -117,6 +117,7 @@
 	dh_strip
 	dh_fixperms
 	dh_installdeb
+	dh_installdebconf
 	dh_shlibdeps
 	dh_gencontrol
 	dh_md5sums
diff -uN mt-daapd-0.9~r1696.dfsg/debian//templates mt-daapd-0.9~r1696.dfsg.new/debian//templates
--- mt-daapd-0.9~r1696.dfsg/debian//templates	1970-01-01 01:00:00.000000000 +0100
+++ mt-daapd-0.9~r1696.dfsg.new/debian//templates	2011-07-25 17:28:16.187562746 +0200
@@ -0,0 +1,4 @@
+Template: mt-daapd/admin_pw
+Type: password
+Default: mt-daapd
+Description: Password for the administrative interface
diff -u mt-daapd-0.9~r1696.dfsg/debian//changelog mt-daapd-0.9~r1696.dfsg.nostartup/debian//changelog
--- mt-daapd-0.9~r1696.dfsg/debian//changelog	2011-07-25 02:34:50.000000000 +0200
+++ mt-daapd-0.9~r1696.dfsg.nostartup/debian//changelog	2011-07-25 17:47:19.559563253 +0200
@@ -1,3 +1,10 @@
+mt-daapd (0.9~r1696.dfsg-16.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * debian/rules: Do not start the daemon automatically after installation
+
+ -- Mirsal Ennaime <mir...@mirsal.fr>  Mon, 25 Jul 2011 17:45:34 +0200
+
 mt-daapd (0.9~r1696.dfsg-16) unstable; urgency=low
 
   * debian/patches/18_itunes10_fix.dpatch:
Common subdirectories: mt-daapd-0.9~r1696.dfsg/debian//patches and mt-daapd-0.9~r1696.dfsg.nostartup/debian//patches
diff -u mt-daapd-0.9~r1696.dfsg/debian//rules mt-daapd-0.9~r1696.dfsg.nostartup/debian//rules
--- mt-daapd-0.9~r1696.dfsg/debian//rules	2011-07-25 02:34:50.000000000 +0200
+++ mt-daapd-0.9~r1696.dfsg.nostartup/debian//rules	2011-07-25 17:38:12.399563012 +0200
@@ -109,7 +109,7 @@
 	dh_installchangelogs ChangeLog
 	dh_lintian
 	dh_installdocs
-	dh_installinit -- defaults 25
+	dh_installinit --no-start -- defaults 25
 	dh_installman debian/mt-daapd.8
 	dh_installlogcheck
 	dh_compress

Reply via email to