Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make macOS package and tgz naming consistent #26

Open
Smjert opened this issue Jul 8, 2024 · 0 comments
Open

Make macOS package and tgz naming consistent #26

Smjert opened this issue Jul 8, 2024 · 0 comments
Labels
bug Something isn't working cmake

Comments

@Smjert
Copy link
Member

Smjert commented Jul 8, 2024

It has been brought to my attention that the macOS tgz we create, containing the artifacts needed to create a .pkg, recently changed the architecture name from x86_64 to arm64, due to how the CI was creating them.
Both architectures are wrong, because the binary inside it's actually a universal one.

Looking at how we name things though I see another inconsistency. The naming format for macOS artifacts has been copied from Linux, so the macOS common.make has the following scheme:

set(OSQUERY_PACKAGE_RELEASE "1.macos")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}_${OSQUERY_PACKAGE_RELEASE}_${CMAKE_SYSTEM_PROCESSOR}")

But it's being overriden in the productbuild (or .pkg) case with:

set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")

So in the end that naming only works for the .tgz. I think that we should decide a consistent naming scheme.

On the one hand it makes sense to me to have a package release component, in all cases, to indicate that the package has been recreated with the same contents (maybe there was an issue with the CI that created the package or what not).
I'm not sure if we ever used it though, since the package creation is all pretty automatic.

For the architecture, I was initially thinking of putting universal as default for the architecture, and then let the user manually set a custom architecture if they wanted, but adding an option only for the tgz (or any other method that is not .pkg) felt weird. Mostly in how would we even name that.
If the architecture appeared in all the artifacts, then it would make more sense.
Another alternative is to simply remove it and not let the user change it (without modifying the cmake). This would assume that the package is a universal one, and so always works wherever it's being installed.

@Smjert Smjert added bug Something isn't working cmake labels Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cmake
Projects
None yet
Development

No branches or pull requests

1 participant