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

feature: resolving snap desktop files using app armor as the primary source #3426

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

mattkae
Copy link
Contributor

@mattkae mattkae commented Jun 17, 2024

What's new?

  • AppArmor is now the primary source of snap desktop files in the DesktopFileManager

@mattkae mattkae requested a review from Saviq June 17, 2024 15:57
@mattkae mattkae requested a review from a team as a code owner June 17, 2024 15:57
@mattkae
Copy link
Contributor Author

mattkae commented Jun 17, 2024

Whoops, broke the tests. Will fix em soon...

Copy link
Collaborator

@Saviq Saviq left a comment

Choose a reason for hiding this comment

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

You'll need to add a libapparmor build dependency to debian/control, and to snap/snapcraft.yaml.

@mattkae mattkae force-pushed the feature/apparmor_snap_resolution branch 8 times, most recently from 0a6c762 to 201cbf3 Compare June 17, 2024 17:54
Copy link

codecov bot commented Jun 17, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 77.23%. Comparing base (b5486c1) to head (19ce37f).
Report is 424 commits behind head on main.

Files with missing lines Patch % Lines
...c/server/frontend_wayland/desktop_file_manager.cpp 80.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3426      +/-   ##
==========================================
- Coverage   77.25%   77.23%   -0.03%     
==========================================
  Files        1071     1061      -10     
  Lines       68363    68069     -294     
==========================================
- Hits        52811    52570     -241     
+ Misses      15552    15499      -53     

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

@mattkae
Copy link
Contributor Author

mattkae commented Jun 17, 2024

@Saviq What should I do about the apparmor dependency on Fedora and Alpine? 🤔 Should that be an optional dependency?

@Saviq
Copy link
Collaborator

Saviq commented Jun 18, 2024

@Saviq What should I do about the apparmor dependency on Fedora and Alpine? 🤔 Should that be an optional dependency?

If they're not there, yeah.

@Saviq
Copy link
Collaborator

Saviq commented Jun 18, 2024

@mattkae Alpine does have it, BTW:

https://pkgs.alpinelinux.org/packages?name=apparmor

@mattkae
Copy link
Contributor Author

mattkae commented Jun 18, 2024

@mattkae Alpine does have it, BTW:

https://pkgs.alpinelinux.org/packages?name=apparmor

Do you know if I'll need something else there too? https://github.com/canonical/mir/actions/runs/9552401270/job/26328915493?pr=3426

@Saviq
Copy link
Collaborator

Saviq commented Jun 18, 2024

Do you know if I'll need something else there too? https://github.com/canonical/mir/actions/runs/9552401270/job/26328915493?pr=3426

Yeah, you need to install it! :D

apk add \
boost-dev \
ccache \
cmake \
coreutils \
elogind \
eudev-dev \
freetype-dev \
g++ \
glib-dev \
glm-dev \
grep \
gtest-dev \
libepoxy-dev \
libevdev-dev \
libinput-dev \
libxcursor-dev \
libxkbcommon-dev \
libxml++-2.6-dev \
lttng-ust-dev \
lttng-ust-tools \
make \
mesa-dev \
nettle-dev \
py3-dbusmock \
py3-pillow \
umockdev-dev \
wayland-dev \
yaml-cpp-dev

@mattkae
Copy link
Contributor Author

mattkae commented Jun 18, 2024

mir/spread/build/alpine/task.yaml

I have indeed added it, to no avail: https://github.com/canonical/mir/actions/runs/9566199163/job/26370892700?pr=3426 😢 Is there something else that I'm missing here?

@mattkae mattkae force-pushed the feature/apparmor_snap_resolution branch from d996b1c to 918237e Compare June 18, 2024 14:07
@Saviq
Copy link
Collaborator

Saviq commented Jun 18, 2024

Is there something else that I'm missing here?

Don't go around blind :)

spread -debug lxd:alpine-3.19:spread/build/alpine:amd64

The package you're after is libapparmor:

https://pkgs.alpinelinux.org/packages?name=libapparmor

@mattkae
Copy link
Contributor Author

mattkae commented Jun 18, 2024

_lib_apparmor

That is what I have ;) 918237e#diff-5f6d75408d28a1d92efc5968e0b1a34ee3c512d14427c514e56cd0b23290f52d

@mattkae mattkae force-pushed the feature/apparmor_snap_resolution branch from 918237e to 73e97a4 Compare June 18, 2024 18:51
Copy link
Contributor

@RAOF RAOF left a comment

Choose a reason for hiding this comment

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

Looks sensible, but the build system parts could be cleaned up.

CMakeLists.txt Outdated Show resolved Hide resolved
src/server/frontend_wayland/CMakeLists.txt Outdated Show resolved Hide resolved
@mattkae mattkae force-pushed the feature/apparmor_snap_resolution branch 3 times, most recently from 1762f8f to c3e4ae6 Compare June 20, 2024 12:41
@mattkae mattkae requested review from Saviq and RAOF June 20, 2024 12:42
Copy link
Collaborator

@Saviq Saviq left a comment

Choose a reason for hiding this comment

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

Looks legit to me.

doc/sphinx/.readthedocs.yaml Outdated Show resolved Hide resolved
@mattkae mattkae force-pushed the feature/apparmor_snap_resolution branch from c3e4ae6 to 19ce37f Compare June 20, 2024 13:07
Copy link
Collaborator

@Saviq Saviq left a comment

Choose a reason for hiding this comment

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

Yeah!

@Saviq Saviq added this pull request to the merge queue Jun 21, 2024
Merged via the queue into main with commit cd2a1db Jun 21, 2024
34 of 37 checks passed
@Saviq Saviq deleted the feature/apparmor_snap_resolution branch June 21, 2024 10:55
@AlanGriffiths AlanGriffiths mentioned this pull request Sep 9, 2024
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.

3 participants