diff -Nru xdg-desktop-portal-1.8.1/aclocal.m4 xdg-desktop-portal-1.14.3/aclocal.m4 --- xdg-desktop-portal-1.8.1/aclocal.m4 2021-02-17 03:14:45.000000000 +0000 +++ xdg-desktop-portal-1.14.3/aclocal.m4 2022-03-29 23:42:29.000000000 +0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.2 -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -35,7 +35,7 @@ [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.1], [], +m4_if([$1], [1.16.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.1])dnl +[AM_AUTOMAKE_VERSION([1.16.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -110,7 +110,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -141,7 +141,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -332,7 +332,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -371,7 +371,9 @@ done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi @@ -398,7 +400,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -595,7 +597,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -616,7 +618,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2018 Free Software Foundation, Inc. +# Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -638,7 +640,7 @@ # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -673,7 +675,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -716,7 +718,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -755,7 +757,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -784,7 +786,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -831,7 +833,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -850,7 +852,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -931,7 +933,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -991,7 +993,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1019,7 +1021,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2018 Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1038,7 +1040,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2018 Free Software Foundation, Inc. +# Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xdg-desktop-portal-1.8.1/compile xdg-desktop-portal-1.14.3/compile --- xdg-desktop-portal-1.8.1/compile 2021-02-17 03:14:46.000000000 +0000 +++ xdg-desktop-portal-1.14.3/compile 2022-03-29 23:42:31.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -53,7 +53,7 @@ MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) diff -Nru xdg-desktop-portal-1.8.1/config.h.in xdg-desktop-portal-1.14.3/config.h.in --- xdg-desktop-portal-1.8.1/config.h.in 2021-02-17 03:14:46.000000000 +0000 +++ xdg-desktop-portal-1.14.3/config.h.in 2022-03-29 23:42:30.000000000 +0000 @@ -31,6 +31,9 @@ /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT +/* Define if GLib 2.66 is available */ +#undef HAVE_GLIB_2_66 + /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV @@ -40,12 +43,18 @@ /* Define to enable libportal support */ #undef HAVE_LIBPORTAL +/* Define if libsystemd is available */ +#undef HAVE_LIBSYSTEMD + /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to enable PipeWire support */ #undef HAVE_PIPEWIRE +/* Define to 1 if you have the `renameat2' function. */ +#undef HAVE_RENAMEAT2 + /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H diff -Nru xdg-desktop-portal-1.8.1/configure xdg-desktop-portal-1.14.3/configure --- xdg-desktop-portal-1.8.1/configure 2021-02-17 03:14:45.000000000 +0000 +++ xdg-desktop-portal-1.14.3/configure 2022-03-29 23:42:29.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for xdg-desktop-portal 1.8.1. +# Generated by GNU Autoconf 2.69 for xdg-desktop-portal 1.14.3. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='xdg-desktop-portal' PACKAGE_TARNAME='xdg-desktop-portal' -PACKAGE_VERSION='1.8.1' -PACKAGE_STRING='xdg-desktop-portal 1.8.1' +PACKAGE_VERSION='1.14.3' +PACKAGE_STRING='xdg-desktop-portal 1.14.3' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -634,8 +634,10 @@ am__EXEEXT_TRUE LTLIBOBJS LIBOBJS -FUSE_LIBS -FUSE_CFLAGS +GDK_PIXBUF_LIBS +GDK_PIXBUF_CFLAGS +FUSE3_LIBS +FUSE3_CFLAGS installed_testdir installed_test_metadir ENABLE_ALWAYS_BUILD_TESTS_FALSE @@ -648,6 +650,10 @@ DOCBOOK_DOCS_ENABLED_FALSE DOCBOOK_DOCS_ENABLED_TRUE XMLTO +HAVE_LIBSYSTEMD_FALSE +HAVE_LIBSYSTEMD_TRUE +SYSTEMD_LIBS +SYSTEMD_CFLAGS HAVE_PIPEWIRE_FALSE HAVE_PIPEWIRE_TRUE PIPEWIRE_LIBS @@ -660,6 +666,8 @@ HAVE_LIBPORTAL_TRUE LIBPORTAL_LIBS LIBPORTAL_CFLAGS +GLIB266_LIBS +GLIB266_CFLAGS GLIB260_LIBS GLIB260_CFLAGS BASE_LIBS @@ -787,6 +795,7 @@ docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -832,6 +841,7 @@ enable_libportal enable_geoclue enable_pipewire +with_systemd enable_docbook_docs enable_coverage enable_installed_tests @@ -855,16 +865,22 @@ BASE_LIBS GLIB260_CFLAGS GLIB260_LIBS +GLIB266_CFLAGS +GLIB266_LIBS LIBPORTAL_CFLAGS LIBPORTAL_LIBS GEOCLUE_CFLAGS GEOCLUE_LIBS PIPEWIRE_CFLAGS PIPEWIRE_LIBS +SYSTEMD_CFLAGS +SYSTEMD_LIBS XMLTO XMLTO_FLAGS -FUSE_CFLAGS -FUSE_LIBS' +FUSE3_CFLAGS +FUSE3_LIBS +GDK_PIXBUF_CFLAGS +GDK_PIXBUF_LIBS' # Initialize some variables set by options. @@ -903,6 +919,7 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1155,6 +1172,15 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1292,7 +1318,7 @@ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1405,7 +1431,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xdg-desktop-portal 1.8.1 to adapt to many kinds of systems. +\`configure' configures xdg-desktop-portal 1.14.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1445,6 +1471,7 @@ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1476,7 +1503,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xdg-desktop-portal 1.8.1:";; + short | recursive ) echo "Configuration of xdg-desktop-portal 1.14.3:";; esac cat <<\_ACEOF @@ -1537,6 +1564,7 @@ --with-systemduserunitdir=DIR Directory for systemd user service files (default=PREFIX/lib/systemd/user) + --with-systemd Build with systemd support [default=yes] Some influential environment variables: CC C compiler command @@ -1555,13 +1583,18 @@ PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path FLATPAK_INTERFACES_DIR - value of interfaces_dir for flatpak, overriding pkg-config + value of interfaces_dir for flatpak >= 1.5.0, overriding + pkg-config BASE_CFLAGS C compiler flags for BASE, overriding pkg-config BASE_LIBS linker flags for BASE, overriding pkg-config GLIB260_CFLAGS C compiler flags for GLIB260, overriding pkg-config GLIB260_LIBS linker flags for GLIB260, overriding pkg-config + GLIB266_CFLAGS + C compiler flags for GLIB266, overriding pkg-config + GLIB266_LIBS + linker flags for GLIB266, overriding pkg-config LIBPORTAL_CFLAGS C compiler flags for LIBPORTAL, overriding pkg-config LIBPORTAL_LIBS @@ -1574,10 +1607,19 @@ C compiler flags for PIPEWIRE, overriding pkg-config PIPEWIRE_LIBS linker flags for PIPEWIRE, overriding pkg-config + SYSTEMD_CFLAGS + C compiler flags for SYSTEMD, overriding pkg-config + SYSTEMD_LIBS + linker flags for SYSTEMD, overriding pkg-config XMLTO Define/override the 'xmlto' location. XMLTO_FLAGS Define/override 'xmlto' options, like '--skip-validation'. - FUSE_CFLAGS C compiler flags for FUSE, overriding pkg-config - FUSE_LIBS linker flags for FUSE, overriding pkg-config + FUSE3_CFLAGS + C compiler flags for FUSE3, overriding pkg-config + FUSE3_LIBS linker flags for FUSE3, overriding pkg-config + GDK_PIXBUF_CFLAGS + C compiler flags for GDK_PIXBUF, overriding pkg-config + GDK_PIXBUF_LIBS + linker flags for GDK_PIXBUF, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1645,7 +1687,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xdg-desktop-portal configure 1.8.1 +xdg-desktop-portal configure 1.14.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2010,7 +2052,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xdg-desktop-portal $as_me 1.8.1, which was +It was created by xdg-desktop-portal $as_me 1.14.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -12753,7 +12795,7 @@ # Define the identity of the package. PACKAGE='xdg-desktop-portal' - VERSION='1.8.1' + VERSION='1.14.3' # Some tools Automake needs. @@ -15439,12 +15481,12 @@ pkg_cv_FLATPAK_INTERFACES_DIR="$FLATPAK_INTERFACES_DIR" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flatpak\""; } >&5 - ($PKG_CONFIG --exists --print-errors "flatpak") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flatpak >= 1.5.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "flatpak >= 1.5.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_FLATPAK_INTERFACES_DIR=`$PKG_CONFIG --variable="interfaces_dir" "flatpak" 2>/dev/null` + pkg_cv_FLATPAK_INTERFACES_DIR=`$PKG_CONFIG --variable="interfaces_dir" "flatpak >= 1.5.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -15459,9 +15501,6 @@ fi fi -if ! pkg-config --atleast-version "1.5.0" flatpak; then - FLATPAK_INTERFACES_DIR="" -fi @@ -15689,6 +15728,79 @@ fi +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB266" >&5 +$as_echo_n "checking for GLIB266... " >&6; } + +if test -n "$GLIB266_CFLAGS"; then + pkg_cv_GLIB266_CFLAGS="$GLIB266_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.66\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.66") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GLIB266_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.66" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$GLIB266_LIBS"; then + pkg_cv_GLIB266_LIBS="$GLIB266_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.66\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.66") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GLIB266_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.66" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GLIB266_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.66" 2>&1` + else + GLIB266_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.66" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$GLIB266_PKG_ERRORS" >&5 + + true +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + true +else + GLIB266_CFLAGS=$pkg_cv_GLIB266_CFLAGS + GLIB266_LIBS=$pkg_cv_GLIB266_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_GLIB_2_66 1" >>confdefs.h + +fi + # Check whether --enable-libportal was given. if test "${enable_libportal+set}" = set; then : enableval=$enable_libportal; enable_libportal=$enableval @@ -16025,6 +16137,119 @@ fi + +# Check whether --with-systemd was given. +if test "${with_systemd+set}" = set; then : + withval=$with_systemd; +else + with_systemd=yes +fi + +if test "x$with_systemd" = "xyes"; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 +$as_echo_n "checking for SYSTEMD... " >&6; } + +if test -n "$SYSTEMD_CFLAGS"; then + pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$SYSTEMD_LIBS"; then + pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1` + else + SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$SYSTEMD_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements (libsystemd) were not met: + +$SYSTEMD_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables SYSTEMD_CFLAGS +and SYSTEMD_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables SYSTEMD_CFLAGS +and SYSTEMD_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } +else + SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS + SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + +$as_echo "#define HAVE_LIBSYSTEMD 1" >>confdefs.h + +fi + if test "x$with_systemd" != "xno"; then + HAVE_LIBSYSTEMD_TRUE= + HAVE_LIBSYSTEMD_FALSE='#' +else + HAVE_LIBSYSTEMD_TRUE='#' + HAVE_LIBSYSTEMD_FALSE= +fi + + # Check whether --enable-docbook-docs was given. if test "${enable_docbook_docs+set}" = set; then : enableval=$enable_docbook_docs; enable_docbook_docs=$enableval @@ -16272,19 +16497,121 @@ pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUSE" >&5 -$as_echo_n "checking for FUSE... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUSE3" >&5 +$as_echo_n "checking for FUSE3... " >&6; } + +if test -n "$FUSE3_CFLAGS"; then + pkg_cv_FUSE3_CFLAGS="$FUSE3_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fuse3 >= 3.10.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "fuse3 >= 3.10.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_FUSE3_CFLAGS=`$PKG_CONFIG --cflags "fuse3 >= 3.10.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$FUSE3_LIBS"; then + pkg_cv_FUSE3_LIBS="$FUSE3_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fuse3 >= 3.10.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "fuse3 >= 3.10.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_FUSE3_LIBS=`$PKG_CONFIG --libs "fuse3 >= 3.10.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + FUSE3_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "fuse3 >= 3.10.0" 2>&1` + else + FUSE3_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "fuse3 >= 3.10.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$FUSE3_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements (fuse3 >= 3.10.0) were not met: + +$FUSE3_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables FUSE3_CFLAGS +and FUSE3_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables FUSE3_CFLAGS +and FUSE3_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } +else + FUSE3_CFLAGS=$pkg_cv_FUSE3_CFLAGS + FUSE3_LIBS=$pkg_cv_FUSE3_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi +for ac_func in renameat2 +do : + ac_fn_c_check_func "$LINENO" "renameat2" "ac_cv_func_renameat2" +if test "x$ac_cv_func_renameat2" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_RENAMEAT2 1 +_ACEOF + +fi +done + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK_PIXBUF" >&5 +$as_echo_n "checking for GDK_PIXBUF... " >&6; } -if test -n "$FUSE_CFLAGS"; then - pkg_cv_FUSE_CFLAGS="$FUSE_CFLAGS" +if test -n "$GDK_PIXBUF_CFLAGS"; then + pkg_cv_GDK_PIXBUF_CFLAGS="$GDK_PIXBUF_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fuse\""; } >&5 - ($PKG_CONFIG --exists --print-errors "fuse") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-pixbuf-2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gdk-pixbuf-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_FUSE_CFLAGS=`$PKG_CONFIG --cflags "fuse" 2>/dev/null` + pkg_cv_GDK_PIXBUF_CFLAGS=`$PKG_CONFIG --cflags "gdk-pixbuf-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -16292,16 +16619,16 @@ else pkg_failed=untried fi -if test -n "$FUSE_LIBS"; then - pkg_cv_FUSE_LIBS="$FUSE_LIBS" +if test -n "$GDK_PIXBUF_LIBS"; then + pkg_cv_GDK_PIXBUF_LIBS="$GDK_PIXBUF_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fuse\""; } >&5 - ($PKG_CONFIG --exists --print-errors "fuse") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-pixbuf-2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gdk-pixbuf-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_FUSE_LIBS=`$PKG_CONFIG --libs "fuse" 2>/dev/null` + pkg_cv_GDK_PIXBUF_LIBS=`$PKG_CONFIG --libs "gdk-pixbuf-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -16322,22 +16649,22 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - FUSE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "fuse" 2>&1` + GDK_PIXBUF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gdk-pixbuf-2.0" 2>&1` else - FUSE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "fuse" 2>&1` + GDK_PIXBUF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gdk-pixbuf-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs - echo "$FUSE_PKG_ERRORS" >&5 + echo "$GDK_PIXBUF_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (fuse) were not met: + as_fn_error $? "Package requirements (gdk-pixbuf-2.0) were not met: -$FUSE_PKG_ERRORS +$GDK_PIXBUF_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively, you may set the environment variables FUSE_CFLAGS -and FUSE_LIBS to avoid the need to call pkg-config. +Alternatively, you may set the environment variables GDK_PIXBUF_CFLAGS +and GDK_PIXBUF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -16348,15 +16675,15 @@ is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. -Alternatively, you may set the environment variables FUSE_CFLAGS -and FUSE_LIBS to avoid the need to call pkg-config. +Alternatively, you may set the environment variables GDK_PIXBUF_CFLAGS +and GDK_PIXBUF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else - FUSE_CFLAGS=$pkg_cv_FUSE_CFLAGS - FUSE_LIBS=$pkg_cv_FUSE_LIBS + GDK_PIXBUF_CFLAGS=$pkg_cv_GDK_PIXBUF_CFLAGS + GDK_PIXBUF_LIBS=$pkg_cv_GDK_PIXBUF_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -16513,6 +16840,10 @@ as_fn_error $? "conditional \"HAVE_PIPEWIRE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_LIBSYSTEMD_TRUE}" && test -z "${HAVE_LIBSYSTEMD_FALSE}"; then + as_fn_error $? "conditional \"HAVE_LIBSYSTEMD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${DOCBOOK_DOCS_ENABLED_TRUE}" && test -z "${DOCBOOK_DOCS_ENABLED_FALSE}"; then as_fn_error $? "conditional \"DOCBOOK_DOCS_ENABLED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -16922,7 +17253,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xdg-desktop-portal $as_me 1.8.1, which was +This file was extended by xdg-desktop-portal $as_me 1.14.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16988,7 +17319,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -xdg-desktop-portal config.status 1.8.1 +xdg-desktop-portal config.status 1.14.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -18636,7 +18967,9 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } diff -Nru xdg-desktop-portal-1.8.1/configure.ac xdg-desktop-portal-1.14.3/configure.ac --- xdg-desktop-portal-1.8.1/configure.ac 2021-02-17 03:14:11.000000000 +0000 +++ xdg-desktop-portal-1.14.3/configure.ac 2022-03-29 23:41:47.000000000 +0000 @@ -1,6 +1,6 @@ AC_PREREQ([2.63]) -AC_INIT([xdg-desktop-portal],[1.8.1]) +AC_INIT([xdg-desktop-portal],[1.14.3]) AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE @@ -50,10 +50,7 @@ AC_ARG_WITH(flatpak_interfaces_dir, AS_HELP_STRING([--with-flatpak-interfaces-dir=PATH],[choose directory for Flatpak interface files, [default=PREFIX/share/dbus-1/interfaces]]), [[FLATPAK_INTERFACES_DIR="$withval"]], - [PKG_CHECK_VAR([FLATPAK_INTERFACES_DIR], [flatpak], [interfaces_dir])]) -if ! pkg-config --atleast-version "1.5.0" flatpak; then - FLATPAK_INTERFACES_DIR="" -fi + [PKG_CHECK_VAR([FLATPAK_INTERFACES_DIR], [flatpak >= 1.5.0], [interfaces_dir])]) AC_SUBST(FLATPAK_INTERFACES_DIR) AC_ARG_WITH([systemduserunitdir], @@ -77,6 +74,9 @@ PKG_CHECK_MODULES(GLIB260, glib-2.0 >= 2.60, [AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_60, [Ignore massive GTimeVal deprecation warnings in 2.62])], [true]) +PKG_CHECK_MODULES(GLIB266, glib-2.0 >= 2.66, + [AC_DEFINE(HAVE_GLIB_2_66, 1, [Define if GLib 2.66 is available])], + [true]) AC_ARG_ENABLE(libportal, [AS_HELP_STRING([--enable-libportal],[Enable libportal support. Needed for tests])], @@ -105,6 +105,15 @@ fi AM_CONDITIONAL([HAVE_PIPEWIRE],[test "$enable_pipewire" = "yes"]) +AC_ARG_WITH([systemd], + AS_HELP_STRING([--with-systemd], [Build with systemd support [default=yes]]), + [], [with_systemd=yes]) +if test "x$with_systemd" = "xyes"; then + PKG_CHECK_MODULES(SYSTEMD, [libsystemd]) + AC_DEFINE([HAVE_LIBSYSTEMD], [1], [Define if libsystemd is available]) +fi +AM_CONDITIONAL([HAVE_LIBSYSTEMD], [test "x$with_systemd" != "xno"]) + AC_ARG_ENABLE(docbook-docs, [AS_HELP_STRING([--enable-docbook-docs],[build documentation (requires xmlto)])], enable_docbook_docs=$enableval, enable_docbook_docs=auto) @@ -174,7 +183,9 @@ GLIB_TESTS -PKG_CHECK_MODULES(FUSE, [fuse]) +PKG_CHECK_MODULES(FUSE3, [fuse3 >= 3.10.0]) +AC_CHECK_FUNCS(renameat2) +PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0]) AC_CONFIG_FILES([ Makefile diff -Nru xdg-desktop-portal-1.8.1/data/Makefile.am.inc xdg-desktop-portal-1.14.3/data/Makefile.am.inc --- xdg-desktop-portal-1.8.1/data/Makefile.am.inc 2019-12-18 01:17:22.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/Makefile.am.inc 2022-03-29 22:00:20.000000000 +0000 @@ -1,48 +1,2 @@ introspectiondir = $(datadir)/dbus-1/interfaces -dist_introspection_DATA = \ - data/org.freedesktop.portal.Account.xml \ - data/org.freedesktop.portal.Background.xml \ - data/org.freedesktop.portal.Camera.xml \ - data/org.freedesktop.portal.Device.xml \ - data/org.freedesktop.portal.Documents.xml \ - data/org.freedesktop.portal.Email.xml \ - data/org.freedesktop.portal.FileChooser.xml \ - data/org.freedesktop.portal.FileTransfer.xml \ - data/org.freedesktop.portal.GameMode.xml \ - data/org.freedesktop.portal.Inhibit.xml \ - data/org.freedesktop.portal.Location.xml \ - data/org.freedesktop.portal.MemoryMonitor.xml \ - data/org.freedesktop.portal.NetworkMonitor.xml \ - data/org.freedesktop.portal.Notification.xml \ - data/org.freedesktop.portal.OpenURI.xml \ - data/org.freedesktop.portal.Print.xml \ - data/org.freedesktop.portal.ProxyResolver.xml \ - data/org.freedesktop.portal.RemoteDesktop.xml \ - data/org.freedesktop.portal.Request.xml \ - data/org.freedesktop.portal.ScreenCast.xml \ - data/org.freedesktop.portal.Screenshot.xml \ - data/org.freedesktop.portal.Secret.xml \ - data/org.freedesktop.portal.Session.xml \ - data/org.freedesktop.portal.Settings.xml \ - data/org.freedesktop.portal.Trash.xml \ - data/org.freedesktop.portal.Wallpaper.xml \ - data/org.freedesktop.impl.portal.Access.xml \ - data/org.freedesktop.impl.portal.Account.xml \ - data/org.freedesktop.impl.portal.AppChooser.xml \ - data/org.freedesktop.impl.portal.Background.xml \ - data/org.freedesktop.impl.portal.Email.xml \ - data/org.freedesktop.impl.portal.FileChooser.xml \ - data/org.freedesktop.impl.portal.Inhibit.xml \ - data/org.freedesktop.impl.portal.Lockdown.xml \ - data/org.freedesktop.impl.portal.Notification.xml \ - data/org.freedesktop.impl.portal.PermissionStore.xml \ - data/org.freedesktop.impl.portal.Print.xml \ - data/org.freedesktop.impl.portal.RemoteDesktop.xml \ - data/org.freedesktop.impl.portal.Request.xml \ - data/org.freedesktop.impl.portal.ScreenCast.xml \ - data/org.freedesktop.impl.portal.Screenshot.xml \ - data/org.freedesktop.impl.portal.Secret.xml \ - data/org.freedesktop.impl.portal.Session.xml \ - data/org.freedesktop.impl.portal.Settings.xml \ - data/org.freedesktop.impl.portal.Wallpaper.xml \ - $(NULL) +dist_introspection_DATA = $(PORTAL_IFACE_FILES) $(PORTAL_IMPL_IFACE_FILES) diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.impl.portal.Account.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.impl.portal.Account.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.impl.portal.Account.xml 2019-11-23 00:40:44.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.impl.portal.Account.xml 2022-03-28 18:02:35.000000000 +0000 @@ -34,6 +34,9 @@ @handle: Object path for the #org.freedesktop.portal.Request object representing this call @app_id: App id of the application @window: Identifier for the window + @options: Vardict with optional further information + @response: Numeric response + @results: Vardict with the results of the call Gets information about the user. diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.impl.portal.AppChooser.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.impl.portal.AppChooser.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.impl.portal.AppChooser.xml 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.impl.portal.AppChooser.xml 2022-03-28 18:02:35.000000000 +0000 @@ -24,6 +24,8 @@ This backend can be used by portal implementations that need to choose an application from a list of applications. + + This documentation describes version 2 of this interface. --> diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.impl.portal.DynamicLauncher.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.impl.portal.DynamicLauncher.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.impl.portal.DynamicLauncher.xml 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.impl.portal.DynamicLauncher.xml 2022-03-29 22:00:20.000000000 +0000 @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.impl.portal.PermissionStore.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.impl.portal.PermissionStore.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.impl.portal.PermissionStore.xml 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.impl.portal.PermissionStore.xml 2022-03-28 18:02:35.000000000 +0000 @@ -146,6 +146,23 @@ + + + + + + + + @@ -183,9 +268,9 @@ Available cursor mode values: - 1: Hidden. The cursor is not part of the screen cast stream. - 2: Embedded: The cursor is embedded as part of the stream buffers. - 4: Metadata: The cursor is not part of the screen cast stream, but sent as PipeWire stream metadata. + 1: Hidden. The cursor is not part of the screen cast stream. + 2: Embedded: The cursor is embedded as part of the stream buffers. + 4: Metadata: The cursor is not part of the screen cast stream, but sent as PipeWire stream metadata. --> diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.impl.portal.Secret.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.impl.portal.Secret.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.impl.portal.Secret.xml 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.impl.portal.Secret.xml 2022-03-28 18:02:35.000000000 +0000 @@ -44,7 +44,7 @@ token s - An opaque string associated with the retrieve secret. + An opaque string associated with the retrieve secret. diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.impl.portal.Settings.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.impl.portal.Settings.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.impl.portal.Settings.xml 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.impl.portal.Settings.xml 2022-03-28 18:02:35.000000000 +0000 @@ -27,9 +27,27 @@ of host settings required for toolkits similar to XSettings. It is not for general purpose settings. - Currently the valid keys are entirely implementation details - that are undocumented. If you are a toolkit and want to use - this please open an issue. + Currently the interface provides the following keys: + + + + org.freedesktop.appearance color-scheme u + + Indicates the system's preferred color scheme. + Supported values are: + + 0: No preference + 1: Prefer dark appearance + 2: Prefer light appearance + + Unknown values should be treated as 0 (no preference). + + + + + Implementations can provide other keys; they are entirely + implementation details that are undocumented. If you are a + toolkit and want to use this please open an issue. Note that the Settings portal can operate without this backend, implementing it is optional. diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.impl.portal.Wallpaper.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.impl.portal.Wallpaper.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.impl.portal.Wallpaper.xml 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.impl.portal.Wallpaper.xml 2022-03-29 22:00:20.000000000 +0000 @@ -24,7 +24,7 @@ @short_description: Portal for setting the desktop's Wallpaper This simple interface lets sandboxed applications set the user's - desktop background picutre. + desktop background picture. --> @@ -57,8 +57,8 @@ Open a file descriptor to the PipeWire remote where the camera nodes are available. The file descriptor should be used to create a - pw_remote object, by using - pw_remote_connect_fd. + pw_core object, by using + pw_context_connect_fd. This method will only succeed if the application already has permission to access camera devices. diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Documents.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Documents.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Documents.xml 2020-03-13 12:38:51.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Documents.xml 2022-03-29 22:00:20.000000000 +0000 @@ -49,7 +49,7 @@ The D-Bus interface for the document portal is available under the bus name org.freedesktop.portal.Documents and the object path /org/freedesktop/portal/documents. - + This documentation describes version 4 of this interface. --> @@ -123,15 +123,15 @@ contain an empty string. Additionally, if app_id is specified, it will be given the permissions - listed in GrantPermission. + listed in org.freedesktop.portal.Documents.GrantPermissions(). The method also returns some extra info that can be used to avoid multiple roundtrips. For now it only contains as "mountpoint", the fuse mountpoint of the document portal. - This method was added in version 2 of the org.freedesktop.portal.Documents interface. + This method was added in version 2 of the #org.freedesktop.portal.Documents interface. - Support for exporting directories were added in version 4 of the org.freedesktop.portal.Documents interface. + Support for exporting directories were added in version 4 of the #org.freedesktop.portal.Documents interface. --> @@ -161,13 +161,13 @@ contain an empty string. Additionally, if app_id is specified, it will be given the permissions - listed in GrantPermission. + listed in org.freedesktop.portal.Documents.GrantPermissions(). The method also returns some extra info that can be used to avoid multiple roundtrips. For now it only contains as "mountpoint", the fuse mountpoint of the document portal. - This method was added in version 3 of the org.freedesktop.portal.Documents interface. + This method was added in version 3 of the #org.freedesktop.portal.Documents interface. --> @@ -264,7 +264,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.FileChooser.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.FileChooser.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.FileChooser.xml 2020-09-14 17:03:38.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.FileChooser.xml 2022-03-28 18:02:35.000000000 +0000 @@ -86,12 +86,19 @@ Each item in the array specifies a single filter to offer to the user. The first string is a user-visible name for the filter. The a(us) - specifies a list of filter strings, which can be either a glob pattern - (indicated by 0) or a mimetype (indicated by 1). + specifies a list of filter strings, which can be either a glob-style pattern + (indicated by 0) or a mimetype (indicated by 1). Patterns are case-sensitive. + To match different capitalizations of, e.g. '*.ico', use a pattern like + '*.[iI][cC][oO]'. Example: [('Images', [(0, '*.ico'), (1, 'image/png')]), ('Text', [(0, '*.txt')])] + + Note that filters are purely there to aid the user in making a useful selection. + The portal may still allow the user to select files that don't match any filter + criteria, and applications must be prepared to handle that. + diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.FileTransfer.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.FileTransfer.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.FileTransfer.xml 2019-12-18 01:17:22.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.FileTransfer.xml 2022-03-29 22:00:20.000000000 +0000 @@ -23,19 +23,20 @@ org.freedesktop.portal.FileTransfer: @short_description: Portal for transferring files between apps - The FileTransfer portal operates as a middle-man between apps - when transferring files via drag-and-drop or copy-paste, taking - care of the necessary exporting of files in the document portal. + The #org.freedesktop.portal.FileTransfer portal operates as a middle-man + between apps when transferring files via drag-and-drop or copy-paste, + taking care of the necessary exporting of files in the document portal. Toolkits are expected to use the application/vnd.portal.filetransfer mimetype when using this mechanism for file exchange via copy-paste or drag-and-drop. The data that is transmitted with this mimetype should be the key - returned by the StartTransfer method. Upon receiving this mimetype, - the target should call RetrieveFiles with the key, to obtain the - list of files. The portal will take care of exporting files in - the document store as necessary to make them accessible to the + returned by the org.freedesktop.portal.FileTransfer.StartTransfer() + method. Upon receiving this mimetype, the target should call + org.freedesktop.portal.FileTransfer.RetrieveFiles() with the key, + to obtain the list of files. The portal will take care of exporting + files in the document store as necessary to make them accessible to the target. The D-Bus interface for the this portal is available under the @@ -47,14 +48,16 @@ @@ -105,17 +108,17 @@ @@ -125,10 +128,10 @@ diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.GameMode.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.GameMode.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.GameMode.xml 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.GameMode.xml 2022-03-29 22:00:20.000000000 +0000 @@ -30,17 +30,18 @@ separate process ids (pids) within two different namespaces that both identify same process. One id from the pid namespace inside the sandbox and one id from the host pid namespace. - Since GameMode expects pids from the host pid namespace but - programs inside the sandbox can only know pids from the sandbox - namespace, process ids need to be translated from the portal to - the host namespace. The portal will do that transparently for - all calls where this is necessary. - - Note: GameMode will monitor active clients, i.e. games and - other programs that have successfully called 'RegisterGame'. + Since org.freedesktop.portal.GameMode expects pids from the host + pid namespace but programs inside the sandbox can only know pids + from the sandbox namespace, process ids need to be translated from + the portal to the host namespace. The portal will do that transparently + for all calls where this is necessary. + + Note: #org.freedesktop.portal.GameMode will monitor active clients, + i.e. games and other programs that have successfully called + org.freedesktop.portal.GameMode.RegisterGame(). In the event that a client terminates without a call to the - 'UnregisterGame' method, GameMode will automatically un-register - the client. This might happen with a (small) delay. + org.freedesktop.portal.GameMode.UnregisterGame() method, GameMode will + automatically un-register the client. This might happen with a (small) delay. This documentation describes version 3 of this interface. --> @@ -89,7 +90,7 @@ Un-register a game from GameMode; if the call is successful and there are no other games or clients registered, GameMode - will be deactivated. If the caller is running inside a sandbox + will be deactivated. If the caller is running inside a sandbox with pid namespace isolation, the pid will be translated to the respective host pid. Will return: @@ -108,12 +109,13 @@ @result: The GameMode status for @target Query the GameMode status for a process. - Like org.freedesktop.portal.GameMode.QueryStatus() but @requester + + Like org.freedesktop.portal.GameMode.QueryStatus() but @requester acting on behalf of @target. --> - + @@ -124,12 +126,13 @@ @result: Status of the request: 0 for success, -1 indicates an error Register a game with GameMode. - Like org.freedesktop.portal.GameMode.RegisterGame() but @requester + + Like org.freedesktop.portal.GameMode.RegisterGame() but @requester acting on behalf of @target. --> - + @@ -139,13 +142,14 @@ @requester: Process id of the process requesting the un-registration @result: Status of the request: 0 for success, -1 indicates an error - Register a game with GameMode. - Like org.freedesktop.portal.GameMode.UnregisterGame() but @requester + Un-register a game with GameMode. + + Like org.freedesktop.portal.GameMode.UnregisterGame() but @requester acting on behalf of @target. --> - + @@ -157,7 +161,8 @@ @result: The GameMode status for @target Query the GameMode status for a process. - Like org.freedesktop.portal.GameMode.QueryStatusByPid() but @requester + + Like org.freedesktop.portal.GameMode.QueryStatusByPid() but @requester and @target are pidfds representing the processes. --> @@ -174,13 +179,14 @@ @result: Status of the request: 0 for success, -1 indicates an error Register a game with GameMode. - Like org.freedesktop.portal.GameMode.RegisterGameByPid() but @requester + + Like org.freedesktop.portal.GameMode.RegisterGameByPid() but @requester and @target are pidfds representing the processes. --> - + @@ -190,14 +196,15 @@ @requester: Pidfd of the process requesting the un-registration @result: Status of the request: 0 for success, -1 indicates an error - Register a game with GameMode. - Like org.freedesktop.portal.GameMode.UnregisterGameByPid() but @requester + Un-register a game with GameMode. + + Like org.freedesktop.portal.GameMode.UnregisterGameByPid() but @requester and @target are pidfds representing the processes. --> - + diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Inhibit.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Inhibit.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Inhibit.xml 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Inhibit.xml 2022-03-29 22:00:20.000000000 +0000 @@ -84,7 +84,7 @@ A successfully created session can at any time be closed using org.freedesktop.portal.Session::Close, or may at any time be closed by the portal implementation, which will be signalled via - org.freedesktop.portal.Session::Closed. + #org.freedesktop.portal.Session::Closed. Supported keys in the @options vardict include: @@ -135,7 +135,7 @@ the session state changes. When the session state changes to 'Query End', clients with active monitoring - sessions are expected to respond by calling + sessions are expected to respond by calling org.freedesktop.portal.Inhibit.QueryEndResponse() within a second of receiving the StateChanged signal. They may call org.freedesktop.portal.Inhibit.Inhibit() first to inhibit logout, to prevent the session from proceeding to the Ending state. diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Location.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Location.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Location.xml 2019-12-11 05:12:01.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Location.xml 2022-03-29 22:00:20.000000000 +0000 @@ -35,10 +35,10 @@ @handle: Object path for the created #org.freedesktop.portal.Session object Create a location session. A successfully created session can at - any time be closed using org.freedesktop.portal.Session::Close, or may + any time be closed using org.freedesktop.portal.Session.Close(), or may at any time be closed by the portal implementation, which will be - signalled via org.freedesktop.portal.Session::Closed. -` + signalled via #org.freedesktop.portal.Session::Closed. + Supported keys in the @options vardict include: diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Notification.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Notification.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Notification.xml 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Notification.xml 2022-03-29 22:00:20.000000000 +0000 @@ -38,7 +38,7 @@ exported and will be activated via the ActivateAction() method in the org.freedesktop.Application interface. Other actions are activated by sending the - #org.freedeskop.portal.Notification::ActionInvoked signal + #org.freedesktop.portal.Notification::ActionInvoked signal to the application. This documentation describes version 1 of this interface. diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.OpenURI.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.OpenURI.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.OpenURI.xml 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.OpenURI.xml 2022-03-29 22:00:20.000000000 +0000 @@ -27,14 +27,14 @@ URIs (e.g. a http: link to the applications homepage) under the control of the user. - This documentation describes version 3 of this interface. + This documentation describes version 4 of this interface. --> @@ -85,7 +93,7 @@ OpenFile: @parent_window: Identifier for the application window, see Common Conventions @fd: File descriptor for the file to open - @options: Vardict with optional further onformation + @options: Vardict with optional further information @handle: Object path for the #org.freedesktop.portal.Request object representing this call Asks to open a local file. @@ -119,6 +127,14 @@ The ask option was introduced in version 3 of the interface. + + activation_token s + + A token that can be used to activate the chosen application. + + The activation_token option was introduced in version 4 of the interface. + + The OpenFile method was introduced in version 2 of the OpenURI portal API. @@ -135,7 +151,7 @@ OpenDirectory: @parent_window: Identifier for the application window, see Common Conventions @fd: File descriptor for a file - @options: Vardict with optional further onformation + @options: Vardict with optional further information @handle: Object path for the #org.freedesktop.portal.Request object representing this call Asks to open the directory containing a local file in the file browser. @@ -150,6 +166,14 @@ more information about the @handle. + + activation_token s + + A token that can be used to activate the chosen application. + + The activation_token option was introduced in version 4 of the interface. + + The OpenDirectory method was introduced in version 3 of the OpenURI portal API. diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.PowerProfileMonitor.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.PowerProfileMonitor.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.PowerProfileMonitor.xml 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.PowerProfileMonitor.xml 2022-03-28 18:02:35.000000000 +0000 @@ -0,0 +1,43 @@ + + + + + + + + + + + diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Print.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Print.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Print.xml 2019-12-18 01:17:22.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Print.xml 2022-03-28 18:02:35.000000000 +0000 @@ -25,12 +25,12 @@ The Print portal allows sandboxed applications to print. - Due to the way in which printing requires bi-directional communication - using this portal will often require applications to make multiple requests: - First use org.freedesktop.portal.Print.PreparePrint() to obtain print settings, + Due to the way in which printing requires bi-directional communication, + using this portal will often require applications to make multiple requests. + First, use org.freedesktop.portal.Print.PreparePrint() to obtain print settings, use them to format your output, then use org.freedesktop.portal.Print.Print() to print the formatted document. It is expected that high-level toolkit - APIS such as GtkPrintOperation will hide most of this complexity. + APIs such as GtkPrintOperation will hide most of this complexity. This documentation describes version 1 of this interface. --> diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Realtime.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Realtime.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Realtime.xml 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Realtime.xml 2022-03-28 18:02:35.000000000 +0000 @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.RemoteDesktop.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.RemoteDesktop.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.RemoteDesktop.xml 2019-11-23 00:40:44.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.RemoteDesktop.xml 2022-03-29 22:00:20.000000000 +0000 @@ -35,12 +35,12 @@ A remote desktop session is used to allow remote controlling a desktop session. It can also be used together with a screen cast session (see - org.freedesktop.portal.ScreenCast), but may only be started and stopped + #org.freedesktop.portal.ScreenCast), but may only be started and stopped with this interface. To also get a screen content, call the - #org.freedesktop.ScreenCast.SelectSources with the - #org.freedesktop.Session object created with this method. + org.freedesktop.portal.ScreenCast.SelectSources() with the + #org.freedesktop.portal.Session object created with this method. Supported keys in the @options vardict include: @@ -61,7 +61,7 @@ - + The following results get returned via the #org.freedesktop.portal.Request::Response signal: diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.ScreenCast.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.ScreenCast.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.ScreenCast.xml 2020-09-14 17:03:38.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.ScreenCast.xml 2022-03-29 22:00:20.000000000 +0000 @@ -23,7 +23,7 @@ The Screen cast portal allows to create screen cast sessions. - This documentation describes version 1 of this interface. + This documentation describes version 4 of this interface. --> @@ -235,6 +295,7 @@ 1: MONITOR 2: WINDOW + 4: VIRTUAL --> diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Screenshot.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Screenshot.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Screenshot.xml 2019-11-23 00:40:44.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Screenshot.xml 2022-03-29 22:00:20.000000000 +0000 @@ -60,7 +60,7 @@ interactive b - Hint shether the dialog should offer customization before taking a screenshot. + Hint whether the dialog should offer customization before taking a screenshot. Default is no. Since version 2. @@ -85,7 +85,7 @@ @parent_window: Identifier for the application window, see Common Conventions @options: Vardict with optional further information @handle: Object path for the #org.freedesktop.portal.Request object representing this call - + Obtains the color of a single pixel. Supported keys in the @options vardict include: @@ -96,7 +96,7 @@ A string that will be used as the last element of the @handle. Must be a valid object path element. See the #org.freedesktop.portal.Request documentation for more information about the @handle. - + diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Secret.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Secret.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Secret.xml 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Secret.xml 2022-03-29 22:00:20.000000000 +0000 @@ -39,31 +39,31 @@ Retrieves a master secret for a sandboxed application. - The master secret is unique per application and does not - change as long as the application is installed (once it has - been created). In a typical backend implementation, it is - stored in the user's keyring, under the application ID as a - key. + The master secret is unique per application and does not + change as long as the application is installed (once it has + been created). In a typical backend implementation, it is + stored in the user's keyring, under the application ID as a + key. - While the master secret can be used for encrypting any - confidential data in the sandbox, the format is opaque to the - application. In particular, the length of the secret might not - be sufficient for the use with certain encryption - algorithm. In that case, the application is supposed to expand - it using a KDF algorithm. + While the master secret can be used for encrypting any + confidential data in the sandbox, the format is opaque to the + application. In particular, the length of the secret might not + be sufficient for the use with certain encryption + algorithm. In that case, the application is supposed to expand + it using a KDF algorithm. - The portal may return an additional identifier associated with - the secret in the results vardict of - org.freedesktop.portal.Request.Response() call. In the next - call of this method, the application shall indicate it through - a token element in @options. + The portal may return an additional identifier associated with + the secret in the results vardict of + #org.freedesktop.portal.Request::Response signal. In the next + call of this method, the application shall indicate it through + a token element in @options. Supported keys in the @options vardict include: token s - An opaque string returned by a previous org.freedesktop.portal.Secret.RetrieveSecret() call. + An opaque string returned by a previous org.freedesktop.portal.Secret.RetrieveSecret() call. diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Session.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Session.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Session.xml 2019-11-23 00:40:44.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Session.xml 2022-03-29 22:00:20.000000000 +0000 @@ -31,8 +31,8 @@ The duration of the session is defined by the interface that creates it. For convenience, the interface contains a method org.freedesktop.portal.Session.Close(), and a signal - org.freedesktop.portal.Session::Closed. Whether it is allowed to directly - call Close() depends on the interface. + #org.freedesktop.portal.Session::Closed. Whether it is allowed to directly + call org.freedesktop.portal.Session.Close() depends on the interface. The handle of a session will be of the form /org/freedesktop/portal/desktop/session/SENDER/TOKEN, where SENDER is the diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Settings.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Settings.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Settings.xml 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Settings.xml 2022-03-28 18:02:35.000000000 +0000 @@ -27,9 +27,27 @@ of host settings required for toolkits similar to XSettings. It is not for general purpose settings. - Currently the valid keys are entirely implementation details - that are undocumented. If you are a toolkit and want to use - this please open an issue. + Currently the interface provides the following keys: + + + + org.freedesktop.appearance color-scheme u + + Indicates the system's preferred color scheme. + Supported values are: + + 0: No preference + 1: Prefer dark appearance + 2: Prefer light appearance + + Unknown values should be treated as 0 (no preference). + + + + + Implementations can provide other keys; they are entirely + implementation details that are undocumented. If you are a + toolkit and want to use this please open an issue. This documentation describes version 1 of this interface. --> diff -Nru xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Trash.xml xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Trash.xml --- xdg-desktop-portal-1.8.1/data/org.freedesktop.portal.Trash.xml 2019-11-23 00:40:44.000000000 +0000 +++ xdg-desktop-portal-1.14.3/data/org.freedesktop.portal.Trash.xml 2022-03-28 18:02:35.000000000 +0000 @@ -31,7 +31,7 @@ @@ -56,18 +67,29 @@ diff -Nru xdg-desktop-portal-1.8.1/debian/changelog xdg-desktop-portal-1.14.3/debian/changelog --- xdg-desktop-portal-1.8.1/debian/changelog 2021-08-26 12:24:17.000000000 +0000 +++ xdg-desktop-portal-1.14.3/debian/changelog 2022-04-17 14:46:10.000000000 +0000 @@ -1,3 +1,122 @@ +xdg-desktop-portal (1.14.3-1~flatpak1~20.04) focal; urgency=medium + + * Rebuild for Ubuntu 20.04 'focal'. + - Disable pipewire (screen recording and remote desktop) support. + pipewire in focal is too old for this version of xdg-desktop-portal. + - Use libgdk-pixbuf2.0-dev rather than libgdk-pixbuf-2.0-dev. + - Disable libportal-based tests. + - Roll back debhelper compat level to 12 + - Roll back FUSE compatibility level to 31 (3.9.x) + + -- Simon McVittie Sun, 17 Apr 2022 15:46:10 +0100 + +xdg-desktop-portal (1.14.3-1) unstable; urgency=medium + + * New upstream stable release + + -- Simon McVittie Fri, 15 Apr 2022 16:30:43 +0100 + +xdg-desktop-portal (1.14.2-1) unstable; urgency=medium + + * New upstream release + * Drop patches, applied upstream + + -- Simon McVittie Thu, 31 Mar 2022 12:11:22 +0100 + +xdg-desktop-portal (1.14.1-2) unstable; urgency=medium + + * d/x-d-p.postinst: Clean up enabled state of x-d-p.service on upgrades. + When we upgrade from 1.14.0 to 1.14.1, we want to remove + /etc/systemd/user/graphical-session-pre.target.wants/xdg-desktop-portal.service + so that it will not cause a deadlock during GNOME login. + * d/p/Move-g_string_replace-backport-to-a-separate-translation-.patch, + d/p/rewrite-launchers-Provide-backported-g_string_replace.patch: + Add patches to fix compilation with GLib 2.66, to make backports more + straightforward. + + -- Simon McVittie Sun, 27 Mar 2022 13:05:55 +0100 + +xdg-desktop-portal (1.14.1-1) unstable; urgency=medium + + * New upstream release + * d/p/Revert-Make-x-d-p-start-on-session-start.patch: + Drop patch, the problem was fixed differently upstream + * Package the new xdg-desktop-portal-rewrite-launchers executable + + -- Simon McVittie Sat, 19 Mar 2022 14:08:29 +0000 + +xdg-desktop-portal (1.14.0-2) unstable; urgency=medium + + * d/p/Revert-Make-x-d-p-start-on-session-start.patch: + Revert starting xdg-desktop-portal during session start. + This causes a new GNOME login after a reboot to deadlock. + + -- Simon McVittie Fri, 18 Mar 2022 11:16:06 +0000 + +xdg-desktop-portal (1.14.0-1) unstable; urgency=medium + + * New upstream release + * Drop patches restoring the icon validator. + It has been reinstated upstream. + * Depend and build-depend on FUSE 3 + * d/control, d/rules: Build with libsystemd + + -- Simon McVittie Fri, 18 Mar 2022 09:17:39 +0000 + +xdg-desktop-portal (1.12.2-1) unstable; urgency=medium + + * New upstream release + + -- Simon McVittie Thu, 17 Mar 2022 23:25:45 +0000 + +xdg-desktop-portal (1.12.1-1) unstable; urgency=medium + + * New upstream release + * Drop patches that were applied upstream + * d/copyright: Update + + -- Simon McVittie Wed, 22 Dec 2021 15:46:31 +0000 + +xdg-desktop-portal (1.10.1-4) unstable; urgency=medium + + * Upload to unstable. + The libportal-based build-time test coverage passes on all release + architectures. + + -- Simon McVittie Tue, 16 Nov 2021 10:30:39 +0000 + +xdg-desktop-portal (1.10.1-3) experimental; urgency=medium + + * d/gbp.conf: Branch for experimental + * d/control, d/rules: Enable libportal now that it is available in testing + + -- Simon McVittie Mon, 15 Nov 2021 20:37:48 +0000 + +xdg-desktop-portal (1.10.1-2) unstable; urgency=medium + + * d/p/open-uri-Avoid-calling-into-o.fd.FileManager1-during-star.patch: + Add proposed patch to resolve deadlock with some file managers. + This avoids a long delay during startup of GtkApplication-based + implementations of the o.fd.FileManager1 interface, such as XFCE's + Thunar, in a non-GNOME and non-XFCE environment. (Closes: #994865) + * d/p/build-Fix-cross-compilation-by-adjusting-pkg-config-use.patch: + Add proposed patch to fix cross-compilation. + Thanks to Helmut Grohne (Closes: #985411) + + -- Simon McVittie Fri, 01 Oct 2021 23:29:32 +0100 + +xdg-desktop-portal (1.10.1-1) unstable; urgency=medium + + * New upstream release + * Standards-Version: 4.6.0 (no changes required) + * d/rules: Stop working around wrong permissions on test-document-fuse.py. + This was fixed upstream. + * Don't let debhelper 13 make installed-tests data executable + * Use debhelper compat level 13 + - No need to override dh_missing any more + + -- Simon McVittie Tue, 21 Sep 2021 17:21:24 +0100 + xdg-desktop-portal (1.8.1-1~flatpak1~20.04) focal; urgency=medium * Rebuild for Ubuntu 20.04 'focal'. diff -Nru xdg-desktop-portal-1.8.1/debian/control xdg-desktop-portal-1.14.3/debian/control --- xdg-desktop-portal-1.8.1/debian/control 2021-08-26 12:24:17.000000000 +0000 +++ xdg-desktop-portal-1.14.3/debian/control 2022-04-17 14:46:10.000000000 +0000 @@ -7,22 +7,22 @@ Build-Depends: dbus, debhelper-compat (= 12), - geoclue-2.0 , - fuse , + geoclue-2.0 , + fuse3 , libcap2-bin , libgdk-pixbuf2.0-dev, libgeoclue-2-dev (>= 2.5.2), libflatpak-dev (>= 1.5.0), - libfuse-dev, + libfuse3-dev (>= 3.9.0), libglib2.0-dev, libjson-glib-dev, - libportal-dev (>= 0.3) , + libsystemd-dev, procps , python3 , python3-gi , xmlto, Rules-Requires-Root: no -Standards-Version: 4.5.1 +Standards-Version: 4.6.0 Homepage: https://github.com/flatpak/xdg-desktop-portal Vcs-Git: https://salsa.debian.org/debian/xdg-desktop-portal.git -b debian/buster-backports Vcs-Browser: https://salsa.debian.org/debian/xdg-desktop-portal @@ -33,7 +33,7 @@ Depends: bubblewrap, default-dbus-session-bus | dbus-session-bus, - fuse, + fuse3, ${misc:Depends}, ${shlibs:Depends}, Breaks: diff -Nru xdg-desktop-portal-1.8.1/debian/copyright xdg-desktop-portal-1.14.3/debian/copyright --- xdg-desktop-portal-1.8.1/debian/copyright 2021-08-26 12:24:17.000000000 +0000 +++ xdg-desktop-portal-1.14.3/debian/copyright 2022-04-17 14:46:10.000000000 +0000 @@ -11,7 +11,7 @@ © 2016 Piotr Drag © 2016 Aviary.pl © 2017 Jan Alexander Steffens - © 2018 Igalia S.L. + © 2018-2021 Igalia S.L. License: LGPL-2+ Files: diff -Nru xdg-desktop-portal-1.8.1/debian/patches/Replace-the-icon-validator-with-the-one-from-Flatpak-1.10.patch xdg-desktop-portal-1.14.3/debian/patches/Replace-the-icon-validator-with-the-one-from-Flatpak-1.10.patch --- xdg-desktop-portal-1.8.1/debian/patches/Replace-the-icon-validator-with-the-one-from-Flatpak-1.10.patch 2021-08-26 12:24:17.000000000 +0000 +++ xdg-desktop-portal-1.14.3/debian/patches/Replace-the-icon-validator-with-the-one-from-Flatpak-1.10.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,322 +0,0 @@ -From: Simon McVittie -Date: Fri, 25 Jan 2019 19:13:33 +0000 -Subject: Replace the icon validator with the one from Flatpak 1.10.1 - -We avoid relying on Flatpak here, since that dependency would be quite -circular. - -Signed-off-by: Simon McVittie ---- - src/Makefile.am.inc | 2 +- - src/notification.c | 14 +--- - src/validate-icon.c | 212 ++++++++++++++++++++++++++++++++++++++++++++++++++-- - 3 files changed, 208 insertions(+), 20 deletions(-) - -diff --git a/src/Makefile.am.inc b/src/Makefile.am.inc -index 15cfdc1..c726e47 100644 ---- a/src/Makefile.am.inc -+++ b/src/Makefile.am.inc -@@ -214,4 +214,4 @@ xdg_desktop_portal_CPPFLAGS = \ - - xdg_desktop_portal_validate_icon_SOURCES = src/validate-icon.c - xdg_desktop_portal_validate_icon_LDADD = $(GDK_PIXBUF_LIBS) --xdg_desktop_portal_validate_icon_CFLAGS = $(GDK_PIXBUF_CFLAGS) -DHELPER=\"$(BWRAP)\" -+xdg_desktop_portal_validate_icon_CFLAGS = $(GDK_PIXBUF_CFLAGS) -DHELPER=\"$(BWRAP)\" -D_GNU_SOURCE=1 -diff --git a/src/notification.c b/src/notification.c -index 5412609..35c779c 100644 ---- a/src/notification.c -+++ b/src/notification.c -@@ -366,7 +366,7 @@ validate_icon_more (GVariant *v) - int status; - g_autofree char *err = NULL; - g_autoptr(GError) error = NULL; -- const char *icon_validator = LIBEXECDIR "/flatpak-validate-icon"; -+ const char *icon_validator = LIBEXECDIR "/xdg-desktop-portal-validate-icon"; - const char *args[6]; - - if (G_IS_THEMED_ICON (icon)) -@@ -382,12 +382,6 @@ validate_icon_more (GVariant *v) - return FALSE; - } - -- if (!g_file_test (icon_validator, G_FILE_TEST_EXISTS)) -- { -- g_debug ("Icon validation: %s not found, accepting icon without further validation.", icon_validator); -- return TRUE; -- } -- - bytes = g_bytes_icon_get_bytes (G_BYTES_ICON (icon)); - fd = g_file_open_tmp ("iconXXXXXX", &name, &error); - if (fd == -1) -@@ -420,14 +414,12 @@ validate_icon_more (GVariant *v) - if (!g_spawn_sync (NULL, (char **)args, NULL, 0, NULL, NULL, NULL, &err, &status, &error)) - { - g_debug ("Icon validation: %s", error->message); -- - return FALSE; - } - -- if (!g_spawn_check_exit_status (status, &error)) -+ if (!g_spawn_check_exit_status (status, NULL)) - { -- g_debug ("Icon validation: %s", error->message); -- -+ g_debug ("Icon validation: %s", err); - return FALSE; - } - -diff --git a/src/validate-icon.c b/src/validate-icon.c -index 2bab74f..2c28527 100644 ---- a/src/validate-icon.c -+++ b/src/validate-icon.c -@@ -1,9 +1,35 @@ -+/* -+ * Copyright © 2018 Red Hat, Inc -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library. If not, see . -+ * -+ * Authors: -+ * Matthias Clasen -+ */ -+ - #include -+#include -+#include -+#include - - static int --validate_icon (const char *filename) -+validate_icon (const char *arg_width, -+ const char *arg_height, -+ const char *filename) - { - GdkPixbufFormat *format; -+ int max_width, max_height; - int width, height; - const char *name; - const char *allowed_formats[] = { "png", "jpeg", "svg", NULL }; -@@ -11,7 +37,7 @@ validate_icon (const char *filename) - g_autoptr(GError) error = NULL; - - format = gdk_pixbuf_get_file_info (filename, &width, &height); -- if (format == NULL) -+ if (format == NULL) - { - g_printerr ("Format not recognized\n"); - return 1; -@@ -20,13 +46,35 @@ validate_icon (const char *filename) - name = gdk_pixbuf_format_get_name (format); - if (!g_strv_contains (allowed_formats, name)) - { -- g_printerr ("Format %s not allowed\n", name); -+ g_printerr ("Format %s not accepted\n", name); - return 1; - } - -- if (width > 256 || height > 256) -+ if (!g_str_equal (name, "svg")) -+ { -+ max_width = g_ascii_strtoll (arg_width, NULL, 10); -+ if (max_width < 16 || max_width > 4096) -+ { -+ g_printerr ("Bad width limit: %s\n", arg_width); -+ return 1; -+ } -+ -+ max_height = g_ascii_strtoll (arg_height, NULL, 10); -+ if (max_height < 16 || max_height > 4096) -+ { -+ g_printerr ("Bad height limit: %s\n", arg_height); -+ return 1; -+ } -+ } -+ else -+ { -+ /* Sanity check for vector files */ -+ max_height = max_width = 4096; -+ } -+ -+ if (width > max_width || height > max_height) - { -- g_printerr ("Image too large (%dx%d)\n", width, height); -+ g_printerr ("Image too large (%dx%d). Max. size %dx%d\n", width, height, max_width, max_height); - return 1; - } - -@@ -40,14 +88,162 @@ validate_icon (const char *filename) - return 0; - } - -+G_GNUC_NULL_TERMINATED -+static void -+add_args (GPtrArray *argv_array, ...) -+{ -+ va_list args; -+ const char *arg; -+ -+ va_start (args, argv_array); -+ while ((arg = va_arg (args, const gchar *))) -+ g_ptr_array_add (argv_array, g_strdup (arg)); -+ va_end (args); -+} -+ -+const char * -+flatpak_get_bwrap (void) -+{ -+ const char *e = g_getenv ("FLATPAK_BWRAP"); -+ -+ if (e != NULL) -+ return e; -+ return HELPER; -+} -+ -+ -+static gboolean -+path_is_usrmerged (const char *dir) -+{ -+ /* does /dir point to /usr/dir? */ -+ g_autofree char *target = NULL; -+ GStatBuf stat_buf_src, stat_buf_target; -+ -+ if (g_stat (dir, &stat_buf_src) < 0) -+ return FALSE; -+ -+ target = g_strdup_printf ("/usr/%s", dir); -+ -+ if (g_stat (target, &stat_buf_target) < 0) -+ return FALSE; -+ -+ return (stat_buf_src.st_dev == stat_buf_target.st_dev) && -+ (stat_buf_src.st_ino == stat_buf_target.st_ino); -+} -+ -+static int -+rerun_in_sandbox (const char *arg_width, -+ const char *arg_height, -+ const char *filename) -+{ -+ const char * const usrmerged_dirs[] = { "bin", "lib32", "lib64", "lib", "sbin" }; -+ int i; -+ g_autoptr(GPtrArray) args = g_ptr_array_new_with_free_func (g_free); -+ char validate_icon[PATH_MAX + 1]; -+ ssize_t symlink_size; -+ -+ symlink_size = readlink ("/proc/self/exe", validate_icon, sizeof (validate_icon) - 1); -+ if (symlink_size < 0 || (size_t) symlink_size >= sizeof (validate_icon)) -+ { -+ g_printerr ("Error: failed to read /proc/self/exe\n"); -+ return 1; -+ } -+ -+ validate_icon[symlink_size] = 0; -+ -+ add_args (args, -+ flatpak_get_bwrap (), -+ "--unshare-ipc", -+ "--unshare-net", -+ "--unshare-pid", -+ "--ro-bind", "/usr", "/usr", -+ "--ro-bind", "/etc/ld.so.cache", "/etc/ld.so.cache", -+ "--ro-bind", validate_icon, validate_icon, -+ NULL); -+ -+ /* These directories might be symlinks into /usr/... */ -+ for (i = 0; i < G_N_ELEMENTS (usrmerged_dirs); i++) -+ { -+ g_autofree char *absolute_dir = g_strdup_printf ("/%s", usrmerged_dirs[i]); -+ -+ if (!g_file_test (absolute_dir, G_FILE_TEST_EXISTS)) -+ continue; -+ -+ if (path_is_usrmerged (absolute_dir)) -+ { -+ g_autofree char *symlink_target = g_strdup_printf ("/usr/%s", absolute_dir); -+ -+ add_args (args, -+ "--symlink", symlink_target, absolute_dir, -+ NULL); -+ } -+ else -+ { -+ add_args (args, -+ "--ro-bind", absolute_dir, absolute_dir, -+ NULL); -+ } -+ } -+ -+ add_args (args, -+ "--tmpfs", "/tmp", -+ "--proc", "/proc", -+ "--dev", "/dev", -+ "--chdir", "/", -+ "--setenv", "GIO_USE_VFS", "local", -+ "--unsetenv", "TMPDIR", -+ "--die-with-parent", -+ "--ro-bind", filename, filename, -+ NULL); -+ -+ if (g_getenv ("G_MESSAGES_DEBUG")) -+ add_args (args, "--setenv", "G_MESSAGES_DEBUG", g_getenv ("G_MESSAGES_DEBUG"), NULL); -+ if (g_getenv ("G_MESSAGES_PREFIXED")) -+ add_args (args, "--setenv", "G_MESSAGES_PREFIXED", g_getenv ("G_MESSAGES_PREFIXED"), NULL); -+ -+ add_args (args, validate_icon, arg_width, arg_height, filename, NULL); -+ g_ptr_array_add (args, NULL); -+ -+ { -+ g_autofree char *cmdline = g_strjoinv (" ", (char **) args->pdata); -+ g_debug ("Icon validation: Spawning %s", cmdline); -+ } -+ -+ execvpe (flatpak_get_bwrap (), (char **) args->pdata, NULL); -+ /* If we get here, then execvpe() failed. */ -+ g_printerr ("Icon validation: execvpe %s: %s\n", flatpak_get_bwrap (), g_strerror (errno)); -+ return 1; -+} -+ -+static gboolean opt_sandbox; -+ -+static GOptionEntry entries[] = { -+ { "sandbox", 0, 0, G_OPTION_ARG_NONE, &opt_sandbox, "Run in a sandbox", NULL }, -+ { NULL } -+}; -+ - int - main (int argc, char *argv[]) - { -- if (argc != 2) -+ GOptionContext *context; -+ GError *error = NULL; -+ -+ context = g_option_context_new ("WIDTH HEIGHT PATH"); -+ g_option_context_add_main_entries (context, entries, NULL); -+ if (!g_option_context_parse (context, &argc, &argv, &error)) -+ { -+ g_printerr ("Error: %s\n", error->message); -+ return 1; -+ } -+ -+ if (argc != 4) - { -- g_error ("Expect a single path"); -+ g_printerr ("Usage: %s [OPTION…] WIDTH HEIGHT PATH\n", argv[0]); - return 1; - } - -- return validate_icon (argv[1]); -+ if (opt_sandbox) -+ return rerun_in_sandbox (argv[1], argv[2], argv[3]); -+ else -+ return validate_icon (argv[1], argv[2], argv[3]); - } diff -Nru xdg-desktop-portal-1.8.1/debian/patches/Revert-Stop-building-the-icon-validator.patch xdg-desktop-portal-1.14.3/debian/patches/Revert-Stop-building-the-icon-validator.patch --- xdg-desktop-portal-1.8.1/debian/patches/Revert-Stop-building-the-icon-validator.patch 2021-08-26 12:24:17.000000000 +0000 +++ xdg-desktop-portal-1.14.3/debian/patches/Revert-Stop-building-the-icon-validator.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,102 +0,0 @@ -From: Simon McVittie -Date: Fri, 25 Jan 2019 19:09:54 +0000 -Subject: Revert "Stop building the icon validator" - -This reverts commit 2fb498f92f8e1c41049dedf887690083fa12f6d1. ---- - configure.ac | 1 + - src/Makefile.am.inc | 5 +++++ - src/validate-icon.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 59 insertions(+) - create mode 100644 src/validate-icon.c - -diff --git a/configure.ac b/configure.ac -index c059aa4..afe6778 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -175,6 +175,7 @@ fi - GLIB_TESTS - - PKG_CHECK_MODULES(FUSE, [fuse]) -+PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0]) - - AC_CONFIG_FILES([ - Makefile -diff --git a/src/Makefile.am.inc b/src/Makefile.am.inc -index 961a722..98a917b 100644 ---- a/src/Makefile.am.inc -+++ b/src/Makefile.am.inc -@@ -1,5 +1,6 @@ - libexec_PROGRAMS += \ - xdg-desktop-portal \ -+ xdg-desktop-portal-validate-icon \ - $(NULL) - - service_in_files += \ -@@ -210,3 +211,7 @@ xdg_desktop_portal_CPPFLAGS = \ - -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \ - -DLOCALEDIR=\"$(localedir)\" \ - $(NULL) -+ -+xdg_desktop_portal_validate_icon_SOURCES = src/validate-icon.c -+xdg_desktop_portal_validate_icon_LDADD = $(GDK_PIXBUF_LIBS) -+xdg_desktop_portal_validate_icon_CFLAGS = $(GDK_PIXBUF_CFLAGS) -diff --git a/src/validate-icon.c b/src/validate-icon.c -new file mode 100644 -index 0000000..2bab74f ---- /dev/null -+++ b/src/validate-icon.c -@@ -0,0 +1,53 @@ -+#include -+ -+static int -+validate_icon (const char *filename) -+{ -+ GdkPixbufFormat *format; -+ int width, height; -+ const char *name; -+ const char *allowed_formats[] = { "png", "jpeg", "svg", NULL }; -+ g_autoptr(GdkPixbuf) pixbuf = NULL; -+ g_autoptr(GError) error = NULL; -+ -+ format = gdk_pixbuf_get_file_info (filename, &width, &height); -+ if (format == NULL) -+ { -+ g_printerr ("Format not recognized\n"); -+ return 1; -+ } -+ -+ name = gdk_pixbuf_format_get_name (format); -+ if (!g_strv_contains (allowed_formats, name)) -+ { -+ g_printerr ("Format %s not allowed\n", name); -+ return 1; -+ } -+ -+ if (width > 256 || height > 256) -+ { -+ g_printerr ("Image too large (%dx%d)\n", width, height); -+ return 1; -+ } -+ -+ pixbuf = gdk_pixbuf_new_from_file (filename, &error); -+ if (pixbuf == NULL) -+ { -+ g_printerr ("Failed to load image: %s\n", error->message); -+ return 1; -+ } -+ -+ return 0; -+} -+ -+int -+main (int argc, char *argv[]) -+{ -+ if (argc != 2) -+ { -+ g_error ("Expect a single path"); -+ return 1; -+ } -+ -+ return validate_icon (argv[1]); -+} diff -Nru xdg-desktop-portal-1.8.1/debian/patches/Roll-back-to-FUSE-3.9.x-compatibility.patch xdg-desktop-portal-1.14.3/debian/patches/Roll-back-to-FUSE-3.9.x-compatibility.patch --- xdg-desktop-portal-1.8.1/debian/patches/Roll-back-to-FUSE-3.9.x-compatibility.patch 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/debian/patches/Roll-back-to-FUSE-3.9.x-compatibility.patch 2022-04-17 14:46:10.000000000 +0000 @@ -0,0 +1,34 @@ +From: Simon McVittie +Date: Sun, 17 Apr 2022 15:40:29 +0100 +Subject: Roll back to FUSE 3.9.x compatibility + +--- + configure.ac | 2 +- + document-portal/document-portal-fuse.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 88d97d6..4018742 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -183,7 +183,7 @@ fi + + GLIB_TESTS + +-PKG_CHECK_MODULES(FUSE3, [fuse3 >= 3.10.0]) ++PKG_CHECK_MODULES(FUSE3, [fuse3 >= 3.9.0]) + AC_CHECK_FUNCS(renameat2) + PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0]) + +diff --git a/document-portal/document-portal-fuse.c b/document-portal/document-portal-fuse.c +index 6c5f160..47d7f12 100644 +--- a/document-portal/document-portal-fuse.c ++++ b/document-portal/document-portal-fuse.c +@@ -1,6 +1,6 @@ + #include "config.h" + +-#define FUSE_USE_VERSION 35 ++#define FUSE_USE_VERSION 31 + + #include + diff -Nru xdg-desktop-portal-1.8.1/debian/patches/series xdg-desktop-portal-1.14.3/debian/patches/series --- xdg-desktop-portal-1.8.1/debian/patches/series 2021-08-26 12:24:17.000000000 +0000 +++ xdg-desktop-portal-1.14.3/debian/patches/series 2022-04-17 14:46:10.000000000 +0000 @@ -1,3 +1 @@ -Revert-Stop-building-the-icon-validator.patch -validate-icon-Add-a-define-for-bwrap.patch -Replace-the-icon-validator-with-the-one-from-Flatpak-1.10.patch +Roll-back-to-FUSE-3.9.x-compatibility.patch diff -Nru xdg-desktop-portal-1.8.1/debian/patches/validate-icon-Add-a-define-for-bwrap.patch xdg-desktop-portal-1.14.3/debian/patches/validate-icon-Add-a-define-for-bwrap.patch --- xdg-desktop-portal-1.8.1/debian/patches/validate-icon-Add-a-define-for-bwrap.patch 2021-08-26 12:24:17.000000000 +0000 +++ xdg-desktop-portal-1.14.3/debian/patches/validate-icon-Add-a-define-for-bwrap.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -From: Simon McVittie -Date: Fri, 25 Jan 2019 20:35:42 +0000 -Subject: validate-icon: Add a #define for bwrap - -Signed-off-by: Simon McVittie ---- - src/Makefile.am.inc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/Makefile.am.inc b/src/Makefile.am.inc -index 98a917b..15cfdc1 100644 ---- a/src/Makefile.am.inc -+++ b/src/Makefile.am.inc -@@ -214,4 +214,4 @@ xdg_desktop_portal_CPPFLAGS = \ - - xdg_desktop_portal_validate_icon_SOURCES = src/validate-icon.c - xdg_desktop_portal_validate_icon_LDADD = $(GDK_PIXBUF_LIBS) --xdg_desktop_portal_validate_icon_CFLAGS = $(GDK_PIXBUF_CFLAGS) -+xdg_desktop_portal_validate_icon_CFLAGS = $(GDK_PIXBUF_CFLAGS) -DHELPER=\"$(BWRAP)\" diff -Nru xdg-desktop-portal-1.8.1/debian/rules xdg-desktop-portal-1.14.3/debian/rules --- xdg-desktop-portal-1.8.1/debian/rules 2021-08-26 12:24:17.000000000 +0000 +++ xdg-desktop-portal-1.14.3/debian/rules 2022-04-17 14:46:10.000000000 +0000 @@ -5,14 +5,13 @@ include /usr/share/dpkg/default.mk -CONFFLAGS += --disable-pipewire +built_binaries := $(shell dh_listpackages) + +CONFFLAGS := -# ITP #946605 -ifeq ($(filter pkg.libportal.enable,$(DEB_BUILD_PROFILES)),) +# No suitable version in Ubuntu < 22.04 CONFFLAGS += --disable-libportal -else -CONFFLAGS += --enable-libportal -endif +CONFFLAGS += --disable-pipewire %: dh $@ @@ -22,7 +21,9 @@ --enable-docbook-docs \ --enable-geoclue \ --enable-installed-tests \ + --enable-libportal \ --enable-pipewire \ + --with-systemd \ $(CONFFLAGS) $(NULL) @@ -31,8 +32,15 @@ override_dh_auto_test: ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),) - chmod +x tests/test-document-fuse.py G_MESSAGES_DEBUG=all \ TEST_IN_CI=1 \ dh_auto_test --no-parallel endif + +# debhelper >= 13.4 makes all of /usr/libexec executable, which is not +# quite right for installed-tests +override_dh_fixperms: + dh_fixperms -Xusr/libexec/installed-tests +ifneq ($(filter %-tests,$(built_binaries)),) + chmod --recursive --changes a+rX,u+w,og-w debian/*-tests/usr/libexec/installed-tests +endif diff -Nru xdg-desktop-portal-1.8.1/debian/xdg-desktop-portal.install xdg-desktop-portal-1.14.3/debian/xdg-desktop-portal.install --- xdg-desktop-portal-1.8.1/debian/xdg-desktop-portal.install 2021-08-26 12:24:17.000000000 +0000 +++ xdg-desktop-portal-1.14.3/debian/xdg-desktop-portal.install 2022-04-17 14:46:10.000000000 +0000 @@ -1,5 +1,6 @@ usr/lib/systemd/user usr/libexec/xdg-desktop-portal +usr/libexec/xdg-desktop-portal-rewrite-launchers usr/libexec/xdg-desktop-portal-validate-icon usr/libexec/xdg-document-portal usr/libexec/xdg-permission-store diff -Nru xdg-desktop-portal-1.8.1/debian/xdg-desktop-portal.postinst xdg-desktop-portal-1.14.3/debian/xdg-desktop-portal.postinst --- xdg-desktop-portal-1.8.1/debian/xdg-desktop-portal.postinst 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/debian/xdg-desktop-portal.postinst 2022-04-17 14:46:10.000000000 +0000 @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +if [ -n "$2" ] && dpkg --compare-versions "$2" ge 1.14.0 && dpkg --compare-versions "$2" lt 1.14.1-1~bpo11+1; then + deb-systemd-helper --user disable xdg-desktop-portal.service +fi + +#DEBHELPER# + +# vim:set sw=4 sts=4 et: diff -Nru xdg-desktop-portal-1.8.1/depcomp xdg-desktop-portal-1.14.3/depcomp --- xdg-desktop-portal-1.8.1/depcomp 2021-02-17 03:14:46.000000000 +0000 +++ xdg-desktop-portal-1.14.3/depcomp 2022-03-29 23:42:31.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru xdg-desktop-portal-1.8.1/doc/docbook.css xdg-desktop-portal-1.14.3/doc/docbook.css --- xdg-desktop-portal-1.8.1/doc/docbook.css 2019-10-22 22:22:01.000000000 +0000 +++ xdg-desktop-portal-1.14.3/doc/docbook.css 2022-03-28 18:02:35.000000000 +0000 @@ -1,61 +1,51 @@ -body -{ +body { font-family: sans-serif; + max-width: 850px; + margin: auto; } -h1.title -{ +h1.title { } -.permission -{ +.permission { color: #ee0000; text-decoration: underline; } -.synopsis, .classsynopsis -{ +.synopsis, +.classsynopsis { background: #eeeeee; border: solid 1px #aaaaaa; padding: 0.5em; } -.programlisting -{ +.programlisting { background: #eeeeff; border: solid 1px #aaaaff; padding: 0.5em; } -.variablelist -{ +.variablelist { padding: 4px; margin-left: 3em; } -.variablelist td:first-child -{ +.variablelist td:first-child { vertical-align: top; } -td.shortcuts -{ +td.shortcuts { color: #770000; font-size: 80%; } -div.refnamediv -{ +div.refnamediv { margin-top: 2em; } -div.toc -{ +div.toc { border: 2em; } -a -{ +a { text-decoration: none; } -a:hover -{ +a:hover { text-decoration: underline; - color: #FF0000; + color: #ff0000; } -div.table table -{ +div.table table { border-collapse: collapse; border-spacing: 0px; border-style: solid; @@ -63,8 +53,8 @@ border-width: 1px; } -div.table table td, div.table table th -{ +div.table table td, +div.table table th { border-style: solid; border-color: #777777; border-width: 1px; @@ -72,7 +62,31 @@ vertical-align: top; } -div.table table th -{ +div.table table th { background-color: #eeeeee; } + +@media (prefers-color-scheme: dark) { + html { + background-color: #222222; + color: #dddddd; + } + + a { + color: #8886fa; + } + + a:hover { + color: #5a57fa; + } + + .synopsis, + .classsynopsis { + background: #161616; + border: solid 1px #aaaaaa; + } + .programlisting { + background: #161616; + border: solid 1px #aaaaff; + } +} diff -Nru xdg-desktop-portal-1.8.1/doc/Makefile.am xdg-desktop-portal-1.14.3/doc/Makefile.am --- xdg-desktop-portal-1.8.1/doc/Makefile.am 2020-09-14 17:03:38.000000000 +0000 +++ xdg-desktop-portal-1.14.3/doc/Makefile.am 2022-03-29 22:00:20.000000000 +0000 @@ -1,102 +1,19 @@ NULL = +include $(top_srcdir)/Makefile.am.inc + org.freedesktop.portal.Flatpak.xml : cp $(FLATPAK_INTERFACES_DIR)/org.freedesktop.portal.Flatpak.xml . portal_files = \ org.freedesktop.portal.Flatpak.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Request.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Session.xml \ - $(top_srcdir)/data/org.freedesktop.portal.FileChooser.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Trash.xml \ - $(top_srcdir)/data/org.freedesktop.portal.OpenURI.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Print.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Email.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Screenshot.xml \ - $(top_srcdir)/data/org.freedesktop.portal.ScreenCast.xml \ - $(top_srcdir)/data/org.freedesktop.portal.RemoteDesktop.xml \ - $(top_srcdir)/data/org.freedesktop.portal.NetworkMonitor.xml \ - $(top_srcdir)/data/org.freedesktop.portal.ProxyResolver.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Notification.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Inhibit.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Device.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Location.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Settings.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Secret.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Background.xml \ - $(top_srcdir)/data/org.freedesktop.portal.GameMode.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Camera.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Wallpaper.xml \ - $(top_srcdir)/data/org.freedesktop.portal.MemoryMonitor.xml \ - $(top_srcdir)/data/org.freedesktop.portal.FileTransfer.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Request.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Session.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.FileChooser.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.AppChooser.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Print.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Email.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Screenshot.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.ScreenCast.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.RemoteDesktop.xml\ - $(top_srcdir)/data/org.freedesktop.impl.portal.Notification.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Inhibit.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Access.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Settings.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Secret.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Lockdown.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Documents.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.PermissionStore.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Background.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Wallpaper.xml \ + $(PORTAL_IFACE_FILES) \ + $(PORTAL_IMPL_IFACE_FILES) \ $(NULL) -xml_files = \ - portal-org.freedesktop.portal.Flatpak.xml \ - portal-org.freedesktop.portal.Flatpak.UpdateMonitor.xml \ - portal-org.freedesktop.portal.Request.xml \ - portal-org.freedesktop.portal.Session.xml \ - portal-org.freedesktop.portal.FileChooser.xml \ - portal-org.freedesktop.portal.Trash.xml \ - portal-org.freedesktop.portal.OpenURI.xml \ - portal-org.freedesktop.portal.Print.xml \ - portal-org.freedesktop.portal.Email.xml \ - portal-org.freedesktop.portal.Screenshot.xml \ - portal-org.freedesktop.portal.ScreenCast.xml \ - portal-org.freedesktop.portal.RemoteDesktop.xml \ - portal-org.freedesktop.portal.NetworkMonitor.xml \ - portal-org.freedesktop.portal.ProxyResolver.xml \ - portal-org.freedesktop.portal.Notification.xml \ - portal-org.freedesktop.portal.Inhibit.xml \ - portal-org.freedesktop.portal.Documents.xml \ - portal-org.freedesktop.portal.Device.xml \ - portal-org.freedesktop.portal.Location.xml \ - portal-org.freedesktop.portal.Settings.xml \ - portal-org.freedesktop.portal.Secret.xml \ - portal-org.freedesktop.portal.Wallpaper.xml \ - portal-org.freedesktop.portal.Background.xml \ - portal-org.freedesktop.portal.GameMode.xml \ - portal-org.freedesktop.portal.Camera.xml \ - portal-org.freedesktop.portal.MemoryMonitor.xml \ - portal-org.freedesktop.impl.portal.Background.xml \ - portal-org.freedesktop.portal.FileTransfer.xml \ - portal-org.freedesktop.impl.portal.Request.xml \ - portal-org.freedesktop.impl.portal.Session.xml \ - portal-org.freedesktop.impl.portal.FileChooser.xml \ - portal-org.freedesktop.impl.portal.AppChooser.xml \ - portal-org.freedesktop.impl.portal.Print.xml \ - portal-org.freedesktop.impl.portal.Email.xml \ - portal-org.freedesktop.impl.portal.Screenshot.xml \ - portal-org.freedesktop.impl.portal.ScreenCast.xml \ - portal-org.freedesktop.impl.portal.RemoteDesktop.xml \ - portal-org.freedesktop.impl.portal.Notification.xml \ - portal-org.freedesktop.impl.portal.Inhibit.xml \ - portal-org.freedesktop.impl.portal.Access.xml \ - portal-org.freedesktop.impl.portal.Settings.xml \ - portal-org.freedesktop.impl.portal.Secret.xml \ - portal-org.freedesktop.impl.portal.Wallpaper.xml \ - portal-org.freedesktop.impl.portal.Lockdown.xml \ - portal-org.freedesktop.impl.portal.PermissionStore.xml \ - $(NULL) +# Sub-interface of org.freedesktop.portal.Flatpak.xml +extra_xml_files = org.freedesktop.portal.Flatpak.UpdateMonitor.xml +xml_files = $(addprefix portal-, $(notdir $(portal_files) $(extra_xml_files))) EXTRA_DIST = \ org.freedesktop.portal.Flatpak.xml \ diff -Nru xdg-desktop-portal-1.8.1/doc/Makefile.in xdg-desktop-portal-1.14.3/doc/Makefile.in --- xdg-desktop-portal-1.8.1/doc/Makefile.in 2021-02-17 03:14:46.000000000 +0000 +++ xdg-desktop-portal-1.14.3/doc/Makefile.in 2022-03-29 23:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -155,7 +155,8 @@ am__installdirs = "$(DESTDIR)$(docdir)" DATA = $(doc_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/portal-docs.xml.in +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/portal-docs.xml.in \ + $(top_srcdir)/Makefile.am.inc DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -187,9 +188,11 @@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLATPAK_INTERFACES_DIR = @FLATPAK_INTERFACES_DIR@ -FUSE_CFLAGS = @FUSE_CFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ +FUSE3_CFLAGS = @FUSE3_CFLAGS@ +FUSE3_LIBS = @FUSE3_LIBS@ GDBUS_CODEGEN = @GDBUS_CODEGEN@ +GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ +GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ GENHTML = @GENHTML@ GEOCLUE_CFLAGS = @GEOCLUE_CFLAGS@ GEOCLUE_LIBS = @GEOCLUE_LIBS@ @@ -197,6 +200,8 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB260_CFLAGS = @GLIB260_CFLAGS@ GLIB260_LIBS = @GLIB260_LIBS@ +GLIB266_CFLAGS = @GLIB266_CFLAGS@ +GLIB266_LIBS = @GLIB266_LIBS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -256,6 +261,8 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ @@ -309,6 +316,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -319,101 +327,71 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ NULL = +PORTAL_IFACE_FILES = \ + $(top_srcdir)/data/org.freedesktop.portal.Account.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Background.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Camera.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Device.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Documents.xml \ + $(top_srcdir)/data/org.freedesktop.portal.DynamicLauncher.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Email.xml \ + $(top_srcdir)/data/org.freedesktop.portal.FileChooser.xml \ + $(top_srcdir)/data/org.freedesktop.portal.FileTransfer.xml \ + $(top_srcdir)/data/org.freedesktop.portal.GameMode.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Inhibit.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Location.xml \ + $(top_srcdir)/data/org.freedesktop.portal.MemoryMonitor.xml \ + $(top_srcdir)/data/org.freedesktop.portal.NetworkMonitor.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Notification.xml \ + $(top_srcdir)/data/org.freedesktop.portal.OpenURI.xml \ + $(top_srcdir)/data/org.freedesktop.portal.PowerProfileMonitor.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Print.xml \ + $(top_srcdir)/data/org.freedesktop.portal.ProxyResolver.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Realtime.xml \ + $(top_srcdir)/data/org.freedesktop.portal.RemoteDesktop.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Request.xml \ + $(top_srcdir)/data/org.freedesktop.portal.ScreenCast.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Screenshot.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Secret.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Session.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Settings.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Trash.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Wallpaper.xml \ + $(NULL) + +PORTAL_IMPL_IFACE_FILES = \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Access.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Account.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.AppChooser.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Background.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.DynamicLauncher.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Email.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.FileChooser.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Inhibit.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Lockdown.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Notification.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.PermissionStore.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Print.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.RemoteDesktop.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Request.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.ScreenCast.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Screenshot.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Secret.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Session.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Settings.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Wallpaper.xml \ + $(NULL) + portal_files = \ org.freedesktop.portal.Flatpak.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Request.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Session.xml \ - $(top_srcdir)/data/org.freedesktop.portal.FileChooser.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Trash.xml \ - $(top_srcdir)/data/org.freedesktop.portal.OpenURI.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Print.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Email.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Screenshot.xml \ - $(top_srcdir)/data/org.freedesktop.portal.ScreenCast.xml \ - $(top_srcdir)/data/org.freedesktop.portal.RemoteDesktop.xml \ - $(top_srcdir)/data/org.freedesktop.portal.NetworkMonitor.xml \ - $(top_srcdir)/data/org.freedesktop.portal.ProxyResolver.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Notification.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Inhibit.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Device.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Location.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Settings.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Secret.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Background.xml \ - $(top_srcdir)/data/org.freedesktop.portal.GameMode.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Camera.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Wallpaper.xml \ - $(top_srcdir)/data/org.freedesktop.portal.MemoryMonitor.xml \ - $(top_srcdir)/data/org.freedesktop.portal.FileTransfer.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Request.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Session.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.FileChooser.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.AppChooser.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Print.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Email.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Screenshot.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.ScreenCast.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.RemoteDesktop.xml\ - $(top_srcdir)/data/org.freedesktop.impl.portal.Notification.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Inhibit.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Access.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Settings.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Secret.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Lockdown.xml \ - $(top_srcdir)/data/org.freedesktop.portal.Documents.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.PermissionStore.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Background.xml \ - $(top_srcdir)/data/org.freedesktop.impl.portal.Wallpaper.xml \ + $(PORTAL_IFACE_FILES) \ + $(PORTAL_IMPL_IFACE_FILES) \ $(NULL) -xml_files = \ - portal-org.freedesktop.portal.Flatpak.xml \ - portal-org.freedesktop.portal.Flatpak.UpdateMonitor.xml \ - portal-org.freedesktop.portal.Request.xml \ - portal-org.freedesktop.portal.Session.xml \ - portal-org.freedesktop.portal.FileChooser.xml \ - portal-org.freedesktop.portal.Trash.xml \ - portal-org.freedesktop.portal.OpenURI.xml \ - portal-org.freedesktop.portal.Print.xml \ - portal-org.freedesktop.portal.Email.xml \ - portal-org.freedesktop.portal.Screenshot.xml \ - portal-org.freedesktop.portal.ScreenCast.xml \ - portal-org.freedesktop.portal.RemoteDesktop.xml \ - portal-org.freedesktop.portal.NetworkMonitor.xml \ - portal-org.freedesktop.portal.ProxyResolver.xml \ - portal-org.freedesktop.portal.Notification.xml \ - portal-org.freedesktop.portal.Inhibit.xml \ - portal-org.freedesktop.portal.Documents.xml \ - portal-org.freedesktop.portal.Device.xml \ - portal-org.freedesktop.portal.Location.xml \ - portal-org.freedesktop.portal.Settings.xml \ - portal-org.freedesktop.portal.Secret.xml \ - portal-org.freedesktop.portal.Wallpaper.xml \ - portal-org.freedesktop.portal.Background.xml \ - portal-org.freedesktop.portal.GameMode.xml \ - portal-org.freedesktop.portal.Camera.xml \ - portal-org.freedesktop.portal.MemoryMonitor.xml \ - portal-org.freedesktop.impl.portal.Background.xml \ - portal-org.freedesktop.portal.FileTransfer.xml \ - portal-org.freedesktop.impl.portal.Request.xml \ - portal-org.freedesktop.impl.portal.Session.xml \ - portal-org.freedesktop.impl.portal.FileChooser.xml \ - portal-org.freedesktop.impl.portal.AppChooser.xml \ - portal-org.freedesktop.impl.portal.Print.xml \ - portal-org.freedesktop.impl.portal.Email.xml \ - portal-org.freedesktop.impl.portal.Screenshot.xml \ - portal-org.freedesktop.impl.portal.ScreenCast.xml \ - portal-org.freedesktop.impl.portal.RemoteDesktop.xml \ - portal-org.freedesktop.impl.portal.Notification.xml \ - portal-org.freedesktop.impl.portal.Inhibit.xml \ - portal-org.freedesktop.impl.portal.Access.xml \ - portal-org.freedesktop.impl.portal.Settings.xml \ - portal-org.freedesktop.impl.portal.Secret.xml \ - portal-org.freedesktop.impl.portal.Wallpaper.xml \ - portal-org.freedesktop.impl.portal.Lockdown.xml \ - portal-org.freedesktop.impl.portal.PermissionStore.xml \ - $(NULL) +# Sub-interface of org.freedesktop.portal.Flatpak.xml +extra_xml_files = org.freedesktop.portal.Flatpak.UpdateMonitor.xml +xml_files = $(addprefix portal-, $(notdir $(portal_files) $(extra_xml_files))) EXTRA_DIST = \ org.freedesktop.portal.Flatpak.xml \ docbook.css \ @@ -438,7 +416,7 @@ all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.inc $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -458,6 +436,7 @@ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; +$(top_srcdir)/Makefile.am.inc $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh diff -Nru xdg-desktop-portal-1.8.1/doc/org.freedesktop.portal.Flatpak.xml xdg-desktop-portal-1.14.3/doc/org.freedesktop.portal.Flatpak.xml --- xdg-desktop-portal-1.8.1/doc/org.freedesktop.portal.Flatpak.xml 2021-02-17 03:15:21.000000000 +0000 +++ xdg-desktop-portal-1.14.3/doc/org.freedesktop.portal.Flatpak.xml 2022-03-29 23:42:48.000000000 +0000 @@ -32,11 +32,11 @@ host to the sandbox. For example, it allows you to restart the applications or start a more sandboxed instance. - The D-Bus interface for the document portal is available under the + This portal is available on the D-Bus session bus under the bus name org.freedesktop.portal.Flatpak and the object path /org/freedesktop/portal/Flatpak. - This documentation describes version 3 of this interface. + This documentation describes version 6 of this interface. --> @@ -47,9 +47,11 @@ The following flags values are supported: - 1 + 1 (FLATPAK_SPAWN_SUPPORT_FLAGS_EXPOSE_PIDS) - Supports the expose sandbox pids flag of Spawn. + Supports the expose sandbox pids flag of Spawn. + If the version of this interface is 5 or later, this also + indicates that the share sandbox pids flag is available. @@ -68,52 +70,93 @@ @options: Vardict with optional further information @pid: the PID of the new process - This methods let you start a new instance of your + This method lets you start a new instance of your application, optionally enabling a tighter sandbox. The following flags values are supported: - 1 + 1 (FLATPAK_SPAWN_FLAGS_CLEAR_ENV) Clear the environment. - 2 + 2 (FLATPAK_SPAWN_FLAGS_LATEST_VERSION) Spawn the latest version of the app. - 4 + 4 (FLATPAK_SPAWN_FLAGS_SANDBOX) Spawn in a sandbox (equivalent of the sandbox option of flatpak run). - 8 + 8 (FLATPAK_SPAWN_FLAGS_NO_NETWORK) Spawn without network (equivalent of the unshare=network option of flatpak run). - 16 + 16 (FLATPAK_SPAWN_FLAGS_WATCH_BUS) Kill the sandbox when the caller disappears from the session bus. - 32 + 32 (FLATPAK_SPAWN_FLAGS_EXPOSE_PIDS) Expose the sandbox pids in the callers sandbox, only supported if using user namespaces for containers (not setuid), see the support property. This was added in version 3 of this interface (available from flatpak 1.6.0 and later). + + 64 (FLATPAK_SPAWN_FLAGS_NOTIFY_START) + + Emit a SpawnStarted signal once the sandboxed process has been + fully started. + + This was added in version 4 of this interface (available from flatpak 1.8.0 and later). + + + + 128 (FLATPAK_SPAWN_FLAGS_SHARE_PIDS) + + Expose the sandbox process IDs in the caller's sandbox and + the caller's process IDs in the new sandbox. Only supported + if using user namespaces for containers (not setuid), see the + support property. + + This was added in version 5 of this interface (available from flatpak 1.10.0 and later). + + + + 256 (FLATPAK_SPAWN_FLAGS_EMPTY_APP) + + Don't provide app files at /app in the + new sandbox. Instead, /app will be an + empty directory. This flag and the + option are mutually exclusive. + + As with the option, the caller's + Flatpak app files and extensions will be mounted on + /run/parent/app, with + filenames like /run/parent/app/bin/myapp. + + This was added in version 6 of this interface (available from + flatpak 1.12.0 and later). + + - The following options are supported: + Unknown (unsupported) flags are an error and will cause Spawn() + to fail. + + Unknown (unsupported) options are ignored. + The following options are supported: sandbox-expose as @@ -197,6 +240,63 @@ This was added in version 3 of this interface (available from flatpak 1.6.0 and later). + + unset-env as + + A list of environment variables to unset (remove from the environment). + + This was added in version 5 of this interface (available from flatpak 1.10.0 and later). + + + + usr-fd h + + A file descriptor for the directory that will be used as + /usr in the new sandbox, instead of the + files directory + from the caller's Flatpak runtime. + The new sandbox's /etc will be based + on the etc subdirectory of the given + directory, and compatibility symlinks in its + root directory (/lib, + /bin and so on) will point into the + given directory. The caller's Flatpak runtime and its + extensions will be mounted on + /run/parent/usr, with filenames like + /run/parent/usr/bin/env, + and compatibility symlinks like + /run/parent/bin → + usr/bin. + + The file descriptor must be opened with O_PATH and + O_NOFOLLOW and cannot be a symlink. + + This was added in version 6 of this interface (available from + flatpak 1.12.0 and later). + + + + app-fd h + + A file descriptor for the directory that will be used as + /app in the new sandbox, instead of the + files directory + from the caller's Flatpak app. The caller's Flatpak app + files and extensions will be + mounted on /run/parent/app, with + filenames like /run/parent/app/bin/myapp. + + This option and the + + flag are mutually exclusive. + + The file descriptor must be opened with O_PATH and + O_NOFOLLOW and cannot be a symlink. + + This was added in version 6 of this interface (available from + flatpak 1.12.0 and later). + + --> @@ -213,14 +313,15 @@ @@ -229,12 +330,43 @@ + + + + + + diff -Nru xdg-desktop-portal-1.8.1/doc/portal-docs.xml.in xdg-desktop-portal-1.14.3/doc/portal-docs.xml.in --- xdg-desktop-portal-1.8.1/doc/portal-docs.xml.in 2020-09-14 17:03:38.000000000 +0000 +++ xdg-desktop-portal-1.14.3/doc/portal-docs.xml.in 2022-03-29 22:00:20.000000000 +0000 @@ -66,7 +66,7 @@ Under X11, the "parent_window" argument should have the form "x11:XID", where XID - is the XID of the application window. + is the XID of the application window in hexadecimal notation. Under Wayland, it should have the form "wayland:HANDLE", @@ -90,33 +90,37 @@ bus. - - - - - - - + + + - - - - - + + + + + + + + + + + + + + - + + + + + - - - - + + + - - - - Portal Backend API Reference @@ -139,23 +143,24 @@ by the portal frontend. - - - + + - + - - - - + - - - - + + + + + + + + + diff -Nru xdg-desktop-portal-1.8.1/document-portal/document-enums.h xdg-desktop-portal-1.14.3/document-portal/document-enums.h --- xdg-desktop-portal-1.8.1/document-portal/document-enums.h 2020-03-13 12:38:51.000000000 +0000 +++ xdg-desktop-portal-1.14.3/document-portal/document-enums.h 2022-03-29 22:00:20.000000000 +0000 @@ -1,5 +1,4 @@ -#ifndef XDP_ENUMS_H -#define XDP_ENUMS_H +#pragma once G_BEGIN_DECLS @@ -22,5 +21,3 @@ } DocumentAddFullFlags; G_END_DECLS - -#endif /* XDP_ENUMS_H */ diff -Nru xdg-desktop-portal-1.8.1/document-portal/document-portal.c xdg-desktop-portal-1.14.3/document-portal/document-portal.c --- xdg-desktop-portal-1.8.1/document-portal/document-portal.c 2021-02-09 20:03:56.000000000 +0000 +++ xdg-desktop-portal-1.14.3/document-portal/document-portal.c 2022-03-29 22:00:20.000000000 +0000 @@ -109,7 +109,6 @@ GVariant *parameters, XdpAppInfo *app_info) { - const char *app_id = xdp_app_info_get_id (app_info); const char *target_app_id; const char *id; g_autofree const char **permissions = NULL; @@ -148,7 +147,7 @@ } /* Must have grant-permissions and all the newly granted permissions */ - if (!document_entry_has_permissions (entry, app_id, + if (!document_entry_has_permissions (entry, app_info, DOCUMENT_PERMISSION_FLAGS_GRANT_PERMISSIONS | perms)) { g_dbus_method_invocation_return_error (invocation, @@ -158,7 +157,7 @@ } do_set_permissions (entry, id, target_app_id, - perms | document_entry_get_permissions (entry, target_app_id)); + perms | document_entry_get_permissions_by_app_id (entry, target_app_id)); } /* Invalidate with lock dropped to avoid deadlock */ @@ -211,7 +210,7 @@ } /* Must have grant-permissions, or be itself */ - if (!document_entry_has_permissions (entry, app_id, + if (!document_entry_has_permissions (entry, app_info, DOCUMENT_PERMISSION_FLAGS_GRANT_PERMISSIONS) || strcmp (app_id, target_app_id) == 0) { @@ -222,7 +221,7 @@ } do_set_permissions (entry, id, target_app_id, - ~perms & document_entry_get_permissions (entry, target_app_id)); + ~perms & document_entry_get_permissions_by_app_id (entry, target_app_id)); } /* Invalidate with lock dropped to avoid deadlock */ @@ -237,7 +236,6 @@ XdpAppInfo *app_info) { const char *id; - const char *app_id = xdp_app_info_get_id (app_info); g_autoptr(PermissionDbEntry) entry = NULL; g_autofree const char **old_apps = NULL; int i; @@ -258,7 +256,7 @@ return; } - if (!document_entry_has_permissions (entry, app_id, DOCUMENT_PERMISSION_FLAGS_DELETE)) + if (!document_entry_has_permissions (entry, app_info, DOCUMENT_PERMISSION_FLAGS_DELETE)) { g_dbus_method_invocation_return_error (invocation, XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, @@ -362,10 +360,15 @@ g_autofree char *name = NULL; xdp_autofd int dir_fd = -1; struct stat real_st_buf; + g_autoptr(GError) local_error = NULL; + + path = xdp_app_info_get_path_for_fd (app_info, fd, 0, st_buf, writable_out, &local_error); - path = xdp_app_info_get_path_for_fd (app_info, fd, 0, st_buf, writable_out); if (path == NULL) - goto errout; + { + g_debug ("Invalid fd passed: %s", local_error->message); + goto errout; + } if ((ensure_type == VALIDATE_FD_FILE_TYPE_REGULAR || ensure_type == VALIDATE_FD_FILE_TYPE_ANY) && S_ISREG (st_buf->st_mode)) { @@ -417,7 +420,7 @@ verify_existing_document (struct stat *st_buf, gboolean reuse_existing, gboolean directory, - const char *app_id, + XdpAppInfo *app_info, gboolean allow_write, char **real_path_out) { @@ -447,8 +450,7 @@ /* Don't allow re-exposing non-writable document as writable */ if (allow_write && - app_id != NULL && - !document_entry_has_permissions (old_entry, app_id, DOCUMENT_PERMISSION_FLAGS_WRITE)) + !document_entry_has_permissions (old_entry, app_info, DOCUMENT_PERMISSION_FLAGS_WRITE)) return NULL; return g_steal_pointer (&id); @@ -813,7 +815,7 @@ g_autofree char *id = NULL; /* The passed in fd is on the fuse filesystem itself */ - id = verify_existing_document (&st_buf, reuse_existing, is_dir, app_id, allow_write, &real_path); + id = verify_existing_document (&st_buf, reuse_existing, is_dir, app_info, allow_write, &real_path); if (id == NULL) { g_set_error (error, @@ -947,7 +949,7 @@ filename = g_variant_get_bytestring (filename_v); /* This is only allowed from the host, or else we could leak existence of files */ - if (*app_id != 0) + if (!xdp_app_info_is_host (app_info)) { g_dbus_method_invocation_return_error (invocation, XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, @@ -995,9 +997,16 @@ return; } - parent_path = xdp_app_info_get_path_for_fd (app_info, parent_fd, S_IFDIR, &parent_st_buf, NULL); + parent_path = xdp_app_info_get_path_for_fd (app_info, parent_fd, S_IFDIR, &parent_st_buf, NULL, &error); if (parent_path == NULL || parent_st_buf.st_dev == fuse_dev) { + if (parent_path == NULL) + g_debug ("Invalid fd passed: %s", error->message); + else + g_debug ("Invalid fd passed: \"%s\" not on FUSE device", parent_path); + + /* Don't leak any info about real file path existence, etc */ + g_clear_error (&error); g_dbus_method_invocation_return_error (invocation, XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, "Invalid fd passed"); @@ -1071,7 +1080,6 @@ GVariant *parameters, XdpAppInfo *app_info) { - const char *app_id = xdp_app_info_get_id (app_info); GDBusMessage *message; GUnixFDList *fd_list; g_autofree char *id = NULL; @@ -1082,14 +1090,14 @@ struct stat parent_st_buf; const char *filename; gboolean reuse_existing, persistent; - + g_autoptr(GError) local_error = NULL; g_autoptr(GVariant) filename_v = NULL; g_variant_get (parameters, "(h@aybb)", &parent_fd_id, &filename_v, &reuse_existing, &persistent); filename = g_variant_get_bytestring (filename_v); /* This is only allowed from the host, or else we could leak existence of files */ - if (*app_id != 0) + if (!xdp_app_info_is_host (app_info)) { g_dbus_method_invocation_return_error (invocation, XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, @@ -1116,9 +1124,16 @@ return; } - parent_path = xdp_app_info_get_path_for_fd (app_info, parent_fd, S_IFDIR, &parent_st_buf, NULL); + parent_path = xdp_app_info_get_path_for_fd (app_info, parent_fd, S_IFDIR, &parent_st_buf, NULL, &local_error); if (parent_path == NULL || parent_st_buf.st_dev == fuse_dev) { + if (parent_path == NULL) + g_debug ("Invalid fd passed: %s", local_error->message); + else + g_debug ("Invalid fd passed: \"%s\" not on FUSE device", parent_path); + + /* Don't leak any info about real file path existence, etc */ + g_clear_error (&local_error); g_dbus_method_invocation_return_error (invocation, XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, "Invalid fd passed"); @@ -1482,11 +1497,11 @@ g_main_loop_quit (loop); } -void +int on_fuse_unmount (void) { if (!g_main_loop_is_running (loop)) - return; + return G_SOURCE_REMOVE; g_debug ("fuse fs unmounted externally"); @@ -1497,6 +1512,8 @@ g_set_error (&exit_error, G_IO_ERROR, G_IO_ERROR_FAILED, "Fuse filesystem unmounted"); g_main_loop_quit (loop); + + return G_SOURCE_REMOVE; } static void diff -Nru xdg-desktop-portal-1.8.1/document-portal/document-portal-fuse.c xdg-desktop-portal-1.14.3/document-portal/document-portal-fuse.c --- xdg-desktop-portal-1.8.1/document-portal/document-portal-fuse.c 2020-09-14 17:03:38.000000000 +0000 +++ xdg-desktop-portal-1.14.3/document-portal/document-portal-fuse.c 2022-03-29 22:00:20.000000000 +0000 @@ -1,6 +1,6 @@ #include "config.h" -#define FUSE_USE_VERSION 26 +#define FUSE_USE_VERSION 35 #include @@ -88,7 +88,7 @@ static GThread *fuse_thread = NULL; static struct fuse_session *session = NULL; -static struct fuse_chan *main_ch = NULL; +G_LOCK_DEFINE (session); static char *mount_path = NULL; static pthread_t fuse_pthread = 0; static uid_t my_uid; @@ -230,7 +230,7 @@ if (app_id == NULL) return TRUE; - if (document_entry_has_permissions (entry, app_id, DOCUMENT_PERMISSION_FLAGS_WRITE)) + if (document_entry_has_permissions_by_app_id (entry, app_id, DOCUMENT_PERMISSION_FLAGS_WRITE)) return TRUE; return FALSE; @@ -242,7 +242,7 @@ if (app_id == NULL) return TRUE; - if (document_entry_has_permissions (entry, app_id, DOCUMENT_PERMISSION_FLAGS_READ)) + if (document_entry_has_permissions_by_app_id (entry, app_id, DOCUMENT_PERMISSION_FLAGS_READ)) return TRUE; return FALSE; @@ -349,6 +349,31 @@ return g_string_free (s, FALSE); } +static char * +renameat2_flags_to_string (int flags) +{ +#if HAVE_RENAMEAT2 + GString *s = g_string_new (""); + + if (flags & RENAME_EXCHANGE) + g_string_append (s, "EXCHANGE,"); + + if (flags & RENAME_NOREPLACE) + g_string_append (s, "NOREPLACE,"); + + if (flags & RENAME_WHITEOUT) + g_string_append (s, "WHITEOUT,"); + + /* Remove last comma */ + if (s->len > 0) + g_string_truncate (s, s->len - 1); + + return g_string_free (s, FALSE); +#else + return g_strdup_printf ("%#x", flags); +#endif +} + static guint devino_hash (gconstpointer key) { @@ -1668,8 +1693,10 @@ parent_ino = xdp_inode_to_ino (doc_domain->parent_inode); - if (g_atomic_int_get (&doc_domain->parent_inode->kernel_ref_count) > 0 && main_ch != NULL) - fuse_lowlevel_notify_inval_entry (main_ch, parent_ino, doc_domain->doc_id, strlen (doc_domain->doc_id)); + XDP_AUTOLOCK (session); + if (session && g_atomic_int_get (&doc_domain->parent_inode->kernel_ref_count) > 0) + fuse_lowlevel_notify_inval_entry (session, parent_ino, doc_domain->doc_id, + strlen (doc_domain->doc_id)); return FALSE; } @@ -2460,15 +2487,39 @@ xdp_reply_err (op, req, 0); } +static int +try_renameat (int olddirfd, + const char *oldpath, + int newdirfd, + const char *newpath, + unsigned int flags) +{ +#if HAVE_RENAMEAT2 + return renameat2 (olddirfd, oldpath, newdirfd, newpath, flags); +#else + if (flags) + { + g_warning ("renameat2 is not supported by this system and rename flags are set"); + errno = EINVAL; + return -1; + } + + return renameat (olddirfd, oldpath, newdirfd, newpath); +#endif +} + + static void xdp_fuse_rename (fuse_req_t req, fuse_ino_t parent_ino, const char *name, fuse_ino_t newparent_ino, - const char *newname) + const char *newname, + unsigned int flags) { g_autoptr(XdpInode) parent = xdp_inode_from_ino (parent_ino); g_autoptr(XdpInode) newparent = xdp_inode_from_ino (newparent_ino); + g_autofree char *rename_flags_string = renameat2_flags_to_string (flags); XdpDomain *domain; int res, errsv; int olddirfd, newdirfd, dirfd; @@ -2476,7 +2527,8 @@ xdp_autofd int close_fd2 = -1; const char *op = "RENAME"; - g_debug ("RENAME %lx %s -> %lx %s", parent_ino, name, newparent_ino, newname); + g_debug ("RENAME %lx %s -> %lx %s (flags: %s)", parent_ino, name, + newparent_ino, newname, rename_flags_string); if (!xdp_document_inode_checks (op, req, parent, CHECK_CAN_WRITE | @@ -2498,7 +2550,7 @@ if (newdirfd < 0) return xdp_reply_err (op, req, -newdirfd); - res = renameat (olddirfd, name, newdirfd, newname); + res = try_renameat (olddirfd, name, newdirfd, newname, flags); if (res != 0) return xdp_reply_err (op, req, errno); @@ -2532,7 +2584,7 @@ close (tmp_fd); g_mutex_lock (&domain->tempfile_mutex); - res = renameat (dirfd, name, dirfd, tmpname); + res = try_renameat (dirfd, name, dirfd, tmpname, flags); if (res == -1) { res = -errno; @@ -2563,7 +2615,7 @@ { XdpTempfile *tempfile = stolen_value; - res = renameat (dirfd, tempfile->tempname, dirfd, newname); + res = try_renameat (dirfd, tempfile->tempname, dirfd, newname, flags); errsv = errno; if (res == -1) /* Revert tempfile steal */ @@ -3004,20 +3056,26 @@ struct fuse_conn_info *conn) { g_debug ("INIT"); -} -extern void on_fuse_unmount (void); + /* splice_read: use splice() to read from fuse pipe */ + conn->want |= FUSE_CAP_SPLICE_READ; + /* splice_write: use splice() to write to fuse pipe */ + conn->want |= FUSE_CAP_SPLICE_WRITE; + /* splice_move: move buffers from writing app to kernel during splice write */ + conn->want |= FUSE_CAP_SPLICE_MOVE; + /* atomic_o_trunc: We handle O_TRUNC in create() */ + conn->want |= FUSE_CAP_ATOMIC_O_TRUNC; +} -static int destroyed; +extern int on_fuse_unmount (void); static void xdp_fuse_destroy_cb (void *userdata) { g_debug ("DESTROY"); - destroyed = 1; - - on_fuse_unmount (); + /* Ensure we call this on the main thread */ + g_idle_add ((GSourceFunc) on_fuse_unmount, NULL); } static struct fuse_lowlevel_ops xdp_fuse_oper = { @@ -3059,14 +3117,19 @@ .fallocate = xdp_fuse_fallocate, }; -static gpointer -xdp_fuse_mainloop (gpointer data) +typedef struct { + GMutex lock; + GCond cond; + GError *error; +} XdpFuseThreadData; + +static void +xdp_fuse_mainloop (struct fuse_session *se, + struct fuse_loop_config *loop_config) { const char *status; - fuse_pthread = pthread_self (); - - fuse_session_loop_mt (session); + fuse_session_loop_mt (se, loop_config); status = getenv ("TEST_DOCUMENT_PORTAL_FUSE_STATUS"); if (status) @@ -3079,11 +3142,79 @@ g_file_set_contents (status, s->str, -1, &error); g_assert_no_error (error); } +} + +typedef struct fuse_args XdpAutoFuseArgs; +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (XdpAutoFuseArgs, fuse_opt_free_args); + +static gpointer +xdp_fuse_thread (gpointer data) +{ + /* Options: + * auto_unmount: Tell fusermount to auto unmount if we die. + */ + static char *fusermount_argv[] = { + "xdp-fuse", "-osubtype=portal,fsname=portal,auto_unmount", + }; + g_auto(XdpAutoFuseArgs) args = + FUSE_ARGS_INIT (G_N_ELEMENTS (fusermount_argv), fusermount_argv); + g_autoptr(GMutexLocker) locker = NULL; + g_autoptr(GMutexLocker) session_locker = NULL; + const char *path; + struct fuse_session *se; + XdpFuseThreadData *thread_data = data; + struct fuse_cmdline_opts opts = {0}; + struct fuse_loop_config loop_config = {0}; + + locker = g_mutex_locker_new (&thread_data->lock); + fuse_pthread = pthread_self (); + + g_cond_signal (&thread_data->cond); + + if (fuse_parse_cmdline (&args, &opts) != 0) + { + g_set_error (&thread_data->error, XDG_DESKTOP_PORTAL_ERROR, + XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, + "Impossible to parse command line"); + return NULL; + } + + se = fuse_session_new (&args, &xdp_fuse_oper, + sizeof (xdp_fuse_oper), NULL); + if (se == NULL) + { + g_set_error (&thread_data->error, XDG_DESKTOP_PORTAL_ERROR, + XDG_DESKTOP_PORTAL_ERROR_FAILED, + "Can't create fuse session"); + return NULL; + } - fuse_session_remove_chan (main_ch); - fuse_session_destroy (session); - fuse_unmount (mount_path, main_ch); - main_ch = NULL; + path = xdp_fuse_get_mountpoint (); + if (fuse_session_mount (se, path) != 0) + { + fuse_session_destroy (se); + g_set_error (&thread_data->error, XDG_DESKTOP_PORTAL_ERROR, + XDG_DESKTOP_PORTAL_ERROR_FAILED, + "Can't mount path %s", path); + return NULL; + } + + session = se; + thread_data = NULL; + g_clear_pointer (&locker, g_mutex_locker_free); + + loop_config.clone_fd = opts.clone_fd; + loop_config.max_idle_threads = opts.max_idle_threads; + thread_data = NULL; + + session_locker = g_mutex_locker_new (&G_LOCK_NAME (session)); + g_clear_pointer (&session_locker, g_mutex_locker_free); + xdp_fuse_mainloop (session, &loop_config); + + session_locker = g_mutex_locker_new (&G_LOCK_NAME (session)); + fuse_session_unmount (se); + fuse_session_destroy (se); + session = NULL; return NULL; } @@ -3091,16 +3222,7 @@ gboolean xdp_fuse_init (GError **error) { - /* Options: - * auto_unmount: Tell fusermount to auto unmount if we die. - * splice_read: use splice() to read from fuse pipe - * splice_write: use splice() to write to fuse pipe - * splice_move: move buffers from writing app to kernel during splice write - * atomic_o_trunc: We handle O_TRUNC in create() - * big_writes: Allow > 4k writes - */ - char *fusermount_argv[] = { "xdp-fuse", "-osubtype=portal,fsname=portal,auto_unmount,splice_read,splice_write,splice_move,atomic_o_trunc,big_writes" }; - struct fuse_args args = FUSE_ARGS_INIT (G_N_ELEMENTS (fusermount_argv), fusermount_argv); + XdpFuseThreadData thread_data = {0}; struct stat st; struct statfs stfs; const char *path; @@ -3137,7 +3259,7 @@ (statfs_res == 0 && stfs.f_type == 0x65735546 /* fuse */))) { int count; - char *umount_argv[] = { "fusermount", "-u", "-z", (char *) path, NULL }; + char *umount_argv[] = { "fusermount3", "-u", "-z", (char *) path, NULL }; g_spawn_sync (NULL, umount_argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL, NULL, NULL); @@ -3155,29 +3277,27 @@ return FALSE; } - main_ch = fuse_mount (path, &args); - if (main_ch == NULL) - { - fuse_opt_free_args (&args); - g_set_error (error, XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_FAILED, - "Can't mount fuse fs on %s: %s", path, g_strerror (errno)); - return FALSE; - } + g_mutex_init (&thread_data.lock); + g_cond_init (&thread_data.cond); - session = fuse_lowlevel_new (&args, &xdp_fuse_oper, - sizeof (xdp_fuse_oper), NULL); - if (session == NULL) + g_mutex_lock (&thread_data.lock); + XDP_AUTOLOCK (session); + fuse_thread = g_thread_new ("fuse mainloop", xdp_fuse_thread, &thread_data); + + while (session == NULL && thread_data.error == NULL) + g_cond_wait (&thread_data.cond, &thread_data.lock); + + g_mutex_unlock (&thread_data.lock); + g_cond_clear (&thread_data.cond); + g_mutex_clear (&thread_data.lock); + + if (thread_data.error != NULL) { - fuse_opt_free_args (&args); - g_set_error (error, XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_FAILED, - "Can't create fuse session"); + g_propagate_error (error, g_steal_pointer (&thread_data.error)); return FALSE; } - fuse_session_add_chan (session, main_ch); - - fuse_thread = g_thread_new ("fuse mainloop", xdp_fuse_mainloop, session); - fuse_opt_free_args (&args); + g_assert (session != NULL); return TRUE; } @@ -3185,14 +3305,18 @@ void xdp_fuse_exit (void) { - if (!destroyed && session) - fuse_session_exit (session); + { + XDP_AUTOLOCK (session); - if (fuse_pthread) - pthread_kill (fuse_pthread, SIGHUP); + if (session) + fuse_session_exit (session); - if (fuse_thread) - g_thread_join (fuse_thread); + if (fuse_pthread) + pthread_kill (fuse_pthread, SIGHUP); + } + + g_clear_pointer (&fuse_thread, g_thread_join); + g_assert (session == NULL); } const char * @@ -3239,11 +3363,12 @@ const char *opt_app_id) { g_autoptr(GArray) invalidates = NULL; + XDP_AUTOLOCK (session); int i; /* This can happen if fuse is not initialized yet for the very first dbus message that activated the service */ - if (main_ch == NULL) + if (session == NULL) return; g_debug ("invalidate %s/%s", doc_id, opt_app_id ? opt_app_id : "*"); @@ -3276,12 +3401,12 @@ if (invalidate->filename) { - fuse_lowlevel_notify_inval_entry (main_ch, invalidate->ino, + fuse_lowlevel_notify_inval_entry (session, invalidate->ino, invalidate->filename, strlen (invalidate->filename)); g_free (invalidate->filename); } else - fuse_lowlevel_notify_inval_inode (main_ch, invalidate->ino, 0, 0); + fuse_lowlevel_notify_inval_inode (session, invalidate->ino, 0, 0); } } diff -Nru xdg-desktop-portal-1.8.1/document-portal/document-store.c xdg-desktop-portal-1.14.3/document-portal/document-store.c --- xdg-desktop-portal-1.8.1/document-portal/document-store.c 2019-11-23 00:40:44.000000000 +0000 +++ xdg-desktop-portal-1.14.3/document-portal/document-store.c 2022-03-29 22:00:20.000000000 +0000 @@ -3,7 +3,6 @@ #include #include #include "document-store.h" -#include "src/xdp-utils.h" const char ** xdg_unparse_permissions (DocumentPermissionFlags permissions) @@ -56,8 +55,8 @@ } DocumentPermissionFlags -document_entry_get_permissions (PermissionDbEntry *entry, - const char *app_id) +document_entry_get_permissions_by_app_id (PermissionDbEntry *entry, + const char *app_id) { g_autofree const char **permissions = NULL; @@ -68,14 +67,39 @@ return xdp_parse_permissions (permissions, NULL); } +DocumentPermissionFlags +document_entry_get_permissions (PermissionDbEntry *entry, + XdpAppInfo *app_info) +{ + g_autofree const char **permissions = NULL; + const char *app_id = xdp_app_info_get_id (app_info); + + if (xdp_app_info_is_host (app_info)) + return DOCUMENT_PERMISSION_FLAGS_ALL; + + return document_entry_get_permissions_by_app_id (entry, app_id); +} + +gboolean +document_entry_has_permissions_by_app_id (PermissionDbEntry *entry, + const char *app_id, + DocumentPermissionFlags perms) +{ + DocumentPermissionFlags current_perms; + + current_perms = document_entry_get_permissions_by_app_id (entry, app_id); + + return (current_perms & perms) == perms; +} + gboolean -document_entry_has_permissions (PermissionDbEntry *entry, - const char *app_id, - DocumentPermissionFlags perms) +document_entry_has_permissions (PermissionDbEntry *entry, + XdpAppInfo *app_info, + DocumentPermissionFlags perms) { DocumentPermissionFlags current_perms; - current_perms = document_entry_get_permissions (entry, app_id); + current_perms = document_entry_get_permissions (entry, app_info); return (current_perms & perms) == perms; } diff -Nru xdg-desktop-portal-1.8.1/document-portal/document-store.h xdg-desktop-portal-1.14.3/document-portal/document-store.h --- xdg-desktop-portal-1.8.1/document-portal/document-store.h 2020-03-13 12:38:51.000000000 +0000 +++ xdg-desktop-portal-1.14.3/document-portal/document-store.h 2022-03-29 22:00:20.000000000 +0000 @@ -1,9 +1,9 @@ -#ifndef XDP_UTIL_H -#define XDP_UTIL_H +#pragma once #include #include "permission-db.h" #include "document-enums.h" +#include "src/xdp-utils.h" G_BEGIN_DECLS @@ -15,11 +15,16 @@ DocumentPermissionFlags xdp_parse_permissions (const char **permissions, GError **error); +DocumentPermissionFlags document_entry_get_permissions_by_app_id (PermissionDbEntry *entry, + const char *app_id); DocumentPermissionFlags document_entry_get_permissions (PermissionDbEntry *entry, - const char *app_id); -gboolean document_entry_has_permissions (PermissionDbEntry *entry, - const char *app_id, - DocumentPermissionFlags perms); + XdpAppInfo *app_info); +gboolean document_entry_has_permissions (PermissionDbEntry *entry, + XdpAppInfo *app_info, + DocumentPermissionFlags perms); +gboolean document_entry_has_permissions_by_app_id (PermissionDbEntry *entry, + const char *app_id, + DocumentPermissionFlags perms); const char * document_entry_get_path (PermissionDbEntry *entry); char * document_entry_dup_basename (PermissionDbEntry *entry); char * document_entry_dup_dirname (PermissionDbEntry *entry); @@ -31,5 +36,3 @@ G_END_DECLS - -#endif /* XDP_UTIL_H */ diff -Nru xdg-desktop-portal-1.8.1/document-portal/Makefile.am.inc xdg-desktop-portal-1.14.3/document-portal/Makefile.am.inc --- xdg-desktop-portal-1.8.1/document-portal/Makefile.am.inc 2019-12-18 01:17:22.000000000 +0000 +++ xdg-desktop-portal-1.14.3/document-portal/Makefile.am.inc 2022-03-29 22:00:20.000000000 +0000 @@ -67,14 +67,16 @@ xdg_permission_store_SOURCES = \ src/xdp-utils.c \ src/xdp-utils.h \ + src/sd-escape.c \ + src/sd-escape.h \ document-portal/permission-store.c \ document-portal/xdg-permission-store.c \ document-portal/xdg-permission-store.h \ $(DB_SOURCES) \ $(NULL) -xdg_permission_store_LDADD = $(AM_LDADD) $(BASE_LIBS) -xdg_permission_store_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) -I$(srcdir)/document-portal -I$(builddir)/document-portal +xdg_permission_store_LDADD = $(AM_LDADD) $(BASE_LIBS) $(SYSTEMD_LIBS) +xdg_permission_store_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(SYSTEMD_CFLAGS) -I$(srcdir)/document-portal -I$(builddir)/document-portal nodist_xdg_document_portal_SOURCES = \ $(nodist_xdg_permission_store_SOURCES) \ @@ -88,6 +90,8 @@ xdg_document_portal_SOURCES = \ src/xdp-utils.c \ src/xdp-utils.h \ + src/sd-escape.c \ + src/sd-escape.h \ document-portal/document-portal.h \ document-portal/document-portal.c \ document-portal/file-transfer.h \ @@ -100,5 +104,5 @@ $(DB_SOURCES) \ $(NULL) -xdg_document_portal_LDADD = $(AM_LDADD) $(BASE_LIBS) $(FUSE_LIBS) -xdg_document_portal_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(FUSE_CFLAGS) -I$(srcdir)/document-portal -I$(builddir)/document-portal +xdg_document_portal_LDADD = $(AM_LDADD) $(BASE_LIBS) $(FUSE3_LIBS) $(SYSTEMD_LIBS) +xdg_document_portal_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(FUSE3_CFLAGS) $(SYSTEMD_CFLAGS) -I$(srcdir)/document-portal -I$(builddir)/document-portal diff -Nru xdg-desktop-portal-1.8.1/document-portal/permission-db.c xdg-desktop-portal-1.14.3/document-portal/permission-db.c --- xdg-desktop-portal-1.8.1/document-portal/permission-db.c 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/document-portal/permission-db.c 2022-03-28 18:02:35.000000000 +0000 @@ -1259,12 +1259,17 @@ { GVariant *v = (GVariant *) entry; GVariant *res; + GVariant *app_permissions; g_autoptr(GVariant) old_data_v = g_variant_get_child_value (v, 0); g_autoptr(GVariant) old_data = g_variant_get_child_value (old_data_v, 0); g_autoptr(GVariant) old_permissions = g_variant_get_child_value (v, 1); - res = make_entry (old_data, remove_permissions (old_permissions, app)); + app_permissions = remove_permissions (old_permissions, app); + if (app_permissions == NULL) + app_permissions = make_empty_app_permissions (); + + res = make_entry (old_data, app_permissions); return (PermissionDbEntry *) g_variant_ref_sink (res); } diff -Nru xdg-desktop-portal-1.8.1/document-portal/xdg-document-portal.service.in xdg-desktop-portal-1.14.3/document-portal/xdg-document-portal.service.in --- xdg-desktop-portal-1.8.1/document-portal/xdg-document-portal.service.in 2019-11-23 00:40:44.000000000 +0000 +++ xdg-desktop-portal-1.14.3/document-portal/xdg-document-portal.service.in 2022-03-28 18:02:35.000000000 +0000 @@ -5,3 +5,4 @@ BusName=org.freedesktop.portal.Documents ExecStart=@libexecdir@/xdg-document-portal Type=dbus +Slice=session.slice diff -Nru xdg-desktop-portal-1.8.1/document-portal/xdg-permission-store.c xdg-desktop-portal-1.14.3/document-portal/xdg-permission-store.c --- xdg-desktop-portal-1.8.1/document-portal/xdg-permission-store.c 2019-12-18 01:17:22.000000000 +0000 +++ xdg-desktop-portal-1.14.3/document-portal/xdg-permission-store.c 2022-03-28 18:02:35.000000000 +0000 @@ -326,6 +326,38 @@ } static gboolean +handle_get_permission (XdgPermissionStore *object, + GDBusMethodInvocation *invocation, + const char *table_name, + const char *id, + const char *app) +{ + Table *table; + + g_autoptr(PermissionDbEntry) entry = NULL; + g_autofree const char **permission = NULL; + + table = lookup_table (table_name, invocation); + if (table == NULL) + return TRUE; + + entry = permission_db_lookup (table->db, id); + if (entry == NULL) + { + g_dbus_method_invocation_return_error (invocation, + XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_FOUND, + "No entry for %s", id); + return TRUE; + } + + permission = permission_db_entry_list_permissions (entry, app); + + xdg_permission_store_complete_get_permission (object, invocation, permission); + + return TRUE; +} + +static gboolean handle_set (XdgPermissionStore *object, GDBusMethodInvocation *invocation, const gchar *table_name, @@ -496,6 +528,7 @@ g_signal_connect (store, "handle-set-value", G_CALLBACK (handle_set_value), NULL); g_signal_connect (store, "handle-delete", G_CALLBACK (handle_delete), NULL); g_signal_connect (store, "handle-delete-permission", G_CALLBACK (handle_delete_permission), NULL); + g_signal_connect (store, "handle-get-permission", G_CALLBACK (handle_get_permission), NULL); if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (store), connection, diff -Nru xdg-desktop-portal-1.8.1/document-portal/xdg-permission-store.h xdg-desktop-portal-1.14.3/document-portal/xdg-permission-store.h --- xdg-desktop-portal-1.8.1/document-portal/xdg-permission-store.h 2019-11-23 00:40:44.000000000 +0000 +++ xdg-desktop-portal-1.14.3/document-portal/xdg-permission-store.h 2022-03-29 22:00:20.000000000 +0000 @@ -18,9 +18,6 @@ * Alexander Larsson */ -#ifndef __FLATPAK_PERMISSION_STORE_H__ -#define __FLATPAK_PERMISSION_STORE_H__ +#pragma once void xdg_permission_store_start (GDBusConnection *connection); - -#endif /* __FLATPAK_PERMISSION_STORE_H__ */ diff -Nru xdg-desktop-portal-1.8.1/install-sh xdg-desktop-portal-1.14.3/install-sh --- xdg-desktop-portal-1.8.1/install-sh 2021-02-17 03:14:46.000000000 +0000 +++ xdg-desktop-portal-1.14.3/install-sh 2022-03-29 23:42:31.000000000 +0000 @@ -451,7 +451,18 @@ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # diff -Nru xdg-desktop-portal-1.8.1/ltmain.sh xdg-desktop-portal-1.14.3/ltmain.sh --- xdg-desktop-portal-1.8.1/ltmain.sh 2021-02-17 03:14:41.000000000 +0000 +++ xdg-desktop-portal-1.14.3/ltmain.sh 2022-03-29 23:42:26.000000000 +0000 @@ -2124,7 +2124,7 @@ # a configuration failure hint, and exit. func_fatal_configuration () { - func_fatal_error ${1+"$@"} \ + func__fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } @@ -2415,17 +2415,10 @@ # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" - case $host in - # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 - # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 - *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac + # Keeping compiler generated duplicates in $postdeps and $predeps is not + # harmful, and is necessary in a majority of systems that use it to satisfy + # symbol dependencies. + opt_duplicate_compiler_generated_deps=: $opt_help || { # Sanity checks first: @@ -7272,12 +7265,10 @@ # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*) + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" diff -Nru xdg-desktop-portal-1.8.1/Makefile.am xdg-desktop-portal-1.14.3/Makefile.am --- xdg-desktop-portal-1.8.1/Makefile.am 2020-03-13 12:38:10.000000000 +0000 +++ xdg-desktop-portal-1.14.3/Makefile.am 2022-03-29 22:00:20.000000000 +0000 @@ -13,6 +13,7 @@ EXTRA_DIST = tap-driver.sh tap-test include $(top_srcdir)/glib-tap.mk +include $(top_srcdir)/Makefile.am.inc SUBDIRS = doc po @@ -30,6 +31,7 @@ ACLOCAL_AMFLAGS = --install -I m4 ${ACLOCAL_FLAGS} AM_CPPFLAGS = \ -DG_LOG_DOMAIN=\"xdg-desktop-portal\" \ + -DLIBEXECDIR=\"$(libexecdir)\" \ $(NULL) lib_LTLIBRARIES = diff -Nru xdg-desktop-portal-1.8.1/Makefile.am.inc xdg-desktop-portal-1.14.3/Makefile.am.inc --- xdg-desktop-portal-1.8.1/Makefile.am.inc 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/Makefile.am.inc 2022-03-29 22:00:20.000000000 +0000 @@ -0,0 +1,55 @@ +PORTAL_IFACE_FILES =\ + $(top_srcdir)/data/org.freedesktop.portal.Account.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Background.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Camera.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Device.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Documents.xml \ + $(top_srcdir)/data/org.freedesktop.portal.DynamicLauncher.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Email.xml \ + $(top_srcdir)/data/org.freedesktop.portal.FileChooser.xml \ + $(top_srcdir)/data/org.freedesktop.portal.FileTransfer.xml \ + $(top_srcdir)/data/org.freedesktop.portal.GameMode.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Inhibit.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Location.xml \ + $(top_srcdir)/data/org.freedesktop.portal.MemoryMonitor.xml \ + $(top_srcdir)/data/org.freedesktop.portal.NetworkMonitor.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Notification.xml \ + $(top_srcdir)/data/org.freedesktop.portal.OpenURI.xml \ + $(top_srcdir)/data/org.freedesktop.portal.PowerProfileMonitor.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Print.xml \ + $(top_srcdir)/data/org.freedesktop.portal.ProxyResolver.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Realtime.xml \ + $(top_srcdir)/data/org.freedesktop.portal.RemoteDesktop.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Request.xml \ + $(top_srcdir)/data/org.freedesktop.portal.ScreenCast.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Screenshot.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Secret.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Session.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Settings.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Trash.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Wallpaper.xml \ + $(NULL) + +PORTAL_IMPL_IFACE_FILES =\ + $(top_srcdir)/data/org.freedesktop.impl.portal.Access.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Account.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.AppChooser.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Background.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.DynamicLauncher.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Email.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.FileChooser.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Inhibit.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Lockdown.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Notification.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.PermissionStore.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Print.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.RemoteDesktop.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Request.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.ScreenCast.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Screenshot.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Secret.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Session.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Settings.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Wallpaper.xml \ + $(NULL) + diff -Nru xdg-desktop-portal-1.8.1/Makefile.in xdg-desktop-portal-1.14.3/Makefile.in --- xdg-desktop-portal-1.8.1/Makefile.in 2021-02-17 03:14:46.000000000 +0000 +++ xdg-desktop-portal-1.14.3/Makefile.in 2022-03-29 23:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -97,7 +97,9 @@ noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_7) libexec_PROGRAMS = $(am__EXEEXT_1) xdg-permission-store$(EXEEXT) \ xdg-document-portal$(EXEEXT) $(am__EXEEXT_1) \ - xdg-desktop-portal$(EXEEXT) $(am__EXEEXT_1) + xdg-desktop-portal$(EXEEXT) \ + xdg-desktop-portal-validate-icon$(EXEEXT) \ + xdg-desktop-portal-rewrite-launchers$(EXEEXT) $(am__EXEEXT_1) TESTS = $(am__EXEEXT_2) $(am__EXEEXT_8) installed_test_PROGRAMS = $(am__EXEEXT_6) check_PROGRAMS = $(am__EXEEXT_5) @@ -126,7 +128,12 @@ @ENABLE_INSTALLED_TESTS_TRUE@ $(dist_installed_test_data) @ENABLE_INSTALLED_TESTS_TRUE@am__append_12 = $(test_ltlibraries) $(installed_test_ltlibraries) @ENABLE_INSTALLED_TESTS_TRUE@am__append_13 = $(installed_test_meta_DATA) -@HAVE_PIPEWIRE_TRUE@am__append_14 = \ +@HAVE_LIBSYSTEMD_TRUE@am__append_14 = \ +@HAVE_LIBSYSTEMD_TRUE@ src/sd-escape.c \ +@HAVE_LIBSYSTEMD_TRUE@ src/sd-escape.h \ +@HAVE_LIBSYSTEMD_TRUE@ $(NULL) + +@HAVE_PIPEWIRE_TRUE@am__append_15 = \ @HAVE_PIPEWIRE_TRUE@ src/screen-cast.c \ @HAVE_PIPEWIRE_TRUE@ src/screen-cast.h \ @HAVE_PIPEWIRE_TRUE@ src/remote-desktop.c \ @@ -137,14 +144,14 @@ @HAVE_PIPEWIRE_TRUE@ src/camera.h \ @HAVE_PIPEWIRE_TRUE@ $(NULL) -@HAVE_GEOCLUE_TRUE@am__append_15 = \ +@HAVE_GEOCLUE_TRUE@am__append_16 = \ @HAVE_GEOCLUE_TRUE@ src/location.c \ @HAVE_GEOCLUE_TRUE@ src/location.h \ @HAVE_GEOCLUE_TRUE@ $(NULL) -@HAVE_LIBPORTAL_TRUE@am__append_16 = $(LIBPORTAL_CFLAGS) -@HAVE_LIBPORTAL_TRUE@am__append_17 = $(LIBPORTAL_LIBS) -@HAVE_LIBPORTAL_TRUE@am__append_18 = \ +@HAVE_LIBPORTAL_TRUE@am__append_17 = $(LIBPORTAL_CFLAGS) +@HAVE_LIBPORTAL_TRUE@am__append_18 = $(LIBPORTAL_LIBS) +@HAVE_LIBPORTAL_TRUE@am__append_19 = \ @HAVE_LIBPORTAL_TRUE@ tests/account.c \ @HAVE_LIBPORTAL_TRUE@ tests/account.h \ @HAVE_LIBPORTAL_TRUE@ tests/background.c \ @@ -171,8 +178,6 @@ @HAVE_LIBPORTAL_TRUE@ tests/trash.h \ @HAVE_LIBPORTAL_TRUE@ tests/wallpaper.c \ @HAVE_LIBPORTAL_TRUE@ tests/wallpaper.h \ -@HAVE_LIBPORTAL_TRUE@ tests/utils.c \ -@HAVE_LIBPORTAL_TRUE@ tests/utils.h \ @HAVE_LIBPORTAL_TRUE@ tests/glib-backports.c \ @HAVE_LIBPORTAL_TRUE@ tests/glib-backports.h \ @HAVE_LIBPORTAL_TRUE@ $(NULL) @@ -259,7 +264,7 @@ am_test_doc_portal_OBJECTS = \ tests/test_doc_portal-can-use-fuse.$(OBJEXT) \ tests/test_doc_portal-test-doc-portal.$(OBJEXT) \ - $(am__objects_1) + tests/test_doc_portal-utils.$(OBJEXT) $(am__objects_1) nodist_test_doc_portal_OBJECTS = document-portal/test_doc_portal-document-portal-dbus.$(OBJEXT) test_doc_portal_OBJECTS = $(am_test_doc_portal_OBJECTS) \ $(nodist_test_doc_portal_OBJECTS) @@ -277,11 +282,13 @@ am_test_permission_store_OBJECTS = \ tests/test_permission_store-test-permission-store.$(OBJEXT) nodist_test_permission_store_OBJECTS = document-portal/test_permission_store-permission-store-dbus.$(OBJEXT) \ - src/test_permission_store-xdp-utils.$(OBJEXT) + src/test_permission_store-xdp-utils.$(OBJEXT) \ + src/test_permission_store-sd-escape.$(OBJEXT) \ + tests/test_permission_store-utils.$(OBJEXT) $(am__objects_1) test_permission_store_OBJECTS = $(am_test_permission_store_OBJECTS) \ $(nodist_test_permission_store_OBJECTS) test_permission_store_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) test_permission_store_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(test_permission_store_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -294,8 +301,8 @@ tests/notification.c tests/notification.h tests/openuri.c \ tests/openuri.h tests/print.c tests/print.h tests/screenshot.c \ tests/screenshot.h tests/trash.c tests/trash.h \ - tests/wallpaper.c tests/wallpaper.h tests/utils.c \ - tests/utils.h tests/glib-backports.c tests/glib-backports.h + tests/wallpaper.c tests/wallpaper.h tests/glib-backports.c \ + tests/glib-backports.h @HAVE_LIBPORTAL_TRUE@am__objects_2 = \ @HAVE_LIBPORTAL_TRUE@ tests/test_portals-account.$(OBJEXT) \ @HAVE_LIBPORTAL_TRUE@ tests/test_portals-background.$(OBJEXT) \ @@ -310,7 +317,6 @@ @HAVE_LIBPORTAL_TRUE@ tests/test_portals-screenshot.$(OBJEXT) \ @HAVE_LIBPORTAL_TRUE@ tests/test_portals-trash.$(OBJEXT) \ @HAVE_LIBPORTAL_TRUE@ tests/test_portals-wallpaper.$(OBJEXT) \ -@HAVE_LIBPORTAL_TRUE@ tests/test_portals-utils.$(OBJEXT) \ @HAVE_LIBPORTAL_TRUE@ tests/test_portals-glib-backports.$(OBJEXT) \ @HAVE_LIBPORTAL_TRUE@ $(am__objects_1) am_test_portals_OBJECTS = tests/test_portals-test-portals.$(OBJEXT) \ @@ -318,22 +324,25 @@ nodist_test_portals_OBJECTS = src/test_portals-xdp-dbus.$(OBJEXT) \ src/test_portals-xdp-impl-dbus.$(OBJEXT) \ src/test_portals-xdp-utils.$(OBJEXT) \ + src/test_portals-sd-escape.$(OBJEXT) \ document-portal/test_portals-permission-store-dbus.$(OBJEXT) \ - $(am__objects_1) + tests/test_portals-utils.$(OBJEXT) $(am__objects_1) test_portals_OBJECTS = $(am_test_portals_OBJECTS) \ $(nodist_test_portals_OBJECTS) @HAVE_LIBPORTAL_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) test_portals_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_2) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) test_portals_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_portals_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_test_xdp_utils_OBJECTS = \ tests/test_xdp_utils-test-xdp-utils.$(OBJEXT) \ - src/test_xdp_utils-xdp-utils.$(OBJEXT) + src/test_xdp_utils-xdp-utils.$(OBJEXT) \ + src/test_xdp_utils-sd-escape.$(OBJEXT) $(am__objects_1) test_xdp_utils_OBJECTS = $(am_test_xdp_utils_OBJECTS) -test_xdp_utils_DEPENDENCIES = $(am__DEPENDENCIES_1) +test_xdp_utils_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) test_xdp_utils_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(test_xdp_utils_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ @@ -363,6 +372,7 @@ tests/backend/test_backends-notification.$(OBJEXT) \ tests/backend/test_backends-print.$(OBJEXT) \ tests/backend/test_backends-screenshot.$(OBJEXT) \ + tests/backend/test_backends-settings.$(OBJEXT) \ tests/backend/test_backends-wallpaper.$(OBJEXT) \ tests/test_backends-glib-backports.$(OBJEXT) $(am__objects_1) nodist_tests_test_backends_OBJECTS = \ @@ -376,46 +386,56 @@ $(tests_test_backends_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am__xdg_desktop_portal_SOURCES_DIST = src/xdg-desktop-portal.c \ - src/file-chooser.c src/file-chooser.h src/open-uri.c \ - src/open-uri.h src/print.c src/print.h src/memory-monitor.c \ - src/memory-monitor.h src/network-monitor.c \ - src/network-monitor.h src/proxy-resolver.c \ - src/proxy-resolver.h src/screenshot.c src/screenshot.h \ - src/notification.c src/notification.h src/inhibit.c \ - src/inhibit.h src/device.c src/device.h src/account.c \ - src/account.h src/request.c src/request.h src/call.c \ - src/call.h src/documents.c src/documents.h src/permissions.c \ - src/permissions.h src/email.c src/email.h src/settings.c \ - src/settings.h src/session.c src/session.h src/trash.c \ - src/trash.h src/wallpaper.c src/wallpaper.h src/xdp-utils.c \ + src/file-chooser.c src/file-chooser.h src/glib-backports.c \ + src/glib-backports.h src/open-uri.c src/open-uri.h src/print.c \ + src/print.h src/memory-monitor.c src/memory-monitor.h \ + src/network-monitor.c src/network-monitor.h \ + src/power-profile-monitor.c src/power-profile-monitor.h \ + src/proxy-resolver.c src/proxy-resolver.h src/screenshot.c \ + src/screenshot.h src/notification.c src/notification.h \ + src/inhibit.c src/inhibit.h src/device.c src/device.h \ + src/account.c src/account.h src/realtime.c src/realtime.h \ + src/dynamic-launcher.c src/dynamic-launcher.h src/request.c \ + src/request.h src/call.c src/call.h src/documents.c \ + src/documents.h src/permissions.c src/permissions.h \ + src/email.c src/email.h src/settings.c src/settings.h \ + src/session.c src/session.h src/trash.c src/trash.h \ + src/wallpaper.c src/wallpaper.h src/xdp-utils.c \ src/xdp-utils.h src/background.c src/background.h \ src/gamemode.c src/gamemode.h src/secret.c src/secret.h \ src/flatpak-instance.c src/flatpak-instance.h \ - src/portal-impl.h src/portal-impl.c src/screen-cast.c \ - src/screen-cast.h src/remote-desktop.c src/remote-desktop.h \ - src/pipewire.c src/pipewire.h src/camera.c src/camera.h \ - src/location.c src/location.h -@HAVE_PIPEWIRE_TRUE@am__objects_4 = src/xdg_desktop_portal-screen-cast.$(OBJEXT) \ + src/portal-impl.h src/portal-impl.c src/sd-escape.c \ + src/sd-escape.h src/screen-cast.c src/screen-cast.h \ + src/remote-desktop.c src/remote-desktop.h src/pipewire.c \ + src/pipewire.h src/camera.c src/camera.h src/location.c \ + src/location.h +@HAVE_LIBSYSTEMD_TRUE@am__objects_4 = src/xdg_desktop_portal-sd-escape.$(OBJEXT) \ +@HAVE_LIBSYSTEMD_TRUE@ $(am__objects_1) +@HAVE_PIPEWIRE_TRUE@am__objects_5 = src/xdg_desktop_portal-screen-cast.$(OBJEXT) \ @HAVE_PIPEWIRE_TRUE@ src/xdg_desktop_portal-remote-desktop.$(OBJEXT) \ @HAVE_PIPEWIRE_TRUE@ src/xdg_desktop_portal-pipewire.$(OBJEXT) \ @HAVE_PIPEWIRE_TRUE@ src/xdg_desktop_portal-camera.$(OBJEXT) \ @HAVE_PIPEWIRE_TRUE@ $(am__objects_1) -@HAVE_GEOCLUE_TRUE@am__objects_5 = \ +@HAVE_GEOCLUE_TRUE@am__objects_6 = \ @HAVE_GEOCLUE_TRUE@ src/xdg_desktop_portal-location.$(OBJEXT) \ @HAVE_GEOCLUE_TRUE@ $(am__objects_1) am_xdg_desktop_portal_OBJECTS = \ src/xdg_desktop_portal-xdg-desktop-portal.$(OBJEXT) \ src/xdg_desktop_portal-file-chooser.$(OBJEXT) \ + src/xdg_desktop_portal-glib-backports.$(OBJEXT) \ src/xdg_desktop_portal-open-uri.$(OBJEXT) \ src/xdg_desktop_portal-print.$(OBJEXT) \ src/xdg_desktop_portal-memory-monitor.$(OBJEXT) \ src/xdg_desktop_portal-network-monitor.$(OBJEXT) \ + src/xdg_desktop_portal-power-profile-monitor.$(OBJEXT) \ src/xdg_desktop_portal-proxy-resolver.$(OBJEXT) \ src/xdg_desktop_portal-screenshot.$(OBJEXT) \ src/xdg_desktop_portal-notification.$(OBJEXT) \ src/xdg_desktop_portal-inhibit.$(OBJEXT) \ src/xdg_desktop_portal-device.$(OBJEXT) \ src/xdg_desktop_portal-account.$(OBJEXT) \ + src/xdg_desktop_portal-realtime.$(OBJEXT) \ + src/xdg_desktop_portal-dynamic-launcher.$(OBJEXT) \ src/xdg_desktop_portal-request.$(OBJEXT) \ src/xdg_desktop_portal-call.$(OBJEXT) \ src/xdg_desktop_portal-documents.$(OBJEXT) \ @@ -431,63 +451,87 @@ src/xdg_desktop_portal-secret.$(OBJEXT) \ src/xdg_desktop_portal-flatpak-instance.$(OBJEXT) \ src/xdg_desktop_portal-portal-impl.$(OBJEXT) $(am__objects_1) \ - $(am__objects_4) $(am__objects_5) -am__objects_6 = src/xdg_desktop_portal-xdp-dbus.$(OBJEXT) -am__objects_7 = src/xdg_desktop_portal-xdp-impl-dbus.$(OBJEXT) -am__objects_8 = src/xdg_desktop_portal-geoclue-dbus.$(OBJEXT) -nodist_xdg_desktop_portal_OBJECTS = $(am__objects_6) $(am__objects_7) \ - $(am__objects_8) \ + $(am__objects_4) $(am__objects_5) $(am__objects_6) +am__objects_7 = src/xdg_desktop_portal-xdp-dbus.$(OBJEXT) +am__objects_8 = src/xdg_desktop_portal-xdp-impl-dbus.$(OBJEXT) +am__objects_9 = src/xdg_desktop_portal-geoclue-dbus.$(OBJEXT) +nodist_xdg_desktop_portal_OBJECTS = $(am__objects_7) $(am__objects_8) \ + $(am__objects_9) \ src/xdg_desktop_portal-xdg-desktop-resources.$(OBJEXT) \ $(am__objects_1) xdg_desktop_portal_OBJECTS = $(am_xdg_desktop_portal_OBJECTS) \ $(nodist_xdg_desktop_portal_OBJECTS) xdg_desktop_portal_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) xdg_desktop_portal_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(xdg_desktop_portal_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -am__objects_9 = \ +am_xdg_desktop_portal_rewrite_launchers_OBJECTS = src/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.$(OBJEXT) +nodist_xdg_desktop_portal_rewrite_launchers_OBJECTS = src/xdg_desktop_portal_rewrite_launchers-glib-backports.$(OBJEXT) \ + $(am__objects_1) +xdg_desktop_portal_rewrite_launchers_OBJECTS = \ + $(am_xdg_desktop_portal_rewrite_launchers_OBJECTS) \ + $(nodist_xdg_desktop_portal_rewrite_launchers_OBJECTS) +xdg_desktop_portal_rewrite_launchers_DEPENDENCIES = \ + $(am__DEPENDENCIES_1) +xdg_desktop_portal_rewrite_launchers_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(xdg_desktop_portal_rewrite_launchers_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_xdg_desktop_portal_validate_icon_OBJECTS = \ + src/xdg_desktop_portal_validate_icon-validate-icon.$(OBJEXT) +xdg_desktop_portal_validate_icon_OBJECTS = \ + $(am_xdg_desktop_portal_validate_icon_OBJECTS) +xdg_desktop_portal_validate_icon_DEPENDENCIES = $(am__DEPENDENCIES_1) +xdg_desktop_portal_validate_icon_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(xdg_desktop_portal_validate_icon_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_10 = \ document-portal/xdg_document_portal-permission-db.$(OBJEXT) \ document-portal/gvdb/xdg_document_portal-gvdb-reader.$(OBJEXT) \ document-portal/gvdb/xdg_document_portal-gvdb-builder.$(OBJEXT) \ $(am__objects_1) am_xdg_document_portal_OBJECTS = \ src/xdg_document_portal-xdp-utils.$(OBJEXT) \ + src/xdg_document_portal-sd-escape.$(OBJEXT) \ document-portal/xdg_document_portal-document-portal.$(OBJEXT) \ document-portal/xdg_document_portal-file-transfer.$(OBJEXT) \ document-portal/xdg_document_portal-document-store.$(OBJEXT) \ document-portal/xdg_document_portal-document-portal-fuse.$(OBJEXT) \ - $(am__objects_9) $(am__objects_1) -am__objects_10 = document-portal/xdg_document_portal-permission-store-dbus.$(OBJEXT) \ + $(am__objects_10) $(am__objects_1) +am__objects_11 = document-portal/xdg_document_portal-permission-store-dbus.$(OBJEXT) \ $(am__objects_1) -nodist_xdg_document_portal_OBJECTS = $(am__objects_10) \ +nodist_xdg_document_portal_OBJECTS = $(am__objects_11) \ document-portal/xdg_document_portal-document-portal-dbus.$(OBJEXT) \ $(am__objects_1) xdg_document_portal_OBJECTS = $(am_xdg_document_portal_OBJECTS) \ $(nodist_xdg_document_portal_OBJECTS) xdg_document_portal_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) xdg_document_portal_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(xdg_document_portal_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -am__objects_11 = \ +am__objects_12 = \ document-portal/xdg_permission_store-permission-db.$(OBJEXT) \ document-portal/gvdb/xdg_permission_store-gvdb-reader.$(OBJEXT) \ document-portal/gvdb/xdg_permission_store-gvdb-builder.$(OBJEXT) \ $(am__objects_1) am_xdg_permission_store_OBJECTS = \ src/xdg_permission_store-xdp-utils.$(OBJEXT) \ + src/xdg_permission_store-sd-escape.$(OBJEXT) \ document-portal/xdg_permission_store-permission-store.$(OBJEXT) \ document-portal/xdg_permission_store-xdg-permission-store.$(OBJEXT) \ - $(am__objects_11) $(am__objects_1) + $(am__objects_12) $(am__objects_1) nodist_xdg_permission_store_OBJECTS = document-portal/xdg_permission_store-permission-store-dbus.$(OBJEXT) \ $(am__objects_1) xdg_permission_store_OBJECTS = $(am_xdg_permission_store_OBJECTS) \ $(nodist_xdg_permission_store_OBJECTS) -xdg_permission_store_DEPENDENCIES = $(am__DEPENDENCIES_1) +xdg_permission_store_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) xdg_permission_store_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(xdg_permission_store_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -529,10 +573,13 @@ document-portal/gvdb/$(DEPDIR)/xdg_document_portal-gvdb-reader.Po \ document-portal/gvdb/$(DEPDIR)/xdg_permission_store-gvdb-builder.Po \ document-portal/gvdb/$(DEPDIR)/xdg_permission_store-gvdb-reader.Po \ + src/$(DEPDIR)/test_permission_store-sd-escape.Po \ src/$(DEPDIR)/test_permission_store-xdp-utils.Po \ + src/$(DEPDIR)/test_portals-sd-escape.Po \ src/$(DEPDIR)/test_portals-xdp-dbus.Po \ src/$(DEPDIR)/test_portals-xdp-impl-dbus.Po \ src/$(DEPDIR)/test_portals-xdp-utils.Po \ + src/$(DEPDIR)/test_xdp_utils-sd-escape.Po \ src/$(DEPDIR)/test_xdp_utils-xdp-utils.Po \ src/$(DEPDIR)/tests_test_backends-xdp-impl-dbus.Po \ src/$(DEPDIR)/xdg_desktop_portal-account.Po \ @@ -541,11 +588,13 @@ src/$(DEPDIR)/xdg_desktop_portal-camera.Po \ src/$(DEPDIR)/xdg_desktop_portal-device.Po \ src/$(DEPDIR)/xdg_desktop_portal-documents.Po \ + src/$(DEPDIR)/xdg_desktop_portal-dynamic-launcher.Po \ src/$(DEPDIR)/xdg_desktop_portal-email.Po \ src/$(DEPDIR)/xdg_desktop_portal-file-chooser.Po \ src/$(DEPDIR)/xdg_desktop_portal-flatpak-instance.Po \ src/$(DEPDIR)/xdg_desktop_portal-gamemode.Po \ src/$(DEPDIR)/xdg_desktop_portal-geoclue-dbus.Po \ + src/$(DEPDIR)/xdg_desktop_portal-glib-backports.Po \ src/$(DEPDIR)/xdg_desktop_portal-inhibit.Po \ src/$(DEPDIR)/xdg_desktop_portal-location.Po \ src/$(DEPDIR)/xdg_desktop_portal-memory-monitor.Po \ @@ -555,12 +604,15 @@ src/$(DEPDIR)/xdg_desktop_portal-permissions.Po \ src/$(DEPDIR)/xdg_desktop_portal-pipewire.Po \ src/$(DEPDIR)/xdg_desktop_portal-portal-impl.Po \ + src/$(DEPDIR)/xdg_desktop_portal-power-profile-monitor.Po \ src/$(DEPDIR)/xdg_desktop_portal-print.Po \ src/$(DEPDIR)/xdg_desktop_portal-proxy-resolver.Po \ + src/$(DEPDIR)/xdg_desktop_portal-realtime.Po \ src/$(DEPDIR)/xdg_desktop_portal-remote-desktop.Po \ src/$(DEPDIR)/xdg_desktop_portal-request.Po \ src/$(DEPDIR)/xdg_desktop_portal-screen-cast.Po \ src/$(DEPDIR)/xdg_desktop_portal-screenshot.Po \ + src/$(DEPDIR)/xdg_desktop_portal-sd-escape.Po \ src/$(DEPDIR)/xdg_desktop_portal-secret.Po \ src/$(DEPDIR)/xdg_desktop_portal-session.Po \ src/$(DEPDIR)/xdg_desktop_portal-settings.Po \ @@ -571,12 +623,19 @@ src/$(DEPDIR)/xdg_desktop_portal-xdp-dbus.Po \ src/$(DEPDIR)/xdg_desktop_portal-xdp-impl-dbus.Po \ src/$(DEPDIR)/xdg_desktop_portal-xdp-utils.Po \ + src/$(DEPDIR)/xdg_desktop_portal_rewrite_launchers-glib-backports.Po \ + src/$(DEPDIR)/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.Po \ + src/$(DEPDIR)/xdg_desktop_portal_validate_icon-validate-icon.Po \ + src/$(DEPDIR)/xdg_document_portal-sd-escape.Po \ src/$(DEPDIR)/xdg_document_portal-xdp-utils.Po \ + src/$(DEPDIR)/xdg_permission_store-sd-escape.Po \ src/$(DEPDIR)/xdg_permission_store-xdp-utils.Po \ tests/$(DEPDIR)/test_backends-glib-backports.Po \ tests/$(DEPDIR)/test_doc_portal-can-use-fuse.Po \ tests/$(DEPDIR)/test_doc_portal-test-doc-portal.Po \ + tests/$(DEPDIR)/test_doc_portal-utils.Po \ tests/$(DEPDIR)/test_permission_store-test-permission-store.Po \ + tests/$(DEPDIR)/test_permission_store-utils.Po \ tests/$(DEPDIR)/test_portals-account.Po \ tests/$(DEPDIR)/test_portals-background.Po \ tests/$(DEPDIR)/test_portals-camera.Po \ @@ -608,6 +667,7 @@ tests/backend/$(DEPDIR)/test_backends-request.Po \ tests/backend/$(DEPDIR)/test_backends-screenshot.Po \ tests/backend/$(DEPDIR)/test_backends-session.Po \ + tests/backend/$(DEPDIR)/test_backends-settings.Po \ tests/backend/$(DEPDIR)/test_backends-test-backends.Po \ tests/backend/$(DEPDIR)/test_backends-wallpaper.Po am__mv = mv -f @@ -638,6 +698,9 @@ $(nodist_tests_test_backends_SOURCES) \ $(xdg_desktop_portal_SOURCES) \ $(nodist_xdg_desktop_portal_SOURCES) \ + $(xdg_desktop_portal_rewrite_launchers_SOURCES) \ + $(nodist_xdg_desktop_portal_rewrite_launchers_SOURCES) \ + $(xdg_desktop_portal_validate_icon_SOURCES) \ $(xdg_document_portal_SOURCES) \ $(nodist_xdg_document_portal_SOURCES) \ $(xdg_permission_store_SOURCES) \ @@ -647,6 +710,8 @@ $(am__test_portals_SOURCES_DIST) $(test_xdp_utils_SOURCES) \ $(testdb_SOURCES) $(tests_test_backends_SOURCES) \ $(am__xdg_desktop_portal_SOURCES_DIST) \ + $(xdg_desktop_portal_rewrite_launchers_SOURCES) \ + $(xdg_desktop_portal_validate_icon_SOURCES) \ $(xdg_document_portal_SOURCES) $(xdg_permission_store_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ @@ -677,8 +742,8 @@ AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope check recheck distdir distdir-am dist dist-all \ distcheck -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.h.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -880,7 +945,8 @@ $(srcdir)/document-portal/Makefile.am.inc \ $(srcdir)/src/Makefile.am.inc $(srcdir)/tests/Makefile.am.inc \ $(srcdir)/tests/backend/Makefile.am.inc \ - $(srcdir)/xdg-desktop-portal.pc.in $(top_srcdir)/glib-tap.mk \ + $(srcdir)/xdg-desktop-portal.pc.in \ + $(top_srcdir)/Makefile.am.inc $(top_srcdir)/glib-tap.mk \ ABOUT-NLS COPYING INSTALL NEWS compile config.guess \ config.rpath config.sub depcomp install-sh ltmain.sh missing \ test-driver @@ -956,9 +1022,11 @@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLATPAK_INTERFACES_DIR = @FLATPAK_INTERFACES_DIR@ -FUSE_CFLAGS = @FUSE_CFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ +FUSE3_CFLAGS = @FUSE3_CFLAGS@ +FUSE3_LIBS = @FUSE3_LIBS@ GDBUS_CODEGEN = @GDBUS_CODEGEN@ +GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ +GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ GENHTML = @GENHTML@ GEOCLUE_CFLAGS = @GEOCLUE_CFLAGS@ GEOCLUE_LIBS = @GEOCLUE_LIBS@ @@ -966,6 +1034,8 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB260_CFLAGS = @GLIB260_CFLAGS@ GLIB260_LIBS = @GLIB260_LIBS@ +GLIB266_CFLAGS = @GLIB266_CFLAGS@ +GLIB266_LIBS = @GLIB266_LIBS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ @@ -1025,6 +1095,8 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ @@ -1078,6 +1150,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1154,6 +1227,61 @@ @ENABLE_INSTALLED_TESTS_TRUE@ $(dist_test_scripts) $(dist_installed_test_scripts) @ENABLE_INSTALLED_TESTS_TRUE@installed_test_meta_DATA = $(installed_testcases:=.test) +PORTAL_IFACE_FILES = \ + $(top_srcdir)/data/org.freedesktop.portal.Account.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Background.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Camera.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Device.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Documents.xml \ + $(top_srcdir)/data/org.freedesktop.portal.DynamicLauncher.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Email.xml \ + $(top_srcdir)/data/org.freedesktop.portal.FileChooser.xml \ + $(top_srcdir)/data/org.freedesktop.portal.FileTransfer.xml \ + $(top_srcdir)/data/org.freedesktop.portal.GameMode.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Inhibit.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Location.xml \ + $(top_srcdir)/data/org.freedesktop.portal.MemoryMonitor.xml \ + $(top_srcdir)/data/org.freedesktop.portal.NetworkMonitor.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Notification.xml \ + $(top_srcdir)/data/org.freedesktop.portal.OpenURI.xml \ + $(top_srcdir)/data/org.freedesktop.portal.PowerProfileMonitor.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Print.xml \ + $(top_srcdir)/data/org.freedesktop.portal.ProxyResolver.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Realtime.xml \ + $(top_srcdir)/data/org.freedesktop.portal.RemoteDesktop.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Request.xml \ + $(top_srcdir)/data/org.freedesktop.portal.ScreenCast.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Screenshot.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Secret.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Session.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Settings.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Trash.xml \ + $(top_srcdir)/data/org.freedesktop.portal.Wallpaper.xml \ + $(NULL) + +PORTAL_IMPL_IFACE_FILES = \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Access.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Account.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.AppChooser.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Background.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.DynamicLauncher.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Email.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.FileChooser.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Inhibit.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Lockdown.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Notification.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.PermissionStore.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Print.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.RemoteDesktop.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Request.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.ScreenCast.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Screenshot.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Secret.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Session.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Settings.xml \ + $(top_srcdir)/data/org.freedesktop.impl.portal.Wallpaper.xml \ + $(NULL) + SUBDIRS = doc po dbus_servicedir = $(DBUS_SERVICE_DIR) service_in_files = $(NULL) \ @@ -1162,7 +1290,8 @@ document-portal/org.freedesktop.impl.portal.PermissionStore.service.in \ document-portal/org.freedesktop.portal.Documents.service.in \ $(NULL) src/org.freedesktop.portal.Desktop.service.in \ - src/xdg-desktop-portal.service.in ${NULL} + src/xdg-desktop-portal.service.in \ + src/xdg-desktop-portal-rewrite-launchers.service.in ${NULL} dbus_service_DATA = $(NULL) \ document-portal/org.freedesktop.impl.portal.PermissionStore.service \ document-portal/org.freedesktop.portal.Documents.service \ @@ -1170,62 +1299,17 @@ systemduserunit_DATA = $(NULL) \ document-portal/xdg-permission-store.service \ document-portal/xdg-document-portal.service $(NULL) \ - src/xdg-desktop-portal.service + src/xdg-desktop-portal.service \ + src/xdg-desktop-portal-rewrite-launchers.service ACLOCAL_AMFLAGS = --install -I m4 ${ACLOCAL_FLAGS} AM_CPPFLAGS = \ -DG_LOG_DOMAIN=\"xdg-desktop-portal\" \ + -DLIBEXECDIR=\"$(libexecdir)\" \ $(NULL) lib_LTLIBRARIES = introspectiondir = $(datadir)/dbus-1/interfaces -dist_introspection_DATA = \ - data/org.freedesktop.portal.Account.xml \ - data/org.freedesktop.portal.Background.xml \ - data/org.freedesktop.portal.Camera.xml \ - data/org.freedesktop.portal.Device.xml \ - data/org.freedesktop.portal.Documents.xml \ - data/org.freedesktop.portal.Email.xml \ - data/org.freedesktop.portal.FileChooser.xml \ - data/org.freedesktop.portal.FileTransfer.xml \ - data/org.freedesktop.portal.GameMode.xml \ - data/org.freedesktop.portal.Inhibit.xml \ - data/org.freedesktop.portal.Location.xml \ - data/org.freedesktop.portal.MemoryMonitor.xml \ - data/org.freedesktop.portal.NetworkMonitor.xml \ - data/org.freedesktop.portal.Notification.xml \ - data/org.freedesktop.portal.OpenURI.xml \ - data/org.freedesktop.portal.Print.xml \ - data/org.freedesktop.portal.ProxyResolver.xml \ - data/org.freedesktop.portal.RemoteDesktop.xml \ - data/org.freedesktop.portal.Request.xml \ - data/org.freedesktop.portal.ScreenCast.xml \ - data/org.freedesktop.portal.Screenshot.xml \ - data/org.freedesktop.portal.Secret.xml \ - data/org.freedesktop.portal.Session.xml \ - data/org.freedesktop.portal.Settings.xml \ - data/org.freedesktop.portal.Trash.xml \ - data/org.freedesktop.portal.Wallpaper.xml \ - data/org.freedesktop.impl.portal.Access.xml \ - data/org.freedesktop.impl.portal.Account.xml \ - data/org.freedesktop.impl.portal.AppChooser.xml \ - data/org.freedesktop.impl.portal.Background.xml \ - data/org.freedesktop.impl.portal.Email.xml \ - data/org.freedesktop.impl.portal.FileChooser.xml \ - data/org.freedesktop.impl.portal.Inhibit.xml \ - data/org.freedesktop.impl.portal.Lockdown.xml \ - data/org.freedesktop.impl.portal.Notification.xml \ - data/org.freedesktop.impl.portal.PermissionStore.xml \ - data/org.freedesktop.impl.portal.Print.xml \ - data/org.freedesktop.impl.portal.RemoteDesktop.xml \ - data/org.freedesktop.impl.portal.Request.xml \ - data/org.freedesktop.impl.portal.ScreenCast.xml \ - data/org.freedesktop.impl.portal.Screenshot.xml \ - data/org.freedesktop.impl.portal.Secret.xml \ - data/org.freedesktop.impl.portal.Session.xml \ - data/org.freedesktop.impl.portal.Settings.xml \ - data/org.freedesktop.impl.portal.Wallpaper.xml \ - $(NULL) - +dist_introspection_DATA = $(PORTAL_IFACE_FILES) $(PORTAL_IMPL_IFACE_FILES) nodist_xdg_permission_store_SOURCES = \ document-portal/permission-store-dbus.c \ document-portal/permission-store-dbus.h \ @@ -1244,14 +1328,16 @@ xdg_permission_store_SOURCES = \ src/xdp-utils.c \ src/xdp-utils.h \ + src/sd-escape.c \ + src/sd-escape.h \ document-portal/permission-store.c \ document-portal/xdg-permission-store.c \ document-portal/xdg-permission-store.h \ $(DB_SOURCES) \ $(NULL) -xdg_permission_store_LDADD = $(AM_LDADD) $(BASE_LIBS) -xdg_permission_store_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) -I$(srcdir)/document-portal -I$(builddir)/document-portal +xdg_permission_store_LDADD = $(AM_LDADD) $(BASE_LIBS) $(SYSTEMD_LIBS) +xdg_permission_store_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(SYSTEMD_CFLAGS) -I$(srcdir)/document-portal -I$(builddir)/document-portal nodist_xdg_document_portal_SOURCES = \ $(nodist_xdg_permission_store_SOURCES) \ document-portal/document-portal-dbus.c \ @@ -1261,6 +1347,8 @@ xdg_document_portal_SOURCES = \ src/xdp-utils.c \ src/xdp-utils.h \ + src/sd-escape.c \ + src/sd-escape.h \ document-portal/document-portal.h \ document-portal/document-portal.c \ document-portal/file-transfer.h \ @@ -1273,61 +1361,11 @@ $(DB_SOURCES) \ $(NULL) -xdg_document_portal_LDADD = $(AM_LDADD) $(BASE_LIBS) $(FUSE_LIBS) -xdg_document_portal_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(FUSE_CFLAGS) -I$(srcdir)/document-portal -I$(builddir)/document-portal +xdg_document_portal_LDADD = $(AM_LDADD) $(BASE_LIBS) $(FUSE3_LIBS) $(SYSTEMD_LIBS) +xdg_document_portal_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(FUSE3_CFLAGS) $(SYSTEMD_CFLAGS) -I$(srcdir)/document-portal -I$(builddir)/document-portal xdp_dbus_built_sources = src/xdp-dbus.c src/xdp-dbus.h xdp_impl_dbus_built_sources = src/xdp-impl-dbus.c src/xdp-impl-dbus.h geoclue_built_sources = src/geoclue-dbus.c src/geoclue-dbus.h -PORTAL_IFACE_FILES = \ - data/org.freedesktop.portal.Documents.xml \ - data/org.freedesktop.portal.Request.xml \ - data/org.freedesktop.portal.Session.xml \ - data/org.freedesktop.portal.FileChooser.xml \ - data/org.freedesktop.portal.Trash.xml \ - data/org.freedesktop.portal.OpenURI.xml \ - data/org.freedesktop.portal.Print.xml \ - data/org.freedesktop.portal.MemoryMonitor.xml \ - data/org.freedesktop.portal.NetworkMonitor.xml \ - data/org.freedesktop.portal.ProxyResolver.xml \ - data/org.freedesktop.portal.Screenshot.xml \ - data/org.freedesktop.portal.Notification.xml \ - data/org.freedesktop.portal.Inhibit.xml \ - data/org.freedesktop.portal.Device.xml \ - data/org.freedesktop.portal.Account.xml \ - data/org.freedesktop.portal.Email.xml \ - data/org.freedesktop.portal.ScreenCast.xml \ - data/org.freedesktop.portal.RemoteDesktop.xml \ - data/org.freedesktop.portal.Location.xml \ - data/org.freedesktop.portal.Settings.xml \ - data/org.freedesktop.portal.Background.xml \ - data/org.freedesktop.portal.GameMode.xml \ - data/org.freedesktop.portal.Camera.xml \ - data/org.freedesktop.portal.Secret.xml \ - data/org.freedesktop.portal.Wallpaper.xml \ - $(NULL) - -PORTAL_IMPL_IFACE_FILES = \ - data/org.freedesktop.impl.portal.PermissionStore.xml \ - data/org.freedesktop.impl.portal.Request.xml \ - data/org.freedesktop.impl.portal.Session.xml \ - data/org.freedesktop.impl.portal.FileChooser.xml \ - data/org.freedesktop.impl.portal.AppChooser.xml \ - data/org.freedesktop.impl.portal.Print.xml \ - data/org.freedesktop.impl.portal.Screenshot.xml \ - data/org.freedesktop.impl.portal.Notification.xml \ - data/org.freedesktop.impl.portal.Inhibit.xml \ - data/org.freedesktop.impl.portal.Access.xml \ - data/org.freedesktop.impl.portal.Account.xml \ - data/org.freedesktop.impl.portal.Email.xml \ - data/org.freedesktop.impl.portal.ScreenCast.xml \ - data/org.freedesktop.impl.portal.RemoteDesktop.xml \ - data/org.freedesktop.impl.portal.Settings.xml \ - data/org.freedesktop.impl.portal.Lockdown.xml \ - data/org.freedesktop.impl.portal.Background.xml \ - data/org.freedesktop.impl.portal.Secret.xml \ - data/org.freedesktop.impl.portal.Wallpaper.xml \ - $(NULL) - xdg_desktop_resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/src/xdg-desktop-portal.gresource.xml) nodist_xdg_desktop_portal_SOURCES = \ $(xdp_dbus_built_sources) \ @@ -1337,27 +1375,31 @@ $(NULL) xdg_desktop_portal_SOURCES = src/xdg-desktop-portal.c \ - src/file-chooser.c src/file-chooser.h src/open-uri.c \ - src/open-uri.h src/print.c src/print.h src/memory-monitor.c \ - src/memory-monitor.h src/network-monitor.c \ - src/network-monitor.h src/proxy-resolver.c \ - src/proxy-resolver.h src/screenshot.c src/screenshot.h \ - src/notification.c src/notification.h src/inhibit.c \ - src/inhibit.h src/device.c src/device.h src/account.c \ - src/account.h src/request.c src/request.h src/call.c \ - src/call.h src/documents.c src/documents.h src/permissions.c \ - src/permissions.h src/email.c src/email.h src/settings.c \ - src/settings.h src/session.c src/session.h src/trash.c \ - src/trash.h src/wallpaper.c src/wallpaper.h src/xdp-utils.c \ + src/file-chooser.c src/file-chooser.h src/glib-backports.c \ + src/glib-backports.h src/open-uri.c src/open-uri.h src/print.c \ + src/print.h src/memory-monitor.c src/memory-monitor.h \ + src/network-monitor.c src/network-monitor.h \ + src/power-profile-monitor.c src/power-profile-monitor.h \ + src/proxy-resolver.c src/proxy-resolver.h src/screenshot.c \ + src/screenshot.h src/notification.c src/notification.h \ + src/inhibit.c src/inhibit.h src/device.c src/device.h \ + src/account.c src/account.h src/realtime.c src/realtime.h \ + src/dynamic-launcher.c src/dynamic-launcher.h src/request.c \ + src/request.h src/call.c src/call.h src/documents.c \ + src/documents.h src/permissions.c src/permissions.h \ + src/email.c src/email.h src/settings.c src/settings.h \ + src/session.c src/session.h src/trash.c src/trash.h \ + src/wallpaper.c src/wallpaper.h src/xdp-utils.c \ src/xdp-utils.h src/background.c src/background.h \ src/gamemode.c src/gamemode.h src/secret.c src/secret.h \ src/flatpak-instance.c src/flatpak-instance.h \ src/portal-impl.h src/portal-impl.c $(NULL) $(am__append_14) \ - $(am__append_15) + $(am__append_15) $(am__append_16) xdg_desktop_portal_LDADD = \ $(BASE_LIBS) \ $(PIPEWIRE_LIBS) \ $(GEOCLUE_LIBS) \ + $(SYSTEMD_LIBS) \ $(NULL) xdg_desktop_portal_CFLAGS = \ @@ -1367,6 +1409,7 @@ $(BASE_CFLAGS) \ $(PIPEWIRE_CFLAGS) \ $(GEOCLUE_CFLAGS) \ + $(SYSTEMD_CFLAGS) \ -I$(srcdir)/src \ -I$(builddir)/src \ -I$(srcdir)/document-portal \ @@ -1377,6 +1420,18 @@ -DLOCALEDIR=\"$(localedir)\" \ $(NULL) +xdg_desktop_portal_validate_icon_SOURCES = src/validate-icon.c +xdg_desktop_portal_validate_icon_LDADD = $(GDK_PIXBUF_LIBS) +xdg_desktop_portal_validate_icon_CFLAGS = $(GDK_PIXBUF_CFLAGS) -DHELPER=\"$(BWRAP)\" -D_GNU_SOURCE=1 +xdg_desktop_portal_rewrite_launchers_SOURCES = src/rewrite-launchers.c +nodist_xdg_desktop_portal_rewrite_launchers_SOURCES = \ + src/dynamic-launcher.h \ + src/glib-backports.c \ + src/glib-backports.h \ + $(NULL) + +xdg_desktop_portal_rewrite_launchers_LDADD = $(BASE_LIBS) +xdg_desktop_portal_rewrite_launchers_CFLAGS = $(BASE_CFLAGS) tests_test_backends_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) tests_test_backends_LDADD = \ $(AM_LDADD) \ @@ -1411,6 +1466,8 @@ tests/backend/print.h \ tests/backend/screenshot.c \ tests/backend/screenshot.h \ + tests/backend/settings.c \ + tests/backend/settings.h \ tests/backend/wallpaper.c \ tests/backend/wallpaper.h \ tests/glib-backports.c \ @@ -1433,46 +1490,67 @@ $(NULL) testdb_SOURCES = tests/testdb.c $(DB_SOURCES) -test_doc_portal_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(FUSE_CFLAGS) +test_doc_portal_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(FUSE3_CFLAGS) test_doc_portal_LDADD = \ $(AM_LDADD) \ $(BASE_LIBS) \ - $(FUSE_LIBS) \ + $(FUSE3_LIBS) \ $(NULL) test_doc_portal_SOURCES = \ tests/can-use-fuse.c \ tests/can-use-fuse.h \ tests/test-doc-portal.c \ + tests/utils.c \ + tests/utils.h \ $(NULL) nodist_test_doc_portal_SOURCES = document-portal/document-portal-dbus.c EXTRA_test_doc_portal_DEPENDENCIES = tests/services/org.freedesktop.impl.portal.PermissionStore.service tests/services/org.freedesktop.portal.Documents.service test_portals_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(LIBPORTAL_CFLAGS) \ - $(am__append_16) + $(SYSTEMD_LIBS) $(am__append_17) test_portals_LDADD = $(AM_LDADD) $(BASE_LIBS) $(LIBPORTAL_LIBS) \ - $(NULL) $(am__append_17) -test_portals_SOURCES = tests/test-portals.c $(am__append_18) + $(SYSTEMD_LIBS) $(NULL) $(am__append_18) +test_portals_SOURCES = tests/test-portals.c $(am__append_19) test_portals_CPPFLAGS = $(AM_CPPFLAGS) -DLIBEXECDIR=\"$(libexecdir)\" nodist_test_portals_SOURCES = \ src/xdp-dbus.c \ src/xdp-impl-dbus.c \ src/xdp-utils.c \ + src/sd-escape.c \ + src/sd-escape.h \ document-portal/permission-store-dbus.c \ + tests/utils.c \ + tests/utils.h \ $(NULL) -test_permission_store_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) +test_permission_store_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(SYSTEMD_CFLAGS) test_permission_store_LDADD = \ $(AM_LDADD) \ $(BASE_LIBS) \ + $(SYSTEMD_LIBS) \ $(NULL) test_permission_store_SOURCES = tests/test-permission-store.c -nodist_test_permission_store_SOURCES = document-portal/permission-store-dbus.c src/xdp-utils.c +nodist_test_permission_store_SOURCES = \ + document-portal/permission-store-dbus.c \ + src/xdp-utils.c \ + src/sd-escape.c \ + src/sd-escape.h \ + tests/utils.c \ + tests/utils.h \ + $(NULL) + EXTRA_test_permission_store_DEPENDENCIES = tests/services/org.freedesktop.impl.portal.PermissionStore.service tests/services/org.freedesktop.portal.Documents.service -test_xdp_utils_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) -test_xdp_utils_LDADD = $(AM_LD_ADD) $(BASE_LIBS) -test_xdp_utils_SOURCES = tests/test-xdp-utils.c src/xdp-utils.c +test_xdp_utils_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(SYSTEMD_CFLAGS) +test_xdp_utils_LDADD = $(AM_LD_ADD) $(BASE_LIBS) $(SYSTEMD_LIBS) +test_xdp_utils_SOURCES = \ + tests/test-xdp-utils.c \ + src/xdp-utils.c \ + src/sd-escape.c \ + src/sd-escape.h \ + $(NULL) + installed_test_dbsdir = $(installed_testdir)/dbs installed_test_portalsdir = $(installed_testdir)/portals @ENABLE_INSTALLED_TESTS_TRUE@dist_installed_test_dbs_DATA = tests/dbs/no_tables @@ -1504,7 +1582,7 @@ .SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs am--refresh: Makefile @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/glib-tap.mk $(srcdir)/data/Makefile.am.inc $(srcdir)/document-portal/Makefile.am.inc $(srcdir)/src/Makefile.am.inc $(srcdir)/tests/backend/Makefile.am.inc $(srcdir)/tests/Makefile.am.inc $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/glib-tap.mk $(top_srcdir)/Makefile.am.inc $(srcdir)/data/Makefile.am.inc $(srcdir)/document-portal/Makefile.am.inc $(srcdir)/src/Makefile.am.inc $(srcdir)/tests/backend/Makefile.am.inc $(srcdir)/tests/Makefile.am.inc $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -1526,7 +1604,7 @@ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; -$(top_srcdir)/glib-tap.mk $(srcdir)/data/Makefile.am.inc $(srcdir)/document-portal/Makefile.am.inc $(srcdir)/src/Makefile.am.inc $(srcdir)/tests/backend/Makefile.am.inc $(srcdir)/tests/Makefile.am.inc $(am__empty): +$(top_srcdir)/glib-tap.mk $(top_srcdir)/Makefile.am.inc $(srcdir)/data/Makefile.am.inc $(srcdir)/document-portal/Makefile.am.inc $(srcdir)/src/Makefile.am.inc $(srcdir)/tests/backend/Makefile.am.inc $(srcdir)/tests/Makefile.am.inc $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck @@ -1820,6 +1898,8 @@ tests/$(DEPDIR)/$(am__dirstamp) tests/test_doc_portal-test-doc-portal.$(OBJEXT): \ tests/$(am__dirstamp) tests/$(DEPDIR)/$(am__dirstamp) +tests/test_doc_portal-utils.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) document-portal/$(am__dirstamp): @$(MKDIR_P) document-portal @: > document-portal/$(am__dirstamp) @@ -1846,6 +1926,10 @@ @: > src/$(DEPDIR)/$(am__dirstamp) src/test_permission_store-xdp-utils.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) +src/test_permission_store-sd-escape.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +tests/test_permission_store-utils.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) test-permission-store$(EXEEXT): $(test_permission_store_OBJECTS) $(test_permission_store_DEPENDENCIES) $(EXTRA_test_permission_store_DEPENDENCIES) @rm -f test-permission-store$(EXEEXT) @@ -1878,8 +1962,6 @@ tests/$(DEPDIR)/$(am__dirstamp) tests/test_portals-wallpaper.$(OBJEXT): tests/$(am__dirstamp) \ tests/$(DEPDIR)/$(am__dirstamp) -tests/test_portals-utils.$(OBJEXT): tests/$(am__dirstamp) \ - tests/$(DEPDIR)/$(am__dirstamp) tests/test_portals-glib-backports.$(OBJEXT): tests/$(am__dirstamp) \ tests/$(DEPDIR)/$(am__dirstamp) src/test_portals-xdp-dbus.$(OBJEXT): src/$(am__dirstamp) \ @@ -1888,9 +1970,13 @@ src/$(DEPDIR)/$(am__dirstamp) src/test_portals-xdp-utils.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) +src/test_portals-sd-escape.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) document-portal/test_portals-permission-store-dbus.$(OBJEXT): \ document-portal/$(am__dirstamp) \ document-portal/$(DEPDIR)/$(am__dirstamp) +tests/test_portals-utils.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) test-portals$(EXEEXT): $(test_portals_OBJECTS) $(test_portals_DEPENDENCIES) $(EXTRA_test_portals_DEPENDENCIES) @rm -f test-portals$(EXEEXT) @@ -1899,6 +1985,8 @@ tests/$(DEPDIR)/$(am__dirstamp) src/test_xdp_utils-xdp-utils.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) +src/test_xdp_utils-sd-escape.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) test-xdp-utils$(EXEEXT): $(test_xdp_utils_OBJECTS) $(test_xdp_utils_DEPENDENCIES) $(EXTRA_test_xdp_utils_DEPENDENCIES) @rm -f test-xdp-utils$(EXEEXT) @@ -1972,6 +2060,9 @@ tests/backend/test_backends-screenshot.$(OBJEXT): \ tests/backend/$(am__dirstamp) \ tests/backend/$(DEPDIR)/$(am__dirstamp) +tests/backend/test_backends-settings.$(OBJEXT): \ + tests/backend/$(am__dirstamp) \ + tests/backend/$(DEPDIR)/$(am__dirstamp) tests/backend/test_backends-wallpaper.$(OBJEXT): \ tests/backend/$(am__dirstamp) \ tests/backend/$(DEPDIR)/$(am__dirstamp) @@ -1987,6 +2078,8 @@ src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/xdg_desktop_portal-file-chooser.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) +src/xdg_desktop_portal-glib-backports.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) src/xdg_desktop_portal-open-uri.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/xdg_desktop_portal-print.$(OBJEXT): src/$(am__dirstamp) \ @@ -1995,6 +2088,8 @@ src/$(DEPDIR)/$(am__dirstamp) src/xdg_desktop_portal-network-monitor.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) +src/xdg_desktop_portal-power-profile-monitor.$(OBJEXT): \ + src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/xdg_desktop_portal-proxy-resolver.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/xdg_desktop_portal-screenshot.$(OBJEXT): src/$(am__dirstamp) \ @@ -2007,6 +2102,10 @@ src/$(DEPDIR)/$(am__dirstamp) src/xdg_desktop_portal-account.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) +src/xdg_desktop_portal-realtime.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/xdg_desktop_portal-dynamic-launcher.$(OBJEXT): \ + src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/xdg_desktop_portal-request.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/xdg_desktop_portal-call.$(OBJEXT): src/$(am__dirstamp) \ @@ -2037,6 +2136,8 @@ src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/xdg_desktop_portal-portal-impl.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) +src/xdg_desktop_portal-sd-escape.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) src/xdg_desktop_portal-screen-cast.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/xdg_desktop_portal-remote-desktop.$(OBJEXT): src/$(am__dirstamp) \ @@ -2059,8 +2160,24 @@ xdg-desktop-portal$(EXEEXT): $(xdg_desktop_portal_OBJECTS) $(xdg_desktop_portal_DEPENDENCIES) $(EXTRA_xdg_desktop_portal_DEPENDENCIES) @rm -f xdg-desktop-portal$(EXEEXT) $(AM_V_CCLD)$(xdg_desktop_portal_LINK) $(xdg_desktop_portal_OBJECTS) $(xdg_desktop_portal_LDADD) $(LIBS) +src/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.$(OBJEXT): \ + src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) +src/xdg_desktop_portal_rewrite_launchers-glib-backports.$(OBJEXT): \ + src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) + +xdg-desktop-portal-rewrite-launchers$(EXEEXT): $(xdg_desktop_portal_rewrite_launchers_OBJECTS) $(xdg_desktop_portal_rewrite_launchers_DEPENDENCIES) $(EXTRA_xdg_desktop_portal_rewrite_launchers_DEPENDENCIES) + @rm -f xdg-desktop-portal-rewrite-launchers$(EXEEXT) + $(AM_V_CCLD)$(xdg_desktop_portal_rewrite_launchers_LINK) $(xdg_desktop_portal_rewrite_launchers_OBJECTS) $(xdg_desktop_portal_rewrite_launchers_LDADD) $(LIBS) +src/xdg_desktop_portal_validate_icon-validate-icon.$(OBJEXT): \ + src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) + +xdg-desktop-portal-validate-icon$(EXEEXT): $(xdg_desktop_portal_validate_icon_OBJECTS) $(xdg_desktop_portal_validate_icon_DEPENDENCIES) $(EXTRA_xdg_desktop_portal_validate_icon_DEPENDENCIES) + @rm -f xdg-desktop-portal-validate-icon$(EXEEXT) + $(AM_V_CCLD)$(xdg_desktop_portal_validate_icon_LINK) $(xdg_desktop_portal_validate_icon_OBJECTS) $(xdg_desktop_portal_validate_icon_LDADD) $(LIBS) src/xdg_document_portal-xdp-utils.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) +src/xdg_document_portal-sd-escape.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) document-portal/xdg_document_portal-document-portal.$(OBJEXT): \ document-portal/$(am__dirstamp) \ document-portal/$(DEPDIR)/$(am__dirstamp) @@ -2094,6 +2211,8 @@ $(AM_V_CCLD)$(xdg_document_portal_LINK) $(xdg_document_portal_OBJECTS) $(xdg_document_portal_LDADD) $(LIBS) src/xdg_permission_store-xdp-utils.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) +src/xdg_permission_store-sd-escape.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) document-portal/xdg_permission_store-permission-store.$(OBJEXT): \ document-portal/$(am__dirstamp) \ document-portal/$(DEPDIR)/$(am__dirstamp) @@ -2184,10 +2303,13 @@ @AMDEP_TRUE@@am__include@ @am__quote@document-portal/gvdb/$(DEPDIR)/xdg_document_portal-gvdb-reader.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@document-portal/gvdb/$(DEPDIR)/xdg_permission_store-gvdb-builder.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@document-portal/gvdb/$(DEPDIR)/xdg_permission_store-gvdb-reader.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/test_permission_store-sd-escape.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/test_permission_store-xdp-utils.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/test_portals-sd-escape.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/test_portals-xdp-dbus.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/test_portals-xdp-impl-dbus.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/test_portals-xdp-utils.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/test_xdp_utils-sd-escape.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/test_xdp_utils-xdp-utils.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/tests_test_backends-xdp-impl-dbus.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-account.Po@am__quote@ # am--include-marker @@ -2196,11 +2318,13 @@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-camera.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-device.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-documents.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-dynamic-launcher.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-email.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-file-chooser.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-flatpak-instance.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-gamemode.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-geoclue-dbus.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-glib-backports.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-inhibit.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-location.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-memory-monitor.Po@am__quote@ # am--include-marker @@ -2210,12 +2334,15 @@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-permissions.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-pipewire.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-portal-impl.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-power-profile-monitor.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-print.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-proxy-resolver.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-realtime.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-remote-desktop.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-request.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-screen-cast.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-screenshot.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-sd-escape.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-secret.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-session.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-settings.Po@am__quote@ # am--include-marker @@ -2226,12 +2353,19 @@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-xdp-dbus.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-xdp-impl-dbus.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal-xdp-utils.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal_rewrite_launchers-glib-backports.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_desktop_portal_validate_icon-validate-icon.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_document_portal-sd-escape.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_document_portal-xdp-utils.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_permission_store-sd-escape.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xdg_permission_store-xdp-utils.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_backends-glib-backports.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_doc_portal-can-use-fuse.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_doc_portal-test-doc-portal.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_doc_portal-utils.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_permission_store-test-permission-store.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_permission_store-utils.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_portals-account.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_portals-background.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_portals-camera.Po@am__quote@ # am--include-marker @@ -2263,6 +2397,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@tests/backend/$(DEPDIR)/test_backends-request.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/backend/$(DEPDIR)/test_backends-screenshot.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/backend/$(DEPDIR)/test_backends-session.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@tests/backend/$(DEPDIR)/test_backends-settings.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/backend/$(DEPDIR)/test_backends-test-backends.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/backend/$(DEPDIR)/test_backends-wallpaper.Po@am__quote@ # am--include-marker @@ -2324,6 +2459,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_doc_portal_CFLAGS) $(CFLAGS) -c -o tests/test_doc_portal-test-doc-portal.obj `if test -f 'tests/test-doc-portal.c'; then $(CYGPATH_W) 'tests/test-doc-portal.c'; else $(CYGPATH_W) '$(srcdir)/tests/test-doc-portal.c'; fi` +tests/test_doc_portal-utils.o: tests/utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_doc_portal_CFLAGS) $(CFLAGS) -MT tests/test_doc_portal-utils.o -MD -MP -MF tests/$(DEPDIR)/test_doc_portal-utils.Tpo -c -o tests/test_doc_portal-utils.o `test -f 'tests/utils.c' || echo '$(srcdir)/'`tests/utils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/test_doc_portal-utils.Tpo tests/$(DEPDIR)/test_doc_portal-utils.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/utils.c' object='tests/test_doc_portal-utils.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_doc_portal_CFLAGS) $(CFLAGS) -c -o tests/test_doc_portal-utils.o `test -f 'tests/utils.c' || echo '$(srcdir)/'`tests/utils.c + +tests/test_doc_portal-utils.obj: tests/utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_doc_portal_CFLAGS) $(CFLAGS) -MT tests/test_doc_portal-utils.obj -MD -MP -MF tests/$(DEPDIR)/test_doc_portal-utils.Tpo -c -o tests/test_doc_portal-utils.obj `if test -f 'tests/utils.c'; then $(CYGPATH_W) 'tests/utils.c'; else $(CYGPATH_W) '$(srcdir)/tests/utils.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/test_doc_portal-utils.Tpo tests/$(DEPDIR)/test_doc_portal-utils.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/utils.c' object='tests/test_doc_portal-utils.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_doc_portal_CFLAGS) $(CFLAGS) -c -o tests/test_doc_portal-utils.obj `if test -f 'tests/utils.c'; then $(CYGPATH_W) 'tests/utils.c'; else $(CYGPATH_W) '$(srcdir)/tests/utils.c'; fi` + document-portal/test_doc_portal-document-portal-dbus.o: document-portal/document-portal-dbus.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_doc_portal_CFLAGS) $(CFLAGS) -MT document-portal/test_doc_portal-document-portal-dbus.o -MD -MP -MF document-portal/$(DEPDIR)/test_doc_portal-document-portal-dbus.Tpo -c -o document-portal/test_doc_portal-document-portal-dbus.o `test -f 'document-portal/document-portal-dbus.c' || echo '$(srcdir)/'`document-portal/document-portal-dbus.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) document-portal/$(DEPDIR)/test_doc_portal-document-portal-dbus.Tpo document-portal/$(DEPDIR)/test_doc_portal-document-portal-dbus.Po @@ -2380,6 +2529,34 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_permission_store_CFLAGS) $(CFLAGS) -c -o src/test_permission_store-xdp-utils.obj `if test -f 'src/xdp-utils.c'; then $(CYGPATH_W) 'src/xdp-utils.c'; else $(CYGPATH_W) '$(srcdir)/src/xdp-utils.c'; fi` +src/test_permission_store-sd-escape.o: src/sd-escape.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_permission_store_CFLAGS) $(CFLAGS) -MT src/test_permission_store-sd-escape.o -MD -MP -MF src/$(DEPDIR)/test_permission_store-sd-escape.Tpo -c -o src/test_permission_store-sd-escape.o `test -f 'src/sd-escape.c' || echo '$(srcdir)/'`src/sd-escape.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/test_permission_store-sd-escape.Tpo src/$(DEPDIR)/test_permission_store-sd-escape.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sd-escape.c' object='src/test_permission_store-sd-escape.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_permission_store_CFLAGS) $(CFLAGS) -c -o src/test_permission_store-sd-escape.o `test -f 'src/sd-escape.c' || echo '$(srcdir)/'`src/sd-escape.c + +src/test_permission_store-sd-escape.obj: src/sd-escape.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_permission_store_CFLAGS) $(CFLAGS) -MT src/test_permission_store-sd-escape.obj -MD -MP -MF src/$(DEPDIR)/test_permission_store-sd-escape.Tpo -c -o src/test_permission_store-sd-escape.obj `if test -f 'src/sd-escape.c'; then $(CYGPATH_W) 'src/sd-escape.c'; else $(CYGPATH_W) '$(srcdir)/src/sd-escape.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/test_permission_store-sd-escape.Tpo src/$(DEPDIR)/test_permission_store-sd-escape.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sd-escape.c' object='src/test_permission_store-sd-escape.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_permission_store_CFLAGS) $(CFLAGS) -c -o src/test_permission_store-sd-escape.obj `if test -f 'src/sd-escape.c'; then $(CYGPATH_W) 'src/sd-escape.c'; else $(CYGPATH_W) '$(srcdir)/src/sd-escape.c'; fi` + +tests/test_permission_store-utils.o: tests/utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_permission_store_CFLAGS) $(CFLAGS) -MT tests/test_permission_store-utils.o -MD -MP -MF tests/$(DEPDIR)/test_permission_store-utils.Tpo -c -o tests/test_permission_store-utils.o `test -f 'tests/utils.c' || echo '$(srcdir)/'`tests/utils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/test_permission_store-utils.Tpo tests/$(DEPDIR)/test_permission_store-utils.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/utils.c' object='tests/test_permission_store-utils.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_permission_store_CFLAGS) $(CFLAGS) -c -o tests/test_permission_store-utils.o `test -f 'tests/utils.c' || echo '$(srcdir)/'`tests/utils.c + +tests/test_permission_store-utils.obj: tests/utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_permission_store_CFLAGS) $(CFLAGS) -MT tests/test_permission_store-utils.obj -MD -MP -MF tests/$(DEPDIR)/test_permission_store-utils.Tpo -c -o tests/test_permission_store-utils.obj `if test -f 'tests/utils.c'; then $(CYGPATH_W) 'tests/utils.c'; else $(CYGPATH_W) '$(srcdir)/tests/utils.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/test_permission_store-utils.Tpo tests/$(DEPDIR)/test_permission_store-utils.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/utils.c' object='tests/test_permission_store-utils.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_permission_store_CFLAGS) $(CFLAGS) -c -o tests/test_permission_store-utils.obj `if test -f 'tests/utils.c'; then $(CYGPATH_W) 'tests/utils.c'; else $(CYGPATH_W) '$(srcdir)/tests/utils.c'; fi` + tests/test_portals-test-portals.o: tests/test-portals.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_portals_CPPFLAGS) $(CPPFLAGS) $(test_portals_CFLAGS) $(CFLAGS) -MT tests/test_portals-test-portals.o -MD -MP -MF tests/$(DEPDIR)/test_portals-test-portals.Tpo -c -o tests/test_portals-test-portals.o `test -f 'tests/test-portals.c' || echo '$(srcdir)/'`tests/test-portals.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/test_portals-test-portals.Tpo tests/$(DEPDIR)/test_portals-test-portals.Po @@ -2576,20 +2753,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_portals_CPPFLAGS) $(CPPFLAGS) $(test_portals_CFLAGS) $(CFLAGS) -c -o tests/test_portals-wallpaper.obj `if test -f 'tests/wallpaper.c'; then $(CYGPATH_W) 'tests/wallpaper.c'; else $(CYGPATH_W) '$(srcdir)/tests/wallpaper.c'; fi` -tests/test_portals-utils.o: tests/utils.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_portals_CPPFLAGS) $(CPPFLAGS) $(test_portals_CFLAGS) $(CFLAGS) -MT tests/test_portals-utils.o -MD -MP -MF tests/$(DEPDIR)/test_portals-utils.Tpo -c -o tests/test_portals-utils.o `test -f 'tests/utils.c' || echo '$(srcdir)/'`tests/utils.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/test_portals-utils.Tpo tests/$(DEPDIR)/test_portals-utils.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/utils.c' object='tests/test_portals-utils.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_portals_CPPFLAGS) $(CPPFLAGS) $(test_portals_CFLAGS) $(CFLAGS) -c -o tests/test_portals-utils.o `test -f 'tests/utils.c' || echo '$(srcdir)/'`tests/utils.c - -tests/test_portals-utils.obj: tests/utils.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_portals_CPPFLAGS) $(CPPFLAGS) $(test_portals_CFLAGS) $(CFLAGS) -MT tests/test_portals-utils.obj -MD -MP -MF tests/$(DEPDIR)/test_portals-utils.Tpo -c -o tests/test_portals-utils.obj `if test -f 'tests/utils.c'; then $(CYGPATH_W) 'tests/utils.c'; else $(CYGPATH_W) '$(srcdir)/tests/utils.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/test_portals-utils.Tpo tests/$(DEPDIR)/test_portals-utils.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/utils.c' object='tests/test_portals-utils.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_portals_CPPFLAGS) $(CPPFLAGS) $(test_portals_CFLAGS) $(CFLAGS) -c -o tests/test_portals-utils.obj `if test -f 'tests/utils.c'; then $(CYGPATH_W) 'tests/utils.c'; else $(CYGPATH_W) '$(srcdir)/tests/utils.c'; fi` - tests/test_portals-glib-backports.o: tests/glib-backports.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_portals_CPPFLAGS) $(CPPFLAGS) $(test_portals_CFLAGS) $(CFLAGS) -MT tests/test_portals-glib-backports.o -MD -MP -MF tests/$(DEPDIR)/test_portals-glib-backports.Tpo -c -o tests/test_portals-glib-backports.o `test -f 'tests/glib-backports.c' || echo '$(srcdir)/'`tests/glib-backports.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/test_portals-glib-backports.Tpo tests/$(DEPDIR)/test_portals-glib-backports.Po @@ -2646,6 +2809,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_portals_CPPFLAGS) $(CPPFLAGS) $(test_portals_CFLAGS) $(CFLAGS) -c -o src/test_portals-xdp-utils.obj `if test -f 'src/xdp-utils.c'; then $(CYGPATH_W) 'src/xdp-utils.c'; else $(CYGPATH_W) '$(srcdir)/src/xdp-utils.c'; fi` +src/test_portals-sd-escape.o: src/sd-escape.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_portals_CPPFLAGS) $(CPPFLAGS) $(test_portals_CFLAGS) $(CFLAGS) -MT src/test_portals-sd-escape.o -MD -MP -MF src/$(DEPDIR)/test_portals-sd-escape.Tpo -c -o src/test_portals-sd-escape.o `test -f 'src/sd-escape.c' || echo '$(srcdir)/'`src/sd-escape.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/test_portals-sd-escape.Tpo src/$(DEPDIR)/test_portals-sd-escape.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sd-escape.c' object='src/test_portals-sd-escape.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_portals_CPPFLAGS) $(CPPFLAGS) $(test_portals_CFLAGS) $(CFLAGS) -c -o src/test_portals-sd-escape.o `test -f 'src/sd-escape.c' || echo '$(srcdir)/'`src/sd-escape.c + +src/test_portals-sd-escape.obj: src/sd-escape.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_portals_CPPFLAGS) $(CPPFLAGS) $(test_portals_CFLAGS) $(CFLAGS) -MT src/test_portals-sd-escape.obj -MD -MP -MF src/$(DEPDIR)/test_portals-sd-escape.Tpo -c -o src/test_portals-sd-escape.obj `if test -f 'src/sd-escape.c'; then $(CYGPATH_W) 'src/sd-escape.c'; else $(CYGPATH_W) '$(srcdir)/src/sd-escape.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/test_portals-sd-escape.Tpo src/$(DEPDIR)/test_portals-sd-escape.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sd-escape.c' object='src/test_portals-sd-escape.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_portals_CPPFLAGS) $(CPPFLAGS) $(test_portals_CFLAGS) $(CFLAGS) -c -o src/test_portals-sd-escape.obj `if test -f 'src/sd-escape.c'; then $(CYGPATH_W) 'src/sd-escape.c'; else $(CYGPATH_W) '$(srcdir)/src/sd-escape.c'; fi` + document-portal/test_portals-permission-store-dbus.o: document-portal/permission-store-dbus.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_portals_CPPFLAGS) $(CPPFLAGS) $(test_portals_CFLAGS) $(CFLAGS) -MT document-portal/test_portals-permission-store-dbus.o -MD -MP -MF document-portal/$(DEPDIR)/test_portals-permission-store-dbus.Tpo -c -o document-portal/test_portals-permission-store-dbus.o `test -f 'document-portal/permission-store-dbus.c' || echo '$(srcdir)/'`document-portal/permission-store-dbus.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) document-portal/$(DEPDIR)/test_portals-permission-store-dbus.Tpo document-portal/$(DEPDIR)/test_portals-permission-store-dbus.Po @@ -2660,6 +2837,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_portals_CPPFLAGS) $(CPPFLAGS) $(test_portals_CFLAGS) $(CFLAGS) -c -o document-portal/test_portals-permission-store-dbus.obj `if test -f 'document-portal/permission-store-dbus.c'; then $(CYGPATH_W) 'document-portal/permission-store-dbus.c'; else $(CYGPATH_W) '$(srcdir)/document-portal/permission-store-dbus.c'; fi` +tests/test_portals-utils.o: tests/utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_portals_CPPFLAGS) $(CPPFLAGS) $(test_portals_CFLAGS) $(CFLAGS) -MT tests/test_portals-utils.o -MD -MP -MF tests/$(DEPDIR)/test_portals-utils.Tpo -c -o tests/test_portals-utils.o `test -f 'tests/utils.c' || echo '$(srcdir)/'`tests/utils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/test_portals-utils.Tpo tests/$(DEPDIR)/test_portals-utils.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/utils.c' object='tests/test_portals-utils.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_portals_CPPFLAGS) $(CPPFLAGS) $(test_portals_CFLAGS) $(CFLAGS) -c -o tests/test_portals-utils.o `test -f 'tests/utils.c' || echo '$(srcdir)/'`tests/utils.c + +tests/test_portals-utils.obj: tests/utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_portals_CPPFLAGS) $(CPPFLAGS) $(test_portals_CFLAGS) $(CFLAGS) -MT tests/test_portals-utils.obj -MD -MP -MF tests/$(DEPDIR)/test_portals-utils.Tpo -c -o tests/test_portals-utils.obj `if test -f 'tests/utils.c'; then $(CYGPATH_W) 'tests/utils.c'; else $(CYGPATH_W) '$(srcdir)/tests/utils.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/test_portals-utils.Tpo tests/$(DEPDIR)/test_portals-utils.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/utils.c' object='tests/test_portals-utils.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_portals_CPPFLAGS) $(CPPFLAGS) $(test_portals_CFLAGS) $(CFLAGS) -c -o tests/test_portals-utils.obj `if test -f 'tests/utils.c'; then $(CYGPATH_W) 'tests/utils.c'; else $(CYGPATH_W) '$(srcdir)/tests/utils.c'; fi` + tests/test_xdp_utils-test-xdp-utils.o: tests/test-xdp-utils.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_xdp_utils_CFLAGS) $(CFLAGS) -MT tests/test_xdp_utils-test-xdp-utils.o -MD -MP -MF tests/$(DEPDIR)/test_xdp_utils-test-xdp-utils.Tpo -c -o tests/test_xdp_utils-test-xdp-utils.o `test -f 'tests/test-xdp-utils.c' || echo '$(srcdir)/'`tests/test-xdp-utils.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/test_xdp_utils-test-xdp-utils.Tpo tests/$(DEPDIR)/test_xdp_utils-test-xdp-utils.Po @@ -2688,6 +2879,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_xdp_utils_CFLAGS) $(CFLAGS) -c -o src/test_xdp_utils-xdp-utils.obj `if test -f 'src/xdp-utils.c'; then $(CYGPATH_W) 'src/xdp-utils.c'; else $(CYGPATH_W) '$(srcdir)/src/xdp-utils.c'; fi` +src/test_xdp_utils-sd-escape.o: src/sd-escape.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_xdp_utils_CFLAGS) $(CFLAGS) -MT src/test_xdp_utils-sd-escape.o -MD -MP -MF src/$(DEPDIR)/test_xdp_utils-sd-escape.Tpo -c -o src/test_xdp_utils-sd-escape.o `test -f 'src/sd-escape.c' || echo '$(srcdir)/'`src/sd-escape.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/test_xdp_utils-sd-escape.Tpo src/$(DEPDIR)/test_xdp_utils-sd-escape.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sd-escape.c' object='src/test_xdp_utils-sd-escape.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_xdp_utils_CFLAGS) $(CFLAGS) -c -o src/test_xdp_utils-sd-escape.o `test -f 'src/sd-escape.c' || echo '$(srcdir)/'`src/sd-escape.c + +src/test_xdp_utils-sd-escape.obj: src/sd-escape.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_xdp_utils_CFLAGS) $(CFLAGS) -MT src/test_xdp_utils-sd-escape.obj -MD -MP -MF src/$(DEPDIR)/test_xdp_utils-sd-escape.Tpo -c -o src/test_xdp_utils-sd-escape.obj `if test -f 'src/sd-escape.c'; then $(CYGPATH_W) 'src/sd-escape.c'; else $(CYGPATH_W) '$(srcdir)/src/sd-escape.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/test_xdp_utils-sd-escape.Tpo src/$(DEPDIR)/test_xdp_utils-sd-escape.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sd-escape.c' object='src/test_xdp_utils-sd-escape.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_xdp_utils_CFLAGS) $(CFLAGS) -c -o src/test_xdp_utils-sd-escape.obj `if test -f 'src/sd-escape.c'; then $(CYGPATH_W) 'src/sd-escape.c'; else $(CYGPATH_W) '$(srcdir)/src/sd-escape.c'; fi` + tests/testdb-testdb.o: tests/testdb.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testdb_CFLAGS) $(CFLAGS) -MT tests/testdb-testdb.o -MD -MP -MF tests/$(DEPDIR)/testdb-testdb.Tpo -c -o tests/testdb-testdb.o `test -f 'tests/testdb.c' || echo '$(srcdir)/'`tests/testdb.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/testdb-testdb.Tpo tests/$(DEPDIR)/testdb-testdb.Po @@ -2940,6 +3145,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_test_backends_CFLAGS) $(CFLAGS) -c -o tests/backend/test_backends-screenshot.obj `if test -f 'tests/backend/screenshot.c'; then $(CYGPATH_W) 'tests/backend/screenshot.c'; else $(CYGPATH_W) '$(srcdir)/tests/backend/screenshot.c'; fi` +tests/backend/test_backends-settings.o: tests/backend/settings.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_test_backends_CFLAGS) $(CFLAGS) -MT tests/backend/test_backends-settings.o -MD -MP -MF tests/backend/$(DEPDIR)/test_backends-settings.Tpo -c -o tests/backend/test_backends-settings.o `test -f 'tests/backend/settings.c' || echo '$(srcdir)/'`tests/backend/settings.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/backend/$(DEPDIR)/test_backends-settings.Tpo tests/backend/$(DEPDIR)/test_backends-settings.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/backend/settings.c' object='tests/backend/test_backends-settings.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_test_backends_CFLAGS) $(CFLAGS) -c -o tests/backend/test_backends-settings.o `test -f 'tests/backend/settings.c' || echo '$(srcdir)/'`tests/backend/settings.c + +tests/backend/test_backends-settings.obj: tests/backend/settings.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_test_backends_CFLAGS) $(CFLAGS) -MT tests/backend/test_backends-settings.obj -MD -MP -MF tests/backend/$(DEPDIR)/test_backends-settings.Tpo -c -o tests/backend/test_backends-settings.obj `if test -f 'tests/backend/settings.c'; then $(CYGPATH_W) 'tests/backend/settings.c'; else $(CYGPATH_W) '$(srcdir)/tests/backend/settings.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/backend/$(DEPDIR)/test_backends-settings.Tpo tests/backend/$(DEPDIR)/test_backends-settings.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/backend/settings.c' object='tests/backend/test_backends-settings.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_test_backends_CFLAGS) $(CFLAGS) -c -o tests/backend/test_backends-settings.obj `if test -f 'tests/backend/settings.c'; then $(CYGPATH_W) 'tests/backend/settings.c'; else $(CYGPATH_W) '$(srcdir)/tests/backend/settings.c'; fi` + tests/backend/test_backends-wallpaper.o: tests/backend/wallpaper.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_test_backends_CFLAGS) $(CFLAGS) -MT tests/backend/test_backends-wallpaper.o -MD -MP -MF tests/backend/$(DEPDIR)/test_backends-wallpaper.Tpo -c -o tests/backend/test_backends-wallpaper.o `test -f 'tests/backend/wallpaper.c' || echo '$(srcdir)/'`tests/backend/wallpaper.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/backend/$(DEPDIR)/test_backends-wallpaper.Tpo tests/backend/$(DEPDIR)/test_backends-wallpaper.Po @@ -3010,6 +3229,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -c -o src/xdg_desktop_portal-file-chooser.obj `if test -f 'src/file-chooser.c'; then $(CYGPATH_W) 'src/file-chooser.c'; else $(CYGPATH_W) '$(srcdir)/src/file-chooser.c'; fi` +src/xdg_desktop_portal-glib-backports.o: src/glib-backports.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -MT src/xdg_desktop_portal-glib-backports.o -MD -MP -MF src/$(DEPDIR)/xdg_desktop_portal-glib-backports.Tpo -c -o src/xdg_desktop_portal-glib-backports.o `test -f 'src/glib-backports.c' || echo '$(srcdir)/'`src/glib-backports.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_desktop_portal-glib-backports.Tpo src/$(DEPDIR)/xdg_desktop_portal-glib-backports.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/glib-backports.c' object='src/xdg_desktop_portal-glib-backports.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -c -o src/xdg_desktop_portal-glib-backports.o `test -f 'src/glib-backports.c' || echo '$(srcdir)/'`src/glib-backports.c + +src/xdg_desktop_portal-glib-backports.obj: src/glib-backports.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -MT src/xdg_desktop_portal-glib-backports.obj -MD -MP -MF src/$(DEPDIR)/xdg_desktop_portal-glib-backports.Tpo -c -o src/xdg_desktop_portal-glib-backports.obj `if test -f 'src/glib-backports.c'; then $(CYGPATH_W) 'src/glib-backports.c'; else $(CYGPATH_W) '$(srcdir)/src/glib-backports.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_desktop_portal-glib-backports.Tpo src/$(DEPDIR)/xdg_desktop_portal-glib-backports.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/glib-backports.c' object='src/xdg_desktop_portal-glib-backports.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -c -o src/xdg_desktop_portal-glib-backports.obj `if test -f 'src/glib-backports.c'; then $(CYGPATH_W) 'src/glib-backports.c'; else $(CYGPATH_W) '$(srcdir)/src/glib-backports.c'; fi` + src/xdg_desktop_portal-open-uri.o: src/open-uri.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -MT src/xdg_desktop_portal-open-uri.o -MD -MP -MF src/$(DEPDIR)/xdg_desktop_portal-open-uri.Tpo -c -o src/xdg_desktop_portal-open-uri.o `test -f 'src/open-uri.c' || echo '$(srcdir)/'`src/open-uri.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_desktop_portal-open-uri.Tpo src/$(DEPDIR)/xdg_desktop_portal-open-uri.Po @@ -3066,6 +3299,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -c -o src/xdg_desktop_portal-network-monitor.obj `if test -f 'src/network-monitor.c'; then $(CYGPATH_W) 'src/network-monitor.c'; else $(CYGPATH_W) '$(srcdir)/src/network-monitor.c'; fi` +src/xdg_desktop_portal-power-profile-monitor.o: src/power-profile-monitor.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -MT src/xdg_desktop_portal-power-profile-monitor.o -MD -MP -MF src/$(DEPDIR)/xdg_desktop_portal-power-profile-monitor.Tpo -c -o src/xdg_desktop_portal-power-profile-monitor.o `test -f 'src/power-profile-monitor.c' || echo '$(srcdir)/'`src/power-profile-monitor.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_desktop_portal-power-profile-monitor.Tpo src/$(DEPDIR)/xdg_desktop_portal-power-profile-monitor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/power-profile-monitor.c' object='src/xdg_desktop_portal-power-profile-monitor.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -c -o src/xdg_desktop_portal-power-profile-monitor.o `test -f 'src/power-profile-monitor.c' || echo '$(srcdir)/'`src/power-profile-monitor.c + +src/xdg_desktop_portal-power-profile-monitor.obj: src/power-profile-monitor.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -MT src/xdg_desktop_portal-power-profile-monitor.obj -MD -MP -MF src/$(DEPDIR)/xdg_desktop_portal-power-profile-monitor.Tpo -c -o src/xdg_desktop_portal-power-profile-monitor.obj `if test -f 'src/power-profile-monitor.c'; then $(CYGPATH_W) 'src/power-profile-monitor.c'; else $(CYGPATH_W) '$(srcdir)/src/power-profile-monitor.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_desktop_portal-power-profile-monitor.Tpo src/$(DEPDIR)/xdg_desktop_portal-power-profile-monitor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/power-profile-monitor.c' object='src/xdg_desktop_portal-power-profile-monitor.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -c -o src/xdg_desktop_portal-power-profile-monitor.obj `if test -f 'src/power-profile-monitor.c'; then $(CYGPATH_W) 'src/power-profile-monitor.c'; else $(CYGPATH_W) '$(srcdir)/src/power-profile-monitor.c'; fi` + src/xdg_desktop_portal-proxy-resolver.o: src/proxy-resolver.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -MT src/xdg_desktop_portal-proxy-resolver.o -MD -MP -MF src/$(DEPDIR)/xdg_desktop_portal-proxy-resolver.Tpo -c -o src/xdg_desktop_portal-proxy-resolver.o `test -f 'src/proxy-resolver.c' || echo '$(srcdir)/'`src/proxy-resolver.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_desktop_portal-proxy-resolver.Tpo src/$(DEPDIR)/xdg_desktop_portal-proxy-resolver.Po @@ -3150,6 +3397,34 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -c -o src/xdg_desktop_portal-account.obj `if test -f 'src/account.c'; then $(CYGPATH_W) 'src/account.c'; else $(CYGPATH_W) '$(srcdir)/src/account.c'; fi` +src/xdg_desktop_portal-realtime.o: src/realtime.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -MT src/xdg_desktop_portal-realtime.o -MD -MP -MF src/$(DEPDIR)/xdg_desktop_portal-realtime.Tpo -c -o src/xdg_desktop_portal-realtime.o `test -f 'src/realtime.c' || echo '$(srcdir)/'`src/realtime.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_desktop_portal-realtime.Tpo src/$(DEPDIR)/xdg_desktop_portal-realtime.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/realtime.c' object='src/xdg_desktop_portal-realtime.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -c -o src/xdg_desktop_portal-realtime.o `test -f 'src/realtime.c' || echo '$(srcdir)/'`src/realtime.c + +src/xdg_desktop_portal-realtime.obj: src/realtime.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -MT src/xdg_desktop_portal-realtime.obj -MD -MP -MF src/$(DEPDIR)/xdg_desktop_portal-realtime.Tpo -c -o src/xdg_desktop_portal-realtime.obj `if test -f 'src/realtime.c'; then $(CYGPATH_W) 'src/realtime.c'; else $(CYGPATH_W) '$(srcdir)/src/realtime.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_desktop_portal-realtime.Tpo src/$(DEPDIR)/xdg_desktop_portal-realtime.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/realtime.c' object='src/xdg_desktop_portal-realtime.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -c -o src/xdg_desktop_portal-realtime.obj `if test -f 'src/realtime.c'; then $(CYGPATH_W) 'src/realtime.c'; else $(CYGPATH_W) '$(srcdir)/src/realtime.c'; fi` + +src/xdg_desktop_portal-dynamic-launcher.o: src/dynamic-launcher.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -MT src/xdg_desktop_portal-dynamic-launcher.o -MD -MP -MF src/$(DEPDIR)/xdg_desktop_portal-dynamic-launcher.Tpo -c -o src/xdg_desktop_portal-dynamic-launcher.o `test -f 'src/dynamic-launcher.c' || echo '$(srcdir)/'`src/dynamic-launcher.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_desktop_portal-dynamic-launcher.Tpo src/$(DEPDIR)/xdg_desktop_portal-dynamic-launcher.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/dynamic-launcher.c' object='src/xdg_desktop_portal-dynamic-launcher.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -c -o src/xdg_desktop_portal-dynamic-launcher.o `test -f 'src/dynamic-launcher.c' || echo '$(srcdir)/'`src/dynamic-launcher.c + +src/xdg_desktop_portal-dynamic-launcher.obj: src/dynamic-launcher.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -MT src/xdg_desktop_portal-dynamic-launcher.obj -MD -MP -MF src/$(DEPDIR)/xdg_desktop_portal-dynamic-launcher.Tpo -c -o src/xdg_desktop_portal-dynamic-launcher.obj `if test -f 'src/dynamic-launcher.c'; then $(CYGPATH_W) 'src/dynamic-launcher.c'; else $(CYGPATH_W) '$(srcdir)/src/dynamic-launcher.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_desktop_portal-dynamic-launcher.Tpo src/$(DEPDIR)/xdg_desktop_portal-dynamic-launcher.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/dynamic-launcher.c' object='src/xdg_desktop_portal-dynamic-launcher.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -c -o src/xdg_desktop_portal-dynamic-launcher.obj `if test -f 'src/dynamic-launcher.c'; then $(CYGPATH_W) 'src/dynamic-launcher.c'; else $(CYGPATH_W) '$(srcdir)/src/dynamic-launcher.c'; fi` + src/xdg_desktop_portal-request.o: src/request.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -MT src/xdg_desktop_portal-request.o -MD -MP -MF src/$(DEPDIR)/xdg_desktop_portal-request.Tpo -c -o src/xdg_desktop_portal-request.o `test -f 'src/request.c' || echo '$(srcdir)/'`src/request.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_desktop_portal-request.Tpo src/$(DEPDIR)/xdg_desktop_portal-request.Po @@ -3360,6 +3635,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -c -o src/xdg_desktop_portal-portal-impl.obj `if test -f 'src/portal-impl.c'; then $(CYGPATH_W) 'src/portal-impl.c'; else $(CYGPATH_W) '$(srcdir)/src/portal-impl.c'; fi` +src/xdg_desktop_portal-sd-escape.o: src/sd-escape.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -MT src/xdg_desktop_portal-sd-escape.o -MD -MP -MF src/$(DEPDIR)/xdg_desktop_portal-sd-escape.Tpo -c -o src/xdg_desktop_portal-sd-escape.o `test -f 'src/sd-escape.c' || echo '$(srcdir)/'`src/sd-escape.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_desktop_portal-sd-escape.Tpo src/$(DEPDIR)/xdg_desktop_portal-sd-escape.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sd-escape.c' object='src/xdg_desktop_portal-sd-escape.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -c -o src/xdg_desktop_portal-sd-escape.o `test -f 'src/sd-escape.c' || echo '$(srcdir)/'`src/sd-escape.c + +src/xdg_desktop_portal-sd-escape.obj: src/sd-escape.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -MT src/xdg_desktop_portal-sd-escape.obj -MD -MP -MF src/$(DEPDIR)/xdg_desktop_portal-sd-escape.Tpo -c -o src/xdg_desktop_portal-sd-escape.obj `if test -f 'src/sd-escape.c'; then $(CYGPATH_W) 'src/sd-escape.c'; else $(CYGPATH_W) '$(srcdir)/src/sd-escape.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_desktop_portal-sd-escape.Tpo src/$(DEPDIR)/xdg_desktop_portal-sd-escape.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sd-escape.c' object='src/xdg_desktop_portal-sd-escape.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -c -o src/xdg_desktop_portal-sd-escape.obj `if test -f 'src/sd-escape.c'; then $(CYGPATH_W) 'src/sd-escape.c'; else $(CYGPATH_W) '$(srcdir)/src/sd-escape.c'; fi` + src/xdg_desktop_portal-screen-cast.o: src/screen-cast.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -MT src/xdg_desktop_portal-screen-cast.o -MD -MP -MF src/$(DEPDIR)/xdg_desktop_portal-screen-cast.Tpo -c -o src/xdg_desktop_portal-screen-cast.o `test -f 'src/screen-cast.c' || echo '$(srcdir)/'`src/screen-cast.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_desktop_portal-screen-cast.Tpo src/$(DEPDIR)/xdg_desktop_portal-screen-cast.Po @@ -3486,6 +3775,48 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xdg_desktop_portal_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_CFLAGS) $(CFLAGS) -c -o src/xdg_desktop_portal-xdg-desktop-resources.obj `if test -f 'src/xdg-desktop-resources.c'; then $(CYGPATH_W) 'src/xdg-desktop-resources.c'; else $(CYGPATH_W) '$(srcdir)/src/xdg-desktop-resources.c'; fi` +src/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.o: src/rewrite-launchers.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_rewrite_launchers_CFLAGS) $(CFLAGS) -MT src/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.o -MD -MP -MF src/$(DEPDIR)/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.Tpo -c -o src/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.o `test -f 'src/rewrite-launchers.c' || echo '$(srcdir)/'`src/rewrite-launchers.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.Tpo src/$(DEPDIR)/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/rewrite-launchers.c' object='src/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_rewrite_launchers_CFLAGS) $(CFLAGS) -c -o src/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.o `test -f 'src/rewrite-launchers.c' || echo '$(srcdir)/'`src/rewrite-launchers.c + +src/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.obj: src/rewrite-launchers.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_rewrite_launchers_CFLAGS) $(CFLAGS) -MT src/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.obj -MD -MP -MF src/$(DEPDIR)/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.Tpo -c -o src/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.obj `if test -f 'src/rewrite-launchers.c'; then $(CYGPATH_W) 'src/rewrite-launchers.c'; else $(CYGPATH_W) '$(srcdir)/src/rewrite-launchers.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.Tpo src/$(DEPDIR)/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/rewrite-launchers.c' object='src/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_rewrite_launchers_CFLAGS) $(CFLAGS) -c -o src/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.obj `if test -f 'src/rewrite-launchers.c'; then $(CYGPATH_W) 'src/rewrite-launchers.c'; else $(CYGPATH_W) '$(srcdir)/src/rewrite-launchers.c'; fi` + +src/xdg_desktop_portal_rewrite_launchers-glib-backports.o: src/glib-backports.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_rewrite_launchers_CFLAGS) $(CFLAGS) -MT src/xdg_desktop_portal_rewrite_launchers-glib-backports.o -MD -MP -MF src/$(DEPDIR)/xdg_desktop_portal_rewrite_launchers-glib-backports.Tpo -c -o src/xdg_desktop_portal_rewrite_launchers-glib-backports.o `test -f 'src/glib-backports.c' || echo '$(srcdir)/'`src/glib-backports.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_desktop_portal_rewrite_launchers-glib-backports.Tpo src/$(DEPDIR)/xdg_desktop_portal_rewrite_launchers-glib-backports.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/glib-backports.c' object='src/xdg_desktop_portal_rewrite_launchers-glib-backports.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_rewrite_launchers_CFLAGS) $(CFLAGS) -c -o src/xdg_desktop_portal_rewrite_launchers-glib-backports.o `test -f 'src/glib-backports.c' || echo '$(srcdir)/'`src/glib-backports.c + +src/xdg_desktop_portal_rewrite_launchers-glib-backports.obj: src/glib-backports.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_rewrite_launchers_CFLAGS) $(CFLAGS) -MT src/xdg_desktop_portal_rewrite_launchers-glib-backports.obj -MD -MP -MF src/$(DEPDIR)/xdg_desktop_portal_rewrite_launchers-glib-backports.Tpo -c -o src/xdg_desktop_portal_rewrite_launchers-glib-backports.obj `if test -f 'src/glib-backports.c'; then $(CYGPATH_W) 'src/glib-backports.c'; else $(CYGPATH_W) '$(srcdir)/src/glib-backports.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_desktop_portal_rewrite_launchers-glib-backports.Tpo src/$(DEPDIR)/xdg_desktop_portal_rewrite_launchers-glib-backports.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/glib-backports.c' object='src/xdg_desktop_portal_rewrite_launchers-glib-backports.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_rewrite_launchers_CFLAGS) $(CFLAGS) -c -o src/xdg_desktop_portal_rewrite_launchers-glib-backports.obj `if test -f 'src/glib-backports.c'; then $(CYGPATH_W) 'src/glib-backports.c'; else $(CYGPATH_W) '$(srcdir)/src/glib-backports.c'; fi` + +src/xdg_desktop_portal_validate_icon-validate-icon.o: src/validate-icon.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_validate_icon_CFLAGS) $(CFLAGS) -MT src/xdg_desktop_portal_validate_icon-validate-icon.o -MD -MP -MF src/$(DEPDIR)/xdg_desktop_portal_validate_icon-validate-icon.Tpo -c -o src/xdg_desktop_portal_validate_icon-validate-icon.o `test -f 'src/validate-icon.c' || echo '$(srcdir)/'`src/validate-icon.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_desktop_portal_validate_icon-validate-icon.Tpo src/$(DEPDIR)/xdg_desktop_portal_validate_icon-validate-icon.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/validate-icon.c' object='src/xdg_desktop_portal_validate_icon-validate-icon.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_validate_icon_CFLAGS) $(CFLAGS) -c -o src/xdg_desktop_portal_validate_icon-validate-icon.o `test -f 'src/validate-icon.c' || echo '$(srcdir)/'`src/validate-icon.c + +src/xdg_desktop_portal_validate_icon-validate-icon.obj: src/validate-icon.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_validate_icon_CFLAGS) $(CFLAGS) -MT src/xdg_desktop_portal_validate_icon-validate-icon.obj -MD -MP -MF src/$(DEPDIR)/xdg_desktop_portal_validate_icon-validate-icon.Tpo -c -o src/xdg_desktop_portal_validate_icon-validate-icon.obj `if test -f 'src/validate-icon.c'; then $(CYGPATH_W) 'src/validate-icon.c'; else $(CYGPATH_W) '$(srcdir)/src/validate-icon.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_desktop_portal_validate_icon-validate-icon.Tpo src/$(DEPDIR)/xdg_desktop_portal_validate_icon-validate-icon.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/validate-icon.c' object='src/xdg_desktop_portal_validate_icon-validate-icon.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_desktop_portal_validate_icon_CFLAGS) $(CFLAGS) -c -o src/xdg_desktop_portal_validate_icon-validate-icon.obj `if test -f 'src/validate-icon.c'; then $(CYGPATH_W) 'src/validate-icon.c'; else $(CYGPATH_W) '$(srcdir)/src/validate-icon.c'; fi` + src/xdg_document_portal-xdp-utils.o: src/xdp-utils.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_document_portal_CFLAGS) $(CFLAGS) -MT src/xdg_document_portal-xdp-utils.o -MD -MP -MF src/$(DEPDIR)/xdg_document_portal-xdp-utils.Tpo -c -o src/xdg_document_portal-xdp-utils.o `test -f 'src/xdp-utils.c' || echo '$(srcdir)/'`src/xdp-utils.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_document_portal-xdp-utils.Tpo src/$(DEPDIR)/xdg_document_portal-xdp-utils.Po @@ -3500,6 +3831,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_document_portal_CFLAGS) $(CFLAGS) -c -o src/xdg_document_portal-xdp-utils.obj `if test -f 'src/xdp-utils.c'; then $(CYGPATH_W) 'src/xdp-utils.c'; else $(CYGPATH_W) '$(srcdir)/src/xdp-utils.c'; fi` +src/xdg_document_portal-sd-escape.o: src/sd-escape.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_document_portal_CFLAGS) $(CFLAGS) -MT src/xdg_document_portal-sd-escape.o -MD -MP -MF src/$(DEPDIR)/xdg_document_portal-sd-escape.Tpo -c -o src/xdg_document_portal-sd-escape.o `test -f 'src/sd-escape.c' || echo '$(srcdir)/'`src/sd-escape.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_document_portal-sd-escape.Tpo src/$(DEPDIR)/xdg_document_portal-sd-escape.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sd-escape.c' object='src/xdg_document_portal-sd-escape.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_document_portal_CFLAGS) $(CFLAGS) -c -o src/xdg_document_portal-sd-escape.o `test -f 'src/sd-escape.c' || echo '$(srcdir)/'`src/sd-escape.c + +src/xdg_document_portal-sd-escape.obj: src/sd-escape.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_document_portal_CFLAGS) $(CFLAGS) -MT src/xdg_document_portal-sd-escape.obj -MD -MP -MF src/$(DEPDIR)/xdg_document_portal-sd-escape.Tpo -c -o src/xdg_document_portal-sd-escape.obj `if test -f 'src/sd-escape.c'; then $(CYGPATH_W) 'src/sd-escape.c'; else $(CYGPATH_W) '$(srcdir)/src/sd-escape.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_document_portal-sd-escape.Tpo src/$(DEPDIR)/xdg_document_portal-sd-escape.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sd-escape.c' object='src/xdg_document_portal-sd-escape.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_document_portal_CFLAGS) $(CFLAGS) -c -o src/xdg_document_portal-sd-escape.obj `if test -f 'src/sd-escape.c'; then $(CYGPATH_W) 'src/sd-escape.c'; else $(CYGPATH_W) '$(srcdir)/src/sd-escape.c'; fi` + document-portal/xdg_document_portal-document-portal.o: document-portal/document-portal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_document_portal_CFLAGS) $(CFLAGS) -MT document-portal/xdg_document_portal-document-portal.o -MD -MP -MF document-portal/$(DEPDIR)/xdg_document_portal-document-portal.Tpo -c -o document-portal/xdg_document_portal-document-portal.o `test -f 'document-portal/document-portal.c' || echo '$(srcdir)/'`document-portal/document-portal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) document-portal/$(DEPDIR)/xdg_document_portal-document-portal.Tpo document-portal/$(DEPDIR)/xdg_document_portal-document-portal.Po @@ -3640,6 +3985,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_permission_store_CFLAGS) $(CFLAGS) -c -o src/xdg_permission_store-xdp-utils.obj `if test -f 'src/xdp-utils.c'; then $(CYGPATH_W) 'src/xdp-utils.c'; else $(CYGPATH_W) '$(srcdir)/src/xdp-utils.c'; fi` +src/xdg_permission_store-sd-escape.o: src/sd-escape.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_permission_store_CFLAGS) $(CFLAGS) -MT src/xdg_permission_store-sd-escape.o -MD -MP -MF src/$(DEPDIR)/xdg_permission_store-sd-escape.Tpo -c -o src/xdg_permission_store-sd-escape.o `test -f 'src/sd-escape.c' || echo '$(srcdir)/'`src/sd-escape.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_permission_store-sd-escape.Tpo src/$(DEPDIR)/xdg_permission_store-sd-escape.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sd-escape.c' object='src/xdg_permission_store-sd-escape.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_permission_store_CFLAGS) $(CFLAGS) -c -o src/xdg_permission_store-sd-escape.o `test -f 'src/sd-escape.c' || echo '$(srcdir)/'`src/sd-escape.c + +src/xdg_permission_store-sd-escape.obj: src/sd-escape.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_permission_store_CFLAGS) $(CFLAGS) -MT src/xdg_permission_store-sd-escape.obj -MD -MP -MF src/$(DEPDIR)/xdg_permission_store-sd-escape.Tpo -c -o src/xdg_permission_store-sd-escape.obj `if test -f 'src/sd-escape.c'; then $(CYGPATH_W) 'src/sd-escape.c'; else $(CYGPATH_W) '$(srcdir)/src/sd-escape.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/xdg_permission_store-sd-escape.Tpo src/$(DEPDIR)/xdg_permission_store-sd-escape.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sd-escape.c' object='src/xdg_permission_store-sd-escape.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_permission_store_CFLAGS) $(CFLAGS) -c -o src/xdg_permission_store-sd-escape.obj `if test -f 'src/sd-escape.c'; then $(CYGPATH_W) 'src/sd-escape.c'; else $(CYGPATH_W) '$(srcdir)/src/sd-escape.c'; fi` + document-portal/xdg_permission_store-permission-store.o: document-portal/permission-store.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_permission_store_CFLAGS) $(CFLAGS) -MT document-portal/xdg_permission_store-permission-store.o -MD -MP -MF document-portal/$(DEPDIR)/xdg_permission_store-permission-store.Tpo -c -o document-portal/xdg_permission_store-permission-store.o `test -f 'document-portal/permission-store.c' || echo '$(srcdir)/'`document-portal/permission-store.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) document-portal/$(DEPDIR)/xdg_permission_store-permission-store.Tpo document-portal/$(DEPDIR)/xdg_permission_store-permission-store.Po @@ -4312,6 +4671,10 @@ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -4354,6 +4717,8 @@ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -4513,10 +4878,13 @@ -rm -f document-portal/gvdb/$(DEPDIR)/xdg_document_portal-gvdb-reader.Po -rm -f document-portal/gvdb/$(DEPDIR)/xdg_permission_store-gvdb-builder.Po -rm -f document-portal/gvdb/$(DEPDIR)/xdg_permission_store-gvdb-reader.Po + -rm -f src/$(DEPDIR)/test_permission_store-sd-escape.Po -rm -f src/$(DEPDIR)/test_permission_store-xdp-utils.Po + -rm -f src/$(DEPDIR)/test_portals-sd-escape.Po -rm -f src/$(DEPDIR)/test_portals-xdp-dbus.Po -rm -f src/$(DEPDIR)/test_portals-xdp-impl-dbus.Po -rm -f src/$(DEPDIR)/test_portals-xdp-utils.Po + -rm -f src/$(DEPDIR)/test_xdp_utils-sd-escape.Po -rm -f src/$(DEPDIR)/test_xdp_utils-xdp-utils.Po -rm -f src/$(DEPDIR)/tests_test_backends-xdp-impl-dbus.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-account.Po @@ -4525,11 +4893,13 @@ -rm -f src/$(DEPDIR)/xdg_desktop_portal-camera.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-device.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-documents.Po + -rm -f src/$(DEPDIR)/xdg_desktop_portal-dynamic-launcher.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-email.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-file-chooser.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-flatpak-instance.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-gamemode.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-geoclue-dbus.Po + -rm -f src/$(DEPDIR)/xdg_desktop_portal-glib-backports.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-inhibit.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-location.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-memory-monitor.Po @@ -4539,12 +4909,15 @@ -rm -f src/$(DEPDIR)/xdg_desktop_portal-permissions.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-pipewire.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-portal-impl.Po + -rm -f src/$(DEPDIR)/xdg_desktop_portal-power-profile-monitor.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-print.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-proxy-resolver.Po + -rm -f src/$(DEPDIR)/xdg_desktop_portal-realtime.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-remote-desktop.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-request.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-screen-cast.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-screenshot.Po + -rm -f src/$(DEPDIR)/xdg_desktop_portal-sd-escape.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-secret.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-session.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-settings.Po @@ -4555,12 +4928,19 @@ -rm -f src/$(DEPDIR)/xdg_desktop_portal-xdp-dbus.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-xdp-impl-dbus.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-xdp-utils.Po + -rm -f src/$(DEPDIR)/xdg_desktop_portal_rewrite_launchers-glib-backports.Po + -rm -f src/$(DEPDIR)/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.Po + -rm -f src/$(DEPDIR)/xdg_desktop_portal_validate_icon-validate-icon.Po + -rm -f src/$(DEPDIR)/xdg_document_portal-sd-escape.Po -rm -f src/$(DEPDIR)/xdg_document_portal-xdp-utils.Po + -rm -f src/$(DEPDIR)/xdg_permission_store-sd-escape.Po -rm -f src/$(DEPDIR)/xdg_permission_store-xdp-utils.Po -rm -f tests/$(DEPDIR)/test_backends-glib-backports.Po -rm -f tests/$(DEPDIR)/test_doc_portal-can-use-fuse.Po -rm -f tests/$(DEPDIR)/test_doc_portal-test-doc-portal.Po + -rm -f tests/$(DEPDIR)/test_doc_portal-utils.Po -rm -f tests/$(DEPDIR)/test_permission_store-test-permission-store.Po + -rm -f tests/$(DEPDIR)/test_permission_store-utils.Po -rm -f tests/$(DEPDIR)/test_portals-account.Po -rm -f tests/$(DEPDIR)/test_portals-background.Po -rm -f tests/$(DEPDIR)/test_portals-camera.Po @@ -4592,6 +4972,7 @@ -rm -f tests/backend/$(DEPDIR)/test_backends-request.Po -rm -f tests/backend/$(DEPDIR)/test_backends-screenshot.Po -rm -f tests/backend/$(DEPDIR)/test_backends-session.Po + -rm -f tests/backend/$(DEPDIR)/test_backends-settings.Po -rm -f tests/backend/$(DEPDIR)/test_backends-test-backends.Po -rm -f tests/backend/$(DEPDIR)/test_backends-wallpaper.Po -rm -f Makefile @@ -4673,10 +5054,13 @@ -rm -f document-portal/gvdb/$(DEPDIR)/xdg_document_portal-gvdb-reader.Po -rm -f document-portal/gvdb/$(DEPDIR)/xdg_permission_store-gvdb-builder.Po -rm -f document-portal/gvdb/$(DEPDIR)/xdg_permission_store-gvdb-reader.Po + -rm -f src/$(DEPDIR)/test_permission_store-sd-escape.Po -rm -f src/$(DEPDIR)/test_permission_store-xdp-utils.Po + -rm -f src/$(DEPDIR)/test_portals-sd-escape.Po -rm -f src/$(DEPDIR)/test_portals-xdp-dbus.Po -rm -f src/$(DEPDIR)/test_portals-xdp-impl-dbus.Po -rm -f src/$(DEPDIR)/test_portals-xdp-utils.Po + -rm -f src/$(DEPDIR)/test_xdp_utils-sd-escape.Po -rm -f src/$(DEPDIR)/test_xdp_utils-xdp-utils.Po -rm -f src/$(DEPDIR)/tests_test_backends-xdp-impl-dbus.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-account.Po @@ -4685,11 +5069,13 @@ -rm -f src/$(DEPDIR)/xdg_desktop_portal-camera.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-device.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-documents.Po + -rm -f src/$(DEPDIR)/xdg_desktop_portal-dynamic-launcher.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-email.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-file-chooser.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-flatpak-instance.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-gamemode.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-geoclue-dbus.Po + -rm -f src/$(DEPDIR)/xdg_desktop_portal-glib-backports.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-inhibit.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-location.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-memory-monitor.Po @@ -4699,12 +5085,15 @@ -rm -f src/$(DEPDIR)/xdg_desktop_portal-permissions.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-pipewire.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-portal-impl.Po + -rm -f src/$(DEPDIR)/xdg_desktop_portal-power-profile-monitor.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-print.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-proxy-resolver.Po + -rm -f src/$(DEPDIR)/xdg_desktop_portal-realtime.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-remote-desktop.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-request.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-screen-cast.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-screenshot.Po + -rm -f src/$(DEPDIR)/xdg_desktop_portal-sd-escape.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-secret.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-session.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-settings.Po @@ -4715,12 +5104,19 @@ -rm -f src/$(DEPDIR)/xdg_desktop_portal-xdp-dbus.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-xdp-impl-dbus.Po -rm -f src/$(DEPDIR)/xdg_desktop_portal-xdp-utils.Po + -rm -f src/$(DEPDIR)/xdg_desktop_portal_rewrite_launchers-glib-backports.Po + -rm -f src/$(DEPDIR)/xdg_desktop_portal_rewrite_launchers-rewrite-launchers.Po + -rm -f src/$(DEPDIR)/xdg_desktop_portal_validate_icon-validate-icon.Po + -rm -f src/$(DEPDIR)/xdg_document_portal-sd-escape.Po -rm -f src/$(DEPDIR)/xdg_document_portal-xdp-utils.Po + -rm -f src/$(DEPDIR)/xdg_permission_store-sd-escape.Po -rm -f src/$(DEPDIR)/xdg_permission_store-xdp-utils.Po -rm -f tests/$(DEPDIR)/test_backends-glib-backports.Po -rm -f tests/$(DEPDIR)/test_doc_portal-can-use-fuse.Po -rm -f tests/$(DEPDIR)/test_doc_portal-test-doc-portal.Po + -rm -f tests/$(DEPDIR)/test_doc_portal-utils.Po -rm -f tests/$(DEPDIR)/test_permission_store-test-permission-store.Po + -rm -f tests/$(DEPDIR)/test_permission_store-utils.Po -rm -f tests/$(DEPDIR)/test_portals-account.Po -rm -f tests/$(DEPDIR)/test_portals-background.Po -rm -f tests/$(DEPDIR)/test_portals-camera.Po @@ -4752,6 +5148,7 @@ -rm -f tests/backend/$(DEPDIR)/test_backends-request.Po -rm -f tests/backend/$(DEPDIR)/test_backends-screenshot.Po -rm -f tests/backend/$(DEPDIR)/test_backends-session.Po + -rm -f tests/backend/$(DEPDIR)/test_backends-settings.Po -rm -f tests/backend/$(DEPDIR)/test_backends-test-backends.Po -rm -f tests/backend/$(DEPDIR)/test_backends-wallpaper.Po -rm -f Makefile @@ -4794,11 +5191,12 @@ clean-noinstLTLIBRARIES clean-noinstPROGRAMS cscope \ cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags distcleancheck \ - distdir distuninstallcheck dvi dvi-am html html-am info \ - info-am install install-am install-binPROGRAMS install-data \ - install-data-am install-data-hook install-dbus_serviceDATA \ + dist-zstd distcheck distclean distclean-compile \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am \ + install-data-hook install-dbus_serviceDATA \ install-dist_installed_testDATA \ install-dist_installed_test_dbsDATA \ install-dist_installed_test_portalsDATA \ diff -Nru xdg-desktop-portal-1.8.1/missing xdg-desktop-portal-1.14.3/missing --- xdg-desktop-portal-1.8.1/missing 2021-02-17 03:14:46.000000000 +0000 +++ xdg-desktop-portal-1.14.3/missing 2022-03-29 23:42:31.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify diff -Nru xdg-desktop-portal-1.8.1/NEWS xdg-desktop-portal-1.14.3/NEWS --- xdg-desktop-portal-1.8.1/NEWS 2021-02-17 03:13:57.000000000 +0000 +++ xdg-desktop-portal-1.14.3/NEWS 2022-03-29 23:41:47.000000000 +0000 @@ -1,3 +1,93 @@ +Changes in 1.14.3 +================= +Released: 2022-04-14 + +- remote-desktop: Fix a memory corruption that was causing seg faults + +Changes in 1.14.2 +================= +Released: 2022-03-29 + +- realtime: Fix a frequent crash with WebKit processes +- Fix a bug in parsing the app ID from the cgroup on KDE +- Fix build with old GLib +- New translation: oc +- Documentation improvements + +Changes in 1.14.1 +================= +Released: 2022-03-18 + +- Fix an issue in 1.14.0 where xdg-desktop-portal.service starting before + graphical-session-pre.target would cause the GNOME session to deadlock by + moving code to a new libexec binary which handles deleting or migrating + .desktop files (and icons) from the dynamic launcher portal for apps which + have been uninstalled or renamed. +- Fix some bugs in the aforementioned launcher migration implementation, + "xdg-desktop-portal-rewrite-launchers". +- Fix build without libsystemd + +Changes in 1.14.0 +================= +Released: 2022-03-17 + +- Add a new "dynamic launcher" portal, which can install .desktop files and + accompanying icons after user confirmation. +- Rework handling of empty app IDs: In case an empty string app ID is stored in + the permission store, this permission is now shared only by apps whose app ID + couldn't be determined, rather than all unsandboxed apps. +- Use libsystemd (when available) to try to determine the app ID of unsandboxed + processes. This is useful since some portals otherwise can't be used by host + apps. +- Make x-d-p start on session start, which is needed for the dynamic launcher + portal to handle rewriting launchers for apps that have been renamed. +- Bring back the copy of Flatpak's icon-validator, which was dropped many + releases ago. +- Icon validation is now required for the notification and dynamic launcher + portals (previously it was only done if the "flatpak-validate-icon" binary + could be found). +- document-portal: Move to the libfuse3 API +- document-portal: Use renameat2 sys call +- document-portal: Use mutex to fix concurrency bug +- realtime: Fix error code paths +- realtime: Fix MakeThreadHighPriorityWithPID method +- screencast: Fix an error when restoring streams +- ci: Various improvements +- Documentation improvements +- New translations: pt, ro + +Changes in 1.12.1 +================= +Released: 2021-12-22 + +- Fix a crash in the device portal + +Changes in 1.12.0 +================= +Released: 2021-12-21 + +- Place portals in the systemd session.slice +- settings: Add color-scheme key +- open-uri: Avoid a sync call to org.freedesktop.FileManager +- screncast: Allow restoring previous sessions +- Add a portal for requesting realtime permissions +- ci: Many improvements +- Publish the docs from a ci job +- Translation updates + +Changes in 1.10.0 +================= + +- Remap /run/flatpak/app, for Flatpak 1.11.x +- Remap /var/config and /var/data +- permission-store: Avoid a crash +- permissions-store: Add GetPermission +- screencast: Add 'virtual' source type +- openuri: Use real path for OpenDirectory +- location: Fix accuracy levels +- Add power profile monitor implementation +- Translation updates + Changes in 1.8.1 ================ diff -Nru xdg-desktop-portal-1.8.1/po/cs.po xdg-desktop-portal-1.14.3/po/cs.po --- xdg-desktop-portal-1.8.1/po/cs.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/cs.po 2022-03-29 23:46:46.000000000 +0000 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal master\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" "PO-Revision-Date: 2019-10-24 16:06+0200\n" "Last-Translator: Daniel Rusek \n" "Language-Team: Czech \n" @@ -46,7 +46,7 @@ msgid "Don't allow" msgstr "Nepovolit" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "Povolit" @@ -107,33 +107,33 @@ msgid "%s wants to use your camera." msgstr "Aplikace %s chce používat vaši kameru." -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "Zamítnout přístup" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "Schválit přístup" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "Schválit přístup k vaší poloze?" -#: src/location.c:535 +#: src/location.c:536 msgid "An application wants to use your location." msgstr "Aplikace chce přistupovat k vaší poloze." -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "Schválit pro %s přístup k vaší poloze?" -#: src/location.c:551 +#: src/location.c:552 #, c-format msgid "%s wants to use your location." msgstr "Aplikace %s chce přistupovat k vaší poloze." -#: src/location.c:554 +#: src/location.c:555 msgid "Location access can be changed at any time from the privacy settings." msgstr "" "Přístup ke službám pro určování polohy můžete kdykoliv změnit v nastavení " @@ -143,28 +143,28 @@ msgid "Requested setting not found" msgstr "Požadované nastavení nebylo nalezeno" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" msgstr "Zamítnout" -#: src/wallpaper.c:186 +#: src/wallpaper.c:191 msgid "Allow Applications to Set Backgrounds?" msgstr "Povolit aplikacím možnost nastavit pozadí?" -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." msgstr "Aplikace požaduje mít možnost změnit obrázek na pozadí." -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, c-format msgid "Allow %s to Set Backgrounds?" msgstr "Povolit aplikaci %s možnost nastavit pozadí?" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, c-format msgid "%s is requesting to be able to change the background image." msgstr "Aplikace %s požaduje mít možnost změnit obrázek na pozadí." -#: src/wallpaper.c:203 +#: src/wallpaper.c:208 msgid "This permission can be changed at any time from the privacy settings." msgstr "Toto oprávnění můžete kdykoliv změnit v nastavení soukromí." diff -Nru xdg-desktop-portal-1.8.1/po/da.po xdg-desktop-portal-1.14.3/po/da.po --- xdg-desktop-portal-1.8.1/po/da.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/da.po 2022-03-29 23:46:46.000000000 +0000 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" "PO-Revision-Date: 2020-10-12 01:25+0200\n" "Last-Translator: scootergrisen\n" "Language-Team: Danish\n" @@ -43,7 +43,7 @@ msgid "Don't allow" msgstr "Tillad ikke" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "Tillad" @@ -106,33 +106,33 @@ msgid "%s wants to use your camera." msgstr "%s anmoder om at bruge dit kamera." -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "Nægt adgang" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "Giv adgang" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "Giv adgang til din placering?" -#: src/location.c:535 +#: src/location.c:536 msgid "An application wants to use your location." msgstr "Et program anmoder om at bruge din placering." -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "Giv %s adgang til din placering?" -#: src/location.c:551 +#: src/location.c:552 #, c-format msgid "%s wants to use your location." msgstr "%s anmoder om at bruge din placering." -#: src/location.c:554 +#: src/location.c:555 msgid "Location access can be changed at any time from the privacy settings." msgstr "" "Adgang til din placering kan når som helst ændres i " @@ -142,28 +142,28 @@ msgid "Requested setting not found" msgstr "Den anmodede indstilling blev ikke fundet" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" msgstr "Nægt" -#: src/wallpaper.c:186 +#: src/wallpaper.c:191 msgid "Allow Applications to Set Backgrounds?" msgstr "Tillad programmer at indstille baggrunde?" -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." msgstr "Et program anmoder om at være i stand til at ændre baggrundsbilledet." -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, c-format msgid "Allow %s to Set Backgrounds?" msgstr "Tillad %s at indstille baggrunde?" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, c-format msgid "%s is requesting to be able to change the background image." msgstr "%s anmoder om at være i stand til at ændre baggrundsbilledet." -#: src/wallpaper.c:203 +#: src/wallpaper.c:208 msgid "This permission can be changed at any time from the privacy settings." msgstr "Tilladelsen kan når som helst ændres i privatlivsindstillingerne." diff -Nru xdg-desktop-portal-1.8.1/po/de.po xdg-desktop-portal-1.14.3/po/de.po --- xdg-desktop-portal-1.8.1/po/de.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/de.po 2022-03-29 23:46:46.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal master\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" "PO-Revision-Date: 2016-09-23 19:17+0200\n" "Last-Translator: Mario Blättermann \n" "Language-Team: German \n" @@ -47,7 +47,7 @@ msgid "Don't allow" msgstr "" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "" @@ -112,34 +112,34 @@ msgid "%s wants to use your camera." msgstr "%s möchte Ihre Kamera nutzen." -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "" -#: src/location.c:535 +#: src/location.c:536 #, fuzzy msgid "An application wants to use your location." msgstr "Eine Anwendung möchte Ihre Kamera nutzen." -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "" -#: src/location.c:551 +#: src/location.c:552 #, fuzzy, c-format msgid "%s wants to use your location." msgstr "%s möchte Ihre Kamera nutzen." -#: src/location.c:554 +#: src/location.c:555 #, fuzzy msgid "Location access can be changed at any time from the privacy settings." msgstr "" @@ -150,30 +150,30 @@ msgid "Requested setting not found" msgstr "" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" msgstr "" -#: src/wallpaper.c:186 +#: src/wallpaper.c:191 #, fuzzy msgid "Allow Applications to Set Backgrounds?" msgstr "Eine Anwendung möchte Ton wiedergeben." -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." msgstr "" -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, c-format msgid "Allow %s to Set Backgrounds?" msgstr "" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, c-format msgid "%s is requesting to be able to change the background image." msgstr "" -#: src/wallpaper.c:203 +#: src/wallpaper.c:208 #, fuzzy msgid "This permission can be changed at any time from the privacy settings." msgstr "" diff -Nru xdg-desktop-portal-1.8.1/po/en_GB.po xdg-desktop-portal-1.14.3/po/en_GB.po --- xdg-desktop-portal-1.8.1/po/en_GB.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/en_GB.po 2022-03-29 23:46:46.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal master\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" "PO-Revision-Date: 2019-08-24 23:48+0100\n" "Last-Translator: Zander Brown \n" "Language-Team: English - United Kingdom \n" @@ -45,7 +45,7 @@ msgid "Don't allow" msgstr "Don't allow" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "Allow" @@ -108,33 +108,33 @@ msgid "%s wants to use your camera." msgstr "%s wants to use your camera." -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "Deny Access" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "Grant Access" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "Grant Access to Your Location?" -#: src/location.c:535 +#: src/location.c:536 msgid "An application wants to use your location." msgstr "An application wants to use your location." -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "Give %s Access to Your Location?" -#: src/location.c:551 +#: src/location.c:552 #, c-format msgid "%s wants to use your location." msgstr "%s wants to use your location." -#: src/location.c:554 +#: src/location.c:555 msgid "Location access can be changed at any time from the privacy settings." msgstr "Location access can be changed at any time from the privacy settings." @@ -142,30 +142,30 @@ msgid "Requested setting not found" msgstr "Requested setting not found" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" msgstr "" -#: src/wallpaper.c:186 +#: src/wallpaper.c:191 #, fuzzy msgid "Allow Applications to Set Backgrounds?" msgstr "Allow %s to run in the background?" -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." msgstr "" -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, fuzzy, c-format msgid "Allow %s to Set Backgrounds?" msgstr "Allow %s to run in the background?" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, fuzzy, c-format msgid "%s is requesting to be able to change the background image." msgstr "%s requests to run in the background." -#: src/wallpaper.c:203 +#: src/wallpaper.c:208 #, fuzzy msgid "This permission can be changed at any time from the privacy settings." msgstr "Location access can be changed at any time from the privacy settings." Binary files /tmp/tmpbyd67bgc/U85oRAN3bW/xdg-desktop-portal-1.8.1/po/es.gmo and /tmp/tmpbyd67bgc/H03Eyi55JS/xdg-desktop-portal-1.14.3/po/es.gmo differ diff -Nru xdg-desktop-portal-1.8.1/po/es.po xdg-desktop-portal-1.14.3/po/es.po --- xdg-desktop-portal-1.8.1/po/es.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/es.po 2022-03-29 23:46:46.000000000 +0000 @@ -6,8 +6,8 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal master\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" -"PO-Revision-Date: 2019-08-17 05:36-0500\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" +"PO-Revision-Date: 2021-12-04 14:52+0100\n" "Last-Translator: Adolfo Jayme Barrientos \n" "Language-Team: Spanish\n" "Language: es\n" @@ -15,7 +15,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 2.2.3\n" +"X-Generator: Poedit 3.0\n" #: src/background.c:260 #, c-format @@ -44,7 +44,7 @@ msgid "Don't allow" msgstr "No permitir" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "Permitir" @@ -109,33 +109,33 @@ msgid "%s wants to use your camera." msgstr "%s intenta utilizar la cámara." -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "Denegar acceso" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "Conceder acceso" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "¿Quiere conceder acceso a su ubicación?" -#: src/location.c:535 +#: src/location.c:536 msgid "An application wants to use your location." msgstr "Una aplicación intenta utilizar su ubicación." -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "¿Quiere conceder a %s acceso a su ubicación?" -#: src/location.c:551 +#: src/location.c:552 #, c-format msgid "%s wants to use your location." msgstr "%s intenta utilizar su ubicación." -#: src/location.c:554 +#: src/location.c:555 msgid "Location access can be changed at any time from the privacy settings." msgstr "" "El acceso a la ubicación puede modificarse en cualquier momento a través de " @@ -145,32 +145,30 @@ msgid "Requested setting not found" msgstr "No se encontró la configuración solicitada" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" -msgstr "" +msgstr "Denegar" -#: src/wallpaper.c:186 -#, fuzzy +#: src/wallpaper.c:191 msgid "Allow Applications to Set Backgrounds?" -msgstr "¿Quiere permitir que %s se ejecute en segundo plano?" +msgstr "¿Quiere permitir que las aplicaciones establezcan fondos?" -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." -msgstr "" +msgstr "Una aplicación solicita poder cambiar la imagen de fondo." -#: src/wallpaper.c:199 -#, fuzzy, c-format +#: src/wallpaper.c:204 +#, c-format msgid "Allow %s to Set Backgrounds?" -msgstr "¿Quiere permitir que %s se ejecute en segundo plano?" +msgstr "¿Quiere permitir que %s establezca fondos?" -#: src/wallpaper.c:200 -#, fuzzy, c-format +#: src/wallpaper.c:205 +#, c-format msgid "%s is requesting to be able to change the background image." -msgstr "%s solicita ejecutarse en segundo plano." +msgstr "%s solicita poder cambiar la imagen de fondo." -#: src/wallpaper.c:203 -#, fuzzy +#: src/wallpaper.c:208 msgid "This permission can be changed at any time from the privacy settings." msgstr "" -"El acceso a la ubicación puede modificarse en cualquier momento a través de " -"la configuración de privacidad." +"Este permiso puede modificarse en cualquier momento a través de la " +"configuración de privacidad." diff -Nru xdg-desktop-portal-1.8.1/po/fr.po xdg-desktop-portal-1.14.3/po/fr.po --- xdg-desktop-portal-1.8.1/po/fr.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/fr.po 2022-03-29 23:46:46.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal master\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" "PO-Revision-Date: 2017-03-02 11:34+0100\n" "Last-Translator: Nicolas Cuffia \n" "Language-Team: French \n" @@ -45,7 +45,7 @@ msgid "Don't allow" msgstr "" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "" @@ -110,34 +110,34 @@ msgid "%s wants to use your camera." msgstr "%s veut utiliser votre caméra." -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "" -#: src/location.c:535 +#: src/location.c:536 #, fuzzy msgid "An application wants to use your location." msgstr "Une application veut utiliser votre caméra." -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "" -#: src/location.c:551 +#: src/location.c:552 #, fuzzy, c-format msgid "%s wants to use your location." msgstr "%s veut utiliser votre caméra." -#: src/location.c:554 +#: src/location.c:555 #, fuzzy msgid "Location access can be changed at any time from the privacy settings." msgstr "" @@ -148,30 +148,30 @@ msgid "Requested setting not found" msgstr "" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" msgstr "" -#: src/wallpaper.c:186 +#: src/wallpaper.c:191 #, fuzzy msgid "Allow Applications to Set Backgrounds?" msgstr "Une application veut jouer du son." -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." msgstr "" -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, c-format msgid "Allow %s to Set Backgrounds?" msgstr "" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, c-format msgid "%s is requesting to be able to change the background image." msgstr "" -#: src/wallpaper.c:203 +#: src/wallpaper.c:208 #, fuzzy msgid "This permission can be changed at any time from the privacy settings." msgstr "" diff -Nru xdg-desktop-portal-1.8.1/po/gl.po xdg-desktop-portal-1.14.3/po/gl.po --- xdg-desktop-portal-1.8.1/po/gl.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/gl.po 2022-03-29 23:46:46.000000000 +0000 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal master\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" "PO-Revision-Date: 2020-01-06 00:03+0100\n" "Last-Translator: Fran Diéguez \n" "Language-Team: Galician\n" @@ -44,7 +44,7 @@ msgid "Don't allow" msgstr "Non permitir" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "Permitir" @@ -109,33 +109,33 @@ msgid "%s wants to use your camera." msgstr "%s quere uar a súa cámara." -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "Denegar acceso" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "Conceder acceso" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "Desexa acceder acceso á súa localización?" -#: src/location.c:535 +#: src/location.c:536 msgid "An application wants to use your location." msgstr "Unha aplicación quere usar a súa localización." -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "Desexa darlle acceso a %s á súa localización?" -#: src/location.c:551 +#: src/location.c:552 #, c-format msgid "%s wants to use your location." msgstr "%s quere usar a súa localización." -#: src/location.c:554 +#: src/location.c:555 msgid "Location access can be changed at any time from the privacy settings." msgstr "" "O acceso á súa localización pode cambiarse en calquera momento desde as " @@ -145,29 +145,29 @@ msgid "Requested setting not found" msgstr "Non se atopou a configuración solicitada" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" msgstr "Denegar" -#: src/wallpaper.c:186 +#: src/wallpaper.c:191 msgid "Allow Applications to Set Backgrounds?" msgstr "Permitirlle ás aplicacións configurar o fondo de pantalla?" -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." msgstr "Unha aplicación está solicitando poder cambiar a imaxe de fondo" -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, c-format msgid "Allow %s to Set Backgrounds?" msgstr "Permitirlle a %s configurar o fondo de pantalla?" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, c-format msgid "%s is requesting to be able to change the background image." msgstr "%s está solicitando poder cambiar o fondo de pantalla." -#: src/wallpaper.c:203 +#: src/wallpaper.c:208 msgid "This permission can be changed at any time from the privacy settings." msgstr "" "Este permiso pode cambiarse en calquera momento desde as preferencias de " Binary files /tmp/tmpbyd67bgc/U85oRAN3bW/xdg-desktop-portal-1.8.1/po/hi.gmo and /tmp/tmpbyd67bgc/H03Eyi55JS/xdg-desktop-portal-1.14.3/po/hi.gmo differ diff -Nru xdg-desktop-portal-1.8.1/po/hi.po xdg-desktop-portal-1.14.3/po/hi.po --- xdg-desktop-portal-1.8.1/po/hi.po 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/hi.po 2022-03-29 23:46:47.000000000 +0000 @@ -0,0 +1,163 @@ +# Hindi translation for xdg-desktop-portal. +# Copyright (C) 2021 xdg-desktop-portal's COPYRIGHT HOLDER +# This file is distributed under the same license as the xdg-desktop-portal package. +# Dmitry , 2021. +# +msgid "" +msgstr "" +"Project-Id-Version: xdg-desktop-portal 1.8.1\n" +"Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" +"PO-Revision-Date: 2021-09-09 00:42+0700\n" +"Last-Translator: Dmitry \n" +"Language-Team: Hindi \n" +"Language: hi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.2.4\n" +"Plural-Forms: nplurals=2; plural=(n==0 || n==1);\n" + +#: src/background.c:260 +#, c-format +msgid "Allow %s to run in the background?" +msgstr "अनुमति देना %s पृष्ठभूमि में चलाने के लिए?" + +#: src/background.c:264 +#, c-format +msgid "%s requests to be started automatically and run in the background." +msgstr "%s अनुरोध स्वचालित रूप से शुरू होने और पृष्ठभूमि में चलाने का अनुरोध करता है।" + +#: src/background.c:266 +#, c-format +msgid "%s requests to run in the background." +msgstr "%s पृष्ठभूमि में चलाने के लिए अनुरोध।" + +#: src/background.c:267 +msgid "" +"The ‘run in background’ permission can be changed at any time from the " +"application settings." +msgstr "एप्लिकेशन सेटिंग से किसी भी समय 'रन इन बैकग्राउंड' अनुमति को बदला जा सकता है।" + +#: src/background.c:272 +msgid "Don't allow" +msgstr "अनुमति न दें" + +#: src/background.c:273 src/wallpaper.c:181 +msgid "Allow" +msgstr "अनुमति" + +#: src/device.c:115 +msgid "Turn On Microphone?" +msgstr "माइक्रोफ़ोन चालू करें?" + +#: src/device.c:116 +msgid "" +"Access to your microphone can be changed at any time from the privacy " +"settings." +msgstr "गोपनीयता सेटिंग्स से आपके माइक्रोफ़ोन तक पहुंच को किसी भी समय बदला जा सकता है।" + +#: src/device.c:120 +msgid "An application wants to use your microphone." +msgstr "एक एप्लिकेशन आपके माइक्रोफ़ोन का उपयोग करना चाहता है।" + +#: src/device.c:122 +#, c-format +msgid "%s wants to use your microphone." +msgstr "%s आपके माइक्रोफ़ोन का उपयोग करना चाहता है।" + +#: src/device.c:128 +msgid "Turn On Speakers?" +msgstr "स्पीकर चालू करें?" + +#: src/device.c:129 +msgid "" +"Access to your speakers can be changed at any time from the privacy settings." +msgstr "गोपनीयता सेटिंग्स से आपके स्पीकर तक पहुंच को किसी भी समय बदला जा सकता है।" + +#: src/device.c:133 +msgid "An application wants to play sound." +msgstr "एक एप्लिकेशन ध्वनि बजाना चाहता है।" + +#: src/device.c:135 +#, c-format +msgid "%s wants to play sound." +msgstr "%s ध्वनि बजाना चाहता है।" + +#: src/device.c:141 +msgid "Turn On Camera?" +msgstr "कैमरा चालू करें?" + +#: src/device.c:142 +msgid "" +"Access to your camera can be changed at any time from the privacy settings." +msgstr "गोपनीयता सेटिंग्स से आपके कैमरे तक पहुंच को किसी भी समय बदला जा सकता है।" + +#: src/device.c:146 +msgid "An application wants to use your camera." +msgstr "एक एप्लिकेशन आपके कैमरे का उपयोग करना चाहता है।" + +#: src/device.c:148 +#, c-format +msgid "%s wants to use your camera." +msgstr "%s अपने कैमरे का उपयोग करना चाहता है।" + +#: src/location.c:527 +msgid "Deny Access" +msgstr "पहुँच को अस्वीकार" + +#: src/location.c:529 +msgid "Grant Access" +msgstr "अनुदान पहुँच" + +#: src/location.c:535 +msgid "Grant Access to Your Location?" +msgstr "अपने स्थान तक पहुंच प्रदान करें?" + +#: src/location.c:536 +msgid "An application wants to use your location." +msgstr "एक एप्लिकेशन आपके स्थान का उपयोग करना चाहता है।" + +#: src/location.c:548 +#, c-format +msgid "Give %s Access to Your Location?" +msgstr "देना %s आपके स्थान तक पहुँच?" + +#: src/location.c:552 +#, c-format +msgid "%s wants to use your location." +msgstr "%s आपके स्थान का उपयोग करना चाहता है।" + +#: src/location.c:555 +msgid "Location access can be changed at any time from the privacy settings." +msgstr "गोपनीयता सेटिंग्स से किसी भी समय स्थान का उपयोग बदला जा सकता है।" + +#: src/settings.c:124 +msgid "Requested setting not found" +msgstr "अनुरोधित सेटिंग नहीं मिली" + +#: src/wallpaper.c:179 +msgid "Deny" +msgstr "मना" + +#: src/wallpaper.c:191 +msgid "Allow Applications to Set Backgrounds?" +msgstr "एप्‍लिकेशन को पृष्‍ठभूमि सेट करने की अनुमति दें?" + +#: src/wallpaper.c:192 +msgid "An application is requesting to be able to change the background image." +msgstr "एक एप्लिकेशन पृष्ठभूमि छवि को बदलने में सक्षम होने का अनुरोध कर रहा है।" + +#: src/wallpaper.c:204 +#, c-format +msgid "Allow %s to Set Backgrounds?" +msgstr "परमिट %s पृष्ठभूमि सेट करने के लिए?" + +#: src/wallpaper.c:205 +#, c-format +msgid "%s is requesting to be able to change the background image." +msgstr "%s पृष्ठभूमि छवि को बदलने में सक्षम होने का अनुरोध कर रहा है।" + +#: src/wallpaper.c:208 +msgid "This permission can be changed at any time from the privacy settings." +msgstr "इस अनुमति को गोपनीयता सेटिंग्स से किसी भी समय बदला जा सकता है।" diff -Nru xdg-desktop-portal-1.8.1/po/hr.po xdg-desktop-portal-1.14.3/po/hr.po --- xdg-desktop-portal-1.8.1/po/hr.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/hr.po 2022-03-29 23:46:47.000000000 +0000 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal master\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" "PO-Revision-Date: 2020-01-25 16:44+0100\n" "Last-Translator: Milo Ivir \n" "Language-Team: \n" @@ -45,7 +45,7 @@ msgid "Don't allow" msgstr "Nemoj dozvoliti" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "Dozvoli" @@ -108,33 +108,33 @@ msgid "%s wants to use your camera." msgstr "%s želi koristiti tvoju kameru." -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "Zabrani pristup" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "Dozvoli pristup" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "Dozvoliti pristup tvojoj lokaciji?" -#: src/location.c:535 +#: src/location.c:536 msgid "An application wants to use your location." msgstr "Jedan program želi koristiti tvoju lokaciju." -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "Dozvoliti da %s pristupi tvojoj lokaciji?" -#: src/location.c:551 +#: src/location.c:552 #, c-format msgid "%s wants to use your location." msgstr "%s želi koristiti tvoju lokaciju." -#: src/location.c:554 +#: src/location.c:555 msgid "Location access can be changed at any time from the privacy settings." msgstr "" "Pristup lokaciji je uvijek moguće promijeniti u postavkama privatnosti." @@ -143,28 +143,28 @@ msgid "Requested setting not found" msgstr "Zatražena postavka nije nađena" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" msgstr "Zabrani" -#: src/wallpaper.c:186 +#: src/wallpaper.c:191 msgid "Allow Applications to Set Backgrounds?" msgstr "Dozvoliti programu da postavi pozadine?" -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." msgstr "Jedan program traži dozvolu za mijenjanje slike pozadine." -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, c-format msgid "Allow %s to Set Backgrounds?" msgstr "Dozvoliti da %s postavi pozadine?" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, c-format msgid "%s is requesting to be able to change the background image." msgstr "%s traži dozvolu za mijenjanje slike pozadine." -#: src/wallpaper.c:203 +#: src/wallpaper.c:208 msgid "This permission can be changed at any time from the privacy settings." msgstr "Ovu dozvolu je uvijek moguće promijeniti u postavkama privatnosti." diff -Nru xdg-desktop-portal-1.8.1/po/hu.po xdg-desktop-portal-1.14.3/po/hu.po --- xdg-desktop-portal-1.8.1/po/hu.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/hu.po 2022-03-29 23:46:47.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" "PO-Revision-Date: 2019-02-12 21:18+0100\n" "Last-Translator: Balázs Úr \n" "Language-Team: Hungarian \n" @@ -46,7 +46,7 @@ msgid "Don't allow" msgstr "" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "" @@ -111,33 +111,33 @@ msgid "%s wants to use your camera." msgstr "%s használni szeretné a kameráját." -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "Hozzáférés megtagadása" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "Hozzáférés megadása" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "Hozzáférést ad a tartózkodási helyéhez?" -#: src/location.c:535 +#: src/location.c:536 msgid "An application wants to use your location." msgstr "Egy alkalmazás használni szeretné a tartózkodási helyét." -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "Hozzáférést ad a(z) %s számára a tartózkodási helyéhez?" -#: src/location.c:551 +#: src/location.c:552 #, c-format msgid "%s wants to use your location." msgstr "A(z) %s használni szeretné a tartózkodási helyét." -#: src/location.c:554 +#: src/location.c:555 msgid "Location access can be changed at any time from the privacy settings." msgstr "" "A tartózkodási helyhez való hozzáférés bármikor megváltoztatható az " @@ -147,30 +147,30 @@ msgid "Requested setting not found" msgstr "A kért beállítás nem található" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" msgstr "" -#: src/wallpaper.c:186 +#: src/wallpaper.c:191 #, fuzzy msgid "Allow Applications to Set Backgrounds?" msgstr "Egy alkalmazás hangot szeretne lejátszani." -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." msgstr "" -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, c-format msgid "Allow %s to Set Backgrounds?" msgstr "" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, c-format msgid "%s is requesting to be able to change the background image." msgstr "" -#: src/wallpaper.c:203 +#: src/wallpaper.c:208 #, fuzzy msgid "This permission can be changed at any time from the privacy settings." msgstr "" Binary files /tmp/tmpbyd67bgc/U85oRAN3bW/xdg-desktop-portal-1.8.1/po/id.gmo and /tmp/tmpbyd67bgc/H03Eyi55JS/xdg-desktop-portal-1.14.3/po/id.gmo differ diff -Nru xdg-desktop-portal-1.8.1/po/id.po xdg-desktop-portal-1.14.3/po/id.po --- xdg-desktop-portal-1.8.1/po/id.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/id.po 2022-03-29 23:46:47.000000000 +0000 @@ -7,15 +7,15 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal master\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" -"PO-Revision-Date: 2020-01-26 17:23+0700\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" +"PO-Revision-Date: 2022-03-28 18:31+0700\n" "Last-Translator: Kukuh Syafaat \n" "Language-Team: Indonesian \n" "Language: id\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.4\n" +"X-Generator: Poedit 3.0.1\n" #: src/background.c:260 #, c-format @@ -26,12 +26,12 @@ #, c-format msgid "%s requests to be started automatically and run in the background." msgstr "" -"%s permintaan untuk dimulai secara otomatis dan dijalankan di latar belakang." +"%s meminta untuk dimulai secara otomatis dan dijalankan di latar belakang." #: src/background.c:266 #, c-format msgid "%s requests to run in the background." -msgstr "%s permintaan untuk berjalan di latar belakang." +msgstr "%s meminta untuk berjalan di latar belakang." #: src/background.c:267 msgid "" @@ -45,13 +45,13 @@ msgid "Don't allow" msgstr "Jangan izinkan" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "Izinkan" #: src/device.c:115 msgid "Turn On Microphone?" -msgstr "Menyalakan Mikrofon?" +msgstr "Hidupkan Mikrofon?" #: src/device.c:116 msgid "" @@ -71,7 +71,7 @@ #: src/device.c:128 msgid "Turn On Speakers?" -msgstr "Menyalakan Speaker?" +msgstr "Hidupkan Speaker?" #: src/device.c:129 msgid "" @@ -90,7 +90,7 @@ #: src/device.c:141 msgid "Turn On Camera?" -msgstr "Menyalakan Kamera?" +msgstr "Hidupkan Kamera?" #: src/device.c:142 msgid "" @@ -107,33 +107,33 @@ msgid "%s wants to use your camera." msgstr "%s ingin menggunakan kamera Anda." -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "Tolak Akses" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "Beri Akses" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "Beri Akses ke Lokasi Anda?" -#: src/location.c:535 +#: src/location.c:536 msgid "An application wants to use your location." msgstr "Sebuah aplikasi ingin menggunakan lokasi Anda." -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "Beri Akses %s ke Lokasi Anda?" -#: src/location.c:551 +#: src/location.c:552 #, c-format msgid "%s wants to use your location." msgstr "%s ingin menggunakan lokasi Anda." -#: src/location.c:554 +#: src/location.c:555 msgid "Location access can be changed at any time from the privacy settings." msgstr "Akses lokasi dapat diubah setiap saat dari pengaturan privasi." @@ -141,28 +141,28 @@ msgid "Requested setting not found" msgstr "Pengaturan yang diminta tidak ditemukan" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" msgstr "Tolak" -#: src/wallpaper.c:186 +#: src/wallpaper.c:191 msgid "Allow Applications to Set Backgrounds?" msgstr "Izinkan Aplikasi untuk Mengatur Latar Belakang?" -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." msgstr "Aplikasi meminta untuk dapat mengubah gambar latar belakang." -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, c-format msgid "Allow %s to Set Backgrounds?" msgstr "Izinkan %s untuk Mengatur Latar Belakang?" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, c-format msgid "%s is requesting to be able to change the background image." msgstr "%s meminta untuk dapat mengubah gambar latar belakang." -#: src/wallpaper.c:203 +#: src/wallpaper.c:208 msgid "This permission can be changed at any time from the privacy settings." msgstr "Izin ini dapat diubah kapan saja dari pengaturan privasi." diff -Nru xdg-desktop-portal-1.8.1/po/it.po xdg-desktop-portal-1.14.3/po/it.po --- xdg-desktop-portal-1.8.1/po/it.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/it.po 2022-03-29 23:46:47.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal master\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" "PO-Revision-Date: 2020-02-10 16:11+0100\n" "Last-Translator: Milo Casagrande \n" "Language-Team: Italian \n" @@ -47,7 +47,7 @@ msgid "Don't allow" msgstr "Non consentire" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "Consenti" @@ -112,33 +112,33 @@ msgid "%s wants to use your camera." msgstr "%s vuole utilizzare la videocamera." -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "Nega accesso" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "Consenti accesso" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "Consentire l'accesso alla propria posizione?" -#: src/location.c:535 +#: src/location.c:536 msgid "An application wants to use your location." msgstr "Un'applicazione vuole utilizzare la propria posizione." -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "Consentire a %s di accedere alla propria posizione?" -#: src/location.c:551 +#: src/location.c:552 #, c-format msgid "%s wants to use your location." msgstr "%s vuole utilizzare la propria posizione." -#: src/location.c:554 +#: src/location.c:555 msgid "Location access can be changed at any time from the privacy settings." msgstr "" "L'accesso alla posizione può essere modificato in qualsiasi momento " @@ -148,29 +148,29 @@ msgid "Requested setting not found" msgstr "La risorsa richiesta non è stata trovata" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" msgstr "Nega" -#: src/wallpaper.c:186 +#: src/wallpaper.c:191 msgid "Allow Applications to Set Backgrounds?" msgstr "Consentire alle applicazioni di impostare lo sfondo?" -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." msgstr "Un'applicazione richiede di poter cambiare l'immagine di sfondo." -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, c-format msgid "Allow %s to Set Backgrounds?" msgstr "Consentire a %s di impostare lo sfondo?" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, c-format msgid "%s is requesting to be able to change the background image." msgstr "L'applicazione %s richiede di poter cambiare l'immagine di sfondo." -#: src/wallpaper.c:203 +#: src/wallpaper.c:208 msgid "This permission can be changed at any time from the privacy settings." msgstr "" "Questa impostazione può essere modificata in qualsiasi momento attraverso le " diff -Nru xdg-desktop-portal-1.8.1/po/LINGUAS xdg-desktop-portal-1.14.3/po/LINGUAS --- xdg-desktop-portal-1.8.1/po/LINGUAS 2020-09-14 17:03:38.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/LINGUAS 2022-03-29 22:00:20.000000000 +0000 @@ -5,13 +5,18 @@ es fr gl +hi hr hu id it lt +nl +oc pl +pt pt_BR +ro ru sk sr diff -Nru xdg-desktop-portal-1.8.1/po/lt.po xdg-desktop-portal-1.14.3/po/lt.po --- xdg-desktop-portal-1.8.1/po/lt.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/lt.po 2022-03-29 23:46:47.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal master\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" "PO-Revision-Date: 2020-03-07 20:26+0200\n" "Last-Translator: Moo\n" "Language-Team: Lithuanian \n" @@ -46,7 +46,7 @@ msgid "Don't allow" msgstr "Neleisti" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "Leisti" @@ -111,33 +111,33 @@ msgid "%s wants to use your camera." msgstr "%s nori naudoti jūsų kamerą." -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "Drausti prieigą" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "Suteikti prieigą" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "Suteikti prieigą prie jūsų buvimo vietos?" -#: src/location.c:535 +#: src/location.c:536 msgid "An application wants to use your location." msgstr "Programa nori naudoti jūsų buvimo vietą." -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "Suteikti %s prieigą prie jūsų buvimo vietos?" -#: src/location.c:551 +#: src/location.c:552 #, c-format msgid "%s wants to use your location." msgstr "%s nori naudoti jūsų buvimo vietą." -#: src/location.c:554 +#: src/location.c:555 msgid "Location access can be changed at any time from the privacy settings." msgstr "" "Prieiga prie jūsų buvimo vietos bet kuriuo metu gali būti pakeista privatumo " @@ -147,29 +147,29 @@ msgid "Requested setting not found" msgstr "Užklaustas nustatymas nerastas" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" msgstr "Drausti" -#: src/wallpaper.c:186 +#: src/wallpaper.c:191 msgid "Allow Applications to Set Backgrounds?" msgstr "Leisti programoms nustatyti fonus?" -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." msgstr "Programa prašo galimybės keisti fono paveikslą." -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, c-format msgid "Allow %s to Set Backgrounds?" msgstr "Leisti %s nustatyti fonus?" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, c-format msgid "%s is requesting to be able to change the background image." msgstr "%s prašo galimybės keisti fono paveikslą." -#: src/wallpaper.c:203 +#: src/wallpaper.c:208 msgid "This permission can be changed at any time from the privacy settings." msgstr "" "Šis leidimas bet kuriuo metu gali būti pakeistas privatumo nustatymuose." Binary files /tmp/tmpbyd67bgc/U85oRAN3bW/xdg-desktop-portal-1.8.1/po/nl.gmo and /tmp/tmpbyd67bgc/H03Eyi55JS/xdg-desktop-portal-1.14.3/po/nl.gmo differ diff -Nru xdg-desktop-portal-1.8.1/po/nl.po xdg-desktop-portal-1.14.3/po/nl.po --- xdg-desktop-portal-1.8.1/po/nl.po 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/nl.po 2022-03-29 23:46:47.000000000 +0000 @@ -0,0 +1,181 @@ +# German translation for xdg-desktop-portal. +# Copyright (C) 2016 xdg-desktop-portal's COPYRIGHT HOLDER +# This file is distributed under the same license as the xdg-desktop-portal package. +# Benedikt M. Thoma , 2016. +# Mario Blättermann , 2016. +# +msgid "" +msgstr "" +"Project-Id-Version: xdg-desktop-portal master\n" +"Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" +"PO-Revision-Date: 2021-07-18 14:05+0200\n" +"Last-Translator: Heimen Stoffels \n" +"Language-Team: Dutch\n" +"Language: nl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 3.0\n" + +#: src/background.c:260 +#, c-format +msgid "Allow %s to run in the background?" +msgstr "Wilt u %s toestaan om op de achtergrond te worden uitgevoerd?" + +#: src/background.c:264 +#, c-format +msgid "%s requests to be started automatically and run in the background." +msgstr "" +"%s verzoekt om automatisch te mogen worden opgestart en uitgevoerd te mogen " +"worden op de achtergrond." + +#: src/background.c:266 +#, c-format +msgid "%s requests to run in the background." +msgstr "" +"%s verzoekt om automatisch te mogen worden uitgevoerd op de achtergrond." + +#: src/background.c:267 +msgid "" +"The ‘run in background’ permission can be changed at any time from the " +"application settings." +msgstr "" +"Het toegangsrecht ‘uitvoeren op achtergrond’ kan te allen tijde worden " +"ingetrokken in de toepassingsvoorkeuren." + +#: src/background.c:272 +msgid "Don't allow" +msgstr "Niet toestaan" + +#: src/background.c:273 src/wallpaper.c:181 +msgid "Allow" +msgstr "Toestaan" + +#: src/device.c:115 +msgid "Turn On Microphone?" +msgstr "Microfoon aanzetten?" + +#: src/device.c:116 +msgid "" +"Access to your microphone can be changed at any time from the privacy " +"settings." +msgstr "" +"De toegang tot uw microfoon kan te allen tijde worden aangepast in de " +"privacyvoorkeuren." + +#: src/device.c:120 +msgid "An application wants to use your microphone." +msgstr "Een toepassing wil uw microfoon gebruiken." + +#: src/device.c:122 +#, c-format +msgid "%s wants to use your microphone." +msgstr "%s wil uw microfoon gebruiken." + +#: src/device.c:128 +msgid "Turn On Speakers?" +msgstr "Luidsprekers aanzetten?" + +#: src/device.c:129 +msgid "" +"Access to your speakers can be changed at any time from the privacy settings." +msgstr "" +"De toegang tot uw luidsprekers kan te allen tijde worden aangepast in de " +"privacyvoorkeuren." + +#: src/device.c:133 +msgid "An application wants to play sound." +msgstr "Een toepassing wil geluid afspelen." + +#: src/device.c:135 +#, c-format +msgid "%s wants to play sound." +msgstr "%s wil geluid afspelen." + +#: src/device.c:141 +msgid "Turn On Camera?" +msgstr "Camera aanzetten?" + +#: src/device.c:142 +msgid "" +"Access to your camera can be changed at any time from the privacy settings." +msgstr "" +"De toegang tot uw camera kan te allen tijde worden aangepast in de " +"privacyvoorkeuren." + +#: src/device.c:146 +msgid "An application wants to use your camera." +msgstr "Een toepassing wil uw camera gebruiken." + +#: src/device.c:148 +#, c-format +msgid "%s wants to use your camera." +msgstr "%s wil uw camera gebruiken." + +#: src/location.c:527 +msgid "Deny Access" +msgstr "Toegang weigeren" + +#: src/location.c:529 +msgid "Grant Access" +msgstr "Toegang verlenen" + +#: src/location.c:535 +msgid "Grant Access to Your Location?" +msgstr "Toegang verlenen tot uw locatie?" + +#: src/location.c:536 +msgid "An application wants to use your location." +msgstr "Een toepassing wil uw locatie opvragen." + +#: src/location.c:548 +#, c-format +msgid "Give %s Access to Your Location?" +msgstr "Wilt u %s toegang verlenen tot uw locatie?" + +#: src/location.c:552 +#, c-format +msgid "%s wants to use your location." +msgstr "%s wil uw locatie opvragen." + +#: src/location.c:555 +msgid "Location access can be changed at any time from the privacy settings." +msgstr "" +"De toegang tot uw locatie kan te allen tijde worden aangepast in de " +"privacyvoorkeuren." + +#: src/settings.c:124 +msgid "Requested setting not found" +msgstr "De opgevraagde instelling bestaat niet" + +#: src/wallpaper.c:179 +msgid "Deny" +msgstr "Weigeren" + +#: src/wallpaper.c:191 +msgid "Allow Applications to Set Backgrounds?" +msgstr "Toepassingen toestaan achtergronden in te stellen?" + +#: src/wallpaper.c:192 +msgid "An application is requesting to be able to change the background image." +msgstr "" +"Een toepassing verzoekt de mogelijkheid om uw achtergrondafbeelding te " +"wijzigen." + +#: src/wallpaper.c:204 +#, c-format +msgid "Allow %s to Set Backgrounds?" +msgstr "%s toestaan achtergronden in te stellen?" + +#: src/wallpaper.c:205 +#, c-format +msgid "%s is requesting to be able to change the background image." +msgstr "%s verzoekt de mogelijkheid om uw achtergrondafbeelding te wijzigen." + +#: src/wallpaper.c:208 +msgid "This permission can be changed at any time from the privacy settings." +msgstr "" +"Dit toegangsrecht kan te allen tijde worden aangepast in de " +"privacyvoorkeuren." Binary files /tmp/tmpbyd67bgc/U85oRAN3bW/xdg-desktop-portal-1.8.1/po/oc.gmo and /tmp/tmpbyd67bgc/H03Eyi55JS/xdg-desktop-portal-1.14.3/po/oc.gmo differ diff -Nru xdg-desktop-portal-1.8.1/po/oc.po xdg-desktop-portal-1.14.3/po/oc.po --- xdg-desktop-portal-1.8.1/po/oc.po 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/oc.po 2022-03-29 23:46:47.000000000 +0000 @@ -0,0 +1,175 @@ +# Occitan translation for xdg-desktop-portal. +# Copyright (C) 2019 xdg-desktop-portal's COPYRIGHT HOLDER +# This file is distributed under the same license as the xdg-desktop-portal package. +# +msgid "" +msgstr "" +"Project-Id-Version: xdg-desktop-portal master\n" +"Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" +"PO-Revision-Date: 2022-03-20 15:11+0100\n" +"Last-Translator: Quentin PAGÈS\n" +"Language-Team: Occitan\n" +"Language: oc\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 3.0.1\n" + +#: src/background.c:260 +#, c-format +msgid "Allow %s to run in the background?" +msgstr "Permetre a %s de s’executar en rèireplan ?" + +#: src/background.c:264 +#, c-format +msgid "%s requests to be started automatically and run in the background." +msgstr "" +"%s demanda de poder s’aviar automaticament e de s’executar en rèireplan." + +#: src/background.c:266 +#, c-format +msgid "%s requests to run in the background." +msgstr "%s demanda de s’executar en rèireplan." + +#: src/background.c:267 +msgid "" +"The ‘run in background’ permission can be changed at any time from the " +"application settings." +msgstr "" +"La permission d’execucion en rèireplan se pòt modificar a tot moment als " +"paramètres d’aplicacion." + +#: src/background.c:272 +msgid "Don't allow" +msgstr "Permetre pas" + +#: src/background.c:273 src/wallpaper.c:181 +msgid "Allow" +msgstr "Permetre" + +#: src/device.c:115 +msgid "Turn On Microphone?" +msgstr "Alucar lo microfòn ?" + +#: src/device.c:116 +msgid "" +"Access to your microphone can be changed at any time from the privacy " +"settings." +msgstr "" +"L’accès al microfòn se pòt modificar a tot moment als paramètres de " +"confidencialitat." + +#: src/device.c:120 +msgid "An application wants to use your microphone." +msgstr "Una aplicacion vòl utilizar lo microfòn." + +#: src/device.c:122 +#, c-format +msgid "%s wants to use your microphone." +msgstr "%s vòl utilizar lo microfòn." + +#: src/device.c:128 +msgid "Turn On Speakers?" +msgstr "Alucar los nautparlaires ?" + +#: src/device.c:129 +msgid "" +"Access to your speakers can be changed at any time from the privacy settings." +msgstr "" +"L’accès als nautparlaires se pòt modificar a tot moment als paramètres de " +"confidencialitat." + +#: src/device.c:133 +msgid "An application wants to play sound." +msgstr "Una aplicacion vòl legir de son." + +#: src/device.c:135 +#, c-format +msgid "%s wants to play sound." +msgstr "%s vòl legir de son." + +#: src/device.c:141 +msgid "Turn On Camera?" +msgstr "Alucar la camèra ?" + +#: src/device.c:142 +msgid "" +"Access to your camera can be changed at any time from the privacy settings." +msgstr "" +"L’accès a la camèra se pòt modificar a tot moment als paramètres de " +"confidencialitat." + +#: src/device.c:146 +msgid "An application wants to use your camera." +msgstr "Una aplicacion vòl utilizar la camèra." + +#: src/device.c:148 +#, c-format +msgid "%s wants to use your camera." +msgstr "%s vòl utilizar la camèra." + +#: src/location.c:527 +msgid "Deny Access" +msgstr "Refusar l’accès" + +#: src/location.c:529 +msgid "Grant Access" +msgstr "Acordar l’accès" + +#: src/location.c:535 +msgid "Grant Access to Your Location?" +msgstr "Donar accès a vòstre localizacion ?" + +#: src/location.c:536 +msgid "An application wants to use your location." +msgstr "Una aplicacion vòl utilizar vòstra localizacion." + +#: src/location.c:548 +#, c-format +msgid "Give %s Access to Your Location?" +msgstr "Donar accès a %s a vòstra localizacion ?" + +#: src/location.c:552 +#, c-format +msgid "%s wants to use your location." +msgstr "%s vòl utilizar vòstra localizacion." + +#: src/location.c:555 +msgid "Location access can be changed at any time from the privacy settings." +msgstr "" +"Las règlas d’accès a la localizacion se pòdon a tot moment modificar als " +"paramètres de confidencialitat." + +#: src/settings.c:124 +msgid "Requested setting not found" +msgstr "Paramètre demandat pas trobat" + +#: src/wallpaper.c:179 +msgid "Deny" +msgstr "Refusar" + +#: src/wallpaper.c:191 +msgid "Allow Applications to Set Backgrounds?" +msgstr "Permetre a las aplicacions de definir los fonzes d’ecran ?" + +#: src/wallpaper.c:192 +msgid "An application is requesting to be able to change the background image." +msgstr "Una aplicacion demanda de poder modificar l’imatge de rèireplan." + +#: src/wallpaper.c:204 +#, c-format +msgid "Allow %s to Set Backgrounds?" +msgstr "Permetre a %s de definir de fonzes d’ecran ?" + +#: src/wallpaper.c:205 +#, c-format +msgid "%s is requesting to be able to change the background image." +msgstr "%s demanda de poder modificar l’imatge de rèireplan." + +#: src/wallpaper.c:208 +msgid "This permission can be changed at any time from the privacy settings." +msgstr "" +"Las permissions se pòdon modificar a tot moment als paramètres de " +"confidencialitat." diff -Nru xdg-desktop-portal-1.8.1/po/pl.po xdg-desktop-portal-1.14.3/po/pl.po --- xdg-desktop-portal-1.8.1/po/pl.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/pl.po 2022-03-29 23:46:47.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" "PO-Revision-Date: 2019-10-24 16:30+0200\n" "Last-Translator: Piotr Drąg \n" "Language-Team: Polish \n" @@ -46,7 +46,7 @@ msgid "Don't allow" msgstr "Nie zezwalaj" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "Zezwól" @@ -108,33 +108,33 @@ msgid "%s wants to use your camera." msgstr "Program „%s” potrzebuje dostępu do kamery." -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "Odmów dostępu" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "Udziel dostępu" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "Udzielić dostęp do położenia?" -#: src/location.c:535 +#: src/location.c:536 msgid "An application wants to use your location." msgstr "Program potrzebuje dostępu do położenia." -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "Udzielić dostęp do położenia programowi „%s”?" -#: src/location.c:551 +#: src/location.c:552 #, c-format msgid "%s wants to use your location." msgstr "Program „%s” potrzebuje dostępu do położenia." -#: src/location.c:554 +#: src/location.c:555 msgid "Location access can be changed at any time from the privacy settings." msgstr "" "Dostęp do położenia można zmienić w każdej chwili w ustawieniach prywatności." @@ -143,29 +143,29 @@ msgid "Requested setting not found" msgstr "Nie odnaleziono żądanego ustawienia" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" msgstr "Odmów" -#: src/wallpaper.c:186 +#: src/wallpaper.c:191 msgid "Allow Applications to Set Backgrounds?" msgstr "Pozwolić programowi na ustawianie tła?" -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." msgstr "Program potrzebuje mieć możliwość zmiany obrazu tła." -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, c-format msgid "Allow %s to Set Backgrounds?" msgstr "Pozwolić programowi „%s” na ustawianie tła?" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, c-format msgid "%s is requesting to be able to change the background image." msgstr "Program „%s” potrzebuje mieć możliwość zmiany obrazu tła." -#: src/wallpaper.c:203 +#: src/wallpaper.c:208 msgid "This permission can be changed at any time from the privacy settings." msgstr "" "To uprawnienie można zmienić w każdej chwili w ustawieniach prywatności." diff -Nru xdg-desktop-portal-1.8.1/po/pt_BR.po xdg-desktop-portal-1.14.3/po/pt_BR.po --- xdg-desktop-portal-1.8.1/po/pt_BR.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/pt_BR.po 2022-03-29 23:46:47.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal master\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" "PO-Revision-Date: 2019-11-24 22:29-0300\n" "Last-Translator: Rafael Fontenelle \n" "Language-Team: Brazilian Portuguese \n" @@ -45,7 +45,7 @@ msgid "Don't allow" msgstr "Não permitir" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "Permitir" @@ -110,33 +110,33 @@ msgid "%s wants to use your camera." msgstr "%s deseja usar sua câmera." -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "Negar acesso" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "Conceder acesso" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "Conceder acesso à sua localização?" -#: src/location.c:535 +#: src/location.c:536 msgid "An application wants to use your location." msgstr "Um aplicativo deseja usar sua localização." -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "Dar %s acesso a sua localização?" -#: src/location.c:551 +#: src/location.c:552 #, c-format msgid "%s wants to use your location." msgstr "%s deseja usar sua localização." -#: src/location.c:554 +#: src/location.c:555 msgid "Location access can be changed at any time from the privacy settings." msgstr "" "Acesso à localização pode ser alterado a qualquer tempo a partir das " @@ -146,32 +146,32 @@ msgid "Requested setting not found" msgstr "A configuração requisitada não foi encontrada" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" msgstr "Negar" -#: src/wallpaper.c:186 +#: src/wallpaper.c:191 msgid "Allow Applications to Set Backgrounds?" msgstr "Permitir que aplicativos definam planos de fundo?" -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." msgstr "" "Um aplicativo está solicitando a capacidade de alterar a imagem de plano de " "fundo." -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, c-format msgid "Allow %s to Set Backgrounds?" msgstr "Permitir que %s defina planos de fundo?" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, c-format msgid "%s is requesting to be able to change the background image." msgstr "" "%s está solicitando a capacidade de alterar a imagem de plano de fundo." -#: src/wallpaper.c:203 +#: src/wallpaper.c:208 msgid "This permission can be changed at any time from the privacy settings." msgstr "" "Essa permissão pode ser alterada a qualquer momento a partir das " Binary files /tmp/tmpbyd67bgc/U85oRAN3bW/xdg-desktop-portal-1.8.1/po/pt.gmo and /tmp/tmpbyd67bgc/H03Eyi55JS/xdg-desktop-portal-1.14.3/po/pt.gmo differ diff -Nru xdg-desktop-portal-1.8.1/po/pt.po xdg-desktop-portal-1.14.3/po/pt.po --- xdg-desktop-portal-1.8.1/po/pt.po 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/pt.po 2022-03-29 23:46:47.000000000 +0000 @@ -0,0 +1,175 @@ +# Portuguese translation for xdg-desktop-portal. +# Copyright (C) 2022 xdg-desktop-portal's COPYRIGHT HOLDER +# This file is distributed under the same license as the xdg-desktop-portal package. +# Juliano de Souza Camargo , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: xdg-desktop-portal master\n" +"Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" +"PO-Revision-Date: 2022-01-20 10:40-0300\n" +"Last-Translator: Juliano de Souza Camargo \n" +"Language-Team: Portuguese < https://l10n.gnome.org/teams/pt/>\n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"X-Generator: Gtranslator 40.0\n" + +#: src/background.c:260 +#, c-format +msgid "Allow %s to run in the background?" +msgstr "Permitir a %s correr em segundo plano?" + +#: src/background.c:264 +#, c-format +msgid "%s requests to be started automatically and run in the background." +msgstr "%s requisita iniciar automaticamente e correr em segundo plano." + +#: src/background.c:266 +#, c-format +msgid "%s requests to run in the background." +msgstr "%s requisita correr em segundo plano." + +#: src/background.c:267 +msgid "" +"The ‘run in background’ permission can be changed at any time from the " +"application settings." +msgstr "" +"Pode alterar, em qualquer altura, a permissão para “correr em segundo plano” " +"pelas definições da aplicação." + +#: src/background.c:272 +msgid "Don't allow" +msgstr "Não permitir" + +#: src/background.c:273 src/wallpaper.c:181 +msgid "Allow" +msgstr "Permitir" + +#: src/device.c:115 +msgid "Turn On Microphone?" +msgstr "Ligar o microfone?" + +#: src/device.c:116 +msgid "" +"Access to your microphone can be changed at any time from the privacy " +"settings." +msgstr "" +"Pode alterar, em qualquer altura, o acesso ao microfone pelas definições de " +"privacidade." + +#: src/device.c:120 +msgid "An application wants to use your microphone." +msgstr "Uma aplicação requisita o uso de seu microfone." + +#: src/device.c:122 +#, c-format +msgid "%s wants to use your microphone." +msgstr "%s requisita o uso de seu microfone." + +#: src/device.c:128 +msgid "Turn On Speakers?" +msgstr "Ligar os altifalantes?" + +#: src/device.c:129 +msgid "" +"Access to your speakers can be changed at any time from the privacy settings." +msgstr "" +"Pode alterar, em qualquer altura, o acesso aos altifalantes pelas definições " +"de privacidade." + +#: src/device.c:133 +msgid "An application wants to play sound." +msgstr "Uma aplicação requisita reproduzir som." + +#: src/device.c:135 +#, c-format +msgid "%s wants to play sound." +msgstr "%s requisita reproduzir som." + +#: src/device.c:141 +msgid "Turn On Camera?" +msgstr "Ligar a câmara?" + +#: src/device.c:142 +msgid "" +"Access to your camera can be changed at any time from the privacy settings." +msgstr "" +"Pode alterar, em qualquer altura, o acesso à câmara pelas definições de " +"privacidade." + +#: src/device.c:146 +msgid "An application wants to use your camera." +msgstr "Uma aplicação requisita o uso de sua câmara." + +#: src/device.c:148 +#, c-format +msgid "%s wants to use your camera." +msgstr "%s requisita o uso de sua câmara." + +#: src/location.c:527 +msgid "Deny Access" +msgstr "Negar acesso" + +#: src/location.c:529 +msgid "Grant Access" +msgstr "Conceder acesso" + +#: src/location.c:535 +msgid "Grant Access to Your Location?" +msgstr "Conceder acesso à sua localização?" + +#: src/location.c:536 +msgid "An application wants to use your location." +msgstr "Uma aplicação requisita acesso à sua localização." + +#: src/location.c:548 +#, c-format +msgid "Give %s Access to Your Location?" +msgstr "Permitir que %s aceda à sua localização?" + +#: src/location.c:552 +#, c-format +msgid "%s wants to use your location." +msgstr "%s quer ter acesso à sua localização." + +#: src/location.c:555 +msgid "Location access can be changed at any time from the privacy settings." +msgstr "" +"Pode alterar, em qualquer altura, o acesso à localização pelas definições de " +"privacidade." + +#: src/settings.c:124 +msgid "Requested setting not found" +msgstr "Definição solicitada não encontrada" + +#: src/wallpaper.c:179 +msgid "Deny" +msgstr "Negar" + +#: src/wallpaper.c:191 +msgid "Allow Applications to Set Backgrounds?" +msgstr "Permitir que aplicações definam o fundo?" + +#: src/wallpaper.c:192 +msgid "An application is requesting to be able to change the background image." +msgstr "Uma aplicação requisita poder alterar a imagem de fundo." + +#: src/wallpaper.c:204 +#, c-format +msgid "Allow %s to Set Backgrounds?" +msgstr "Permitir que %s defina o fundo?" + +#: src/wallpaper.c:205 +#, c-format +msgid "%s is requesting to be able to change the background image." +msgstr "%s requisita poder alterar a imagem de fundo." + +#: src/wallpaper.c:208 +msgid "This permission can be changed at any time from the privacy settings." +msgstr "" +"Pode alterar, em qualquer altura, esta permissão pelas definições de " +"privacidade." Binary files /tmp/tmpbyd67bgc/U85oRAN3bW/xdg-desktop-portal-1.8.1/po/ro.gmo and /tmp/tmpbyd67bgc/H03Eyi55JS/xdg-desktop-portal-1.14.3/po/ro.gmo differ diff -Nru xdg-desktop-portal-1.8.1/po/ro.po xdg-desktop-portal-1.14.3/po/ro.po --- xdg-desktop-portal-1.8.1/po/ro.po 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/ro.po 2022-03-29 23:46:48.000000000 +0000 @@ -0,0 +1,175 @@ +# Copyright (C) 2022 xdg-desktop-portal +# This file is distributed under the same license as the xdg-desktop-portal package. +# +# Sergiu Bivol , 2022. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" +"PO-Revision-Date: 2022-02-18 10:51+0000\n" +"Last-Translator: Sergiu Bivol \n" +"Language-Team: Romanian\n" +"Language: ro\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < " +"20)) ? 1 : 2;\n" +"X-Generator: Lokalize 21.12.2\n" + +#: src/background.c:260 +#, c-format +msgid "Allow %s to run in the background?" +msgstr "Permiteți %s să ruleze în fundal?" + +#: src/background.c:264 +#, c-format +msgid "%s requests to be started automatically and run in the background." +msgstr "%s cere să fie pornit automat și să ruleze în fundal." + +#: src/background.c:266 +#, c-format +msgid "%s requests to run in the background." +msgstr "%s cere să ruleze în fundal." + +#: src/background.c:267 +msgid "" +"The ‘run in background’ permission can be changed at any time from the " +"application settings." +msgstr "" +"Permisiunea „rulează în fundal” poate fi schimbată în orice moment din " +"configurările aplicației." + +#: src/background.c:272 +msgid "Don't allow" +msgstr "Nu permite" + +#: src/background.c:273 src/wallpaper.c:181 +msgid "Allow" +msgstr "Permite" + +#: src/device.c:115 +msgid "Turn On Microphone?" +msgstr "Porniți microfonul?" + +#: src/device.c:116 +msgid "" +"Access to your microphone can be changed at any time from the privacy " +"settings." +msgstr "" +"Accesul la microfon poate fi schimbat oricând din configurările de " +"confidențialitate." + +#: src/device.c:120 +msgid "An application wants to use your microphone." +msgstr "O aplicație vrea să vă folosească microfonul." + +#: src/device.c:122 +#, c-format +msgid "%s wants to use your microphone." +msgstr "%s vrea să vă folosească microfonul." + +#: src/device.c:128 +msgid "Turn On Speakers?" +msgstr "Porniți difuzoarele?" + +#: src/device.c:129 +msgid "" +"Access to your speakers can be changed at any time from the privacy settings." +msgstr "" +"Accesul la difuzoare poate fi schimbat oricând din configurările de " +"confidențialitate." + +#: src/device.c:133 +msgid "An application wants to play sound." +msgstr "O aplicație dorește să redea sunet." + +#: src/device.c:135 +#, c-format +msgid "%s wants to play sound." +msgstr "%s dorește să redea sunet." + +#: src/device.c:141 +msgid "Turn On Camera?" +msgstr "Porniți camera?" + +#: src/device.c:142 +msgid "" +"Access to your camera can be changed at any time from the privacy settings." +msgstr "" +"Accesul la cameră poate fi schimbat oricând din configurările de " +"confidențialitate." + +#: src/device.c:146 +msgid "An application wants to use your camera." +msgstr "O aplicație vrea să vă folosească camera." + +#: src/device.c:148 +#, c-format +msgid "%s wants to use your camera." +msgstr "%s vrea să vă folosească camera." + +#: src/location.c:527 +msgid "Deny Access" +msgstr "Refuză accesul" + +#: src/location.c:529 +msgid "Grant Access" +msgstr "Permite accesul" + +#: src/location.c:535 +msgid "Grant Access to Your Location?" +msgstr "Permiteți accesul la localizare?" + +#: src/location.c:536 +msgid "An application wants to use your location." +msgstr "O aplicație vrea să vă folosească localizarea." + +#: src/location.c:548 +#, c-format +msgid "Give %s Access to Your Location?" +msgstr "Permiteți accesul %s la localizare?" + +#: src/location.c:552 +#, c-format +msgid "%s wants to use your location." +msgstr "%s vrea să vă folosească localizarea." + +#: src/location.c:555 +msgid "Location access can be changed at any time from the privacy settings." +msgstr "" +"Accesul la localizare poate fi schimbat oricând din configurările de " +"confidențialitate." + +#: src/settings.c:124 +msgid "Requested setting not found" +msgstr "Configurarea cerută nu a fost găsită" + +#: src/wallpaper.c:179 +msgid "Deny" +msgstr "Refuză" + +#: src/wallpaper.c:191 +msgid "Allow Applications to Set Backgrounds?" +msgstr "Permiteți aplicațiilor să stabilească fundaluri?" + +#: src/wallpaper.c:192 +msgid "An application is requesting to be able to change the background image." +msgstr "O aplicație cere să poată schimba imaginea de fundal." + +#: src/wallpaper.c:204 +#, c-format +msgid "Allow %s to Set Backgrounds?" +msgstr "Permiteți %s să stabilească fundaluri?" + +#: src/wallpaper.c:205 +#, c-format +msgid "%s is requesting to be able to change the background image." +msgstr "%s cere să poată schimba imaginea de fundal." + +#: src/wallpaper.c:208 +msgid "This permission can be changed at any time from the privacy settings." +msgstr "" +"Această permisiune poate fi schimbată oricând din configurările de " +"confidențialitate." diff -Nru xdg-desktop-portal-1.8.1/po/ru.po xdg-desktop-portal-1.14.3/po/ru.po --- xdg-desktop-portal-1.8.1/po/ru.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/ru.po 2022-03-29 23:46:48.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal master\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" "PO-Revision-Date: 2020-04-04 06:13+0300\n" "Last-Translator: Артемий Судаков \n" "Language-Team: Russian \n" @@ -46,7 +46,7 @@ msgid "Don't allow" msgstr "Запретить" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "Разрешить" @@ -111,33 +111,33 @@ msgid "%s wants to use your camera." msgstr "%s запрашивает доступ к камере." -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "Отклонить запрос" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "Предоставить доступ" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "Предоставить доступ к вашему местоположению?" -#: src/location.c:535 +#: src/location.c:536 msgid "An application wants to use your location." msgstr "Приложение запрашивает доступ к сервисам геолокации." -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "Дать %s доступ к вашему местоположению?" -#: src/location.c:551 +#: src/location.c:552 #, c-format msgid "%s wants to use your location." msgstr "%s запрашивает доступ к использоованию сервисов геолокации." -#: src/location.c:554 +#: src/location.c:555 msgid "Location access can be changed at any time from the privacy settings." msgstr "" "Доступ к сервисам местоположения может быть изменен в любое время из меню " @@ -147,32 +147,32 @@ msgid "Requested setting not found" msgstr "Запрашиваемая настройка не найдена" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" msgstr "Отклонить" -#: src/wallpaper.c:186 +#: src/wallpaper.c:191 msgid "Allow Applications to Set Backgrounds?" msgstr "Разрешить приложению работать в фоне?" -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." msgstr "" "Приложение запрашивает доступ к возможности изменять изображения рабочего " "стола" -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, c-format msgid "Allow %s to Set Backgrounds?" msgstr "Разрешить %s изменять изображение на рабочем столе?" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, c-format msgid "%s is requesting to be able to change the background image." msgstr "" "%s запрашивает доступ к возможности изменять изображение рабочего стола." -#: src/wallpaper.c:203 +#: src/wallpaper.c:208 msgid "This permission can be changed at any time from the privacy settings." msgstr "" "Это разрешение может быть изменено в любое время из меню настроек " diff -Nru xdg-desktop-portal-1.8.1/po/sk.po xdg-desktop-portal-1.14.3/po/sk.po --- xdg-desktop-portal-1.8.1/po/sk.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/sk.po 2022-03-29 23:46:48.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal master\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" "PO-Revision-Date: 2020-09-22 14:32+0200\n" "Last-Translator: Dušan Kazik \n" "Language-Team: Slovak \n" @@ -45,7 +45,7 @@ msgid "Don't allow" msgstr "Nepovoliť" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "Povoliť" @@ -108,33 +108,33 @@ msgid "%s wants to use your camera." msgstr "Aplikácia %s sa pokúša použiť vašu kameru." -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "Zamietnuť prístup" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "Udeliť prístup" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "Udeliť prístup k vašej polohe?" -#: src/location.c:535 +#: src/location.c:536 msgid "An application wants to use your location." msgstr "Aplikácia sa pokúša použiť vašu polohu." -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "Umožniť aplikácii %s prístup k vašej polohe?" -#: src/location.c:551 +#: src/location.c:552 #, c-format msgid "%s wants to use your location." msgstr "Aplikácia %s sa pokúša použiť vašu polohu." -#: src/location.c:554 +#: src/location.c:555 msgid "Location access can be changed at any time from the privacy settings." msgstr "" "Prístup k vašej polohe môže byť kedykoľvek zmenený z nastavení súkromia." @@ -143,28 +143,28 @@ msgid "Requested setting not found" msgstr "Požadované nastavenie sa nenašlo" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" msgstr "Odmietnuť" -#: src/wallpaper.c:186 +#: src/wallpaper.c:191 msgid "Allow Applications to Set Backgrounds?" msgstr "Umožniť aplikáciám nastavovať pozadia?" -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." msgstr "Aplikácia požaduje povolenie na zmenu obrázku pozadia." -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, c-format msgid "Allow %s to Set Backgrounds?" msgstr "Umožniť aplikácii %s nastavovať pozadia?" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, c-format msgid "%s is requesting to be able to change the background image." msgstr "Aplikácia %s požaduje povolenie na zmenu obrázku pozadia." -#: src/wallpaper.c:203 +#: src/wallpaper.c:208 msgid "This permission can be changed at any time from the privacy settings." msgstr "Toto oprávnenie môže byť kedykoľvek zmenené z nastavení súkromia." diff -Nru xdg-desktop-portal-1.8.1/po/sr.po xdg-desktop-portal-1.14.3/po/sr.po --- xdg-desktop-portal-1.8.1/po/sr.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/sr.po 2022-03-29 23:46:48.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal master\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" "PO-Revision-Date: 2016-09-14 12:54+0200\n" "Last-Translator: Мирослав Николић \n" "Language-Team: српски \n" @@ -46,7 +46,7 @@ msgid "Don't allow" msgstr "" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "" @@ -111,34 +111,34 @@ msgid "%s wants to use your camera." msgstr "„%s“ жели да користи вашу камерицу." -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "" -#: src/location.c:535 +#: src/location.c:536 #, fuzzy msgid "An application wants to use your location." msgstr "Један програм жели да користи вашу камерицу." -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "" -#: src/location.c:551 +#: src/location.c:552 #, fuzzy, c-format msgid "%s wants to use your location." msgstr "„%s“ жели да користи вашу камерицу." -#: src/location.c:554 +#: src/location.c:555 #, fuzzy msgid "Location access can be changed at any time from the privacy settings." msgstr "" @@ -149,30 +149,30 @@ msgid "Requested setting not found" msgstr "" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" msgstr "" -#: src/wallpaper.c:186 +#: src/wallpaper.c:191 #, fuzzy msgid "Allow Applications to Set Backgrounds?" msgstr "Један програм жели да пусти звук." -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." msgstr "" -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, c-format msgid "Allow %s to Set Backgrounds?" msgstr "" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, c-format msgid "%s is requesting to be able to change the background image." msgstr "" -#: src/wallpaper.c:203 +#: src/wallpaper.c:208 #, fuzzy msgid "This permission can be changed at any time from the privacy settings." msgstr "" diff -Nru xdg-desktop-portal-1.8.1/po/sv.po xdg-desktop-portal-1.14.3/po/sv.po --- xdg-desktop-portal-1.8.1/po/sv.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/sv.po 2022-03-29 23:46:48.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal master\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" "PO-Revision-Date: 2020-09-20 00:11+0200\n" "Last-Translator: Anders Jonsson \n" "Language-Team: Swedish \n" @@ -46,7 +46,7 @@ msgid "Don't allow" msgstr "Tillåt inte" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "Tillåt" @@ -111,33 +111,33 @@ msgid "%s wants to use your camera." msgstr "%s vill använda din kamera." -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "Neka åtkomst" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "Bevilja åtkomst" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "Bevilja åtkomst till din plats?" -#: src/location.c:535 +#: src/location.c:536 msgid "An application wants to use your location." msgstr "Ett program vill använda din plats." -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "Ge %s åtkomst till din plats?" -#: src/location.c:551 +#: src/location.c:552 #, c-format msgid "%s wants to use your location." msgstr "%s vill använda din plats." -#: src/location.c:554 +#: src/location.c:555 msgid "Location access can be changed at any time from the privacy settings." msgstr "Platsåtkomst kan ändras när som helst från sekretessinställningarna." @@ -145,29 +145,29 @@ msgid "Requested setting not found" msgstr "Begärd inställning hittades inte" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" msgstr "Neka" -#: src/wallpaper.c:186 +#: src/wallpaper.c:191 msgid "Allow Applications to Set Backgrounds?" msgstr "Tillåt program att ställa in bakgrunder?" -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." msgstr "Ett program begär att kunna ändra bakgrundsbilden." -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, c-format msgid "Allow %s to Set Backgrounds?" msgstr "Tillåt %s att ställa in bakgrunder?" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, c-format msgid "%s is requesting to be able to change the background image." msgstr "%s begär att kunna ändra bakgrundsbilden." -#: src/wallpaper.c:203 +#: src/wallpaper.c:208 msgid "This permission can be changed at any time from the privacy settings." msgstr "" "Denna rättighet kan ändras när som helst från sekretessinställningarna." diff -Nru xdg-desktop-portal-1.8.1/po/tr.po xdg-desktop-portal-1.14.3/po/tr.po --- xdg-desktop-portal-1.8.1/po/tr.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/tr.po 2022-03-29 23:46:48.000000000 +0000 @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal master\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" "PO-Revision-Date: 2020-02-27 21:57+0300\n" "Last-Translator: Sabri Ünal \n" "Language-Team: Türkçe \n" @@ -49,7 +49,7 @@ msgid "Don't allow" msgstr "İzin verme" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "İzin ver" @@ -114,33 +114,33 @@ msgid "%s wants to use your camera." msgstr "%s, kameranızı kullanmak istiyor." -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "Erişim Reddedildi" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "Erişim Verildi" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "Konumunuza Erişim Verilsin Mi?" -#: src/location.c:535 +#: src/location.c:536 msgid "An application wants to use your location." msgstr "Bir uygulama, konumunuzu kullanmak istiyor." -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "%s, Bulunduğunuz Konuma Erişsin Mi?" -#: src/location.c:551 +#: src/location.c:552 #, c-format msgid "%s wants to use your location." msgstr "%s, konumunuzu kullanmak istiyor." -#: src/location.c:554 +#: src/location.c:555 msgid "Location access can be changed at any time from the privacy settings." msgstr "" "Konum erişimini, gizlilik ayarlarından istediğiniz zaman değiştirilebilir." @@ -149,28 +149,28 @@ msgid "Requested setting not found" msgstr "İstenen ayar bulunamadı" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" msgstr "Reddet" -#: src/wallpaper.c:186 +#: src/wallpaper.c:191 msgid "Allow Applications to Set Backgrounds?" msgstr "Uygulamaların Arka Planı Belirlemesine İzin Verilsin Mi?" -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." msgstr "Bir uygulama arka planı değiştirme yetkisi istiyor." -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, c-format msgid "Allow %s to Set Backgrounds?" msgstr "%s, Arka Planı Belirlemesine İzin Verilsin Mi?" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, c-format msgid "%s is requesting to be able to change the background image." msgstr "%s, arka planı değiştirme yetkisi istiyor." -#: src/wallpaper.c:203 +#: src/wallpaper.c:208 msgid "This permission can be changed at any time from the privacy settings." msgstr "Bu izin, gizlilik ayarlarından istediğiniz zaman değiştirilebilir." diff -Nru xdg-desktop-portal-1.8.1/po/uk.po xdg-desktop-portal-1.14.3/po/uk.po --- xdg-desktop-portal-1.8.1/po/uk.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/uk.po 2022-03-29 23:46:48.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal master\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" "PO-Revision-Date: 2019-11-10 13:03+0200\n" "Last-Translator: Yuri Chornoivan \n" "Language-Team: Ukrainian \n" @@ -46,7 +46,7 @@ msgid "Don't allow" msgstr "Не дозволяти" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "Дозволити" @@ -111,35 +111,35 @@ msgid "%s wants to use your camera." msgstr "%s потрібен доступ до використання відеокамери." -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "Заборонити доступ" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "Надати доступ" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "Надати доступ до даних щодо вашого перебування?" -#: src/location.c:535 +#: src/location.c:536 msgid "An application wants to use your location." msgstr "" "Програмі потрібен доступ до використання даних щодо вашого місця перебування." -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "Надати %s доступ до даних щодо вашого перебування?" -#: src/location.c:551 +#: src/location.c:552 #, c-format msgid "%s wants to use your location." msgstr "" "%s потрібен доступ до використання даних щодо вашого місця перебування." -#: src/location.c:554 +#: src/location.c:555 msgid "Location access can be changed at any time from the privacy settings." msgstr "" "Параметри доступу до даних щодо вашого місця перебування може бути будь-коли " @@ -149,29 +149,29 @@ msgid "Requested setting not found" msgstr "Потрібного вам параметра не знайдено" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" msgstr "Заборонити" -#: src/wallpaper.c:186 +#: src/wallpaper.c:191 msgid "Allow Applications to Set Backgrounds?" msgstr "Дозволити програмам встановлювати фонове зображення?" -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." msgstr "Програмою надіслано запит щодо доступу до зміни фонового зображення." -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, c-format msgid "Allow %s to Set Backgrounds?" msgstr "Дозволити %s встановлювати фонове зображення?" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, c-format msgid "%s is requesting to be able to change the background image." msgstr "%s надіслано запит щодо доступу до зміни фонового зображення." -#: src/wallpaper.c:203 +#: src/wallpaper.c:208 msgid "This permission can be changed at any time from the privacy settings." msgstr "" "Параметри цього доступу може бути будь-коли змінено за допомогою налаштувань " diff -Nru xdg-desktop-portal-1.8.1/po/xdg-desktop-portal.pot xdg-desktop-portal-1.14.3/po/xdg-desktop-portal.pot --- xdg-desktop-portal-1.8.1/po/xdg-desktop-portal.pot 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/xdg-desktop-portal.pot 2022-03-29 23:42:51.000000000 +0000 @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: xdg-desktop-portal 1.8.1\n" +"Project-Id-Version: xdg-desktop-portal 1.14.3\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -42,7 +42,7 @@ msgid "Don't allow" msgstr "" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "" @@ -101,33 +101,33 @@ msgid "%s wants to use your camera." msgstr "" -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "" -#: src/location.c:535 +#: src/location.c:536 msgid "An application wants to use your location." msgstr "" -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "" -#: src/location.c:551 +#: src/location.c:552 #, c-format msgid "%s wants to use your location." msgstr "" -#: src/location.c:554 +#: src/location.c:555 msgid "Location access can be changed at any time from the privacy settings." msgstr "" @@ -135,28 +135,28 @@ msgid "Requested setting not found" msgstr "" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" msgstr "" -#: src/wallpaper.c:186 +#: src/wallpaper.c:191 msgid "Allow Applications to Set Backgrounds?" msgstr "" -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." msgstr "" -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, c-format msgid "Allow %s to Set Backgrounds?" msgstr "" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, c-format msgid "%s is requesting to be able to change the background image." msgstr "" -#: src/wallpaper.c:203 +#: src/wallpaper.c:208 msgid "This permission can be changed at any time from the privacy settings." msgstr "" diff -Nru xdg-desktop-portal-1.8.1/po/zh_CN.po xdg-desktop-portal-1.14.3/po/zh_CN.po --- xdg-desktop-portal-1.8.1/po/zh_CN.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/zh_CN.po 2022-03-29 23:46:48.000000000 +0000 @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal master\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" "PO-Revision-Date: 2020-10-09 00:19+0800\n" "Last-Translator: Dingzhong Chen \n" "Language-Team: Chinese - China \n" @@ -46,7 +46,7 @@ msgid "Don't allow" msgstr "禁止" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" msgstr "允许" @@ -105,33 +105,33 @@ msgid "%s wants to use your camera." msgstr "%s 想使用您的摄像头。" -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" msgstr "拒绝访问" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" msgstr "授权访问" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" msgstr "授权访问您的位置信息?" -#: src/location.c:535 +#: src/location.c:536 msgid "An application wants to use your location." msgstr "有应用程序想使用您的位置信息。" -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" msgstr "授予 %s 访问您的位置信息权限?" -#: src/location.c:551 +#: src/location.c:552 #, c-format msgid "%s wants to use your location." msgstr "%s 想使用您的位置信息。" -#: src/location.c:554 +#: src/location.c:555 msgid "Location access can be changed at any time from the privacy settings." msgstr "您可随时在隐私设置中修改位置信息的访问权限。" @@ -139,28 +139,28 @@ msgid "Requested setting not found" msgstr "未找到请求的设置" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" msgstr "拒绝" -#: src/wallpaper.c:186 +#: src/wallpaper.c:191 msgid "Allow Applications to Set Backgrounds?" msgstr "允许应用程序设置背景吗?" -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." msgstr "一个应用程序正在请求允许修改背景图像。" -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, c-format msgid "Allow %s to Set Backgrounds?" msgstr "允许 %s 设置背景吗?" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, c-format msgid "%s is requesting to be able to change the background image." msgstr "%s 正在请求允许修改背景图像。" -#: src/wallpaper.c:203 +#: src/wallpaper.c:208 msgid "This permission can be changed at any time from the privacy settings." msgstr "您可随时在隐私设置中修改该权限。" Binary files /tmp/tmpbyd67bgc/U85oRAN3bW/xdg-desktop-portal-1.8.1/po/zh_TW.gmo and /tmp/tmpbyd67bgc/H03Eyi55JS/xdg-desktop-portal-1.14.3/po/zh_TW.gmo differ diff -Nru xdg-desktop-portal-1.8.1/po/zh_TW.po xdg-desktop-portal-1.14.3/po/zh_TW.po --- xdg-desktop-portal-1.8.1/po/zh_TW.po 2021-02-17 03:15:24.000000000 +0000 +++ xdg-desktop-portal-1.14.3/po/zh_TW.po 2022-03-29 23:46:48.000000000 +0000 @@ -7,9 +7,9 @@ msgstr "" "Project-Id-Version: xdg-desktop-portal master\n" "Report-Msgid-Bugs-To: https://github.com/flatpak/xdg-desktop-portal/issues\n" -"POT-Creation-Date: 2021-02-16 22:15-0500\n" -"PO-Revision-Date: 2018-03-26 20:40+0800\n" -"Last-Translator: Cheng-Chia Tseng \n" +"POT-Creation-Date: 2022-03-29 16:42-0700\n" +"PO-Revision-Date: 2021-10-01 23:52+0700\n" +"Last-Translator: Dmitry \n" "Language-Team: Chinese (Taiwan) \n" "Language: zh_TW\n" "MIME-Version: 1.0\n" @@ -20,32 +20,31 @@ #: src/background.c:260 #, c-format msgid "Allow %s to run in the background?" -msgstr "" +msgstr "允許 %s 在後台運行嗎?" #: src/background.c:264 #, c-format msgid "%s requests to be started automatically and run in the background." -msgstr "" +msgstr "%s 請求自動啟動並在後台運行。" #: src/background.c:266 #, c-format msgid "%s requests to run in the background." -msgstr "" +msgstr "%s 請求在後台運行。" #: src/background.c:267 -#, fuzzy msgid "" "The ‘run in background’ permission can be changed at any time from the " "application settings." -msgstr "您可以隨時從隱私權設定值中修改您的喇叭存取控制。" +msgstr "“後台運行” 權限可以隨時從應用程序設置中更改。" #: src/background.c:272 msgid "Don't allow" -msgstr "" +msgstr "不允許" -#: src/background.c:273 src/wallpaper.c:180 +#: src/background.c:273 src/wallpaper.c:181 msgid "Allow" -msgstr "" +msgstr "允許" #: src/device.c:115 msgid "Turn On Microphone?" @@ -55,7 +54,7 @@ msgid "" "Access to your microphone can be changed at any time from the privacy " "settings." -msgstr "您可以隨時從隱私權設定值中修改您的麥克風存取控制。" +msgstr "可以隨時通過隱私設置更改對麥克風的訪問權限。" #: src/device.c:120 msgid "An application wants to use your microphone." @@ -68,100 +67,96 @@ #: src/device.c:128 msgid "Turn On Speakers?" -msgstr "啟用喇叭?" +msgstr "打開揚聲器?" #: src/device.c:129 msgid "" "Access to your speakers can be changed at any time from the privacy settings." -msgstr "您可以隨時從隱私權設定值中修改您的喇叭存取控制。" +msgstr "可以随时通过隐私设置更改对扬声器的访问权限。" #: src/device.c:133 msgid "An application wants to play sound." -msgstr "有個應用程式想要播放聲音。" +msgstr "應用程序想要播放聲音。" #: src/device.c:135 #, c-format msgid "%s wants to play sound." -msgstr "%s 想要播放聲音。" +msgstr "%s 想播放声音。" #: src/device.c:141 msgid "Turn On Camera?" -msgstr "啟用攝影機?" +msgstr "打开相机?" #: src/device.c:142 msgid "" "Access to your camera can be changed at any time from the privacy settings." -msgstr "您可以隨時從隱私權設定值中修改您的攝影機存取控制。" +msgstr "可以隨時通過隱私設置更改對相機的訪問權限。" #: src/device.c:146 msgid "An application wants to use your camera." -msgstr "有個應用程式想要使用您的攝影機。" +msgstr "應用程序想要使用您的相機。" #: src/device.c:148 #, c-format msgid "%s wants to use your camera." msgstr "%s 想要使用您的攝影機。" -#: src/location.c:526 +#: src/location.c:527 msgid "Deny Access" -msgstr "" +msgstr "拒絕訪問" -#: src/location.c:528 +#: src/location.c:529 msgid "Grant Access" -msgstr "" +msgstr "授予訪問權限" -#: src/location.c:534 +#: src/location.c:535 msgid "Grant Access to Your Location?" -msgstr "" +msgstr "授予訪問您的位置的權限?" -#: src/location.c:535 -#, fuzzy +#: src/location.c:536 msgid "An application wants to use your location." -msgstr "有個應用程式想要使用您的攝影機。" +msgstr "應用程序想要使用您的位置。" -#: src/location.c:547 +#: src/location.c:548 #, c-format msgid "Give %s Access to Your Location?" -msgstr "" +msgstr "授予 %s 訪問您的位置的權限?" -#: src/location.c:551 -#, fuzzy, c-format +#: src/location.c:552 +#, c-format msgid "%s wants to use your location." -msgstr "%s 想要使用您的攝影機。" +msgstr "%s 想使用您的位置。" -#: src/location.c:554 -#, fuzzy +#: src/location.c:555 msgid "Location access can be changed at any time from the privacy settings." -msgstr "您可以隨時從隱私權設定值中修改您的喇叭存取控制。" +msgstr "可以隨時從隱私設置更改位置訪問權限。" #: src/settings.c:124 msgid "Requested setting not found" -msgstr "" +msgstr "未找到請求的設置" -#: src/wallpaper.c:178 +#: src/wallpaper.c:179 msgid "Deny" -msgstr "" +msgstr "否定" -#: src/wallpaper.c:186 -#, fuzzy +#: src/wallpaper.c:191 msgid "Allow Applications to Set Backgrounds?" -msgstr "有個應用程式想要播放聲音。" +msgstr "允許應用程序設置背景?" -#: src/wallpaper.c:187 +#: src/wallpaper.c:192 msgid "An application is requesting to be able to change the background image." -msgstr "" +msgstr "應用程序請求能夠更改背景圖像。" -#: src/wallpaper.c:199 +#: src/wallpaper.c:204 #, c-format msgid "Allow %s to Set Backgrounds?" -msgstr "" +msgstr "允許 %s 設置背景嗎?" -#: src/wallpaper.c:200 +#: src/wallpaper.c:205 #, c-format msgid "%s is requesting to be able to change the background image." -msgstr "" +msgstr "%s 請求能夠更改背景圖像。" -#: src/wallpaper.c:203 -#, fuzzy +#: src/wallpaper.c:208 msgid "This permission can be changed at any time from the privacy settings." -msgstr "您可以隨時從隱私權設定值中修改您的喇叭存取控制。" +msgstr "可以隨時從隱私設置更改此權限。" diff -Nru xdg-desktop-portal-1.8.1/README.md xdg-desktop-portal-1.14.3/README.md --- xdg-desktop-portal-1.8.1/README.md 2020-09-14 17:03:38.000000000 +0000 +++ xdg-desktop-portal-1.14.3/README.md 2022-03-28 18:02:35.000000000 +0000 @@ -29,9 +29,12 @@ To implement most portals, xdg-desktop-portal relies on a backend that provides implementations of the org.freedesktop.impl.portal.\* interfaces. Different backends are available see: -- GTK backend [xdg-desktop-portal-gtk](http://github.com/flatpak/xdg-desktop-portal-gtk) -- KDE backend [xdg-desktop-portal-kde](https://github.com/KDE/xdg-desktop-portal-kde) (in development) -- wlroots [xdg-desktop-portal-wlr](https://github.com/emersion/xdg-desktop-portal-wlr) (in development) + +- GTK [xdg-desktop-portal-gtk](http://github.com/flatpak/xdg-desktop-portal-gtk) +- GNOME [xdg-desktop-portal-gnome](https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/) +- KDE [xdg-desktop-portal-kde](https://github.com/KDE/xdg-desktop-portal-kde) +- Pantheon (Elementary) [xdg-desktop-portal-pantheon](https://github.com/elementary/portals) +- wlroots [xdg-desktop-portal-wlr](https://github.com/emersion/xdg-desktop-portal-wlr) ## Design considerations diff -Nru xdg-desktop-portal-1.8.1/src/account.c xdg-desktop-portal-1.14.3/src/account.c --- xdg-desktop-portal-1.8.1/src/account.c 2021-02-09 20:03:56.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/account.c 2022-03-29 22:00:20.000000000 +0000 @@ -95,7 +95,11 @@ g_autofree char *ruri = NULL; g_autoptr(GError) error = NULL; - ruri = register_document (image, xdp_app_info_get_id (request->app_info), FALSE, FALSE, FALSE, &error); + if (xdp_app_info_is_host (request->app_info)) + ruri = g_strdup (image); + else + ruri = register_document (image, xdp_app_info_get_id (request->app_info), FALSE, FALSE, FALSE, &error); + if (ruri == NULL) g_warning ("Failed to register %s: %s", image, error->message); else @@ -191,7 +195,7 @@ if (!impl_request) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } request_set_impl_request (request, impl_request); @@ -215,7 +219,7 @@ xdp_account_complete_get_user_information (object, invocation, request->id); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void diff -Nru xdg-desktop-portal-1.8.1/src/background.c xdg-desktop-portal-1.14.3/src/background.c --- xdg-desktop-portal-1.8.1/src/background.c 2020-03-13 12:38:51.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/background.c 2022-03-29 22:00:20.000000000 +0000 @@ -301,7 +301,8 @@ autostart_enabled = FALSE; - commandline = xdp_app_info_rewrite_commandline (request->app_info, autostart_exec); + commandline = xdp_app_info_rewrite_commandline (request->app_info, autostart_exec, + FALSE /* don't quote escape */); if (commandline == NULL) { g_debug ("Autostart not supported for: %s", app_id); @@ -411,7 +412,7 @@ &error)) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } options = g_variant_ref_sink (g_variant_builder_end (&opt_builder)); @@ -427,7 +428,7 @@ if (!impl_request) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } request_set_impl_request (request, impl_request); @@ -439,7 +440,7 @@ g_task_set_task_data (task, g_object_ref (request), g_object_unref); g_task_run_in_thread (task, handle_request_background_in_thread_func); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void @@ -653,6 +654,7 @@ res, &error)) { + g_dbus_error_strip_remote_error (error); g_warning ("Error from background backend: %s", error->message); notification_data_free (nd); return; diff -Nru xdg-desktop-portal-1.8.1/src/camera.c xdg-desktop-portal-1.14.3/src/camera.c --- xdg-desktop-portal-1.8.1/src/camera.c 2020-09-14 17:03:38.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/camera.c 2022-03-29 22:00:20.000000000 +0000 @@ -115,7 +115,7 @@ XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, "Camera access disabled"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } REQUEST_AUTOLOCK (request); @@ -133,7 +133,7 @@ g_task_set_task_data (task, g_object_ref (request), g_object_unref); g_task_run_in_thread (task, handle_access_camera_in_thread_func); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static PipeWireRemote * @@ -193,7 +193,7 @@ XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, "Camera access disabled"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } app_info = xdp_invocation_lookup_app_info_sync (invocation, NULL, &error); @@ -205,7 +205,7 @@ XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, "Permission denied"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } remote = open_pipewire_camera_remote (app_id, &error); @@ -216,7 +216,7 @@ XDG_DESKTOP_PORTAL_ERROR_FAILED, "Failed to open PipeWire remote: %s", error->message); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } out_fd_list = g_unix_fd_list_new (); @@ -232,13 +232,13 @@ XDG_DESKTOP_PORTAL_ERROR_FAILED, "Failed to append fd: %s", error->message); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } xdp_camera_complete_open_pipewire_remote (object, invocation, out_fd_list, g_variant_new_handle (fd_id)); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void diff -Nru xdg-desktop-portal-1.8.1/src/device.c xdg-desktop-portal-1.14.3/src/device.c --- xdg-desktop-portal-1.8.1/src/device.c 2020-05-20 16:42:17.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/device.c 2022-03-29 22:00:20.000000000 +0000 @@ -236,7 +236,7 @@ XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, "Invalid devices requested"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } if (g_str_equal (devices[0], "microphone") && @@ -247,7 +247,7 @@ XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, "Microphone access disabled"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } if (g_str_equal (devices[0], "camera") && xdp_impl_lockdown_get_disable_camera (lockdown)) @@ -257,7 +257,7 @@ XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, "Camera access disabled"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } if (g_str_equal (devices[0], "speakers") && xdp_impl_lockdown_get_disable_sound_output (lockdown)) @@ -267,7 +267,7 @@ XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, "Speaker access disabled"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } REQUEST_AUTOLOCK (request); @@ -278,7 +278,7 @@ XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, "This call is not available inside the sandbox"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } app_info = xdp_get_app_info_from_pid (pid, &error); @@ -288,7 +288,7 @@ XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, "Invalid pid requested"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_object_set_data_full (G_OBJECT (request), "app-id", g_strdup (xdp_app_info_get_id (app_info)), g_free); @@ -302,7 +302,7 @@ if (!impl_request) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } request_set_impl_request (request, impl_request); @@ -314,7 +314,7 @@ g_task_set_task_data (task, g_object_ref (request), g_object_unref); g_task_run_in_thread (task, handle_access_device_in_thread); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void diff -Nru xdg-desktop-portal-1.8.1/src/documents.c xdg-desktop-portal-1.14.3/src/documents.c --- xdg-desktop-portal-1.8.1/src/documents.c 2021-02-09 20:03:56.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/documents.c 2022-03-29 22:00:20.000000000 +0000 @@ -74,8 +74,7 @@ gboolean handled_permissions = FALSE; DocumentAddFullFlags full_flags; - if (app_id == NULL || *app_id == 0) - return g_strdup (uri); + g_return_val_if_fail (app_id != NULL && *app_id != '\0', NULL); file = g_file_new_for_uri (uri); path = g_file_get_path (file); @@ -200,3 +199,28 @@ doc_path = g_build_filename (documents_mountpoint, doc_id, basename, NULL); return g_filename_to_uri (doc_path, NULL, NULL); } + +char * +get_real_path_for_doc_path (const char *path, + XdpAppInfo *app_info) +{ + g_autofree char *doc_id = NULL; + gboolean ret = FALSE; + char *real_path = NULL; + + if (xdp_app_info_is_host (app_info)) + return g_strdup (path); + + ret = xdp_documents_call_lookup_sync (documents, path, &doc_id, NULL, NULL); + if (!ret) + return g_strdup (path); + + if (!g_strcmp0 (doc_id, "")) + return g_strdup (path); + + ret = xdp_documents_call_info_sync (documents, doc_id, &real_path, NULL, NULL, NULL); + if (!ret) + return g_strdup (path); + + return real_path; +} diff -Nru xdg-desktop-portal-1.8.1/src/documents.h xdg-desktop-portal-1.14.3/src/documents.h --- xdg-desktop-portal-1.8.1/src/documents.h 2020-09-14 17:03:38.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/documents.h 2022-03-29 22:00:20.000000000 +0000 @@ -30,3 +30,6 @@ gboolean writable, gboolean directory, GError **error); + +char *get_real_path_for_doc_path (const char *path, + XdpAppInfo *app_info); diff -Nru xdg-desktop-portal-1.8.1/src/dynamic-launcher.c xdg-desktop-portal-1.14.3/src/dynamic-launcher.c --- xdg-desktop-portal-1.8.1/src/dynamic-launcher.c 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/dynamic-launcher.c 2022-03-29 22:00:20.000000000 +0000 @@ -0,0 +1,1053 @@ +/* + * Copyright © 2022 Matthew Leeds + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Authors: + * Matthew Leeds + */ + +#include "config.h" + +#ifdef HAVE_GLIB_2_66 + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "dynamic-launcher.h" +#include "request.h" +#include "call.h" +#include "xdp-dbus.h" +#include "xdp-impl-dbus.h" +#include "xdp-utils.h" + +#define MAX_DESKTOP_SIZE_BYTES 1048576 + +typedef struct _DynamicLauncher DynamicLauncher; +typedef struct _DynamicLauncherClass DynamicLauncherClass; + +struct _DynamicLauncher +{ + XdpDynamicLauncherSkeleton parent_instance; +}; + +struct _DynamicLauncherClass +{ + XdpDynamicLauncherSkeletonClass parent_class; +}; + +static XdpImplDynamicLauncher *impl; +static DynamicLauncher *dynamic_launcher; + +static GMutex transient_permissions_lock; +static GHashTable *transient_permissions; + +GType dynamic_launcher_get_type (void) G_GNUC_CONST; +static void dynamic_launcher_iface_init (XdpDynamicLauncherIface *iface); + +G_DEFINE_TYPE_WITH_CODE (DynamicLauncher, dynamic_launcher, XDP_TYPE_DYNAMIC_LAUNCHER_SKELETON, + G_IMPLEMENT_INTERFACE (XDP_TYPE_DYNAMIC_LAUNCHER, dynamic_launcher_iface_init)); + +typedef enum { + DYNAMIC_LAUNCHER_TYPE_APPLICATION = 1, + DYNAMIC_LAUNCHER_TYPE_WEBAPP = 2, +} DynamicLauncherType; + +static GVariant * +get_launcher_data_and_revoke_token (const char *token) +{ + g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&transient_permissions_lock); + GVariant *launcher_data_wrapped; + + if (!transient_permissions) + return NULL; + + if (!g_uuid_string_is_valid (token)) + return NULL; + + launcher_data_wrapped = g_hash_table_lookup (transient_permissions, token); + if (launcher_data_wrapped) + { + g_autoptr(GVariant) launcher_data = NULL; + guint timeout_id; + + g_variant_get (launcher_data_wrapped, "(vu)", &launcher_data, &timeout_id); + + g_source_remove (timeout_id); + g_hash_table_remove (transient_permissions, token); + + return g_steal_pointer (&launcher_data); + } + + return NULL; +} + +static gboolean +validate_desktop_file_id (const char *app_id, + const char *desktop_file_id, + GError **error) +{ + const char *after_app_id; + + if (!g_str_has_suffix (desktop_file_id, ".desktop")) + { + g_set_error (error, + XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, + _("Desktop file id missing .desktop suffix: %s"), desktop_file_id); + return FALSE; + } + + if (app_id == NULL || *app_id == '\0') + return TRUE; + + after_app_id = desktop_file_id + strlen (app_id); + if (!g_str_has_prefix (desktop_file_id, app_id) || *after_app_id != '.') + { + g_set_error (error, + XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, + _("Desktop file id missing app id prefix '%s.': %s"), + app_id, desktop_file_id); + return FALSE; + } + + return TRUE; +} + +static gboolean +write_icon_to_disk (GVariant *icon_v, + const char *icon_subdir, + const char *icon_path, + GError **error) +{ + g_autoptr(GIcon) icon = NULL; + g_autoptr(GFile) icon_file = NULL; + g_autoptr(GFileOutputStream) icon_stream = NULL; + GBytes *icon_bytes; + gconstpointer bytes_data; + gsize bytes_len; + + icon = g_icon_deserialize (icon_v); + g_assert (G_IS_BYTES_ICON (icon)); + icon_bytes = g_bytes_icon_get_bytes (G_BYTES_ICON (icon)); + + g_mkdir_with_parents (icon_subdir, 0700); + icon_file = g_file_new_for_path (icon_path); + icon_stream = g_file_replace (icon_file, NULL, FALSE, G_FILE_CREATE_REPLACE_DESTINATION, NULL, error); + if (icon_stream == NULL) + return FALSE; + + /* Use write_all() instead of write_bytes() so we don't have to worry about + * partial writes (https://gitlab.gnome.org/GNOME/glib/-/issues/570). + */ + bytes_data = g_bytes_get_data (icon_bytes, &bytes_len); + if (!g_output_stream_write_all (G_OUTPUT_STREAM (icon_stream), + bytes_data, bytes_len, + NULL, NULL, error) || + !g_output_stream_close (G_OUTPUT_STREAM (icon_stream), NULL, error)) + return FALSE; + + return TRUE; +} + +static GKeyFile * +save_icon_and_get_desktop_entry (const char *desktop_file_id, + const char *desktop_entry, + GVariant *launcher_data, + XdpAppInfo *xdp_app_info, + char **out_icon_path, + GError **error) +{ + g_autoptr(GVariant) icon_v = NULL; + g_autoptr(GDesktopAppInfo) desktop_app_info = NULL; + g_autoptr(GKeyFile) key_file = g_key_file_new (); + g_autofree char *exec = NULL; + g_auto(GStrv) exec_strv = NULL; + g_auto(GStrv) prefixed_exec_strv = NULL; + g_auto(GStrv) groups = NULL; + g_autofree char *prefixed_exec = NULL; + g_autofree char *tryexec_path = NULL; + g_autofree char *icon_path = NULL; + g_autofree char *icon_subdir = NULL; + const char *name, *icon_extension, *icon_size; + const char *app_id; + + g_variant_get (launcher_data, "(&sv&s&s)", &name, &icon_v, &icon_extension, &icon_size); + g_assert (name != NULL && name[0] != '\0'); + g_assert (icon_v); + g_assert (icon_extension != NULL && icon_extension[0] != '\0'); + g_assert (icon_size != NULL && icon_size[0] != '\0'); + + app_id = xdp_app_info_get_id (xdp_app_info); + + if (!g_key_file_load_from_data (key_file, desktop_entry, -1, + G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS, + error)) + { + g_set_error (error, + XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, + _("Desktop entry given to Install() not a valid key file")); + return NULL; + } + + /* The desktop entry spec supports more than one group but we don't in case + * there's a security risk. + */ + groups = g_key_file_get_groups (key_file, NULL); + if (g_strv_length (groups) > 1 || !g_strv_contains ((const char * const *)groups, G_KEY_FILE_DESKTOP_GROUP)) + { + g_set_error (error, + XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, + _("Desktop entry given to Install() must have only one group")); + return NULL; + } + + /* Overwrite Name= and Icon= if they are present */ + g_key_file_set_string (key_file, G_KEY_FILE_DESKTOP_GROUP, "Name", name); + + { + g_autofree char *no_dot_desktop = NULL; + g_autofree char *icon_name = NULL; + g_autofree char *subdir = NULL; + + no_dot_desktop = g_strndup (desktop_file_id, strlen(desktop_file_id) - strlen (".desktop")); + icon_name = g_strconcat (no_dot_desktop, ".", icon_extension, NULL); + + /* Put the icon in a per-size subdirectory so the size is discernible + * without reading the file + */ + if (g_strcmp0 (icon_extension, "svg") == 0) + subdir = g_strdup ("scalable"); + else + subdir = g_strdup_printf ("%sx%s", icon_size, icon_size); + + icon_subdir = g_build_filename (g_get_user_data_dir (), XDG_PORTAL_ICONS_DIR, subdir, NULL); + icon_path = g_build_filename (icon_subdir, icon_name, NULL); + + g_key_file_set_string (key_file, G_KEY_FILE_DESKTOP_GROUP, "Icon", icon_path); + } + + exec = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, "Exec", error); + if (exec == NULL) + return NULL; + + if (!g_shell_parse_argv (exec, NULL, &exec_strv, error)) + return NULL; + + /* Don't let the app give itself access to host files */ + if (xdp_app_info_get_kind (xdp_app_info) == XDP_APP_INFO_KIND_FLATPAK && + g_strv_contains ((const char * const *)exec_strv, "--file-forwarding")) + { + g_set_error (error, + XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, + _("Desktop entry given to Install() must not use --file-forwarding")); + return NULL; + } + + prefixed_exec_strv = xdp_app_info_rewrite_commandline (xdp_app_info, + (const char * const *)exec_strv, + TRUE /* quote escape */); + if (prefixed_exec_strv == NULL) + { + g_set_error (error, + XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_FAILED, + _("DynamicLauncher install not supported for: %s"), app_id); + return NULL; + } + + prefixed_exec = g_strjoinv (" ", prefixed_exec_strv); + g_key_file_set_value (key_file, G_KEY_FILE_DESKTOP_GROUP, "Exec", prefixed_exec); + + tryexec_path = xdp_app_info_get_tryexec_path (xdp_app_info); + if (tryexec_path != NULL) + g_key_file_set_value (key_file, G_KEY_FILE_DESKTOP_GROUP, "TryExec", tryexec_path); + + if (xdp_app_info_get_kind (xdp_app_info) == XDP_APP_INFO_KIND_FLATPAK) + { + /* Flatpak checks for this key */ + g_key_file_set_value (key_file, G_KEY_FILE_DESKTOP_GROUP, "X-Flatpak", app_id); + /* Flatpak removes this one for security */ + g_key_file_remove_key (key_file, G_KEY_FILE_DESKTOP_GROUP, "X-GNOME-Bugzilla-ExtraInfoScript", NULL); + } + + desktop_app_info = g_desktop_app_info_new_from_keyfile (key_file); + if (desktop_app_info == NULL) + { + g_set_error (error, + XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, + _("Desktop entry given to Install() not valid")); + return NULL; + } + + /* Write the icon last so it's only on-disk if other checks passed */ + if (!write_icon_to_disk (icon_v, icon_subdir, icon_path, error)) + return NULL; + + if (out_icon_path) + *out_icon_path = g_steal_pointer (&icon_path); + + return g_steal_pointer (&key_file); +} + +static gboolean +handle_install (XdpDynamicLauncher *object, + GDBusMethodInvocation *invocation, + const gchar *arg_token, + const gchar *arg_desktop_file_id, + const gchar *arg_desktop_entry, + GVariant *arg_options) +{ + Call *call = call_from_invocation (invocation); + const char *app_id = xdp_app_info_get_id (call->app_info); + g_autoptr(GVariant) launcher_data = NULL; + g_autoptr(GError) error = NULL; + g_autoptr(GDesktopAppInfo) app_info = NULL; + g_autoptr(GKeyFile) desktop_keyfile = NULL; + g_autofree char *icon_path = NULL; + g_autofree char *desktop_dir = NULL; + g_autofree char *desktop_path = NULL; + g_autofree char *link_path = NULL; + g_autofree char *relative_path = NULL; + g_autoptr(GFile) link_file = NULL; + gsize desktop_entry_length = G_MAXSIZE; + + launcher_data = get_launcher_data_and_revoke_token (arg_token); + if (launcher_data == NULL) + { + g_dbus_method_invocation_return_error (invocation, + XDG_DESKTOP_PORTAL_ERROR, + XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, + _("Token given is invalid: %s"), arg_token); + return G_DBUS_METHOD_INVOCATION_HANDLED; + } + + + if (!validate_desktop_file_id (app_id, arg_desktop_file_id, &error)) + { + g_dbus_method_invocation_return_gerror (invocation, error); + return G_DBUS_METHOD_INVOCATION_HANDLED; + } + + desktop_keyfile = save_icon_and_get_desktop_entry (arg_desktop_file_id, + arg_desktop_entry, + launcher_data, + call->app_info, + &icon_path, + &error); + if (desktop_keyfile == NULL) + { + g_dbus_method_invocation_return_gerror (invocation, error); + return G_DBUS_METHOD_INVOCATION_HANDLED; + } + + g_free (g_key_file_to_data (desktop_keyfile, &desktop_entry_length, NULL)); + if (desktop_entry_length > MAX_DESKTOP_SIZE_BYTES) + { + g_set_error (&error, + XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_FAILED, + _("Desktop file exceeds max size (%d): %s"), + MAX_DESKTOP_SIZE_BYTES, arg_desktop_file_id); + goto error; + } + + /* Put the desktop file in ~/.local/share/xdg-desktop-portal/applications/ so + * there's no ambiguity about which launchers were created by this portal. + */ + desktop_dir = g_build_filename (g_get_user_data_dir (), XDG_PORTAL_APPLICATIONS_DIR, NULL); + g_mkdir_with_parents (desktop_dir, 0700); + desktop_path = g_build_filename (desktop_dir, arg_desktop_file_id, NULL); + if (!g_key_file_save_to_file (desktop_keyfile, desktop_path, &error)) + goto error; + + /* Make a sym link in ~/.local/share/applications so the launcher shows up in + * the desktop environment's menu. + */ + link_path = g_build_filename (g_get_user_data_dir (), "applications", arg_desktop_file_id, NULL); + link_file = g_file_new_for_path (link_path); + relative_path = g_build_filename ("..", XDG_PORTAL_APPLICATIONS_DIR, arg_desktop_file_id, NULL); + g_file_delete (link_file, NULL, NULL); + if (!g_file_make_symbolic_link (link_file, relative_path, NULL, &error)) + goto error; + + xdp_dynamic_launcher_complete_install (object, invocation); + return G_DBUS_METHOD_INVOCATION_HANDLED; + +error: + g_dbus_method_invocation_return_gerror (invocation, error); + remove (icon_path); + remove (desktop_path); + remove (link_path); + return G_DBUS_METHOD_INVOCATION_HANDLED; +} + +static XdpOptionKey response_options[] = { + { "name", G_VARIANT_TYPE_STRING, NULL }, + { "icon", G_VARIANT_TYPE_VARIANT, NULL }, + { "token", G_VARIANT_TYPE_UINT32, NULL } +}; + +static gboolean +install_token_timeout (gpointer data) +{ + g_autoptr(GVariant) launcher_data = NULL; + + g_debug ("Revoking install token %s", (char *)data); + launcher_data = get_launcher_data_and_revoke_token ((char *)data); + g_free (data); + + return G_SOURCE_REMOVE; +} + +static void +set_launcher_data_for_token (const char *token, + GVariant *launcher_data) +{ + g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&transient_permissions_lock); + guint timeout_id; + GVariant *launcher_data_wrapped; + + if (!transient_permissions) + { + transient_permissions = g_hash_table_new_full (g_str_hash, g_str_equal, + g_free, (GDestroyNotify)g_variant_unref); + } + + /* Revoke the token if it hasn't been used after 5 minutes, in case of + * client bugs. This is what the GNOME print portal implementation does. + */ + timeout_id = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, 300, install_token_timeout, + g_strdup (token), g_free); + launcher_data_wrapped = g_variant_new ("(vu)", launcher_data, timeout_id); + + g_hash_table_insert (transient_permissions, + g_strdup (token), + g_variant_ref_sink (launcher_data_wrapped)); +} + +static void +prepare_install_done (GObject *source, + GAsyncResult *result, + gpointer data) +{ + g_autoptr(Request) request = data; + GVariant *launcher_data; + guint response = 2; + xdp_autofd int icon_fd = -1; + g_autoptr(GVariant) results = NULL; + g_autoptr(GError) error = NULL; + GVariantBuilder results_builder; + + REQUEST_AUTOLOCK (request); + + g_variant_builder_init (&results_builder, G_VARIANT_TYPE_VARDICT); + + if (!xdp_impl_dynamic_launcher_call_prepare_install_finish (XDP_IMPL_DYNAMIC_LAUNCHER (source), + &response, + &results, + result, + &error)) + { + g_dbus_error_strip_remote_error (error); + g_warning ("Backend call failed: %s", error->message); + goto out; + } + + if (request->exported && response == 0) + { + g_autofree char *token = g_uuid_string_random (); + const char *chosen_name = NULL; + const char *icon_format = NULL; + const char *icon_size = NULL; + GVariant *chosen_icon = NULL; + + icon_format = g_object_get_data (G_OBJECT (request), "icon-format"); + g_assert (icon_format != NULL && icon_format[0] != '\0'); + icon_size = g_object_get_data (G_OBJECT (request), "icon-size"); + g_assert (icon_size != NULL && icon_size[0] != '\0'); + + if (!xdp_filter_options (results, &results_builder, + response_options, G_N_ELEMENTS (response_options), + &error) || + !g_variant_lookup (results, "name", "&s", &chosen_name) || + chosen_name[0] == '\0' || + !g_variant_lookup (results, "icon", "v", &chosen_icon)) + { + g_warning ("Results from backend failed validation: %s", + error ? error->message : "missing entries"); + response = 2; + } + else + { + /* Save the token in memory and return it to the caller */ + launcher_data = g_variant_new ("(svss)", chosen_name, chosen_icon, icon_format, icon_size); + set_launcher_data_for_token (token, launcher_data); + g_variant_builder_add (&results_builder, "{sv}", "token", g_variant_new_string (token)); + } + } + +out: + if (request->exported) + { + xdp_request_emit_response (XDP_REQUEST (request), + response, + g_variant_builder_end (&results_builder)); + + request_unexport (request); + } + else + { + g_variant_builder_clear (&results_builder); + } +} + +static gboolean +validate_url (const char *key, + GVariant *value, + GVariant *options, + GError **error) +{ + const char *url = g_variant_get_string (value, NULL); + g_autoptr(GError) local_error = NULL; + guint32 launcher_type; + + g_variant_lookup (options, "launcher_type", "u", &launcher_type); + if (launcher_type == DYNAMIC_LAUNCHER_TYPE_WEBAPP && + !g_uri_is_valid (url, G_URI_FLAGS_NONE, &local_error)) + { + g_set_error (error, XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, + _("URL given is invalid: %s"), local_error->message); + return FALSE; + } + + return TRUE; +} + +static gboolean +validate_launcher_type (const char *key, + GVariant *value, + GVariant *options, + GError **error) +{ + guint32 launcher_type = g_variant_get_uint32 (value); + g_autoptr(GError) local_error = NULL; + guint32 supported_launcher_types; + + supported_launcher_types = + xdp_dynamic_launcher_get_supported_launcher_types + (XDP_DYNAMIC_LAUNCHER (dynamic_launcher)); + + if (__builtin_popcount (launcher_type) != 1) + { + g_set_error (error, XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, + _("Invalid launcher type: %x"), launcher_type); + return FALSE; + } + + if (!(supported_launcher_types & launcher_type)) + { + g_set_error (error, XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, + _("Unsupported launcher type: %x"), launcher_type); + return FALSE; + } + + return TRUE; +} + +static XdpOptionKey prepare_install_options[] = { + { "modal", G_VARIANT_TYPE_BOOLEAN }, + { "launcher_type", G_VARIANT_TYPE_UINT32, validate_launcher_type }, + { "target", G_VARIANT_TYPE_STRING, validate_url }, + { "editable_name", G_VARIANT_TYPE_BOOLEAN }, + { "editable_icon", G_VARIANT_TYPE_BOOLEAN } +}; + +static gboolean +handle_prepare_install (XdpDynamicLauncher *object, + GDBusMethodInvocation *invocation, + const gchar *arg_parent_window, + const gchar *arg_name, + GVariant *arg_icon_v, + GVariant *arg_options) +{ + Request *request = request_from_invocation (invocation); + const char *app_id = xdp_app_info_get_id (request->app_info); + g_autoptr(GError) error = NULL; + g_autoptr(XdpImplRequest) impl_request = NULL; + GVariantBuilder opt_builder; + g_autofree char *token = NULL; + g_autofree char *icon_format = NULL; + g_autofree char *icon_size = NULL; + g_autoptr(GVariant) icon_v = NULL; + + REQUEST_AUTOLOCK (request); + + impl_request = xdp_impl_request_proxy_new_sync (g_dbus_proxy_get_connection (G_DBUS_PROXY (impl)), + G_DBUS_PROXY_FLAGS_NONE, + g_dbus_proxy_get_name (G_DBUS_PROXY (impl)), + request->id, + NULL, &error); + if (!impl_request) + { + g_dbus_method_invocation_return_gerror (invocation, error); + return G_DBUS_METHOD_INVOCATION_HANDLED; + } + + request_set_impl_request (request, impl_request); + request_export (request, g_dbus_method_invocation_get_connection (invocation)); + + g_variant_builder_init (&opt_builder, G_VARIANT_TYPE_VARDICT); + if (!xdp_filter_options (arg_options, &opt_builder, + prepare_install_options, G_N_ELEMENTS (prepare_install_options), &error)) + { + g_dbus_method_invocation_return_gerror (invocation, error); + return G_DBUS_METHOD_INVOCATION_HANDLED; + } + + /* Do some validation on the icon before passing it along */ + icon_v = g_variant_get_variant (arg_icon_v); + if (!icon_v || !xdp_validate_serialized_icon (icon_v, TRUE /* bytes_only */, + &icon_format, &icon_size)) + { + g_dbus_method_invocation_return_error (invocation, + XDG_DESKTOP_PORTAL_ERROR, + XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, + _("Dynamic launcher icon failed validation")); + return G_DBUS_METHOD_INVOCATION_HANDLED; + } + + g_object_set_data_full (G_OBJECT (request), "icon-format", g_steal_pointer (&icon_format), g_free); + g_object_set_data_full (G_OBJECT (request), "icon-size", g_steal_pointer (&icon_size), g_free); + + xdp_impl_dynamic_launcher_call_prepare_install (impl, + request->id, + app_id, + arg_parent_window, + arg_name, + arg_icon_v, + g_variant_builder_end (&opt_builder), + NULL, /* cancellable */ + prepare_install_done, + g_object_ref (request)); + + xdp_dynamic_launcher_complete_prepare_install (object, invocation, request->id); + + return G_DBUS_METHOD_INVOCATION_HANDLED; +} + +static gboolean +handle_request_install_token (XdpDynamicLauncher *object, + GDBusMethodInvocation *invocation, + const gchar *arg_name, + GVariant *arg_icon_v, + GVariant *arg_options) +{ + Call *call = call_from_invocation (invocation); + const char *app_id = xdp_app_info_get_id (call->app_info); + g_autoptr(GError) error = NULL; + GVariant *launcher_data; + g_autofree char *token = NULL; + g_autofree char *icon_format = NULL; + g_autofree char *icon_size = NULL; + g_autoptr(GVariant) icon_v = NULL; + guint response = 2; + + /* Don't enforce app ID requirements on unsandboxed apps if the app ID + * couldn't be determined. Otherwise the check would fail if for example the + * app was launched from the CLI: + * https://github.com/flatpak/xdg-desktop-portal/pull/719#issuecomment-1057412221 + */ + if (xdp_app_info_is_host (call->app_info) && g_str_equal (app_id, "")) + { + response = 0; + } + else if (!xdp_impl_dynamic_launcher_call_request_install_token_sync (impl, + app_id, + arg_options, + &response, + NULL, /* cancellable */ + &error)) + { + g_dbus_error_strip_remote_error (error); + g_warning ("Backend call failed: %s", error->message); + response = 2; + } + + if (response == 0) + { + /* Do some validation on the icon before saving it */ + icon_v = g_variant_get_variant (arg_icon_v); + if (!icon_v || !xdp_validate_serialized_icon (icon_v, TRUE /* bytes_only */, + &icon_format, &icon_size)) + { + g_dbus_method_invocation_return_error (invocation, + XDG_DESKTOP_PORTAL_ERROR, + XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, + _("Dynamic launcher icon failed validation")); + return G_DBUS_METHOD_INVOCATION_HANDLED; + } + + launcher_data = g_variant_new ("(svss)", arg_name, icon_v, icon_format, icon_size); + token = g_uuid_string_random (); + + /* Save the token in memory and return it to the caller */ + set_launcher_data_for_token (token, launcher_data); + + xdp_dynamic_launcher_complete_request_install_token (object, invocation, token); + } + else + { + g_dbus_method_invocation_return_error (invocation, + XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, + _("RequestInstallToken() not allowed for app id %s"), + xdp_app_info_get_id (call->app_info)); + } + + return G_DBUS_METHOD_INVOCATION_HANDLED; +} + +static gboolean +handle_uninstall (XdpDynamicLauncher *object, + GDBusMethodInvocation *invocation, + const gchar *arg_desktop_file_id, + GVariant *arg_options) +{ + Call *call = call_from_invocation (invocation); + const char *app_id = xdp_app_info_get_id (call->app_info); + g_autoptr(GError) error = NULL; + g_autoptr(GError) desktop_file_error = NULL; + g_autofree char *icon_dir = NULL; + g_autofree char *icon_path = NULL; + g_autofree char *desktop_dir = NULL; + g_autoptr(GFile) icon_file = NULL; + g_autoptr(GFile) desktop_file = NULL; + g_autoptr(GFile) link_file = NULL; + g_autoptr(GKeyFile) desktop_keyfile = NULL; + + if (!validate_desktop_file_id (app_id, arg_desktop_file_id, &error)) + { + g_dbus_method_invocation_return_gerror (invocation, error); + return G_DBUS_METHOD_INVOCATION_HANDLED; + } + + icon_dir = g_build_filename (g_get_user_data_dir (), XDG_PORTAL_ICONS_DIR, NULL); + desktop_dir = g_build_filename (g_get_user_data_dir (), XDG_PORTAL_APPLICATIONS_DIR, NULL); + + link_file = g_file_new_build_filename (g_get_user_data_dir (), "applications", arg_desktop_file_id, NULL); + if (!g_file_delete (link_file, NULL, &error)) + { + if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) + g_info ("Uninstall() method failed because launcher '%s' does not exist", arg_desktop_file_id); + goto error; + } + + desktop_file = g_file_new_build_filename (desktop_dir, arg_desktop_file_id, NULL); + desktop_keyfile = g_key_file_new (); + if (g_key_file_load_from_file (desktop_keyfile, g_file_peek_path (desktop_file), G_KEY_FILE_NONE, NULL)) + icon_path = g_key_file_get_string (desktop_keyfile, G_KEY_FILE_DESKTOP_GROUP, "Icon", NULL); + + g_file_delete (desktop_file, NULL, &desktop_file_error); + + if (icon_path && g_str_has_prefix (icon_path, icon_dir)) + { + icon_file = g_file_new_for_path (icon_path); + if (!g_file_delete (icon_file, NULL, &error)) + goto error; + } + + if (desktop_file_error) + goto error; + + xdp_dynamic_launcher_complete_uninstall (object, invocation); + return G_DBUS_METHOD_INVOCATION_HANDLED; + +error: + g_dbus_method_invocation_return_gerror (invocation, error); + return G_DBUS_METHOD_INVOCATION_HANDLED; +} + +static gboolean +handle_get_desktop_entry (XdpDynamicLauncher *object, + GDBusMethodInvocation *invocation, + const gchar *arg_desktop_file_id) +{ + Call *call = call_from_invocation (invocation); + const char *app_id = xdp_app_info_get_id (call->app_info); + g_autoptr(GError) error = NULL; + g_autofree char *desktop_dir = NULL; + g_autofree char *contents = NULL; + g_autofree char *desktop_path = NULL; + gsize length; + + if (!validate_desktop_file_id (app_id, arg_desktop_file_id, &error)) + goto error; + + desktop_dir = g_build_filename (g_get_user_data_dir (), XDG_PORTAL_APPLICATIONS_DIR, NULL); + + desktop_path = g_build_filename (desktop_dir, arg_desktop_file_id, NULL); + if (!g_file_get_contents (desktop_path, &contents, &length, &error)) + goto error; + if (length > MAX_DESKTOP_SIZE_BYTES) + { + g_set_error (&error, + XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_FAILED, + _("Desktop file exceeds max size (%d): %s"), + MAX_DESKTOP_SIZE_BYTES, arg_desktop_file_id); + goto error; + } + + xdp_dynamic_launcher_complete_get_desktop_entry (object, invocation, contents); + return G_DBUS_METHOD_INVOCATION_HANDLED; + +error: + g_dbus_method_invocation_return_gerror (invocation, error); + return G_DBUS_METHOD_INVOCATION_HANDLED; +} + +static gboolean +handle_get_icon (XdpDynamicLauncher *object, + GDBusMethodInvocation *invocation, + const gchar *arg_desktop_file_id) +{ + Call *call = call_from_invocation (invocation); + const char *app_id = xdp_app_info_get_id (call->app_info); + g_autoptr(GError) error = NULL; + g_autofree char *desktop_dir = NULL; + g_autofree char *contents = NULL; + g_autofree char *desktop_path = NULL; + g_autofree char *icon_dir = NULL; + g_autofree char *icon_path = NULL; + gsize length; + g_autoptr(GKeyFile) key_file = NULL; + g_autoptr(GFile) icon_file = NULL; + g_autoptr(GIcon) icon = NULL; + g_autoptr(GInputStream) stream = NULL; + g_autoptr(GBytes) bytes = NULL; + g_autoptr(GIcon) bytes_icon = NULL; + g_autoptr(GVariant) icon_v = NULL; + const gchar *icon_format = NULL; + int icon_size = 0; + + if (!validate_desktop_file_id (app_id, arg_desktop_file_id, &error)) + goto error; + + desktop_dir = g_build_filename (g_get_user_data_dir (), XDG_PORTAL_APPLICATIONS_DIR, NULL); + icon_dir = g_build_filename (g_get_user_data_dir (), XDG_PORTAL_ICONS_DIR, NULL); + + desktop_path = g_build_filename (desktop_dir, arg_desktop_file_id, NULL); + if (!g_file_get_contents (desktop_path, &contents, &length, &error)) + goto error; + if (length > MAX_DESKTOP_SIZE_BYTES) + { + g_set_error (&error, + XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_FAILED, + _("Desktop file exceeds max size (%d): %s"), + MAX_DESKTOP_SIZE_BYTES, arg_desktop_file_id); + goto error; + } + + key_file = g_key_file_new (); + if (!g_key_file_load_from_data (key_file, contents, -1, G_KEY_FILE_NONE, &error)) + goto error; + + icon_path = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, "Icon", NULL); + if (icon_path && g_str_has_prefix (icon_path, icon_dir)) + { + g_autofree char *icon_dir = NULL; + g_autofree char *icon_dir_basename = NULL; + const char *x; + + if (g_str_has_suffix (icon_path, ".png")) + icon_format = "png"; + else if (g_str_has_suffix (icon_path, ".svg")) + icon_format = "svg"; + else if (g_str_has_suffix (icon_path, ".jpeg") || g_str_has_suffix (icon_path, ".jpg")) + icon_format = "jpeg"; + + /* dir should be either scalable or e.g. 512x512 */ + icon_dir = g_path_get_dirname (icon_path); + icon_dir_basename = g_path_get_basename (icon_dir); + if (g_strcmp0 (icon_dir_basename, "scalable") == 0) { + /* An svg can have a width and height set, but it is probably not + * needed since it can be scaled to any size. + */ + icon_size = 4096; + } else if ((x = strchr (icon_dir_basename, 'x')) != NULL) { + icon_size = atoi (x + 1); + } + } + + if (!icon_format || icon_size <= 0 || icon_size > 4096) + { + g_set_error (&error, + XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_FAILED, + _("Desktop file '%s' icon at unrecognized path"), arg_desktop_file_id); + goto error; + } + + icon_file = g_file_new_for_path (icon_path); + icon = g_file_icon_new (icon_file); + stream = g_loadable_icon_load (G_LOADABLE_ICON (icon), 0, NULL, NULL, NULL); + + /* Icons are usually smaller than 1 MiB. Set a 10 MiB + * limit so we can't use a huge amount of memory or hit + * the D-Bus message size limit + */ + if (stream) + bytes = g_input_stream_read_bytes (stream, 10485760 /* 10 MiB */, NULL, NULL); + if (bytes) + bytes_icon = g_bytes_icon_new (bytes); + if (bytes_icon) + icon_v = g_icon_serialize (bytes_icon); + + if (icon_v == NULL) + { + g_set_error (&error, + XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_FAILED, + _("Desktop file '%s' icon failed to serialize"), arg_desktop_file_id); + goto error; + } + + xdp_dynamic_launcher_complete_get_icon (object, invocation, + g_variant_new_variant (icon_v), + icon_format, icon_size); + return G_DBUS_METHOD_INVOCATION_HANDLED; + +error: + g_dbus_method_invocation_return_gerror (invocation, error); + return G_DBUS_METHOD_INVOCATION_HANDLED; +} + +static gboolean +handle_launch (XdpDynamicLauncher *object, + GDBusMethodInvocation *invocation, + const gchar *arg_desktop_file_id, + GVariant *arg_options) +{ + Call *call = call_from_invocation (invocation); + const char *app_id = xdp_app_info_get_id (call->app_info); + g_autoptr(GError) error = NULL; + g_autofree char *desktop_dir = NULL; + g_autofree char *desktop_path = NULL; + const char *activation_token = NULL; + g_autoptr(GAppLaunchContext) launch_context = NULL; + g_autoptr(GDesktopAppInfo) app_info = NULL; + + if (!validate_desktop_file_id (app_id, arg_desktop_file_id, &error)) + goto error; + + desktop_dir = g_build_filename (g_get_user_data_dir (), XDG_PORTAL_APPLICATIONS_DIR, NULL); + + desktop_path = g_build_filename (desktop_dir, arg_desktop_file_id, NULL); + if (!g_file_test (desktop_path, G_FILE_TEST_EXISTS)) + { + g_set_error (&error, + XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, + _("No dynamic launcher exists with id '%s'"), arg_desktop_file_id); + goto error; + } + + /* Unset env var set in main() */ + launch_context = g_app_launch_context_new (); + g_app_launch_context_unsetenv (launch_context, "GIO_USE_VFS"); + + /* Set activation token for focus stealing prevention */ + g_variant_lookup (arg_options, "activation_token", "&s", &activation_token); + if (activation_token) + g_app_launch_context_setenv (launch_context, "XDG_ACTIVATION_TOKEN", activation_token); + + app_info = g_desktop_app_info_new_from_filename (desktop_path); + if (app_info == NULL) + { + g_set_error (&error, + XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_FAILED, + _("Failed to create GDesktopAppInfo for launcher with id '%s'"), + arg_desktop_file_id); + goto error; + } + + g_debug ("Launching %s", arg_desktop_file_id); + if (!g_app_info_launch (G_APP_INFO (app_info), NULL, launch_context, &error)) + goto error; + + xdp_dynamic_launcher_complete_launch (object, invocation); + return G_DBUS_METHOD_INVOCATION_HANDLED; + +error: + g_dbus_method_invocation_return_gerror (invocation, error); + return G_DBUS_METHOD_INVOCATION_HANDLED; +} + +static void +dynamic_launcher_iface_init (XdpDynamicLauncherIface *iface) +{ + iface->handle_install = handle_install; + iface->handle_prepare_install = handle_prepare_install; + iface->handle_request_install_token = handle_request_install_token; + iface->handle_uninstall = handle_uninstall; + iface->handle_get_desktop_entry = handle_get_desktop_entry; + iface->handle_get_icon = handle_get_icon; + iface->handle_launch = handle_launch; +} + +static void +dynamic_launcher_init (DynamicLauncher *dl) +{ + xdp_dynamic_launcher_set_version (XDP_DYNAMIC_LAUNCHER (dl), 1); + g_object_bind_property (G_OBJECT (impl), "supported-launcher-types", + G_OBJECT (dl), "supported-launcher-types", + G_BINDING_SYNC_CREATE); +} + +static void +dynamic_launcher_class_init (DynamicLauncherClass *klass) +{ +} + +GDBusInterfaceSkeleton * +dynamic_launcher_create (GDBusConnection *connection, + const char *dbus_name) +{ + g_autoptr(GError) error = NULL; + + impl = xdp_impl_dynamic_launcher_proxy_new_sync (connection, + G_DBUS_PROXY_FLAGS_NONE, + dbus_name, + DESKTOP_PORTAL_OBJECT_PATH, + NULL, + &error); + if (impl == NULL) + { + g_warning ("Failed to create dynamic_launcher proxy: %s", error->message); + return NULL; + } + + g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (impl), G_MAXINT); + + dynamic_launcher = g_object_new (dynamic_launcher_get_type (), NULL); + + return G_DBUS_INTERFACE_SKELETON (dynamic_launcher); +} + +#endif /* HAVE_GLIB_2_66 */ diff -Nru xdg-desktop-portal-1.8.1/src/dynamic-launcher.h xdg-desktop-portal-1.14.3/src/dynamic-launcher.h --- xdg-desktop-portal-1.8.1/src/dynamic-launcher.h 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/dynamic-launcher.h 2022-03-29 22:00:20.000000000 +0000 @@ -0,0 +1,35 @@ +/* + * Copyright © 2022 Matthew Leeds + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Authors: + * Matthew Leeds + */ + +#pragma once + +#include "config.h" + +#ifdef HAVE_GLIB_2_66 + +#include + +#define XDG_PORTAL_APPLICATIONS_DIR "xdg-desktop-portal" G_DIR_SEPARATOR_S "applications" +#define XDG_PORTAL_ICONS_DIR "xdg-desktop-portal" G_DIR_SEPARATOR_S "icons" + +GDBusInterfaceSkeleton * dynamic_launcher_create (GDBusConnection *connection, + const char *dbus_name); + +#endif diff -Nru xdg-desktop-portal-1.8.1/src/email.c xdg-desktop-portal-1.14.3/src/email.c --- xdg-desktop-portal-1.8.1/src/email.c 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/email.c 2022-03-29 22:00:20.000000000 +0000 @@ -103,6 +103,7 @@ result, &error)) { + g_dbus_error_strip_remote_error (error); g_warning ("Backend call failed: %s", error->message); } @@ -219,7 +220,7 @@ if (!impl_request) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_variant_builder_init (&options, G_VARIANT_TYPE_VARDICT); @@ -242,10 +243,22 @@ if (fd == -1) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; + } + + path = xdp_app_info_get_path_for_fd (request->app_info, fd, 0, NULL, NULL, &error); + + if (path == NULL) + { + g_debug ("Invalid attachment fd passed: %s", error->message); + + /* Don't leak any info about real file path existence, etc */ + g_dbus_method_invocation_return_error (invocation, + XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, + "Invalid attachment fd passed"); + return G_DBUS_METHOD_INVOCATION_HANDLED; } - path = xdp_app_info_get_path_for_fd (request->app_info, fd, 0, NULL, NULL); g_variant_builder_add (&attachments, "s", path); } @@ -258,7 +271,7 @@ { g_debug ("Returning an error from option filtering"); g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } request_set_impl_request (request, impl_request); @@ -275,7 +288,7 @@ compose_email_done, g_object_ref (request)); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void diff -Nru xdg-desktop-portal-1.8.1/src/file-chooser.c xdg-desktop-portal-1.14.3/src/file-chooser.c --- xdg-desktop-portal-1.8.1/src/file-chooser.c 2021-02-09 20:03:56.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/file-chooser.c 2022-03-29 22:00:20.000000000 +0000 @@ -113,7 +113,11 @@ g_autofree char *ruri = NULL; g_autoptr(GError) error = NULL; - ruri = register_document (uris[i], xdp_app_info_get_id (request->app_info), for_save, writable, directory, &error); + if (xdp_app_info_is_host (request->app_info)) + ruri = g_strdup (uris[i]); + else + ruri = register_document (uris[i], xdp_app_info_get_id (request->app_info), for_save, writable, directory, &error); + if (ruri == NULL) { g_warning ("Failed to register %s: %s", uris[i], error->message); @@ -153,6 +157,7 @@ result, &error)) { + g_dbus_error_strip_remote_error (error); g_warning ("Backend call failed: %s", error->message); } @@ -475,7 +480,7 @@ &error)) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } impl_request = xdp_impl_request_proxy_new_sync (g_dbus_proxy_get_connection (G_DBUS_PROXY (impl)), @@ -486,7 +491,7 @@ if (!impl_request) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } dir_option = g_variant_lookup_value (arg_options, @@ -510,7 +515,7 @@ xdp_file_chooser_complete_open_file (object, invocation, request->id); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static XdpOptionKey save_file_options[] = { @@ -541,6 +546,7 @@ result, &error)) { + g_dbus_error_strip_remote_error (error); g_warning ("Backend call failed: %s", error->message); } @@ -575,7 +581,7 @@ XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, "File saving disabled"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } REQUEST_AUTOLOCK (request); @@ -586,7 +592,7 @@ &error)) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } impl_request = xdp_impl_request_proxy_new_sync (g_dbus_proxy_get_connection (G_DBUS_PROXY (impl)), @@ -597,7 +603,7 @@ if (!impl_request) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_object_set_data (G_OBJECT (request), "for-save", GINT_TO_POINTER (TRUE)); @@ -617,7 +623,7 @@ xdp_file_chooser_complete_open_file (object, invocation, request->id); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static XdpOptionKey save_files_options[] = { @@ -646,6 +652,7 @@ result, &error)) { + g_dbus_error_strip_remote_error (error); g_warning ("Backend call failed: %s", error->message); } @@ -678,7 +685,7 @@ XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, "File saving disabled"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } REQUEST_AUTOLOCK (request); @@ -689,7 +696,7 @@ &error)) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } impl_request = xdp_impl_request_proxy_new_sync (g_dbus_proxy_get_connection (G_DBUS_PROXY (impl)), @@ -700,7 +707,7 @@ if (!impl_request) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_object_set_data (G_OBJECT (request), "for-save", GINT_TO_POINTER (TRUE)); @@ -720,7 +727,7 @@ xdp_file_chooser_complete_open_file (object, invocation, request->id); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void diff -Nru xdg-desktop-portal-1.8.1/src/gamemode.c xdg-desktop-portal-1.14.3/src/gamemode.c --- xdg-desktop-portal-1.8.1/src/gamemode.c 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/gamemode.c 2022-03-29 22:00:20.000000000 +0000 @@ -294,7 +294,7 @@ for (guint i = 0; i < n_pids; i++) pids[0] = (pid_t) call->ids[i]; - ok = xdg_app_info_map_pids (call->app_info, pids, n_pids, &error); + ok = xdp_app_info_map_pids (call->app_info, pids, n_pids, &error); if (!ok) { @@ -321,7 +321,7 @@ /* verify fds are actually pidfds */ fds = g_unix_fd_list_peek_fds (fdlist, &n_pids); - ok = xdg_app_info_pidfds_to_pids (call->app_info, fds, pids, n_pids, &error); + ok = xdp_app_info_pidfds_to_pids (call->app_info, fds, pids, n_pids, &error); if (!ok || !check_pids (pids, n_pids, &error)) { @@ -425,7 +425,7 @@ gint pid) { handle_call_in_thread (object, "QueryStatus", invocation, pid, 0); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -434,7 +434,7 @@ gint pid) { handle_call_in_thread (object, "RegisterGame", invocation, pid, 0); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -443,7 +443,7 @@ gint pid) { handle_call_in_thread (object, "UnregisterGame", invocation, pid, 0); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -457,8 +457,7 @@ invocation, target, requester); - return TRUE; - + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -472,7 +471,7 @@ invocation, target, requester); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -486,7 +485,7 @@ invocation, target, requester); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } /* pidfd based APIs */ @@ -502,7 +501,7 @@ invocation, fd_list); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -517,7 +516,7 @@ invocation, fd_list); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -532,7 +531,7 @@ invocation, fd_list); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } /* public API */ diff -Nru xdg-desktop-portal-1.8.1/src/glib-backports.c xdg-desktop-portal-1.14.3/src/glib-backports.c --- xdg-desktop-portal-1.8.1/src/glib-backports.c 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/glib-backports.c 2022-03-29 22:00:20.000000000 +0000 @@ -0,0 +1,71 @@ +/* + * Copyright © 2014 Red Hat, Inc + * Copyright © 2021 Joshua Lee + * Copyright © 2021 Emmanuel Fleury + * Copyright © 2021 Nelson Ben + * Copyright © 2021 Peter Bloomfield + * Copyright © 2021 Collabora Ltd. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + */ + +#include "config.h" + +#include + +#include "glib-backports.h" + +#if !GLIB_CHECK_VERSION (2, 68, 0) +/* All this code is backported directly from glib */ +guint +g_string_replace (GString *string, + const gchar *find, + const gchar *replace, + guint limit) +{ + gsize f_len, r_len, pos; + gchar *cur, *next; + guint n = 0; + + g_return_val_if_fail (string != NULL, 0); + g_return_val_if_fail (find != NULL, 0); + g_return_val_if_fail (replace != NULL, 0); + + f_len = strlen (find); + r_len = strlen (replace); + cur = string->str; + + while ((next = strstr (cur, find)) != NULL) + { + pos = next - string->str; + g_string_erase (string, pos, f_len); + g_string_insert (string, pos, replace); + cur = string->str + pos + r_len; + n++; + /* Only match the empty string once at any given position, to + * avoid infinite loops */ + if (f_len == 0) + { + if (cur[0] == '\0') + break; + else + cur++; + } + if (n == limit) + break; + } + + return n; +} +#endif /* GLIB_CHECK_VERSION (2, 68, 0) */ diff -Nru xdg-desktop-portal-1.8.1/src/glib-backports.h xdg-desktop-portal-1.14.3/src/glib-backports.h --- xdg-desktop-portal-1.8.1/src/glib-backports.h 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/glib-backports.h 2022-03-29 22:00:20.000000000 +0000 @@ -0,0 +1,53 @@ +/* + * Copyright © 2014, 2016 Red Hat, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Authors: + * Alexander Larsson + * Matthias Clasen + */ + +#pragma once + +#include + +#ifndef G_DBUS_METHOD_INVOCATION_HANDLED +#define G_DBUS_METHOD_INVOCATION_HANDLED TRUE +#define G_DBUS_METHOD_INVOCATION_UNHANDLED FALSE +#endif + +#if !GLIB_CHECK_VERSION (2, 58, 0) +static inline gboolean +g_hash_table_steal_extended (GHashTable *hash_table, + gconstpointer lookup_key, + gpointer *stolen_key, + gpointer *stolen_value) +{ + if (g_hash_table_lookup_extended (hash_table, lookup_key, stolen_key, stolen_value)) + { + g_hash_table_steal (hash_table, lookup_key); + return TRUE; + } + else + return FALSE; +} +#endif + +#if !GLIB_CHECK_VERSION (2, 68, 0) +guint g_string_replace (GString *string, + const gchar *find, + const gchar *replace, + guint limit); +#endif diff -Nru xdg-desktop-portal-1.8.1/src/inhibit.c xdg-desktop-portal-1.14.3/src/inhibit.c --- xdg-desktop-portal-1.8.1/src/inhibit.c 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/inhibit.c 2022-03-29 22:00:20.000000000 +0000 @@ -77,7 +77,11 @@ REQUEST_AUTOLOCK (request); if (!xdp_impl_inhibit_call_inhibit_finish (impl, result, &error)) - response = 2; + { + g_dbus_error_strip_remote_error (error); + g_warning ("A backend call failed: %s", error->message); + response = 2; + } if (request->exported) { @@ -205,7 +209,7 @@ XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, "Invalid flags"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_variant_builder_init (&opt_builder, G_VARIANT_TYPE_VARDICT); @@ -227,7 +231,7 @@ if (!impl_request) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } request_set_impl_request (request, impl_request); @@ -239,7 +243,7 @@ xdp_inhibit_complete_inhibit (object, invocation, request->id); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } typedef struct _InhibitSession @@ -342,6 +346,7 @@ if (!xdp_impl_inhibit_call_create_monitor_finish (impl, &response, res, &error)) { + g_dbus_error_strip_remote_error (error); g_warning ("A backend call failed: %s", error->message); should_close_session = TRUE; goto out; @@ -407,7 +412,7 @@ if (!impl_request) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } request_set_impl_request (request, impl_request); @@ -417,7 +422,7 @@ if (!session) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_object_set_data_full (G_OBJECT (request), "session", g_object_ref (session), g_object_unref); @@ -433,7 +438,7 @@ xdp_inhibit_complete_create_monitor (object, invocation, request->id); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -449,13 +454,13 @@ G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } xdp_impl_inhibit_call_query_end_response (impl, session->id, NULL, NULL, NULL); xdp_inhibit_complete_query_end_response (object, invocation); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } diff -Nru xdg-desktop-portal-1.8.1/src/location.c xdg-desktop-portal-1.14.3/src/location.c --- xdg-desktop-portal-1.8.1/src/location.c 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/location.c 2022-03-29 22:00:20.000000000 +0000 @@ -322,13 +322,14 @@ } static gboolean -get_location_permissions (const char *app_id, +get_location_permissions (XdpAppInfo *app_info, GClueAccuracyLevel *accuracy, gint64 *last_used) { + const char *app_id = xdp_app_info_get_id (app_info); g_auto(GStrv) perms = NULL; - if (app_id == NULL || app_id[0] == '\0') + if (xdp_app_info_is_host (app_info)) { /* unsandboxed */ *accuracy = GCLUE_ACCURACY_LEVEL_EXACT; @@ -420,14 +421,14 @@ XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, "Location services disabled"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } session = location_session_new (arg_options, invocation, &error); if (!session) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } if (g_variant_lookup (arg_options, "distance-threshold", "u", &threshold)) @@ -440,13 +441,13 @@ session->accuracy = GCLUE_ACCURACY_LEVEL_NONE; else if (accuracy == 1) session->accuracy = GCLUE_ACCURACY_LEVEL_COUNTRY; - else if (accuracy == 4) + else if (accuracy == 2) session->accuracy = GCLUE_ACCURACY_LEVEL_CITY; - else if (accuracy == 5) + else if (accuracy == 3) session->accuracy = GCLUE_ACCURACY_LEVEL_NEIGHBORHOOD; - else if (accuracy == 6) + else if (accuracy == 4) session->accuracy = GCLUE_ACCURACY_LEVEL_STREET; - else if (accuracy == 8) + else if (accuracy == 5) session->accuracy = GCLUE_ACCURACY_LEVEL_EXACT; else { @@ -454,7 +455,7 @@ XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, "Invalid accuracy level"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } } @@ -471,7 +472,7 @@ xdp_location_complete_create_session (object, invocation, ((Session *)session)->id); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } /*** Start ***/ @@ -503,7 +504,7 @@ app_id = xdp_app_info_get_id (request->app_info); - if (!get_location_permissions (app_id, &accuracy, &last_used)) + if (!get_location_permissions (request->app_info, &accuracy, &last_used)) { guint access_response = 2; g_autoptr(GVariant) access_results = NULL; @@ -638,7 +639,7 @@ XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, "Location services disabled"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } REQUEST_AUTOLOCK (request); @@ -650,7 +651,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } SESSION_AUTOLOCK_UNREF (session); @@ -666,13 +667,13 @@ G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Can only start once"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; case LOCATION_SESSION_STATE_CLOSED: g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } request_export (request, g_dbus_method_invocation_get_connection (invocation)); @@ -692,7 +693,7 @@ g_task_set_task_data (task, g_object_ref (request), g_object_unref); g_task_run_in_thread (task, handle_start_in_thread_func); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } /************/ diff -Nru xdg-desktop-portal-1.8.1/src/Makefile.am.inc xdg-desktop-portal-1.14.3/src/Makefile.am.inc --- xdg-desktop-portal-1.8.1/src/Makefile.am.inc 2020-03-21 18:37:54.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/Makefile.am.inc 2022-03-29 22:00:20.000000000 +0000 @@ -1,70 +1,24 @@ libexec_PROGRAMS += \ xdg-desktop-portal \ + xdg-desktop-portal-validate-icon \ + xdg-desktop-portal-rewrite-launchers \ $(NULL) service_in_files += \ src/org.freedesktop.portal.Desktop.service.in \ src/xdg-desktop-portal.service.in \ + src/xdg-desktop-portal-rewrite-launchers.service.in \ ${NULL} dbus_service_DATA += src/org.freedesktop.portal.Desktop.service systemduserunit_DATA += src/xdg-desktop-portal.service +systemduserunit_DATA += src/xdg-desktop-portal-rewrite-launchers.service xdp_dbus_built_sources = src/xdp-dbus.c src/xdp-dbus.h xdp_impl_dbus_built_sources = src/xdp-impl-dbus.c src/xdp-impl-dbus.h geoclue_built_sources = src/geoclue-dbus.c src/geoclue-dbus.h BUILT_SOURCES += $(xdp_dbus_built_sources) $(xdp_impl_dbus_built_sources) $(geoclue_built_sources) -PORTAL_IFACE_FILES =\ - data/org.freedesktop.portal.Documents.xml \ - data/org.freedesktop.portal.Request.xml \ - data/org.freedesktop.portal.Session.xml \ - data/org.freedesktop.portal.FileChooser.xml \ - data/org.freedesktop.portal.Trash.xml \ - data/org.freedesktop.portal.OpenURI.xml \ - data/org.freedesktop.portal.Print.xml \ - data/org.freedesktop.portal.MemoryMonitor.xml \ - data/org.freedesktop.portal.NetworkMonitor.xml \ - data/org.freedesktop.portal.ProxyResolver.xml \ - data/org.freedesktop.portal.Screenshot.xml \ - data/org.freedesktop.portal.Notification.xml \ - data/org.freedesktop.portal.Inhibit.xml \ - data/org.freedesktop.portal.Device.xml \ - data/org.freedesktop.portal.Account.xml \ - data/org.freedesktop.portal.Email.xml \ - data/org.freedesktop.portal.ScreenCast.xml \ - data/org.freedesktop.portal.RemoteDesktop.xml \ - data/org.freedesktop.portal.Location.xml \ - data/org.freedesktop.portal.Settings.xml \ - data/org.freedesktop.portal.Background.xml \ - data/org.freedesktop.portal.GameMode.xml \ - data/org.freedesktop.portal.Camera.xml \ - data/org.freedesktop.portal.Secret.xml \ - data/org.freedesktop.portal.Wallpaper.xml \ - $(NULL) - -PORTAL_IMPL_IFACE_FILES =\ - data/org.freedesktop.impl.portal.PermissionStore.xml \ - data/org.freedesktop.impl.portal.Request.xml \ - data/org.freedesktop.impl.portal.Session.xml \ - data/org.freedesktop.impl.portal.FileChooser.xml \ - data/org.freedesktop.impl.portal.AppChooser.xml \ - data/org.freedesktop.impl.portal.Print.xml \ - data/org.freedesktop.impl.portal.Screenshot.xml \ - data/org.freedesktop.impl.portal.Notification.xml \ - data/org.freedesktop.impl.portal.Inhibit.xml \ - data/org.freedesktop.impl.portal.Access.xml \ - data/org.freedesktop.impl.portal.Account.xml \ - data/org.freedesktop.impl.portal.Email.xml \ - data/org.freedesktop.impl.portal.ScreenCast.xml \ - data/org.freedesktop.impl.portal.RemoteDesktop.xml \ - data/org.freedesktop.impl.portal.Settings.xml \ - data/org.freedesktop.impl.portal.Lockdown.xml \ - data/org.freedesktop.impl.portal.Background.xml \ - data/org.freedesktop.impl.portal.Secret.xml \ - data/org.freedesktop.impl.portal.Wallpaper.xml \ - $(NULL) - $(xdp_dbus_built_sources) : $(PORTAL_IFACE_FILES) $(AM_V_GEN) $(GDBUS_CODEGEN) \ --interface-prefix org.freedesktop.portal. \ @@ -118,6 +72,8 @@ src/xdg-desktop-portal.c \ src/file-chooser.c \ src/file-chooser.h \ + src/glib-backports.c \ + src/glib-backports.h \ src/open-uri.c \ src/open-uri.h \ src/print.c \ @@ -126,28 +82,34 @@ src/memory-monitor.h \ src/network-monitor.c \ src/network-monitor.h \ + src/power-profile-monitor.c \ + src/power-profile-monitor.h \ src/proxy-resolver.c \ src/proxy-resolver.h \ src/screenshot.c \ src/screenshot.h \ - src/notification.c \ - src/notification.h \ - src/inhibit.c \ - src/inhibit.h \ - src/device.c \ - src/device.h \ - src/account.c \ - src/account.h \ + src/notification.c \ + src/notification.h \ + src/inhibit.c \ + src/inhibit.h \ + src/device.c \ + src/device.h \ + src/account.c \ + src/account.h \ + src/realtime.c \ + src/realtime.h \ + src/dynamic-launcher.c \ + src/dynamic-launcher.h \ src/request.c \ src/request.h \ src/call.c \ src/call.h \ - src/documents.c \ - src/documents.h \ - src/permissions.c \ - src/permissions.h \ - src/email.c \ - src/email.h \ + src/documents.c \ + src/documents.h \ + src/permissions.c \ + src/permissions.h \ + src/email.c \ + src/email.h \ src/settings.c \ src/settings.h \ src/session.c \ @@ -164,12 +126,19 @@ src/gamemode.h \ src/secret.c \ src/secret.h \ - src/flatpak-instance.c \ - src/flatpak-instance.h \ + src/flatpak-instance.c \ + src/flatpak-instance.h \ src/portal-impl.h \ src/portal-impl.c \ $(NULL) +if HAVE_LIBSYSTEMD +xdg_desktop_portal_SOURCES += \ + src/sd-escape.c \ + src/sd-escape.h \ + $(NULL) +endif + if HAVE_PIPEWIRE xdg_desktop_portal_SOURCES += \ src/screen-cast.c \ @@ -194,6 +163,7 @@ $(BASE_LIBS) \ $(PIPEWIRE_LIBS) \ $(GEOCLUE_LIBS) \ + $(SYSTEMD_LIBS) \ $(NULL) xdg_desktop_portal_CFLAGS = \ -DDATADIR=\"$(datadir)\" \ @@ -202,6 +172,7 @@ $(BASE_CFLAGS) \ $(PIPEWIRE_CFLAGS) \ $(GEOCLUE_CFLAGS) \ + $(SYSTEMD_CFLAGS) \ -I$(srcdir)/src \ -I$(builddir)/src \ -I$(srcdir)/document-portal \ @@ -210,3 +181,16 @@ -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \ -DLOCALEDIR=\"$(localedir)\" \ $(NULL) + +xdg_desktop_portal_validate_icon_SOURCES = src/validate-icon.c +xdg_desktop_portal_validate_icon_LDADD = $(GDK_PIXBUF_LIBS) +xdg_desktop_portal_validate_icon_CFLAGS = $(GDK_PIXBUF_CFLAGS) -DHELPER=\"$(BWRAP)\" -D_GNU_SOURCE=1 + +xdg_desktop_portal_rewrite_launchers_SOURCES = src/rewrite-launchers.c +nodist_xdg_desktop_portal_rewrite_launchers_SOURCES = \ + src/dynamic-launcher.h \ + src/glib-backports.c \ + src/glib-backports.h \ + $(NULL) +xdg_desktop_portal_rewrite_launchers_LDADD = $(BASE_LIBS) +xdg_desktop_portal_rewrite_launchers_CFLAGS = $(BASE_CFLAGS) diff -Nru xdg-desktop-portal-1.8.1/src/network-monitor.c xdg-desktop-portal-1.14.3/src/network-monitor.c --- xdg-desktop-portal-1.8.1/src/network-monitor.c 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/network-monitor.c 2022-03-29 22:00:20.000000000 +0000 @@ -72,7 +72,7 @@ g_dbus_method_invocation_return_value (invocation, g_variant_new ("(b)", available)); } - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -96,7 +96,7 @@ g_dbus_method_invocation_return_value (invocation, g_variant_new ("(b)", metered)); } - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -120,7 +120,7 @@ g_dbus_method_invocation_return_value (invocation, g_variant_new ("(u)", connectivity)); } - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -156,7 +156,7 @@ g_dbus_method_invocation_return_value (invocation, g_variant_new ("(a{sv})", &status)); } - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void @@ -197,7 +197,7 @@ g_network_monitor_can_reach_async (nm->monitor, address, NULL, can_reach_done, g_object_ref (invocation)); } - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void diff -Nru xdg-desktop-portal-1.8.1/src/notification.c xdg-desktop-portal-1.14.3/src/notification.c --- xdg-desktop-portal-1.8.1/src/notification.c 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/notification.c 2022-03-29 22:00:20.000000000 +0000 @@ -29,7 +29,6 @@ #include "request.h" #include "permissions.h" #include "xdp-dbus.h" -#include "xdp-dbus.h" #include "xdp-utils.h" #define PERMISSION_TABLE "notifications" @@ -114,6 +113,7 @@ if (!xdp_impl_notification_call_add_notification_finish (impl, result, &error)) { + g_dbus_error_strip_remote_error (error); g_warning ("Backend call failed: %s", error->message); } else @@ -344,96 +344,6 @@ return TRUE; } -static void -cleanup_temp_file (void *p) -{ - void **pp = (void **)p; - - if (*pp) - remove (*pp); - g_free (*pp); -} - -static gboolean -validate_icon_more (GVariant *v) -{ - g_autoptr(GIcon) icon = g_icon_deserialize (v); - GBytes *bytes; - __attribute__((cleanup(cleanup_temp_file))) char *name = NULL; - int fd = -1; - g_autoptr(GOutputStream) stream = NULL; - gssize written; - int status; - g_autofree char *err = NULL; - g_autoptr(GError) error = NULL; - const char *icon_validator = LIBEXECDIR "/flatpak-validate-icon"; - const char *args[6]; - - if (G_IS_THEMED_ICON (icon)) - { - g_autofree char *a = g_strjoinv (" ", (char **)g_themed_icon_get_names (G_THEMED_ICON (icon))); - g_debug ("Icon validation: themed icon (%s) is ok", a); - return TRUE; - } - - if (!G_IS_BYTES_ICON (icon)) - { - g_warning ("Unexpected icon type: %s", G_OBJECT_TYPE_NAME (icon)); - return FALSE; - } - - if (!g_file_test (icon_validator, G_FILE_TEST_EXISTS)) - { - g_debug ("Icon validation: %s not found, accepting icon without further validation.", icon_validator); - return TRUE; - } - - bytes = g_bytes_icon_get_bytes (G_BYTES_ICON (icon)); - fd = g_file_open_tmp ("iconXXXXXX", &name, &error); - if (fd == -1) - { - g_debug ("Icon validation: %s", error->message); - return FALSE; - } - - stream = g_unix_output_stream_new (fd, TRUE); - written = g_output_stream_write_bytes (stream, bytes, NULL, &error); - if (written < g_bytes_get_size (bytes)) - { - g_debug ("Icon validation: %s", error->message); - return FALSE; - } - - if (!g_output_stream_close (stream, NULL, &error)) - { - g_debug ("Icon validation: %s", error->message); - return FALSE; - } - - args[0] = icon_validator; - args[1] = "--sandbox"; - args[2] = "512"; - args[3] = "512"; - args[4] = name; - args[5] = NULL; - - if (!g_spawn_sync (NULL, (char **)args, NULL, 0, NULL, NULL, NULL, &err, &status, &error)) - { - g_debug ("Icon validation: %s", error->message); - - return FALSE; - } - - if (!g_spawn_check_exit_status (status, &error)) - { - g_debug ("Icon validation: %s", error->message); - - return FALSE; - } - - return TRUE; -} - static GVariant * maybe_remove_icon (GVariant *notification) { @@ -447,7 +357,7 @@ g_autoptr(GVariant) value = NULL; g_variant_get_child (notification, i, "{&sv}", &key, &value); - if (strcmp (key, "icon") != 0 || validate_icon_more (value)) + if (strcmp (key, "icon") != 0 || xdp_validate_serialized_icon (value, FALSE, NULL, NULL)) g_variant_builder_add (&n, "{sv}", key, value); } @@ -501,7 +411,7 @@ { g_prefix_error (&error, "invalid notification: "); g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } task = g_task_new (object, NULL, NULL, NULL); @@ -510,7 +420,7 @@ xdp_notification_complete_add_notification (object, invocation); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void @@ -523,6 +433,7 @@ if (!xdp_impl_notification_call_remove_notification_finish (impl, result, &error)) { + g_dbus_error_strip_remote_error (error); g_warning ("Backend call failed: %s", error->message); } else @@ -555,7 +466,7 @@ xdp_notification_complete_remove_notification (object, invocation); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void diff -Nru xdg-desktop-portal-1.8.1/src/open-uri.c xdg-desktop-portal-1.14.3/src/open-uri.c --- xdg-desktop-portal-1.8.1/src/open-uri.c 2021-02-09 20:03:56.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/open-uri.c 2022-03-29 22:00:20.000000000 +0000 @@ -43,6 +43,12 @@ #include "permissions.h" #include "documents.h" +#define FILE_MANAGER_DBUS_NAME "org.freedesktop.FileManager1" +#define FILE_MANAGER_DBUS_IFACE "org.freedesktop.FileManager1" +#define FILE_MANAGER_DBUS_PATH "/org/freedesktop/FileManager1" + +#define FILE_MANAGER_SHOW_ITEMS "ShowItems" + #define PERMISSION_TABLE "desktop-used-apps" #define DEFAULT_THRESHOLD 3 @@ -227,6 +233,7 @@ const char *uri, const char *parent_window, gboolean writable, + const char *activation_token, GError **error) { g_autofree char *desktop_id = g_strconcat (choice_id, ".desktop", NULL); @@ -263,6 +270,9 @@ g_app_launch_context_setenv (context, "PARENT_WINDOW_ID", parent_window); + if (activation_token) + g_app_launch_context_setenv (context, "XDG_ACTIVATION_TOKEN", activation_token); + uris.data = (gpointer)ruri; uris.next = NULL; @@ -311,7 +321,7 @@ in_permissions[PERM_APP_COUNT], in_permissions[PERM_APP_THRESHOLD]); - + if (!xdp_impl_permission_store_call_set_permission_sync (get_permission_store (), PERMISSION_TABLE, TRUE, @@ -355,6 +365,7 @@ const char *parent_window; gboolean writable; const char *content_type; + const char *activation_token = NULL; g_debug ("Received choice %s", choice); @@ -363,7 +374,9 @@ writable = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (request), "writable")); content_type = (const char *)g_object_get_data (G_OBJECT (request), "content-type"); - if (launch_application_with_uri (choice, uri, parent_window, writable, NULL)) + g_variant_lookup (options, "activation_token", "&s", &activation_token); + + if (launch_application_with_uri (choice, uri, parent_window, writable, activation_token, NULL)) update_permissions_store (xdp_app_info_get_id (request->app_info), content_type, choice); } @@ -392,6 +405,7 @@ result, &error)) { + g_dbus_error_strip_remote_error (error); g_warning ("Backend call failed: %s", error->message); } @@ -572,6 +586,7 @@ Request *request = (Request *)task_data; const char *parent_window; const char *app_id = xdp_app_info_get_id (request->app_info); + const char *activation_token; g_autofree char *uri = NULL; g_autoptr(XdpImplRequest) impl_request = NULL; g_autofree char *default_app = NULL; @@ -599,6 +614,7 @@ writable = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (request), "writable")); ask = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (request), "ask")); open_dir = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (request), "open-dir")); + activation_token = (const char *)g_object_get_data (G_OBJECT (request), "activation-token"); REQUEST_AUTOLOCK (request); @@ -639,24 +655,26 @@ { g_autofree char *path = NULL; gboolean fd_is_writable; + g_autoptr(GError) local_error = NULL; - path = xdp_app_info_get_path_for_fd (request->app_info, fd, 0, NULL, &fd_is_writable); + path = xdp_app_info_get_path_for_fd (request->app_info, fd, 0, NULL, &fd_is_writable, &local_error); if (path == NULL || (writable && !fd_is_writable) || (!xdp_app_info_is_host (request->app_info) && !writable && fd_is_writable)) { /* Reject the request */ + if (path == NULL) + { + g_debug ("Rejecting open request: %s", local_error->message); + } + else + { + g_debug ("Rejecting open request for %s as opening %swritable but fd is %swritable", + path, writable ? "" : "not ", fd_is_writable ? "" : "not "); + } + if (request->exported) { - if (path == NULL) - { - g_debug ("Rejecting open request as fd has no path associated to it"); - } - else - { - g_debug ("Rejecting open request for %s as opening %swritable but fd is %swritable", - path, writable ? "" : "not ", fd_is_writable ? "" : "not "); - } g_variant_builder_init (&opts_builder, G_VARIANT_TYPE_VARDICT); xdp_request_emit_response (XDP_REQUEST (request), XDG_DESKTOP_PORTAL_RESPONSE_OTHER, @@ -668,9 +686,56 @@ if (open_dir) { - char *dir = g_path_get_dirname (path); + g_autofree char *real_path = get_real_path_for_doc_path (path, request->app_info); + /* Try opening the directory via the file manager interface, then + fall back to a plain URI open */ + g_autoptr(GError) local_error = NULL; + g_autoptr(GVariant) result = NULL; + g_autoptr(GVariantBuilder) uris_builder = NULL; + g_autofree char* item_uri = g_filename_to_uri (real_path, NULL, NULL); + g_autoptr(GDBusConnection) bus = NULL; + + bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &local_error); + + uris_builder = g_variant_builder_new (G_VARIANT_TYPE ("as")); + g_variant_builder_add (uris_builder, "s", item_uri); + + if (bus) + result = g_dbus_connection_call_sync (bus, + FILE_MANAGER_DBUS_NAME, + FILE_MANAGER_DBUS_PATH, + FILE_MANAGER_DBUS_IFACE, + FILE_MANAGER_SHOW_ITEMS, + g_variant_new ("(ass)", uris_builder, ""), + NULL, /* ignore returned type */ + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + &local_error); + + if (result == NULL) + { + if (g_error_matches (local_error, G_DBUS_ERROR, + G_DBUS_ERROR_NAME_HAS_NO_OWNER) || + g_error_matches (local_error, G_DBUS_ERROR, + G_DBUS_ERROR_SERVICE_UNKNOWN)) + g_debug ("No " FILE_MANAGER_DBUS_NAME " available"); + else + g_warning ("Failed to call " FILE_MANAGER_SHOW_ITEMS ": %s", + local_error->message); + } + else + { + g_variant_builder_init (&opts_builder, G_VARIANT_TYPE_VARDICT); + xdp_request_emit_response (XDP_REQUEST (request), + XDG_DESKTOP_PORTAL_RESPONSE_SUCCESS, + g_variant_builder_end (&opts_builder)); + request_unexport (request); + return; + } + g_free (path); - path = dir; + path = g_path_get_dirname (real_path); } get_content_type_for_file (path, &content_type); @@ -680,6 +745,7 @@ uri = g_filename_to_uri (path, NULL, NULL); g_object_set_data_full (G_OBJECT (request), "uri", g_strdup (uri), g_free); close (fd); + fd = -1; g_object_set_data (G_OBJECT (request), "fd", GINT_TO_POINTER (-1)); } @@ -762,7 +828,7 @@ g_debug ("Skipping app chooser"); - gboolean result = launch_application_with_uri (app, uri, parent_window, writable, &error); + gboolean result = launch_application_with_uri (app, uri, parent_window, writable, activation_token, &error); if (request->exported) { if (!result) @@ -792,6 +858,8 @@ g_variant_builder_add (&opts_builder, "{sv}", "filename", g_variant_new_string (basename)); if (uri) g_variant_builder_add (&opts_builder, "{sv}", "uri", g_variant_new_string (uri)); + if (activation_token) + g_variant_builder_add (&opts_builder, "{sv}", "activation_token", g_variant_new_string (uri)); impl_request = xdp_impl_request_proxy_new_sync (g_dbus_proxy_get_connection (G_DBUS_PROXY (impl)), G_DBUS_PROXY_FLAGS_NONE, @@ -827,6 +895,7 @@ g_autoptr(GTask) task = NULL; gboolean writable; gboolean ask; + const char *activation_token = NULL; if (xdp_impl_lockdown_get_disable_application_handlers (lockdown)) { @@ -835,7 +904,7 @@ XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, "Application handlers disabled"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } if (!g_variant_lookup (arg_options, "writable", "b", &writable)) @@ -844,12 +913,17 @@ if (!g_variant_lookup (arg_options, "ask", "b", &ask)) ask = FALSE; + g_variant_lookup (arg_options, "activation_token", "&s", &activation_token); + g_object_set_data (G_OBJECT (request), "fd", GINT_TO_POINTER (-1)); g_object_set_data_full (G_OBJECT (request), "uri", g_strdup (arg_uri), g_free); g_object_set_data_full (G_OBJECT (request), "parent-window", g_strdup (arg_parent_window), g_free); g_object_set_data (G_OBJECT (request), "writable", GINT_TO_POINTER (writable)); g_object_set_data (G_OBJECT (request), "ask", GINT_TO_POINTER (ask)); + if (activation_token) + g_object_set_data_full (G_OBJECT (request), "activation-token", g_strdup (activation_token), g_free); + request_export (request, g_dbus_method_invocation_get_connection (invocation)); xdp_open_uri_complete_open_uri (object, invocation, request->id); @@ -857,7 +931,7 @@ g_task_set_task_data (task, g_object_ref (request), g_object_unref); g_task_run_in_thread (task, handle_open_in_thread_func); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -873,6 +947,7 @@ gboolean writable; gboolean ask; int fd_id, fd; + const char *activation_token = NULL; g_autoptr(GError) error = NULL; if (xdp_impl_lockdown_get_disable_application_handlers (lockdown)) @@ -882,7 +957,7 @@ XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, "Application handlers disabled"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } if (!g_variant_lookup (arg_options, "writable", "b", &writable)) @@ -896,14 +971,19 @@ if (fd == -1) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } + g_variant_lookup (arg_options, "activation_token", "&s", &activation_token); + g_object_set_data (G_OBJECT (request), "fd", GINT_TO_POINTER (fd)); g_object_set_data_full (G_OBJECT (request), "parent-window", g_strdup (arg_parent_window), g_free); g_object_set_data (G_OBJECT (request), "writable", GINT_TO_POINTER (writable)); g_object_set_data (G_OBJECT (request), "ask", GINT_TO_POINTER (ask)); + if (activation_token) + g_object_set_data_full (G_OBJECT (request), "activation-token", g_strdup (activation_token), g_free); + request_export (request, g_dbus_method_invocation_get_connection (invocation)); xdp_open_uri_complete_open_file (object, invocation, NULL, request->id); @@ -911,7 +991,7 @@ g_task_set_task_data (task, g_object_ref (request), g_object_unref); g_task_run_in_thread (task, handle_open_in_thread_func); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -925,6 +1005,7 @@ Request *request = request_from_invocation (invocation); g_autoptr(GTask) task = NULL; int fd_id, fd; + const char *activation_token = NULL; g_autoptr(GError) error = NULL; if (xdp_impl_lockdown_get_disable_application_handlers (lockdown)) @@ -934,7 +1015,7 @@ XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, "Application handlers disabled"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_variant_get (arg_fd, "h", &fd_id); @@ -942,15 +1023,20 @@ if (fd == -1) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } + g_variant_lookup (arg_options, "activation_token", "&s", &activation_token); + g_object_set_data (G_OBJECT (request), "fd", GINT_TO_POINTER (fd)); g_object_set_data_full (G_OBJECT (request), "parent-window", g_strdup (arg_parent_window), g_free); g_object_set_data (G_OBJECT (request), "writable", GINT_TO_POINTER (0)); g_object_set_data (G_OBJECT (request), "ask", GINT_TO_POINTER (0)); g_object_set_data (G_OBJECT (request), "open-dir", GINT_TO_POINTER (1)); + if (activation_token) + g_object_set_data_full (G_OBJECT (request), "activation-token", g_strdup (activation_token), g_free); + request_export (request, g_dbus_method_invocation_get_connection (invocation)); xdp_open_uri_complete_open_file (object, invocation, NULL, request->id); @@ -958,7 +1044,7 @@ g_task_set_task_data (task, g_object_ref (request), g_object_unref); g_task_run_in_thread (task, handle_open_in_thread_func); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void @@ -970,9 +1056,9 @@ } static void -open_uri_init (OpenURI *fc) +open_uri_init (OpenURI *openuri) { - xdp_open_uri_set_version (XDP_OPEN_URI (fc), 3); + xdp_open_uri_set_version (XDP_OPEN_URI (openuri), 3); } static void diff -Nru xdg-desktop-portal-1.8.1/src/pipewire.c xdg-desktop-portal-1.14.3/src/pipewire.c --- xdg-desktop-portal-1.8.1/src/pipewire.c 2020-09-14 17:03:38.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/pipewire.c 2022-03-28 18:02:35.000000000 +0000 @@ -25,6 +25,8 @@ #include "pipewire.h" +#define ROUNDTRIP_TIMEOUT_SECS 10 + typedef struct _PipeWireSource { GSource base; @@ -86,11 +88,38 @@ .global_remove = registry_event_global_remove, }; +static void +on_roundtrip_timeout (void *user_data, + uint64_t expirations) +{ + PipeWireRemote *remote = user_data; + + g_warning ("PipeWire roundtrip timed out waiting for events"); + pw_main_loop_quit (remote->loop); +} + void pipewire_remote_roundtrip (PipeWireRemote *remote) { + struct timespec roundtrip_timeout_spec = { ROUNDTRIP_TIMEOUT_SECS, 0 }; + remote->sync_seq = pw_core_sync (remote->core, PW_ID_CORE, remote->sync_seq); + + /* Arm the roundtrip timeout before running the main loop, then clear it + right afterwards. */ + pw_loop_update_timer (pw_main_loop_get_loop (remote->loop), + remote->roundtrip_timeout, + &roundtrip_timeout_spec, + NULL, + FALSE); + pw_main_loop_run (remote->loop); + + pw_loop_update_timer (pw_main_loop_get_loop (remote->loop), + remote->roundtrip_timeout, + NULL, + NULL, + FALSE); } static gboolean @@ -210,6 +239,12 @@ void pipewire_remote_destroy (PipeWireRemote *remote) { + if (remote->roundtrip_timeout != NULL) + { + struct pw_loop *loop = pw_main_loop_get_loop (remote->loop); + pw_loop_destroy_source (loop, g_steal_pointer (&remote->roundtrip_timeout)); + } + g_clear_pointer (&remote->globals, g_hash_table_destroy); g_clear_pointer (&remote->core, pw_core_disconnect); g_clear_pointer (&remote->context, pw_context_destroy); @@ -300,6 +335,10 @@ return NULL; } + remote->roundtrip_timeout = pw_loop_add_timer (pw_main_loop_get_loop (remote->loop), + on_roundtrip_timeout, + remote); + remote->globals = g_hash_table_new_full (NULL, NULL, NULL, g_free); pw_core_add_listener (remote->core, diff -Nru xdg-desktop-portal-1.8.1/src/pipewire.h xdg-desktop-portal-1.14.3/src/pipewire.h --- xdg-desktop-portal-1.8.1/src/pipewire.h 2020-03-13 12:38:10.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/pipewire.h 2022-03-28 18:02:35.000000000 +0000 @@ -47,6 +47,8 @@ struct pw_core *core; struct spa_hook core_listener; + struct spa_source *roundtrip_timeout; + int sync_seq; struct spa_hook registry_listener; diff -Nru xdg-desktop-portal-1.8.1/src/portal-impl.c xdg-desktop-portal-1.14.3/src/portal-impl.c --- xdg-desktop-portal-1.8.1/src/portal-impl.c 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/portal-impl.c 2022-03-28 18:02:35.000000000 +0000 @@ -103,12 +103,48 @@ return TRUE; } +static gboolean +g_strv_case_contains (const gchar * const *strv, + const gchar *str) +{ + for (; strv && *strv != NULL; strv++) + { + if (g_ascii_strcasecmp (str, *strv) == 0) + return TRUE; + } + + return FALSE; +} + static gint -sort_impl_by_name (gconstpointer a, - gconstpointer b) +sort_impl_by_use_in_and_name (gconstpointer a, + gconstpointer b) { const PortalImplementation *pa = a; const PortalImplementation *pb = b; + const char *desktops_str = NULL; + g_auto(GStrv) desktops = NULL; + int i; + + desktops_str = g_getenv ("XDG_CURRENT_DESKTOP"); + + if (desktops_str == NULL) + desktops_str = ""; + + desktops = g_strsplit (desktops_str, ":", -1); + + for (i = 0; desktops[i] != NULL; i++) + { + gboolean use_a = g_strv_case_contains ((const char **)pa->use_in, desktops[i]); + gboolean use_b = g_strv_case_contains ((const char **)pb->use_in, desktops[i]); + + if (use_a != use_b) + return use_b - use_a; + else if (use_a) + break; + else + continue; + } return strcmp (pa->source, pb->source); } @@ -159,20 +195,7 @@ } } - implementations = g_list_sort (implementations, sort_impl_by_name); -} - -static gboolean -g_strv_case_contains (const gchar * const *strv, - const gchar *str) -{ - for (; *strv != NULL; strv++) - { - if (g_ascii_strcasecmp (str, *strv) == 0) - return TRUE; - } - - return FALSE; + implementations = g_list_sort (implementations, sort_impl_by_use_in_and_name); } PortalImplementation * diff -Nru xdg-desktop-portal-1.8.1/src/power-profile-monitor.c xdg-desktop-portal-1.14.3/src/power-profile-monitor.c --- xdg-desktop-portal-1.8.1/src/power-profile-monitor.c 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/power-profile-monitor.c 2022-03-28 18:02:35.000000000 +0000 @@ -0,0 +1,113 @@ +/* + * Copyright © 2021 Red Hat, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Authors: + * Bastien Nocera + */ + +#include "config.h" + +#include +#include + +#include "power-profile-monitor.h" +#include "request.h" +#include "xdp-dbus.h" +#include "xdp-utils.h" + +#if GLIB_CHECK_VERSION(2, 69, 1) +#define HAS_POWER_PROFILE_MONITOR 1 +#endif + +typedef struct _PowerProfileMonitor PowerProfileMonitor; +typedef struct _PowerProfileMonitorClass PowerProfileMonitorClass; + +struct _PowerProfileMonitor +{ + XdpPowerProfileMonitorSkeleton parent_instance; + +#ifdef HAS_POWER_PROFILE_MONITOR + GPowerProfileMonitor *monitor; +#endif /* HAS_POWER_PROFILE_MONITOR */ +}; + +struct _PowerProfileMonitorClass +{ + XdpPowerProfileMonitorSkeletonClass parent_class; +}; + +static PowerProfileMonitor *power_profile_monitor; + +GType power_profile_monitor_get_type (void) G_GNUC_CONST; +static void power_profile_monitor_iface_init (XdpPowerProfileMonitorIface *iface); + +G_DEFINE_TYPE_WITH_CODE (PowerProfileMonitor, power_profile_monitor, XDP_TYPE_POWER_PROFILE_MONITOR_SKELETON, + G_IMPLEMENT_INTERFACE (XDP_TYPE_POWER_PROFILE_MONITOR, power_profile_monitor_iface_init)); + +static void +power_profile_monitor_iface_init (XdpPowerProfileMonitorIface *iface) +{ +} + +#ifdef HAS_POWER_PROFILE_MONITOR +static void +power_saver_enabled_changed_cb (GObject *gobject, + GParamSpec *pspec, + PowerProfileMonitor *ppm) +{ + xdp_power_profile_monitor_set_power_saver_enabled (XDP_POWER_PROFILE_MONITOR (ppm), + g_power_profile_monitor_get_power_saver_enabled (ppm->monitor)); +} +#endif /* HAS_POWER_PROFILE_MONITOR */ + +static void +power_profile_monitor_init (PowerProfileMonitor *ppm) +{ +#ifdef HAS_POWER_PROFILE_MONITOR + ppm->monitor = g_power_profile_monitor_dup_default (); + g_signal_connect (ppm->monitor, "notify::power-saver-enabled", G_CALLBACK (power_saver_enabled_changed_cb), ppm); +#endif /* HAS_POWER_PROFILE_MONITOR */ + + xdp_power_profile_monitor_set_version (XDP_POWER_PROFILE_MONITOR (ppm), 1); +} + +static void +power_profile_monitor_finalize (GObject *object) +{ +#ifdef HAS_POWER_PROFILE_MONITOR + PowerProfileMonitor *ppm = (PowerProfileMonitor *) object; + + g_clear_object (&ppm->monitor); +#endif /* HAS_POWER_PROFILE_MONITOR */ + + G_OBJECT_CLASS (power_profile_monitor_parent_class)->finalize (object); +} + +static void +power_profile_monitor_class_init (PowerProfileMonitorClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = power_profile_monitor_finalize; +} + +GDBusInterfaceSkeleton * +power_profile_monitor_create (GDBusConnection *connection) +{ + power_profile_monitor = g_object_new (power_profile_monitor_get_type (), NULL); + + return G_DBUS_INTERFACE_SKELETON (power_profile_monitor); +} diff -Nru xdg-desktop-portal-1.8.1/src/power-profile-monitor.h xdg-desktop-portal-1.14.3/src/power-profile-monitor.h --- xdg-desktop-portal-1.8.1/src/power-profile-monitor.h 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/power-profile-monitor.h 2022-03-28 18:02:35.000000000 +0000 @@ -0,0 +1,25 @@ +/* + * Copyright © 2021 Red Hat, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Authors: + * Bastien Nocera + */ + +#pragma once + +#include + +GDBusInterfaceSkeleton * power_profile_monitor_create (GDBusConnection *connection); diff -Nru xdg-desktop-portal-1.8.1/src/print.c xdg-desktop-portal-1.14.3/src/print.c --- xdg-desktop-portal-1.8.1/src/print.c 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/print.c 2022-03-29 22:00:20.000000000 +0000 @@ -80,6 +80,7 @@ result, &error)) { + g_dbus_error_strip_remote_error (error); g_warning ("Backend call failed: %s", error->message); } @@ -123,7 +124,7 @@ XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, "Printing disabled"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } @@ -137,7 +138,7 @@ if (!impl_request) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } request_set_impl_request (request, impl_request); @@ -160,10 +161,10 @@ xdp_print_complete_print (object, invocation, NULL, request->id); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } -XdpOptionKey response_options[] = { +static XdpOptionKey response_options[] = { { "settings", G_VARIANT_TYPE_VARDICT, NULL }, { "page-setup", G_VARIANT_TYPE_VARDICT, NULL }, { "token", G_VARIANT_TYPE_UINT32, NULL } @@ -187,6 +188,7 @@ result, &error)) { + g_dbus_error_strip_remote_error (error); g_warning ("Backend call failed: %s", error->message); } @@ -235,7 +237,7 @@ XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, "Printing disabled"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } REQUEST_AUTOLOCK (request); @@ -248,7 +250,7 @@ if (!impl_request) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } request_set_impl_request (request, impl_request); @@ -271,7 +273,7 @@ xdp_print_complete_prepare_print (object, invocation, request->id); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void @@ -282,9 +284,9 @@ } static void -print_init (Print *fc) +print_init (Print *print) { - xdp_print_set_version (XDP_PRINT (fc), 1); + xdp_print_set_version (XDP_PRINT (print), 1); } static void diff -Nru xdg-desktop-portal-1.8.1/src/proxy-resolver.c xdg-desktop-portal-1.14.3/src/proxy-resolver.c --- xdg-desktop-portal-1.8.1/src/proxy-resolver.c 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/proxy-resolver.c 2022-03-29 22:00:20.000000000 +0000 @@ -79,7 +79,7 @@ g_variant_new ("(^as)", proxies)); } - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void diff -Nru xdg-desktop-portal-1.8.1/src/realtime.c xdg-desktop-portal-1.14.3/src/realtime.c --- xdg-desktop-portal-1.8.1/src/realtime.c 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/realtime.c 2022-03-29 22:00:20.000000000 +0000 @@ -0,0 +1,298 @@ +/* + * Copyright © 2021 Igalia S.L. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Authors: + * Patrick Griffis + */ + +#include "config.h" + +#include +#include + +#include "realtime.h" +#include "request.h" +#include "permissions.h" +#include "xdp-dbus.h" +#include "xdp-utils.h" + +#define PERMISSION_TABLE "realtime" +#define PERMISSION_ID "realtime" + +typedef struct _Realtime Realtime; +typedef struct _RealtimeClass RealtimeClass; + +struct _Realtime +{ + XdpRealtimeSkeleton parent_instance; + GDBusProxy *rtkit_proxy; +}; + +struct _RealtimeClass +{ + XdpRealtimeSkeletonClass parent_class; +}; + +static Realtime *realtime; + +GType realtime_get_type (void) G_GNUC_CONST; +static void realtime_iface_init (XdpRealtimeIface *iface); + +G_DEFINE_TYPE_WITH_CODE (Realtime, realtime, XDP_TYPE_REALTIME_SKELETON, + G_IMPLEMENT_INTERFACE (XDP_TYPE_REALTIME, realtime_iface_init)); + +static gboolean +map_pid_if_needed (XdpAppInfo *app_info, pid_t *pid, GError **error) +{ + if (!xdp_app_info_is_host (app_info)) + { + if (!xdp_app_info_map_pids (app_info, pid, 1, error)) + { + g_prefix_error (error, "Could not map pid: "); + g_warning ("Realtime error: %s", (*error)->message); + return FALSE; + } + } + + return TRUE; +} + +static void +on_call_ready (GObject *source_object, + GAsyncResult *result, + gpointer user_data) +{ + g_autoptr(GError) error = NULL; + g_autoptr(GDBusMethodInvocation) invocation = g_steal_pointer (&user_data); + g_autoptr(GVariant) response = NULL; + + response = g_dbus_proxy_call_finish (G_DBUS_PROXY (source_object), + result, + &error); + + if (error) + g_dbus_method_invocation_return_gerror (invocation, error); + else + g_dbus_method_invocation_return_value (invocation, g_variant_new ("()")); +} + +static gboolean +handle_make_thread_realtime_with_pid (XdpRealtime *object, + GDBusMethodInvocation *invocation, + guint64 process, + guint64 thread, + guint32 priority) +{ + g_autoptr (GError) error = NULL; + Request *request = request_from_invocation (invocation); + pid_t pids[1] = { process }; + const char *app_id = xdp_app_info_get_id (request->app_info); + Permission permission; + + if (!realtime->rtkit_proxy) + { + g_dbus_method_invocation_return_error (invocation, + XDG_DESKTOP_PORTAL_ERROR, + XDG_DESKTOP_PORTAL_ERROR_FAILED, + "RealtimeKit was not found"); + return G_DBUS_METHOD_INVOCATION_HANDLED; + } + + permission = get_permission_sync (app_id, PERMISSION_TABLE, PERMISSION_ID); + if (permission == PERMISSION_NO) + { + g_dbus_method_invocation_return_error (invocation, + XDG_DESKTOP_PORTAL_ERROR, + XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, + "Permission denied"); + return G_DBUS_METHOD_INVOCATION_HANDLED; + } + + if (!map_pid_if_needed (request->app_info, pids, &error)) + { + g_dbus_method_invocation_return_gerror (invocation, error); + return G_DBUS_METHOD_INVOCATION_HANDLED; + } + + g_dbus_proxy_call (G_DBUS_PROXY (realtime->rtkit_proxy), + "MakeThreadRealtimeWithPID", + g_variant_new ("(ttu)", pids[0], thread, priority), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + on_call_ready, + g_object_ref (invocation)); + + return G_DBUS_METHOD_INVOCATION_HANDLED; +} + +static gboolean +handle_make_thread_high_priority_with_pid (XdpRealtime *object, + GDBusMethodInvocation *invocation, + guint64 process, + guint64 thread, + gint32 priority) +{ + g_autoptr (GError) error = NULL; + Request *request = request_from_invocation (invocation); + pid_t pids[1] = { process }; + const char *app_id = xdp_app_info_get_id (request->app_info); + Permission permission; + + if (!realtime->rtkit_proxy) + { + g_dbus_method_invocation_return_error (invocation, + XDG_DESKTOP_PORTAL_ERROR, + XDG_DESKTOP_PORTAL_ERROR_FAILED, + "RealtimeKit was not found"); + return G_DBUS_METHOD_INVOCATION_HANDLED; + } + + permission = get_permission_sync (app_id, PERMISSION_TABLE, PERMISSION_ID); + if (permission == PERMISSION_NO) + { + g_dbus_method_invocation_return_error (invocation, + XDG_DESKTOP_PORTAL_ERROR, + XDG_DESKTOP_PORTAL_ERROR_NOT_ALLOWED, + "Permission denied"); + return G_DBUS_METHOD_INVOCATION_HANDLED; + } + + if (!map_pid_if_needed (request->app_info, pids, &error)) + { + g_dbus_method_invocation_return_gerror (invocation, error); + return G_DBUS_METHOD_INVOCATION_HANDLED; + } + + g_dbus_proxy_call (G_DBUS_PROXY (realtime->rtkit_proxy), + "MakeThreadHighPriorityWithPID", + g_variant_new ("(ttu)", pids[0], thread, priority), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + on_call_ready, + g_object_ref (invocation)); + + return G_DBUS_METHOD_INVOCATION_HANDLED; +} + +static void +realtime_iface_init (XdpRealtimeIface *iface) +{ + iface->handle_make_thread_realtime_with_pid = handle_make_thread_realtime_with_pid; + iface->handle_make_thread_high_priority_with_pid = handle_make_thread_high_priority_with_pid; +} + +static void +realtime_init (Realtime *realtime) +{ + xdp_realtime_set_version (XDP_REALTIME (realtime), 1); +} + +static void +realtime_finalize (GObject *object) +{ + Realtime *self = (Realtime *) object; + + g_clear_object (&self->rtkit_proxy); + + G_OBJECT_CLASS (realtime_parent_class)->finalize (object); +} + +static void +realtime_class_init (RealtimeClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = realtime_finalize; +} + +static void +load_all_properties (GDBusProxy *proxy) +{ + const char * properties[] = { "MaxRealtimePriority", "MinNiceLevel", "RTTimeUSecMax" }; + enum prop_type { MAX_REALTIME_PRIORITY, MIN_NICE_LEVEL, RTTIME_USEC_MAX }; + + for (guint i = 0; i < G_N_ELEMENTS (properties); ++i) + { + GVariant *result; + GVariant *parameters; + GError *error = NULL; + + parameters = g_variant_new ("(ss)", "org.freedesktop.RealtimeKit1", properties[i]); + result = g_dbus_proxy_call_sync (proxy, + "org.freedesktop.DBus.Properties.Get", + g_steal_pointer (¶meters), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + &error); + + if (error) + { + g_warning ("Failed to load RealtimeKit property: %s", error->message); + g_error_free (error); + } + else + { + GVariant *value; + g_variant_get (result, "(v)", &value); + + if (i == MAX_REALTIME_PRIORITY) + xdp_realtime_set_max_realtime_priority (XDP_REALTIME (realtime), g_variant_get_int32 (value)); + else if (i == MIN_NICE_LEVEL) + xdp_realtime_set_min_nice_level (XDP_REALTIME (realtime), g_variant_get_int32 (value)); + else if (i == RTTIME_USEC_MAX) + xdp_realtime_set_rttime_usec_max (XDP_REALTIME (realtime), g_variant_get_int64 (value)); + else + g_assert_not_reached (); + + g_dbus_proxy_set_cached_property (proxy, properties[i], value); + g_variant_unref (value); + g_variant_unref (result); + } + } +} + +GDBusInterfaceSkeleton * +realtime_create (GDBusConnection *connection) +{ + GDBusProxy *rtkit_proxy = NULL; + g_autoptr (GError) error = NULL; + + rtkit_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_NONE, + NULL, + "org.freedesktop.RealtimeKit1", + "/org/freedesktop/RealtimeKit1", + "org.freedesktop.RealtimeKit1", + NULL, + &error); + if (!rtkit_proxy) + { + /* We continue on so the realtime interface remains exported, + * however it will fail to do anything */ + g_warning ("Failed to create RealtimeKit proxy: %s", error->message); + } + + realtime = g_object_new (realtime_get_type (), NULL); + realtime->rtkit_proxy = g_steal_pointer (&rtkit_proxy); + + if (realtime->rtkit_proxy) + load_all_properties (realtime->rtkit_proxy); + + return G_DBUS_INTERFACE_SKELETON (realtime); +} diff -Nru xdg-desktop-portal-1.8.1/src/realtime.h xdg-desktop-portal-1.14.3/src/realtime.h --- xdg-desktop-portal-1.8.1/src/realtime.h 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/realtime.h 2022-03-28 18:02:35.000000000 +0000 @@ -0,0 +1,25 @@ +/* + * Copyright © 2021 Igalia S.L. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Authors: + * Patrick Griffis + */ + +#pragma once + +#include + +GDBusInterfaceSkeleton * realtime_create (GDBusConnection *connection); diff -Nru xdg-desktop-portal-1.8.1/src/remote-desktop.c xdg-desktop-portal-1.14.3/src/remote-desktop.c --- xdg-desktop-portal-1.8.1/src/remote-desktop.c 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/remote-desktop.c 2022-03-29 22:00:20.000000000 +0000 @@ -198,6 +198,7 @@ res, &error)) { + g_dbus_error_strip_remote_error (error); g_warning ("A backend call failed: %s", error->message); should_close_session = TRUE; goto out; @@ -263,7 +264,7 @@ if (!impl_request) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } request_set_impl_request (request, impl_request); @@ -273,7 +274,7 @@ if (!session) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_variant_builder_init (&options_builder, G_VARIANT_TYPE_VARDICT); @@ -295,7 +296,7 @@ xdp_remote_desktop_complete_create_session (object, invocation, request->id); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void @@ -321,7 +322,10 @@ &results, res, &error)) - g_warning ("A backend call failed: %s", error->message); + { + g_dbus_error_strip_remote_error (error); + g_warning ("A backend call failed: %s", error->message); + } should_close_session = !request->exported || response != 0; @@ -398,7 +402,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } SESSION_AUTOLOCK_UNREF (session); @@ -416,20 +420,20 @@ G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Sources already selected"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; case REMOTE_DESKTOP_SESSION_STATE_STARTING: case REMOTE_DESKTOP_SESSION_STATE_STARTED: g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Can only select devices before starting"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; case REMOTE_DESKTOP_SESSION_STATE_CLOSED: g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } impl_request = @@ -441,7 +445,7 @@ if (!impl_request) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } request_set_impl_request (request, impl_request); @@ -454,7 +458,7 @@ &error)) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_object_set_qdata_full (G_OBJECT (request), @@ -474,7 +478,7 @@ xdp_remote_desktop_complete_select_devices (object, invocation, request->id); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -522,7 +526,10 @@ &results, res, &error)) - g_warning ("A backend call failed: %s", error->message); + { + g_dbus_error_strip_remote_error (error); + g_warning ("A backend call failed: %s", error->message); + } should_close_session = !request->exported || response != 0; @@ -589,7 +596,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } SESSION_AUTOLOCK_UNREF (session); @@ -606,26 +613,26 @@ G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Sources not selected"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; case REMOTE_DESKTOP_SESSION_STATE_SELECTING_DEVICES: g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Devices not selected"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; case REMOTE_DESKTOP_SESSION_STATE_STARTING: case REMOTE_DESKTOP_SESSION_STATE_STARTED: g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Can only start once"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; case REMOTE_DESKTOP_SESSION_STATE_CLOSED: g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_object_set_data_full (G_OBJECT (request), @@ -640,7 +647,7 @@ if (!impl_request) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } request_set_impl_request (request, impl_request); @@ -667,7 +674,7 @@ xdp_remote_desktop_complete_start (object, invocation, request->id); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -744,7 +751,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } SESSION_AUTOLOCK_UNREF (session); @@ -754,8 +761,8 @@ g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, - "Invalid call call"); - return TRUE; + "Session doesn't have access to a device of type: pointer"); + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_variant_builder_init (&options_builder, G_VARIANT_TYPE_VARDICT); @@ -765,7 +772,7 @@ &error)) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } options = g_variant_builder_end (&options_builder); @@ -777,7 +784,7 @@ xdp_remote_desktop_complete_notify_pointer_motion (object, invocation); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -802,7 +809,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } SESSION_AUTOLOCK_UNREF (session); @@ -812,8 +819,8 @@ g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, - "Invalid call call"); - return TRUE; + "Session doesn't have access to a device of type: pointer"); + return G_DBUS_METHOD_INVOCATION_HANDLED; } if (!check_position (session, stream, x, y)) @@ -822,7 +829,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Invalid position"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_variant_builder_init (&options_builder, G_VARIANT_TYPE_VARDICT); @@ -832,7 +839,7 @@ &error)) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } options = g_variant_builder_end (&options_builder); @@ -846,7 +853,7 @@ xdp_remote_desktop_complete_notify_pointer_motion_absolute (object, invocation); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -870,7 +877,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } SESSION_AUTOLOCK_UNREF (session); @@ -880,8 +887,8 @@ g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, - "Invalid call call"); - return TRUE; + "Session doesn't have access to a device of type: pointer"); + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_variant_builder_init (&options_builder, G_VARIANT_TYPE_VARDICT); @@ -891,7 +898,7 @@ &error)) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } options = g_variant_builder_end (&options_builder); @@ -905,7 +912,7 @@ xdp_remote_desktop_complete_notify_pointer_button (object, invocation); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static XdpOptionKey remote_desktop_notify_pointer_axis_options[] = { @@ -933,7 +940,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } SESSION_AUTOLOCK_UNREF (session); @@ -943,8 +950,8 @@ g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, - "Invalid call call"); - return TRUE; + "Session doesn't have access to a device of type: pointer"); + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_variant_builder_init (&options_builder, G_VARIANT_TYPE_VARDICT); @@ -954,7 +961,7 @@ &error)) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } options = g_variant_builder_end (&options_builder); @@ -967,7 +974,7 @@ xdp_remote_desktop_complete_notify_pointer_axis (object, invocation); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -991,7 +998,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } SESSION_AUTOLOCK_UNREF (session); @@ -1001,8 +1008,8 @@ g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, - "Invalid call call"); - return TRUE; + "Session doesn't have access to a device of type: pointer"); + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_variant_builder_init (&options_builder, G_VARIANT_TYPE_VARDICT); @@ -1012,7 +1019,7 @@ &error)) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } options = g_variant_builder_end (&options_builder); @@ -1025,7 +1032,7 @@ xdp_remote_desktop_complete_notify_pointer_axis_discrete (object, invocation); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -1049,7 +1056,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } SESSION_AUTOLOCK_UNREF (session); @@ -1059,8 +1066,8 @@ g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, - "Invalid call call"); - return TRUE; + "Session doesn't have access to a device of type: keyboard"); + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_variant_builder_init (&options_builder, G_VARIANT_TYPE_VARDICT); @@ -1070,7 +1077,7 @@ &error)) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } options = g_variant_builder_end (&options_builder); @@ -1083,7 +1090,7 @@ xdp_remote_desktop_complete_notify_keyboard_keycode (object, invocation); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -1107,7 +1114,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } SESSION_AUTOLOCK_UNREF (session); @@ -1117,8 +1124,8 @@ g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, - "Invalid call call"); - return TRUE; + "Session doesn't have access to a device of type: keyboard"); + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_variant_builder_init (&options_builder, G_VARIANT_TYPE_VARDICT); @@ -1128,7 +1135,7 @@ &error)) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } options = g_variant_builder_end (&options_builder); @@ -1141,7 +1148,7 @@ xdp_remote_desktop_complete_notify_keyboard_keysym (object, invocation); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -1167,7 +1174,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } SESSION_AUTOLOCK_UNREF (session); @@ -1177,8 +1184,8 @@ g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, - "Invalid call call"); - return TRUE; + "Session doesn't have access to a device of type: touchscreen"); + return G_DBUS_METHOD_INVOCATION_HANDLED; } if (!check_position (session, stream, x, y)) @@ -1187,7 +1194,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Invalid position"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_variant_builder_init (&options_builder, G_VARIANT_TYPE_VARDICT); @@ -1197,7 +1204,7 @@ &error)) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } options = g_variant_builder_end (&options_builder); @@ -1211,7 +1218,7 @@ xdp_remote_desktop_complete_notify_touch_down (object, invocation); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -1237,7 +1244,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } SESSION_AUTOLOCK_UNREF (session); @@ -1247,8 +1254,8 @@ g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, - "Invalid call call"); - return TRUE; + "Session doesn't have access to a device of type: touchscreen"); + return G_DBUS_METHOD_INVOCATION_HANDLED; } if (!check_position (session, stream, x, y)) @@ -1257,7 +1264,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Invalid position"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_variant_builder_init (&options_builder, G_VARIANT_TYPE_VARDICT); @@ -1267,7 +1274,7 @@ &error)) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } options = g_variant_builder_end (&options_builder); @@ -1281,7 +1288,7 @@ xdp_remote_desktop_complete_notify_touch_motion (object, invocation); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -1304,7 +1311,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } SESSION_AUTOLOCK_UNREF (session); @@ -1314,8 +1321,8 @@ g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, - "Invalid call call"); - return TRUE; + "Session doesn't have access to a device of type: touchscreen"); + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_variant_builder_init (&options_builder, G_VARIANT_TYPE_VARDICT); @@ -1325,7 +1332,7 @@ &error)) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } options = g_variant_builder_end (&options_builder); @@ -1337,7 +1344,7 @@ xdp_remote_desktop_complete_notify_touch_up (object, invocation); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void diff -Nru xdg-desktop-portal-1.8.1/src/request.c xdg-desktop-portal-1.14.3/src/request.c --- xdg-desktop-portal-1.8.1/src/request.c 2020-09-14 17:03:38.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/request.c 2022-03-29 22:00:20.000000000 +0000 @@ -76,7 +76,7 @@ { if (invocation) g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } request_unexport (request); @@ -85,7 +85,7 @@ if (invocation) xdp_request_complete_close (XDP_REQUEST (request), invocation); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void @@ -295,6 +295,10 @@ { // no request objects } + else if (strcmp (interface, "org.freedesktop.portal.Realtime") == 0) + { + // no request objects + } else if (strcmp (interface, "org.freedesktop.portal.Trash") == 0) { // no request objects @@ -306,6 +310,13 @@ options = g_variant_get_child_value (parameters, 1); } } + else if (strcmp (interface, "org.freedesktop.portal.DynamicLauncher") == 0) + { + if (strcmp (method, "PrepareInstall") == 0 ) + { + options = g_variant_get_child_value (parameters, 3); + } + } else if (strcmp (interface, "org.freedesktop.portal.Wallpaper") == 0) { options = g_variant_get_child_value (parameters, 2); diff -Nru xdg-desktop-portal-1.8.1/src/rewrite-launchers.c xdg-desktop-portal-1.14.3/src/rewrite-launchers.c --- xdg-desktop-portal-1.8.1/src/rewrite-launchers.c 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/rewrite-launchers.c 2022-03-29 22:00:20.000000000 +0000 @@ -0,0 +1,286 @@ +/* + * Copyright © 2022 Matthew Leeds + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Authors: + * Matthew Leeds + */ + +#include "config.h" + +#ifdef HAVE_GLIB_2_66 + +#include +#include + +#include "dynamic-launcher.h" +#include "xdp-utils.h" + +static char * +find_renamed_app_id (const char *old_app_id) +{ + g_autofree char *renamed_to = NULL; + g_autofree char *desktop_id = NULL; + + desktop_id = g_strconcat (old_app_id, ".desktop", NULL); + + GList *app_infos = g_app_info_get_all (); + for (GList *l = app_infos; l; l = l->next) + { + GDesktopAppInfo *info = l->data; + g_auto(GStrv) renamed_from = NULL; + renamed_from = g_desktop_app_info_get_string_list (info, "X-Flatpak-RenamedFrom", NULL); + if (renamed_from == NULL) + continue; + if (!g_strv_contains ((const char * const *)renamed_from, desktop_id)) + continue; + + renamed_to = g_desktop_app_info_get_string (info, "X-Flatpak"); + break; + } + + g_list_free_full (app_infos, g_object_unref); + return g_steal_pointer (&renamed_to); +} + +/* + * It's possible an app was renamed using Flatpak's end-of-life-rebase + * mechanism, and either (a) the app was installed system-wide and the update + * was applied by another user, so the migration for this user has to happen + * when this binary runs at the start of the session, or (b) the version of + * Flatpak is not new enough for the migration of the launchers to be handled + * by Flatpak, so x-d-p has to do it. + * + * This function also handles deleting the launchers in case the parent app has + * been uninstalled. + */ +static gboolean +migrate_renamed_app_launchers (void) +{ + g_autoptr(GFile) desktop_dir = NULL; + g_autoptr(GFileEnumerator) children = NULL; + g_autoptr(GError) error = NULL; + g_autofree char *icon_dir_path = NULL; + g_autofree char *desktop_dir_path = NULL; + gboolean success = TRUE; + + desktop_dir_path = g_build_filename (g_get_user_data_dir (), XDG_PORTAL_APPLICATIONS_DIR, NULL); + desktop_dir = g_file_new_for_path (desktop_dir_path); + children = g_file_enumerate_children (desktop_dir, "standard::name", G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, &error); + if (children == NULL) + { + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) + { + g_warning ("Error encountered enumerating launchers: %s", error->message); + success = FALSE; + } + return success; + } + + icon_dir_path = g_build_filename (g_get_user_data_dir (), XDG_PORTAL_ICONS_DIR, NULL); + for (;;) + { + g_autoptr(GFileInfo) info = g_file_enumerator_next_file (children, NULL, NULL); + const char *desktop_name; + g_autofree char *desktop_path = NULL; + g_autofree char *icon_path = NULL; + g_autofree char *tryexec_path = NULL; + g_autofree char *app_id = NULL; + g_autofree char *renamed_to = NULL; + g_autoptr(GKeyFile) key_file = NULL; + g_autoptr(GFile) icon_file = NULL; + g_autoptr(GFile) desktop_file = NULL; + + if (info == NULL) + return success; + + desktop_name = g_file_info_get_name (info); + if (!g_str_has_suffix (desktop_name, ".desktop")) + continue; + + desktop_path = g_build_filename (g_file_peek_path (desktop_dir), desktop_name, NULL); + key_file = g_key_file_new (); + if (!g_key_file_load_from_file (key_file, desktop_path, + G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS, + &error)) + { + g_warning ("Error encountered loading key file %s: %s", desktop_path, error->message); + g_clear_error (&error); + success = FALSE; + continue; + } + + tryexec_path = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, "TryExec", NULL); + if (tryexec_path == NULL) + continue; + if (!g_path_is_absolute (tryexec_path)) + { + /* Here we're just checking for existence not a renamed binary */ + renamed_to = g_find_program_in_path (tryexec_path); + if (renamed_to) + continue; + } + else if (g_file_test (tryexec_path, G_FILE_TEST_IS_EXECUTABLE)) + { + continue; + } + else if (g_key_file_has_key (key_file, G_KEY_FILE_DESKTOP_GROUP, "X-Flatpak", NULL)) + { + app_id = g_path_get_basename (tryexec_path); + if (strlen(app_id) < 2 || + !g_dbus_is_name (app_id) || + !g_str_has_prefix (desktop_name, app_id)) + { + g_warning ("Unable to determine app id for %s", desktop_name); + success = FALSE; + continue; + } + renamed_to = find_renamed_app_id (app_id); + } + + icon_path = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, "Icon", NULL); + if (g_str_has_prefix (icon_path, icon_dir_path)) + icon_file = g_file_new_for_path (icon_path); + + desktop_file = g_file_new_for_path (desktop_path); + + if (renamed_to == NULL) + { + g_autoptr(GFile) link_file = NULL; + + link_file = g_file_new_build_filename (g_get_user_data_dir (), "applications", desktop_name, NULL); + if (!g_file_delete (link_file, NULL, &error)) + { + g_warning ("Couldn't delete sym link %s: %s", g_file_peek_path (link_file), error->message); + g_clear_error (&error); + success = FALSE; + } + + if (!g_file_delete (desktop_file, NULL, &error)) + { + g_warning ("Couldn't delete desktop file %s: %s", g_file_peek_path (desktop_file), error->message); + g_clear_error (&error); + success = FALSE; + } + + if (icon_file && !g_file_delete (icon_file, NULL, &error)) + { + g_warning ("Couldn't delete icon file %s: %s", g_file_peek_path (icon_file), error->message); + g_clear_error (&error); + success = FALSE; + } + } + else /* renamed_to != NULL */ + { + g_autoptr(GFile) link_file = NULL; + g_autoptr(GFile) new_link_file = NULL; + g_autoptr(GString) data_string = NULL; + g_autoptr(GKeyFile) new_key_file = NULL; + g_autofree char *new_desktop = NULL; + g_autofree char *new_desktop_path = NULL; + g_autofree char *new_icon = NULL; + g_autofree char *icon_basename = NULL; + g_autofree char *link_path = NULL; + g_autofree char *relative_path = NULL; + g_autofree char *old_data = NULL; + const gchar *desktop_suffix; + gchar *icon_suffix; + + if (!g_key_file_has_key (key_file, G_KEY_FILE_DESKTOP_GROUP, "X-Flatpak", NULL)) + g_assert_not_reached (); + + /* Fix paths in desktop file with a find-and-replace. */ + old_data = g_key_file_to_data (key_file, NULL, NULL); + data_string = g_string_new ((const char *)old_data); + g_string_replace (data_string, app_id, renamed_to, 0); + new_key_file = g_key_file_new (); + if (!g_key_file_load_from_data (new_key_file, data_string->str, -1, + G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS, + &error)) + { + g_warning ("Cannot load desktop file %s after rewrite: %s", desktop_path, error->message); + g_warning ("Key file contents:\n%s\n", (const char *)data_string->str); + g_clear_error (&error); + success = FALSE; + continue; + } + + /* Write it out at the new path */ + g_assert (g_str_has_prefix (desktop_name, app_id)); + desktop_suffix = desktop_name + strlen (app_id); + new_desktop = g_strconcat (renamed_to, desktop_suffix, NULL); + new_desktop_path = g_build_filename (desktop_dir_path, new_desktop, NULL); + if (!g_key_file_save_to_file (new_key_file, new_desktop_path, &error)) + { + g_warning ("Couldn't rewrite desktop file %s to %s: %s", + desktop_path, new_desktop_path, error->message); + g_clear_error (&error); + success = FALSE; + continue; + } + + /* Fix symlink */ + link_path = g_build_filename (g_get_user_data_dir (), "applications", desktop_name, NULL); + link_file = g_file_new_for_path (link_path); + relative_path = g_build_filename ("..", XDG_PORTAL_APPLICATIONS_DIR, new_desktop, NULL); + g_file_delete (link_file, NULL, NULL); + new_link_file = g_file_new_build_filename (g_get_user_data_dir (), "applications", new_desktop, NULL); + if (!g_file_make_symbolic_link (new_link_file, relative_path, NULL, &error)) + { + g_warning ("Unable to rename desktop file link %s -> %s: %s", + desktop_name, new_desktop, error->message); + g_clear_error (&error); + success = FALSE; + continue; + } + + /* Delete the old desktop file */ + unlink (desktop_path); + + /* And rename the icon */ + if (icon_file) + { + icon_basename = g_path_get_basename (icon_path); + if (!g_str_has_prefix (icon_basename, app_id)) + continue; + + icon_suffix = icon_basename + strlen (app_id); + new_icon = g_strconcat (renamed_to, icon_suffix, NULL); + if (!g_file_set_display_name (icon_file, new_icon, NULL, &error)) + { + g_warning ("Unable to rename icon file %s -> %s: %s", + icon_basename, new_icon, error->message); + g_clear_error (&error); + success = FALSE; + continue; + } + } + } + } + + return success; +} +#endif /* HAVE_GLIB_2_66 */ + +int +main (int argc, char *argv[]) +{ +/* The dynamic launcher portal is only compiled against GLib >= 2.66 */ +#ifdef HAVE_GLIB_2_66 + if (!migrate_renamed_app_launchers ()) + return 1; +#endif + return 0; +} diff -Nru xdg-desktop-portal-1.8.1/src/screen-cast.c xdg-desktop-portal-1.14.3/src/screen-cast.c --- xdg-desktop-portal-1.8.1/src/screen-cast.c 2020-09-14 17:03:49.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/screen-cast.c 2022-03-29 23:41:47.000000000 +0000 @@ -26,11 +26,13 @@ #include "screen-cast.h" #include "remote-desktop.h" #include "request.h" +#include "permissions.h" #include "pipewire.h" #include "xdp-dbus.h" #include "xdp-impl-dbus.h" #include "xdp-utils.h" +#define RESTORE_DATA_TYPE "(suv)" #define PERMISSION_ITEM(item_id, item_permissions) \ ((struct pw_permission) { \ .id = item_id, \ @@ -54,6 +56,9 @@ static int impl_version; static ScreenCast *screen_cast; +static GMutex transient_permissions_lock; +static GHashTable *transient_permissions; + static unsigned int available_cursor_modes = 0; GType screen_cast_get_type (void); @@ -72,6 +77,13 @@ G_IMPLEMENT_INTERFACE (XDP_TYPE_SCREEN_CAST, screen_cast_iface_init)) +typedef enum _PersistMode +{ + PERSIST_MODE_NONE = 0, + PERSIST_MODE_TRANSIENT = 1, + PERSIST_MODE_PERSISTENT = 2, +} PersistMode; + typedef enum _ScreenCastSessionState { SCREEN_CAST_SESSION_STATE_INIT, @@ -89,6 +101,9 @@ ScreenCastSessionState state; GList *streams; + char *restore_token; + PersistMode persist_mode; + GVariant *restore_data; } ScreenCastSession; typedef struct _ScreenCastSessionClass @@ -100,6 +115,145 @@ G_DEFINE_TYPE (ScreenCastSession, screen_cast_session, session_get_type ()) +static void +set_persistent_permissions (const char *app_id, + const char *restore_token, + GVariant *restore_data) +{ + g_autoptr(GError) error = NULL; + + set_permission_sync (app_id, "screencast", restore_token, PERMISSION_YES); + + if (!xdp_impl_permission_store_call_set_value_sync (get_permission_store (), + "screencast", + TRUE, + restore_token, + g_variant_new_variant (restore_data), + NULL, + &error)) + { + g_dbus_error_strip_remote_error (error); + g_warning ("Error setting permission store value: %s", error->message); + } +} + +static GVariant * +get_persistent_permissions (const char *app_id, + const char *restore_token) +{ + g_autoptr(GVariant) perms = NULL; + g_autoptr(GVariant) data = NULL; + g_autoptr(GError) error = NULL; + const char **permissions; + + if (!xdp_impl_permission_store_call_lookup_sync (get_permission_store (), + "screencast", + restore_token, + &perms, + &data, + NULL, + &error)) + { + return NULL; + } + + if (!perms || !g_variant_lookup (perms, app_id, "^a&s", &permissions)) + return NULL; + + if (!data) + return NULL; + + return g_variant_get_child_value (data, 0); +} + +void +delete_persistent_permissions (const char *app_id, + const char *restore_token) +{ + + g_autoptr(GError) error = NULL; + + if (!xdp_impl_permission_store_call_delete_sync (get_permission_store (), + "screencast", + restore_token, + NULL, + &error)) + { + g_dbus_error_strip_remote_error (error); + g_warning ("Error deleting permission: %s", error->message); + } +} + +static void +set_transient_permissions (const char *sender, + const char *restore_token, + GVariant *restore_data) +{ + g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&transient_permissions_lock); + + if (!transient_permissions) + { + transient_permissions = g_hash_table_new_full (g_str_hash, g_str_equal, + g_free, (GDestroyNotify)g_variant_unref); + } + + g_hash_table_insert (transient_permissions, + g_strdup_printf ("%s/%s", sender, restore_token), + g_variant_ref (restore_data)); +} + +static GVariant * +get_transient_permissions (const char *sender, + const char *restore_token) +{ + g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&transient_permissions_lock); + g_autofree char *id = NULL; + GVariant *permissions; + + if (!transient_permissions) + return NULL; + + id = g_strdup_printf ("%s/%s", sender, restore_token); + permissions = g_hash_table_lookup (transient_permissions, id); + return permissions ? g_variant_ref (permissions) : NULL; +} + +static void +delete_transient_permissions (const char *sender, + const char *restore_token) +{ + g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&transient_permissions_lock); + g_autofree char *id = NULL; + + if (!transient_permissions) + return; + + id = g_strdup_printf ("%s/%s", sender, restore_token); + g_hash_table_remove (transient_permissions, id); +} + +void +screen_cast_remove_transient_permissions_for_sender (const char *sender) +{ + g_autoptr(GMutexLocker) locker = NULL; + GHashTableIter iter; + const char *key; + + locker = g_mutex_locker_new (&transient_permissions_lock); + + if (!transient_permissions) + return; + + g_hash_table_iter_init (&iter, transient_permissions); + while (g_hash_table_iter_next (&iter, (gpointer *) &key, NULL)) + { + g_auto(GStrv) split = g_strsplit (key, "/", 2); + + if (split && split[0] && g_strcmp0 (split[0], sender) == 0) + g_hash_table_iter_remove (&iter); + } +} + static gboolean is_screen_cast_session (Session *session) { @@ -163,6 +317,7 @@ res, &error)) { + g_dbus_error_strip_remote_error (error); g_warning ("A backend call failed: %s", error->message); should_close_session = TRUE; goto out; @@ -229,7 +384,7 @@ if (!impl_request) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } request_set_impl_request (request, impl_request); @@ -239,7 +394,7 @@ if (!session) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_variant_builder_init (&options_builder, G_VARIANT_TYPE_VARDICT); @@ -261,7 +416,7 @@ xdp_screen_cast_complete_create_session (object, invocation, request->id); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void @@ -287,7 +442,10 @@ &results, res, &error)) - g_warning ("A backend call failed: %s", error->message); + { + g_dbus_error_strip_remote_error (error); + g_warning ("A backend call failed: %s", error->message); + } should_close_session = !request->exported || response != 0; @@ -338,10 +496,10 @@ { guint32 types = g_variant_get_uint32 (value); - if ((types & ~(1 | 2)) != 0) + if ((types & ~(1 | 2 | 4)) != 0) { g_set_error (error, XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, - "Unsupported device type: %x", types & ~(1 | 2)); + "Unsupported device type: %x", types & ~(1 | 2 | 4)); return FALSE; } @@ -373,13 +531,158 @@ return TRUE; } +static gboolean +validate_restore_token (const char *key, + GVariant *value, + GVariant *options, + GError **error) +{ + const char *restore_token = g_variant_get_string (value, NULL); + + if (!g_uuid_string_is_valid (restore_token)) + { + g_set_error (error, XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, + "Restore token is not a valid UUID string"); + return FALSE; + } + + return TRUE; +} + +static gboolean +validate_persist_mode (const char *key, + GVariant *value, + GVariant *options, + GError **error) +{ + uint32_t mode = g_variant_get_uint32 (value); + + if (mode > PERSIST_MODE_PERSISTENT) + { + g_set_error (error, XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, + "Invalid persist mode %x", mode); + return FALSE; + } + + return TRUE; +} + static XdpOptionKey screen_cast_select_sources_options[] = { { "types", G_VARIANT_TYPE_UINT32, validate_device_types }, { "multiple", G_VARIANT_TYPE_BOOLEAN, NULL }, { "cursor_mode", G_VARIANT_TYPE_UINT32, validate_cursor_mode }, + { "restore_token", G_VARIANT_TYPE_STRING, validate_restore_token }, + { "persist_mode", G_VARIANT_TYPE_UINT32, validate_persist_mode }, }; static gboolean +replace_restore_token_with_data (Session *session, + GVariant **in_out_options, + GError **error) +{ + GVariantBuilder options_builder; + g_autoptr(GVariant) options = NULL; + PersistMode persist_mode; + gsize i; + + options = *in_out_options; + + if (!g_variant_lookup (options, "persist_mode", "u", &persist_mode)) + persist_mode = PERSIST_MODE_NONE; + + if (is_remote_desktop_session (session) && persist_mode != PERSIST_MODE_NONE) + { + g_set_error (error, XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, + "Remote desktop sessions cannot persist"); + return FALSE; + } + + if (is_screen_cast_session (session)) + { + ScreenCastSession *screen_cast_session = (ScreenCastSession *)session; + screen_cast_session->persist_mode = persist_mode; + } + + g_variant_builder_init (&options_builder, G_VARIANT_TYPE_VARDICT); + for (i = 0; i < G_N_ELEMENTS (screen_cast_select_sources_options); i++) + { + g_autoptr(GVariant) value = NULL; + + value = g_variant_lookup_value (options, + screen_cast_select_sources_options[i].key, + screen_cast_select_sources_options[i].type); + + if (!value) + continue; + + if (g_strcmp0 (screen_cast_select_sources_options[i].key, "restore_token") == 0) + { + ScreenCastSession *screen_cast_session; + g_autoptr(GVariant) restore_data = NULL; + g_autofree char *restore_token = NULL; + + if (is_remote_desktop_session (session)) + { + g_set_error (error, XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, + "Remote desktop sessions cannot be restored"); + return FALSE; + } + + restore_token = g_variant_dup_string (value, NULL); + + /* Lookup permissions in memory first, and fallback to the permission + * store if not found. Immediately delete them now as a safety measure, + * since they'll be stored again when the session is closed. + * + * Notice that transient mode uses the sender name, whereas persistent + * mode uses the app id. + */ + restore_data = get_transient_permissions (session->sender, restore_token); + if (restore_data) + { + delete_transient_permissions (session->sender, restore_token); + } + else + { + restore_data = get_persistent_permissions (session->app_id, restore_token); + if (restore_data) + delete_persistent_permissions (session->app_id, restore_token); + } + + if (!restore_data) + continue; + + if (!g_variant_check_format_string (restore_data, RESTORE_DATA_TYPE, FALSE)) + { + g_warning ("Restore data was stored with the wrong format, ignoring"); + continue; + } + + /* Only store the restore token after checking if it exists, otherwise + * apps can pass random UUIDs and yet predict what the next token will + * be. + */ + g_assert (is_screen_cast_session (session)); + screen_cast_session = (ScreenCastSession *)session; + screen_cast_session->restore_token = g_steal_pointer (&restore_token); + + g_debug ("Replacing 'restore_token' with portal-specific data"); + g_variant_builder_add (&options_builder, "{sv}", "restore_data", restore_data); + } + else + { + g_variant_builder_add (&options_builder, "{sv}", + screen_cast_select_sources_options[i].key, + g_steal_pointer (&value)); + } + } + + *in_out_options = g_variant_builder_end (&options_builder); + + return TRUE; +} + +static gboolean handle_select_sources (XdpScreenCast *object, GDBusMethodInvocation *invocation, const char *arg_session_handle, @@ -390,6 +693,7 @@ g_autoptr(GError) error = NULL; g_autoptr(XdpImplRequest) impl_request = NULL; GVariantBuilder options_builder; + GVariant *options; REQUEST_AUTOLOCK (request); @@ -400,7 +704,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } SESSION_AUTOLOCK_UNREF (session); @@ -419,20 +723,20 @@ G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Sources already selected"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; case SCREEN_CAST_SESSION_STATE_STARTING: case SCREEN_CAST_SESSION_STATE_STARTED: g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Can only select sources before starting"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; case SCREEN_CAST_SESSION_STATE_CLOSED: g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } } else if (is_remote_desktop_session (session)) @@ -446,7 +750,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Invalid state"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } } else @@ -455,7 +759,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } impl_request = @@ -467,7 +771,7 @@ if (!impl_request) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } request_set_impl_request (request, impl_request); @@ -480,7 +784,19 @@ &error)) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; + } + + options = g_variant_builder_end (&options_builder); + + /* If 'restore_token' is passed, lookup the corresponding data in the + * permission store and / or the GHashTable with transient permissions. + * Portal implementations do not have access to the restore token. + */ + if (!replace_restore_token_with_data (session, &options, &error)) + { + g_dbus_method_invocation_return_gerror (invocation, error); + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_object_set_qdata_full (G_OBJECT (request), @@ -501,14 +817,14 @@ request->id, arg_session_handle, xdp_app_info_get_id (request->app_info), - g_variant_builder_end (&options_builder), + options, NULL, select_sources_done, g_object_ref (request)); xdp_screen_cast_complete_select_sources (object, invocation, request->id); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } uint32_t @@ -624,12 +940,121 @@ return streams; } +static void +generate_and_save_restore_token (ScreenCastSession *screen_cast_session) +{ + Session *session = (Session *)screen_cast_session; + + if (!screen_cast_session->restore_data) + { + if (screen_cast_session->restore_token) + { + delete_persistent_permissions (session->app_id, screen_cast_session->restore_token); + delete_transient_permissions (session->sender, screen_cast_session->restore_token); + } + + g_clear_pointer (&screen_cast_session->restore_token, g_free); + return; + } + + switch (screen_cast_session->persist_mode) + { + case PERSIST_MODE_NONE: + if (screen_cast_session->restore_token) + { + delete_persistent_permissions (session->app_id, screen_cast_session->restore_token); + delete_transient_permissions (session->sender, screen_cast_session->restore_token); + } + + g_clear_pointer (&screen_cast_session->restore_token, g_free); + g_clear_pointer (&screen_cast_session->restore_data, g_variant_unref); + break; + + case PERSIST_MODE_TRANSIENT: + if (screen_cast_session->restore_token == NULL) + screen_cast_session->restore_token = g_uuid_string_random (); + + set_transient_permissions (session->sender, + screen_cast_session->restore_token, + screen_cast_session->restore_data); + break; + + case PERSIST_MODE_PERSISTENT: + if (screen_cast_session->restore_token == NULL) + screen_cast_session->restore_token = g_uuid_string_random (); + + set_persistent_permissions (session->app_id, + screen_cast_session->restore_token, + screen_cast_session->restore_data); + + break; + } +} + +static void +replace_restore_data_by_token (ScreenCastSession *screen_cast_session, + GVariant **in_out_results) +{ + g_autoptr(GVariant) results = *in_out_results; + GVariantBuilder results_builder; + GVariantIter iter; + const char *key; + GVariant *value; + gboolean found_restore_data = FALSE; + + g_variant_builder_init (&results_builder, G_VARIANT_TYPE_VARDICT); + + g_variant_iter_init (&iter, results); + while (g_variant_iter_next (&iter, "{&sv}", &key, &value)) + { + if (g_strcmp0 (key, "restore_data") == 0) + { + if (g_variant_check_format_string (value, RESTORE_DATA_TYPE, FALSE)) + { + screen_cast_session->restore_data = g_variant_ref_sink (value); + found_restore_data = TRUE; + } + else + { + g_warning ("Received restore data in invalid variant format ('%s'; expected '%s')", + g_variant_get_type_string (value), + RESTORE_DATA_TYPE); + } + } + else if (g_strcmp0 (key, "persist_mode") == 0) + { + screen_cast_session->persist_mode = MIN (screen_cast_session->persist_mode, + g_variant_get_uint32 (value)); + } + else + { + g_variant_builder_add (&results_builder, "{sv}", key, value); + } + } + + if (found_restore_data) + { + g_debug ("Replacing restore data received from portal impl with a token"); + + generate_and_save_restore_token (screen_cast_session); + g_variant_builder_add (&results_builder, "{sv}", "restore_token", + g_variant_new_string (screen_cast_session->restore_token)); + } + else + { + screen_cast_session->persist_mode = PERSIST_MODE_NONE; + } + + *in_out_results = g_variant_builder_end (&results_builder); +} + static gboolean process_results (ScreenCastSession *screen_cast_session, - GVariant *results, + GVariant **in_out_results, GError **error) { g_autoptr(GVariantIter) streams_iter = NULL; + GVariant *results = *in_out_results; if (!g_variant_lookup (results, "streams", "a(ua{sv})", &streams_iter)) { @@ -638,6 +1063,7 @@ } screen_cast_session->streams = collect_screen_cast_stream_data (streams_iter); + replace_restore_data_by_token (screen_cast_session, in_out_results); return TRUE; } @@ -665,7 +1091,10 @@ &results, res, &error)) - g_warning ("A backend call failed: %s", error->message); + { + g_dbus_error_strip_remote_error (error); + g_warning ("A backend call failed: %s", error->message); + } should_close_session = !request->exported || response != 0; @@ -675,7 +1104,7 @@ { if (response == 0) { - if (!process_results (screen_cast_session, results, &error)) + if (!process_results (screen_cast_session, &results, &error)) { g_warning ("Failed to process results: %s", error->message); g_clear_error (&error); @@ -734,7 +1163,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } SESSION_AUTOLOCK_UNREF (session); @@ -750,20 +1179,20 @@ G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Sources not selected"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; case SCREEN_CAST_SESSION_STATE_STARTING: case SCREEN_CAST_SESSION_STATE_STARTED: g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Can only start once"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; case SCREEN_CAST_SESSION_STATE_CLOSED: g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_object_set_data_full (G_OBJECT (request), @@ -778,7 +1207,7 @@ if (!impl_request) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } request_set_impl_request (request, impl_request); @@ -805,7 +1234,7 @@ xdp_screen_cast_complete_start (object, invocation, request->id); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -831,7 +1260,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } SESSION_AUTOLOCK_UNREF (session); @@ -855,7 +1284,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED, "Invalid session"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } if (!streams) @@ -864,7 +1293,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "No streams available"); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } remote = open_pipewire_screen_cast_remote (session->app_id, streams, &error); @@ -874,7 +1303,7 @@ G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "%s", error->message); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } out_fd_list = g_unix_fd_list_new (); @@ -890,13 +1319,13 @@ G_DBUS_ERROR_ACCESS_DENIED, "Failed to append fd: %s", error->message); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } xdp_screen_cast_complete_open_pipewire_remote (object, invocation, out_fd_list, g_variant_new_handle (fd_id)); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void @@ -946,7 +1375,7 @@ static void screen_cast_init (ScreenCast *screen_cast) { - xdp_screen_cast_set_version (XDP_SCREEN_CAST (screen_cast), 3); + xdp_screen_cast_set_version (XDP_SCREEN_CAST (screen_cast), 4); g_signal_connect (impl, "notify::supported-source-types", G_CALLBACK (on_supported_source_types_changed), @@ -1002,6 +1431,8 @@ screen_cast_session->state = SCREEN_CAST_SESSION_STATE_CLOSED; + generate_and_save_restore_token (screen_cast_session); + g_debug ("screen cast session owned by '%s' closed", session->sender); } @@ -1010,6 +1441,9 @@ { ScreenCastSession *screen_cast_session = (ScreenCastSession *)object; + g_clear_pointer (&screen_cast_session->restore_token, g_free); + g_clear_pointer (&screen_cast_session->restore_data, g_variant_unref); + g_list_free_full (screen_cast_session->streams, (GDestroyNotify)screen_cast_stream_free); diff -Nru xdg-desktop-portal-1.8.1/src/screen-cast.h xdg-desktop-portal-1.14.3/src/screen-cast.h --- xdg-desktop-portal-1.8.1/src/screen-cast.h 2019-11-23 00:40:44.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/screen-cast.h 2022-03-28 18:02:35.000000000 +0000 @@ -35,6 +35,8 @@ int32_t *width, int32_t *height); +void screen_cast_remove_transient_permissions_for_sender (const char *sender); + GList * collect_screen_cast_stream_data (GVariantIter *streams_iter); GDBusInterfaceSkeleton * screen_cast_create (GDBusConnection *connection, diff -Nru xdg-desktop-portal-1.8.1/src/screenshot.c xdg-desktop-portal-1.14.3/src/screenshot.c --- xdg-desktop-portal-1.8.1/src/screenshot.c 2021-02-09 20:03:56.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/screenshot.c 2022-03-29 22:00:20.000000000 +0000 @@ -94,7 +94,11 @@ goto out; } - ruri = register_document (uri, xdp_app_info_get_id (request->app_info), FALSE, FALSE, FALSE, &error); + if (xdp_app_info_is_host (request->app_info)) + ruri = g_strdup (uri); + else + ruri = register_document (uri, xdp_app_info_get_id (request->app_info), FALSE, FALSE, FALSE, &error); + if (ruri == NULL) g_warning ("Failed to register %s: %s", uri, error->message); else @@ -144,6 +148,7 @@ result, &error)) { + g_dbus_error_strip_remote_error (error); g_warning ("A backend call failed: %s", error->message); } @@ -183,7 +188,7 @@ if (!impl_request) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } request_set_impl_request (request, impl_request); @@ -205,7 +210,7 @@ xdp_screenshot_complete_screenshot (object, invocation, request->id); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void @@ -225,6 +230,7 @@ result, &error)) { + g_dbus_error_strip_remote_error (error); g_warning ("A backend call failed: %s", error->message); } @@ -262,7 +268,7 @@ if (!impl_request) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } request_set_impl_request (request, impl_request); @@ -284,7 +290,7 @@ xdp_screenshot_complete_pick_color (object, invocation, request->id); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void @@ -295,9 +301,9 @@ } static void -screenshot_init (Screenshot *fc) +screenshot_init (Screenshot *screenshot) { - xdp_screenshot_set_version (XDP_SCREENSHOT (fc), 2); + xdp_screenshot_set_version (XDP_SCREENSHOT (screenshot), 2); } static void diff -Nru xdg-desktop-portal-1.8.1/src/sd-escape.c xdg-desktop-portal-1.14.3/src/sd-escape.c --- xdg-desktop-portal-1.8.1/src/sd-escape.c 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/sd-escape.c 2022-03-29 22:00:20.000000000 +0000 @@ -0,0 +1,356 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ + +#include "sd-escape.h" +#include + +/* The following is copied from these files in systemd with minor + * modifications: + * - src/basic/escape.c + * - src/basic/utf8.c + * - src/basic/hexdecoct.c + */ + +static int unhexchar(char c) { + + if (c >= '0' && c <= '9') + return c - '0'; + + if (c >= 'a' && c <= 'f') + return c - 'a' + 10; + + if (c >= 'A' && c <= 'F') + return c - 'A' + 10; + + return -EINVAL; +} + +static gboolean +unichar_is_valid(guint32 ch) { + + if (ch >= 0x110000) /* End of unicode space */ + return FALSE; + if ((ch & 0xFFFFF800) == 0xD800) /* Reserved area for UTF-16 */ + return FALSE; + if ((ch >= 0xFDD0) && (ch <= 0xFDEF)) /* Reserved */ + return FALSE; + if ((ch & 0xFFFE) == 0xFFFE) /* BOM (Byte Order Mark) */ + return FALSE; + + return TRUE; +} + +static int +unoctchar(char c) { + + if (c >= '0' && c <= '7') + return c - '0'; + + return -EINVAL; +} + +int cunescape_one(const char *p, gsize length, guint32 *ret, gboolean *eight_bit, gboolean accept_nul) { + int r = 1; + + g_assert(p); + g_assert(ret); + + /* Unescapes C style. Returns the unescaped character in ret. + * Sets *eight_bit to true if the escaped sequence either fits in + * one byte in UTF-8 or is a non-unicode literal byte and should + * instead be copied directly. + */ + + if (length != G_MAXSIZE && length < 1) + return -EINVAL; + + switch (p[0]) { + + case 'a': + *ret = '\a'; + break; + case 'b': + *ret = '\b'; + break; + case 'f': + *ret = '\f'; + break; + case 'n': + *ret = '\n'; + break; + case 'r': + *ret = '\r'; + break; + case 't': + *ret = '\t'; + break; + case 'v': + *ret = '\v'; + break; + case '\\': + *ret = '\\'; + break; + case '"': + *ret = '"'; + break; + case '\'': + *ret = '\''; + break; + + case 's': + /* This is an extension of the XDG syntax files */ + *ret = ' '; + break; + + case 'x': { + /* hexadecimal encoding */ + int a, b; + + if (length != G_MAXSIZE && length < 3) + return -EINVAL; + + a = unhexchar(p[1]); + if (a < 0) + return -EINVAL; + + b = unhexchar(p[2]); + if (b < 0) + return -EINVAL; + + /* Don't allow NUL bytes */ + if (a == 0 && b == 0 && !accept_nul) + return -EINVAL; + + *ret = (a << 4U) | b; + *eight_bit = TRUE; + r = 3; + break; + } + + case 'u': { + /* C++11 style 16bit unicode */ + + int a[4]; + gsize i; + guint32 c; + + if (length != G_MAXSIZE && length < 5) + return -EINVAL; + + for (i = 0; i < 4; i++) { + a[i] = unhexchar(p[1 + i]); + if (a[i] < 0) + return a[i]; + } + + c = ((guint32) a[0] << 12U) | ((guint32) a[1] << 8U) | ((guint32) a[2] << 4U) | (guint32) a[3]; + + /* Don't allow 0 chars */ + if (c == 0 && !accept_nul) + return -EINVAL; + + *ret = c; + r = 5; + break; + } + + case 'U': { + /* C++11 style 32bit unicode */ + + int a[8]; + gsize i; + guint32 c; + + if (length != G_MAXSIZE && length < 9) + return -EINVAL; + + for (i = 0; i < 8; i++) { + a[i] = unhexchar(p[1 + i]); + if (a[i] < 0) + return a[i]; + } + + c = ((guint32) a[0] << 28U) | ((guint32) a[1] << 24U) | ((guint32) a[2] << 20U) | ((guint32) a[3] << 16U) | + ((guint32) a[4] << 12U) | ((guint32) a[5] << 8U) | ((guint32) a[6] << 4U) | (guint32) a[7]; + + /* Don't allow 0 chars */ + if (c == 0 && !accept_nul) + return -EINVAL; + + /* Don't allow invalid code points */ + if (!unichar_is_valid(c)) + return -EINVAL; + + *ret = c; + r = 9; + break; + } + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': { + /* octal encoding */ + int a, b, c; + guint32 m; + + if (length != G_MAXSIZE && length < 3) + return -EINVAL; + + a = unoctchar(p[0]); + if (a < 0) + return -EINVAL; + + b = unoctchar(p[1]); + if (b < 0) + return -EINVAL; + + c = unoctchar(p[2]); + if (c < 0) + return -EINVAL; + + /* don't allow NUL bytes */ + if (a == 0 && b == 0 && c == 0 && !accept_nul) + return -EINVAL; + + /* Don't allow bytes above 255 */ + m = ((guint32) a << 6U) | ((guint32) b << 3U) | (guint32) c; + if (m > 255) + return -EINVAL; + + *ret = m; + *eight_bit = TRUE; + r = 3; + break; + } + + default: + return -EINVAL; + } + + return r; +} + +/** + * utf8_encode_unichar() - Encode single UCS-4 character as UTF-8 + * @out_utf8: output buffer of at least 4 bytes or NULL + * @g: UCS-4 character to encode + * + * This encodes a single UCS-4 character as UTF-8 and writes it into @out_utf8. + * The length of the character is returned. It is not zero-terminated! If the + * output buffer is NULL, only the length is returned. + * + * Returns: The length in bytes that the UTF-8 representation does or would + * occupy. + */ +static gsize +utf8_encode_unichar(char *out_utf8, guint32 g) { + + if (g < (1 << 7)) { + if (out_utf8) + out_utf8[0] = g & 0x7f; + return 1; + } else if (g < (1 << 11)) { + if (out_utf8) { + out_utf8[0] = 0xc0 | ((g >> 6) & 0x1f); + out_utf8[1] = 0x80 | (g & 0x3f); + } + return 2; + } else if (g < (1 << 16)) { + if (out_utf8) { + out_utf8[0] = 0xe0 | ((g >> 12) & 0x0f); + out_utf8[1] = 0x80 | ((g >> 6) & 0x3f); + out_utf8[2] = 0x80 | (g & 0x3f); + } + return 3; + } else if (g < (1 << 21)) { + if (out_utf8) { + out_utf8[0] = 0xf0 | ((g >> 18) & 0x07); + out_utf8[1] = 0x80 | ((g >> 12) & 0x3f); + out_utf8[2] = 0x80 | ((g >> 6) & 0x3f); + out_utf8[3] = 0x80 | (g & 0x3f); + } + return 4; + } + + return 0; +} + +gssize cunescape_length_with_prefix(const char *s, gsize length, const char *prefix, UnescapeFlags flags, char **ret) { + g_autofree char *ans = NULL; + char *t; + const char *f; + gsize pl; + int r; + + g_assert(s); + g_assert(ret); + + /* Undoes C style string escaping, and optionally prefixes it. */ + + if (!prefix) + pl = 0; + else + pl = strlen(prefix); + + ans = g_new(char, pl+length+1); + if (!ans) + return -ENOMEM; + + if (prefix) + memcpy(ans, prefix, pl); + + for (f = s, t = ans + pl; f < s + length; f++) { + gsize remaining; + gboolean eight_bit = FALSE; + guint32 u; + + remaining = s + length - f; + g_assert(remaining > 0); + + if (*f != '\\') { + /* A literal, copy verbatim */ + *(t++) = *f; + continue; + } + + if (remaining == 1) { + if (flags & UNESCAPE_RELAX) { + /* A trailing backslash, copy verbatim */ + *(t++) = *f; + continue; + } + + return -EINVAL; + } + + r = cunescape_one(f + 1, remaining - 1, &u, &eight_bit, flags & UNESCAPE_ACCEPT_NUL); + if (r < 0) { + if (flags & UNESCAPE_RELAX) { + /* Invalid escape code, let's take it literal then */ + *(t++) = '\\'; + continue; + } + + return r; + } + + f += r; + if (eight_bit) + /* One byte? Set directly as specified */ + *(t++) = u; + else + /* Otherwise encode as multi-byte UTF-8 */ + t += utf8_encode_unichar(t, u); + } + + *t = 0; + + g_assert(t >= ans); /* Let static analyzers know that the answer is non-negative. */ + *ret = g_steal_pointer (&ans); + return t - *ret; +} + diff -Nru xdg-desktop-portal-1.8.1/src/sd-escape.h xdg-desktop-portal-1.14.3/src/sd-escape.h --- xdg-desktop-portal-1.8.1/src/sd-escape.h 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/sd-escape.h 2022-03-29 22:00:20.000000000 +0000 @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +#pragma once + +#include +#include + +typedef enum UnescapeFlags { + UNESCAPE_RELAX = 1 << 0, + UNESCAPE_ACCEPT_NUL = 1 << 1, +} UnescapeFlags; + +gssize cunescape_length_with_prefix(const char *s, gsize length, const char *prefix, UnescapeFlags flags, char **ret); +static inline gssize cunescape_length(const char *s, gsize length, UnescapeFlags flags, char **ret) { + return cunescape_length_with_prefix(s, length, NULL, flags, ret); +} +static inline gssize cunescape(const char *s, UnescapeFlags flags, char **ret) { + return cunescape_length(s, strlen(s), flags, ret); +} diff -Nru xdg-desktop-portal-1.8.1/src/secret.c xdg-desktop-portal-1.14.3/src/secret.c --- xdg-desktop-portal-1.8.1/src/secret.c 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/secret.c 2022-03-29 22:00:20.000000000 +0000 @@ -107,6 +107,7 @@ result, &error)) { + g_dbus_error_strip_remote_error (error); g_warning ("Backend call failed: %s", error->message); } @@ -140,7 +141,7 @@ if (!impl_request) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_variant_builder_init (&options, G_VARIANT_TYPE_VARDICT); @@ -150,7 +151,7 @@ &error)) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } request_set_impl_request (request, impl_request); @@ -168,7 +169,7 @@ retrieve_secret_done, g_object_ref (request)); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void diff -Nru xdg-desktop-portal-1.8.1/src/session.c xdg-desktop-portal-1.14.3/src/session.c --- xdg-desktop-portal-1.8.1/src/session.c 2019-12-11 05:12:01.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/session.c 2022-03-28 18:02:35.000000000 +0000 @@ -174,6 +174,15 @@ SESSION_GET_CLASS (session)->close (session); + if (notify_closed) + { + GVariantBuilder details_builder; + + g_variant_builder_init (&details_builder, G_VARIANT_TYPE_VARDICT); + g_signal_emit_by_name (session, "closed", + g_variant_builder_end (&details_builder)); + } + if (session->exported) session_unexport (session); @@ -193,14 +202,6 @@ session->closed = TRUE; - if (notify_closed) - { - GVariantBuilder details_builder; - - g_variant_builder_init (&details_builder, G_VARIANT_TYPE_VARDICT); - g_signal_emit_by_name (session, "closed", - g_variant_builder_end (&details_builder)); - } g_object_unref (session); } @@ -272,9 +273,9 @@ } static void -on_closed (XdpImplSession *object) +on_closed (XdpImplSession *object, GObject *data) { - Session *session = (Session *)object; + Session *session = (Session *)data; SESSION_AUTOLOCK_UNREF (g_object_ref (session)); @@ -339,7 +340,7 @@ if (!impl_session) return FALSE; - g_signal_connect (impl_session, "closed", G_CALLBACK (on_closed), NULL); + g_signal_connect (impl_session, "closed", G_CALLBACK (on_closed), session); session->impl_session = g_steal_pointer (&impl_session); } diff -Nru xdg-desktop-portal-1.8.1/src/settings.c xdg-desktop-portal-1.14.3/src/settings.c --- xdg-desktop-portal-1.8.1/src/settings.c 2020-03-13 12:38:05.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/settings.c 2022-03-29 22:00:20.000000000 +0000 @@ -45,7 +45,7 @@ }; static XdpImplSettings **impls; -static int n_impls; +static int n_impls = 0; GType settings_get_type (void) G_GNUC_CONST; static void settings_iface_init (XdpSettingsIface *iface); @@ -88,7 +88,7 @@ g_dbus_method_invocation_return_value (invocation, g_variant_builder_end (builder)); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -114,7 +114,7 @@ else { g_dbus_method_invocation_return_value (invocation, g_variant_new ("(v)", impl_value)); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } } @@ -123,7 +123,7 @@ XDG_DESKTOP_PORTAL_ERROR_NOT_FOUND, _("Requested setting not found")); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void @@ -145,9 +145,9 @@ } static void -settings_init (Settings *self) +settings_init (Settings *settings) { - xdp_settings_set_version (XDP_SETTINGS (self), 1); + xdp_settings_set_version (XDP_SETTINGS (settings), 1); } static void @@ -177,27 +177,38 @@ Settings *settings; g_autoptr(GError) error = NULL; int i; + int n_impls_tmp; - n_impls = implementations->len; - impls = g_new (XdpImplSettings *, n_impls); + n_impls_tmp = implementations->len; + impls = g_new (XdpImplSettings *, n_impls_tmp); settings = g_object_new (settings_get_type (), NULL); - for (i = 0; i < n_impls; i++) + for (i = 0; i < n_impls_tmp; i++) { PortalImplementation *impl = g_ptr_array_index (implementations, i); const char *dbus_name = impl->dbus_name; - impls[i] = xdp_impl_settings_proxy_new_sync (connection, - G_DBUS_PROXY_FLAGS_NONE, - dbus_name, - DESKTOP_PORTAL_OBJECT_PATH, - NULL, - &error); - if (impls[i] == NULL) - g_warning ("Failed to create settings proxy: %s", error->message); + XdpImplSettings *impl_proxy = xdp_impl_settings_proxy_new_sync (connection, + G_DBUS_PROXY_FLAGS_NONE, + dbus_name, + DESKTOP_PORTAL_OBJECT_PATH, + NULL, + &error); + if (impl_proxy == NULL) + { + g_warning ("Failed to create settings proxy: %s", error->message); + } else - g_signal_connect (impls[i], "setting-changed", G_CALLBACK (on_impl_settings_changed), settings); + { + impls[n_impls++] = impl_proxy; + g_signal_connect (impl_proxy, "setting-changed", G_CALLBACK (on_impl_settings_changed), settings); + } + } + + if (!n_impls) + { + return NULL; } return G_DBUS_INTERFACE_SKELETON (settings); diff -Nru xdg-desktop-portal-1.8.1/src/trash.c xdg-desktop-portal-1.14.3/src/trash.c --- xdg-desktop-portal-1.8.1/src/trash.c 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/trash.c 2022-03-29 22:00:20.000000000 +0000 @@ -68,15 +68,28 @@ g_autofree char *path = NULL; gboolean writable; g_autoptr(GFile) file = NULL; + g_autoptr(GError) local_error = NULL; - path = xdp_app_info_get_path_for_fd (app_info, fd, 0, NULL, &writable); + path = xdp_app_info_get_path_for_fd (app_info, fd, 0, NULL, &writable, &local_error); - if (path == NULL || !writable) - return 0; + if (path == NULL) + { + g_debug ("Cannot trash file with invalid fd: %s", local_error->message); + return 0; + } + + if (!writable) + { + g_debug ("Cannot trash file \"%s\": not opened for writing", path); + return 0; + } file = g_file_new_for_path (path); - if (!g_file_trash (file, NULL, NULL)) - return 0; + if (!g_file_trash (file, NULL, &local_error)) + { + g_debug ("Cannot trash file \"%s\": %s", path, local_error->message); + return 0; + } return 1; } @@ -102,7 +115,7 @@ xdp_trash_complete_trash_file (object, invocation, NULL, result); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void @@ -112,9 +125,9 @@ } static void -trash_init (Trash *fc) +trash_init (Trash *trash) { - xdp_trash_set_version (XDP_TRASH (fc), 1); + xdp_trash_set_version (XDP_TRASH (trash), 1); } static void diff -Nru xdg-desktop-portal-1.8.1/src/validate-icon.c xdg-desktop-portal-1.14.3/src/validate-icon.c --- xdg-desktop-portal-1.8.1/src/validate-icon.c 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/validate-icon.c 2022-03-29 22:00:20.000000000 +0000 @@ -0,0 +1,276 @@ +/* + * Copyright © 2018 Red Hat, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Authors: + * Matthias Clasen + */ + +/* The canonical copy of this file is in: + * - https://github.com/flatpak/flatpak at icon-validator/validate-icon.c + * Known copies of this file are in: + * - https://github.com/flatpak/xdg-desktop-portal at src/validate-icon.c + */ + +#include +#include +#include +#include + +#define ICON_VALIDATOR_GROUP "Icon Validator" + +static int +validate_icon (const char *arg_width, + const char *arg_height, + const char *filename) +{ + GdkPixbufFormat *format; + int max_width, max_height; + int width, height; + const char *name; + const char *allowed_formats[] = { "png", "jpeg", "svg", NULL }; + g_autoptr(GdkPixbuf) pixbuf = NULL; + g_autoptr(GError) error = NULL; + g_autoptr(GKeyFile) key_file = NULL; + g_autofree char *key_file_data = NULL; + + format = gdk_pixbuf_get_file_info (filename, &width, &height); + if (format == NULL) + { + g_printerr ("Format not recognized\n"); + return 1; + } + + name = gdk_pixbuf_format_get_name (format); + if (!g_strv_contains (allowed_formats, name)) + { + g_printerr ("Format %s not accepted\n", name); + return 1; + } + + if (!g_str_equal (name, "svg")) + { + max_width = g_ascii_strtoll (arg_width, NULL, 10); + if (max_width < 16 || max_width > 4096) + { + g_printerr ("Bad width limit: %s\n", arg_width); + return 1; + } + + max_height = g_ascii_strtoll (arg_height, NULL, 10); + if (max_height < 16 || max_height > 4096) + { + g_printerr ("Bad height limit: %s\n", arg_height); + return 1; + } + } + else + { + /* Sanity check for vector files */ + max_height = max_width = 4096; + } + + if (width > max_width || height > max_height) + { + g_printerr ("Image too large (%dx%d). Max. size %dx%d\n", width, height, max_width, max_height); + return 1; + } + + pixbuf = gdk_pixbuf_new_from_file (filename, &error); + if (pixbuf == NULL) + { + g_printerr ("Failed to load image: %s\n", error->message); + return 1; + } + + if (width != height) + { + g_printerr ("Expected a square icon but got: %dx%d\n", width, height); + return 1; + } + + /* Print the format and size for consumption by (at least) the dynamic + * launcher portal. xdg-desktop-portal has a copy of this file. Use a + * GKeyFile so the output can be easily extended in the future in a backwards + * compatible way. + */ + key_file = g_key_file_new (); + g_key_file_set_string (key_file, ICON_VALIDATOR_GROUP, "format", name); + g_key_file_set_integer (key_file, ICON_VALIDATOR_GROUP, "width", width); + key_file_data = g_key_file_to_data (key_file, NULL, NULL); + g_print ("%s", key_file_data); + + return 0; +} + +G_GNUC_NULL_TERMINATED +static void +add_args (GPtrArray *argv_array, ...) +{ + va_list args; + const char *arg; + + va_start (args, argv_array); + while ((arg = va_arg (args, const gchar *))) + g_ptr_array_add (argv_array, g_strdup (arg)); + va_end (args); +} + +const char * +flatpak_get_bwrap (void) +{ + const char *e = g_getenv ("FLATPAK_BWRAP"); + + if (e != NULL) + return e; + return HELPER; +} + + +static gboolean +path_is_usrmerged (const char *dir) +{ + /* does /dir point to /usr/dir? */ + g_autofree char *target = NULL; + GStatBuf stat_buf_src, stat_buf_target; + + if (g_stat (dir, &stat_buf_src) < 0) + return FALSE; + + target = g_strdup_printf ("/usr/%s", dir); + + if (g_stat (target, &stat_buf_target) < 0) + return FALSE; + + return (stat_buf_src.st_dev == stat_buf_target.st_dev) && + (stat_buf_src.st_ino == stat_buf_target.st_ino); +} + +static int +rerun_in_sandbox (const char *arg_width, + const char *arg_height, + const char *filename) +{ + const char * const usrmerged_dirs[] = { "bin", "lib32", "lib64", "lib", "sbin" }; + int i; + g_autoptr(GPtrArray) args = g_ptr_array_new_with_free_func (g_free); + char validate_icon[PATH_MAX + 1]; + ssize_t symlink_size; + + symlink_size = readlink ("/proc/self/exe", validate_icon, sizeof (validate_icon) - 1); + if (symlink_size < 0 || (size_t) symlink_size >= sizeof (validate_icon)) + { + g_printerr ("Error: failed to read /proc/self/exe\n"); + return 1; + } + + validate_icon[symlink_size] = 0; + + add_args (args, + flatpak_get_bwrap (), + "--unshare-ipc", + "--unshare-net", + "--unshare-pid", + "--ro-bind", "/usr", "/usr", + "--ro-bind-try", "/etc/ld.so.cache", "/etc/ld.so.cache", + "--ro-bind", validate_icon, validate_icon, + NULL); + + /* These directories might be symlinks into /usr/... */ + for (i = 0; i < G_N_ELEMENTS (usrmerged_dirs); i++) + { + g_autofree char *absolute_dir = g_strdup_printf ("/%s", usrmerged_dirs[i]); + + if (!g_file_test (absolute_dir, G_FILE_TEST_EXISTS)) + continue; + + if (path_is_usrmerged (absolute_dir)) + { + g_autofree char *symlink_target = g_strdup_printf ("/usr/%s", absolute_dir); + + add_args (args, + "--symlink", symlink_target, absolute_dir, + NULL); + } + else + { + add_args (args, + "--ro-bind", absolute_dir, absolute_dir, + NULL); + } + } + + add_args (args, + "--tmpfs", "/tmp", + "--proc", "/proc", + "--dev", "/dev", + "--chdir", "/", + "--setenv", "GIO_USE_VFS", "local", + "--unsetenv", "TMPDIR", + "--die-with-parent", + "--ro-bind", filename, filename, + NULL); + + if (g_getenv ("G_MESSAGES_DEBUG")) + add_args (args, "--setenv", "G_MESSAGES_DEBUG", g_getenv ("G_MESSAGES_DEBUG"), NULL); + if (g_getenv ("G_MESSAGES_PREFIXED")) + add_args (args, "--setenv", "G_MESSAGES_PREFIXED", g_getenv ("G_MESSAGES_PREFIXED"), NULL); + + add_args (args, validate_icon, arg_width, arg_height, filename, NULL); + g_ptr_array_add (args, NULL); + + { + g_autofree char *cmdline = g_strjoinv (" ", (char **) args->pdata); + g_debug ("Icon validation: Spawning %s", cmdline); + } + + execvpe (flatpak_get_bwrap (), (char **) args->pdata, NULL); + /* If we get here, then execvpe() failed. */ + g_printerr ("Icon validation: execvpe %s: %s\n", flatpak_get_bwrap (), g_strerror (errno)); + return 1; +} + +static gboolean opt_sandbox; + +static GOptionEntry entries[] = { + { "sandbox", 0, 0, G_OPTION_ARG_NONE, &opt_sandbox, "Run in a sandbox", NULL }, + { NULL } +}; + +int +main (int argc, char *argv[]) +{ + GOptionContext *context; + GError *error = NULL; + + context = g_option_context_new ("WIDTH HEIGHT PATH"); + g_option_context_add_main_entries (context, entries, NULL); + if (!g_option_context_parse (context, &argc, &argv, &error)) + { + g_printerr ("Error: %s\n", error->message); + return 1; + } + + if (argc != 4) + { + g_printerr ("Usage: %s [OPTION…] WIDTH HEIGHT PATH\n", argv[0]); + return 1; + } + + if (opt_sandbox) + return rerun_in_sandbox (argv[1], argv[2], argv[3]); + else + return validate_icon (argv[1], argv[2], argv[3]); +} diff -Nru xdg-desktop-portal-1.8.1/src/wallpaper.c xdg-desktop-portal-1.14.3/src/wallpaper.c --- xdg-desktop-portal-1.8.1/src/wallpaper.c 2021-02-17 03:04:26.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/wallpaper.c 2022-03-29 22:00:20.000000000 +0000 @@ -90,6 +90,7 @@ result, &error)) { + g_dbus_error_strip_remote_error (error); g_warning ("A backend call failed: %s", error->message); } @@ -142,7 +143,7 @@ if (uri != NULL && fd != -1) { - g_warning ("Rejecting invalid open-uri request (both URI and fd are set)"); + g_warning ("Rejecting invalid set-wallpaper request (both URI and fd are set)"); if (request->exported) { g_variant_builder_init (&opt_builder, G_VARIANT_TYPE_VARDICT); @@ -183,6 +184,10 @@ if (g_str_equal (app_id, "")) { + /* Note: this will set the wallpaper permission for all unsandboxed + * apps for which an app ID can't be determined. + */ + g_assert (xdp_app_info_is_host (request->app_info)); title = g_strdup (_("Allow Applications to Set Backgrounds?")); subtitle = g_strdup (_("An application is requesting to be able to change the background image.")); } @@ -233,9 +238,11 @@ { g_autofree char *path = NULL; - path = xdp_app_info_get_path_for_fd (request->app_info, fd, 0, NULL, NULL); + path = xdp_app_info_get_path_for_fd (request->app_info, fd, 0, NULL, NULL, &error); if (path == NULL) { + g_debug ("Cannot get path for fd: %s", error->message); + /* Reject the request */ if (request->exported) { @@ -304,7 +311,7 @@ g_task_set_task_data (task, g_object_ref (request), g_object_unref); g_task_run_in_thread (task, handle_set_wallpaper_in_thread_func); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static gboolean @@ -327,7 +334,7 @@ if (fd == -1) { g_dbus_method_invocation_return_gerror (invocation, error); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } g_object_set_data (G_OBJECT (request), "fd", GINT_TO_POINTER (fd)); @@ -344,7 +351,7 @@ g_task_set_task_data (task, g_object_ref (request), g_object_unref); g_task_run_in_thread (task, handle_set_wallpaper_in_thread_func); - return TRUE; + return G_DBUS_METHOD_INVOCATION_HANDLED; } static void wallpaper_iface_init (XdpWallpaperIface *iface) diff -Nru xdg-desktop-portal-1.8.1/src/xdg-desktop-portal.c xdg-desktop-portal-1.14.3/src/xdg-desktop-portal.c --- xdg-desktop-portal-1.8.1/src/xdg-desktop-portal.c 2020-09-14 17:03:38.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/xdg-desktop-portal.c 2022-03-29 22:00:20.000000000 +0000 @@ -40,6 +40,7 @@ #include "print.h" #include "memory-monitor.h" #include "network-monitor.h" +#include "power-profile-monitor.h" #include "proxy-resolver.h" #include "screenshot.h" #include "notification.h" @@ -57,6 +58,8 @@ #include "camera.h" #include "secret.h" #include "wallpaper.h" +#include "realtime.h" +#include "dynamic-launcher.h" static GMainLoop *loop = NULL; @@ -121,13 +124,20 @@ else return TRUE; } - if (strcmp (interface, "org.freedesktop.portal.Camera") == 0) + else if (strcmp (interface, "org.freedesktop.portal.Camera") == 0) { if (strcmp (method, "OpenPipeWireRemote") == 0) return FALSE; else return TRUE; } + else if (strcmp (interface, "org.freedesktop.portal.DynamicLauncher") == 0) + { + if (strcmp (method, "PrepareInstall") == 0) + return TRUE; + else + return FALSE; + } else { return TRUE; @@ -195,6 +205,9 @@ { close_requests_for_sender (name); close_sessions_for_sender (name); +#ifdef HAVE_PIPEWIRE + screen_cast_remove_transient_permissions_for_sender (name); +#endif } static void @@ -227,10 +240,12 @@ lockdown = xdp_impl_lockdown_skeleton_new (); export_portal_implementation (connection, memory_monitor_create (connection)); + export_portal_implementation (connection, power_profile_monitor_create (connection)); export_portal_implementation (connection, network_monitor_create (connection)); export_portal_implementation (connection, proxy_resolver_create (connection)); export_portal_implementation (connection, trash_create (connection)); export_portal_implementation (connection, game_mode_create (connection)); + export_portal_implementation (connection, realtime_create (connection)); impls = find_all_portal_implementations ("org.freedesktop.impl.portal.Settings"); export_portal_implementation (connection, settings_create (connection, impls)); @@ -308,7 +323,14 @@ implementation = find_portal_implementation ("org.freedesktop.impl.portal.Secret"); if (implementation != NULL) export_portal_implementation (connection, - secret_create (connection, implementation->dbus_name)); + secret_create (connection, implementation->dbus_name)); + +#ifdef HAVE_GLIB_2_66 + implementation = find_portal_implementation ("org.freedesktop.impl.portal.DynamicLauncher"); + if (implementation != NULL) + export_portal_implementation (connection, + dynamic_launcher_create (connection, implementation->dbus_name)); +#endif #ifdef HAVE_PIPEWIRE implementation = find_portal_implementation ("org.freedesktop.impl.portal.ScreenCast"); @@ -352,6 +374,9 @@ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); + /* Note: if you add any more environment variables here, update + * handle_launch() in dynamic-launcher.c to unset them before launching apps + */ /* Avoid even loading gvfs to avoid accidental confusion */ g_setenv ("GIO_USE_VFS", "local", TRUE); diff -Nru xdg-desktop-portal-1.8.1/src/xdg-desktop-portal-rewrite-launchers.service.in xdg-desktop-portal-1.14.3/src/xdg-desktop-portal-rewrite-launchers.service.in --- xdg-desktop-portal-1.8.1/src/xdg-desktop-portal-rewrite-launchers.service.in 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/xdg-desktop-portal-rewrite-launchers.service.in 2022-03-29 22:00:20.000000000 +0000 @@ -0,0 +1,13 @@ +[Unit] +Description=Rewrite dynamic launcher portal entries +# Do it before the graphical session in case the launchers we need to rewrite +# are configured to launch automatically +PartOf=graphical-session-pre.target + +[Service] +Type=oneshot +ExecStart=@libexecdir@/xdg-desktop-portal-rewrite-launchers +Slice=session.slice + +[Install] +WantedBy=graphical-session-pre.target diff -Nru xdg-desktop-portal-1.8.1/src/xdg-desktop-portal.service.in xdg-desktop-portal-1.14.3/src/xdg-desktop-portal.service.in --- xdg-desktop-portal-1.8.1/src/xdg-desktop-portal.service.in 2019-11-23 00:40:44.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/xdg-desktop-portal.service.in 2022-03-28 18:02:35.000000000 +0000 @@ -5,3 +5,4 @@ Type=dbus BusName=org.freedesktop.portal.Desktop ExecStart=@libexecdir@/xdg-desktop-portal +Slice=session.slice diff -Nru xdg-desktop-portal-1.8.1/src/xdp-utils.c xdg-desktop-portal-1.14.3/src/xdp-utils.c --- xdg-desktop-portal-1.8.1/src/xdp-utils.c 2021-02-09 20:03:56.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/xdp-utils.c 2022-03-29 22:00:20.000000000 +0000 @@ -22,6 +22,7 @@ #include +#include #include #include #include @@ -30,6 +31,13 @@ #include #include +#ifdef HAVE_LIBSYSTEMD +#include +#include "sd-escape.h" +#endif + +#include +#include #include #include "xdp-utils.h" @@ -106,13 +114,6 @@ return -1; } -typedef enum -{ - XDP_APP_INFO_KIND_HOST = 0, - XDP_APP_INFO_KIND_FLATPAK = 1, - XDP_APP_INFO_KIND_SNAP = 2, -} XdpAppInfoKind; - struct _XdpAppInfo { volatile gint ref_count; char *id; @@ -124,7 +125,7 @@ { GKeyFile *keyfile; /* pid namespace mapping */ - GMutex *pidns_lock; + GMutex pidns_lock; ino_t pidns_id; } flatpak; struct @@ -143,11 +144,83 @@ return app_info; } +#ifdef HAVE_LIBSYSTEMD +char * +_xdp_parse_app_id_from_unit_name (const char *unit) +{ + g_autoptr(GRegex) regex = NULL; + g_autoptr(GMatchInfo) match = NULL; + g_autoptr(GError) error = NULL; + g_autofree char *app_id = NULL; + + g_assert (g_str_has_prefix (unit, "app-")); + + /* + * From https://systemd.io/DESKTOP_ENVIRONMENTS/ the format is one of: + * app[-]--.scope + * app[-]--autostart.service -> no longer true since systemd v248 + * app[-]-[@].service + * app[-]--.slice + */ + regex = g_regex_new ("^app-(?:[[:alnum:]]+\\-)?(.+?\\..+?\\..+?)" + "(?:[@\\-][[:alnum:]]*)?(?:-autostart)?" + "(?:\\.scope|\\.service|\\.slice)$", + 0, 0, &error); + g_assert (error == NULL); + if (g_regex_match (regex, unit, 0, &match)) + { + const char *escaped_app_id; + /* Unescape the unit name which may have \x hex codes in it, e.g. + * "app-gnome-org.gnome.Evolution\x2dalarm\x2dnotify-2437.scope" + */ + escaped_app_id = g_match_info_fetch (match, 1); + if (cunescape (escaped_app_id, UNESCAPE_RELAX, &app_id) < 0) + app_id = g_strdup (""); + } + else + { + app_id = g_strdup (""); + } + + return g_steal_pointer (&app_id); +} +#endif /* HAVE_LIBSYSTEMD */ + +void +set_appid_from_pid (XdpAppInfo *app_info, pid_t pid) +{ +#ifdef HAVE_LIBSYSTEMD + g_autofree char *unit = NULL; + int res; + + g_return_if_fail (app_info->id == NULL); + + res = sd_pid_get_user_unit (pid, &unit); + /* + * The session might not be managed by systemd or there could be an error + * fetching our own systemd units or the unit might not be started by the + * desktop environment (e.g. it's a script run from terminal). + */ + if (res == -ENODATA || res < 0 || !unit || !g_str_has_prefix (unit, "app-")) + { + app_info->id = g_strdup (""); + return; + } + + app_info->id = _xdp_parse_app_id_from_unit_name (unit); + g_debug ("Assigning app ID \"%s\" to pid %ld which has unit \"%s\"", + app_info->id, (long) pid, unit); + +#else + app_info->id = g_strdup (""); +#endif /* HAVE_LIBSYSTEMD */ +} + static XdpAppInfo * -xdp_app_info_new_host (void) +xdp_app_info_new_host (pid_t pid) { XdpAppInfo *app_info = xdp_app_info_new (XDP_APP_INFO_KIND_HOST); - app_info->id = g_strdup (""); + set_appid_from_pid (app_info, pid); return app_info; } @@ -200,6 +273,14 @@ return app_info->id; } +XdpAppInfoKind +xdp_app_info_get_kind (XdpAppInfo *app_info) +{ + g_return_val_if_fail (app_info != NULL, -1); + + return app_info->kind; +} + GAppInfo * xdp_app_info_load_app_info (XdpAppInfo *app_info) { @@ -232,20 +313,52 @@ return G_APP_INFO (g_desktop_app_info_new (desktop_id)); } +static gboolean +needs_quoting (const char *arg) +{ + while (*arg != 0) + { + char c = *arg; + if (!g_ascii_isalnum (c) && + !(c == '-' || c == '/' || c == '~' || + c == ':' || c == '.' || c == '_' || + c == '=' || c == '@')) + return TRUE; + arg++; + } + return FALSE; +} + +static char * +maybe_quote (const char *arg, + gboolean quote_escape) +{ + if (!quote_escape || !needs_quoting (arg)) + return g_strdup (arg); + else + return g_shell_quote (arg); +} + char ** xdp_app_info_rewrite_commandline (XdpAppInfo *app_info, - const char * const *commandline) + const char * const *commandline, + gboolean quote_escape) { + g_autoptr(GPtrArray) args = NULL; + g_return_val_if_fail (app_info != NULL, NULL); if (app_info->kind == XDP_APP_INFO_KIND_HOST) { - return g_strdupv ((char **)commandline); + int i; + args = g_ptr_array_new_with_free_func (g_free); + for (i = 0; commandline && commandline[i]; i++) + g_ptr_array_add (args, maybe_quote (commandline[i], quote_escape)); + g_ptr_array_add (args, NULL); + return (char **)g_ptr_array_free (g_steal_pointer (&args), FALSE); } else if (app_info->kind == XDP_APP_INFO_KIND_FLATPAK) { - g_autoptr(GPtrArray) args = NULL; - args = g_ptr_array_new_with_free_func (g_free); g_ptr_array_add (args, g_strdup ("flatpak")); @@ -253,14 +366,21 @@ if (commandline && commandline[0]) { int i; + g_autofree char *quoted_command = NULL; + + quoted_command = maybe_quote (commandline[0], quote_escape); - g_ptr_array_add (args, g_strdup_printf ("--command=%s", commandline[0])); - g_ptr_array_add (args, g_strdup (app_info->id)); + g_ptr_array_add (args, g_strdup_printf ("--command=%s", quoted_command)); + + /* Always quote the app ID to make rewriting the file simpler in case + * the app is renamed. + */ + g_ptr_array_add (args, g_shell_quote (app_info->id)); for (i = 1; commandline[i]; i++) - g_ptr_array_add (args, g_strdup (commandline[i])); + g_ptr_array_add (args, maybe_quote (commandline[i], quote_escape)); } else - g_ptr_array_add (args, g_strdup (app_info->id)); + g_ptr_array_add (args, g_shell_quote (app_info->id)); g_ptr_array_add (args, NULL); return (char **)g_ptr_array_free (g_steal_pointer (&args), FALSE); @@ -270,6 +390,56 @@ } char * +xdp_app_info_get_tryexec_path (XdpAppInfo *app_info) +{ + g_return_val_if_fail (app_info != NULL, NULL); + + if (app_info->kind == XDP_APP_INFO_KIND_FLATPAK) + { + g_autofree char *original_app_path = NULL; + g_autofree char *tryexec_path = NULL; + g_autofree char *app_slash = NULL; + g_autofree char *app_path = NULL; + char *app_slash_pointer; + char *path; + + original_app_path = g_key_file_get_string (app_info->u.flatpak.keyfile, + FLATPAK_METADATA_GROUP_INSTANCE, + FLATPAK_METADATA_KEY_ORIGINAL_APP_PATH, NULL); + app_path = g_key_file_get_string (app_info->u.flatpak.keyfile, + FLATPAK_METADATA_GROUP_INSTANCE, + FLATPAK_METADATA_KEY_APP_PATH, NULL); + path = original_app_path ? original_app_path : app_path; + + if (path == NULL || *path == '\0') + return NULL; + + app_slash = g_strconcat ("app/", app_info->id, NULL); + + app_slash_pointer = strstr (path, app_slash); + if (app_slash_pointer == NULL) + return NULL; + + /* Terminate path after the flatpak installation path such as .local/share/flatpak/ */ + *app_slash_pointer = '\0'; + + /* Find the path to the wrapper script exported by Flatpak, which can be + * used in a desktop file's TryExec= + */ + tryexec_path = g_strconcat (path, "exports/bin/", app_info->id, NULL); + if (access (tryexec_path, X_OK) != 0) + { + g_debug ("Wrapper script unexpectedly not executable or nonexistent: %s", tryexec_path); + return NULL; + } + + return g_steal_pointer (&tryexec_path); + } + else + return NULL; +} + +char * xdp_app_info_get_instance (XdpAppInfo *app_info) { g_return_val_if_fail (app_info != NULL, NULL); @@ -331,6 +501,20 @@ return g_build_filename ("/usr", path + strlen ("/run/host/usr/"), NULL); else if (g_str_has_prefix (path, "/run/host/etc/")) return g_build_filename ("/etc", path + strlen ("/run/host/etc/"), NULL); + else if (g_str_has_prefix (path, "/run/flatpak/app/")) + return g_build_filename (g_get_user_runtime_dir (), "app", + path + strlen ("/run/flatpak/app/"), NULL); + else if (g_str_has_prefix (path, "/run/flatpak/doc/")) + return g_build_filename (g_get_user_runtime_dir (), "doc", + path + strlen ("/run/flatpak/doc/"), NULL); + else if (g_str_has_prefix (path, "/var/config/")) + return g_build_filename (g_get_home_dir (), ".var", "app", + app_info->id, "config", + path + strlen ("/var/config/"), NULL); + else if (g_str_has_prefix (path, "/var/data/")) + return g_build_filename (g_get_home_dir (), ".var", "app", + app_info->id, "data", + path + strlen ("/var/data/"), NULL); } return g_strdup (path); @@ -472,7 +656,7 @@ group = "Runtime"; id = g_key_file_get_string (metadata, group, "name", error); - if (id == NULL) + if (id == NULL || !xdp_is_valid_app_id (id)) { close (info_fd); return NULL; @@ -511,9 +695,9 @@ /* Only consider the freezer, systemd group or unified cgroup * hierarchies */ - if ((!strcmp (controller, "freezer:") != 0 || - !strcmp (controller, "name=systemd:") != 0 || - !strcmp (controller, ":") != 0) && + if ((strcmp (controller, "freezer:") == 0 || + strcmp (controller, "name=systemd:") == 0 || + strcmp (controller, ":") == 0) && strstr (cgroup, "/snap.") != NULL) { *is_snap = TRUE; @@ -641,7 +825,7 @@ } if (app_info == NULL) - app_info = xdp_app_info_new_host (); + app_info = xdp_app_info_new_host (pid); return g_steal_pointer (&app_info); } @@ -854,14 +1038,21 @@ static char * verify_proc_self_fd (XdpAppInfo *app_info, - const char *proc_path) + const char *proc_path, + GError **error) { char path_buffer[PATH_MAX + 1]; ssize_t symlink_size; + int saved_errno; symlink_size = readlink (proc_path, path_buffer, PATH_MAX); if (symlink_size < 0) - return NULL; + { + saved_errno = errno; + g_set_error (error, G_IO_ERROR, g_io_error_from_errno (saved_errno), + "readlink %s: %s", proc_path, g_strerror (saved_errno)); + return NULL; + } path_buffer[symlink_size] = 0; @@ -869,16 +1060,24 @@ don't, such as socket:[27345] or anon_inode:[eventfd]. We don't support any of these */ if (path_buffer[0] != '/') - return NULL; + { + g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_FILENAME, + "Not a regular file or directory: %s", path_buffer); + return NULL; + } /* File descriptors to actually deleted files have " (deleted)" appended to them. This also happens to some fake fd types like shmem which are "/ (deleted)". All such - files are considered invalid. Unfortunatelly this also + files are considered invalid. Unfortunately this also matches files with filenames that actually end in " (deleted)", but there is not much to do about this. */ if (g_str_has_suffix (path_buffer, " (deleted)")) - return NULL; + { + g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_FILENAME, + "Cannot share deleted file: %s", path_buffer); + return NULL; + } /* remap from sandbox to host if needed */ return xdp_app_info_remap_path (app_info, path_buffer); @@ -899,6 +1098,9 @@ { int len; + if (g_str_equal (app_id, "")) + return NULL; + /* If we don't know where the document portal is mounted, then there * is no alternate path */ if (documents_mountpoint == NULL) @@ -913,45 +1115,115 @@ return g_strconcat (documents_mountpoint, "/by-app/", app_id, &path[len], NULL); } +static gboolean +check_same_file (const char *path, + struct stat *expected_st_buf, + GError **error) +{ + struct stat real_st_buf; + int saved_errno; + + if (stat (path, &real_st_buf) < 0) + { + saved_errno = errno; + g_set_error (error, G_IO_ERROR, g_io_error_from_errno (saved_errno), + "stat %s: %s", path, g_strerror (saved_errno)); + return FALSE; + } + + if (expected_st_buf->st_dev != real_st_buf.st_dev || + expected_st_buf->st_ino != real_st_buf.st_ino) + { + g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, + "\"%s\" identity (%ju,%ju) does not match expected (%ju,%ju)", + path, + (uintmax_t) expected_st_buf->st_dev, + (uintmax_t) expected_st_buf->st_ino, + (uintmax_t) real_st_buf.st_dev, + (uintmax_t) real_st_buf.st_ino); + return FALSE; + } + + return TRUE; +} + char * xdp_app_info_get_path_for_fd (XdpAppInfo *app_info, int fd, int require_st_mode, struct stat *st_buf, - gboolean *writable_out) + gboolean *writable_out, + GError **error) { g_autofree char *proc_path = NULL; int fd_flags; struct stat st_buf_store; - struct stat real_st_buf; gboolean writable = FALSE; g_autofree char *path = NULL; + int saved_errno; if (st_buf == NULL) st_buf = &st_buf_store; if (fd == -1) - return NULL; + { + g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT, + "Invalid file descriptor"); + return NULL; + } /* Must be able to get fd flags */ fd_flags = fcntl (fd, F_GETFL); if (fd_flags == -1) - return NULL; + { + saved_errno = errno; + g_set_error (error, G_IO_ERROR, g_io_error_from_errno (saved_errno), + "Cannot get file descriptor flags (fcntl F_GETFL: %s)", + g_strerror (saved_errno)); + return NULL; + } /* Must be able to fstat */ if (fstat (fd, st_buf) < 0) - return NULL; + { + saved_errno = errno; + g_set_error (error, G_IO_ERROR, g_io_error_from_errno (saved_errno), + "Cannot get file information (fstat: %s)", + g_strerror (saved_errno)); + return NULL; + } /* Verify mode */ if (require_st_mode != 0 && (st_buf->st_mode & S_IFMT) != require_st_mode) - return NULL; + { + switch (require_st_mode) + { + case S_IFDIR: + g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_DIRECTORY, + "File type 0o%o is not a directory", + (st_buf->st_mode & S_IFMT)); + return NULL; + + case S_IFREG: + g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_REGULAR_FILE, + "File type 0o%o is not a regular file", + (st_buf->st_mode & S_IFMT)); + return NULL; + + default: + g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT, + "File type 0o%o does not match expected 0o%o", + (st_buf->st_mode & S_IFMT), require_st_mode); + return NULL; + } + } proc_path = g_strdup_printf ("/proc/self/fd/%d", fd); /* Must be able to read valid path from /proc/self/fd */ /* This is an absolute and (at least at open time) symlink-expanded path */ - path = verify_proc_self_fd (app_info, proc_path); + path = verify_proc_self_fd (app_info, proc_path, error); if (path == NULL) return NULL; @@ -972,10 +1244,19 @@ /* Must not be O_NOFOLLOW (because we want the target file) */ if ((fd_flags & O_NOFOLLOW) == O_NOFOLLOW) - return NULL; + { + g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT, + "O_PATH fd was opened O_NOFOLLOW"); + return NULL; + } if (!xdp_app_info_supports_opath (app_info)) - return NULL; + { + g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, + "App \"%s\" of type %d does not support O_PATH fd passing", + app_info->id, app_info->kind); + return NULL; + } read_access_mode = R_OK; if (S_ISDIR (st_buf->st_mode)) @@ -984,7 +1265,12 @@ /* Must be able to access the path via the sandbox supplied O_PATH fd, which applies the sandbox side mount options (like readonly). */ if (access (proc_path, read_access_mode) != 0) - return NULL; + { + g_set_error (error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, + "\"%s\" not available for read access via \"%s\"", + path, proc_path); + return NULL; + } if (xdp_app_info_is_host (app_info) || access (proc_path, W_OK) == 0) writable = TRUE; @@ -1006,9 +1292,7 @@ } /* Verify that this is the same file as the app opened */ - if (stat (path, &real_st_buf) < 0 || - st_buf->st_dev != real_st_buf.st_dev || - st_buf->st_ino != real_st_buf.st_ino) + if (!check_same_file (path, st_buf, error)) { /* If the path is provided by the document portal, the inode number will not match, due to only a subtree being mounted in @@ -1021,10 +1305,12 @@ g_autofree char *alt_path = NULL; alt_path = xdp_get_alternate_document_path (path, xdp_app_info_get_id (app_info)); - if (alt_path == NULL || - stat (alt_path, &real_st_buf) < 0 || - st_buf->st_dev != real_st_buf.st_dev || - st_buf->st_ino != real_st_buf.st_ino) + if (alt_path == NULL) + return NULL; + + g_clear_error (error); + + if (!check_same_file (alt_path, st_buf, error)) return NULL; } @@ -1100,22 +1386,6 @@ } -static gboolean -needs_quoting (const char *arg) -{ - while (*arg != 0) - { - char c = *arg; - if (!g_ascii_isalnum (c) && - !(c == '-' || c == '/' || c == '~' || - c == ':' || c == '.' || c == '_' || - c == '=')) - return TRUE; - arg++; - } - return FALSE; -} - char * xdp_quote_argv (const char *argv[]) { @@ -1566,7 +1836,7 @@ pid_t inside = 0; uid_t uid = 0; guint idx; - ino_t ns; + ino_t ns = 0; int r; if (de->d_type != DT_DIR) @@ -1709,7 +1979,7 @@ } static JsonNode * -xdg_app_info_load_brwap_info (XdpAppInfo *app_info, +xdp_app_info_load_bwrap_info (XdpAppInfo *app_info, GError **error) { g_autoptr(JsonParser) parser = NULL; @@ -1724,7 +1994,11 @@ instance = xdp_app_info_get_instance (app_info); if (instance == NULL) - return 0; + { + g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, + "Could not find instance-id in process's /.flatpak-info"); + return 0; + } path = g_build_filename (g_get_user_runtime_dir (), ".flatpak", @@ -1768,7 +2042,7 @@ JsonObject *cpo; gint64 nsid; - /* xdg_app_info_load_brwap_info assures root is of type object */ + /* xdp_app_info_load_bwrap_info assures root is of type object */ cpo = json_node_get_object (root); node = json_object_get_member (cpo, "pid-namespace"); @@ -1803,23 +2077,25 @@ #define xdp_lockguard G_GNUC_UNUSED __attribute__((cleanup(xdp_auto_unlock_helper))) static gboolean -xdg_app_info_ensure_pidns (XdpAppInfo *app_info, +xdp_app_info_ensure_pidns (XdpAppInfo *app_info, DIR *proc, GError **error) { g_autoptr(JsonNode) root = NULL; - xdp_lockguard GMutex *guard = NULL; + g_autoptr(GMutexLocker) guard = NULL; xdp_autofd int fd = -1; pid_t pid; ino_t ns; int r; - guard = xdp_auto_lock_helper (app_info->u.flatpak.pidns_lock); + g_assert (app_info->kind == XDP_APP_INFO_KIND_FLATPAK); + + guard = g_mutex_locker_new (&(app_info->u.flatpak.pidns_lock)); if (app_info->u.flatpak.pidns_id != 0) return TRUE; - root = xdg_app_info_load_brwap_info (app_info, error); + root = xdp_app_info_load_bwrap_info (app_info, error); if (root == NULL) return FALSE; @@ -1860,7 +2136,7 @@ gboolean -xdg_app_info_map_pids (XdpAppInfo *app_info, +xdp_app_info_map_pids (XdpAppInfo *app_info, pid_t *pids, guint n_pids, GError **error) @@ -1889,7 +2165,7 @@ } /* Make sure we know the pid namespace the app is running in */ - ok = xdg_app_info_ensure_pidns (app_info, proc, error); + ok = xdp_app_info_ensure_pidns (app_info, proc, error); if (!ok) { g_prefix_error (error, "Could not determine pid namespace: "); @@ -1910,7 +2186,7 @@ } gboolean -xdg_app_info_pidfds_to_pids (XdpAppInfo *app_info, +xdp_app_info_pidfds_to_pids (XdpAppInfo *app_info, const int *fds, pid_t *pids, gint count, @@ -1934,3 +2210,140 @@ return ok; } + +void +cleanup_temp_file (void *p) +{ + void **pp = (void **)p; + + if (*pp) + remove (*pp); + g_free (*pp); +} + +#define ICON_VALIDATOR_GROUP "Icon Validator" + +gboolean +xdp_validate_serialized_icon (GVariant *v, + gboolean bytes_only, + char **out_format, + char **out_size) +{ + g_autoptr(GIcon) icon = NULL; + GBytes *bytes; + __attribute__((cleanup(cleanup_temp_file))) char *name = NULL; + xdp_autofd int fd = -1; + g_autoptr(GOutputStream) stream = NULL; + int status; + g_autofree char *format = NULL; + g_autofree char *stdoutlog = NULL; + g_autofree char *stderrlog = NULL; + g_autoptr(GError) error = NULL; + const char *icon_validator = LIBEXECDIR "/xdg-desktop-portal-validate-icon"; + const char *args[6]; + /* same allowed formats as Flatpak */ + const char *allowed_icon_formats[] = { "png", "jpeg", "svg", NULL }; + int size; + const char *MAX_ICON_SIZE = "512"; + g_auto(GStrv) parts = NULL; + gconstpointer bytes_data; + gsize bytes_len; + g_autoptr(GKeyFile) key_file = NULL; + + icon = g_icon_deserialize (v); + if (!icon) + { + g_warning ("Icon deserialization failed"); + return FALSE; + } + + if (!bytes_only && G_IS_THEMED_ICON (icon)) + { + g_autofree char *a = g_strjoinv (" ", (char **)g_themed_icon_get_names (G_THEMED_ICON (icon))); + g_debug ("Icon validation: themed icon (%s) is ok", a); + return TRUE; + } + + if (!G_IS_BYTES_ICON (icon)) + { + g_warning ("Unexpected icon type: %s", G_OBJECT_TYPE_NAME (icon)); + return FALSE; + } + + if (!g_file_test (icon_validator, G_FILE_TEST_EXISTS)) + { + g_warning ("Icon validation: %s not found, rejecting icon by default.", icon_validator); + return FALSE; + } + + bytes = g_bytes_icon_get_bytes (G_BYTES_ICON (icon)); + fd = g_file_open_tmp ("iconXXXXXX", &name, &error); + if (fd == -1) + { + g_warning ("Icon validation: %s", error->message); + return FALSE; + } + + stream = g_unix_output_stream_new (fd, FALSE); + + /* Use write_all() instead of write_bytes() so we don't have to worry about + * partial writes (https://gitlab.gnome.org/GNOME/glib/-/issues/570). + */ + bytes_data = g_bytes_get_data (bytes, &bytes_len); + if (!g_output_stream_write_all (stream, bytes_data, bytes_len, NULL, NULL, &error)) + { + g_warning ("Icon validation: %s", error->message); + return FALSE; + } + + if (!g_output_stream_close (stream, NULL, &error)) + { + g_warning ("Icon validation: %s", error->message); + return FALSE; + } + + args[0] = icon_validator; + args[1] = "--sandbox"; + args[2] = MAX_ICON_SIZE; + args[3] = MAX_ICON_SIZE; + args[4] = name; + args[5] = NULL; + + if (!g_spawn_sync (NULL, (char **)args, NULL, 0, NULL, NULL, &stdoutlog, &stderrlog, &status, &error)) + { + g_warning ("Icon validation: %s", error->message); + g_warning ("stderr:\n%s\n", stderrlog); + return FALSE; + } + + if (!g_spawn_check_exit_status (status, &error)) + { + g_warning ("Icon validation: %s", error->message); + return FALSE; + } + + key_file = g_key_file_new (); + if (!g_key_file_load_from_data (key_file, stdoutlog, -1, G_KEY_FILE_NONE, &error)) + { + g_warning ("Icon validation: %s", error->message); + return FALSE; + } + if (!(format = g_key_file_get_string (key_file, ICON_VALIDATOR_GROUP, "format", &error)) || + !g_strv_contains (allowed_icon_formats, format)) + { + g_warning ("Icon validation: %s", error ? error->message : "not allowed format"); + return FALSE; + } + if (!(size = g_key_file_get_integer (key_file, ICON_VALIDATOR_GROUP, "width", &error))) + { + g_warning ("Icon validation: %s", error->message); + return FALSE; + } + + if (out_format) + *out_format = g_steal_pointer (&format); + if (out_size) + *out_size = g_strdup_printf ("%d", size); + + return TRUE; +} diff -Nru xdg-desktop-portal-1.8.1/src/xdp-utils.h xdg-desktop-portal-1.14.3/src/xdp-utils.h --- xdg-desktop-portal-1.8.1/src/xdp-utils.h 2021-02-09 20:03:56.000000000 +0000 +++ xdg-desktop-portal-1.14.3/src/xdp-utils.h 2022-03-29 22:00:20.000000000 +0000 @@ -29,12 +29,15 @@ #include #include +#include "glib-backports.h" + #define DESKTOP_PORTAL_OBJECT_PATH "/org/freedesktop/portal/desktop" #define FLATPAK_METADATA_GROUP_APPLICATION "Application" #define FLATPAK_METADATA_KEY_NAME "name" #define FLATPAK_METADATA_GROUP_INSTANCE "Instance" #define FLATPAK_METADATA_KEY_APP_PATH "app-path" +#define FLATPAK_METADATA_KEY_ORIGINAL_APP_PATH "original-app-path" #define FLATPAK_METADATA_KEY_RUNTIME_PATH "runtime-path" #define FLATPAK_METADATA_KEY_INSTANCE_ID "instance-id" @@ -43,6 +46,13 @@ #define SNAP_METADATA_KEY_DESKTOP_FILE "DesktopFile" #define SNAP_METADATA_KEY_NETWORK "HasNetworkStatus" +typedef enum +{ + XDP_APP_INFO_KIND_HOST = 0, + XDP_APP_INFO_KIND_FLATPAK = 1, + XDP_APP_INFO_KIND_SNAP = 2, +} XdpAppInfoKind; + gint xdp_mkstempat (int dir_fd, gchar *tmpl, int flags, @@ -50,6 +60,11 @@ gboolean xdp_is_valid_app_id (const char *string); +gboolean xdp_validate_serialized_icon (GVariant *v, + gboolean bytes_only, + char **out_format, + char **out_size); + typedef void (*XdpPeerDiedCallback) (const char *name); typedef struct _XdpAppInfo XdpAppInfo; @@ -62,14 +77,15 @@ const char *xdp_app_info_get_id (XdpAppInfo *app_info); char * xdp_app_info_get_instance (XdpAppInfo *app_info); gboolean xdp_app_info_is_host (XdpAppInfo *app_info); +XdpAppInfoKind xdp_app_info_get_kind (XdpAppInfo *app_info); gboolean xdp_app_info_supports_opath (XdpAppInfo *app_info); char * xdp_app_info_remap_path (XdpAppInfo *app_info, const char *path); -gboolean xdg_app_info_map_pids (XdpAppInfo *app_info, - pid_t *pids, - guint n_pids, - GError **error); -gboolean xdg_app_info_pidfds_to_pids (XdpAppInfo *app_info, +gboolean xdp_app_info_map_pids (XdpAppInfo *app_info, + pid_t *pids, + guint n_pids, + GError **error); +gboolean xdp_app_info_pidfds_to_pids (XdpAppInfo *app_info, const int *fds, pid_t *pids, gint count, @@ -78,13 +94,16 @@ int fd, int require_st_mode, struct stat *st_buf, - gboolean *writable_out); + gboolean *writable_out, + GError **error); gboolean xdp_app_info_has_network (XdpAppInfo *app_info); XdpAppInfo *xdp_get_app_info_from_pid (pid_t pid, GError **error); GAppInfo * xdp_app_info_load_app_info (XdpAppInfo *app_info); -char ** xdp_app_info_rewrite_commandline (XdpAppInfo *app_info, - const char *const *commandline); +char ** xdp_app_info_rewrite_commandline (XdpAppInfo *app_info, + const char *const *commandline, + gboolean quote_escape); +char *xdp_app_info_get_tryexec_path (XdpAppInfo *app_info); G_DEFINE_AUTOPTR_CLEANUP_FUNC(XdpAppInfo, xdp_app_info_unref) @@ -151,22 +170,10 @@ #define xdp_autofd __attribute__((cleanup(xdp_close_fd))) -static inline void -xdp_auto_unlock_helper (GMutex **mutex) -{ - if (*mutex) - g_mutex_unlock (*mutex); -} - -static inline GMutex * -xdp_auto_lock_helper (GMutex *mutex) -{ - if (mutex) - g_mutex_lock (mutex); - return mutex; -} - -#define XDP_AUTOLOCK(name) G_GNUC_UNUSED __attribute__((cleanup (xdp_auto_unlock_helper))) GMutex * G_PASTE (auto_unlock, __LINE__) = xdp_auto_lock_helper (&G_LOCK_NAME (name)) +#define XDP_AUTOLOCK(name) \ + g_autoptr(GMutexLocker) G_PASTE (name ## locker, __LINE__) = \ + g_mutex_locker_new (&G_LOCK_NAME (name)); \ + (void) G_PASTE (name ## locker, __LINE__); char * xdp_quote_argv (const char *argv[]); @@ -189,21 +196,6 @@ /* exposed for the benefit of tests */ int _xdp_parse_cgroup_file (FILE *f, gboolean *is_snap); - - -#if !GLIB_CHECK_VERSION (2, 58, 0) -static inline gboolean -g_hash_table_steal_extended (GHashTable *hash_table, - gconstpointer lookup_key, - gpointer *stolen_key, - gpointer *stolen_value) -{ - if (g_hash_table_lookup_extended (hash_table, lookup_key, stolen_key, stolen_value)) - { - g_hash_table_steal (hash_table, lookup_key); - return TRUE; - } - else - return FALSE; -} +#ifdef HAVE_LIBSYSTEMD +char *_xdp_parse_app_id_from_unit_name (const char *unit); #endif diff -Nru xdg-desktop-portal-1.8.1/test-driver xdg-desktop-portal-1.14.3/test-driver --- xdg-desktop-portal-1.8.1/test-driver 2021-02-17 03:14:46.000000000 +0000 +++ xdg-desktop-portal-1.14.3/test-driver 2022-03-29 23:42:31.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2018 Free Software Foundation, Inc. +# Copyright (C) 2011-2020 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru xdg-desktop-portal-1.8.1/tests/backend/Makefile.am.inc xdg-desktop-portal-1.14.3/tests/backend/Makefile.am.inc --- xdg-desktop-portal-1.8.1/tests/backend/Makefile.am.inc 2020-03-13 12:38:10.000000000 +0000 +++ xdg-desktop-portal-1.14.3/tests/backend/Makefile.am.inc 2022-03-28 18:02:35.000000000 +0000 @@ -31,6 +31,8 @@ tests/backend/print.h \ tests/backend/screenshot.c \ tests/backend/screenshot.h \ + tests/backend/settings.c \ + tests/backend/settings.h \ tests/backend/wallpaper.c \ tests/backend/wallpaper.h \ tests/glib-backports.c \ diff -Nru xdg-desktop-portal-1.8.1/tests/backend/settings.c xdg-desktop-portal-1.14.3/tests/backend/settings.c --- xdg-desktop-portal-1.8.1/tests/backend/settings.c 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/tests/backend/settings.c 2022-03-28 18:02:35.000000000 +0000 @@ -0,0 +1,31 @@ +#include +#include +#include +#include + +#include + +#include "src/xdp-impl-dbus.h" + +#include "request.h" +#include "settings.h" + +void +settings_init (GDBusConnection *connection, + const char *object_path) +{ + g_autoptr(GError) error = NULL; + GDBusInterfaceSkeleton *helper; + + helper = G_DBUS_INTERFACE_SKELETON (xdp_impl_settings_skeleton_new ()); + + if (!g_dbus_interface_skeleton_export (helper, connection, object_path, &error)) + { + g_error ("Failed to export %s skeleton: %s\n", + g_dbus_interface_skeleton_get_info (helper)->name, + error->message); + exit (1); + } + + g_debug ("providing %s at %s", g_dbus_interface_skeleton_get_info (helper)->name, object_path); +} diff -Nru xdg-desktop-portal-1.8.1/tests/backend/settings.h xdg-desktop-portal-1.14.3/tests/backend/settings.h --- xdg-desktop-portal-1.8.1/tests/backend/settings.h 1970-01-01 00:00:00.000000000 +0000 +++ xdg-desktop-portal-1.14.3/tests/backend/settings.h 2022-03-28 18:02:35.000000000 +0000 @@ -0,0 +1,3 @@ +#pragma once + +void settings_init (GDBusConnection *connection, const char *object_path); diff -Nru xdg-desktop-portal-1.8.1/tests/backend/test-backends.c xdg-desktop-portal-1.14.3/tests/backend/test-backends.c --- xdg-desktop-portal-1.8.1/tests/backend/test-backends.c 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/tests/backend/test-backends.c 2022-03-28 18:02:35.000000000 +0000 @@ -16,6 +16,7 @@ #include "notification.h" #include "print.h" #include "screenshot.h" +#include "settings.h" #include "wallpaper.h" #define BACKEND_BUS_NAME "org.freedesktop.impl.portal.Test" @@ -39,6 +40,7 @@ notification_init (connection, BACKEND_OBJECT_PATH); print_init (connection, BACKEND_OBJECT_PATH); screenshot_init (connection, BACKEND_OBJECT_PATH); + settings_init (connection, BACKEND_OBJECT_PATH); wallpaper_init (connection, BACKEND_OBJECT_PATH); } diff -Nru xdg-desktop-portal-1.8.1/tests/can-use-fuse.c xdg-desktop-portal-1.14.3/tests/can-use-fuse.c --- xdg-desktop-portal-1.8.1/tests/can-use-fuse.c 2021-02-17 03:04:26.000000000 +0000 +++ xdg-desktop-portal-1.14.3/tests/can-use-fuse.c 2022-03-29 22:00:20.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright 2019-2021 Collabora Ltd. + * Copyright 2021 Canonical Ltd. * SPDX-License-Identifier: LGPL-2.1-or-later */ @@ -12,11 +13,29 @@ #include -#define FUSE_USE_VERSION 26 +#define FUSE_USE_VERSION 35 #include gchar *cannot_use_fuse = NULL; +static void pc_init(void *userdata, + struct fuse_conn_info *conn) +{ + struct fuse_session **session_ptr = userdata; + g_autofree char *missing_features = NULL; + + if (!(conn->capable & FUSE_CAP_SPLICE_READ)) + cannot_use_fuse = g_strdup ("FUSE_CAP_SPLICE_READ"); + else if (!(conn->capable & FUSE_CAP_SPLICE_WRITE)) + cannot_use_fuse = g_strdup ("Missing FUSE_CAP_SPLICE_WRITE"); + else if (!(conn->capable & FUSE_CAP_SPLICE_MOVE)) + cannot_use_fuse = g_strdup ("Missing FUSE_CAP_SPLICE_MOVE"); + else if (!(conn->capable & FUSE_CAP_ATOMIC_O_TRUNC)) + cannot_use_fuse = g_strdup ("Missing FUSE_CAP_ATOMIC_O_TRUNC"); + + fuse_session_exit (*session_ptr); +} + /* * If we cannot use FUSE, set cannot_use_fuse and return %FALSE. */ @@ -26,8 +45,9 @@ g_autofree gchar *fusermount = NULL; g_autofree gchar *path = NULL; char *argv[] = { "flatpak-fuse-test" }; + const struct fuse_lowlevel_ops pc_oper = { .init = pc_init }; struct fuse_args args = FUSE_ARGS_INIT (G_N_ELEMENTS (argv), argv); - struct fuse_chan *chan = NULL; + struct fuse_session *session = NULL; g_autoptr(GError) error = NULL; if (cannot_use_fuse != NULL) @@ -40,11 +60,11 @@ return FALSE; } - fusermount = g_find_program_in_path ("fusermount"); + fusermount = g_find_program_in_path ("fusermount3"); if (fusermount == NULL) { - cannot_use_fuse = g_strdup ("fusermount not found in PATH"); + cannot_use_fuse = g_strdup ("fusermount3 not found in PATH"); return FALSE; } @@ -56,16 +76,16 @@ if (!g_file_test ("/etc/mtab", G_FILE_TEST_EXISTS)) { - cannot_use_fuse = g_strdup ("fusermount won't work without /etc/mtab"); + cannot_use_fuse = g_strdup ("fusermount3 won't work without /etc/mtab"); return FALSE; } path = g_dir_make_tmp ("flatpak-test.XXXXXX", &error); g_assert_no_error (error); - chan = fuse_mount (path, &args); + session = fuse_session_new (&args, &pc_oper, sizeof (pc_oper), &session); - if (chan == NULL) + if (session == NULL) { fuse_opt_free_args (&args); cannot_use_fuse = g_strdup_printf ("fuse_mount: %s", @@ -73,14 +93,34 @@ return FALSE; } - g_test_message ("Successfully set up test FUSE fs on %s", path); + if (fuse_session_mount (session, path) != 0) + { + fuse_opt_free_args (&args); + fuse_session_destroy (session); + cannot_use_fuse = g_strdup_printf ("fuse_mount: impossible to mount path " + "'%s': %s", + path, g_strerror (errno)); + return FALSE; + } + + g_assert (cannot_use_fuse == NULL); + fuse_session_loop (session); - fuse_unmount (path, chan); + if (cannot_use_fuse != NULL) + { + fuse_opt_free_args (&args); + fuse_session_destroy (session); + return FALSE; + } + + g_test_message ("Successfully set up test FUSE fs on %s", path); + fuse_session_unmount (session); if (g_rmdir (path) != 0) g_error ("rmdir %s: %s", path, g_strerror (errno)); fuse_opt_free_args (&args); + fuse_session_destroy (session); return TRUE; } diff -Nru xdg-desktop-portal-1.8.1/tests/Makefile.am.inc xdg-desktop-portal-1.14.3/tests/Makefile.am.inc --- xdg-desktop-portal-1.8.1/tests/Makefile.am.inc 2021-02-17 03:04:26.000000000 +0000 +++ xdg-desktop-portal-1.14.3/tests/Makefile.am.inc 2022-03-29 22:00:20.000000000 +0000 @@ -13,26 +13,29 @@ $(NULL) testdb_SOURCES = tests/testdb.c $(DB_SOURCES) -test_doc_portal_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(FUSE_CFLAGS) +test_doc_portal_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(FUSE3_CFLAGS) test_doc_portal_LDADD = \ $(AM_LDADD) \ $(BASE_LIBS) \ - $(FUSE_LIBS) \ + $(FUSE3_LIBS) \ $(NULL) test_doc_portal_SOURCES = \ tests/can-use-fuse.c \ tests/can-use-fuse.h \ tests/test-doc-portal.c \ + tests/utils.c \ + tests/utils.h \ $(NULL) nodist_test_doc_portal_SOURCES = document-portal/document-portal-dbus.c EXTRA_test_doc_portal_DEPENDENCIES = tests/services/org.freedesktop.impl.portal.PermissionStore.service tests/services/org.freedesktop.portal.Documents.service -test_portals_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(LIBPORTAL_CFLAGS) +test_portals_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(LIBPORTAL_CFLAGS) $(SYSTEMD_LIBS) test_portals_LDADD = \ $(AM_LDADD) \ $(BASE_LIBS) \ $(LIBPORTAL_LIBS) \ + $(SYSTEMD_LIBS) \ $(NULL) test_portals_SOURCES = tests/test-portals.c test_portals_CPPFLAGS = $(AM_CPPFLAGS) -DLIBEXECDIR=\"$(libexecdir)\" @@ -66,8 +69,6 @@ tests/trash.h \ tests/wallpaper.c \ tests/wallpaper.h \ - tests/utils.c \ - tests/utils.h \ tests/glib-backports.c \ tests/glib-backports.h \ $(NULL) @@ -76,25 +77,41 @@ src/xdp-dbus.c \ src/xdp-impl-dbus.c \ src/xdp-utils.c \ + src/sd-escape.c \ + src/sd-escape.h \ document-portal/permission-store-dbus.c \ + tests/utils.c \ + tests/utils.h \ $(NULL) test_programs += test-portals -test_permission_store_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) +test_permission_store_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(SYSTEMD_CFLAGS) test_permission_store_LDADD = \ $(AM_LDADD) \ $(BASE_LIBS) \ + $(SYSTEMD_LIBS) \ $(NULL) test_permission_store_SOURCES = tests/test-permission-store.c -nodist_test_permission_store_SOURCES = document-portal/permission-store-dbus.c src/xdp-utils.c +nodist_test_permission_store_SOURCES = \ + document-portal/permission-store-dbus.c \ + src/xdp-utils.c \ + src/sd-escape.c \ + src/sd-escape.h \ + tests/utils.c \ + tests/utils.h \ + $(NULL) EXTRA_test_permission_store_DEPENDENCIES = tests/services/org.freedesktop.impl.portal.PermissionStore.service tests/services/org.freedesktop.portal.Documents.service test_programs += test-xdp-utils -test_xdp_utils_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) -test_xdp_utils_LDADD = $(AM_LD_ADD) $(BASE_LIBS) -test_xdp_utils_SOURCES = tests/test-xdp-utils.c src/xdp-utils.c - +test_xdp_utils_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(SYSTEMD_CFLAGS) +test_xdp_utils_LDADD = $(AM_LD_ADD) $(BASE_LIBS) $(SYSTEMD_LIBS) +test_xdp_utils_SOURCES = \ + tests/test-xdp-utils.c \ + src/xdp-utils.c \ + src/sd-escape.c \ + src/sd-escape.h \ + $(NULL) tests/services/org.freedesktop.portal.Documents.service: document-portal/org.freedesktop.portal.Documents.service.in mkdir -p tests/services diff -Nru xdg-desktop-portal-1.8.1/tests/portals/test.portal xdg-desktop-portal-1.14.3/tests/portals/test.portal --- xdg-desktop-portal-1.8.1/tests/portals/test.portal 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/tests/portals/test.portal 2022-03-28 18:02:35.000000000 +0000 @@ -1,4 +1,4 @@ [portal] DBusName=org.freedesktop.impl.portal.Test -Interfaces=org.freedesktop.impl.portal.Account;org.freedesktop.impl.portal.Email;org.freedesktop.impl.portal.FileChooser;org.freedesktop.impl.portal.Screenshot;org.freedesktop.impl.portal.Lockdown;org.freedesktop.impl.portal.Print;org.freedesktop.impl.portal.Access;org.freedesktop.impl.portal.Inhibit;org.freedesktop.impl.portal.AppChooser;org.freedesktop.impl.portal.Wallpaper;org.freedesktop.impl.portal.Background;org.freedesktop.impl.portal.Notification; +Interfaces=org.freedesktop.impl.portal.Account;org.freedesktop.impl.portal.Email;org.freedesktop.impl.portal.FileChooser;org.freedesktop.impl.portal.Screenshot;org.freedesktop.impl.portal.Lockdown;org.freedesktop.impl.portal.Print;org.freedesktop.impl.portal.Access;org.freedesktop.impl.portal.Inhibit;org.freedesktop.impl.portal.AppChooser;org.freedesktop.impl.portal.Wallpaper;org.freedesktop.impl.portal.Background;org.freedesktop.impl.portal.Notification;org.freedesktop.impl.portal.Settings; UseIn=test diff -Nru xdg-desktop-portal-1.8.1/tests/test-doc-portal.c xdg-desktop-portal-1.14.3/tests/test-doc-portal.c --- xdg-desktop-portal-1.8.1/tests/test-doc-portal.c 2021-02-17 03:04:26.000000000 +0000 +++ xdg-desktop-portal-1.14.3/tests/test-doc-portal.c 2022-03-29 22:00:20.000000000 +0000 @@ -16,6 +16,7 @@ #include "document-portal/document-portal-dbus.h" #include "can-use-fuse.h" +#include "utils.h" char outdir[] = "/tmp/xdp-test-XXXXXX"; @@ -709,6 +710,9 @@ g_setenv ("XDG_DATA_HOME", outdir, TRUE); g_setenv ("TEST_DOCUMENT_PORTAL_FUSE_STATUS", fuse_status_file, TRUE); + /* Re-defining dbus-monitor with a custom script */ + setup_dbus_daemon_wrapper (outdir); + dbus = g_test_dbus_new (G_TEST_DBUS_NONE); services = g_test_build_filename (G_TEST_BUILT, "services", NULL); g_test_dbus_add_service_dir (dbus, services); @@ -784,7 +788,7 @@ global_teardown (void) { GError *error = NULL; - char *argv[] = { "fusermount", "-u", NULL, NULL }; + char *argv[] = { "fusermount3", "-u", NULL, NULL }; g_autofree char *by_app_dir = g_build_filename (mountpoint, "by-app", NULL); struct stat buf; g_autoptr(GFile) outdir_file = g_file_new_for_path (outdir); diff -Nru xdg-desktop-portal-1.8.1/tests/test-document-fuse.py xdg-desktop-portal-1.14.3/tests/test-document-fuse.py --- xdg-desktop-portal-1.8.1/tests/test-document-fuse.py 2020-09-14 17:03:38.000000000 +0000 +++ xdg-desktop-portal-1.14.3/tests/test-document-fuse.py 2022-03-28 18:02:35.000000000 +0000 @@ -661,10 +661,11 @@ real_filepath2 = doc.real_path + "/dir/a-file2" if writable: # We can create files - assertRaises(PermissionError, os.open, dir + "/readonly", os.O_RDWR) - os.chmod(dir + "/readonly", 0o700) - fd = os.open (dir + "/readonly", os.O_RDWR) # Works now - os.close(fd) + if os.environ.get('TEST_IN_ROOTED_CI'): + assertRaises(PermissionError, os.open, dir + "/readonly", os.O_RDWR) + os.chmod(dir + "/readonly", 0o700) + fd = os.open (dir + "/readonly", os.O_RDWR) # Works now + os.close(fd) setFileContent(filepath, "filedata") assertFileHasContent(filepath, "filedata") diff -Nru xdg-desktop-portal-1.8.1/tests/test-document-fuse.sh xdg-desktop-portal-1.14.3/tests/test-document-fuse.sh --- xdg-desktop-portal-1.8.1/tests/test-document-fuse.sh 2020-09-14 17:03:38.000000000 +0000 +++ xdg-desktop-portal-1.14.3/tests/test-document-fuse.sh 2022-03-29 22:00:20.000000000 +0000 @@ -7,7 +7,7 @@ } skip_without_fuse () { - fusermount --version >/dev/null 2>&1 || skip "no fusermount" + fusermount3 --version >/dev/null 2>&1 || skip "no fusermount3" capsh --print | grep -q 'Bounding set.*[^a-z]cap_sys_admin' || \ skip "No cap_sys_admin in bounding set, can't use FUSE" @@ -47,7 +47,7 @@ export XDG_RUNTIME_DIR=${TEST_DATA_DIR}/runtime cleanup () { - fusermount -u "$XDG_RUNTIME_DIR/doc" || : + fusermount3 -u "$XDG_RUNTIME_DIR/doc" || : sleep 0.1 kill "$DBUS_SESSION_BUS_PID" kill $(jobs -p) &> /dev/null || true diff -Nru xdg-desktop-portal-1.8.1/tests/test-permission-store.c xdg-desktop-portal-1.14.3/tests/test-permission-store.c --- xdg-desktop-portal-1.8.1/tests/test-permission-store.c 2020-03-13 12:38:51.000000000 +0000 +++ xdg-desktop-portal-1.14.3/tests/test-permission-store.c 2022-03-28 18:02:35.000000000 +0000 @@ -14,6 +14,7 @@ #include "src/xdp-utils.h" #include "document-portal/permission-store-dbus.h" +#include "utils.h" char outdir[] = "/tmp/xdp-test-XXXXXX"; @@ -445,6 +446,113 @@ } static void +test_delete5 (void) +{ + const char * perms[] = { "yes", NULL }; + g_autoptr(GVariant) out_perms = NULL; + g_autoptr(GVariant) out_data = NULL; + g_autoptr(GVariant) expected = NULL; + gboolean res; + g_autoptr(GError) error = NULL; + + got_result = 0; + xdg_permission_store_call_set_permission (permissions, "notifications", TRUE, "notification", "a", perms, NULL, set_cb, NULL); + xdg_permission_store_call_delete_permission (permissions, "notifications", "notification", "a", NULL, delete_permission_cb, NULL); + + while (got_result < 2) + g_main_context_iteration (NULL, TRUE); + + /* it did not crash during delete permission */ + g_assert_cmpint (got_result, ==, 2); + + res = xdg_permission_store_call_lookup_sync (permissions, + "notifications", + "notification", + &out_perms, + &out_data, + NULL, + &error); + + + expected = g_variant_new_array (G_VARIANT_TYPE ("{sas}"), NULL, 0); + + g_assert_true (res); + g_assert_no_error (error); + + /* an empty entry is left instead */ + g_assert_true (g_variant_equal (expected, out_perms)); +} + +static void +test_get_permission1 (void) +{ + gboolean res; + g_autoptr(GError) error = NULL; + g_autofree char **out_perms = NULL; + + res = xdg_permission_store_call_get_permission_sync (permissions, + "no-such-table", + "no-such-entry", + "no-such-app", + &out_perms, + NULL, + &error); + g_assert_error (error, XDG_DESKTOP_PORTAL_ERROR, XDG_DESKTOP_PORTAL_ERROR_NOT_FOUND); + g_assert_false (res); +} + +static void +test_get_permission2 (void) +{ + gboolean res; + const char * in_perms[] = { "yes", NULL }; + g_autofree char **out_perms = NULL; + g_autoptr(GError) error = NULL; + + res = xdg_permission_store_call_set_permission_sync (permissions, + "notifications", + TRUE, + "notification", + "a", + in_perms, + NULL, + &error); + g_assert_no_error (error); + g_assert_true (res); + + res = xdg_permission_store_call_get_permission_sync (permissions, + "notifications", + "notification", + "a", + &out_perms, + NULL, + &error); + g_assert_true (res); + g_assert_no_error (error); + g_assert (g_strv_length (out_perms) == 1); + g_assert (g_strv_contains ((const char *const *)out_perms, "yes")); +} + +static void +test_get_permission3 (void) +{ + gboolean res; + g_autofree char **out_perms = NULL; + g_autoptr(GError) error = NULL; + + res = xdg_permission_store_call_get_permission_sync (permissions, + "notifications", + "notification", + "no-such-app", + &out_perms, + NULL, + &error); + g_assert_true (res); + g_assert_no_error (error); + g_assert (g_strv_length (out_perms) == 0); +} + +static void global_setup (void) { GError *error = NULL; @@ -460,6 +568,9 @@ g_setenv ("XDG_RUNTIME_DIR", outdir, TRUE); g_setenv ("XDG_DATA_HOME", outdir, TRUE); + /* Re-defining dbus-monitor with a custom script */ + setup_dbus_daemon_wrapper (outdir); + dbus = g_test_dbus_new (G_TEST_DBUS_NONE); services = g_test_build_filename (G_TEST_BUILT, "services", NULL); g_test_dbus_add_service_dir (dbus, services); @@ -561,9 +672,13 @@ g_test_add_func ("/permissions/delete2", test_delete2); g_test_add_func ("/permissions/delete3", test_delete3); g_test_add_func ("/permissions/delete4", test_delete4); + g_test_add_func ("/permissions/delete5", test_delete5); g_test_add_func ("/permissions/create1", test_create1); g_test_add_func ("/permissions/create2", test_create2); g_test_add_func ("/permissions/set-value", test_set_value); + g_test_add_func ("/permissions/get-pemission1", test_get_permission1); + g_test_add_func ("/permissions/get-pemission2", test_get_permission2); + g_test_add_func ("/permissions/get-pemission3", test_get_permission3); global_setup (); diff -Nru xdg-desktop-portal-1.8.1/tests/test-portals.c xdg-desktop-portal-1.14.3/tests/test-portals.c --- xdg-desktop-portal-1.8.1/tests/test-portals.c 2020-09-14 17:03:38.000000000 +0000 +++ xdg-desktop-portal-1.14.3/tests/test-portals.c 2022-03-29 22:00:20.000000000 +0000 @@ -21,6 +21,7 @@ #include "print.h" #include "screenshot.h" #include "trash.h" +#include "utils.h" #include "wallpaper.h" #endif @@ -35,8 +36,7 @@ static GTestDBus *dbus; static GDBusConnection *session_bus; -static GSubprocess *portals; -static GSubprocess *backends; +static GList *test_procs = NULL; XdpImplPermissionStore *permission_store; XdpImplLockdown *lockdown; @@ -126,6 +126,7 @@ g_autofree gchar *portal_dir = NULL; g_autofree gchar *argv0 = NULL; g_autoptr(GSubprocessLauncher) launcher = NULL; + g_autoptr(GSubprocess) subprocess = NULL; guint name_timeout; const char *argv[4]; GQuark portal_errors G_GNUC_UNUSED; @@ -141,6 +142,9 @@ g_setenv ("XDG_RUNTIME_DIR", outdir, TRUE); g_setenv ("XDG_DATA_HOME", outdir, TRUE); + /* Re-defining dbus-monitor with a custom script */ + setup_dbus_daemon_wrapper (outdir); + dbus = g_test_dbus_new (G_TEST_DBUS_NONE); services = g_test_build_filename (G_TEST_BUILT, "services", NULL); g_test_dbus_add_service_dir (dbus, services); @@ -179,8 +183,11 @@ g_print ("launching test-backend\n"); - backends = g_subprocess_launcher_spawnv (launcher, argv, &error); + subprocess = g_subprocess_launcher_spawnv (launcher, argv, &error); g_assert_no_error (error); + g_test_message ("Launched %s with pid %s\n", argv[0], + g_subprocess_get_identifier (subprocess)); + test_procs = g_list_append (test_procs, g_steal_pointer (&subprocess)); name_timeout = g_timeout_add (1000 * timeout_mult, timeout_cb, "Failed to launch test-backends"); @@ -222,8 +229,11 @@ g_print ("launching %s\n", argv0); - portals = g_subprocess_launcher_spawnv (launcher, argv, &error); + subprocess = g_subprocess_launcher_spawnv (launcher, argv, &error); g_assert_no_error (error); + g_test_message ("Launched %s with pid %s\n", argv[0], + g_subprocess_get_identifier (subprocess)); + test_procs = g_list_append (test_procs, g_steal_pointer (&subprocess)); g_clear_pointer (&argv0, g_free); name_timeout = g_timeout_add (1000 * timeout_mult, timeout_cb, "Failed to launch xdg-desktop-portal"); @@ -264,8 +274,11 @@ g_print ("launching %s\n", argv0); - portals = g_subprocess_launcher_spawnv (launcher, argv, &error); + subprocess = g_subprocess_launcher_spawnv (launcher, argv, &error); g_assert_no_error (error); + g_test_message ("Launched %s with pid %s\n", argv[0], + g_subprocess_get_identifier (subprocess)); + test_procs = g_list_append (test_procs, g_steal_pointer (&subprocess)); name_timeout = g_timeout_add (1000 * timeout_mult, timeout_cb, "Failed to launch xdg-permission-store"); @@ -296,6 +309,42 @@ } static void +wait_for_test_procs (void) +{ + GList *l; + + for (l = test_procs; l; l = l->next) + { + GSubprocess *subprocess = G_SUBPROCESS (l->data); + GError *error = NULL; + g_autofree char *identifier = NULL; + + identifier = g_strdup (g_subprocess_get_identifier (subprocess)); + + g_debug ("Terminating and waiting for process %s", identifier); + g_subprocess_send_signal (subprocess, SIGTERM); + + /* This may lead the test to hang, we assume that the test suite or CI + * can handle the case at upper level, without having us async function + * and timeouts */ + g_subprocess_wait (subprocess, NULL, &error); + g_assert_no_error (error); + g_assert_null (g_subprocess_get_identifier (subprocess)); + + if (!g_subprocess_get_if_exited (subprocess)) + { + g_assert_true (g_subprocess_get_if_signaled (subprocess)); + g_assert_cmpint (g_subprocess_get_term_sig (subprocess), ==, SIGTERM); + } + else if (!g_subprocess_get_successful (subprocess)) + { + g_error ("Subprocess %s, exited with exit status %d", identifier, + g_subprocess_get_exit_status (subprocess)); + } + } +} + +static void global_teardown (void) { GError *error = NULL; @@ -306,8 +355,8 @@ g_dbus_connection_close_sync (session_bus, NULL, &error); g_assert_no_error (error); - g_subprocess_force_exit (portals); - g_subprocess_force_exit (backends); + wait_for_test_procs (); + g_list_free_full (g_steal_pointer (&test_procs), g_object_unref); g_object_unref (lockdown); g_object_unref (permission_store); @@ -387,6 +436,7 @@ DEFINE_TEST_EXISTS(settings, SETTINGS, 1) DEFINE_TEST_EXISTS(trash, TRASH, 1) DEFINE_TEST_EXISTS(wallpaper, WALLPAPER, 1) +DEFINE_TEST_EXISTS(realtime, REALTIME, 1) int main (int argc, char **argv) @@ -414,6 +464,7 @@ g_test_add_func ("/portal/settings/exists", test_settings_exists); g_test_add_func ("/portal/trash/exists", test_trash_exists); g_test_add_func ("/portal/wallpaper/exists", test_wallpaper_exists); + g_test_add_func ("/portal/realtime/exists", test_realtime_exists); #ifdef HAVE_LIBPORTAL g_test_add_func ("/portal/account/basic", test_account_basic); diff -Nru xdg-desktop-portal-1.8.1/tests/test-xdp-utils.c xdg-desktop-portal-1.14.3/tests/test-xdp-utils.c --- xdg-desktop-portal-1.8.1/tests/test-xdp-utils.c 2021-02-09 20:03:56.000000000 +0000 +++ xdg-desktop-portal-1.14.3/tests/test-xdp-utils.c 2022-03-29 22:00:20.000000000 +0000 @@ -127,6 +127,52 @@ xdp_set_documents_mountpoint (NULL); } +#ifdef HAVE_LIBSYSTEMD +static void +test_app_id_via_systemd_unit (void) +{ + g_autofree char *app_id = NULL; + + app_id = _xdp_parse_app_id_from_unit_name ("app-not-a-well-formed-unit-name"); + g_assert_cmpstr (app_id, ==, ""); + g_clear_pointer (&app_id, g_free); + + app_id = _xdp_parse_app_id_from_unit_name ("app-gnome-org.gnome.Evolution\\x2dalarm\\x2dnotify-2437.scope"); + /* Note, this is not Evolution's app ID, because the scope is for a background service */ + g_assert_cmpstr (app_id, ==, "org.gnome.Evolution-alarm-notify"); + g_clear_pointer (&app_id, g_free); + + app_id = _xdp_parse_app_id_from_unit_name ("app-gnome-org.gnome.Epiphany-182352.scope"); + g_assert_cmpstr (app_id, ==, "org.gnome.Epiphany"); + g_clear_pointer (&app_id, g_free); + + app_id = _xdp_parse_app_id_from_unit_name ("app-glib-spice\\x2dvdagent-1839.scope"); + /* App IDs must have two periods */ + g_assert_cmpstr (app_id, ==, ""); + g_clear_pointer (&app_id, g_free); + + app_id = _xdp_parse_app_id_from_unit_name ("app-KDE-org.kde.okular@12345.service"); + g_assert_cmpstr (app_id, ==, "org.kde.okular"); + g_clear_pointer (&app_id, g_free); + + app_id = _xdp_parse_app_id_from_unit_name ("app-org.kde.amarok.service"); + g_assert_cmpstr (app_id, ==, "org.kde.amarok"); + g_clear_pointer (&app_id, g_free); + + app_id = _xdp_parse_app_id_from_unit_name ("app-gnome-org.gnome.SettingsDaemon.DiskUtilityNotify-autostart.service"); + g_assert_cmpstr (app_id, ==, "org.gnome.SettingsDaemon.DiskUtilityNotify"); + g_clear_pointer (&app_id, g_free); + + app_id = _xdp_parse_app_id_from_unit_name ("app-gnome-org.gnome.Terminal-92502.slice"); + g_assert_cmpstr (app_id, ==, "org.gnome.Terminal"); + g_clear_pointer (&app_id, g_free); + + app_id = _xdp_parse_app_id_from_unit_name ("app-com.obsproject.Studio-d70acc38b5154a3a8b4a60accc4b15f4.scope"); + g_assert_cmpstr (app_id, ==, "com.obsproject.Studio"); + g_clear_pointer (&app_id, g_free); +} +#endif /* HAVE_LIBSYSTEMD */ + int main (int argc, char **argv) { g_test_init (&argc, &argv, NULL); @@ -135,5 +181,8 @@ g_test_add_func ("/parse-cgroup/systemd", test_parse_cgroup_systemd); g_test_add_func ("/parse-cgroup/not-snap", test_parse_cgroup_not_snap); g_test_add_func ("/alternate-doc-path", test_alternate_doc_path); +#ifdef HAVE_LIBSYSTEMD + g_test_add_func ("/app-id-via-systemd-unit", test_app_id_via_systemd_unit); +#endif return g_test_run (); } diff -Nru xdg-desktop-portal-1.8.1/tests/trash.c xdg-desktop-portal-1.14.3/tests/trash.c --- xdg-desktop-portal-1.8.1/tests/trash.c 2019-12-11 05:12:23.000000000 +0000 +++ xdg-desktop-portal-1.14.3/tests/trash.c 2022-03-28 18:02:35.000000000 +0000 @@ -40,7 +40,7 @@ expected = FALSE; got_info = FALSE; - xdp_portal_trash_file (portal, "/etc/passwd", NULL, trash_cb, &expected); + xdp_portal_trash_file (portal, "/proc/cmdline", NULL, trash_cb, &expected); while (!got_info) g_main_context_iteration (NULL, TRUE); diff -Nru xdg-desktop-portal-1.8.1/tests/utils.c xdg-desktop-portal-1.14.3/tests/utils.c --- xdg-desktop-portal-1.8.1/tests/utils.c 2020-03-13 12:38:10.000000000 +0000 +++ xdg-desktop-portal-1.14.3/tests/utils.c 2022-03-28 18:02:35.000000000 +0000 @@ -2,6 +2,8 @@ #include "utils.h" +#include + /* * Set a property. Unlike gdbus-codegen-generated wrapper functions, this * waits for the property change to take effect. @@ -26,3 +28,34 @@ error); return (res != NULL); } + +/* We need this to ensure that dbus-daemon launched by GTestDBus is not + * causing our tests to hang (see GNOME/glib#2537), so we are redirecting + * all its output to stderr, while reading its pid and address to manage it. + * As bonus point, now the services output will be visible in test logs. + * This can be removed once GNOME/glib!2354 will be available everywhere. + */ +void +setup_dbus_daemon_wrapper (const char *outdir) +{ + g_autofree gchar *file_name = NULL; + g_autofree gchar *test_path = NULL; + g_autoptr (GError) error = NULL; + const char dbus_daemon_script[] = \ + "#!/usr/bin/env bash\n" + "export PATH=\"$ORIGINAL_PATH\"\n" + "\n" + "[[ \" ${@} \" =~ \" --print-address=\"[0-9]+\" \" ]] && " + " exec dbus-daemon \"$@\"\n" + "\n" + "exec dbus-daemon \"$@\" --print-address=959 959<&1 1>&2\n"; + + test_path = g_strjoin (":", outdir, g_getenv ("PATH"), NULL); + g_setenv ("ORIGINAL_PATH", g_getenv ("PATH"), TRUE); + g_setenv ("PATH", test_path, TRUE); + + file_name = g_build_filename (outdir, "dbus-daemon", NULL); + g_file_set_contents (file_name, dbus_daemon_script, -1, &error); + g_chmod (file_name, 0700); + g_assert_no_error (error); +} diff -Nru xdg-desktop-portal-1.8.1/tests/utils.h xdg-desktop-portal-1.14.3/tests/utils.h --- xdg-desktop-portal-1.8.1/tests/utils.h 2020-03-13 12:38:10.000000000 +0000 +++ xdg-desktop-portal-1.14.3/tests/utils.h 2022-03-28 18:02:35.000000000 +0000 @@ -7,3 +7,5 @@ const char *property, GVariant *value, GError **error); + +void setup_dbus_daemon_wrapper (const char *outdir);