hello, im attempting tro build a windows msi for l...
# kolide
w
hello, im attempting tro build a windows msi for launcher and am having issues with the launcher and osquery version flag, ideally i need to be able to specify either a local path or a different ip
s
You configure what server it connects to with the
hostname
flag
w
i thought hostname was to set the fleet server hostname not where to download the osquery/launcher stuff from
im trying to do this
Copy code
--osquery_version .\windows\osqueryd
but it just puts the arg as part of the url for dl.kolide.co
s
By default, launcher uses kolide’s notary server and download server. Of you want to change those, you can look at:
Copy code
-mirror_url                  The mirror server for autoupdates
  -notary_prefix               The prefix for Notary path that contains the collections
  -notary_url                  The Notary update server
package-builder is pretty simple. Look at
package-builder make --help
Or, if you’re disabling autoupdate, and just want to grab a local binary. you can set
update_channel
to a path on local disk.
w
oh ok, ill have to try that but i think the help states that osquery_version can use a file path
thats why im confused
s
Oh, yes, I wrote it down! If you specify a file path in
osquery_version
or
launcher_version
it should build that into the resultant binary. But you will probably still havbe the autoupdate stuff enabled.
So… Are you trying to use package-builder to build soemthing without autoupdate, or are you trying to use your own update server?
w
so for the time being i was trying to build an msi without autoupdate for testing, hence wanting to pull from a filepath, ideally it would pull from our artifactory server
s
Initial package build time isn’t the same as runtime update sources.
w
so are those not for the inital building of an msi?
s
Skimming things: 1. If you set
update_channel
to empty string, which might be the default, it will disable the runtime update functionality. 2. package build time uses the
_version
options. And either they specify the download channel, or a FS path.
w
so itll use the _version to intially populate the msi?
s
Yes, pretty sure.
If you find bugs in the MSI, I certainly want to hear about them.
w
cause my issue is that when i specify
osquery_version
with a filepath, not sure about the others, it takes the value and puts it as part of the url for the normal download
s
What are you doing, exactly?
w
the goal or the commands?
s
The command line
w
uh well i can give an approx, cant copy and paste but ill give it a shot one sec
s
You’re running this from a windows box? in a cmd.exe or powershell?
w
cmd
s
Though… I bet I can guess. The underlying functionality here is https://github.com/kolide/launcher/blob/a8761d72ed848d13bd40d6ec40b88c1662ffe445/pkg/packaging/packaging.go#L301-L302 which looks for a string starting with
./
to decide if it’s local. That’s probaby never true in cmd.
You could probably try powershell, and using
./
as the beginning of the path (or
/
), or you can make that logic more robust on windows.
w
yeah i have paths like C:\Users\user\Desktop\windows\osqueryd
but i can give it a shot with ps or relative pathing
s
Yeah. pretty sure that’s it then. The logic isn’t going to work there.
That logic is clearly fragile (or really, targeting my use case). I’d review a PR for it. But I’m not sure I can get to writing one this week. Not sure if it’s better to check if the binary exists. Or what.
w
yeah its weird in my mind a full path is usually better so thats why it threw me off i guess
w
ok i think that got further, but i need to install wix\heat, thanks for the help
s
It expects wix on a fairly specific path.
w
yeah i didnt realize i had to install it