-
Notifications
You must be signed in to change notification settings - Fork 74
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
fix: use host architecture to determine FreeBSD ABI #350
Conversation
✅ Deploy Preview for agent-public-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
We don't support arm in FreeBSD in NGINX Plus see: https://docs.nginx.com/nginx/technical-specs/ Is this PR needed? |
@oliveromahony uhm not sure what's the relationship with N+ here; I was working on the fix in #352 and realized that NFPM produces broken .pkg/.txz on M1 macbook. This PR fixes this in a way when you'll get same arch package on any host. |
We generally deploy on the same host/container as NGINX. We use Plus as the reference in our support matrices we test against. So for us, supporting arm64 isn't required for the packages we build. The local changes I'm ok with if you want to test on Mac M1/2 but we won't produce official arm64 packages for FreeBSD for the moment unless Plus supports that architecture |
@@ -4,6 +4,13 @@ set -e | |||
set -x | |||
set -euxo pipefail | |||
|
|||
case "$(uname -m)" in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we already have OSARCH variable in the root Makefile you can leverage. It should take from that value instead of adding more logic here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uhm I don't see any relation between Makefile arg(s), which are not even being exported, and entrypoint scripts. Moreover, with multiarch containers (e.g. buildx) you'll get broken entrypoint for archs not matching host's arch if you will be relying on OSARCH obtained on host. Finally, OSARCH is being weirdly transformed from uname -m
(introduced here - 24a158b#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52L36), so I wouldn't rely on that at all for the sake of simplicity.
@oliveromahony roger that - I'm not asking you to do so; but if/when N+ will ship aarch64 binaries for FreeBSD, agent changes will be minimal with this PR (basically, you'll just need to use full path with ABI/arch component for resulting .pkgs, that's all). |
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #350 +/- ##
=======================================
Coverage ? 67.25%
=======================================
Files ? 113
Lines ? 12714
Branches ? 0
=======================================
Hits ? 8551
Misses ? 3590
Partials ? 573 ☔ View full report in Codecov by Sentry. |
This allows to get working FreeBSD agent packages on both x86 and arm64 hosts/runners.
93db8b0
to
5e8c091
Compare
Proposed changes
This change allows to get working FreeBSD agent packages on both x86 and arm64 hosts/runners when running
make local-txz-package
target.Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTING
document