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
xdg-desktop-portal: 1.6.0 -> 1.7.2 #88598
Conversation
I'm using this for quite a while now and it works fine |
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.
Changelogs look okay:
- https://github.com/flatpak/xdg-desktop-portal/releases/tag/1.7.0
- https://github.com/flatpak/xdg-desktop-portal/releases/tag/1.7.1
- https://github.com/flatpak/xdg-desktop-portal/releases/tag/1.7.2
Even the commits that stand out (fuse and test.portal for installed-tests):
flatpak/xdg-desktop-portal@1.6.0...1.7.0
But do we not need to update Flatpak and xdg-desktop-portal-gtk too?
@@ -61,10 +61,6 @@ stdenv.mkDerivation rec { | |||
json-glib | |||
]; | |||
|
|||
# Seems to get stuck after "PASS: test-portals 39 /portal/inhibit/monitor" | |||
# TODO: investigate! | |||
doCheck = false; |
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.
Did you test if the tests are still broken? There were some improvements in 1.7.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.
Made some progress but the tests are still broken:
--- a/nixos/tests/installed-tests/xdg-desktop-portal.nix
+++ b/nixos/tests/installed-tests/xdg-desktop-portal.nix
@@ -3,7 +3,8 @@
makeInstalledTest {
tested = pkgs.xdg-desktop-portal;
- # Ton of breakage.
- # https://github.com/flatpak/xdg-desktop-portal/pull/428
- meta.broken = true;
+ testConfig = {
+ services.geoclue2.enable = true;
+ services.pipewire.enable = true;
+ };
}
diff --git a/pkgs/development/libraries/xdg-desktop-portal/default.nix b/pkgs/development/libraries/xdg-desktop-portal/default.nix
index b06edc63273..71b2c438fcb 100644
--- a/pkgs/development/libraries/xdg-desktop-portal/default.nix
+++ b/pkgs/development/libraries/xdg-desktop-portal/default.nix
@@ -6,6 +6,7 @@
, pkgconfig
, libxml2
, glib
+, python3
, pipewire
, fontconfig
, flatpak
@@ -59,6 +60,11 @@ stdenv.mkDerivation rec {
libportal
gsettings-desktop-schemas
json-glib
+
+ # For installed tests
+ (python3.withPackages (pp: with pp; [
+ pygobject3
+ ]))
];
configureFlags = [
@@ -70,6 +76,12 @@ stdenv.mkDerivation rec {
"installed_test_metadir=${placeholder "installedTests"}/share/installed-tests/xdg-desktop-portal"
];
+ postFixup = ''
+ substituteInPlace $installedTests/libexec/installed-tests/xdg-desktop-portal/test-document-fuse.sh \
+ --subst-var-by libexecdir "$out/libexec"
+ wrapGApp $installedTests/libexec/installed-tests/xdg-desktop-portal/test-document-fuse.sh
+ '';
+
passthru = {
tests = {
installedTests = nixosTests.installed-tests.xdg-desktop-portal;
diff --git a/pkgs/development/libraries/xdg-desktop-portal/fix-paths.patch b/pkgs/development/libraries/xdg-desktop-portal/fix-paths.patch
index 98e26e88b5c..4161ae975f0 100644
--- a/pkgs/development/libraries/xdg-desktop-portal/fix-paths.patch
+++ b/pkgs/development/libraries/xdg-desktop-portal/fix-paths.patch
@@ -2,7 +2,7 @@ diff --git a/src/notification.c b/src/notification.c
index 5412609..4243e98 100644
--- a/src/notification.c
+++ b/src/notification.c
-@@ -366,7 +366,7 @@
+@@ -366,7 +366,7 @@ validate_icon_more (GVariant *v)
int status;
g_autofree char *err = NULL;
g_autoptr(GError) error = NULL;
@@ -11,3 +11,52 @@ index 5412609..4243e98 100644
const char *args[6];
if (G_IS_THEMED_ICON (icon))
+diff --git a/tests/test-document-fuse.sh b/tests/test-document-fuse.sh
+index a571a16..4d15e45 100755
+--- a/tests/test-document-fuse.sh
++++ b/tests/test-document-fuse.sh
+@@ -49,37 +49,38 @@ export XDG_RUNTIME_DIR=${TEST_DATA_DIR}/runtime
+ cleanup () {
+ fusermount -u $XDG_RUNTIME_DIR/doc || :
+ sleep 0.1
+- /bin/kill -9 $DBUS_SESSION_BUS_PID
++ kill -9 $DBUS_SESSION_BUS_PID
+ kill $(jobs -p) &> /dev/null || true
+ rm -rf $TEST_DATA_DIR
+ }
+ trap cleanup EXIT
+
+-sed s#@testdir@#${test_builddir}# ${test_srcdir}/session.conf.in > session.conf
++# for some reason it is installed to tests subdirectory
++sed s#@testdir@#${test_builddir}# ${test_srcdir}/tests/session.conf.in > session.conf
+
+ dbus-daemon --fork --config-file=session.conf --print-address=3 --print-pid=4 \
+ 3> dbus-session-bus-address 4> dbus-session-bus-pid
+ export DBUS_SESSION_BUS_ADDRESS="$(cat dbus-session-bus-address)"
+ DBUS_SESSION_BUS_PID="$(cat dbus-session-bus-pid)"
+
+-if ! /bin/kill -0 "$DBUS_SESSION_BUS_PID"; then
++if ! kill -0 "$DBUS_SESSION_BUS_PID"; then
+ assert_not_reached "Failed to start dbus-daemon"
+ fi
+
+ # Run portal manually so that we get any segfault our assert output
+ # Add -v here to get debug output from fuse
+-./xdg-document-portal -r &
++@libexecdir@/xdg-document-portal -r &
+
+ # First run a basic single-thread test
+ echo Testing single-threaded
+-python3 ${test_srcdir}/test-document-fuse.py --iterations 3 -v
++${test_srcdir}/test-document-fuse.py --iterations 3 -v
+ echo "ok single-threaded"
+
+ # Then a bunch of copies in parallel to stress-test
+ echo Testing in parallel
+ PIDS=()
+ for i in $(seq 20); do
+- python3 ${test_srcdir}/test-document-fuse.py --iterations 10 --prefix $i &
++ ${test_srcdir}/test-document-fuse.py --iterations 10 --prefix $i &
+ PID="$!"
+ PIDS+=( "$PID" )
+ done
Upstream PR: flatpak/xdg-desktop-portal#503
@GrahamcOfBorg build xdg-desktop-portal.passthru.tests |
Fedora-32 runs 1.7.1 xdg-desktop-portal-gtk, but still use the stable flatpak release (1.6.3). So it probably wouldn't hurt following tbh. |
As @jsravn commented in #91218 (comment), this should be the missing component to get Chromium to screenshare on wayland. @hedning, not sure if I understand what you're suggesting.
I think it'd make sense to bump @betaboon, do you want to add this to this PR, or should I create a followup commit? |
@flokli I believe hedning means that they are likely API/ABI compatible and there's no reason to hold up this update to also update to latest flatpak at the same time. It's also rather tedious to update flatpak in nixpkgs, the previous one had lots of fallout. |
@flokli, yep, it was in response to this:
So, we should probably just update |
SGTM. @betaboon, can you include this in this PR?
We luckily already have Flatpak 1.6.3 in 20.03, so there's a chance we can backport all the needed fixes for wayland and screensharing to 20.03 :-) |
9982db0
to
3521a47
Compare
Okay, seems ofborg got stuck here. I manually build I tried another round of screensharing, there seem to be some few issues left - I'll document my findings in #91218, which seems to be better suited for the whole task than this individual PR. |
@flokli ah sorry i was too busy with work :/ |
Changes look mostly okay but gsettings changes are always suspect:
Source code changes look reasonable, though, we already include |
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)