Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interfaces/desktop: allow DBus access to plasmashell #13737

Conversation

alexmurray
Copy link
Contributor

@alexmurray alexmurray commented Mar 20, 2024

apparmor in Ubuntu 24.04 LTS introduces an AppArmor profile for KDEs plasmashell
called "plasmashell". As such, the various DBus objects are now implemented
by a process that has the apparmor label "plasmashell" instead of
"unconfined" (since previously it did not have an AppArmor profile).

Extend the DBus rules for these objects to include this new
peer label to allow snaps to send notifications as before.

Fixes LP: #2056696

Signed-off-by: Alex Murray [email protected]

apparmor in Ubuntu 24.04 LTS introduces an AppArmor profile for KDEs plasmashell
called "plasmashell". As such, the DBus Notifications object is now implemented
by a process that has the apparmor label "plasmashell" instead of
"unconfined" (since previously it did not have an AppArmor profile).

Extend the DBus rules for /org/freedesktop/Notifications to include this new
peer label to allow snaps to send notifications as before.

Fixes part of LP: #2056696

Signed-off-by: Alex Murray <[email protected]>
@alexmurray alexmurray requested a review from jhenstridge March 20, 2024 05:27
@codecov-commenter
Copy link

codecov-commenter commented Mar 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.90%. Comparing base (a5a6458) to head (39cbc9a).
Report is 9 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #13737      +/-   ##
==========================================
- Coverage   78.90%   78.90%   -0.01%     
==========================================
  Files        1043     1043              
  Lines      134337   134350      +13     
==========================================
+ Hits       106004   106013       +9     
- Misses      21721    21722       +1     
- Partials     6612     6615       +3     
Flag Coverage Δ
unittests 78.90% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ernestl ernestl requested review from ernestl, zyga and bboozzoo March 20, 2024 07:10
@ernestl ernestl added this to the 2.63 milestone Mar 20, 2024
@ernestl
Copy link
Collaborator

ernestl commented Mar 20, 2024

NOTE: Needs additional work to fully solve the LP bug

@alexmurray
Copy link
Contributor Author

To clarify the comment from @ernestl above - the LP bug mentions two issues - one for desktop notifications, and the other from system tray access - this PR solves the first issue. A subsequent PR will be sent if/when I can reproduce the issue around the system tray. So this PR can be considered complete in its own right (but just not sufficient to completely resolve that single LP bug).

Copy link
Contributor

@bboozzoo bboozzoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

apparmor in Ubuntu 24.04 LTS introduces an AppArmor profile for KDEs plasmashell
called "plasmashell". As such, the DBus StatusNotifierItem object is now
implemented by a process that has the apparmor label "plasmashell" instead of
"unconfined" (since previously it did not have an AppArmor profile).

Extend the DBus rules which allow access to /StatusNotifierItem to include this
new peer label to allow snaps to correctly register their app tray icons etc as
before.

Fixes the other part of LP: #2056696

Signed-off-by: Alex Murray <[email protected]>
apparmor in Ubuntu 24.04 LTS introduces an AppArmor profile for KDEs plasmashell
called "plasmashell". As such, the DBus Notifications, StatusNotifierItem and
dbusmenu objects are now implemented by a process that has the apparmor label
"plasmashell" instead of "unconfined" (since previously it did not have an
AppArmor profile).

Extend the DBus rules which allow access to these objects to include this new
peer label to allow snaps to correctly register their app tray icons etc as
before.

Fixes another part of LP: #2056696

Signed-off-by: Alex Murray <[email protected]>
@alexmurray
Copy link
Contributor Author

Added two additional commits which resolve the remaining issues from the Launchpad bug. This is now ready for review and merging.

@alexmurray alexmurray changed the title interfaces/desktop: allow DBus Notifications access to plasmashell interfaces/desktop: allow DBus access to plasmashell Mar 21, 2024
Copy link
Contributor

@bboozzoo bboozzoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still LGTM

Copy link
Contributor

@zyga zyga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Meulengracht Meulengracht merged commit 1afc063 into canonical:master Mar 25, 2024
38 of 44 checks passed
soumyaDghosh added a commit to soumyaDghosh/snapd that referenced this pull request Nov 6, 2024
Similar to canonical#13737. Amending this makes mpris work again in plasma.
Meulengracht pushed a commit that referenced this pull request Nov 12, 2024
Similar to #13737. Amending this makes mpris work again in plasma.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants