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 the ability to set the architectures to build for in the modulemd file #399

Closed
mprahl opened this issue Dec 6, 2019 · 8 comments · Fixed by #401
Closed

Add the ability to set the architectures to build for in the modulemd file #399

mprahl opened this issue Dec 6, 2019 · 8 comments · Fixed by #401
Assignees
Milestone

Comments

@mprahl
Copy link
Contributor

mprahl commented Dec 6, 2019

Currently, there is a way to override the arches per component, but it'd be nice to be able to set the default arches at the module level. In practice, MBS would set these arches on the build tags it creates in Koji.

This should likely be a field under buildopts.

@sgallagher sgallagher added this to the 2.9.0 milestone Dec 6, 2019
@sgallagher
Copy link
Collaborator

@mprahl Something like this?

...
data:
  ...
  buildopts:
    arches: [ x86_64 ]
    ...

@mprahl
Copy link
Contributor Author

mprahl commented Dec 6, 2019

@sgallagher yes. That looks good to me.

@sgallagher
Copy link
Collaborator

@mprahl What sort of behavior do you expect if someone sets the arches field both in buildopts and for a specific component?

The cases we should consider:

  1. Do we allow them to both be used in the same modulemd, or are they mutually-exclusive?
  2. If the component set of arches is a proper subset of those in the buildopts, do we just build that component for that subset of arches or for all arches listed in buildopts?
  3. If the component set of arches contains some arches not listed in the buildopts, do we build only the intersection of the sets?
  4. If the component set of arches is completely disjoint from the set listed in buildopts, how do we proceed?

@contyk Your input would also be valuable here.

@sgallagher
Copy link
Collaborator

@mmathesius as well

@mprahl
Copy link
Contributor Author

mprahl commented Dec 6, 2019

I've stated my opinions inline.

@mprahl What sort of behavior do you expect if someone sets the arches field both in buildopts and for a specific component?

The cases we should consider:

  1. Do we allow them to both be used in the same modulemd, or are they mutually-exclusive?

Yes

  1. If the component set of arches is a proper subset of those in the buildopts, do we just build that component for that subset of arches or for all arches listed in buildopts?

I think we should use the subset.

  1. If the component set of arches contains some arches not listed in the buildopts, do we build only the intersection of the sets?

I think the modulemd validation should fail.

  1. If the component set of arches is completely disjoint from the set listed in buildopts, how do we proceed?

I think the modulemd validation should fail.

@sgallagher sgallagher self-assigned this Dec 6, 2019
@sgallagher
Copy link
Collaborator

@mprahl I agree on all points. I'll proceed with that approach.

@mmathesius
Copy link
Collaborator

@sgallagher I also agree on all points.

@sgallagher
Copy link
Collaborator

The plan is to add the arches attribute to data.buildopts in spec.v2.yaml and extend the Modulemd.Buildopts object with a set of new methods:

  • modulemd_buildopts_add_arch()
  • modulemd_buildopts_remove_arch()
  • modulemd_buildopts_clear_arches()
  • modulemd_buildopts_get_arches_as_strv()

Then also extend the modulemd_module_stream_*_validate() routine to ensure that the stream is compliant with the policy in this ticket.

Tests of all of these new methods must also accompany the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants