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/e5b04971d8e6a77b591284d407e810fb/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/e5b04971d8e6a77b591284d407e810fb/urllib3-1.10.2.tar.gz

working url:

http://localhost/repo/pkgs/mrmeee/Fisk/python-urllib3/urllib3-1.10.2.tar.gz/e5b04971d8e6a77b591284d407e810fb/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