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

Mulitple spec files & _multibuild flavors #8847

Open
DimStar77 opened this issue Dec 6, 2019 · 9 comments
Open

Mulitple spec files & _multibuild flavors #8847

DimStar77 opened this issue Dec 6, 2019 · 9 comments
Assignees
Labels
Backend Things regarding the OBS backend

Comments

@DimStar77
Copy link
Contributor

DimStar77 commented Dec 6, 2019

Recently, openSUSE:Factory changed the 'policy' to allow multiple spec files AND a _multibuild in one package (as often asked for), so we started testing what we can achieve with that

Somehow, this does not do what I as a user would expect. I have a demo setup at

https://build.opensuse.org/package/show/home:dimstar:Factory/a

There is a.spec, a-foo.spec and a _multibuild

_multbuild contains:

<multibuild>
  <flavor>BAR</flavor>
  <flavor>a-foo.spec</flavor>
</multibuild>

in discussions, it was not clear what the expectation actually should be, but the result in OBS clearly did not match any. OBS builds out of this:

the package a, based on a.spec
The package a-foo, based on a-foo.spec

The flavor 'BAR' is added to the scheduler as a:BAR - but excluded

By discussing, we came to the following variants of expectaions what should happen:

  • it builds a, a:BAR and a-foo
  • it does full matrix and build a, a:BAR, a-foo and a-foo:BAR (somehow that feels like the most obvious to me)
  • it builds a:BAR and a-foo
@hennevogel
Copy link
Member

hennevogel commented Dec 6, 2019

a is the package container (the object in the OBS). Inside this container you can have a _multibuild file that will tell the OBS to look for additional build descriptions to a.spec.

So in your case it looks for

  • a.spec
  • BAR.spec
  • a-foo.spec¹

When we display this _multibuild setup we prepend the container name (a:) to show to which package container this belongs to. BAR.spec is excluded because the build description is not found.

¹ In the a-foo case it might be a bit too clever and should actually barf (because there is no a-foo.spec.spec)...

@DimStar77
Copy link
Contributor Author

But if I only have one spec file plus a _multibuild, then it replaces @BUILD_FLAVOR@ inside the .spec file (see installation-images and many others)

@hennevogel
Copy link
Member

News to me 😉 @mlschroe?

@StefanBruens
Copy link

As far as I can see, @BUILD_FLAVOR@ is always substituted.

One can either use multple spec files (where the spec file name is the same as the flavor), or one spec file, where the spec file has to match the package/container name.

Two minimal examples for the cases above:
https://build.opensuse.org/package/show/home:StefanBruens:multibuild_example/multispec
https://build.opensuse.org/package/show/home:StefanBruens:multibuild_example/singlespec

A combination of both seems to be not possible, it behaves like in the "multiple spec files" case:
https://build.opensuse.org/package/show/home:StefanBruens:multibuild_example/mixed

@lnussel
Copy link
Member

lnussel commented Dec 17, 2019

The _multibuild file actually has two tags, "flavor" and "package". Maybe meanting of the two needs to be separated. Ie "package" acting like a local link, while "flavor" should use @BUILD_FLAVOR@ to build the same spec several times.

@adrianschroeter
Copy link
Member

package is just obsolete, flavor is the successor, but package is there for backward compability.

@danidoni danidoni added the Backend Things regarding the OBS backend label Feb 19, 2020
@adrianschroeter
Copy link
Member

not sure what exactly is open here, but

  1. @BUILD_FLAVOR@ is always replaced
  2. with a single build description file inside, this one is always used for all flavor builds.
  3. if you have multiple build descriptions (a.spec and b.spec) they are used depending on the falvor name. If you have also defined a "c" flavor, but no "c.spec" that one gets no build.

All of that should be documented here: https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.multibuild.html

any open question here?

@hramrach
Copy link

package is just obsolete, flavor is the successor, but package is there for backward compability.

'obosolete' yet promoted as the way to implement mutibuild in place of package links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Things regarding the OBS backend
Projects
None yet
Development

No branches or pull requests

9 participants