Skip to content

Commit

Permalink
fix(snap): stricter filtering for xcb libraries (#5205) (#5206)
Browse files Browse the repository at this point in the history
Given the content available in the gnome 3-28 content snap:
```
/snap/gnome-3-28-1804/current/usr/lib/x86_64-linux-gnu/libxcb.so.1
/snap/gnome-3-28-1804/current/usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
/snap/gnome-3-28-1804/current/usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0
/snap/gnome-3-28-1804/current/usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0.0.0
/snap/gnome-3-28-1804/current/usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0
/snap/gnome-3-28-1804/current/usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0.0.0
/snap/gnome-3-28-1804/current/usr/lib/x86_64-linux-gnu/libxcb-glx.so.0
/snap/gnome-3-28-1804/current/usr/lib/x86_64-linux-gnu/libxcb-glx.so.0.0.0
/snap/gnome-3-28-1804/current/usr/lib/x86_64-linux-gnu/libxcb-present.so.0
/snap/gnome-3-28-1804/current/usr/lib/x86_64-linux-gnu/libxcb-present.so.0.0.0
/snap/gnome-3-28-1804/current/usr/lib/x86_64-linux-gnu/libxcb-render.so.0
/snap/gnome-3-28-1804/current/usr/lib/x86_64-linux-gnu/libxcb-render.so.0.0.0
/snap/gnome-3-28-1804/current/usr/lib/x86_64-linux-gnu/libxcb-shm.so.0
/snap/gnome-3-28-1804/current/usr/lib/x86_64-linux-gnu/libxcb-shm.so.0.0.0
/snap/gnome-3-28-1804/current/usr/lib/x86_64-linux-gnu/libxcb-sync.so.1
/snap/gnome-3-28-1804/current/usr/lib/x86_64-linux-gnu/libxcb-sync.so.1.0.0
/snap/gnome-3-28-1804/current/usr/lib/x86_64-linux-gnu/libxcb-xfixes.so.0
/snap/gnome-3-28-1804/current/usr/lib/x86_64-linux-gnu/libxcb-xfixes.so.0.0.0
```

Replace the snapcraft.yaml's broad libxcb* filter with a set of more
targeted expressions for each of the provided libraries.

Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
  • Loading branch information
cjp256 authored Sep 17, 2020
1 parent 7134f9a commit 9164f4d
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 8 deletions.
10 changes: 9 additions & 1 deletion packages/app-builder-lib/templates/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,15 @@ parts:
- "-usr/lib/*/libwayland*"
- "-usr/lib/*/libX11*"
- "-usr/lib/*/libXau*"
- "-usr/lib/*/libxcb*"
- "-usr/lib/*/libxcb.so*"
- "-usr/lib/*/libxcb-dri2*"
- "-usr/lib/*/libxcb-dri3*"
- "-usr/lib/*/libxcb-glx*"
- "-usr/lib/*/libxcb-present*"
- "-usr/lib/*/libxcb-render*"
- "-usr/lib/*/libxcb-shm*"
- "-usr/lib/*/libxcb-sync*"
- "-usr/lib/*/libxcb-xfixes*"
- "-usr/lib/*/libXcomposite*"
- "-usr/lib/*/libXcursor*"
- "-usr/lib/*/libXdamage*"
Expand Down
70 changes: 63 additions & 7 deletions test/snapshots/linux/snapTest.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,15 @@ Object {
"-usr/lib/*/libwayland*",
"-usr/lib/*/libX11*",
"-usr/lib/*/libXau*",
"-usr/lib/*/libxcb*",
"-usr/lib/*/libxcb.so*",
"-usr/lib/*/libxcb-dri2*",
"-usr/lib/*/libxcb-dri3*",
"-usr/lib/*/libxcb-glx*",
"-usr/lib/*/libxcb-present*",
"-usr/lib/*/libxcb-render*",
"-usr/lib/*/libxcb-shm*",
"-usr/lib/*/libxcb-sync*",
"-usr/lib/*/libxcb-xfixes*",
"-usr/lib/*/libXcomposite*",
"-usr/lib/*/libXcursor*",
"-usr/lib/*/libXdamage*",
Expand Down Expand Up @@ -537,7 +545,15 @@ Object {
"-usr/lib/*/libwayland*",
"-usr/lib/*/libX11*",
"-usr/lib/*/libXau*",
"-usr/lib/*/libxcb*",
"-usr/lib/*/libxcb.so*",
"-usr/lib/*/libxcb-dri2*",
"-usr/lib/*/libxcb-dri3*",
"-usr/lib/*/libxcb-glx*",
"-usr/lib/*/libxcb-present*",
"-usr/lib/*/libxcb-render*",
"-usr/lib/*/libxcb-shm*",
"-usr/lib/*/libxcb-sync*",
"-usr/lib/*/libxcb-xfixes*",
"-usr/lib/*/libXcomposite*",
"-usr/lib/*/libXcursor*",
"-usr/lib/*/libXdamage*",
Expand Down Expand Up @@ -693,7 +709,15 @@ Object {
"-usr/lib/*/libwayland*",
"-usr/lib/*/libX11*",
"-usr/lib/*/libXau*",
"-usr/lib/*/libxcb*",
"-usr/lib/*/libxcb.so*",
"-usr/lib/*/libxcb-dri2*",
"-usr/lib/*/libxcb-dri3*",
"-usr/lib/*/libxcb-glx*",
"-usr/lib/*/libxcb-present*",
"-usr/lib/*/libxcb-render*",
"-usr/lib/*/libxcb-shm*",
"-usr/lib/*/libxcb-sync*",
"-usr/lib/*/libxcb-xfixes*",
"-usr/lib/*/libXcomposite*",
"-usr/lib/*/libXcursor*",
"-usr/lib/*/libXdamage*",
Expand Down Expand Up @@ -850,7 +874,15 @@ Object {
"-usr/lib/*/libwayland*",
"-usr/lib/*/libX11*",
"-usr/lib/*/libXau*",
"-usr/lib/*/libxcb*",
"-usr/lib/*/libxcb.so*",
"-usr/lib/*/libxcb-dri2*",
"-usr/lib/*/libxcb-dri3*",
"-usr/lib/*/libxcb-glx*",
"-usr/lib/*/libxcb-present*",
"-usr/lib/*/libxcb-render*",
"-usr/lib/*/libxcb-shm*",
"-usr/lib/*/libxcb-sync*",
"-usr/lib/*/libxcb-xfixes*",
"-usr/lib/*/libXcomposite*",
"-usr/lib/*/libXcursor*",
"-usr/lib/*/libXdamage*",
Expand Down Expand Up @@ -1007,7 +1039,15 @@ Object {
"-usr/lib/*/libwayland*",
"-usr/lib/*/libX11*",
"-usr/lib/*/libXau*",
"-usr/lib/*/libxcb*",
"-usr/lib/*/libxcb.so*",
"-usr/lib/*/libxcb-dri2*",
"-usr/lib/*/libxcb-dri3*",
"-usr/lib/*/libxcb-glx*",
"-usr/lib/*/libxcb-present*",
"-usr/lib/*/libxcb-render*",
"-usr/lib/*/libxcb-shm*",
"-usr/lib/*/libxcb-sync*",
"-usr/lib/*/libxcb-xfixes*",
"-usr/lib/*/libXcomposite*",
"-usr/lib/*/libXcursor*",
"-usr/lib/*/libXdamage*",
Expand Down Expand Up @@ -1235,7 +1275,15 @@ Object {
"-usr/lib/*/libwayland*",
"-usr/lib/*/libX11*",
"-usr/lib/*/libXau*",
"-usr/lib/*/libxcb*",
"-usr/lib/*/libxcb.so*",
"-usr/lib/*/libxcb-dri2*",
"-usr/lib/*/libxcb-dri3*",
"-usr/lib/*/libxcb-glx*",
"-usr/lib/*/libxcb-present*",
"-usr/lib/*/libxcb-render*",
"-usr/lib/*/libxcb-shm*",
"-usr/lib/*/libxcb-sync*",
"-usr/lib/*/libxcb-xfixes*",
"-usr/lib/*/libXcomposite*",
"-usr/lib/*/libXcursor*",
"-usr/lib/*/libXdamage*",
Expand Down Expand Up @@ -1428,7 +1476,15 @@ Object {
"-usr/lib/*/libwayland*",
"-usr/lib/*/libX11*",
"-usr/lib/*/libXau*",
"-usr/lib/*/libxcb*",
"-usr/lib/*/libxcb.so*",
"-usr/lib/*/libxcb-dri2*",
"-usr/lib/*/libxcb-dri3*",
"-usr/lib/*/libxcb-glx*",
"-usr/lib/*/libxcb-present*",
"-usr/lib/*/libxcb-render*",
"-usr/lib/*/libxcb-shm*",
"-usr/lib/*/libxcb-sync*",
"-usr/lib/*/libxcb-xfixes*",
"-usr/lib/*/libXcomposite*",
"-usr/lib/*/libXcursor*",
"-usr/lib/*/libXdamage*",
Expand Down

0 comments on commit 9164f4d

Please sign in to comment.