Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kdeApplications: Use latest qt515 by default #101369

Merged
merged 18 commits into from Nov 1, 2020

Conversation

@doronbehar
Copy link
Contributor

@doronbehar doronbehar commented Oct 22, 2020

Motivation for this change

Fix #100707 , Fix #102167 , Fix #100854 , Fix #98268. (cc @ttuegel ).

Things done
  • Iterate all qt applications affected and make sure they work.

In order to do that, before building, one can verify whether incompatible versions are used using the following steps:

  1. Download this script: https://paste.sr.ht/~jorsn/307bd7a99855c7d6f34923ebe2f41a9f2d0f6f8a and save it as dep-ver-consistent.nix.
  2. Run the following to test for incompatible versions with $pkg substituted for the attribute path you want to test:
$(nix-build --no-out-link -A nixUnstable)/bin/nix eval --impure  --expr \
  'with import ./. {}; import ./dep-ver-consistent.nix lib false 4 "qtbase" '$pkg

You can use 1 or 2 or any other number instead of 4 in the command above to adjust the depth for which inputs of inputs will be checked. The command will print true if no issues are found, and false + a trace, if there _are _ incompatible qt versions used.

Given a list of attributes in a file you can iterate them all with:

cat broken-for-sure | while read pkg; do
 $(nix-build --no-out-link -A nixUnstable)/bin/nix eval --impure --expr 'with import ./. {}; import ./dep-ver-consistent.nix lib false 4 "qtbase" '$pkg
done

I think all of affected packages now have no mismatched versions used together, up to depth 4. Upcoming ofborg evals may tell differently.

Here's the current list of affected packages, kdeFrameworks. and kdeApplications. prefixes were cut in favor of maintaining uniqueness.

  • akonadi
  • akonadi-calendar
  • akonadiconsole
  • akonadi-contacts
  • akonadi-import-wizard
  • akonadi-mime
  • akonadi-notes
  • akonadi-search
  • akregator
  • alkimia
  • amarok
  • amarok-kf5
  • antimicroX
  • ark
  • attica
  • baloo
  • baloo-widgets
  • bcompare
  • bluedevil
  • bluez-qt
  • bomber
  • bovo
  • breeze-gtk
  • breeze-icons
  • breeze-plymouth
  • breeze-qt5
  • calamares
  • calendarsupport
  • calligra
  • colord-kde
  • digikam
  • discover
  • dolphin
  • dolphin-plugins
  • dragon
  • drawpile
  • drawpile-server-headless
  • elisa
  • espanso
  • eventviews
  • extra-cmake-modules
  • falkon
  • fcitx
  • fcitx-configtool
  • fcitx-engines.anthy
  • fcitx-engines.chewing
  • fcitx-engines.cloudpinyin
  • fcitx-engines.hangul
  • fcitx-engines.libpinyin
  • fcitx-engines.m17n
  • fcitx-engines.mozc
  • fcitx-engines.rime
  • fcitx-engines.skk
  • fcitx-engines.table-extra
  • fcitx-engines.table-other
  • fcitx-engines.unikey
  • fcitx-qt5
  • ffmpegthumbs
  • filelight
  • flat-remix-icon-theme
  • frameworkintegration
  • gmic-qt-krita
  • granatier
  • grantleetheme
  • gwenview
  • heaptrack
  • hotspot
  • incidenceeditor
  • k3b
  • k4dirstat
  • k9copy
  • kactivities
  • kactivities-stats
  • kactivitymanagerd
  • kaddressbook
  • kalarm
  • kalarmcal
  • kalzium
  • kapidox
  • kapman
  • kapptemplate
  • karchive
  • kate
  • katomic
  • kauth
  • kblackbox
  • kblocks
  • kbookmarks
  • kbounce
  • kbreakout
  • kcachegrind
  • kcalc
  • kcalendarcore
  • kcalutils
  • kcharselect
  • kcmutils
  • kcodecs
  • kcolorchooser
  • kcompletion
  • kconfig
  • kconfigwidgets
  • kcontacts
  • kcoreaddons
  • kcrash
  • kdav
  • kdb
  • kdbg
  • kdbusaddons
  • kde2-decoration
  • kdebugsettings
  • kdeclarative
  • kde-cli-tools
  • kdeconnect
  • kdecoration
  • kded
  • kdegraphics-mobipocket
  • kdegraphics-thumbnailers
  • kde-gtk-config
  • kdelibs4support
  • kdenetwork-filesharing
  • kdenlive
  • kdepim-addons
  • kdepim-apps-libs
  • kdepim-runtime
  • kdeplasma-addons
  • kdesignerplugin
  • kdesu
  • kdevelop
  • kdevelop-pg-qt
  • kdevelop-unwrapped
  • kdev-php
  • kdev-python
  • kdewebkit
  • kdf
  • kdiagram
  • kdialog
  • kdiamond
  • kdiff3
  • kdnssd
  • kdoctools
  • keditbookmarks
  • kemoticons
  • kexi
  • keysmith
  • kf5gpgmepp
  • kfilemetadata
  • kfind
  • kfloppy
  • kgamma5
  • kgeography
  • kget
  • kglobalaccel
  • kgpg
  • kgraphviewer
  • kguiaddons
  • khelpcenter
  • kholidays
  • khotkeys
  • khtml
  • ki18n
  • kiconthemes
  • kid3
  • kidentitymanagement
  • kidletime
  • kig
  • kigo
  • kile
  • killbots
  • kimageformats
  • kimap
  • kinfocenter
  • kinit
  • kio
  • kio-extras
  • kipi-plugins
  • kirigami2
  • kitemmodels
  • kitemviews
  • kitinerary
  • kjobwidgets
  • kjs
  • kjsembed
  • kldap
  • kleopatra
  • klettres
  • klines
  • kmag
  • kmahjongg
  • kmail
  • kmail-account-wizard
  • kmailtransport
  • kmbox
  • kmediaplayer
  • kmenuedit
  • kmime
  • kmines
  • kmix
  • kmplayer
  • kmplot
  • kmymoney
  • knavalbattle
  • knetwalk
  • knewstuff
  • knights
  • knotes
  • knotifications
  • knotifyconfig
  • kolf
  • kollision
  • kolourpaint
  • kompare
  • konqueror
  • konquest
  • konsole
  • kontact
  • kontactinterface
  • konversation
  • korganizer
  • kpackage
  • kparts
  • kpat
  • kpeople
  • kpeoplevcard
  • kpimtextedit
  • kpkpass
  • kplotting
  • kpmcore
  • kproperty
  • kpty
  • kpurpose
  • kqtquickcharts
  • kquickcharts
  • krdc
  • krename
  • kreport
  • kreversi
  • krfb
  • krita
  • krohnkite
  • kronometer
  • kross
  • kruler
  • krunner
  • krunner-pass
  • krusader
  • kscreen
  • kscreenlocker
  • kservice
  • kshisen
  • ksmoothdock
  • ksmtp
  • kspaceduel
  • ksquares
  • ksshaskpass
  • kstars
  • ksudoku
  • ksysguard
  • ksystemlog
  • kteatime
  • ktexteditor
  • ktextwidgets
  • ktimer
  • ktimetracker
  • ktnef
  • ktorrent
  • ktouch
  • kturtle
  • kunitconversion
  • kwallet
  • kwalletcli
  • kwalletmanager
  • kwallet-pam
  • kwave
  • kwayland
  • kwayland-integration
  • kwidgetsaddons
  • kwin
  • kwindowsystem
  • kwin-dynamic-workspaces
  • kwin-tiling
  • kwrited
  • kxmlgui
  • kxmlrpcclient
  • latte-dock
  • libgravatar
  • libkcddb
  • libkdcraw
  • libkdegames
  • libkdepim
  • libkexiv2
  • libkgapi
  • libkipi
  • libkleo
  • libkmahjongg
  • libkomparediff2
  • libksane
  • libkscreen
  • libksieve
  • libksysguard
  • libktorrent
  • libqtav
  • libreoffice-qt
  • luna-icons
  • lxqt.lxqt-config
  • maia-icon-theme
  • mailcommon
  • mailimporter
  • marble
  • massif-visualizer
  • mbox-importer
  • messagelib
  • milou
  • minitube
  • minuet
  • mlterm
  • modemmanager-qt
  • networkmanager-qt
  • okteta
  • okular
  • oxygen
  • oxygen-icons5
  • papirus-icon-theme
  • papirus-maia-icon-theme
  • partition-manager
  • peruse
  • phonon
  • phonon-backend-gstreamer
  • phonon-backend-vlc
  • photoqt
  • picmi
  • pimcommon
  • pim-data-exporter
  • pim-sieve-editor
  • plasma-applet-caffeine-plus
  • plasma-applet-volumewin7mixer
  • plasma-browser-integration
  • plasma-desktop
  • plasma-framework
  • plasma-integration
  • plasma-nm
  • plasma-pa
  • plasma-vault
  • plasma-wayland-protocols
  • plasma-workspace
  • plasma-workspace-wallpapers
  • playbar2
  • polkit-kde-agent
  • pop-icon-theme
  • powerdevil
  • print-manager
  • prison
  • pulseaudio-qt
  • qqc2-desktop-style
  • qstopmotion
  • qtcurve
  • quassel
  • quasselClient
  • redshift-plasma-applet
  • rocs
  • rsibreak
  • sddm
  • sddm-kcm
  • skanlite
  • skrooge
  • solid
  • sonnet
  • soundkonverter
  • spectacle
  • syncthingtray
  • syndication
  • syntax-highlighting
  • systemsettings
  • tellico
  • threadweaver
  • tora
  • trojita
  • user-manager
  • virt-manager-qt
  • wacomtablet
  • x2goclient
  • xdg-desktop-portal-kde
  • yakuake
  • zafiro-icons
  • zanshin
  • zeal
  • zombietrackergps
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@doronbehar
Copy link
Contributor Author

@doronbehar doronbehar commented Oct 23, 2020

The list above was filtered from the original ofborg eval gist with:

curl -Ls 'https://gist.githubusercontent.com/GrahamcOfBorg/851d243bb3123e5c5985f1ffcbf2c64c/raw/2977e56f16ed4da57f125099736af2198bcccfaa/Changed%2520Paths' | awk '{sub(/(libsForQt5.?.?|kde(Applications|Frameworks)|plasma5)\./, "", $2); print "   - [ ] "$2}' | sort -u | wlc```

doronbehar added a commit to doronbehar/nixpkgs that referenced this issue Oct 23, 2020
Make sure only compatible qt versions are used for it (NixOS#101369) -
kdeFrameworks is always using `libsForQt5` where e.g
`libsForQt514.kpmcore` would have otherwise used a kio compiled with
qt515.
doronbehar added a commit to doronbehar/nixpkgs that referenced this issue Oct 23, 2020
Part of NixOS#101369: In order to avoid packages using the default `kdesu`
always built with qt515, we put it in scope only for packages defined
with a `libsForQt5`, to avoid incompatible qt versions used together in
inputs of a package.
doronbehar added a commit to doronbehar/nixpkgs that referenced this issue Oct 23, 2020
Part of NixOS#101369: Every attribute from kdeApplications and kdeFrameworks
can be built with a few different qt5 versions. Previously, some
applications that were defined with `libsForQt5.callPackage` used
libraries from the kde* sets compiled with a specific qt5 version, due
to `inherit (kde*) <lib>;` used in the widest scope, or inside the { }
of the applications' `libsForQt5.callPackage`. This can lead to
potential mismatched qt versions used in the same inputs.

Hence, we added to the all libsForQt5* sets, packages that will be used
from the correct libsForQt5 set, in accordance to the
`libsForQt5*.callPackage` used.

Slightly different then the change above, was `kf5gpgmepp` which moved
to all of libsForQt5's sets, to avoid potential mismatched qt5 version
used together in other applications (notably "tellico").
doronbehar added a commit to doronbehar/nixpkgs that referenced this issue Oct 23, 2020
@doronbehar doronbehar force-pushed the pkg/kdeApplications/qt515 branch 2 times, most recently from 80d8558 to 2de9cf7 Oct 23, 2020
doronbehar added a commit to doronbehar/nixpkgs that referenced this issue Oct 23, 2020
Make sure only compatible qt versions are used for it (NixOS#101369) -
kdeFrameworks is always using `libsForQt5` where e.g
`libsForQt514.kpmcore` would have otherwise used a kio compiled with
qt515.
doronbehar added a commit to doronbehar/nixpkgs that referenced this issue Oct 23, 2020
Part of NixOS#101369: In order to avoid packages using the default `kdesu`
always built with qt515, we put it in scope only for packages defined
with a `libsForQt5`, to avoid incompatible qt versions used together in
inputs of a package.
doronbehar added a commit to doronbehar/nixpkgs that referenced this issue Oct 23, 2020
Part of NixOS#101369: Every attribute from kdeApplications and kdeFrameworks
can be built with a few different qt5 versions. Previously, some
applications that were defined with `libsForQt5.callPackage` used
libraries from the kde* sets compiled with a specific qt5 version, due
to `inherit (kde*) <lib>;` used in the widest scope, or inside the { }
of the applications' `libsForQt5.callPackage`. This can lead to
potential mismatched qt versions used in the same inputs.

Hence, we added to the all libsForQt5* sets, packages that will be used
from the correct libsForQt5 set, in accordance to the
`libsForQt5*.callPackage` used.

Slightly different then the change above, was `kf5gpgmepp` which moved
to all of libsForQt5's sets, to avoid potential mismatched qt5 version
used together in other applications (notably "tellico").
doronbehar added a commit to doronbehar/nixpkgs that referenced this issue Oct 23, 2020
@doronbehar
Copy link
Contributor Author

@doronbehar doronbehar commented Oct 23, 2020

All of the above now don't use mixed qt versions.

@nixos-discourse
Copy link

@nixos-discourse nixos-discourse commented Oct 23, 2020

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/456-potentially-broken-qt-applications-libraries-need-your-help/9609/1

@doronbehar
Copy link
Contributor Author

@doronbehar doronbehar commented Oct 23, 2020

From kile, I get:

ZENIX-selection-2020-10-23T10:34:35+03:00

I wonder if it means it's broken or it's just because I don't use kde. cc @piegamesde .

@doronbehar doronbehar force-pushed the pkg/kdeApplications/qt515 branch from 142cb37 to 09fd427 Oct 30, 2020
Use fetchFromGitLab as it seems to be unavailable in the previous url.
@FRidh
Copy link
Member

@FRidh FRidh commented Nov 1, 2020

Just a note for myself.

The following is the KDE Plasma release schedule https://community.kde.org/Schedules/Plasma_5#Support_status_by_Release_Series.

We currently have:

  • Qt 5.15.0 (and 5.15.1 with #102216)
  • Frameworks 5.73.0
  • Plasma 5.18.5
  • Applications 20.08.2

@FRidh
Copy link
Member

@FRidh FRidh commented Nov 1, 2020

@doronbehar the kdeconnect revert got removed

edit: nevermind, it got moved as it should

@FRidh FRidh mentioned this pull request Nov 1, 2020
10 tasks
@FRidh
Copy link
Member

@FRidh FRidh commented Nov 1, 2020

My system is running on this PR now without issues.

@FRidh FRidh merged commit 54f7498 into NixOS:master Nov 1, 2020
19 of 20 checks passed
19 of 20 checks passed
@github-actions[bot]
tests
Details
@github-actions[bot]
action
Details
@ofborg[bot]
kile, kile.passthru.tests, lxqt.compton-conf, lxqt.compton-conf.passthru.tests, maia-icon-theme, maia-icon-theme.passthru.tests, tellico, tellico.passthru.tests on x86_64-darwin
Details
@ofborg[bot]
Evaluation Performance Report Evaluator Performance Report
Details
@github-actions[bot]
Wait for ofborg
Details
@ofborg[bot]
grahamcofborg-eval ^.^!
Details
@ofborg[bot]
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
@ofborg[bot]
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
@ofborg[bot]
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="35078d9"; rev="35078d9918d3c628fa136a2845b8561535ba09eb"; } ./pkgs/t
Details
@ofborg[bot]
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
@ofborg[bot]
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="35078d9"; rev="35078d9918d3c628fa136a2845b8561535ba09eb"; } ./nixos/
Details
@ofborg[bot]
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="35078d9"; rev="35078d9918d3c628fa136a2845b8561535ba09eb"; } ./nixos/
Details
@ofborg[bot]
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="35078d9"; rev="35078d9918d3c628fa136a2845b8561535ba09eb"; } ./nixos/
Details
@ofborg[bot]
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="35078d9"; rev="35078d9918d3c628fa136a2845b8561535ba09eb"; } ./pkgs/t
Details
@ofborg[bot]
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="35078d9"; rev="35078d9918d3c628fa136a2845b8561535ba09eb"; } ./pkgs/t
Details
@ofborg[bot]
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="35078d9"; rev="35078d9918d3c628fa136a2845b8561535ba09eb"; } ./pkgs/t
Details
@ofborg[bot]
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
@ofborg[bot]
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@ofborg[bot]
kile, kile.passthru.tests, lxqt.compton-conf, lxqt.compton-conf.passthru.tests, maia-icon-theme, maia-icon-theme.passthru.tests, tellico, tellico.passthru.tests on aarch64-linux Success
Details
@ofborg[bot]
kile, kile.passthru.tests, lxqt.compton-conf, lxqt.compton-conf.passthru.tests, maia-icon-theme, maia-icon-theme.passthru.tests, tellico, tellico.passthru.tests on x86_64-linux Success
Details
FRidh added a commit to FRidh/nixpkgs that referenced this issue Nov 1, 2020
Backport of the PR NixOS#101369.
All commits have been squashed, and other minor changes were made as
well to align the state of 20.09 with that of master.
@FRidh
Copy link
Member

@FRidh FRidh commented Nov 1, 2020

Backport PR #102347

FRidh added a commit to FRidh/nixpkgs that referenced this issue Nov 1, 2020
Backport of the PR NixOS#101369.
All commits have been squashed, and other minor changes were made as
well to align the state of 20.09 with that of master.
FRidh added a commit to FRidh/nixpkgs that referenced this issue Nov 1, 2020
Backport of the PR NixOS#101369.
All commits have been squashed, and other minor changes were made as
well to align the state of 20.09 with that of master.
@FRidh
Copy link
Member

@FRidh FRidh commented Nov 1, 2020

Looking at it again, I think we may have gone too far regarding using aliases here. The applications should still be available from all-packages.nix, as long as the dependencies of each application are consistent.

@doronbehar
Copy link
Contributor Author

@doronbehar doronbehar commented Nov 1, 2020

Looking at it again, I think we may have gone too far regarding using aliases here. The applications should still be available from all-packages.nix, as long as the dependencies of each application are consistent.

I disagree. The issue is also explained in the commit message of b5c6505 - many attributes in kdeApplications are also used as inputs to other applications that use libsForQt5.callPackage, and are not part of that set. If we (at least in the meantime) don't use a qt-applications.nix, we can never be sure that inheriting them in all-packages.nix will not cause trouble to packages using these "applications" as inputs.

I guess we (I) could have filtered out what was aliased and what was inherited by inspecting each attribute in kdeApplications and check whether it is used as an input or not in any packages, but I concluded it'd be best to alias all of them, to put us as far as possible from this potential issue.

@ajs124
Copy link
Member

@ajs124 ajs124 commented Nov 5, 2020

Hm, this breaks building systems with services.xserver.desktopManager.plasma5.enable = true; and nixpkgs.config.allowAliases = false;.

@alapshin alapshin mentioned this pull request Nov 7, 2020
10 tasks
@FRidh
Copy link
Member

@FRidh FRidh commented Nov 7, 2020

Nice those undocumented options to Nixpkgs.

Aside from documenting this option, we should also pass it as false in make-test-python.nix. Basically, everywhere we import Nixpkgs from with Nixpkgs it should be false.

@FRidh FRidh mentioned this pull request Nov 7, 2020
10 tasks
jtojnar added a commit that referenced this issue Nov 9, 2020
@erictapen
Copy link
Member

@erictapen erictapen commented Jan 14, 2021

At first glance this looks to me as backported successfully in #102347.
Will remove the needs: port to stable then. Feel free to readd it if there is something missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment