From dda40dd5a53b7755c4484a444115f24bc03e27b3 Mon Sep 17 00:00:00 2001 From: James Antill Date: Mar 24 2021 03:14:23 +0000 Subject: [PATCH 1/2] Override build URL for Koji. Import fc261daf and ce8e9d4b commits (mostly) from Fedpkg. --- diff --git a/src/centpkg/__init__.py b/src/centpkg/__init__.py index 4055303..3a4529f 100644 --- a/src/centpkg/__init__.py +++ b/src/centpkg/__init__.py @@ -141,6 +141,14 @@ class Commands(Commands): "--define '%s 1'" % self._disttag] self.log.debug("RPMDefines: %s" % self._rpmdefines) + def construct_build_url(self, *args, **kwargs): + """Override build URL for CentOS/Fedora Koji build + + In CentOS/Fedora Koji, anonymous URL should have prefix "git+https://" + """ + url = super(Commands, self).construct_build_url(*args, **kwargs) + return 'git+{0}'.format(url) + def load_target(self): """ This sets the target attribute (used for mock and koji) """ From 4027252911f2850dc87697662da88fd2da73609b Mon Sep 17 00:00:00 2001 From: James Antill Date: Mar 24 2021 03:14:23 +0000 Subject: [PATCH 2/2] Remove explicit git+ from anon git url. --- diff --git a/src/centpkg.conf b/src/centpkg.conf index 4f35d7e..79a16ba 100644 --- a/src/centpkg.conf +++ b/src/centpkg.conf @@ -5,7 +5,7 @@ lookaside_cgi = https://sources.stream.rdu2.redhat.com/lookaside/upload.cgi distgit_namespaced = True distgit_namespaces = rpms gitbaseurl = git+ssh://git@gitlab.com/redhat/centos-stream/%(repo)s.git -anongiturl = git+https://gitlab.com/redhat/centos-stream/%(repo)s +anongiturl = https://gitlab.com/redhat/centos-stream/%(repo)s branchre = .+\d$|.+\d-.+|master$ kojiprofile = stream build_client = stream