terraform-coop / terraform-provider-foreman

Terraform provider for Foreman
https://registry.terraform.io/providers/terraform-coop/foreman
Mozilla Public License 2.0
33 stars 31 forks source link

Darwin build linking issue might be fixed #128

Open tnorris opened 1 year ago

tnorris commented 1 year ago

It looks like back in v0.3.2, Darwin support was removed because of cross-compilation linking problems. I have been using using a hand compiled terraform-provider-foreman v0.5.8 on an ARM Macbook to provision Foreman hosts using the official golang container by adding Darwin back to the .goreleaser.yml and invoking it:

root@59272e39ab97:~/terraform-provider-foreman# uname -srp
Linux 6.3.8-200.fc38.aarch64 unknown
root@59272e39ab97:~/terraform-provider-foreman# git diff
diff --git a/.goreleaser.yml b/.goreleaser.yml
index 273e891..18a3a91 100644
--- a/.goreleaser.yml
+++ b/.goreleaser.yml
@@ -16,6 +16,7 @@ builds:
   ldflags:
     - '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
   goos:
+    - darwin
     - freebsd
     - windows
     - linux

Then outside of the linux container:

$ uname -srp
Darwin 21.6.0 arm
$ ./terraform-provider-foreman_v0.6.0
This binary is a plugin. These are not meant to be executed directly.
Please execute the program that consumes these plugins, which will
load any plugins automatically

Is there any testing I can do to make people comfortable with publishing Darwin builds to the registry again?

Thanks for your time!