Result GenericError: Downloaded rpm http://kojihub/kojifiles/work/xz-5.2.5-2.uel20.8a.01.src.rpm is corrupted: rpm's header can't be extracted: /tmp/koji/tasks/4614/2084614/local/work/xz-5.2.5-2.uel20.8a.01.src.rpm (rpm error: error reading package header) Output build.log (tail) hw_info.log (tail) mock_output.log (tail) root.log (tail) state.log (tail)
It is an independent feature. How does you channel policy look alike? E.g you can create channel policy which says:
method build && bool target && match target-for-using-channel-xy :: use xy
Such policy would be triggered independently of srpm/git input as it doesn't care about the source.
Metadata Update from @tkopecek: - Custom field Size adjusted to None
Hello, I have set up such a strategy in "hub.cnf" method build && bool target && match test :: use kojiadmin Submission method: channel is a custom channel name, elzi is a tag name koji call build timedatex-0.5-1.test.src.rpm elzi channel=test But it still reports the same error as before. Why didn't Koji import the source code package instead of searching for it from the Kojifiles path
Or I want to implement using a local source code package to specify a channel for submission, but now I can only submit using the git+http link method after specifying the channel
1) Ouch, I've missed a keyword in the example - there is missing what should be matched.
method build && bool target && match target target-for-using-channel-xy :: use xy
2) "kojiadmin" in your policy looks suspicious as an user name. It should be channel name, so probably "test" in your case
3) you can't build via API as easily (some other API call must be made to upload SRPM first). OTOH, I'm not sure why are you doing that. Simple "koji build " will upload the srpm and use channel from that policy.
Hello, after making the following modifications in hub.cnf, the policy has taken effect and met my expectations. However, after multiple rounds of debugging, I am not very familiar with the syntax. Do you have detailed documentation about the policy? Koji's official documentation is only a rough introduction. hub.conf channel = has req_channel :: req is_child_task :: parent match target mytag && all :: use test
https://docs.pagure.org/koji/defining_hub_policies/ is the basic documentation. It would be worth of expanding it but that is what we have. In your policy last line has rendundant part '&& all' - it will be always true, so ony match target mytag is enough. Anyway, I would expand it to bool target && match target mytag :: use test as not every task (e.g. createrepo) has the target attribute, so it could sometimes fail on missing field.
match target mytag
bool target && match target mytag :: use test
target
Okay, thank you very much for your answers and suggestions. I have a request. The most basic tool I use in my work is Koji, so I will join one of your groups or organizations. I want to learn more quickly and deeply, and I am willing to contribute to it to the best of my ability.
This issue has been migrated to Fedora Forge: https://forge.fedoraproject.org/koji/koji/issues/4143
Please continue any further discussion there.