#133 Describe usage of macros for side-tag
Merged by ankursinha. Opened by vondruch.
fedora-docs/ vondruch/package-maintainer-docs side-tag-macros  into  main

Download 133.patch

One thing to consider it the order of sections. Not sure if the current order, is the best one. Maybe the "Bodhi" should be the last one, to let the people read through and made them aware of all the possibilities. OTOH, all the other details about tagging packages, dropping side tag or macros might not be that interesting after all 🤷 In any case, I have put the "macros" section as the last one.

Please note that the macros were approved in:

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

But they have not been enabled yet:

https://pagure.io/releng/issue/11254

Therefore I mark this as a WIP for the time being.

  • Koji allows to set macros per side tag, which migh be useful for certaing
  • scenarios. As and example, the following commands might be useful for
  • https://docs.fedoraproject.org/en-US/packaging-guidelines/#bootstrapping[bootstrapping]:

Maybe:
"Koji allows macros to be set in a side tag, changing the configuration for builds in this side tag. This is useful in certain scenarios. For example when performing https://docs.fedoraproject.org/en-US/packaging-guidelines/#bootstrapping[bootstrapping], the following commands may be used:"

  • $ koji edit-sidetag --rpm-macro _with_bootstrap=1 f39-build-side-7863

I'd insert $ cd ~/fedora/package-a && fedpkg build --target …, $ cd ~/fedora/package-b && fedpkg build --target …

  • $ koji edit-sidetag --remove-rpm-macro _with_bootstrap f39-build-side-7863

And here again $ cd ~/fedora/package-a && fedpkg build --target …,
and explain that this way we perform a bootstrap with a circular dependency between package-a and package-b.

Typo: certaing

Typo: As and example

Use xref instead of hardcoded URL for linking to other Fedora docs.

Use xref.

Also, I think this would read better if the link text was the actual name of the policy.

Please use semantic linebreaks.

Thank you for the contribution. I have added proofreading and source style comments. I also think zbyszeks suggestion of making the bootstrap example a bit more comprehensive makes sense.

Use xref instead of hardcoded URL for linking to other Fedora docs.

Interesting. I was not aware about such functionality. I hope I get it right ....

Use xref instead of hardcoded URL for linking to other Fedora docs.

Interesting. I was not aware about such functionality. I hope I get it right ....

Actually, should the xref include the human readable string such as [Policy for Buildroot Macros] or will it be somehow deferred from the xref:fesco:Policy_for_buildroot_macros.adoc

rebased onto 9a3e76512f15da85ee9c33cde150b56329449b77

Thank you for the contribution. I have added proofreading and source style comments.

Should be addressed now.

I also think zbyszeks suggestion of making the bootstrap example a bit more comprehensive makes sense.

Let me think about it. I have not read the suggestion in detail yet, but I have the feeling, that too much detail might be distracting. This should not be about bootstrapping but about the macros in general.

  • $ koji edit-sidetag --rpm-macro _with_bootstrap=1 f39-build-side-7863

I'd insert $ cd ~/fedora/package-a && fedpkg build --target …, $ cd ~/fedora/package-b && fedpkg build --target …

  • $ koji edit-sidetag --remove-rpm-macro _with_bootstrap f39-build-side-7863

And here again $ cd ~/fedora/package-a && fedpkg build --target …,
and explain that this way we perform a bootstrap with a circular dependency between package-a and package-b.

Not sure how to approach this. The intention was to describe the process of setting macro for side tag in a generic way. So bootstrapping is kind of out of scope.

However, maybe if the description should really be generic, then all the specific identifiers such as f39-build-side-7863 should be replaced by e.g. <side-tag> and then it would make a sense to provide some specific example.

OTOH, the page is a bit inconsistent in this, sometimes using specific identifiers, while using some generic placeholders instead 🤷🏻‍♂️

1 new commit added

  • Remove the bootstrapping references to make the document more generic.

For the start, I have pushed another commit removing the bootstrapping references. If you insist, it can be added back as an example.

2 new commits added

  • Remove the bootstrapping references to make the document more generic.
  • Describe usage of macros for side-tag

2 new commits added

  • Info about `koji taginfo` might be also useful.
  • Add TIP about `koji edit-sidetag` command

I have added two additional commits:

  1. Tip about edit-sidetag command, which might not be always available
  2. taginfo might be similarly useful to list-history

Interesting, I have just noticed, that the taginfo actually lists sidetag_rpm_macros_allowed : '_with_bootstrap' [f40-build]:

$ koji taginfo f40-build-side-72114
Tag: f40-build-side-72114 [72114]
Arches: i686 x86_64 aarch64 ppc64le s390x
Groups: appliance-build, build, livecd-build, livemedia-build, srpm-build
Tag options:
  mock.new_chroot : 1          [f40]
  mock.package_manager : 'dnf' [f40]
  sidetag : True
  sidetag_rpm_macros_allowed : '_with_bootstrap' [f40-build]
  sidetag_user : 'vondruch'
  sidetag_user_id : 1610
Targets that build into this tag:
  f40-build-side-72114 (f40-build-side-72114, repo#5358568: 2023-08-22 11:38:50.815873+00:00)
This tag is a buildroot for one or more targets
Current repo: repo#5358568: 2023-08-22 11:38:50.815873+00:00
Targets that build from this tag:
  f40-build-side-72114
Inheritance:
  0    .... f40-build [71278]

Not sure if it would make sense to highlight this information 🤔 But it would probably overcomplicated the section ...

1 new commit added

  • Document that there is a gap before the macros take an effect.

One additional tip, because the macros are not taking effect immediately:

https://pagure.io/koji/issue/3881

Removing the [Draft] tag, since it already works in Rawhide

TIP: Please make sure the python3-koji-cli-plugins is installed on your sytem

Remove the "the". (Or alternatively, add "package", but I think it's better to keep this short.)

repository data are refreshed.

"repository data is refreshed", I think.

LGTM.

5 new commits added

  • Document that there is a gap before the macros take an effect.
  • Info about `koji taginfo` might be also useful.
  • Add TIP about `koji edit-sidetag` command
  • Remove the bootstrapping references to make the document more generic.
  • Describe usage of macros for side-tag

@zbyszek thx for review. Updated

No other feedback has come, I take the liberty to merge this mysefl.

No other feedback has come, I take the liberty to merge this mysefl.

Or not, maybe I don't have the rights? So anyone else?

Merging, also added you to the committers group. Thanks very much for this.

rebased onto 4a410ccbe4711b0fb4ae0ef357eb48167d78e290

Pull-Request has been merged by ankursinha

Hm, this link is apparently broken. How to fix it 🤔

Hm, this link is apparently broken. How to fix it 🤔

Ah, I think it needs to be double colon after fesco:

xref:fesco::Policy_for_buildroot_macros.adoc[Policy for Buildroot Macros]

Saw it here: https://pagure.io/fedora-docs/package-maintainer-docs/blob/main/f/modules/ROOT/pages/New_Package_Process_for_Existing_Contributors.adoc#_6

Hm, this link is apparently broken. How to fix it 🤔

Ah, I think it needs to be double colon after fesco:

xref:fesco::Policy_for_buildroot_macros.adoc[Policy for Buildroot Macros]

Saw it here: https://pagure.io/fedora-docs/package-maintainer-docs/blob/main/f/modules/ROOT/pages/New_Package_Process_for_Existing_Contributors.adoc#_6

Thx. Let me open new PR with fix real quick

135 hopefully fixes the link

Metadata