Skip to content
Snippets Groups Projects
Commit 433d0571 authored by Apertis CI's avatar Apertis CI
Browse files

Import Upstream version 1.20.0+ds

parent 5391cba8
No related branches found
No related tags found
1 merge request!10Update from debian/trixie for apertis/v2026dev2
Showing
with 883 additions and 509 deletions
#!/usr/bin/env bash
# File generated by pre-commit: https://pre-commit.com
# ID: 138fd403232d2ddd5efb44317e38bf03
# start templated
INSTALL_PYTHON=/usr/bin/python3
ARGS=(hook-impl --config=.pre-commit-config.yaml --hook-type=pre-commit)
# end templated
HERE="$(cd "$(dirname "$0")" && pwd)"
ARGS+=(--hook-dir "$HERE" -- "$@")
if [ -x "$INSTALL_PYTHON" ]; then
exec "$INSTALL_PYTHON" -mpre_commit "${ARGS[@]}"
elif command -v pre-commit > /dev/null; then
exec pre-commit "${ARGS[@]}"
else
echo '`pre-commit` not found. Did you forget to activate your virtualenv?' 1>&2
exit 1
fi
open_collective: flatpak
---
name: Bug Report
description: Report a bug or crash
labels: bug,
body:
- type: input
id: distribution
attributes:
label: "Operating System"
description: "Which operating system or Linux distribution are you using?"
placeholder: "e.g., Ubuntu 22.04, Arch Linux, FreeBSD"
validations:
required: true
- type: dropdown
id: version
attributes:
label: "XDG Desktop Portal version"
description: "What version of XDG Desktop Portal are you using?"
options:
- "1.18"
- "1.17"
- "1.16"
- Git
- Other
validations:
required: true
- type: input
id: version_other
attributes:
label: XDG Desktop Portal version (Other)
description: "If \"Other\" was selected above, what version of XDG Desktop Portal are you using?"
validations:
required: false
- type: dropdown
id: desktop_environment
attributes:
label: "Desktop Environment"
description: "which desktop environment are you using?"
options:
- Deepin
- Cinnamon / MATE / Xfce
- GNOME
- Plasma
- LXQt
- Pantheon (elementary OS)
- wlroots
- Other
validations:
required: true
- type: input
id: desktop_environment_other
attributes:
label: Desktop Environment (Other)
description: "If \"Other\" was selected above, which desktop environment are you using?"
validations:
required: false
- type: textarea
id: expected_behavior
attributes:
label: Expected Behavior
description: "What did you expect to happen?"
validations:
required: true
- type: textarea
id: current_behavior
attributes:
label: Current Behavior
description: "What actually happened?"
validations:
required: true
- type: textarea
id: steps_to_reproduce
attributes:
label: Steps to Reproduce
description: "How do you trigger this bug? Please walk us through it step by step."
placeholder: |
1.
2.
3.
...
value: |
1.
2.
3.
...
validations:
required: true
- type: textarea
id: additional_notes
attributes:
label: Anything else we should know?
validations:
required: false
---
blank_issues_enabled: false
contact_links:
- name: Help/Support
url: https://matrix.to/#/#xdg-desktop-portals:matrix.org
about: Questions or issues about how to use and configure xdg-desktop-portal
# This Containerfile builds the image that we use in all github workflows.
# When this file is changed, or one needs to rebuild the image for another
# reason, bump the `IMAGE_TAG` in the container.yml workflow.
FROM ubuntu:latest
RUN apt update
RUN apt upgrade -y
# Install dependencies
RUN apt install -y --no-install-recommends \
gcc clang \
ca-certificates \
desktop-file-utils \
fuse3 \
gettext \
git \
gnome-desktop-testing \
gtk-doc-tools \
jq \
libcap2-bin \
libflatpak-dev \
libfontconfig1-dev \
libfuse3-dev \
libgdk-pixbuf-2.0-dev \
librsvg2-2 \
librsvg2-common \
libgstreamer-plugins-base1.0-dev \
gstreamer1.0-plugins-good \
libgstreamer-plugins-good1.0-dev \
gstreamer1.0-tools \
libgeoclue-2-dev \
libglib2.0-dev \
libgudev-1.0-dev \
libjson-glib-dev \
libpipewire-0.3-dev \
libsystemd-dev \
libtool \
llvm \
libclang-rt-18-dev \
python3-gi \
shared-mime-info
# Install meson
RUN apt install -y --no-install-recommends meson
# Install pytest
RUN apt install -y --no-install-recommends \
python3-pytest \
python3-pytest-xdist \
python3-dbusmock \
python3-dbus \
libumockdev0 \
libumockdev-dev \
umockdev \
gir1.2-umockdev-1.0
# Install pip
RUN apt install -y --no-install-recommends python3-pip
# Install doc dependencies
RUN pip install --user --break-system-packages furo">=2024.04.27" \
sphinx-copybutton sphinxext-opengraph matplotlib
# Install pre-commit
RUN pip install --user --break-system-packages pre-commit
# Install qdbusxml2cpp
RUN apt install -y --no-install-recommends qt6-base-dev-tools
env:
TESTS_TIMEOUT: 10 # in minutes
on:
workflow_call:
inputs:
image:
required: true
type: string
image_options:
required: true
type: string
jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
strategy:
matrix:
compiler: ['gcc', 'clang']
sanitizer: ['address']
container:
image: ${{ inputs.image }}
env:
CFLAGS: -Wp,-D_FORTIFY_SOURCE=2
CC: ${{ matrix.compiler }}
XDP_TEST_IN_CI: 1
G_MESSAGES_DEBUG: all
options: ${{ inputs.image_options }}
steps:
- name: Configure environment
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
echo XDG_DATA_DIRS=$GITHUB_WORKSPACE/tests/share:/usr/local/share:/usr/share | tee -a $GITHUB_ENV
- name: Check out xdg-desktop-portal
uses: actions/checkout@v4
- name: Run pre-commit hooks
run: |
export PYTHONPATH="/root/.local/lib/python$(python3 -c 'import sys; print("{}.{}".format(*sys.version_info))')/site-packages:$PYTHONPATH"
export PATH="/root/.local/bin:$PATH"
pre-commit run --show-diff-on-failure --color=always --all-files
- name: Check POTFILES.in
run: .github/workflows/check-potfiles.sh
- name: Build xdg-desktop-portal
run: |
meson setup _build \
-Dinstalled-tests=true \
-Dtests=enabled \
-Db_sanitize=${{ matrix.sanitizer }} \
-Db_lundef=false
meson compile -C _build
- name: Run xdg-desktop-portal tests
run: timeout --signal=KILL -v ${TESTS_TIMEOUT}m meson test -C _build
- name: Install xdg-desktop-portal
run: meson install -C _build
- name: Run xdg-desktop-portal installed-tests
run: |
test -n "$(gnome-desktop-testing-runner -l xdg-desktop-portal)"
gnome-desktop-testing-runner --report-directory installed-test-logs/ \
-t $((TESTS_TIMEOUT * 60)) xdg-desktop-portal
- name: Check Qt annotations
run: find -name "*.xml" | xargs -n1 /usr/lib/qt6/bin/qdbusxml2cpp
- name: Create dist tarball
run: |
ls -la
timeout --signal=KILL -v ${TESTS_TIMEOUT}m meson dist -C _build
- name: Upload test logs
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test logs (${{ matrix.compiler }}, ${{ matrix.sanitizer }})
path: |
tests/*.log
test-*.log
installed-test-logs/
_build/meson-logs/testlog.txt
#!/usr/bin/env bash
# FIXME stolen from gnome-control-center, GPLv2
# This project is LGPLv2
# https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2269#note_2079291
srcdirs="src document-portal"
uidirs=$srcdirs
desktopdirs=$srcdirs
policydirs=$srcdirs
xmldirs=$srcdirs
# find source files that contain gettext functions with literal or GETTEXT_PACKAGE argument
files=$(grep -lRs --include='*.c' 'gettext *(\("\|GETTEXT_PACKAGE,\)' $srcdirs)
# find source files that contain gettext macros
files="$files "$(grep -lRs --include='*.c' --include='*.h' '[^I_)]_(' $srcdirs)
# find ui files that contain translatable string
files="$files "$(grep -lRis --include='*.ui' 'translatable="[ty1]' $uidirs)
# find .desktop files
files="$files "$(find $desktopdirs -name '*.desktop*')
# find .policy files
files="$files "$(find $policydirs -name '*.policy*')
# find .xml.in and .gschema.xml files
files="$files "$(find $xmldirs -not -name '*.gresource.xml*' \
-name '*.xml.in*' -o \
-name '*.gschema.xml')
# filter out excluded files
if [ -f po/POTFILES.skip ]; then
files=$(for f in $files; do
! grep -q "^$f" po/POTFILES.skip && echo "$f"
done)
fi
# find those that aren't listed in POTFILES.in
missing=$(for f in $files; do
! grep -q "^$f" po/POTFILES.in && echo "$f"
done)
# find those that are listed in POTFILES.in but do not contain translatable strings
invalid=$(while IFS= read -r f; do
! grep -q "$f" <<< "$files" && echo "$f"
done < <(grep '^[^#]' po/POTFILES.in))
# find out if POTFILES.in is sorted correctly, ignoring empty lines
sorted=$(grep '^[^#]' po/POTFILES.in | \
LC_ALL=en_US.UTF-8 sort -cu 2>&1 >/dev/null | \
awk -F ': *' '{print $5}')
if [ ${#missing} -eq 0 ] && [ ${#invalid} -eq 0 ] && [ ${#sorted} -eq 0 ]; then
exit 0
fi
if [ ${#missing} -ne 0 ]; then
cat >&2 << EOT
The following files are missing from po/POTFILES.in or po/POTFILES.skip:
EOT
for f in $missing; do
echo " $f" >&2
done
fi
if [ ${#invalid} -ne 0 ]; then
cat >&2 << EOT
The following files are in po/POTFILES.in but are missing or not translatable:
EOT
for f in $invalid; do
echo " $f" >&2
done
fi
if [ ${#sorted} -ne 0 ]; then
cat >&2 << EOT
The following file is not sorted properly in po/POTFILES.in:
EOT
echo " $sorted" >&2
fi
echo >&2
exit 1
name: Portal CI
on: [push, pull_request]
env:
DEBIAN_FRONTEND: noninteractive
TESTS_TIMEOUT: 10 # in minutes
jobs:
# identical to the meson job but for the autotools commands
check:
name: Ubuntu 22.04 build
runs-on: ubuntu-22.04
strategy:
matrix:
buildsystem: ['autotools', 'meson']
compiler: ['gcc', 'clang']
sanitizer: ['address']
env:
UBUNTU_VERSION: '22.04'
CC: ${{ matrix.compiler }}
BASE_CFLAGS: -Wp,-D_FORTIFY_SOURCE=2
BUILD_CONTAINER: ${{ matrix.compiler }}-build-container
RUN_CMD: docker exec -t -w /src -e TEST_IN_CI -e ASAN_OPTIONS -e G_MESSAGES_DEBUG -e XDG_DATA_DIRS ${{ matrix.compiler }}-build-container
AS_USER: runuser -u tester --
BUILDDIR: builddir
steps:
- name: Prepare environment
id: env-setup
run: |
if [ "${{ matrix.sanitizer }}" == "address" && "${{ matrix.buildsystem }}" == "autotools" ]; then
echo "cflags=$BASE_CFLAGS" \
"-fsanitize=undefined -fsanitize-undefined-trap-on-error -fsanitize=address" >> $GITHUB_OUTPUT;
else
echo "cflags=$BASE_CFLAGS" >> $GITHUB_OUTPUT;
fi
- name: Prepare container
run: |
docker run --name $BUILD_CONTAINER \
--tty --device /dev/fuse --cap-add SYS_ADMIN \
--security-opt apparmor:unconfined \
-v $(pwd):/src \
-e DEBIAN_FRONTEND \
-e DEBCONF_NONINTERACTIVE_SEEN=true \
-e TERM=dumb \
-e MAKEFLAGS="-j $(getconf _NPROCESSORS_ONLN)" \
-e CC -e CFLAGS="${{ steps.env-setup.outputs.cflags }}" \
-d ubuntu:$UBUNTU_VERSION sleep infinity
- name: Install dependencies
run: |
$RUN_CMD apt-get update --quiet
$RUN_CMD apt-get upgrade --quiet -y
$RUN_CMD apt-get install --quiet -y --no-install-recommends \
${{ matrix.compiler }} \
desktop-file-utils \
fuse3 \
gettext \
gnome-desktop-testing \
gtk-doc-tools \
libcap2-bin \
libflatpak-dev \
libfontconfig1-dev \
libfuse3-dev \
libgdk-pixbuf-2.0-dev \
libgeoclue-2-dev \
libglib2.0-dev \
libjson-glib-dev \
libpipewire-0.3-dev \
libportal-dev \
libsystemd-dev \
libtool \
llvm \
python3-gi \
shared-mime-info
- name: Install dependencies for autotools
run: |
$RUN_CMD apt-get install --quiet -y --no-install-recommends \
autoconf \
automake \
autopoint \
make
if: ${{ matrix.buildsystem == 'autotools' }}
- name: Install dependencies for meson
run: |
$RUN_CMD apt-get install --quiet -y --no-install-recommends \
meson
if: ${{ matrix.buildsystem == 'meson' }}
- name: Check out xdg-desktop-portal
uses: actions/checkout@v3
- name: Setup test user
run: |
$RUN_CMD adduser --disabled-password --gecos "" tester
$RUN_CMD chown tester:tester . -R
- name: Build xdg-desktop-portal with autotools
run: |
$RUN_CMD $AS_USER ./autogen.sh --disable-dependency-tracking --enable-installed-tests
$RUN_CMD $AS_USER make
if: ${{ matrix.buildsystem == 'autotools' }}
- name: Run xdg-desktop-portal tests with autotools
run: $RUN_CMD $AS_USER timeout --signal=KILL -v ${TESTS_TIMEOUT}m make check
env:
TEST_IN_CI: 1
G_MESSAGES_DEBUG: all
ASAN_OPTIONS: detect_leaks=0 # Right now we're not fully clean, but this gets us use-after-free etc
if: ${{ matrix.buildsystem == 'autotools' }}
- name: Build xdg-desktop-portal with meson
run: |
$RUN_CMD $AS_USER meson setup ${BUILDDIR} $MESON_OPTIONS
$RUN_CMD $AS_USER meson compile -C ${BUILDDIR}
env:
MESON_OPTIONS: -Dinstalled-tests=true -Db_sanitize=${{ matrix.sanitizer }}
if: ${{ matrix.buildsystem == 'meson' }}
- name: Run xdg-desktop-portal tests with meson
run: $RUN_CMD $AS_USER timeout --signal=KILL -v ${TESTS_TIMEOUT}m meson test -C ${BUILDDIR}
env:
TEST_IN_CI: 1
G_MESSAGES_DEBUG: all
ASAN_OPTIONS: detect_leaks=0 # Right now we're not fully clean, but this gets us use-after-free etc
if: ${{ matrix.buildsystem == 'meson' }}
- name: Install xdg-desktop-portal with autotools
run: $RUN_CMD make install
if: ${{ matrix.buildsystem == 'autotools' }}
- name: Install xdg-desktop-portal with meson
run: $RUN_CMD meson install -C ${BUILDDIR}
if: ${{ matrix.buildsystem == 'meson' }}
- name: Run xdg-desktop-portal installed-tests
run: |
test -n "$($RUN_CMD $AS_USER gnome-desktop-testing-runner -l xdg-desktop-portal)"
$RUN_CMD $AS_USER \
env TEST_INSTALLED_IN_CI=1 XDG_DATA_DIRS=/src/tests/share/:$XDG_DATA_DIRS \
gnome-desktop-testing-runner --report-directory installed-test-logs/ \
-t $((TESTS_TIMEOUT * 60)) xdg-desktop-portal
env:
G_MESSAGES_DEBUG: all
TEST_IN_CI: 1
XDG_DATA_DIRS: /usr/local/share:/usr/share
ASAN_OPTIONS: detect_leaks=0 # Right now we're not fully clean, but this gets us use-after-free etc
- name: Upload test logs
uses: actions/upload-artifact@v3
with:
name: test logs
path: |
tests/*.log
test-*.log
installed-test-logs/
builddir/meson-logs/testlog.txt
xenial:
name: Ubuntu 16.04 build (old glib)
runs-on: ubuntu-22.04
container: ubuntu:16.04
steps:
- name: Install dependencies
run: |
apt-get update --quiet -y
apt-get install --quiet -y software-properties-common
add-apt-repository ppa:alexlarsson/flatpak
apt-get install --quiet -y \
autoconf \
automake \
autopoint \
desktop-file-utils \
gcc \
gettext \
gtk-doc-tools \
libfontconfig1-dev \
libgdk-pixbuf2.0-dev \
libglib2.0-dev \
libjson-glib-dev \
libsystemd-dev \
libtool \
shared-mime-info
- name: Install libfuse3
run: |
# Install libfuse3 dependencies
apt-get install --quiet -y git python3-pip udev
pip3 install meson==0.56.2 ninja
git clone https://github.com/libfuse/libfuse.git
cd libfuse
meson _build -Dexamples=false -Dtests=false
ninja -C _build install
- name: Check out xdg-desktop-portal
uses: actions/checkout@v3
- name: Configure xdg-desktop-portal
# TODO: Enable gtk-doc builds
# Meson to old to build libportal
# Could not find a pipewire package
# Geoclue is in 18.04 too old
run: ./autogen.sh --disable-pipewire --disable-geoclue --disable-libportal
- name: Build xdg-desktop-portal
run: make -j $(getconf _NPROCESSORS_ONLN)
env:
IMAGE_TAG: 20250213-1
on:
workflow_call:
outputs:
image:
description: "The build image"
value: ${{ jobs.build-container.outputs.image }}
image_options:
description: "The options to use with the image"
value: --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined --privileged
jobs:
build-container:
name: Create build container
runs-on: ubuntu-latest
outputs:
image: ${{ steps.check.outputs.image }}
steps:
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Check if image already exists on GHCR
id: check
run: |
ACTOR="${{ github.actor }}"
OWNER="${{ github.repository_owner }}"
image_actor="ghcr.io/${ACTOR,,}/xdg-desktop-portal:${{ env.IMAGE_TAG }}"
image_owner="ghcr.io/${OWNER,,}/xdg-desktop-portal:${{ env.IMAGE_TAG }}"
if docker manifest inspect "${image_owner}" >/dev/null ; then
echo "exists=true" >> "$GITHUB_OUTPUT"
echo "image=${image_owner}" >> "$GITHUB_OUTPUT"
exit 0
fi
if docker manifest inspect "${image_actor}" >/dev/null ; then
echo "exists=true" >> "$GITHUB_OUTPUT"
echo "image=${image_actor}" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "exists=false" >> "$GITHUB_OUTPUT"
echo "image=${image_owner}" >> "$GITHUB_OUTPUT"
- name: Build and push
if: ${{ steps.check.outputs.exists == 'false' }}
uses: docker/build-push-action@v5
with:
push: true
file: .github/workflows/Containerfile
tags: ${{ steps.check.outputs.image }}
name: Documentation
on: [push, pull_request]
jobs:
docs:
runs-on: ubuntu-20.04
container:
image: ubuntu:22.04
steps:
- name: Install dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt-get update
apt-get upgrade -y
apt-get install -y --no-install-recommends \
desktop-file-utils \
fuse3 \
gcc \
gettext \
gnome-desktop-testing \
gtk-doc-tools \
libcap2-bin \
libflatpak-dev \
libfontconfig1-dev \
libfuse3-dev \
libgdk-pixbuf-2.0-dev \
libgeoclue-2-dev \
libglib2.0-dev \
libjson-glib-dev \
libpipewire-0.3-dev \
libportal-dev \
libsystemd-dev \
llvm \
meson \
python3-gi \
shared-mime-info
- name: Install dependencies for doc builds
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt-get install -y --no-install-recommends \
ca-certificates \
git \
xmlto
- name: Check out xdg-desktop-portal
uses: actions/checkout@v3
- name: Build docs
run: |
meson setup builddir -Ddocbook-docs=enabled
meson compile -C builddir
- name: Prepare docs
working-directory: builddir/doc
run: |
mkdir published-docs
mv portal-docs.html ./published-docs/index.html
mv redirect.html ./published-docs/portal-docs.html
mv docbook.css ./published-docs
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./builddir/doc/published-docs/
destination_dir: ./
name: CI
on: [push, pull_request]
jobs:
build-container:
name: Container
uses: ./.github/workflows/container.yml
permissions:
packages: write
build-and-test:
name: Build and Test
uses: ./.github/workflows/build-and-test.yml
needs: build-container
with:
image: ${{ needs.build-container.outputs.image }}
image_options: ${{ needs.build-container.outputs.image_options }}
pages:
name: Documentation & Website
uses: ./.github/workflows/pages.yml
needs: build-container
permissions:
contents: read
pages: write
id-token: write
with:
image: ${{ needs.build-container.outputs.image }}
image_options: ${{ needs.build-container.outputs.image_options }}
\ No newline at end of file
on:
workflow_call:
inputs:
image:
required: true
type: string
image_options:
required: true
type: string
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
name: Build docs and website
runs-on: ubuntu-latest
container:
image: ${{ inputs.image }}
options: ${{ inputs.image_options }}
steps:
- name: Check out xdg-desktop-portal
uses: actions/checkout@v4
- name: Build docs
run: |
export PYTHONPATH="/root/.local/lib/python$(python3 -c 'import sys; print("{}.{}".format(*sys.version_info))')/site-packages:$PYTHONPATH"
export PATH="/root/.local/bin:$PATH"
meson setup builddir -Ddocumentation=enabled
ninja -C builddir doc/html
- name: Build website
uses: actions/jekyll-build-pages@v1
with:
source: ./doc/website
destination: ./_site
- name: Prepare docs
working-directory: builddir/doc
run: |
mv ./html ../../_site/docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
# Deployment job
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
name: Release new version
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
build-container:
name: Container
uses: ./.github/workflows/container.yml
permissions:
packages: write
release:
name: Build and publish a release
runs-on: ubuntu-latest
needs: build-container
permissions:
contents: write
container:
image: ${{ needs.build-container.outputs.image }}
options: ${{ needs.build-container.outputs.image_options }}
env:
XDP_TEST_IN_CI: 1
steps:
- name: Configure environment
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Checkout the repository
uses: actions/checkout@v4
- name: Build xdg-desktop-portal
run: |
meson setup . _build
meson dist -C _build
- name: Extract release information
run: |
# Extract the release version
releaseVersion=`meson introspect --projectinfo _build/ | jq -r .version`
echo "releaseVersion=$releaseVersion" | tee -a $GITHUB_ENV
echo $releaseVersion
# Extract the changelog
{
echo "releaseChangelog<<EOF"
perl -0777nE 'print $& if /(?<=\n\n).*?(?=\nChanges in)/sg' NEWS.md
echo "\nEOF"
} | tee -a $GITHUB_ENV
echo $releaseChangelog
# Check if version is a pre-release
preRelease=$((`echo $releaseVersion | cut -d '.' -f2` % 2))
{
echo -n "preRelease="
if [ $preRelease = 1 ] || [ $preRelease = "true" ]; then
echo "true";
else
echo "false";
fi
} | tee -a $GITHUB_ENV
echo $preRelease
- name: Create release
uses: ncipollo/release-action@v1.15.0
with:
tag: ${{ env.releaseVersion }}
body: ${{ env.releaseChangelog }}
prerelease: ${{ env.preRelease }}
artifacts: _build/meson-dist/*
/ABOUT-NLS
/doc/portal-docs.html
/doc/portal-docs.xml
/doc/portal-org.freedesktop.*.xml
/doc/org.freedesktop.portal.*.xml
/po/*.gmo
/po/*.header
/po/*.pot
/po/*.po~
/po/Makefile.in.in
/po/Makevars.template
/po/POTFILES
/po/Rules-quot
/po/boldquot.sed
/po/insert-header.sin
/po/remove-potcdate.sed
/po/remove-potcdate.sin
/po/stamp-po
/po/*.gmo
/po/*.header
/po/*.pot
/po/Makefile.in.in
/po/Makevars.template
/po/POTFILES
/po/Rules-quot
/po/boldquot.sed
/po/insert-header.sin
/po/quot.sed
/po/remove-potcdate.sed
/po/remove-potcdate.sin
/po/stamp-po
/xdg-desktop-portal-[0-9]*.tar.*
/xdg-desktop-portal-[0-9]*/
INSTALL
Makecache
Makefile
Makefile.in
config.*
configure
depcomp
install-sh
libtool
ltmain.sh
m4
!m4/glibtests.m4
missing
stamp-h1
.deps
*.o
aclocal.m4
autom4te.cache
compile
*.service
xdg-desktop-portal
xdg-desktop-portal-validate-icon
xdg-desktop-portal-rewrite-launchers
xdg-document-portal
xdg-permission-store
xdp-dbus.[ch]
xdp-impl-dbus.[ch]
xdg-desktop-portal.pc
.dirstamp
xdg-desktop-resources.c
document-portal-dbus.c
document-portal-dbus.h
permission-store-dbus.c
permission-store-dbus.h
geoclue-dbus.c
geoclue-dbus.h
testdb
/dbus-session-bus-*
/test-doc-portal
/test-portals
/test-xdp-utils
/test-permission-store
/tests/test-backends
test-driver
*.trs
*.log
/session.conf
__pycache__
[mypy]
warn_unused_configs = True
check_untyped_defs=True
[mypy-gi.*]
ignore_missing_imports = True
[mypy-dbus.*]
ignore_missing_imports = True
[mypy-dbusmock.*]
ignore_missing_imports = True
\ No newline at end of file
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.7.0
hooks:
# Run the linter.
- id: ruff
# Run the formatter.
- id: ruff-format
args: [ --check ]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
hooks:
- id: mypy
additional_dependencies:
- pytest
\ No newline at end of file
# XDG Desktop Portal - Contributing Guide
The contribution guidelines have been moved to the online documentation:
https://flatpak.github.io/xdg-desktop-portal/docs/for-contributors.html
NULL =
bin_PROGRAMS = $(NULL)
noinst_PROGRAMS = $(NULL)
noinst_LTLIBRARIES = $(NULL)
noinst_SCRIPTS =
noinst_DATA =
libexec_PROGRAMS = $(NULL)
test_extra_programs =
CLEANFILES = $(NULL)
DISTCLEANFILES= $(NULL)
BUILT_SOURCES = $(NULL)
EXTRA_DIST = tap-driver.sh tap-test
# All files meson needs
EXTRA_DIST += meson.build \
meson_options.txt \
data/meson.build \
doc/meson.build \
document-portal/meson.build \
meson.build \
po/meson.build \
src/meson.build \
tests/dbs/meson.build \
tests/meson.build \
tests/portals/meson.build \
tests/services/meson.build \
tests/share/applications/meson.build \
tests/share/meson.build \
tests/template.test.in \
$(NULL)
include $(top_srcdir)/glib-tap.mk
include $(top_srcdir)/Makefile.am.inc
SUBDIRS = doc po
%.service: %.service.in
$(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(libexecdir)|" -e "s|\@extraargs\@||" $< > $@
dbus_servicedir = $(DBUS_SERVICE_DIR)
service_in_files = $(NULL)
dbus_service_DATA = $(NULL)
systemduserunit_DATA = $(NULL)
CLEANFILES += $(dbus_service_DATA)
CLEANFILES += $(systemduserunit_DATA)
EXTRA_DIST += $(service_in_files)
ACLOCAL_AMFLAGS = --install -I m4 ${ACLOCAL_FLAGS}
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"xdg-desktop-portal\" \
-DLIBEXECDIR=\"$(libexecdir)\" \
$(NULL)
lib_LTLIBRARIES =
include data/Makefile.am.inc
include document-portal/Makefile.am.inc
include src/Makefile.am.inc
include tests/backend/Makefile.am.inc
include tests/Makefile.am.inc
pkgconfigdir = $(datadir)/pkgconfig
pkgconfig_DATA = xdg-desktop-portal.pc
EXTRA_DIST += xdg-desktop-portal.pc.in
EXTRA_DIST += README.md
install-data-hook:
$(MAKE) $(AM_MAKEFLAGS) install-test-data-hook
AM_DISTCHECK_CONFIGURE_FLAGS =
.PHONY: coverage lcov-clean genlcov
coverage:
$(AM_V_GEN) $(MAKE) $(AM_MAKEFLAGS) lcov-clean
$(AM_V_GEN) $(MAKE) -j $(getconf _NPROCESSORS_ONLN) check
$(AM_V_GEN) $(MAKE) $(AM_MAKEFLAGS) genlcov
lcov-clean:
$(AM_V_GEN) $(LCOV) --directory $(top_builddir) --zerocounters
genlcov:
$(AM_V_GEN) $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info
$(AM_V_GEN) $(GENHTML) --prefix $(top_builddir) --output-directory coverage coverage.info
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.GlobalShortcuts.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.GlobalShortcuts.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)
BACKGROUND_MONITOR_IFACE_FILES =\
$(top_srcdir)/data/org.freedesktop.background.Monitor.xml \
$(NULL)
Changes in 1.20.0
=================
Released: 2025-02-19
Enhancements:
- Document how the test suite works.
- Improve the test runner script.
Changes in 1.19.4
=================
Released: 2025-02-15
New Features:
- Introduce the host app registry. This interface allows host system apps
(i.e. apps not running under a sandboxing mechanism like Flatpak) register
themselves with XDG Desktop Portal. This allows XDG Desktop Portal to use
a proper app id, and desktop file, improving the interaction with portal
backends.
Enhancements:
- Use a new internal script to simplify running tests.
Bug Fixes:
- Properly escape notification body in the Notification portal.
- Fix various documentation links in the USB portal documentation page.
Changes in 1.19.3
=================
Released: 2025-02-12
Bug Fixes:
- Fix documentation links in the USB portal page.
- Make the Document portal track open files, and release them when shutting
down. This should fix some harmless leak reports.
- Fix a memory leak, a crash, and improve robustness against non-existing
folders in the Dynamic Launcher portal.
- Fix build with PipeWire 1.3.82
Enhancements:
- Make the host path xattr more useful by removing the trailing end character,
and also reporting the xattr of files inside folders added to the document
store.
- Remove libportal-based integrated tests. This should remove the cyclic
dependency between libportal, and xdg-desktop-portal. All tests are now based
on the Python testing framework.
Changes in 1.19.2
=================
Released: 2025-01-20
Bug Fixes:
- Fix permission check for host system apps in the Camera portal.
- Do not expose the Settings portal if there are no backends available.
- Disable sounds-related notification tests if the project is built without
wavparse.
Enhancements:
- Start porting the test suite to Python tests. Once finished, this should
break the cyclic dependency between xdg-desktop-portal and libportal.
- Install Python-based tests. This is mostly useful for distributions to run
tests as part of their packaging process.
Changes in 1.19.1
=================
Released: 2024-12-21
Dependencies:
- XDG Desktop Portal now requires GLib 2.72 or higher.
New Features:
- Introduce the Notification v2 portal. This updated version of the Notification
portal supports a plethora of new fields for notifications, such as sounds,
categories, purpose, and more.
- Introduce the USB portal. This portal allows apps with relevant permissions
to enumerate and acquire access to specific USB devices.
- Introduce a new `SchemeSupported` method to the OpenURI portal. This new
method allows apps to know ahead of time if the host system is able to deal
with a particular scheme.
Enhancements:
- Continued the move towards Python-based tests. This should simplify the
test setup in the project quite significantly, and also will allow removing
the cyclic dependency between libportal and XDG Desktop Portal.
- Introduce umockdev-based tests.
- Improve the icon validator so it can deal with memfd-based icons.
- Clarify behavior of the Settings portal for non-standardized keys.
- In the Global Shortcuts portal, clarify that the result the `BindShortcuts`
of may be a subset of all requested shortcuts.
- Add a documentation page about icon validation requirements.
Bug Fixes:
- Fix memory leaks in the Background, Email, and Global Shortcuts portals.
- Fix a general file descriptor & memory leak.
- Fix a regression in the Settings portal.
- New and updated translations.
Changes in 1.19.0
=================
Released: 2024-10-09
- Completely rework and restructure the documentation website. Documentation is
now segmented by target audience (app developers, desktop developers, and
contributors). It also documents how the Document portal operates, the FUSE
filesystem, and custom file attributes. This is available in the following
address: https://flatpak.github.io/xdg-desktop-portal/docs/index.html
- The portals.conf parser is now able to handle fallback backends better, and
respects the order of backends in the config file.
- Try to use the xdg-desktop-portal-gtk backend as a last resort backend, if
everything else fails.
- Implement getlk and setlk, and honour O_NOFOLLOW, in the Document portal's
FUSE filesystem.
- Neutralize the Devices portal. Originally the Devices portal was introduced
so that services like PulseAudio or PipeWire could request access to
microphones and cameras on the behalf of apps. It was not meant to be used by
sandboxed apps directly, which is unusual for a portal. Practically, however,
it didn't take off.
- Implement PID/TID mapping for host system apps.
- Add a new "supported_output_file_formats" option to the Print portal. This
can be used by apps like browsers to limit the output file formats presented
by the Print portal backend. For example, an app can limit file printing to
PDF files.
- Add a new "GetHostPaths" method to the Document portal, which allows mapping
file descriptors to paths on the host system. This can be used by apps to
show more meaningful file paths in the user interface.
- Like the new method above, the Document portal sets the
"user.document-portal.host-path" xattr on files, pointing to the the host
system file path. The use case is similar to "GetHostPaths".
- Make the Background portal more robust when validating autostart files.
- Clarify behavior of the File Chooser portal in the documentation pages.
- Improve robustness against deleted o_path fds in the Document portal.
- Fix a warning in some systems while trying to load Request D-Bus object
properties.
- Fix a physical inode leak in the Document portal.
- Various improvements to the test suite. Python-based tests now run in parallel
and are more careful when setting up the mock D-Bus server. Tests also start
dbus-monitor if necessary now. FUSE tests of the Document portal have been
made more TAP-alike now.
- Memory leak fixes in a variety of portals and services, including the
permissions database, the Document portal, the File Transfer portal, the
Location portal, the Background portal, tests, and the icon validator. And
more. There's a lot of memory leak fixes everywhere, really.
- Major refactorings of the icon validator. Icons are now limited to 4MB files.
- Update XML specification specifying session handle type to match current
actual ABI in GlobalShortcuts, Inhibit, RemoteDesktop, and ScreenCast portals.
- New and updated translations.
Changes in 1.18.1
=================
Released: 2023-10-26
- Communicate better when the Background portal kills an app
- Properly quote Flatpak command in the Background portal
- Improve documentation of the "cursor_mode" propery of the ScreenCast
backend D-Bus interface
- Fix ScreenCast portal removing transient restore permissions too early.
This fixes screen sharing dialogs on Chromium asking for the screen multiple
times.
- Only send the Closed session signal to the sender
- Add Meson options to disable building with Bubblewrap, and without the
Flatpak portal documentation. Disabling Bubblewrap is **highly** discouraged,
and only meant to be used on platforms that do not currently support it. By
disabling Bubblewrap, bitmap validation happens without a sandbox, which is
highly insecure since image parsing is a common source of exploits. Really,
just do not disable Bubblewrap please.
- Improve the manpage of portals.conf
- Various spelling fixes to the Document portal
- Add a new website! We don't have a fancy domain yet, but the website can be
accessed at https://flatpak.github.io/xdg-desktop-portal/
- Improve pid mapping for host system apps. This should get rid of some rare,
unnecessary warnings.
- Adjust documentation of Global Shortcuts portal's timestamps to millisecond
granularity
- Bump minimum Meson version to 0.58
Changes in 1.18.0
=================
Released: 2023-09-18
- Bump interface version of the Printer portal to 2
- Validate addresses following the HTML specs in the Email portal
Changes in 1.17.2
=================
Released: 2023-09-01
- Document minimum version of the new ReadOne() method of the Settings portal
- Add a mapping id property to the ScreenCast portal
- Add activation token parameter to the Email portal
- Test tarball generation in CI
Changes in 1.17.1
=================
Released: 2023-08-27
- Document xdg-desktop-portal versioning scheme
- Fix various issues in the OpenURI portal
- Introduce the ReadOne() method in the Settings portal. This method is now
preferred over the Read() method, as Read() mistakenly returned a variant
inside a variant. The Read() method will continue to exist for compatibility
with existing apps, but its usage is deprecated. We recommend apps to port
to the ReadOne() method. Apps can decide whether to use ReadOne() or Read()
by looking at the version of the Settings portal.
- Improvements to the new config-based portal matching mechanism. Config files
are now searched in standard paths, in a way that is compatible to other
system components (e.g. MIME types).
- Various small visual tweaks to the generated documentation
- Document a new 'accent-color' key in the Settings portal. This key represents
an arbitrary color in sRGB colorspace. How implementations of the portal
provide this key is entirely dependent on their internal policies and design.
- Translation updates
Changes in 1.17.0
=================
Released: 2023-08-04
- Drop the Autotools build. Meson is now the only supported build system.
- Rework how portal implementations are loaded. This new, more robust system
allows selecting specific backends for specific portals, and layering them
when necessary. Platforms that provide portals implementation are encouraged
to provide a suitable configuration file.
- Introduce a new Clipboard portal. This portal extends the Remote Desktop
portal by adding support for sharing clipboard between remote machines.
- Introduce a new Input Capture portal. This portal adds mechanisms for taking
control of input devices. The primary usage model is centered around the
InputLeap and Synergy use cases, where local devices are used to control
remote displays.
- Stop using the deprecated GTimeVal struct
- Bump GLib dependency to 2.66
- Add an "accept-label" option the the Print portal. This lets apps suggest a
proper label to the print operation.
- Various fixes to the Global Shortcuts portal
- Support restoring remote desktop sessions
- Improve robustness of the OpenURI portal by validating more URIs
- The PipeWire dependency is now mandatory
- Various improvements for the test suite
- Translation updates
Changes in 1.16.0
=================
Released: 2022-12-12
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment