-
-
Notifications
You must be signed in to change notification settings - Fork 14k
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
mir: init at 2.11.0 #207534
mir: init at 2.11.0 #207534
Conversation
Somewhat related: |
d4d86a3
to
67f0e49
Compare
This PR rebuilds a lot of packages which means we must target staging. Please follow the contributing guide to not potentially ping a lot of people. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into continuing the Lomiri stuff 😄! Some feedback on the Mir packaging here:
It's not of a high priority but there may be some docs that could be built:
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) (Required is at least version "1.8.0")
Some more patching seems to be needed:
[ 27%] Generating drm-formats
grep: /var/empty/include/libdrm/drm_fourcc.h: No such file or directory
[ 28%] Generating drm-formats-big-endian
grep: /var/empty/include/libdrm/drm_fourcc.h: No such file or directory
I think these paths here need to be patched to go somewhere into libdrm
: https://github.com/MirServer/mir/blob/2a130a264fb68188ea6ea699744e32ab7b25432c/src/platform/graphics/CMakeLists.txt#L51-L95. Trying to run the demos errors on some DRM stuff for me, might be related to this.
-- Installing: /nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0/nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0/lib/mir/server-platform/graphics-gbm-kms.so.20
-- Set runtime path of "/nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0/nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0/lib/mir/server-platform/graphics-gbm-kms.so.20" to ""
-- Installing: /nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0/nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0/lib/mir/server-platform/server-x11.so.20
-- Installing: /nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0/nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0/lib/mir/server-platform/graphics-eglstream-kms.so.20
-- Installing: /nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0/nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0/lib/mir/server-platform/graphics-wayland.so.20
-- Installing: /nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0/nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0/lib/mir/server-platform/input-evdev.so.8
[2022-12-25 23:06:34.802902] <information> mircommon: Loading modules from: /nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0//nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0/lib/mir/server-platform
[2022-12-25 23:06:34.803228] <information> mircommon: Loading module: /nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0//nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0/lib/mir/server-platform/graphics-gbm-kms.so.20
[2022-12-25 23:06:34.803422] <information> mircommon: Loading module: /nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0//nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0/lib/mir/server-platform/server-x11.so.20
[2022-12-25 23:06:34.803509] <information> mircommon: Loading module: /nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0//nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0/lib/mir/server-platform/graphics-eglstream-kms.so.20
[2022-12-25 23:06:34.803581] <information> mircommon: Loading module: /nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0//nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0/lib/mir/server-platform/graphics-wayland.so.20
[2022-12-25 23:06:34.803644] <information> mircommon: Loading module: /nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0//nix/store/rq0nihx42jqc7sc7dw4gm99y0h15ak40-mir-2.10.0/lib/mir/server-platform/input-evdev.so.8
Not sure where this needs to be patched but /nix/store/.../nix/store/...
-y paths look like something's broken.
4c7f9bb
to
e95dee7
Compare
Thank you so far for reviewing and helping with this PR :) @OPNA2608 I fixed the issues you mentioned, thank you for noticing! |
I don't have any knowledge about Mir so I can't judge if everything works & is configured correctly, but it seems like a demo atop your current display server with your preferred terminal emulator can be started with the following (replace miral-app -kiosk -terminal kitty FWIW it seems to launch: SimpleScreenRecorder-2022-12-27_00.17.10.mp4 |
Thank you so much for the feedback :) Added the requested changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order of commits should be fixed: First eglexternalplatform
, then mir
.
Starting to run out of suggestions for things that could be improved, I promise! 😄
Some notes on all the Mir stuff, after toying around with it abit more:
The miral-app
script wants inotify-tools
so it can nicely wait for things to appear in the background. I don't know if this script matters to how Lomiri will be launched, might make sense to patch it in:
↪ /nix/store/wa9fkqzb10zfxlymg11z115mfb058fyk-mir-2.10.0/bin/miral-app -kiosk -terminal kitty
/nix/store/wa9fkqzb10zfxlymg11z115mfb058fyk-mir-2.10.0/bin/miral-app: line 87: inotifywait: command not found
/nix/store/wa9fkqzb10zfxlymg11z115mfb058fyk-mir-2.10.0/bin/miral-app: line 87: inotifywait: command not found
/nix/store/wa9fkqzb10zfxlymg11z115mfb058fyk-mir-2.10.0/bin/miral-app: line 87: inotifywait: command not found
/nix/store/wa9fkqzb10zfxlymg11z115mfb058fyk-mir-2.10.0/bin/miral-app: line 87: inotifywait: command not found
/nix/store/wa9fkqzb10zfxlymg11z115mfb058fyk-mir-2.10.0/bin/miral-app: line 87: inotifywait: command not found
/nix/store/wa9fkqzb10zfxlymg11z115mfb058fyk-mir-2.10.0/bin/miral-app: line 87: inotifywait: command not found
/nix/store/wa9fkqzb10zfxlymg11z115mfb058fyk-mir-2.10.0/bin/miral-app: line 87: inotifywait: command not found
/nix/store/wa9fkqzb10zfxlymg11z115mfb058fyk-mir-2.10.0/bin/miral-app: line 87: inotifywait: command not found
/nix/store/wa9fkqzb10zfxlymg11z115mfb058fyk-mir-2.10.0/bin/miral-app: line 87: inotifywait: command not found
/nix/store/wa9fkqzb10zfxlymg11z115mfb058fyk-mir-2.10.0/bin/miral-app: line 87: inotifywait: command not found
/nix/store/wa9fkqzb10zfxlymg11z115mfb058fyk-mir-2.10.0/bin/miral-app: line 87: inotifywait: command not found
[2022-12-28 15:44:24.815614] <information> mirserver: Starting
The miral-terminal
script is supposed to check for a range of different terminal emulators and launch one as the terminal inside Mir, on my system it can find none.
for terminal in gnome-terminal.real gnome-terminal weston-terminal qterminal lxterminal x-terminal-emulator xdg-terminal
I use none of the named terminals there. x-terminal-emulator
is Debianism for their alternatives system where you would register your preferred terminal emulator. xdg-terminal
… I don't know what that is.
xterm
doesn't launch reliably. In kiosk mode it can't find a DISPLAY
, likely because it doesn't use Xwayland there. Not sure how this should be handled. For now, miral-app -terminal <terminal>
lets you override miral-terminal
with whatever you wish to use instead.
(Mir? miral-shell
?) seems to need a full path to Xwayland
, else it won't launch. Looks like the default for this is set here. Don't know if we should ultimately just hardcode an Xwayland
into there or work around this via some more configurable way (if there is one):
Mir fatal error: Cannot execute Xwayland: --xwayland-path /usr/bin/Xwayland
Aborted (core dumped)
It also expects Ubuntu's cursor themes to be present:
[2022-12-28 16:49:41.945210] < -warning- > miral: Failed to load cursor theme: default
[2022-12-28 16:49:41.945302] < -warning- > miral: Failed to load cursor theme: DMZ-White
ERROR: /build/source/src/miral/cursor_theme.cpp(74): Throw in function miral::CursorTheme::operator()(mir::Server&) const::<lambda()>
Dynamic exception type: boost::wrapexcept<std::runtime_error>
std::exception::what: Failed to load cursor theme: default:DMZ-White
AFAICT we actually have them packaged under vanilla-dmz
? Or at least we're using the correct source there, but instead of installing them as DMZ-White
and DMZ-Black
they're called Vanilla-DMZ
and Vanilla-DMZ-AA
respectively… Not sure if there's a reason for that.
As a test I've tried to symlink them to the names they should have, adding them to XCURSOR_PATH
in a nix-shell
and using --xwayland-path
. This seems to make Mir much happier and miral-shell
usable (via miral-app
wrapper due to the miral-terminal
stuff):
SimpleScreenRecorder-2022-12-28_16.56.51.mp4
On a tty as well:
And on aarch64-linux hardware:
pkgs/servers/mir/default.nix
Outdated
|
||
stdenv.mkDerivation rec { | ||
pname = "mir"; | ||
version = "2.10.0"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC QtMir used to be stuck on Mir 1.x back when I attempted this because 2.x removed some APIs that were required by the integration. Do you know if this been resolved since then? If you run into problems later down the line with QtMir / Lomiri, you may also have to additionally / instead package Mir 1.8.2 (or a later 1.x entry if one ends up being released) if that's not the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh you're right, good point canonical/mir#1744
I guess we'll have to add Mir 1.X with qtmir in a separate PR. Since Mir can be used outside of qtmir, we would start here with package the most recent version
#207534 (comment) about the Those are the only nitpick I can think of, LGTM otherwise. I got |
[NixOS/nixpkgs | mir: init at 2.10.0](NixOS/nixpkgs#207534)
# Fix error broken path found in pc file ("//") | ||
for f in $(find . -name '*.pc.in') ; do | ||
substituteInPlace $f \ | ||
--replace "/@CMAKE_INSTALL_LIBDIR@" "@CMAKE_INSTALL_LIBDIR@" \ | ||
--replace "/@CMAKE_INSTALL_INCLUDEDIR@" "@CMAKE_INSTALL_INCLUDEDIR@" | ||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While trying to build something that depends on Mir we noticed that the paths are still broken, just not broken enough for the pkg-config check to notice:
prefix=/nix/store/yr3jc3213w1y3f1kc7ppa1a5yx0xng4y-mir-2.10.0
libdir=${prefix}/nix/store/yr3jc3213w1y3f1kc7ppa1a5yx0xng4y-mir-2.10.0/lib
includedir=/nix/store/vzy7w5yqi6y5z5qjpiyq1yfpjpxkzk6i-mir-2.10.0-dev/nix/store/vzy7w5yqi6y5z5qjpiyq1yfpjpxkzk6i-mir-2.10.0-dev/include/miral
I think for our purposes, replacing all ${prefix}/@CMAKE_INSTALL_<dir>@
with @CMAKE_INSTALL_FULL_<dir>@
etc might be fine:
prefix=/nix/store/q4921w10hjmpk28dkk1c4y1c5fy33fcy-mir-2.10.0
libdir=/nix/store/q4921w10hjmpk28dkk1c4y1c5fy33fcy-mir-2.10.0/lib
includedir=/nix/store/ird024yncpxv3rlz42grx8i4g3s891s4-mir-2.10.0-dev/include/miral
The more proper fix being something like jtojnar/cmake-snips#concatenating-paths-when-building-pkg-config-files being done upstream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
being done upstream.
Should we @-
mark them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I PR'd the same fix to their wlcs project recently (first with FULL
, now with jtojnar's snippet), guess I could do the same for Mir & link it here for fetchpatch
ing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
canonical/mir#2786, should be cherry-pickable onto 2.11.0.
New release about a week ago: v2.11.0 |
Thanks for the note, updated it to the latest version and changed the commit order. For the other issues, I'll have to look more into it. |
Description of changes
Packaging Canonicals display server Mir https://github.com/MirServer/mir
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes