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

Add support for aix/ppc64 build #263

Merged
merged 2 commits into from
Jan 20, 2025

Conversation

jtroy
Copy link
Contributor

@jtroy jtroy commented Sep 27, 2024

This PR adds support for building for the aix/ppc64 target. The following minor changes have been made:

  • Add build tags where necessary to include aix with the other Unixes.
  • Update dependencies to versions that support building for aix/ppc64

To reproduce the build failure:

$ GOOS=aix GOARCH=ppc64 go build ./...
# github.com/hashicorp/packer-plugin-sdk/pathing
pathing/config_file.go:41:9: undefined: configDir
pathing/config_file.go:88:28: undefined: defaultConfigFile
# github.com/bgentry/speakeasy
../../../go/pkg/mod/github.com/bgentry/[email protected]/speakeasy.go:23:18: undefined: getPassword
# github.com/hashicorp/go-sockaddr
../../../go/pkg/mod/github.com/hashicorp/[email protected]/route_info.go:14:10: undefined: routeInfo
../../../go/pkg/mod/github.com/hashicorp/[email protected]/ifaddrs.go:116:13: undefined: NewRouteInfo
../../../go/pkg/mod/github.com/hashicorp/[email protected]/ifaddrs.go:276:13: undefined: NewRouteInfo

The above command returns success when run with this PR's changes and the go-cty fix.

Test results from an AIX 7.3 system, again with the go-cty fix applied:

-bash-5.2$ go version
go version go1.23.1 aix/ppc64
-bash-5.2$ go test ./...
?       github.com/hashicorp/packer-plugin-sdk/acctest  [no test files]
?       github.com/hashicorp/packer-plugin-sdk/acctest/provisioneracc   [no test files]
?       github.com/hashicorp/packer-plugin-sdk/acctest/testutils        [no test files]
ok      github.com/hashicorp/packer-plugin-sdk/adapter  0.138s
?       github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc   [no test files]
?       github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc/internal/cmd      [no test files]
?       github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc/internal/plugincheck      [no test files]
?       github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc/internal/test-data/field-conflict [no test files]
?       github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc/internal/test-data/packer-plugin-happycloud/builder/happycloud    [no test files]
?       github.com/hashicorp/packer-plugin-sdk/common   [no test files]
?       github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc/internal/test-data/tag-conflict   [no test files]
?       github.com/hashicorp/packer-plugin-sdk/didyoumean       [no test files]
?       github.com/hashicorp/packer-plugin-sdk/filelock [no test files]
?       github.com/hashicorp/packer-plugin-sdk/json     [no test files]
ok      github.com/hashicorp/packer-plugin-sdk/bootcommand      4.746s
ok      github.com/hashicorp/packer-plugin-sdk/chroot   0.353s
ok      github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc/internal/fix      0.406s
ok      github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc/internal/fs       0.331s
ok      github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc/internal/mapstructure-to-hcl2     0.536s
ok      github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc/internal/renderdocs       0.234s
ok      github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc/internal/struct-markdown  0.238s
?       github.com/hashicorp/packer-plugin-sdk/random   [no test files]
?       github.com/hashicorp/packer-plugin-sdk/tmp      [no test files]
ok      github.com/hashicorp/packer-plugin-sdk/communicator     11.654s
ok      github.com/hashicorp/packer-plugin-sdk/communicator/ssh 6.864s
ok      github.com/hashicorp/packer-plugin-sdk/communicator/sshkey      3.503s
ok      github.com/hashicorp/packer-plugin-sdk/guestexec        0.237s
ok      github.com/hashicorp/packer-plugin-sdk/hcl2helper       0.143s
ok      github.com/hashicorp/packer-plugin-sdk/multistep        0.349s
ok      github.com/hashicorp/packer-plugin-sdk/multistep/commonsteps    0.626s
ok      github.com/hashicorp/packer-plugin-sdk/net      1.172s
ok      github.com/hashicorp/packer-plugin-sdk/packer   0.195s
ok      github.com/hashicorp/packer-plugin-sdk/packer/registry/image    0.214s
ok      github.com/hashicorp/packer-plugin-sdk/packerbuilderdata        0.182s
ok      github.com/hashicorp/packer-plugin-sdk/pathing  0.099s
ok      github.com/hashicorp/packer-plugin-sdk/plugin   0.072s
ok      github.com/hashicorp/packer-plugin-sdk/retry    0.060s
ok      github.com/hashicorp/packer-plugin-sdk/rpc      0.123s
ok      github.com/hashicorp/packer-plugin-sdk/sdk-internals/communicator/none  0.055s
ok      github.com/hashicorp/packer-plugin-sdk/sdk-internals/communicator/ssh   0.116s
ok      github.com/hashicorp/packer-plugin-sdk/sdk-internals/communicator/winrm 0.114s
ok      github.com/hashicorp/packer-plugin-sdk/shell    0.054s
ok      github.com/hashicorp/packer-plugin-sdk/shell-local      0.118s
ok      github.com/hashicorp/packer-plugin-sdk/shell-local/localexec    0.093s
ok      github.com/hashicorp/packer-plugin-sdk/shutdowncommand  0.060s
ok      github.com/hashicorp/packer-plugin-sdk/template 0.120s
ok      github.com/hashicorp/packer-plugin-sdk/template/config  0.094s
ok      github.com/hashicorp/packer-plugin-sdk/template/interpolate     0.118s
ok      github.com/hashicorp/packer-plugin-sdk/template/interpolate/aws/secretsmanager  0.096s
ok      github.com/hashicorp/packer-plugin-sdk/useragent        0.094s
ok      github.com/hashicorp/packer-plugin-sdk/uuid     0.111s
ok      github.com/hashicorp/packer-plugin-sdk/version  0.094s

@jtroy jtroy requested a review from a team as a code owner September 27, 2024 18:41
Copy link
Contributor

@lbajolet-hashicorp lbajolet-hashicorp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @jtroy,

Thanks for the PR, and apologies for leaving it open for so long.

The changes make sense, please be aware though that while this change makes it possible for Packer and plugins to be compiled for AIX, we won't start releasing those builds because of the maintenance implications that it has, as we don't have the resources to maintain yet another arch/OS combo.

That said, I'll merge this today and make it part of the next release of the SDK, this way you will be able to rely on it for your developments, hope this is good enough for you.

Thanks again for the PR @jtroy, much appreciated!

@lbajolet-hashicorp lbajolet-hashicorp merged commit ec2468d into hashicorp:main Jan 20, 2025
1 check passed
@jtroy
Copy link
Contributor Author

jtroy commented Jan 20, 2025

Hi, @lbajolet-hashicorp, I should've mentioned that I have no expectation of any kind of official AIX support. Sorry about that. Thanks for pulling it in!

@lbajolet-hashicorp
Copy link
Contributor

Don't worry, no need to be sorry at all, I just wanted to make sure to clarify that it's not in our priorities to support AIX :)

@lbajolet-hashicorp lbajolet-hashicorp added the enhancement New feature or request label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants