mirage / qubes-mirage-firewall

A Mirage firewall VM for QubesOS
BSD 2-Clause "Simplified" License
211 stars 28 forks source link

Investigate why building on Alpine doesn't work #119

Closed talex5 closed 1 year ago

talex5 commented 4 years ago

From https://github.com/mirage/qubes-mirage-firewall/pull/116#issuecomment-716625681:

I've switched the base image in the Dockerfile from Alpine to Fedora, and it seems to be working now.

It would be a good idea to investigate what the problem was with Alpine. This commit changed the Dockerfile from using Alpine to using Fedora: https://github.com/mirage/qubes-mirage-firewall/pull/116/commits/be7461a20a3aabf20822414d992fad72453197c7

That commit generates a working image, while the parent commit generates a broken one (stops responding to events during the boot) with no other changes. The build-with-docker.sh script includes the expected hash of the result in each case.

talex5 commented 4 years ago

/cc @mato

palainp commented 4 years ago

Not sure if this can help but I noticed two more differences between the builds (none in the textual files in the _build directory, but the logs differs) :

[user@localhost tmp]$ for ext in ml mli mli.depends cmi cmo; do for f in _build.fedora/*.$ext ; do diff $f _build.alpine/`basename $f`; done ; done
[...] nothing useful
[user@localhost tmp]$ diff _build.*/log
[...]
38c38
< #      { version = "4.10.0"
---
> #      { version = "4.10.1"
57c57
< #      ; bytecomp_c_libraries = [ "-lm"; "-lpthread" ]
---
> #      ; bytecomp_c_libraries = [ "-lm"; "-ldl"; "-lpthread" ]
66c66
< #      ; native_c_libraries = [ "-lm" ]
---
> #      ; native_c_libraries = [ "-lm"; "-ldl" ]
palainp commented 1 year ago

We now use a minimal debian image. We'll reopen this issue if we move back to alpine in future :)