LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   All Things KDE5/Plasma for Slackware Users. (https://www.linuxquestions.org/questions/slackware-14/all-things-kde5-plasma-for-slackware-users-4175670109/)

richarson 08-08-2021 11:33 AM

WARNING: if you're using akonadi don't upgrade MariaDB
 
Quote:

Originally Posted by richarson (Post 6273428)
There might be a bug or incompatibility between akonadi and MariaDB 10.6.4.

I have upgraded and now kmail is broken.

In akonadi logs I see errors like this:

DB error: "Incorrect datetime value: '2021-08-07T22:52:47Z' for column `akonadi`.`pimitemtable`.`atime` at row 1"

There might be a mysqld option to avoid this issue but I haven't found it yet.

I opened https://bugs.kde.org/show_bug.cgi?id=440717 to make the developers aware.

Upstream (Qt) bug:

https://bugreports.qt.io/browse/QTBUG-95071

ZhaoLin1457 08-08-2021 11:52 AM

Quote:

Originally Posted by richarson (Post 6273577)

But, isn't EOL the Qt-5.15.x with the entire Qt5 series?

Where will be this Qt bug fixed? On Qt6?

How this would help us with Plasma5, even they will fix the bug on Qt6?

atelszewski 08-08-2021 12:03 PM

Hi,

Quote:

Originally Posted by ZhaoLin1457 (Post 6273584)
Where will be this Qt bug fixed? On Qt6?

meh, if need be, we'll fix it on our own. ;-)

--
Best regards,
Andrzej Telszewski

richarson 08-08-2021 03:06 PM

I had already done a mysql_upgrade and akonadi's mysqld wouldn't start, so in case this helps other people with a broken akonadi, here's what I did (YMMV):


- Under "[mysqld]" in ~/.local/share/akonadi/mysql.conf I added:
Code:

"innodb_force_recovery = 2"
- Made sure it and akonadi were not running, and started mysqld with:
Code:

/usr/libexec/mysqld --defaults-file=/home/myuser/.local/share/akonadi/mysql.conf --datadir=/home/myuser/.local/share/akonadi/db_data/ --socket=/run/user/1000/akonadi/mysql.socket --pid-file=/run/user/1000/akonadi/mysql.pid &
- Then I backed up akonadi's DB and deleted it after:
Code:

mysqldump -Q --socket=/run/user/1000/akonadi/mysql.socket --add-drop-table akonadi > akonadi.sql
mysql--socket=/run/user/1000/akonadi/mysql.socket -e "DROP DATABASE akonadi"

- Stoped mysql:
Code:

mysqladmin -Q --socket=/run/user/1000/akonadi/mysql.socket shutdown
- Downgraded MariaDB 10.6.4 to 10.5.11 and started akonadi to recreate its database:
Code:

akonadictl start
- After a few seconds I stopped akonadi and restored the SQL dump:
Code:

akonadictl start
/usr/libexec/mysqld --defaults-file=/home/myuser/.local/share/akonadi/mysql.conf --datadir=/home/myuser/.local/share/akonadi/db_data/ --socket=/run/user/1000/akonadi/mysql.socket --pid-file=/run/user/1000/akonadi/mysql.pid &
mysql --socket=/run/user/1000/akonadi/mysql.socket -e akonadi < akonadi.sql

- Shut down mysql, started akonadi again:
Code:

mysqladmin -Q --socket=/run/user/1000/akonadi/mysql.socket shutdown
akonadictl start

- Started kmail and everything looks good so far!


(Before trying all of this , out of caution, I made a backup of my mail folder and everything related to akonadi and kmail I found under ~/.cache/, ~/.config/ and ~/.local/)

richarson 08-08-2021 03:08 PM

Quote:

Originally Posted by ZhaoLin1457 (Post 6273584)
But, isn't EOL the Qt-5.15.x with the entire Qt5 series?

Where will be this Qt bug fixed? On Qt6?

How this would help us with Plasma5, even they will fix the bug on Qt6?

The Qt company still maintains Qt 5.15 but only for paying customers, KDE "forked" it and applies the patches on top of it:

https://community.kde.org/Qt5PatchCollection

Quote:

Originally Posted by atelszewski (Post 6273587)
Hi,

meh, if need be, we'll fix it on our own. ;-)

--
Best regards,
Andrzej Telszewski

If the official fix is only for Qt 6 (unlikely since this migh affect their paying customers), I'm sure the KDE people will backport it to their copy of Qt 5.15.

jkh2cpu 08-09-2021 04:01 PM

So is this going to be fixed, or will I need to do-it-by-myself so that kmail works again? If I and others need to do it ourselves, will there be a nice set of instructions?

Right now I'm getting these messages: Unable to store downloaded mails. Failed to append item.

John.

richarson 08-09-2021 04:34 PM

Quote:

Originally Posted by jkh2cpu (Post 6273951)
So is this going to be fixed, or will I need to do-it-by-myself so that kmail works again? If I and others need to do it ourselves, will there be a nice set of instructions?

Right now I'm getting these messages: Unable to store downloaded mails. Failed to append item.

John.

I think it will be fixed, but since this appears to affect other software besides akonadi/kmail I think downgrading MariaDB to 10.5.x would be the best option for now.

If you didn'y execute mysql_upgrade, I think downgrading MariaDB and restarting akonadi should be enough.

Otherwise you can follow my instructions above to recover.

You can find older versions of Slackware packages in certain mirrors, like http://slackware.uk/cumulative/, e.g. for 64-current:
http://slackware.uk/cumulative/slack...1-x86_64-1.txz

HTH

atelszewski 08-09-2021 04:52 PM

Hi,

you prompted me to take a look at Qt5PatchCollection.

The number of patches they have there against 5.15.2 is pretty impressive.

I tried applying patches for qtbase and qtwayland to Slackware's Qt 5.15.2 sources and they apply cleanly - what a pleasent surprise. :-)

That's probably something that Pat should consider.

If you want to try it on your own, it takes something like that:

Code:

$ cwd=$(pwd)
$ git clone https://invent.kde.org/qt/qt/qtbase.git
$ tar -xf qt-everywhere-src-5.15.2.tar.xz
$ cd qt-everywhere-src-5.15.2
$ cd qtbase
$ (cd ${cwd}/qtbase && git diff origin/5.15.2..origin/kde/5.15) | patch -p1

If you want to see what files were changed by KDE team comparing to upstream 5.15.2:
Code:

# This is for qtwayland:

$ git clone https://invent.kde.org/qt/qt/qtwayland.git
$ cd qtwayland
$ git diff --name-only origin/5.15.2 origin/kde/5.15
.qmake.conf
src/client/global/qwaylandclientextension.cpp
src/client/global/qwaylandclientextension.h
src/client/global/qwaylandclientextension_p.h
src/client/qwaylandabstractdecoration.cpp
src/client/qwaylanddatadevice.cpp
src/client/qwaylanddisplay.cpp
src/client/qwaylanddisplay_p.h
src/client/qwaylandinputcontext.cpp
src/client/qwaylandinputcontext_p.h
src/client/qwaylandinputdevice.cpp
src/client/qwaylandintegration.cpp
src/client/qwaylandintegration_p.h
src/client/qwaylandscreen.cpp
src/client/qwaylandscreen_p.h
src/client/qwaylandwindow.cpp
src/compositor/compositor_api/qwaylandquickcompositor.cpp
src/compositor/compositor_api/qwaylandquickitem.cpp
src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h
src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h
src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp
src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp
src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp
src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
src/qtwaylandscanner/qtwaylandscanner.cpp
tests/auto/client/surface/tst_surface.cpp
tests/auto/client/xdgshell/tst_xdgshell.cpp

There's quite some stuff going on!

--

Best regards,
Andrzej Telszewski

USUARIONUEVO 08-09-2021 05:08 PM

There is a clean patch , from archlinux

https://raw.githubusercontent.com/ar...adb-10.6.patch

richarson 08-09-2021 05:16 PM

Official bug fix:

https://codereview.qt-project.org/c/qt/qtbase/+/363880

From the gerrit patch:

Quote:

Pick-to: 5.15 6.2

richarson 08-09-2021 05:19 PM

Quote:

Originally Posted by USUARIONUEVO (Post 6273967)
There is a clean patch , from archlinux

https://raw.githubusercontent.com/ar...adb-10.6.patch

I don't think that's a proper fix:

Code:

-    if (mysql_get_client_version() >= 50503 && mysql_get_server_version(d->mysql) >= 50503) {
+    if (true) {

But since it's unlikely that users of Arch (or Slackware for that matter) will use a version of mariadb/mysql < 5.x I think it should work :)

USUARIONUEVO 08-09-2021 05:19 PM

Quote:

Originally Posted by richarson (Post 6273972)
Official bug fix:

https://codereview.qt-project.org/c/qt/qtbase/+/363880

From the gerrit patch:

I post up a clean patch.

USUARIONUEVO 08-09-2021 05:20 PM

Quote:

Originally Posted by richarson (Post 6273973)
I don't think that's a proper fix:

Code:

-    if (mysql_get_client_version() >= 50503 && mysql_get_server_version(d->mysql) >= 50503) {
+    if (true) {

But since it's unlikely that users of Arch (or Slackware for that matter) will use a version of mariadb/mysql < 5.x I think it should work :)

you say archlinux are making wrong fix ?

I seriously doubt.

There is the build kit from arch , for qt5-base (for investigation purpouse)
https://github.com/archlinux/svntogi...qt5-base/trunk

richarson 08-09-2021 05:21 PM

Quote:

Originally Posted by atelszewski (Post 6273963)
Hi,

you prompted me to take a look at Qt5PatchCollection.

The number of patches they have there against 5.15.2 is pretty impressive.

I tried applying patches for qtbase and qtwayland to Slackware's Qt 5.15.2 sources and they apply cleanly - what a pleasent surprise. :-)

That's probably something that Pat should consider.

[...]

There's quite some stuff going on!

--

Best regards,
Andrzej Telszewski

Yep, I assumed Pat alredy used this patchset, maybe we should point it out in the "Requests for -current" thread.

richarson 08-09-2021 05:25 PM

Quote:

Originally Posted by USUARIONUEVO (Post 6273975)
you say archlinux are making wrong fix ?

I seriously doubt.

It's a technically wrong fix because they don't check the server version anymore.

If you use Qt with that patch against an older mysql/mariadb server which doesn't support newer functionality, it's going to break.

But as I also said, it might be a non-issue:

Quote:

But since it's unlikely that users of Arch (or Slackware for that matter) will use a version of mariadb/mysql < 5.x I think it should work :)
Cheers,


All times are GMT -5. The time now is 03:51 AM.