Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 447500 - net-libs/webkit-gtk-1.8.3 USE=spell - bad utf8 data is being passed to enchant_dict_check
Summary: net-libs/webkit-gtk-1.8.3 USE=spell - bad utf8 data is being passed to enchan...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks:
 
Reported: 2012-12-16 17:37 UTC by Walther
Modified: 2013-04-12 06:40 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
enchant fix for webkit-1.8.3 (webkit-gtk-1.8.3-enchant.patch,792 bytes, patch)
2013-04-11 20:36 UTC, Walther
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Walther 2012-12-16 17:37:25 UTC
An incorrect call to enchant_dict_check causes spell checking to mark as misspelled every string whose length in characters is different from its length in bytes. This bug was already reported and fixed upstream on the provided url (svn r125791), but it might be a long time before this fix reaches Gentoo's stable ebuild.

Since this bug affects all non-English language users, can I request the correcting patch be included in portage for the time being?

Reproducible: Always

Steps to Reproduce:
1. Launch a webkit-gtk application with enchant spell check enabled
2. Spell check for a foreign language word (e.g.: très français)
Actual Results:  
Enchant reports these words are misspelled.

Expected Results:  
Words are correctly spelled on selected dictionary.

emerge --info

Portage 2.1.11.31 (default/linux/x86/10.0/desktop, gcc-4.5.4, glibc-2.15-r3, 3.5.7-gentoo-64 x86_64)
=================================================================
System uname: Linux-3.5.7-gentoo-64-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9550_@_2.66GHz-with-gentoo-2.1
Timestamp of tree: Sat, 15 Dec 2012 09:45:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.10.3, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo Local
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -Os -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -Os -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="ftp://gentoo.imj.fr/pub/gentoo/ ftp://mirror.netcologne.de/gentoo/ ftp://ftp.fi.muni.cz/pub/linux/gentoo/"
LANG="fr_FR.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3 -s"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=300"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/etc/portage/overlay"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X a52 aac acpi alsa avi berkdb boundschecking bzip2 cairo canna cdda cdr cjk cli cracklib crypt cscope cups curl cxx dbus dedicated dga divx divx4linux dlloader dri dts dvd dvdr dvdread emboss encode exif fam fbcon fbsplash ffmpeg fftw flac foomaticdb fortran freewnn gd gdbm gif gimp ginac gmedia gpm gstreamer gtk gtk2 gtkhtml hal hddtemp howl iconv icu idn imap imlib innodb inotify ipv6 ithreads jabber java java6 jikes joystick jpeg lame lcms libnotify libsamplerate libwww lm_sensors lzma mad madwifi matroska mbox mmx mng modplug modules mp3 mp4 mpeg mplayer mudflap musepack ncurses nls nptl nsplugin ogg opencl opengl openmp pam pango pcre pdf pdflib perl png ppds pppd python quicktime readline realmedia scanner schroedinger sdl session speex spell sse sse2 ssl ssse3 svg svga tcpd tetex theora threads tiff timidity truetype udev udisks unicode upower usb v4l v4l2 vaapi vdpau vidix vim-syntax vorbis webkit win32codecs wma wmf wmp wxwidgets x264 x86 xcb xcomposite xface xft xine xml xml2 xscreensaver xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse synaptics wacom joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr_FR fr en_GB en es_MX es" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18 ruby19" SANE_BACKENDS="plustek pixma" USERLAND="GNU" VIDEO_CARDS="nouveau vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Comment 1 Pacho Ramos gentoo-dev 2013-04-07 08:10:29 UTC
should be fixed in 2.0.x
Comment 2 Walther 2013-04-08 14:24:11 UTC
But webkit-gtk-2.0.0 is not stable yet. I wanted exactly to avoid forcing users to update to a testing version in order to get this bug fixed...

> emerge -avt "=webkit-gtk-2.0.0"

Calculating dependencies... done!
[ebuild     U #] net-libs/webkit-gtk-2.0.0:3/25::gentoo [1.8.3-r301:3/3::Local] USE="gstreamer jit spell webgl (-aqua) -coverage -debug -geoloc -introspection {-test} (-doc%) (-webkit2%*)" 9,592 kB
[ebuild     U #]  net-libs/libsoup-2.42.0:2.4 [2.38.1:2.4] USE="ssl -debug -introspection* -samba {-test} (-doc%)" 716 kB
[ebuild  N    ~]  app-crypt/libsecret-0.15  USE="crypt -debug -introspection {-test} -vala" 474 kB
[nomerge       ] x11-libs/gksu-2.0.2-r1  USE="-doc -gnome" 
[nomerge       ]  x11-libs/libgksu-2.0.12-r1:2  USE="nls -doc -static-libs" 
[ebuild     U ~]   gnome-base/libgnome-keyring-3.6.0 [2.32.0] USE="-debug -introspection% {-test} -vala% (-doc%)" 414 kB
[nomerge       ] app-crypt/libsecret-0.15  USE="crypt -debug -introspection {-test} -vala" 
[nomerge       ]  gnome-base/gnome-keyring-3.6.3 [2.32.1-r1] USE="caps%* pam -debug (-selinux) {-test} (-doc%)" 
[nomerge       ]   app-crypt/gcr-3.6.2:0/1  USE="-debug -introspection {-test}" 
[blocks b      ]    <gnome-base/gnome-keyring-3.3 ("<gnome-base/gnome-keyring-3.3" is blocking app-crypt/gcr-3.6.2)
[ebuild     U ~]     gnome-base/gnome-keyring-3.6.3 [2.32.1-r1] USE="caps%* pam -debug (-selinux) {-test} (-doc%)" 1,116 kB
[ebuild  N    ~]      app-crypt/gcr-3.6.2:0/1  USE="-debug -introspection {-test}" 1,334 kB
[ebuild     U ~]       x11-libs/gtk+-3.6.3-r2:3 [3.4.4:3] USE="X cups introspection* vim-syntax (-aqua) -colord -debug (-egl) -examples (-packagekit) {-test} (-wayland) -xinerama" 12,964 kB
[ebuild  N    ~]        app-accessibility/at-spi2-atk-2.6.2:2  USE="{-test}" 269 kB
[ebuild  N     ]       app-crypt/p11-kit-0.13  USE="-debug" 532 kB
[nomerge       ] net-libs/webkit-gtk-2.0.0:3/25::gentoo [1.8.3-r301:3/3::Local] USE="gstreamer jit spell webgl (-aqua) -coverage -debug -geoloc -introspection {-test} (-doc%) (-webkit2%*)" 
[ebuild  NS    ]  media-libs/gst-plugins-base-1.0.5-r2:1.0 [0.10.36:0.10] USE="X alsa nls ogg orc pango theora vorbis -introspection -ivorbis" 2,297 kB
[ebuild     U  ]  app-accessibility/at-spi2-core-2.6.3:2 [2.2.3:2] USE="-introspection* (-doc%)" 435 kB
[ebuild     U ~]  x11-libs/pango-1.32.5 [1.30.1] USE="X -debug -introspection* (-doc%) (-test%)" 976 kB
[ebuild  N     ]   media-libs/harfbuzz-0.9.12  USE="-static-libs" 866 kB
[ebuild     U #]    dev-libs/glib-2.36.0:2 [2.32.4-r1:2] USE="-debug (-fam) (-selinux) -static-libs -systemtap {-test} -utils -xattr" PYTHON_TARGETS="python2_7%* -python2_5% -python2_6%" 6,356 kB
[nomerge       ] app-crypt/libsecret-0.15  USE="crypt -debug -introspection {-test} -vala" 
[ebuild  N     ]  dev-util/gdbus-codegen-2.32.4  PYTHON_TARGETS="python2_7 python3_2 -python2_5 -python2_6 -python3_1" 0 kB
[nomerge       ] net-libs/webkit-gtk-2.0.0:3/25::gentoo [1.8.3-r301:3/3::Local] USE="gstreamer jit spell webgl (-aqua) -coverage -debug -geoloc -introspection {-test} (-doc%) (-webkit2%*)" 
[ebuild  N     ]  media-libs/libwebp-0.2.1  USE="-experimental -static-libs" 689 kB
[ebuild  NS   ~]  sys-devel/gcc-4.7.2-r1:4.7 [4.6.3:4.6] USE="cxx fortran gtk mudflap nls nptl openmp (-altivec) -doc (-fixed-point) -gcj -go -graphite (-hardened) (-libssp) (-multilib) -multislot -nopie -nossp -objc -objc++ -objc-gc {-test} -vanilla" 40 kB
[blocks B      ] net-libs/libsoup-gnome ("net-libs/libsoup-gnome" is blocking net-libs/libsoup-2.42.0)

Total: 17 packages (8 upgrades, 7 new, 2 in new slots), Size of downloads: 39,062 kB
Conflict: 2 blocks (1 unsatisfied)


^ This looks like an inefficient solution for a one-line source-code bug. Should international users just stick to using their own overlay with the solution patch?
Comment 3 Pacho Ramos gentoo-dev 2013-04-08 17:31:35 UTC
I guess you are referring then to old slot (whose 1.8.x is the latest version), in that case I can try to apply it. 

Is this patch the one works for you?http://trac.webkit.org/changeset/125791/trunk/Source/WebCore/platform/text/gtk/TextCheckerEnchant.cpp?format=diff&new=125791
Comment 4 Walther 2013-04-10 14:39:52 UTC
Yes, exactly. That's the patch that solves this bug. As far as I know, "the old slot" is still what is considered the stable version, so it isn't like I am requesting support for a deprecated package version.
Comment 5 Pacho Ramos gentoo-dev 2013-04-11 20:20:46 UTC
The patch is applied to a file that doesn't exist in 1.8.3 :|
Comment 6 Walther 2013-04-11 20:36:10 UTC
Created attachment 345276 [details, diff]
enchant fix for webkit-1.8.3

Huh, oops. Didn't realize that the patch needed porting. This is the patch I use in my local overlay to correct this problem, for webkit-gtk-1.8.3
Comment 7 Pacho Ramos gentoo-dev 2013-04-11 21:41:39 UTC
+*webkit-gtk-1.8.3-r201 (11 Apr 2013)
+
+  11 Apr 2013; Pacho Ramos <pacho@gentoo.org>
+  +files/webkit-gtk-1.8.3-spellchecker.patch, +webkit-gtk-1.8.3-r201.ebuild:
+  Fix spell checking, bug #447500 by Walther
+
Comment 8 jospezial 2013-04-12 02:04:35 UTC
What the heck is this?

Sorry, but after a long time using Gentoo I have learned, there is a .r200 and a .r300 for webkit-gtk and I dont have to mix them.

webkit-gtk-1.8.3-r200.r1.ebuild would be a silly name I know so there will be no other choice for the naming as you chosed.
Have to like new ebuild names.

just wondering.
anyway, thank you for your bugfixing.
Comment 9 Walther 2013-04-12 05:44:59 UTC
I was always under the impression that the gtk2 and gtk3 slots for webkit-gtk were named -r200 and -r300 exactly to allow revisions in the way of -r201/-r301. It may seem a little dirty, but it was required to allow revisions and the separate slots.

Hence, this patch should also be applied to webkit-gtk-1.8.3-r301.ebuild.
Comment 10 Pacho Ramos gentoo-dev 2013-04-12 06:40:52 UTC
(In reply to comment #9)
> I was always under the impression that the gtk2 and gtk3 slots for
> webkit-gtk were named -r200 and -r300 exactly to allow revisions in the way
> of -r201/-r301. It may seem a little dirty, but it was required to allow
> revisions and the separate slots.
> 

Yes, this is needed to allow both versions installed at the same time

> Hence, this patch should also be applied to webkit-gtk-1.8.3-r301.ebuild.

For people using latest SLOT, please try to use newer webkit-gtk as possible as I am nearly 100% sure 1.8.x versions have some unresolved security bugs that should be solved in newer releases, for example, I have seen two:
https://launchpad.net/ubuntu/raring/+source/webkit/1.10.2-0ubuntu1

The problem is that I haven't tested 1.10.x at all (and probably 2.0.x will also fix some security issues over 1.10.x), then, I doubt about how safe would be to try to stabilize 1.10.x because it needs a libsoup version that need glib-2.34 (that is incompatible with Gnome2 and I haven't tested it at all :S)