Title
#fleet
jlk

jlk

08/04/2022, 5:05 PM
ok - when I try to build an msi from intel macos, this is what I consistently get:
$ 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
5:05 PM
$ fleetctl -v                                                                                                 
fleetctl - version 4.18.0
m

marnin

08/04/2022, 5:10 PM
I just tested from my Intel Mac (12.4) with fleetctl 4.18.0 and I got a different error:
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
jlk

jlk

08/04/2022, 5:10 PM
you need docker to do the cross-platform build
5:11 PM
I'm using colima, hopefully that's Good Enough. https://github.com/abiosoft/colima
zwass

zwass

08/04/2022, 6:44 PM
Hmm, this is the first I'm hearing of Colima... haven't had a chance to test it yet.
jlk

jlk

08/04/2022, 9:01 PM
it should (ha) be a drop-in replacement. I'll fire up docker to test just in case
9:41 PM
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
9:48 PM
🤔 yea, reproducable. Guessing it has something to do with how coilma's mounting volumes, vs docker
zwass

zwass

08/04/2022, 10:23 PM
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).
jlk

jlk

08/04/2022, 10:25 PM
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
?
10:26 PM
yeah looks like if I add some debug logging I should be able to get the full command.
11:06 PM
🤯 you're using wine?? lol wow that's cool. 😄
zwass

zwass

08/04/2022, 11:07 PM
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 🍷🥂
jlk

jlk

08/04/2022, 11:41 PM
$ 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?
zwass

zwass

08/05/2022, 4:02 PM
No, feel free. What's the motivation to use Colima? Would help us to get some context.
jlk

jlk

08/05/2022, 4:02 PM
docker licensing
zwass

zwass

08/05/2022, 4:02 PM
ahhhhhhh that makes sense