Hello,
It's been a while since my last post. I wanted to share today something really interesting that happened to me while upgrading my Fedora OS from version 40 to 42 (latest). Back few yours ago I was heavily using Desktop called Deepin (https://www.deepin.org/en/dde/), and before switching to Plasma KDE, I have never noticed how much you depend on tools that each desktop has. This tool is deepin-editor.
https://github.com/linuxdeepin/deepin-editor
Why I like it? What is differences between that tool and others? My answer is honestly I do not know, maybe I got used to it so much that it matters to me and I want to keep it (Keeper).
So story begins I've tried to upgrade my Fedora 40, but sadly dnf upgrade gave me error related to deepin-terminal and deepin-editor :(
Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Transaction test error:
file /usr/share/deepin-terminal/translations/deepin-terminal_az.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_bo.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_br.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_ca.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_cs.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_de.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_el.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_es.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_fi.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_fr.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_gl_ES.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_hi_IN.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_hr.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_hu.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_id.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_it.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_ko.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_ms.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_nl.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_pl.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_pt.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_pt_BR.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_ro.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_ru.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_sq.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_sr.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_tr.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_ug.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_uk.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_zh_HK.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
file /usr/share/deepin-terminal/translations/deepin-terminal_zh_TW.qm from install of deepin-terminal-6.0.15-1.fc42.x86_64 conflicts with file from package deepin-terminal-data-6.0.14-2.fc40.noarch
Another one after I've removed deepin-terminal-data...
So I had to:
dnf remove deepin-terminal deepin-terminal-data deepin-editor
Yay! Error is gone, but my favorite editor is gone as well... :(
After 15-20 minutes my fresh Fedora 42 booted, I've went again to terminal:
dnf install deepin-editor
Breakdown is:
Installed: qt5-qtbase-5.15.16-2.fc42.x86_64
Required by: deepin-editor-6.5.4-1.fc42.x86_64 → qt5-qtbase = 5.15.15 ❌
Oh boy, so qt5 went to 5.15.16-2 in Fedora 42, but my poor old deepin-editor still requires 5.15.15
Started to explore if there is any "fix" or "workaround" on fedora pages, but nothing reported so far. Probably use of this tool is so low that nobody cares to be honest :)
I've decided to go my way... as always... going to rebuild RPM, fix this and have my own personal Deepin Editor tweaked.
1) Get the source RPM:
dnf download --source deepin-editor
2) Install RPM build tools:
sudo dnf install rpmdevtools
rpmdev-setuptree
3) Extract and edit the .spec:
rpm -ivh deepin-editor*.src.rpm
cd ~/rpmbuild/SPECS
Now, I now proper way would be to extract ~/rpmbuild/SOURCES tar archive, cp directory to something like .orig, edit original directory and then just create a patch using diff, for example creating a patch:
cd ~/rpmbuild/SOURCES
diff -uNr deepin-editor-6.5.4.orig deepin-editor-6.5.4 > fix-qstring-null.patch
Since initially when you run following command without any tweak, the core problem why this all is happening is that qt5 5.15 this was used:
QString::null
Now, it has to be changed to the following:
QString()
That's it! Damn.... that must be an easy fix right? Well, let's continue. I've decided to just untar archive within ~/rpmbuild/SOURCES directory, make an edits... yep cowboy... and good to go...
cd ~/rpmbuild/SOURCES
grep -R "QString::null"
You will see which files needs to be edited, I will list them here:
src/controls/tabbar.h (two places)
src/common/settings.h
tests/src/common/ut_utils.cpp
Open each file and change everywhere you find QString::null to Qstring()
Navigate to the /root/rpmbuild/SOURCES/deepin-editor-6.5.4 directory and let's modify CMakeLists.txt file:
Find following:
set(CMAKE_CXX_STANDARD 11)
and change it to C++17
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON)
After editing the file, re-create the archive and re-run:
rpmbuild -ba SPECS/deepin-editor.spec
You will see message that build completes, and now it is ready to install your freshly customized package:
rpm -ivh /root/rpmbuild/RPMS/x86_64/deepin-editor-6.5.4-1.fc42.x86_64.rpm
Job done! Time to test!
Great work, now you have ideas how to customized ready made RPM packages. Good luck! Hope this helps.