Bug#867279: duck: Use of uninitialized value in string ne at /usr/share/duck/DUCK.pm line 649.

2017-08-08 Thread Simon Kainz
tags 867279 pending
thanks

I fixed this issue, the fixed version is alread in the git repo.
Thanks for reporting.

Regards,


On Wed, 05 Jul 2017 14:28:06 +0200 Axel Beckert  wrote:
> Package: duck
> Version: 0.12
> Severity: normal
> 
> If I check the lynx 2.8.9dev14-2 package (currently in testing and
> unstable) with duck, I get the following perl warnings:
> 
> ---
> Use of uninitialized value in string ne at /usr/share/duck/DUCK.pm line 649.
> Use of uninitialized value in string ne at /usr/share/duck/DUCK.pm line 649.
> Use of uninitialized value in string ne at /usr/share/duck/DUCK.pm line 649.
> Use of uninitialized value in string ne at /usr/share/duck/DUCK.pm line 649.
> I: debian/copyright:47: URL: 
> http://www.haible.de/bruno/packages-libutf8.html: INFORMATION 
> (Certainty:possible)
>URL schema changed from HTTP to HTTPS during redirect(s): 
> http://www.haible.de -> https://www.haible.de
>Please investigate and update the URL eventually, to avoid unneccesary 
> redirects!
> 
> I: debian/copyright:49: URL: http://fedoraproject.org/wiki/Nss_compat_ossl: 
> INFORMATION (Certainty:possible)
>The web page at http://fedoraproject.org/wiki/Nss_compat_ossl works, but 
> is also available via https://fedoraproject.org/wiki/Nss_compat_ossl, please 
> consider switching to HTTPS urls.
> ---
> 
> Adding some debug output to DUCK.pm reveals that it's always the domain
> fedoraproject.org:
> 
> ---
> → diff -Bbu /usr/share/duck/DUCK.pm.backup /usr/share/duck/DUCK.pm
> --- /usr/share/duck/DUCK.pm.backup  2017-01-15 20:26:16.0 +0100
> +++ /usr/share/duck/DUCK.pm 2017-07-05 12:46:30.391670509 +0200
> @@ -646,6 +646,7 @@
>  if ($startscheme && $finalscheme)
>  {
>  
> +print "*** DEBUG '$startdomain' vs '$finaldomain'\n";
>  if ($startdomainsuffix->get_root_domain($startdomain) ne 
> $finaldomainsuffix->get_root_domain($finaldomain))
>  {
>  
> ---
> 
> With that patch, the output looks like this:
> 
> ---
> ~/lynx/lynx → duck
> *** DEBUG 'www.bzip.org' vs 'www.bzip.org'
> *** DEBUG 'www.gzip.org' vs 'www.gzip.org'
> *** DEBUG 'www.openssl.org' vs 'www.openssl.org'
> *** DEBUG 'www.bzip.org' vs 'www.bzip.org'
> *** DEBUG 'www.haible.de' vs 'www.haible.de'
> *** DEBUG 'lynx.invisible-island.net' vs 'lynx.invisible-island.net'
> *** DEBUG 'invisible-mirror.net' vs 'invisible-mirror.net'
> *** DEBUG 'www.debian.org' vs 'www.debian.org'
> *** DEBUG 'anonscm.debian.org' vs 'anonscm.debian.org'
> *** DEBUG 'libbsd.freedesktop.org' vs 'libbsd.freedesktop.org'
> *** DEBUG 'savannah.nongnu.org' vs 'savannah.nongnu.org'
> *** DEBUG 'savannah.nongnu.org' vs 'savannah.nongnu.org'
> *** DEBUG 'lynx.invisible-island.net' vs 'lynx.invisible-island.net'
> *** DEBUG 'fedoraproject.org' vs 'fedoraproject.org'
> Use of uninitialized value in string ne at /usr/share/duck/DUCK.pm line 650.
> Use of uninitialized value in string ne at /usr/share/duck/DUCK.pm line 650.
> *** DEBUG 'www.haible.de' vs 'www.haible.de'
> *** DEBUG 'invisible-mirror.net' vs 'invisible-mirror.net'
> *** DEBUG 'bugs.debian.org' vs 'bugs.debian.org'



Bug#867279: duck: Use of uninitialized value in string ne at /usr/share/duck/DUCK.pm line 649.

2017-07-05 Thread Axel Beckert
Package: duck
Version: 0.12
Severity: normal

If I check the lynx 2.8.9dev14-2 package (currently in testing and
unstable) with duck, I get the following perl warnings:

---
Use of uninitialized value in string ne at /usr/share/duck/DUCK.pm line 649.
Use of uninitialized value in string ne at /usr/share/duck/DUCK.pm line 649.
Use of uninitialized value in string ne at /usr/share/duck/DUCK.pm line 649.
Use of uninitialized value in string ne at /usr/share/duck/DUCK.pm line 649.
I: debian/copyright:47: URL: http://www.haible.de/bruno/packages-libutf8.html: 
INFORMATION (Certainty:possible)
   URL schema changed from HTTP to HTTPS during redirect(s): 
http://www.haible.de -> https://www.haible.de
   Please investigate and update the URL eventually, to avoid unneccesary 
redirects!

I: debian/copyright:49: URL: http://fedoraproject.org/wiki/Nss_compat_ossl: 
INFORMATION (Certainty:possible)
   The web page at http://fedoraproject.org/wiki/Nss_compat_ossl works, but is 
also available via https://fedoraproject.org/wiki/Nss_compat_ossl, please 
consider switching to HTTPS urls.
---

Adding some debug output to DUCK.pm reveals that it's always the domain
fedoraproject.org:

---
→ diff -Bbu /usr/share/duck/DUCK.pm.backup /usr/share/duck/DUCK.pm
--- /usr/share/duck/DUCK.pm.backup  2017-01-15 20:26:16.0 +0100
+++ /usr/share/duck/DUCK.pm 2017-07-05 12:46:30.391670509 +0200
@@ -646,6 +646,7 @@
 if ($startscheme && $finalscheme)
 {
 
+print "*** DEBUG '$startdomain' vs '$finaldomain'\n";
 if ($startdomainsuffix->get_root_domain($startdomain) ne 
$finaldomainsuffix->get_root_domain($finaldomain))
 {
 
---

With that patch, the output looks like this:

---
~/lynx/lynx → duck
*** DEBUG 'www.bzip.org' vs 'www.bzip.org'
*** DEBUG 'www.gzip.org' vs 'www.gzip.org'
*** DEBUG 'www.openssl.org' vs 'www.openssl.org'
*** DEBUG 'www.bzip.org' vs 'www.bzip.org'
*** DEBUG 'www.haible.de' vs 'www.haible.de'
*** DEBUG 'lynx.invisible-island.net' vs 'lynx.invisible-island.net'
*** DEBUG 'invisible-mirror.net' vs 'invisible-mirror.net'
*** DEBUG 'www.debian.org' vs 'www.debian.org'
*** DEBUG 'anonscm.debian.org' vs 'anonscm.debian.org'
*** DEBUG 'libbsd.freedesktop.org' vs 'libbsd.freedesktop.org'
*** DEBUG 'savannah.nongnu.org' vs 'savannah.nongnu.org'
*** DEBUG 'savannah.nongnu.org' vs 'savannah.nongnu.org'
*** DEBUG 'lynx.invisible-island.net' vs 'lynx.invisible-island.net'
*** DEBUG 'fedoraproject.org' vs 'fedoraproject.org'
Use of uninitialized value in string ne at /usr/share/duck/DUCK.pm line 650.
Use of uninitialized value in string ne at /usr/share/duck/DUCK.pm line 650.
*** DEBUG 'www.haible.de' vs 'www.haible.de'
*** DEBUG 'invisible-mirror.net' vs 'invisible-mirror.net'
*** DEBUG 'bugs.debian.org' vs 'bugs.debian.org'
*** DEBUG 'fedoraproject.org' vs 'fedoraproject.org'
Use of uninitialized value in string ne at /usr/share/duck/DUCK.pm line 650.
Use of uninitialized value in string ne at /usr/share/duck/DUCK.pm line 650.
*** DEBUG 'www.gzip.org' vs 'www.gzip.org'
I: debian/copyright:47: URL: http://www.haible.de/bruno/packages-libutf8.html: 
INFORMATION (Certainty:possible)
   URL schema changed from HTTP to HTTPS during redirect(s): 
http://www.haible.de -> https://www.haible.de
   Please investigate and update the URL eventually, to avoid unneccesary 
redirects!

I: debian/copyright:49: URL: http://fedoraproject.org/wiki/Nss_compat_ossl: 
INFORMATION (Certainty:possible)
   The web page at http://fedoraproject.org/wiki/Nss_compat_ossl works, but is 
also available via https://fedoraproject.org/wiki/Nss_compat_ossl, please 
consider switching to HTTPS urls.
---

There are only two places in the packaging where fedoraproject.org is
mentioned:

---
~/lynx/lynx → git grep fedoraproject.org
COPYHEADER:nss_compat_ossl  
http://fedoraproject.org/wiki/Nss_compat_ossl
debian/copyright:nss_compat_ossl  
http://fedoraproject.org/wiki/Nss_compat_ossl
---

I though yet haven't found out why these perl warnings appear. I don't
see any unexpected difference when requesting this URL with and without
HTTPS:

---
→ diff <(GET -SUsed http://fedoraproject.org/wiki/Nss_compat_ossl) <(GET -SUsed 
https://fedoraproject.org/wiki/Nss_compat_ossl)
1c1
< GET http://fedoraproject.org/wiki/Nss_compat_ossl
---
> GET