https://github.com/osquery/osquery logo
Title
m

Madhur Jodhwani

09/06/2021, 10:32 AM
Command:go run ./cmd/package --type pkg --enroll-secret=+6fOMFntLWUrMphCww64WTXP2P7LWlWo --fleet-url=<https://127.0.0.1:8080> --update-url=<http://localhost:8000> --update-roots='[{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"058619f952fcd0d3504fedb65f37b714a9b32efd34a61070ae193d7a11ae1307"}}]' --insecure



Output:2021-09-06T15:59:55+05:30 FTL package failed error="initialize updates: failed to get orbit: exec new version: Incorrect Usage. flag needs an argument: -version\n\nNAME:\n  Orbit osquery - A powered-up, (near) drop-in replacement for osquery\n\nUSAGE:\n  orbit [global options] command [command options] [arguments...]\n\nCOMMANDS:\n  help, h Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n  --type value        Type of package to build\n  --enroll-secret value   Enroll secret for authenticating to Fleet server\n  --fleet-url value     URL (host:port) of Fleet server\n  --fleet-certificate value Path to server cerificate bundle\n  --identifier value     Identifier for package product (default: \"com.fleetdm.orbit\")\n  --version value      Version for package product (default: \"0.0.2\")\n  --insecure         Disable TLS certificate verification (default: false)\n  --service         Install orbit/osquery with a persistence service (launchd, systemd, etc.) (default: true)\n  --sign-identity value   Identity to use for macOS codesigning\n  --notarize         Whether to notarize macOS packages (default: false)\n  --osqueryd-channel value  Update channel of osqueryd to use (default: \"stable\")\n  --orbit-channel value   Update channel of Orbit to use (default: \"stable\")\n  --update-url value     URL for update server (default: \"<https://tuf.fleetctl.com>\")\n  --update-roots value    Root key JSON metadata for update server (from fleetctl updates roots)\n  --debug          Enable debug logging (default: false)\n  --help, -h         show help (default: false)\n\x1b[90m2021-09-06T15:59:55+05:30\x1b[0m \x1b[1m\x1b[31mFTL\x1b[0m\x1b[0m package failed \x1b[31merror=\x1b[0m\x1b[31m\"flag needs an argument: -version\"\x1b[0m\n: exit status 1"
exit status 1
So I have been trying to figure out this that I have my own update server and I have added orbit and osqueryd binaries to it but I am unable to build orbit package as specified in the docs and I get the above error on running thequery as mentioned, any idea what I have done wrong coz I am trying to figure out the auto update part.
c

Chad

09/06/2021, 11:16 AM
probably not this but:
--type=pkg
not sure if flag needs the equals sign
m

Madhur Jodhwani

09/06/2021, 11:24 AM
Naa, I changed it and that doesn't seem the problem, I am getting the same issue.
c

Chad

09/06/2021, 11:34 AM
Does it build without the update server flags?
m

Madhur Jodhwani

09/06/2021, 12:12 PM
Got it bro, it worked later on, just did a fresh build after updating server