Title
#macos
w

wes

09/15/2021, 7:47 PM
I can spin up a github issue but wanted to bring it up here. Would it make sense to put the actual osquery version in the Info.plist of the app bundle? Currently there isn’t one. This would make it very easy for tools to make sure the correct osquery version is installed without jumping through extra hoops or shelling out to osquery itself.
7:47 PM
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "<http://www.apple.com/DTDs/PropertyList-1.0.dtd>">
<plist version="1.0">
<dict>
    <key>CFBundleExecutable</key>
    <string>osqueryd</string>
    <key>CFBundleIdentifier</key>
    <string>io.osquery.agent</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>osqueryd</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
</dict>
</plist
s

sharvil

09/15/2021, 7:58 PM
That's a great idea! osquery packaging is a little different since we use CMake + CPack across platforms, so it's not super straightforward, but I will try to chew on it
7:58 PM
Though we also have
osquery_info
table, which has the version info (just fyi in case you missed that), but as you said, would require a query
w

wes

09/15/2021, 8:00 PM
cool, I was just looking through the repo to see how the pkg gets built and you are right it is a tad tricky haha
8:01 PM
CFBundleVersion
or
CFBundleShortVersionString
would work great in the
Info.plist
s

sharvil

09/15/2021, 8:01 PM
tad is a bit of an understatement haha! But we have really overhauled it, and this works cross platform, and it's mostly automated now!
w

wes

09/15/2021, 8:02 PM
Nice!
s

sharvil

09/15/2021, 8:21 PM
thanks!
s

seph

09/15/2021, 8:55 PM
If I get on a soapbox…. 1. We should also create distribution packages 2. Whicih will need metadata set 3. because the apple tooling strips the title out when it coverts package formats.
m

macjustice

11/10/2021, 9:52 PM
I just ran across this myself, would it make sense to add a directive to
build_x86.yml
, to stick the version in the Info.plist file there? I'd submit a PR if I can make sure I'm understanding this correctly, I'm not very familiar with GitHub Actions
s

seph

11/10/2021, 10:13 PM
GitHub actions are kinda like yaml annotated shell scripts. If you see an obvious looking command, you're probably looking in the right place.
m

macjustice

11/10/2021, 10:24 PM
Sure, it's more enviroment/context type stuff I'm puzzling through, like this
ccache
bit
10:28 PM
I'll give it a shot and see what happens 🤷
s

seph

11/10/2021, 11:13 PM
If you point me at a line, I can tell you what it does. Or the github docs are okay.
11:14 PM
But each “step” is like a shell script (or single command) and they’re run mostly in series.
Mike Myers

Mike Myers

11/12/2021, 6:56 PM
We're renaming that one to
hosted_runners.yml
and making quite a few changes in this PR just FYI https://github.com/osquery/osquery/pull/7330/files#diff-9f96c7398750f97ef9c6b9389a79c9282ceac7bfc98f27404473d88d03b9b00d
m

macjustice

11/12/2021, 7:33 PM
The change I'm proposing is pretty minor, seems like it would slot in just as well somewhere in the proposed change to
hosted_runners.yml