Learn more about these different git repos.
Other Git URLs
Hello. I'd like to add a DistGit package, but from a fork branch / PR. Currently, this is only possible via SCM (where I can set custom git URL), but has the pre-processing enabled, so it is not ideal.
Thanks
but from a fork branch / PR
I did not realize this before. Thanks for the report!
Just to make sure, automatically triggered builds from PRs (via fedora-messaging) should be working fine.
The problem is if you want to configure a new package that is solely build from the fork repository. So I tend to think that we should have an additional "clone_url" optional config option.
Metadata Update from @praiskup: - Issue tagged with: RFE
The problem is if you want to configure a new package that is solely build from the fork repository.
Indeed.
For SCM, I do:
https://src.fedoraproject.org/forks/churchyard/rpms/python-rpm-macros.git
3.10
This just got more serious for us, because the workaround (using rpkg) does not work for some of our packages, see https://pagure.io/copr/copr/issue/1703
Metadata Update from @frostyx: - Issue priority set to: High
I investigated the issue and IMHO we should solve this via namespaces. Please tell me what do you think.
First, this is solely a frontend issue. I spent some time searching an issue in the copr-rpmbuild code but then I remembered that we actually define DistGit configurations in our database. Just saying to save some time for whoever else is going to look at this issue.
copr-rpmbuild
See these two particular configurations
'clone_package_uri': 'rpms/{pkgname}.git', 'clone_url': 'https://src.fedoraproject.org'
and
'clone_package_uri': 'git/{namespace}/{pkgname}.git', 'clone_url': 'https://copr-dist-git-dev.fedorainfracloud.org'
Apparently, we ignore the submitted namespace value for the Fedora DistGit. AFAIK the rpms/ and forks/churchyard/rpms/ is considered a namespace. Therefore my proposed solution is to
namespace
rpms/
forks/churchyard/rpms/
{namespace}
I would probably prefer to have something like --clone-url, but I have no strong opinion about this. That way you can build dist-git packages from anywhere, even e.g. from github fork.... while still using the default fedora lookaside cache for downloading sources.
First, this is solely a frontend issue.
Well, it depends. The problem imo is "how to map clone url" to "lookaside cache" url. This is done by the --distgit <ID> option. But it also automatically assigns the "clone url"....
--distgit <ID>
Perhaps we can re-use the namespace (somehow) but note that we should keep reacting on events from Pagure ... (someone opens a PR against already forked repo, pagure sends a fedora-messaging message - and we should start a build for packages that are setup to run builds for the fork repo).
The proposed solution with namespace would fix my issue. But I agree that supporting arbitrary git URLs makes it more useful.
FTR, it is necessary to successfully pair the forked clone_url with the events from fedora-messaging, so new builds are automatically triggered.
Modified in PR#1834
Metadata Update from @praiskup: - Issue assigned to frostyx
The artificial clone_url support (I still it would be beneficial) will be added in #1685.
Commit c8c8c19 fixes this issue
Login to comment on this ticket.