mirage / qubes-mirage-firewall

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

Add code build with docker #102

Closed linse closed 4 years ago

linse commented 4 years ago

Hi @talex5 , we needed to add these lines in order to run build_with_docker.sh successfully on a Debian qube with Docker version 19.03.9. Do you think this change is sensible or is it intended to be called in a different way? We took these lines from .travis.yml

talex5 commented 4 years ago

What was the error when you tried? You shouldn't need to copy the source into the image, as the build-with-docker.sh script shares the host directory.

hannesm commented 4 years ago

the error we see without the two lines is:

Step 8/8 : CMD opam config exec -- mirage configure -t xen &&     opam config exec -- make tar
 ---> Running in 8b8bfccad6a4
Removing intermediate container 8b8bfccad6a4                                                                       
 ---> 81a3a8ecc5ce
Successfully built 81a3a8ecc5ce
Successfully tagged qubes-mirage-firewall:latest
Building Firewall...                             
mirage build
sh: /home/opam/qubes-mirage-firewall/_build/myocamlbuild: not found
run ['ocamlbuild' '-use-ocamlfind' '-classic-display' '-quiet' '-tags'
'predicate(mirage_xen),warn(A-4-41-42-44-48),debug,bin_annot,strict_sequence,principal,safe_string'
     '-pkgs'
arp,arp-mirage,astring,cstruct,dns-client,ethernet,functoria-runtime,ipaddr,lwt,mirage-clock-freestanding,mirage-crypto-entropy,mirage-logs,mirage-nat,mirage-net-xen,mirage-protocols,mirage-qubes,mirageruntime,miragetypes,mirage-types-lwt,mirage-xen,netchannel,pf-qubes,shared-memory-ring,tcpip,vchan'
     '-cflags' '-g' '-lflags'                                                                   
     '-g,-dontlink,unix,-dontlink,str,-dontlink,num,-dontlink,threads'                          
     '-tag-line' '<static*.*>: warn(-32-34)' '-Xs'                                             
     '_build-solo5-hvt,_build-ukvm' 'main.native.o']: exited with 127
run ['dune' 'exec' '--root' '/home/opam/qubes-mirage-firewall' '--'                              
     './config.exe' 'build']: exited with 1                                                      
make: *** [Makefile:18: build] Error 1                                                            
talex5 commented 4 years ago

Maybe you have a stale _build directory (try deleting it). But I don't understand why this change would make any difference, since the script mounts the source directory over whatever is in the image at /home/opam/qubes-mirage-firewall anyway.

hannesm commented 4 years ago

we tried again, and cannot reproduce. thanks for your input.