<@U7QP20JQH> sorry, I just realized I didn't reall...
# kolide
@seph sorry, I just realized I didn't really answer the question the command I am running is
make package-builder
What exactly did you run, and what is the full out that it produced? This seems like a pretty weird case. It’s also what travis-ci is doing.
It seems a bit like a go deps error.
Cut and paste the terminal, or screen shot it, or something
Marquiss-MBP:launcher marquis$ docker run --rm -it kolide/fpm echo "it works" it works Marquiss-MBP:launcher marquis$ make package-builder go run cmd/make/make.go -targets=deps-go,install-tools build command-line-arguments: cannot load archive/tar: cannot find module providing package archive/tar make: * [deps-go] Error 1 Marquiss-MBP:launcher marquis$
I am just following the instructions on the package-builder docs. I did a brew install go and that's it.
@Marquis Carroll I think I see what’s happening. Can you try running
GO111MODULE=on go mod download
and then
make package-builder
still get the same error as above
Marquiss-MBP:launcher marquis$ GO111MODULE=on go mod download Marquiss-MBP:launcher marquis$ make package-builder go run cmd/make/make.go -targets=deps-go,install-tools build command-line-arguments: cannot load archive/tar: cannot find module providing package archive/tar make: * [deps-go] Error 1
Interesting. I think this is something in your environment. Running in docker:
Copy code
dover:launcher seph$ docker run -i -t golang:1.12-stretch
root@8a9b9c01992b:/go# cd /tmp 
root@8a9b9c01992b:/tmp# git clone <https://github.com/kolide/launcher.git>
Cloning into 'launcher'...
remote: Enumerating objects: 48, done.
remote: Counting objects: 100% (48/48), done.
remote: Compressing objects: 100% (43/43), done.
remote: Total 2450 (delta 11), reused 7 (delta 2), pack-reused 2402
Receiving objects: 100% (2450/2450), 3.54 MiB | 0 bytes/s, done.
Resolving deltas: 100% (1423/1423), done.
root@8a9b9c01992b:/tmp# cd launcher/
root@8a9b9c01992b:/tmp/launcher# make package-builder
go run cmd/make/make.go -targets=deps-go,install-tools
go: finding <http://github.com/bitly/go-simplejson|github.com/bitly/go-simplejson> v0.5.0
go: finding <http://github.com/WatchBeam/clock|github.com/WatchBeam/clock> v0.0.0-20170901150240-b08e6b4da7ea
go: finding <http://github.com/bugsnag/panicwrap|github.com/bugsnag/panicwrap> v1.2.0
go: finding <http://github.com/Sirupsen/logrus|github.com/Sirupsen/logrus> v1.0.3
go: finding <http://github.com/bmizerany/assert|github.com/bmizerany/assert> v0.0.0-20160611221934-b7ed37b82869
Do you have anything odd about network connectivity?
Wait… Why didn’t
GO111MODULE=on go mod download
produce output?
Yeah I am not sure what's wrong.. I am in the launcher directory, and that command did not produce any output.. what do you recommend?
Not sure. Seems like your go is weird.
How do you recommend properly getting that installed and starting over?
I’m not sure where to start with that. You may not need package-builder. It’s a tool to generate OS packages for launcher. It is unrelated to using launcher
Launcher itself can be downloaded from the github releases page
Yeah so I think that is my object, I am trying to build debian packages for my ubuntu hosts to activate to my new kolide fleet server. Am I mistaken?
package-builder is one way to build that kind of package, yes. Debian has it’s own tool chain. There are third party tools (like fpm) as well
Thanks I will try FPM
So good news the package-builder ended up working for me.. now, how do I specify making it a debian package?
I didn't see that in the documentation
What did the problem turn out to be?
From the docs: https://github.com/kolide/launcher/blob/master/docs/package-builder.md#cross-platform-binaries-and-targets If you’re running on a linux machine, you will, by default, get both an rpm and deb.
I’m going to be honest I have no clue. I just cleared out my system and reinstalled go and got the same errors and just kept doing make package builder command and it ended up working. Super weird. I created it on my Mac like the docs said so if I want a Linux one I need to make it on a Ubuntu host?
It generated a .pkg file on my Mac
You can cross package from darwin to linux. Target would be linux-systemd-deb
hey sorry, last question I hope - when I did the flag for darwin-launchd-pkg etc.. it outputed this
so do I just rename the extension to dpkg?
would be me a mac packaing, using launchd, packaged via pkg. Not at all what you what for dpkg. As said, you want
could not generate packages: version detection: Failed to exec. Perhaps -- Can't autodetect while cross compiling. (): run command /var/folders/2v/x95_2hh924z3xr2qc7mc025w0000gn/T/package.packageRoot681561942/usr/local/launcher/bin/launcher [-version], stderr=: fork/exec /var/folders/2v/x95_2hh924z3xr2qc7mc025w0000gn/T/package.packageRoot681561942/usr/local/launcher/bin/launcher: exec format error
Am I missing something here?
As the error says, package version auto-detection won’t work when you’re cross compiling. So specify it on the command line.
./build/package-builder make --hostname=<http://domain.com:8080|domain.com:8080> --enroll_secret=secretkey --extension_version nightly --targets linux-systemd-deb
That's what I am doing that's supposed to be what I see correct?
Of course I omitted the hostname and enroll secret purposely
I am still getting that error
These tools are not the friendliest. You will need to poke through the
output for some directions. For example, there is a
Finally got it! thanks a bunch!
Hey quick question, so I created the package and it properly "installs" my debian on the ubuntu host but it does not show up on my kolide fleet gui.. it keeps saying invalid enroll key, and missing node key.. but I am taking the enroll key from my server when I build the package. Is there something I should be aware of?
so it says
Access the debug endpoints at /debug/?token=<token>
and it keeps saying invalid enroll secret so should I specify that token in the fleet serve command?