We've identified most of the ways that this can fail and accounted for
them, so let's stop catching all errors and let them fail the execution
and get reported if they come up.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
There are two valid forms of SSH protocol git remotes, but we were only
expecting the [git+]ssh:// form. The urllib.parse.urlparse() routine was
thus failing to determine the scheme and was treating the entire URL as
the path to pass to the Gitlab API. As a result, it was throwing a 404
exception that we were catching and ignoring.
This patch checks for a missing scheme component and if it finds one, it
transfers the remote into the other URL form for parsing purposes.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
When validating the spelling of the package during cloning, decide based
on the program name whether to use the default namespace of CentOS RPMs,
or the namespace dedicated to CentOS SIGs.
Note that there is no reasonable way to deduce the specific SIG, so it
is required to give absolute path, e.g.,`‹SIG›/rpms/‹package›` when
cloning.
Signed-off-by: Matej Focko <mfocko@redhat.com>
Do not assume that the package name is second when validating the
spelling of the package name with a specified namespace.
This holds for CentOS itself as there is only one namespace in front of
the package, e.g., `rpms` or `modules`. However when using the
`centpkg-sig`, the packages reside under the SIGs' namespace adding
an additional layer which yields the `rpms` for second part of the path
instead of the package name.
Signed-off-by: Matej Focko <mfocko@redhat.com>
This is because we cannot confidently check if we are pushing
to a fork or not.
Instead give a warning, and proceed.
Signed-off-by: Troy Dawson <tdawson@redhat.com>
In RHEL 10, the internal branch names have dropped the extra .0
Additionally, there will now also be a rhel-X.0-beta branch.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
Using `centpkg clone -a` results in a warning from git due to the URL
being redirected:
$ centpkg clone -a git
Cloning into 'git'...
warning: redirecting to https://gitlab.com/redhat/centos-stream/rpms/git.git/
...
Update anongiturl to point to the real URL for HTTP cloning. The
addition of the trailing slash does not raise a warning, so it may be
safely left off the URL.