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

Bug#638190: pu: package shelldap/0.2-1+squeeze1



Hi Adam

Thank you for your reply.

On Sat, Sep 17, 2011 at 05:12:09PM +0100, Adam D. Barratt wrote:
> On Fri, 2011-09-09 at 12:45 +0200, Salvatore Bonaccorso wrote: 
> > On Tue, Sep 06, 2011 at 09:56:44PM +0100, Adam D. Barratt wrote:
> > > On Wed, 2011-08-17 at 16:46 +0200, Salvatore Bonaccorso wrote:
> > > ++              eval 'use IO::Socket::SSL';
> > > ++              die qq{IO::Socket::SSL not installed, but is required for SSL or TLS connections.
> [...]
> > I agree, changing it to 
> > 
> > eval { require IO::Socket::SSL; };
> > die qq{...} if $@;
> > 
> > is probably more clean. I can change this in the proposed debdiff and
> > also suggest it to upstream. Using
> 
> I'm still arguing with myself a little here.  Theoretically we should
> use the fix from unstable, but the suggested improvement seems obviously
> correct (and not just because I suggested it *g*).

:-)

> > > > Is it possible that I can upload an updated package with 1) upstreams
> > > > fix on the error message, and 2) furthermore add of Recommends on                                                                                          
> > > > libio-socket-ssl-perl?
> > > 
> > > Hmmm.  We generally don't change dependencies in stable updates; I'm
> > > debating the extent to which recommends should be treated in the same
> > > way.
> [...]
> > I would like to have it more easely for users of shelldap, and I had
> > already two bugreports about it. So if at least if the error message
> > could be clearer it would be an improvement.
> 
> I think I'd prefer that option, to be honest.

Please find attached the proposed debdiff without the Recommends
addition. It takes upstream patch but with the discussed change to use
an eval block, and a require instead of use.

Regards,
Salvatore
diff -u shelldap-0.2/debian/changelog shelldap-0.2/debian/changelog
--- shelldap-0.2/debian/changelog
+++ shelldap-0.2/debian/changelog
@@ -1,3 +1,12 @@
+shelldap (0.2-1+squeeze1) stable; urgency=low
+
+  * Add ssl-errmsg.patch to exit with a nicer error message if IO::Socket::SSL
+    isn't installed, but the user is requesting SSL/TLS.
+    (Closes: #614350, #638062).
+  * Email change: Salvatore Bonaccorso -> carnil@debian.org
+
+ -- Salvatore Bonaccorso <carnil@debian.org>  Sat, 17 Sep 2011 19:42:30 +0200
+
 shelldap (0.2-1) unstable; urgency=low
 
   * Initial release (Closes: #548271)
diff -u shelldap-0.2/debian/copyright shelldap-0.2/debian/copyright
--- shelldap-0.2/debian/copyright
+++ shelldap-0.2/debian/copyright
@@ -30,7 +30,7 @@
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Files: debian/*
-Copyright: 2009, Salvatore Bonaccorso <salvatore.bonaccorso@gmail.com>
+Copyright: 2009, Salvatore Bonaccorso <carnil@debian.org>
 License: BSD
  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions
diff -u shelldap-0.2/debian/control shelldap-0.2/debian/control
--- shelldap-0.2/debian/control
+++ shelldap-0.2/debian/control
@@ -1,7 +1,7 @@
 Source: shelldap
 Section: utils
 Priority: optional
-Maintainer: Salvatore Bonaccorso <salvatore.bonaccorso@gmail.com>
+Maintainer: Salvatore Bonaccorso <carnil@debian.org>
 DM-Upload-Allowed: yes
 Build-Depends: debhelper (>= 7.0.50), quilt (>= 0.46-7)
 Build-Depends-Indep: perl
diff -u shelldap-0.2/debian/patches/series shelldap-0.2/debian/patches/series
--- shelldap-0.2/debian/patches/series
+++ shelldap-0.2/debian/patches/series
@@ -1,0 +2 @@
+ssl-errmsg.patch
only in patch2:
unchanged:
--- shelldap-0.2.orig/debian/patches/ssl-errmsg.patch
+++ shelldap-0.2/debian/patches/ssl-errmsg.patch
@@ -0,0 +1,30 @@
+Description: Exit with a nicer error message if IO::Socket::SSL isn't
+ installed, but the user is requesting SSL/TLS. (this is normally
+ required by Net::LDAP.)
+Origin: vendor, http://projects.martini.nu/shelldap/attachment/ticket/8/ssl-errmsg.patch
+Bug: http://projects.martini.nu/shelldap/ticket/8
+Bug-Debian: http://bugs.debian.org/614350
+Forwarded: no
+Author: Mahlon E. Smith <mahlon@martini.nu>
+Reviewed-by: Salvatore Bonaccorso <carnil@debian.org>
+Last-Update: 2011-09-17
+
+--- a/shelldap
++++ b/shelldap
+@@ -425,6 +425,16 @@
+ 	
+ 	# fill in potentially missing info
+ 	die "No server specified.\n" unless $conf->{'server'};
++
++	# Emit a nicer error message if IO::Socket::SSL is
++	# not installed and Net::LDAP decides it is required.
++	#
++	if ( $conf->{'tls'} || $conf->{'server'} =~ m|ldaps://| ) {
++		eval { require IO::Socket::SSL; };
++		die qq{IO::Socket::SSL not installed, but is required for SSL or TLS connections.
++You may try connecting insecurely, or install the module and try again.\n} if $@;
++	}
++
+ 	if ( $conf->{'binddn'} && ! $conf->{'bindpass'} ) {
+ 		print "Bind password: ";
+ 		Term::ReadKey::ReadMode 2;

Attachment: signature.asc
Description: Digital signature


Reply to: