From 65cbfb2c2268f951356b0c75bad93975f519c75e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Guzm=C3=A1n?= Date: Mon, 3 Mar 2025 19:02:23 +0000 Subject: [PATCH] apparmor-profiles-extra: fix screen reader in pidgin for Ecne (TPH#198) --- ...d868a4ed76d74eecf3b210ce7bf3098ffab4.patch | 37 +++++++++++++++++++ .../001_enable-restricted-dbus-update.patch | 15 ++++++++ helpers/make-apparmor-profiles-extra | 35 ++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 helpers/DATA/apparmor-profiles-extra/000-70aed868a4ed76d74eecf3b210ce7bf3098ffab4.patch create mode 100644 helpers/DATA/apparmor-profiles-extra/001_enable-restricted-dbus-update.patch create mode 100644 helpers/make-apparmor-profiles-extra diff --git a/helpers/DATA/apparmor-profiles-extra/000-70aed868a4ed76d74eecf3b210ce7bf3098ffab4.patch b/helpers/DATA/apparmor-profiles-extra/000-70aed868a4ed76d74eecf3b210ce7bf3098ffab4.patch new file mode 100644 index 0000000..4db9062 --- /dev/null +++ b/helpers/DATA/apparmor-profiles-extra/000-70aed868a4ed76d74eecf3b210ce7bf3098ffab4.patch @@ -0,0 +1,37 @@ +From 70aed868a4ed76d74eecf3b210ce7bf3098ffab4 Mon Sep 17 00:00:00 2001 +From: Jacob K +Date: Wed, 12 Feb 2025 12:19:24 -0600 +Subject: [PATCH] Add some lines from Atril's profile to fix the screen reader + +--- + profiles/usr.bin.pidgin | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/profiles/usr.bin.pidgin b/profiles/usr.bin.pidgin +index 5e18702..085301c 100644 +--- a/profiles/usr.bin.pidgin ++++ b/profiles/usr.bin.pidgin +@@ -8,6 +8,7 @@ + #include + #include + #include ++ #include + #include + #include + #include +@@ -82,6 +83,13 @@ + owner @{PROC}/@{pid}/auxv r, + owner @{PROC}/@{pid}/fd/ r, + ++ # These lines were copied from Atril's profile to make the screen reader functional ++ owner /{,var/}run/user/*/at-spi2-*/ rw, ++ owner /{,var/}run/user/*/at-spi2-*/** rw, ++ # Allow access to the non-abstract D-Bus socket used by at-spi > 2.42.0 ++ # https://gitlab.gnome.org/GNOME/at-spi2-core/-/issues/43 ++ owner /{,var/}run/user/*/at-spi/bus* rw, ++ + # Site-specific additions and overrides. See local/README for details. + #include + } +-- +2.25.1 diff --git a/helpers/DATA/apparmor-profiles-extra/001_enable-restricted-dbus-update.patch b/helpers/DATA/apparmor-profiles-extra/001_enable-restricted-dbus-update.patch new file mode 100644 index 0000000..696d5c5 --- /dev/null +++ b/helpers/DATA/apparmor-profiles-extra/001_enable-restricted-dbus-update.patch @@ -0,0 +1,15 @@ +Enable restricted dbus configuration usage by pidgin to fix MATE on Noble (Ecne) orca access. + +diff --git a/profiles/usr.bin.pidgin b/profiles/usr.bin.pidgin +index 085301c6..78338084 100644 +--- a/profiles/usr.bin.pidgin ++++ b/profiles/usr.bin.pidgin +@@ -49,7 +49,7 @@ + # Uncomment the two following lines if you want to allow Pidgin to update + # any DConf setting: + # owner @{HOME}/.{cache,config}/dconf/user rw, +- # owner /{,var/}run/user/[0-9]*/dconf/user rwk, ++ owner /{,var/}run/user/[0-9]*/dconf/user rwk, + + /{usr/,}bin/dash rix, + /{usr/,}bin/which rix, diff --git a/helpers/make-apparmor-profiles-extra b/helpers/make-apparmor-profiles-extra new file mode 100644 index 0000000..6da7e12 --- /dev/null +++ b/helpers/make-apparmor-profiles-extra @@ -0,0 +1,35 @@ +#!/bin/sh +# +# Copyright (C) 2008-2010 Rubén Rodríguez +# Copyright (C) 2025 Jacob K +# +# 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 +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +VERSION=1 + +. ./config + +# Apply patches for screen reader on in pidgin, see more at: +# https://gitlab.trisquel.org/trisquel/package-helpers/-/issues/198 +for patch in $(ls -v ${DATA}/*.patch) +do + patch_p1 $patch +done + + +changelog "Apply fix for issue TPH#198 for using pidgin with the screen reader." + +package