#462 Add support for `remote add fork`
Opened 3 years ago by vondruch. Modified 6 months ago

This is followup to https://pagure.io/fedpkg/issue/439#comment-740924. It would be useful to support not only Fedora/CentOS/RHEL repositories, but also their forks. There is also https://pagure.io/rpkg/issue/318 requesting the similar. Not sure about the CLI interface though, if the fedpkg remote add fork would be the right command.


+1 for this. What exactly are the blocking features for this?

Not sure you are aware of fedpkg fork command which is already a couple of years with us.
It is not just creating a fork via fedoraproject.org's API but also adds the fork's URL as a remote after. Executing fedpkg fork when the fork actually exists just creates missing remotes.
It is possible to have this in fedpkg remote add-fork too, but it duplicates the current state. Maybe, the implementation under remote would allow the same interface for adding additional arguments like --repo-name, --remote-name.

IIRC centpkg fork should exist too. In RHEL, I am considering this functionality - It would be more useful with the announced migration of repositories.

Honestly, I am not user of fedpkg fork. It does too much to my liking. I don't like fedpkg touching repositories and requiring tokens and what not.

But despite that, the fork does not allow to specify remote it works with AFAICT. That seems to be the main blocker.

I could potentially modify fedpkg fork to first verify that the fork already exists and just add the remote (not to fail on a missing token immediately).
2nd option is to add the separate fedpkg remote add-fork as mentioned above.

But despite that, the fork does not allow to specify remote it works with

How would you like to specify it?

@onosek @vondruch

But despite that, the fork does not allow to specify remote it works with

How would you like to specify it?

I'm not sure it needs to be specified, but it does seem as though fedpkg fork needs to get better at divining which pagure instance it should be targeting, based on the existing origin remote.

Just a few minutes ago I ran fedpkg fork in my checked-out clone of this repo, and a fork was dutifully created and a remote added... for https://src.fedoraproject.org/fork/ferdnyc/rpms/fedpkg. I then had to manually correct it to ssh://git@pagure.io/forks/ferdnyc/fedpkg.git using git remote set-url.

if origin is https://pagure.io/fedpkg.git, seems to me like that shouldn't happen.

Log in to comment on this ticket.

Metadata