Bug#365125: perl: More info
On Wed, May 10, 2006 at 04:28:59PM +1000, Brendan O'Dea wrote: tags 365125 + patch pending thanks On Tue, May 09, 2006 at 06:50:01PM -0400, [EMAIL PROTECTED] wrote: [ ... ] OK. It would seem that the utf8 change introduced in sarge4 does indeed not play nicely with the newer version of Tk. I've prepared a new version of debian/patches/23_fix_utf8_taint which incorporates upstream changes #23084 and #23085 from Nick Ing-Simmonds for Tk. This seems to work for the original testcase for utf8/taint, and the widget demo from perl-tk 804.027-4 works for me. Please test: $ apt-get source perl $ cd perl-5.8.4 $ debian/rules unpatch [replace debian/patches/23_fix_utf8_taint attached] $ debian/rules patch $ dch -n Test Tk fix $ dpkg-buildpackage -rfakeroot -us -uc --bod I followed your instructions, rebuilt the packages and everything works for me now. Thanks for your help Helmut -- - Helmut Lichtenberg [EMAIL PROTECTED] Tel. +49 (0)5034/871-128 Institut für Tierzucht 31535 Neustadt Germany - -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#365125: perl: More info
tags 365125 + patch pending thanks On Tue, May 09, 2006 at 06:50:01PM -0400, [EMAIL PROTECTED] wrote: I would like to add some more info on this bug to help others such as me that have been bitten by this. I use a program VOCP to do voice message processing among other things and it uses perl-tk 804.027 for its graphical elements. These elements ceased to function upon upgrading to perl_5.8.4-8sarge4. I've discovered that you can downgrade the single package perl-base to perl-base_5.8.4-8sarge3 available at snapshot.debian.net to restore perl-tk functionallity. OK. It would seem that the utf8 change introduced in sarge4 does indeed not play nicely with the newer version of Tk. I've prepared a new version of debian/patches/23_fix_utf8_taint which incorporates upstream changes #23084 and #23085 from Nick Ing-Simmonds for Tk. This seems to work for the original testcase for utf8/taint, and the widget demo from perl-tk 804.027-4 works for me. Please test: $ apt-get source perl $ cd perl-5.8.4 $ debian/rules unpatch [replace debian/patches/23_fix_utf8_taint attached] $ debian/rules patch $ dch -n Test Tk fix $ dpkg-buildpackage -rfakeroot -us -uc --bod Fix problem with utf8/taint interaction (upstream changes #22842, #22843 and #22902). Thanks to Steinar Gunderson for analysis/patch. Additionally apply upstream changes #23084 and #23085 to correct problems with Tk 804.27 . diff -Naur --exclude=debian perl-5.8.4.orig/ext/Encode/lib/Encode/CN/HZ.pm perl-5.8.4/ext/Encode/lib/Encode/CN/HZ.pm --- perl-5.8.4.orig/ext/Encode/lib/Encode/CN/HZ.pm 2004-02-23 19:29:12.0 + +++ perl-5.8.4/ext/Encode/lib/Encode/CN/HZ.pm 2006-05-10 03:08:42.303791195 + @@ -152,7 +152,8 @@ $ret .= pack 'a*', $tmp; # remove UTF8 flag. } elsif ($str =~ s/(.)//) { - my $tmp = $GB-encode($1, $chk); + my $s = $1; + my $tmp = $GB-encode($s, $chk); last if !defined $tmp; if (length $tmp == 2) { # maybe a valid GB char (XXX) if ($in_ascii) { diff -Naur --exclude=debian perl-5.8.4.orig/ext/Encode/lib/Encode/Unicode/UTF7.pm perl-5.8.4/ext/Encode/lib/Encode/Unicode/UTF7.pm --- perl-5.8.4.orig/ext/Encode/lib/Encode/Unicode/UTF7.pm 2003-05-21 14:15:16.0 + +++ perl-5.8.4/ext/Encode/lib/Encode/Unicode/UTF7.pm2006-05-10 03:08:42.313791120 + @@ -6,7 +6,7 @@ no warnings 'redefine'; use base qw(Encode::Encoding); __PACKAGE__-Define('UTF-7'); -our $VERSION = do { my @r = (q$Revision: 0.2 $ =~ /\d+/g); sprintf %d..%02d x $#r, @r }; +our $VERSION = '2.00_01'; use MIME::Base64; use Encode; @@ -38,7 +38,8 @@ if ($1 eq +){ $bytes .= +-; }else{ - my $base64 = encode_base64($e_utf16-encode($1), ''); + my $s = $1; + my $base64 = encode_base64($e_utf16-encode($s), ''); $base64 =~ s/=+$//; $bytes .= +$base64-; } diff -Naur --exclude=debian perl-5.8.4.orig/sv.c perl-5.8.4/sv.c --- perl-5.8.4.orig/sv.c2004-03-31 15:03:57.0 + +++ perl-5.8.4/sv.c 2006-05-10 03:11:23.912581291 + @@ -3438,18 +3438,20 @@ U8 *s, *t, *e; int hibit = 0; -if (!sv) - return 0; - if (!SvPOK(sv)) { STRLEN len = 0; - (void) sv_2pv_flags(sv,len, flags); - if (!SvPOK(sv)) -return len; + if (SvREADONLY(sv) (SvPOKp(sv) || SvIOKp(sv) || SvNOKp(sv))) { + (void) sv_2pv_flags(sv,len, flags); + if (SvUTF8(sv)) + return len; + } else { + (void) SvPV_force(sv,len); + } } -if (SvUTF8(sv)) +if (SvUTF8(sv)) { return SvCUR(sv); +} if (SvREADONLY(sv) SvFAKE(sv)) { sv_force_normal(sv); @@ -3504,7 +3506,7 @@ bool Perl_sv_utf8_downgrade(pTHX_ register SV* sv, bool fail_ok) { -if (SvPOK(sv) SvUTF8(sv)) { +if (SvPOKp(sv) SvUTF8(sv)) { if (SvCUR(sv)) { U8 *s; STRLEN len; @@ -3566,7 +3568,7 @@ bool Perl_sv_utf8_decode(pTHX_ register SV *sv) { -if (SvPOK(sv)) { +if (SvPOKp(sv)) { U8 *c; U8 *e;
Bug#365125: perl: More info
Package: perl Version: 5.8.4-8sarge4 Followup-For: Bug #365125 I would like to add some more info on this bug to help others such as me that have been bitten by this. I use a program VOCP to do voice message processing among other things and it uses perl-tk 804.027 for its graphical elements. These elements ceased to function upon upgrading to perl_5.8.4-8sarge4. I've discovered that you can downgrade the single package perl-base to perl-base_5.8.4-8sarge3 available at snapshot.debian.net to restore perl-tk functionallity. example: wget http://snapshot.debian.net/archive/2006/01/17/debian-security/pool/updates/main/p/perl/perl-base_5.8.4-8sarge3_i386.deb dpkg -i perl-base_5.8.4-8sarge3_i386.deb Other archetectures are available at the same location. WARNING: See Bug#227621 to see if it effects you before deciding to downgrade. I've also found that if you build perl_5.8.4-8sarge4 from source without the patch debian/patches/23_fix_utf8_taint, you will get a custom built perl_5.8.4-8sarge4 which will work with perl-tk 804.027 example: mkdir perl cd perl apt-get source perl=5.8.4-8sarge4 cd perl-5.8.4 fakeroot debian/rules clean debian/rules unpatch rm debian/patches/23_fix_utf8_taint vi patches-applied # remove the line debian/patches/23_fix_utf8_taint and save your changes debian/rules patch dch -i # edit the changelog for your custom package pkg-buildpackage -rfakeroot -us -uc # if your told you need any additional packages installed to build perl, install them and issue this command again cd ../ dpkg -i perl-base_5.8.4-8sarge4 your custom designation _i386.deb or dpkg -i *.deb# to install all perl 5.8.4-8sarge4 your custom designation packages you built It may be possible to edit 23_fix_utf8_taint to further isolate or eliminate this bug but thats probably beyond my capabilities. *** .reportbug.sig NOTE: Due to debian.org's inadequate measures to prevent email address harvesting from bugs.debian.org, you must include Bugs#, without the quotes, in the subject of any email that you wish to send me. Thank You. -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (800, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.8-3-686 Locale: LANG=en_CA, LC_CTYPE=en_CA (charmap=ISO-8859-1) Versions of packages perl depends on: ii libc6 2.3.2.ds1-22sarge3 GNU C Library: Shared libraries an ii libdb4.24.2.52-18Berkeley v4.2 Database Libraries [ ii libgdbm31.8.3-2 GNU dbm database routines (runtime ii perl-base 5.8.4-8sarge4custom1 The Pathologically Eclectic Rubbis ii perl-modules5.8.4-8sarge4Core Perl modules -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]