Recently, there has been "Bootstrapping package with circular dependencies in koji" discussion in Fedora devel ML [1]. Given there is boostrap macro 1, it should be possible to run two builds, one with bootstrap macro enabled and other with boostrap macro disabled. So this is how it should work in practice:
boostrap
bootstrap
$ koji edit-tag SIDETAG -x %_with_bootstrap=1 build handle circular dep $ koji edit-tag SIDETAG -r %_with_bootstrap build
Unfortunately, this does not work, because regular user does not have permissions to modify the macro:
koji: ActionNotAllowed: tag permission required (logged in as USER)
Now the question is if there is a chance to exclude side tags from this policy? Or is there a chance Koji would supported enabling/disabling the bootstrap mode via some option?
You've to use edit-sidetag command instead which has --rpm-macro option. It allows you to edit some tag parameters as an owner instead of need of elevated privileges.
edit-sidetag
--rpm-macro
Metadata Update from @tkopecek: - Custom field Size adjusted to None
$ koji edit-sidetag --help usage: koji edit-sidetag [options] (Specify the --help global option for a list of other help options) positional arguments: sidetag name of sidetag options: -h, --help show this help message and exit --debuginfo Generate debuginfo repository --no-debuginfo --rpm-macro key=value Set tag-specific rpm macros --remove-rpm-macro key Remove rpm macros
Which koji version? It seems I don't have the 'edit-sidetag' option: koji-1.31.1-1.fc37.noarch
$ koji edit-sidetag --help ... 2023-01-30 16:10:18,938 [ERROR] koji: Unknown command: edit-sidetag
Install python3-koji-cli-plugins rpm.
I now have the command, but I still don't have permissions:
$ 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]
hmm, it is request for fedora relengs - parent tag must have "sidetag_rpm_macros_allowed: 1" to get this working. Can you file a request for change here? https://pagure.io/releng/issues (feel free to add me there as contact if they'll need some explanation)
hmm, it is request for fedora relengs - parent tag must have "sidetag_rpm_macros_allowed: 1" to get this working.
Thx for elaborating :thumbsup:
Can you file a request for change here? https://pagure.io/releng/issues (feel free to add me there as contact if they'll need some explanation)
https://pagure.io/releng/issue/11254
Metadata Update from @vondruch: - Issue close_status updated to: Invalid - Issue status updated to: Closed (was: Open)
Well, I was hoping we could restrict this more. "all macros" is very open and broad... "just a allowlist of macros" would be ideal... or a "bootstrap macro only" would work.
Make sense - #3673
This issue has been migrated to Fedora Forge: https://forge.fedoraproject.org/koji/koji/issues/3669
Please continue any further discussion there.