#11254 Allow setting of macros for side tag
Closed: Fixed 9 months ago by kevin. Opened a year ago by vondruch.

Recently, there was discussion about bootstrapping in Fedora devel ML [1] followed by request to Koji [2] and it was about enabling this workflow:

$ fedpkg request-side-tag
$ koji edit-sidetag --rpm-macro _with_bootstrap=1 f38-build-side-62476
2023-01-30 17:33:37,585 [ERROR] koji: GenericError: RPM macros change is not allowed in parent tag.

$ koji taginfo f38-build-side-62476
Tag: f38-build-side-62476 [62476]
Arches: i686 x86_64 aarch64 ppc64le s390x
Groups: appliance-build, build, livecd-build, livemedia-build, srpm-build
Tag options:
  mock.new_chroot : 1          [f38]
  mock.package_manager : 'dnf' [f38]
  sidetag : True
  sidetag_user : 'jskarvad'
  sidetag_user_id : 1289
Targets that build into this tag:
  f38-build-side-62476 (f38-build-side-62476, no active repo)
This tag is a buildroot for one or more targets
Current repo: no active repo
Targets that build from this tag:
  f38-build-side-62476
Inheritance:
  0    .... f38-build [56370]

And to make this work, it seems that:

parent tag must have "sidetag_rpm_macros_allowed: 1"


We need a little bit more time to investigate, if --rpm-macro can be limited to a specific macro.
If we are unable to limit the call to a specific macro like _with_bootstrap Release Engineering will require FESCO to take note of this change.
Because granting the ability to override any macro to all packagers can potentially cause distribution-wise problems.

Any packager can already override any macro with %global or %define in a specfile. What's different here?

Yeah, thats true. Although only after the src.rpm is built I think?

It's less apparent in koji history rather than git, might be confusing... but then I guess bootstrap might be confusing too.

Metadata Update from @phsmoura:
- Issue tagged with: low-trouble, medium-gain

a year ago

Any packager can already override any macro with %global or %define in a specfile. What's different here?

Any packager can include %{_rpmconfigdir}/macros.d/macros.foo file with macros in their package, which will influence all dependencies.

Not mentioning that modularity allows to define macros per module.

I personally don't need any macro in the sidetag, but the bootstrap macro would be helpful. Maybe the boostrap macro could be whitelisted and its change allowed in the sidetag or/and new koji option (e.g. --botstrap) could be added to add just this macro to the sidetag.

Well, in any case, if we wait for changes in Koji, it will take additional time. Months or even years. IMHO, it'd be nice if we moved forward with what we have and if Koji has some improvements, then we can revisit.

@tkopecek or is there chance the proposed changes here or in koji#3669 could land in foreseeable future? Or what is your view?

I can prepare additionalbehaviour as @kevin proposed. So "sidetag_rpm_macros_allowed" could be "1/true" or list of allowed macros. It is pretty easy change. Now it is too late for putting it to next release (dev freeze already gone), but for next one (2 months) or backport to fedora's instance (2 weeks) is doable.

Created koji PR https://pagure.io/koji/pull-request/3674

Oh, nice. Then this would be probably worth of waiting for this, unless that means waiting for years on Fedora side for some reason ;)

The PR has landed. So what are the next steps? I assume Koji upstream release ...

Koji 1.33 is planned for May 19th. So backport this patch (it has no dependencies) is a way if you need it now.

(this is mostly just ping 😎)

https://docs.pagure.org/koji/release_notes/release_notes_1.33

Do we have the Koji deployed already or what are the next steps?

It is not deployed already.

I'm likely to do so thursday as part of the planned koji database/s390x builders outages. :)

Ping, any update here please?

Koji 1.33 is deployed on Fedora Infrastructure, which should enable Release Engineering to set up appropriate macro whitelist in parent tags.

Koji 1.33 is deployed on Fedora Infrastructure, which should enable Release Engineering to set up appropriate macro whitelist in parent tags.

Nice. Should I go ahead and request approval from FeSCo for the bootstrap macro?

Koji 1.33 is deployed on Fedora Infrastructure, which should enable Release Engineering to set up appropriate macro whitelist in parent tags.

Nice. Should I go ahead and request approval from FeSCo for the bootstrap macro?

https://pagure.io/fesco/issue/3046

Koji 1.33 is deployed on Fedora Infrastructure, which should enable Release Engineering to set up appropriate macro whitelist in parent tags.

Nice. Should I go ahead and request approval from FeSCo for the bootstrap macro?

https://pagure.io/fesco/issue/3046

This was approved:

https://pagure.io/fesco/issue/3046#comment-869457

Can we proceed with the _bootstrap macro, please?

I have set the macro allowed for f40 sidetags. Can you test and confirm it works? If it does, we can update the other active branches.

However, I have hit some strange issue, but that is hopefully not a blocker.

It seems to be expected.

I've now added it to the other archive build branches.

Anything more to do here? Or shall we close?

Anything more to do here? Or shall we close?

Can't think of anything. Thx a lot! I am super excited about this 🤩

Anything more to do here? Or shall we close?

Please also allow setting _with_bootstrap macro for sidetags inheriting from eln-build.

Metadata Update from @kevin:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

9 months ago

Login to comment on this ticket.

Metadata