From d70866eb6dda741f9e4ce062fe8a69c5823ef973 Mon Sep 17 00:00:00 2001 From: licihua Date: Sat, 12 Sep 2020 20:29:01 +0800 Subject: [PATCH] =?UTF-8?q?support=20version=5Fcontrol:=20ftp=20fix=20yaml?= =?UTF-8?q?:celt051=E3=80=81cvs=E3=80=81gnu-free-fonts=E3=80=81mailman?= =?UTF-8?q?=E3=80=81mtools=E3=80=81postgresql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- advisors/check_upstream.py | 16 ++++++++++++++++ advisors/oa_upgradable.py | 2 ++ upstream-info/celt051.yaml | 6 +++--- upstream-info/cvs.yaml | 8 ++++---- upstream-info/gnu-free-fonts.yaml | 8 ++++---- upstream-info/mailman.yaml | 8 ++++---- upstream-info/mozjs52.yaml | 6 +++--- upstream-info/mozjs60.yaml | 6 +++--- upstream-info/mtools.yaml | 8 ++++---- upstream-info/postgresql.yaml | 8 ++++---- upstream-info/python-path.yaml | 0 11 files changed, 47 insertions(+), 29 deletions(-) mode change 100644 => 100755 upstream-info/mozjs52.yaml mode change 100644 => 100755 upstream-info/mozjs60.yaml mode change 100644 => 100755 upstream-info/python-path.yaml diff --git a/advisors/check_upstream.py b/advisors/check_upstream.py index cece3fc9..01f6ed07 100755 --- a/advisors/check_upstream.py +++ b/advisors/check_upstream.py @@ -288,6 +288,22 @@ def check_gnu_ftp(info): tags = clean_tags(tags, info) return tags +def check_ftp(info): + headers = { + 'User-Agent' : 'Mozilla/5.0 (X11; Linux x86_64)' + } + url = urljoin('ftp',info["src_repo"] + "/") + eprint("{repo} > List ftp directory".format(repo=url)) + resp = requests.get(url, headers=headers) + resp = resp.text + re_pattern = re.compile("href=\"(.*)\">(.*)") + tags = [] + for l in resp.splitlines(): + m = re_pattern.search(l) + if m: + tags.append(m[1]) + tags = clean_tags(tags, info) + return tags def check_gnome(info): resp = load_last_query_result(info) diff --git a/advisors/oa_upgradable.py b/advisors/oa_upgradable.py index 172be752..ee07b305 100755 --- a/advisors/oa_upgradable.py +++ b/advisors/oa_upgradable.py @@ -66,6 +66,8 @@ def get_ver_tags(gt, repo, cwd_path=None): tags = check_upstream.check_gitee(pkg_info) elif vc_type == "gnu-ftp": tags = check_upstream.check_gnu_ftp(pkg_info) + elif vc_type == "ftp": + tags = check_upstream.check_ftp(pkg_info) else: print("Unsupport version control method {vc}".format(vc=vc_type)) return None diff --git a/upstream-info/celt051.yaml b/upstream-info/celt051.yaml index 493d84f4..4e075021 100644 --- a/upstream-info/celt051.yaml +++ b/upstream-info/celt051.yaml @@ -1,6 +1,6 @@ --- -version_control: NA -src_repo: NA -tag_prefix: NA +version_control: ftp +src_repo: https://ftp.osuosl.org/pub/xiph/releases/celt +tag_pattern: celt-(.*).tar.gz separator: "." download: https://ftp.osuosl.org/pub/xiph/releases/celt/ diff --git a/upstream-info/cvs.yaml b/upstream-info/cvs.yaml index f000784e..bd9c474f 100644 --- a/upstream-info/cvs.yaml +++ b/upstream-info/cvs.yaml @@ -1,5 +1,5 @@ --- -version_control: NA -src_repo: NA -tag_prefix: NA -separator: NA +version_control: ftp +src_repo: https://ftp.gnu.org/non-gnu/cvs/source/stable/ +tag_pattern: (.*)/ +separator: . diff --git a/upstream-info/gnu-free-fonts.yaml b/upstream-info/gnu-free-fonts.yaml index 2843637e..414e2c44 100644 --- a/upstream-info/gnu-free-fonts.yaml +++ b/upstream-info/gnu-free-fonts.yaml @@ -1,5 +1,5 @@ --- -version_control: NA -src_repo: http://svn.savannah.gnu.org/svn/freefont -tag_repo: RELEASE_ -separator: "." +version_control: gnu-ftp +src_repo: freefont +tag_pattern: freefont-src-(.*).tar.gz(.sig)? +separator: diff --git a/upstream-info/mailman.yaml b/upstream-info/mailman.yaml index 7dbfbcf2..22b2be9a 100644 --- a/upstream-info/mailman.yaml +++ b/upstream-info/mailman.yaml @@ -1,6 +1,6 @@ --- -version_control: NA -src_repo: NA -tag_prefix: NA -separator: NA +version_control: ftp +src_repo: https://ftp.gnu.org/pub/gnu/mailman +tag_pattern: mailman-(.*).tgz(.sig)? +separator: "." download: ftp://ftp.gnu.org/pub/gnu/mailman/mailman-2.1.29.tar.gz diff --git a/upstream-info/mozjs52.yaml b/upstream-info/mozjs52.yaml old mode 100644 new mode 100755 index 6c31bdcc..d0b4b9c4 --- a/upstream-info/mozjs52.yaml +++ b/upstream-info/mozjs52.yaml @@ -1,5 +1,5 @@ --- version_control: NA -src_repo: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/52 -tag_prefix: -separator: +src_repo: NA +tag_pattern: NA +separator: NA diff --git a/upstream-info/mozjs60.yaml b/upstream-info/mozjs60.yaml old mode 100644 new mode 100755 index e09be117..d0b4b9c4 --- a/upstream-info/mozjs60.yaml +++ b/upstream-info/mozjs60.yaml @@ -1,5 +1,5 @@ --- version_control: NA -src_repo: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey -tag_prefix: -separator: +src_repo: NA +tag_pattern: NA +separator: NA diff --git a/upstream-info/mtools.yaml b/upstream-info/mtools.yaml index 5b7047ff..556cc3bd 100644 --- a/upstream-info/mtools.yaml +++ b/upstream-info/mtools.yaml @@ -1,5 +1,5 @@ --- -version_control: NA -src_repo: -tag_prefix: -separator: +version_control: gnu-ftp +src_repo: mtools +tag_pattern: mtools-(.*).tar.gz(sig)? +separator: "." diff --git a/upstream-info/postgresql.yaml b/upstream-info/postgresql.yaml index f000784e..c2538e3c 100644 --- a/upstream-info/postgresql.yaml +++ b/upstream-info/postgresql.yaml @@ -1,5 +1,5 @@ --- -version_control: NA -src_repo: NA -tag_prefix: NA -separator: NA +version_control: ftp +src_repo: https://ftp.postgresql.org/pub/source +tag_pattern: v(.*)/ +separator: . diff --git a/upstream-info/python-path.yaml b/upstream-info/python-path.yaml old mode 100644 new mode 100755 -- Gitee