Support new github archive tarball patterns

The Github API endpoint for generating tarballs from tags recently changed, so
teach autospec about the new URL format.

Also add a new packageurl for testing to confirm correct operation of the
regexp that matches the new format.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
This commit is contained in:
Patrick McCarty
2021-06-01 15:34:41 -07:00
parent 6ffe49fe02
commit edef7aa7c6
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -290,7 +290,8 @@ class Content(object):
if "github.com" in self.url:
# define regex accepted for valid packages, important for specific
# patterns to come before general ones
github_patterns = [r"https?://github.com/(.*)/(.*?)/archive/[v|r]?.*/(.*).tar",
github_patterns = [r"https?://github.com/(.*)/(.*?)/archive/refs/tags/[vVrR]?(.*)\.tar",
r"https?://github.com/(.*)/(.*?)/archive/[v|r]?.*/(.*).tar",
r"https?://github.com/(.*)/(.*?)/archive/[-a-zA-Z_]*-(.*).tar",
r"https?://github.com/(.*)/(.*?)/archive/[vVrR]?(.*).tar",
r"https?://github.com/(.*)/.*-downloads/releases/download/.*?/(.*)-(.*).tar",
+1
View File
@@ -1122,6 +1122,7 @@ http://pypi.debian.net/PyWavelets/PyWavelets-0.5.2.tar.gz,PyWavelets,0.5.2
http://pypi.debian.net/pyxdg/pyxdg-0.25.tar.gz,pyxdg,0.25
http://pypi.debian.net/PyYAML/PyYAML-3.12.tar.gz,PyYAML,3.12
http://pypi.debian.net/pyzmq/pyzmq-16.0.2.tar.gz,pyzmq,16.0.2
https://github.com/intel/QAT_Engine/archive/refs/tags/v0.6.5.tar.gz,QAT_Engine,0.6.5
http://wiki.qemu-project.org/download/qemu-2.10.1.tar.bz2,qemu,2.10.1
https://github.com/qpdf/qpdf/archive/release-qpdf-7.0.0.tar.gz,qpdf,7.0.0
http://apache.arvixe.com/qpid/0.32/qpid-python-0.32.tar.gz,qpid-python,0.32