beeware / beeware/briefcase

AppImages cannot be built on macOS when Docker Desktop is configured for VirtioFS

Open
#1,353 0 comments 0 reactions 0 assignees View on GitHub
bug macOS
Dominant language
Python
Stars
3.3k
Forks
549
Avg merge
1d 4h
Merged PRs (30d)
40

Description

### Describe the bug

Yet another Docker configuration option changes how the bind mount is behaving...

When I was trying to confirm that v0.3.14 did, in fact, support building an AppImage, it kept failing when linuxdeploy encountered permission errors inside the container.

For an as of yet unknown reason, all of the files that linuxdeploy copied from the container's `/usr/lib64` directory in to the bind mounted `build` directory were completely unusable; they seemingly are without metadata.

```
[brutus@518e7b7e5bb7 app]$ ls -ls Hello\ World.AppDir/usr/lib/
ls: cannot access Hello World.AppDir/usr/lib/libblkid.so.1: No such file or directory
ls: cannot access Hello World.AppDir/usr/lib/libgobject-2.0.so.0: No such file or directory
ls: cannot access Hello World.AppDir/usr/lib/libcairo.so.2: No such file or directory
ls: cannot access Hello World.AppDir/usr/lib/libmount.so.1: No such file or directory
ls: cannot access Hello World.AppDir/usr/lib/libpixman-1.so.0: No such file or directory
ls: cannot access Hello World.AppDir/usr/lib/libXau.so.6: No such file or directory
ls: cannot access Hello World.AppDir/usr/lib/libselinux.so.1: No such file or directory
ls: cannot access Hello World.AppDir/usr/lib/libcairo-gobject.so.2: No such file or directory
ls: cannot access Hello World.AppDir/usr/lib/libgirepository-1.0.so.1: No such file or directory
ls: cannot access Hello World.AppDir/usr/lib/libglib-2.0.so.0: No such file or directory
ls: cannot access Hello World.AppDir/usr/lib/libxcb-shm.so.0: No such file or directory
ls: cannot access Hello World.AppDir/usr/lib/libcrypt.so.1: No such file or directory
ls: cannot access Hello World.AppDir/usr/lib/libpcre.so.1: No such file or directory
ls: cannot access Hello World.AppDir/usr/lib/libXext.so.6: No such file or directory
ls: cannot access Hello World.AppDir/usr/lib/libXrender.so.1: No such file or directory
ls: cannot access Hello World.AppDir/usr/lib/libgio-2.0.so.0: No such file or directory
ls: cannot access Hello World.AppDir/usr/lib/libbz2.so.1: No such file or directory
ls: cannot access Hello World.AppDir/usr/lib/libffi.so.6: No such file or directory
ls: cannot access Hello World.AppDir/usr/lib/libgmodule-2.0.so.0: No such file or directory
ls: cannot access Hello World.AppDir/usr/lib/libpng15.so.15: No such file or directory
ls: cannot access Hello World.AppDir/usr/lib/libxcb-render.so.0: No such file or directory
total 0
? -????????? ? ? ? ? ? libblkid.so.1
? -????????? ? ? ? ? ? libbz2.so.1
? -????????? ? ? ? ? ? libcairo-gobject.so.2
? -????????? ? ? ? ? ? libcairo.so.2
? -????????? ? ? ? ? ? libcrypt.so.1
? -????????? ? ? ? ? ? libffi.so.6
? -????????? ? ? ? ? ? libgio-2.0.so.0
? -????????? ? ? ? ? ? libgirepository-1.0.so.1
? -????????? ? ? ? ? ? libglib-2.0.so.0
? -????????? ? ? ? ? ? libgmodule-2.0.so.0
? -????????? ? ? ? ? ? libgobject-2.0.so.0
? -????????? ? ? ? ? ? libmount.so.1
? -????????? ? ? ? ? ? libpcre.so.1
? -????????? ? ? ? ? ? libpixman-1.so.0
? -????????? ? ? ? ? ? libpng15.so.15
? -????????? ? ? ? ? ? libselinux.so.1
? -????????? ? ? ? ? ? libXau.so.6
? -????????? ? ? ? ? ? libxcb-render.so.0
? -????????? ? ? ? ? ? libxcb-shm.so.0
? -????????? ? ? ? ? ? libXext.so.6
? -????????? ? ? ? ? ? libXrender.so.1
```

When I switched Docker's "sharing implementation" from VirtioFS to gRPC FUSE, this issue did not present any longer.

### Steps to reproduce

1. Configured Docker Desktop to use VirtioFS
2. Run `briefcase build linux appimage`

### Expected behavior

AppImages can be built on macOS regard less of Docker Desktop configuration.

My guess is linuxdeploy is performing IO operations that are not implemented in some layer of VirtioFS...

### Screenshots

_No response_

### Environment

- Operating System: monterey
- Python version: 3.11.3
- Software versions:
- Briefcase: 0.3.14, 0.3.15

### Logs

[briefcase.2023_07_10-13_08_38.package.log](https://github.com/beeware/briefcase/files/12004640/briefcase.2023_07_10-13_08_38.package.log)

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `briefcase build linux appimage` on macOS with Docker Desktop's VirtioFS and compare it with gRPC FUSE; inspect the linuxdeploy step and attached packaging log. Done means the AppImage build completes successfully with VirtioFS, as it does with gRPC FUSE.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
build-system, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.