Control: tags 581999 patch

I haven't tested the following patch, but it should essentially resolve the
issue.

It removes the check for empty USER and PASS entirely, instead setting a 
default password (a default was already set for user) in the debconf template,
and lets debconf's noninteractive frontend handle the lack of interaction :)


diff -Nru rinputd-1.0.5/debian/changelog rinputd-1.0.5/debian/changelog
--- rinputd-1.0.5/debian/changelog      2012-04-12 11:20:15.000000000 -0700
+++ rinputd-1.0.5/debian/changelog      2013-02-22 15:55:28.000000000 -0800
@@ -1,3 +1,13 @@
+rinputd (1.0.5-2.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Do not special-case when debconf is set to noninteractive, let the 
+    Noninteractive debconf frontend handle that (Closes: #581999).
+  * Set a default password, to avoid infinite loop when debconf priority is too
+    high or in noninteractive mode (Closes: #581999).
+
+ -- Vagrant Cascadian <vagr...@debian.org>  Fri, 22 Feb 2013 15:52:38 -0800
+
 rinputd (1.0.5-2) unstable; urgency=low
 
   * Convert from CDBS to debhelper
diff -Nru rinputd-1.0.5/debian/config rinputd-1.0.5/debian/config
--- rinputd-1.0.5/debian/config 2012-04-12 11:06:14.000000000 -0700
+++ rinputd-1.0.5/debian/config 2013-02-22 15:51:31.000000000 -0800
@@ -2,8 +2,6 @@
 
 set -e
 
-[ `echo $DEBIAN_FRONTEND | tr '[:upper:]' '[:lower:]'` = "noninteractive" ] && 
exit 0
-
 . /usr/share/debconf/confmodule
 
 db_beginblock
@@ -17,18 +15,3 @@
 USER="$RET"
 db_get rinputd/passwd
 PASS="$RET"
-
-while [ -z "$USER" -o -z "$PASS" ]; do
-       db_beginblock
-       db_input high rinputd/invalid  || true
-       db_input high rinputd/username || true
-       db_input high rinputd/passwd   || true
-       db_endblock
-
-       db_go
-
-       db_get rinputd/username
-       USER="$RET"
-       db_get rinputd/passwd
-       PASS="$RET"
-done
diff -Nru rinputd-1.0.5/debian/rinputd.postinst 
rinputd-1.0.5/debian/rinputd.postinst
--- rinputd-1.0.5/debian/rinputd.postinst       2012-04-03 21:33:44.000000000 
-0700
+++ rinputd-1.0.5/debian/rinputd.postinst       2013-02-22 15:52:14.000000000 
-0800
@@ -24,14 +24,12 @@
         echo "Done"
     fi
 
-    if [ "`echo $DEBIAN_FRONTEND | tr '[:upper:]' '[:lower:]'`" != 
"noninteractive" ]; then
         db_get rinputd/username
         USER="$RET"
         db_get rinputd/passwd
         PASS="$RET"
 
         echo "$PASS" | saslpasswd2 -p -c -u rinput "$USER"
-    fi
 fi
 
 #DEBHELPER#
diff -Nru rinputd-1.0.5/debian/templates rinputd-1.0.5/debian/templates
--- rinputd-1.0.5/debian/templates      2012-04-03 21:33:44.000000000 -0700
+++ rinputd-1.0.5/debian/templates      2013-02-22 15:51:59.000000000 -0800
@@ -18,12 +18,7 @@
  remote input daemon.
 
 Template: rinputd/passwd
+Default: rinput-password
 Type: password
 _Description: Remote input password:
  Please enter a password for the remote input login.
-
-Template: rinputd/invalid
-Type: error
-_Description: Invalid username or password
- Neither the remote input username nor the password can be empty.
- Please correct them.


live well,
  vagrant


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to