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

Allow inline nfpm to build AIX rpms if/when that gets added #4853

Open
2 of 3 tasks
Dylan-M opened this issue May 10, 2024 · 1 comment
Open
2 of 3 tasks

Allow inline nfpm to build AIX rpms if/when that gets added #4853

Dylan-M opened this issue May 10, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request triage Issue pending triage by one of the maintainers

Comments

@Dylan-M
Copy link

Dylan-M commented May 10, 2024

Is your feature request related to a problem? Please describe.

I need to support AIX, preferably using rpm files. Currently we only have the option to do it via tar.gz packages.

Describe the solution you'd like

I would like to use nfpm rpm builds to create aix rpm files.

Describe alternatives you've considered

None, we use goreleaser exclusively for our builds.

Search

  • I did search for other open and closed issues before opening this

Supporter

Code of Conduct

  • I agree to follow this project's Code of Conduct

Additional context

This would depend on goreleaser/nfpm#821

@Dylan-M Dylan-M added enhancement New feature or request triage Issue pending triage by one of the maintainers labels May 10, 2024
@Dylan-M
Copy link
Author

Dylan-M commented May 27, 2024

After being educated about how to fix direct builds with NFPM, I attempted to implement the same changes in our .goreleaser.yaml file and received the following errors:

  • starting release...
  ⨯ release failed after 0s                  error=yaml: unmarshal errors:
  line 256: field platform not found in type config.NFPM
  line 258: field arch not found in type config.NFPMRPM

Looking at the code, I see the relevant structs here:

type NFPM struct {

And:
type NFPMRPM struct {

These structs do not contain the relevant fields that need passed to nfpm.

Here is a snippet from my nfpm.yaml where these are present and working:

name: "aix-somefile"
arch: "ppc64"
platform: "aix7.2"
version: "1.0.0"
vendor: Company
maintainer: Company Maintainer Email
description: Package Description
homepage: https://some-url.com
rpm:
  arch: ppc

Specifically, the platform and rpm/arch (not standalone arch) lines.

I assume that rpm/arch is being set automagically from arch, however I need the ability to override it for AIX because AIX ppc64 rpms expect rpm arch set to ppc. Linux ppc64 arch rpms expect rpm arch set to ppc64. This means we can't (without major modifications) use the already built in override capabilities in the nfpm code.

I'm not sure if platform is being set anywhere, but if it is I would guess it is set from the os. Again, I need to override this because the os is aix and the platform has to follow the pattern of aix#.#, such as aix7.2 in order to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage Issue pending triage by one of the maintainers
Projects
None yet
Development

No branches or pull requests

2 participants