Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1017646: scowl: Ship qtwebengine-dictionary binaries

30 views
Skip to first unread message

Soren Stoutner

unread,
Aug 18, 2022, 4:30:03 PM8/18/22
to
Source: scowl
Version: 2020.12.07-2
Severity: wishlist

Qt WebEngine has the ability to spellcheck. It can use Hunspell dictionaries, but they must be compiled into a special binary format that combines the .dic and .aff files into one .bdic file.

https://doc.qt.io/qt-5/qtwebengine-features.html#spellchecker

The .bdic file can be created by the qwebengine_convert_dict utility in the qtwebengine5-dev-tools package.

The .bdic file should be installed in /usr/share/qt5/qtwebengine_dictionaries with a symlink from /usr/share/qt6/qtwebengine_dictionaries. At a future point when Qt6 becomes the default in Debian then the file should be moved to the Qt6 directory with a symlink from the Qt5 directory. When Qt5 is removed from Debian that symlink should be removed as well.

With the .bdic file in that location, any programs that uses Qt WebEngine can include spellchecking functionality.

I thought about creating a separate source package for this, but it seems to make more sense to me to include this as separate binaries in the current scowl package. I am willing to submit a patch and assist with maintining it over time if you would like.

Don Armstrong

unread,
Aug 20, 2022, 7:00:03 PM8/20/22
to
On Thu, 18 Aug 2022, Soren Stoutner wrote:
> I thought about creating a separate source package for this, but it
> seems to make more sense to me to include this as separate binaries in
> the current scowl package. I am willing to submit a patch and assist
> with maintining it over time if you would like.

Yeah, this should definitely be a patch to produce the additional binary
packages [or potentially, the existing binary packages can produce the
combined dictionary files, depending on the relative sizes.]

Is there a naming convention for these packages already?

Thanks!
--
Don Armstrong https://www.donarmstrong.com

Live and learn
or die and teach by example
-- a softer world #625
http://www.asofterworld.com/index.php?id=625

Soren Stoutner

unread,
Aug 20, 2022, 7:30:03 PM8/20/22
to

I am not aware of an existing naming convention, but this is how Arch Linux handled it:


https://archlinux.org/todo/packaging-qtwebengine-dictionaries/


Specifically, here is how their hunspell-de package names the files:


https://archlinux.org/packages/extra/any/hunspell-de/


Note that Arch Linux places the files in usr/share/qt/qtwebengine_dictionaries/ and a symlink from usr/share/qt6/qtwebengine_dictionaries/.  However, on my current Debian testing system the output of qmake -query according to the instructions at <https://doc.qt.io/qt-5/qtwebengine-features.html#spellchecker> indicates the correct directory is /usr/share/qt5/qtwebengine_dictionaries (with the symlink for future compatibility).


~$ qmake -query | grep QT_INSTALL_DATA

QT_INSTALL_DATA:/usr/share/qt5


My personal testing confirms that if if a .bdic file is placed in /usr/share/qt5/qtwebengine_dictionaries any program that uses a Qt WebEngine is able to find it (although the program still has to have code that chooses to use it).


The en_US.bdic that I compiled from the current en_US.dic and en_US.aff is 691.2 KiB.


--

Soren Stoutner

623-262-6169

so...@stoutner.com

signature.asc

Soren Stoutner

unread,
Sep 19, 2022, 6:30:04 PM9/19/22
to

I recently posted in the debian-kde list about packaging the Qt WebEngine dictionaries to see if there was any preference about how they should be named or where the files should be located.  So far there have not been any comments.


https://lists.debian.org/debian-kde/2022/09/msg00011.html


If you would like I could attempt to create a patch to enable the building of these files.  I am new to Debian packaging, but I have been reading over the documentation and have some idea of how to put it together.

signature.asc

Don Armstrong

unread,
Sep 19, 2022, 7:40:03 PM9/19/22
to
Control: tag -1 patch pending

On Mon, 19 Sep 2022, Soren Stoutner wrote:
> I recently posted in the debian-kde list about packaging the Qt WebEngine dictionaries to
> see if there was any preference about how they should be named or where the files should
> be located. So far there have not been any comments.
>
> https://lists.debian.org/debian-kde/2022/09/msg00011.html[1]
>
> If you would like I could attempt to create a patch to enable the building of these files. I
> am new to Debian packaging, but I have been reading over the documentation and have
> some idea of how to put it together.

Since the files in question are small, I think just including them and
appropriate symlinks should be sufficient.

Here's the patch which does that.

--
Don Armstrong https://www.donarmstrong.com

If I had a letter, sealed it in a locked vault and hid the vault
somewhere in New York. Then told you to read the letter, thats not
security, thats obscurity. If I made a letter, sealed it in a vault,
gave you the blueprints of the vault, the combinations of 1000 other
vaults, access to the best lock smiths in the world, then told you to
read the letter, and you still can't, thats security.
-- Bruce Schneier
hunspell_qt_bdic.diff

Soren Stoutner

unread,
Sep 20, 2022, 4:50:04 PM9/20/22
to

As Rene Engelhard <re...@debian.org> objects to the placement of the .bdic files in /usr/share/hunspell, and because it would generally be a good idea to include as many Hunspell maintainers as possible and document the consensus in a central location as to how these dictionaries should be packaged, I have created a bug report against dictionaries-common at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1020387 .  It would probably be a good idea to hold off on uploading these changes until that consensus is reached.

signature.asc

Soren Stoutner

unread,
Mar 11, 2023, 12:30:05 PM3/11/23
to
Don,

I think we have finally reached a stage where we are ready to implement this.

To make things simpler for the packagers, we are using a virtual package and
an unversioned path for the conversion tool so that language packagers don’t
have to make modifications to their packages when the versions of Qt change in
Debian.

All you should need to do is the following:

1. Build-depends on `convert-bdic`.
2. Use /usr/bin/convert-bdic to do the dictionary conversion.
3. Place the .bdic files in /usr/share/hunspell-bdic.

Thanks,

Soren

--
Soren Stoutner
so...@stoutner.com
signature.asc

Soren Stoutner

unread,
Aug 5, 2023, 5:30:06 PM8/5/23
to
Would you be interested in a patch to implement this functionality?

--
Soren Stoutner
so...@stoutner.com
signature.asc
0 new messages