ok - when I try to build an msi from intel macos, ...
# fleet
j
ok - when I try to build an msi from intel macos, this is what I consistently get:
Copy code
$ fleetctl package --type=msi --fleet-url=<https://my.net> --enroll-secret=asklfasdf
Generating your osquery installer...
Windows Installer XML Toolset Toolset Harvester version
Copyright (c) .NET Foundation and contributors. All rights reserved.

heat.exe : error HEAT5052 : The directory 'Z:\var\folders\zl\0hhbn0j13hn2znwtcjxd_h_h0000gn\T\orbit-package1632196701\root' could not be found.
Error: package root files: heat failed: exit status 188
Copy code
$ fleetctl -v                                                                                                 
fleetctl - version 4.18.0
m
I just tested from my Intel Mac (12.4) with fleetctl 4.18.0 and I got a different error:
Copy code
fleetctl package --type=msi --fleet-url=<https://domain> --enroll-secret=4gxx
Generating your osquery installer...
Error: package root files: heat failed: exec: "docker": executable file not found in $PATH
j
you need docker to do the cross-platform build
I'm using colima, hopefully that's Good Enough. https://github.com/abiosoft/colima
z
Hmm, this is the first I'm hearing of Colima... haven't had a chance to test it yet.
j
it should (ha) be a drop-in replacement. I'll fire up docker to test just in case
works w/ docker for mac. Checking to see if I've got something squirrely going on or if thats worthy of opening an issue somewhere
🤔 yea, reproducable. Guessing it has something to do with how coilma's mounting volumes, vs docker
z
Hmm, yeah. We are looking into further improvements to packaging including making a packaging service that will allow Fleet to generate packages on behalf of users that will make all of these dependencies unnecessary (for users willing to have the packages generated on a machine besides their own).
j
I'm skimming through the code to see if I can reproduce from cli - looks like the docker interaction comes from
orbit/pkg/packaging/wix/wix.go
?
yeah looks like if I add some debug logging I should be able to get the full command.
🤯 you're using wine?? lol wow that's cool. 😄
z
Yeah it has to get a bit crazy... There's no tooling for making MSIs outside of Windows, so wix with wine is the best we've found 🍷🥂
j
Copy code
$ docker run --rm --platform linux/amd64 \
  --volume /var/folders/zl/0hhbn0j13hn2znwtcjxd_h_h0000gn/T/orbit-package2418274671:/var/folders/zl/0hhbn0j13hn2znwtcjxd_h_h0000gn/T/orbit-package2418274671 \
  fleetdm/wix:latest \
  heat dir '\var\folders\zl\0hhbn0j13hn2znwtcjxd_h_h0000gn\T\orbit-package2418274671\root' \
    -out '\var\folders\zl\0hhbn0j13hn2znwtcjxd_h_h0000gn\T\orbit-package2418274671\heat.wxs' \
    -gg -g1 -cg OrbitFiles -scom -sfrag -srd -sreg -dr ORBITROOT -ke
Windows Installer XML Toolset Toolset Harvester version
Copyright (c) .NET Foundation and contributors. All rights reserved.

heat.exe : error HEAT5052 : The directory 'Z:\var\folders\zl\0hhbn0j13hn2znwtcjxd_h_h0000gn\T\orbit-package2418274671\root' could not be found.
$ docker context list
NAME                TYPE                DESCRIPTION                               DOCKER ENDPOINT                                 KUBERNETES ENDPOINT                ORCHESTRATOR
colima *            moby                colima                                    unix:///Users/jlk/.colima/default/docker.sock
default             moby                Current DOCKER_HOST based configuration   unix:///var/run/docker.sock                     <https://localhost:6443> (default)   swarm
desktop-linux       moby                                                          unix:///Users/jlk/.docker/run/docker.sock
$ docker context use default
default
$ docker run --rm --platform linux/amd64 \
  --volume /var/folders/zl/0hhbn0j13hn2znwtcjxd_h_h0000gn/T/orbit-package2418274671:/var/folders/zl/0hhbn0j13hn2znwtcjxd_h_h0000gn/T/orbit-package2418274671 \
  fleetdm/wix:latest \
  heat dir '\var\folders\zl\0hhbn0j13hn2znwtcjxd_h_h0000gn\T\orbit-package2418274671\root' \
    -out '\var\folders\zl\0hhbn0j13hn2znwtcjxd_h_h0000gn\T\orbit-package2418274671\heat.wxs' \
    -gg -g1 -cg OrbitFiles -scom -sfrag -srd -sreg -dr ORBITROOT -ke
Windows Installer XML Toolset Toolset Harvester version
Copyright (c) .NET Foundation and contributors. All rights reserved.

$
So something picky in there. I gotta focus on some other things for a bit, but any issue if I open a gh issue w/ colima on this?
z
No, feel free. What's the motivation to use Colima? Would help us to get some context.
j
docker licensing
z
ahhhhhhh that makes sense
175 Views