Hi guys
When trying to use fedpkg-copr I get:
[copr-service@copr02 python-urllib3]$ fedpkg-copr -v --dist epel7 srpm Creating repo object from /tmp/3/python-urllib3 Could not determine the remote name: 'git config --get branch.epel7.remote' returned with exit code 1 Falling back to default remote name 'origin' Downloading urllib3-1.10.2.tar.gz Full url: http://localhost/repo/pkgs/mrmeee/Fisk/python-urllib3/urllib3-1.10.2.tar.gz/... ######################################################################## 100.0% Could not execute srpm: Server returned status code 404 Traceback (most recent call last): File "/bin/fedpkg-copr", line 138, in <module> main() File "/bin/fedpkg-copr", line 128, in main sys.exit(client.args.command()) File "/usr/lib/python2.7/site-packages/pyrpkg/cli.py", line 1246, in srpm self.cmd.sources() File "/usr/lib/python2.7/site-packages/pyrpkg/__init__.py", line 1783, in sources hashtype=entry.hashtype, branch=self.branch_merge) File "/usr/lib/python2.7/site-packages/pyrpkg/lookaside.py", line 179, in download raise DownloadError('Server returned status code %d' % status) pyrpkg.errors.DownloadError: Server returned status code 404
This is because the url generated is wrong... in my working url the "md5" is not there...
Generated url from fedpkg-copr:
http://localhost/repo/pkgs/mrmeee/Fisk/python-urllib3/urllib3-1.10.2.tar.gz/...
working url:
http://localhost/repo/pkgs/mrmeee/Fisk/python-urllib3/urllib3-1.10.2.tar.gz/...
Does anyone know howto either change the generated url or the url generated by dist-git???
Regards
Martin
The 'md5' part in the lookaside urls was introduced in fedpkg-1.21. In COPR (as opposed to Fedora dist-git), however, paths are still without this hash spec. For compatibility with the new fedpkg (fedpkg-copr uses fedpkg) the following httpd alias was introduced in /etc/httpd/dist-git/lookaside-copr.conf.
AliasMatch "/repo(/.*)/md5(/.*)" "/var/lib/dist-git/cache/lookaside$1$2"
This setup is only in Fedora Ansible scripts (copr-dist-git package does not contain it currently).
clime
On Thu, Jan 5, 2017 at 10:28 AM, Martin Juhl mj@casalogic.dk wrote:
Hi guys
When trying to use fedpkg-copr I get:
[copr-service@copr02 python-urllib3]$ fedpkg-copr -v --dist epel7 srpm Creating repo object from /tmp/3/python-urllib3 Could not determine the remote name: 'git config --get branch.epel7.remote' returned with exit code 1 Falling back to default remote name 'origin' Downloading urllib3-1.10.2.tar.gz Full url: http://localhost/repo/pkgs/mrmeee/Fisk/python-urllib3/ urllib3-1.10.2.tar.gz/md5/e5b04971d8e6a77b591284d407e810 fb/urllib3-1.10.2.tar.gz ######################################################################## 100.0% Could not execute srpm: Server returned status code 404 Traceback (most recent call last): File "/bin/fedpkg-copr", line 138, in <module> main() File "/bin/fedpkg-copr", line 128, in main sys.exit(client.args.command()) File "/usr/lib/python2.7/site-packages/pyrpkg/cli.py", line 1246, in srpm self.cmd.sources() File "/usr/lib/python2.7/site-packages/pyrpkg/__init__.py", line 1783, in sources hashtype=entry.hashtype, branch=self.branch_merge) File "/usr/lib/python2.7/site-packages/pyrpkg/lookaside.py", line 179, in download raise DownloadError('Server returned status code %d' % status) pyrpkg.errors.DownloadError: Server returned status code 404
This is because the url generated is wrong... in my working url the "md5" is not there...
Generated url from fedpkg-copr:
http://localhost/repo/pkgs/mrmeee/Fisk/python-urllib3/ urllib3-1.10.2.tar.gz/md5/e5b04971d8e6a77b591284d407e810 fb/urllib3-1.10.2.tar.gz
working url:
http://localhost/repo/pkgs/mrmeee/Fisk/python-urllib3/ urllib3-1.10.2.tar.gz/e5b04971d8e6a77b591284d407e810 fb/urllib3-1.10.2.tar.gz
Does anyone know howto either change the generated url or the url generated by dist-git???
Regards
Martin _______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
On Thursday, January 5, 2017 11:41:56 AM CET Michal Novotny wrote:
The 'md5' part in the lookaside urls was introduced in fedpkg-1.21. In COPR (as opposed to Fedora dist-git), however, paths are still without this hash spec. For compatibility with the new fedpkg (fedpkg-copr uses fedpkg) the following httpd alias was introduced in /etc/httpd/dist-git/lookaside-copr.conf.
AliasMatch "/repo(/.*)/md5(/.*)" "/var/lib/dist-git/cache/lookaside$1$2"
This setup is only in Fedora Ansible scripts (copr-dist-git package does not contain it currently).
FWIW I hot-fixed this by patching fedpkg on builders (even more ugly, right?):
--- /usr/lib/python2.7/site-packages/fedpkg/lookaside.py 2016-04-12 03:57:01.000000000 +0000 +++ /usr/lib/python2.7/site-packages/fedpkg/lookaside.py~ 2016-11-11 14:20:12.688763762 +0000 @@ -25,4 +25,4 @@ ca_cert=ca_cert) _ self.download_path = ( - '%(name)s/%(filename)s/%(hashtype)s/%(hash)s/%(filename)s') + '%(name)s/%(filename)s/%(hash)s/%(filename)s')
As discussed in https://pagure.io/copr/copr/pull-request/11 not depending on 'fedpkg' would simplify things a lot. The worst thing about this is that at least 3 people now worked on the same incompatibility, and this is not the first time.
Pavel
clime
On Thu, Jan 5, 2017 at 10:28 AM, Martin Juhl mj@casalogic.dk wrote:
Hi guys
When trying to use fedpkg-copr I get:
[copr-service@copr02 python-urllib3]$ fedpkg-copr -v --dist epel7 srpm Creating repo object from /tmp/3/python-urllib3 Could not determine the remote name: 'git config --get branch.epel7.remote' returned with exit code 1 Falling back to default remote name 'origin' Downloading urllib3-1.10.2.tar.gz Full url: http://localhost/repo/pkgs/mrmeee/Fisk/python-urllib3/ urllib3-1.10.2.tar.gz/md5/e5b04971d8e6a77b591284d407e810 fb/urllib3-1.10.2.tar.gz ######################################################################## 100.0% Could not execute srpm: Server returned status code 404 Traceback (most recent call last): File "/bin/fedpkg-copr", line 138, in <module> main() File "/bin/fedpkg-copr", line 128, in main sys.exit(client.args.command()) File "/usr/lib/python2.7/site-packages/pyrpkg/cli.py", line 1246, in srpm self.cmd.sources() File "/usr/lib/python2.7/site-packages/pyrpkg/__init__.py", line 1783, in sources hashtype=entry.hashtype, branch=self.branch_merge) File "/usr/lib/python2.7/site-packages/pyrpkg/lookaside.py", line 179, in download raise DownloadError('Server returned status code %d' % status) pyrpkg.errors.DownloadError: Server returned status code 404
This is because the url generated is wrong... in my working url the "md5" is not there...
Generated url from fedpkg-copr:
http://localhost/repo/pkgs/mrmeee/Fisk/python-urllib3/ urllib3-1.10.2.tar.gz/md5/e5b04971d8e6a77b591284d407e810 fb/urllib3-1.10.2.tar.gz
working url:
http://localhost/repo/pkgs/mrmeee/Fisk/python-urllib3/ urllib3-1.10.2.tar.gz/e5b04971d8e6a77b591284d407e810 fb/urllib3-1.10.2.tar.gz
Does anyone know howto either change the generated url or the url generated by dist-git???
Regards
Martin _______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
copr-devel@lists.fedorahosted.org