From 565c3dce2958aa6fa471eb1d53b4625463c341f4 Mon Sep 17 00:00:00 2001 From: Shinwell Hu Date: Wed, 12 Aug 2020 02:20:02 +0000 Subject: [PATCH 01/16] fix libdvdnav.yaml error --- upstream-info/libdvdnav.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/upstream-info/libdvdnav.yaml b/upstream-info/libdvdnav.yaml index c5c08b74..77f1dc1d 100644 --- a/upstream-info/libdvdnav.yaml +++ b/upstream-info/libdvdnav.yaml @@ -1,4 +1,4 @@ -version_control: github -src_repo: mirror/libdvdnav -tag_pattern: ^v +version_control: git +src_repo: https://code.videolan.org/videolan/libdvdnav.git +tag_prefix: ^v separator: . -- Gitee From 0272ea4d6169050490cdbe64aee1313665dc15c4 Mon Sep 17 00:00:00 2001 From: Shinwell Hu Date: Wed, 12 Aug 2020 06:38:14 +0000 Subject: [PATCH 02/16] fix lutok, rapidjson, syscontainer-tools and tar yaml error --- upstream-info/lutok.yaml | 4 ++++ upstream-info/rapidjson.yaml | 4 ++++ upstream-info/syscontainer-tools.yaml | 5 +++++ upstream-info/tar.yaml | 4 ++++ 4 files changed, 17 insertions(+) create mode 100644 upstream-info/lutok.yaml create mode 100644 upstream-info/rapidjson.yaml create mode 100644 upstream-info/syscontainer-tools.yaml create mode 100644 upstream-info/tar.yaml diff --git a/upstream-info/lutok.yaml b/upstream-info/lutok.yaml new file mode 100644 index 00000000..b6a49ed6 --- /dev/null +++ b/upstream-info/lutok.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: jmmv/lutok +tag_prefix: lutok- +separator: "." diff --git a/upstream-info/rapidjson.yaml b/upstream-info/rapidjson.yaml new file mode 100644 index 00000000..9d6ec027 --- /dev/null +++ b/upstream-info/rapidjson.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: Tencent/rapidjson +tag_prefix: "^v" +separator: "." diff --git a/upstream-info/syscontainer-tools.yaml b/upstream-info/syscontainer-tools.yaml new file mode 100644 index 00000000..0b303f01 --- /dev/null +++ b/upstream-info/syscontainer-tools.yaml @@ -0,0 +1,5 @@ +git_url: https:/gitee.com/openeuler/syscontainer-tools +version_control: NA +src_repo: openeuler/syscontainer-tools +tag_prefix: "^v" +separator: "." diff --git a/upstream-info/tar.yaml b/upstream-info/tar.yaml new file mode 100644 index 00000000..a8cc6a12 --- /dev/null +++ b/upstream-info/tar.yaml @@ -0,0 +1,4 @@ +version_control: git +src_repo: https://git.savannah.gnu.org/git/tar.git +tag_prefix: "release_" +separator: "_" -- Gitee From f058cafdad70b121472dd532b9d4cb36fd939bd4 Mon Sep 17 00:00:00 2001 From: Shinwell Hu Date: Wed, 12 Aug 2020 07:17:03 +0000 Subject: [PATCH 03/16] fix libdwarf, mallard-rng python-which spock texamator trace-cmd yaml error --- upstream-info/libdwarf.yaml | 2 +- upstream-info/mallard-rng.yaml | 4 ++++ upstream-info/python-which.yaml | 5 +++++ upstream-info/spock.yaml | 4 ++-- upstream-info/texamator.yaml | 5 +++++ upstream-info/trace-cmd.yaml | 4 ++++ 6 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 upstream-info/mallard-rng.yaml create mode 100644 upstream-info/python-which.yaml create mode 100644 upstream-info/texamator.yaml create mode 100644 upstream-info/trace-cmd.yaml diff --git a/upstream-info/libdwarf.yaml b/upstream-info/libdwarf.yaml index 0e3ecb22..92a50b75 100644 --- a/upstream-info/libdwarf.yaml +++ b/upstream-info/libdwarf.yaml @@ -1,5 +1,5 @@ git_url: https://github.com/Distrotech/libdwarf.git version_control: github src_repo: Distrotech/libdwarf -tag_prefix: "v" +tag_prefix: "^" separator: "" diff --git a/upstream-info/mallard-rng.yaml b/upstream-info/mallard-rng.yaml new file mode 100644 index 00000000..510f5262 --- /dev/null +++ b/upstream-info/mallard-rng.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: projectmallard/projectmallard.org +tag_prefix: mallard-rng- +seperator: . diff --git a/upstream-info/python-which.yaml b/upstream-info/python-which.yaml new file mode 100644 index 00000000..28a22de7 --- /dev/null +++ b/upstream-info/python-which.yaml @@ -0,0 +1,5 @@ +git_url: https://github.com/trentm/which.git +version_control: NA +src_repo: trentm/which +tag_prefix: ^ +seperator: . diff --git a/upstream-info/spock.yaml b/upstream-info/spock.yaml index 265563cc..cfa4fd95 100644 --- a/upstream-info/spock.yaml +++ b/upstream-info/spock.yaml @@ -1,4 +1,4 @@ version_control: github src_repo: spockframework/spock -tag_prefix: ^v -separator: . +tag_prefix: "spock-" +separator: "." diff --git a/upstream-info/texamator.yaml b/upstream-info/texamator.yaml new file mode 100644 index 00000000..683308b4 --- /dev/null +++ b/upstream-info/texamator.yaml @@ -0,0 +1,5 @@ +git_url: https://github.com/alexisflesch/texamator.git +version_control: NA +src_repo: alexisflesch/texamator +tag_prefix: "^v" +separator: "." diff --git a/upstream-info/trace-cmd.yaml b/upstream-info/trace-cmd.yaml new file mode 100644 index 00000000..bb7e33b0 --- /dev/null +++ b/upstream-info/trace-cmd.yaml @@ -0,0 +1,4 @@ +version_control: git +src_repo: https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git +tag_prefix: trace-cmd-v +seperator: . -- Gitee From 88d46904083c94317af684c115987546c10ce47e Mon Sep 17 00:00:00 2001 From: Shinwell Hu Date: Wed, 12 Aug 2020 09:42:56 +0000 Subject: [PATCH 04/16] forget to clean_tags for metacpan --- advisors/check_upstream.py | 1 + 1 file changed, 1 insertion(+) diff --git a/advisors/check_upstream.py b/advisors/check_upstream.py index 701f9ba5..476b6e46 100755 --- a/advisors/check_upstream.py +++ b/advisors/check_upstream.py @@ -140,6 +140,7 @@ def check_metacpan(info): last_query["time_stamp"] = datetime.now() last_query["raw_data"] = resp info["last_query"] = last_query + tags = clean_tags(tags, info) return tags def check_pypi(info): -- Gitee From 5783fafbe378889fb051dd23121c8eef766bec51 Mon Sep 17 00:00:00 2001 From: Shinwell Hu Date: Thu, 13 Aug 2020 03:28:57 +0000 Subject: [PATCH 05/16] handle gnome.org archive --- advisors/check_upstream.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/advisors/check_upstream.py b/advisors/check_upstream.py index 476b6e46..ead2ec2a 100755 --- a/advisors/check_upstream.py +++ b/advisors/check_upstream.py @@ -236,7 +236,11 @@ def check_github(info): def check_gnome(info): resp = load_last_query_result(info) - repo_url = "https://gitlab.gnome.org/GNOME/"+info["src_repo"]+".git" + src_repos = info["src_repo"].split("/") + if len(src_repos) == 1: + repo_url = "https://gitlab.gnome.org/GNOME/" + info["src_repo"] + ".git" + else: + repo_url = "https://gitlab.gnome.org/" + info["src_repo"] + ".git" if resp == "": resp = __check_git_helper(repo_url) -- Gitee From 6593c38be96885120d863d7057759d3828da3cc8 Mon Sep 17 00:00:00 2001 From: Shinwell Hu Date: Thu, 13 Aug 2020 08:15:10 +0000 Subject: [PATCH 06/16] add tag_reorder for acpica. and fix yaml errors --- advisors/check_upstream.py | 3 +++ upstream-info/acpica-tools.yaml | 3 ++- upstream-info/libgphoto2.yaml | 2 +- upstream-info/libiec61883.yaml | 2 +- upstream-info/libieee1284.yaml | 2 +- upstream-info/libisofs.yaml | 4 ++-- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/advisors/check_upstream.py b/advisors/check_upstream.py index ead2ec2a..df44ac2d 100755 --- a/advisors/check_upstream.py +++ b/advisors/check_upstream.py @@ -41,6 +41,9 @@ def clean_tags(tags, info): if info.get("tag_pattern", "") != "" and info.get("tag_pattern", "") is not None: pattern_regex = re.compile(info["tag_pattern"]) result_list = [pattern_regex.sub("\\1", x) for x in tags] + elif info.get("tag_reorder", "") != "" and info.get("tag_reorder", "") is not None: + pattern_regex = re.compile(info["tag_reorder"]) + result_list = [pattern_regex.sub(info["tag_neworder"], x) for x in tags] elif info.get("tag_prefix", "") != "" and info.get("tag_prefix", "") is not None: prefix_regex = re.compile(info["tag_prefix"]) result_list = [prefix_regex.sub("", x) for x in tags] diff --git a/upstream-info/acpica-tools.yaml b/upstream-info/acpica-tools.yaml index 75924c01..99b6912b 100644 --- a/upstream-info/acpica-tools.yaml +++ b/upstream-info/acpica-tools.yaml @@ -1,4 +1,5 @@ version_control: github src_repo: acpica/acpica -tag_prefix: "^R" +tag_reorder: "^R(\\d\\d)_?(\\d\\d)_?(\\d\\d)" +tag_neworder: "20\\3\\1\\2" separator: "_" diff --git a/upstream-info/libgphoto2.yaml b/upstream-info/libgphoto2.yaml index a28c6120..35001033 100644 --- a/upstream-info/libgphoto2.yaml +++ b/upstream-info/libgphoto2.yaml @@ -1,4 +1,4 @@ version_control: github src_repo: gphoto/libgphoto2 -tag_pattern: libgphoto2- +tag_prefix: libgphoto2- separator: _ diff --git a/upstream-info/libiec61883.yaml b/upstream-info/libiec61883.yaml index eb7bd691..f10a700c 100644 --- a/upstream-info/libiec61883.yaml +++ b/upstream-info/libiec61883.yaml @@ -1,4 +1,4 @@ version_control: github src_repo: Distrotech/libiec61883 -tag_pattern: ^v +tag_prefix: ^v separator: . diff --git a/upstream-info/libieee1284.yaml b/upstream-info/libieee1284.yaml index 827a694f..325c5caa 100644 --- a/upstream-info/libieee1284.yaml +++ b/upstream-info/libieee1284.yaml @@ -1,4 +1,4 @@ version_control: github src_repo: twaugh/libieee1284 -tag_pattern: ^v +tag_prefix: ^v separator: _ diff --git a/upstream-info/libisofs.yaml b/upstream-info/libisofs.yaml index b8f38837..2c275299 100644 --- a/upstream-info/libisofs.yaml +++ b/upstream-info/libisofs.yaml @@ -1,4 +1,4 @@ version_control: git -src_repo: https://dev.lovelyhq.com/libburnia -tag_pattern: release- +src_repo: https://dev.lovelyhq.com/libburnia/libisofs.git +tag_prefix: release- separator: . -- Gitee From d8b5c01f0c72ab2efe5d167268661aaad0d4ac02 Mon Sep 17 00:00:00 2001 From: Shinwell Hu Date: Thu, 13 Aug 2020 08:20:46 +0000 Subject: [PATCH 07/16] fix libsigcpp20.yaml --- upstream-info/{libsigc++20.yaml => libsigcpp20.yaml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename upstream-info/{libsigc++20.yaml => libsigcpp20.yaml} (75%) diff --git a/upstream-info/libsigc++20.yaml b/upstream-info/libsigcpp20.yaml similarity index 75% rename from upstream-info/libsigc++20.yaml rename to upstream-info/libsigcpp20.yaml index d16af159..394a7969 100644 --- a/upstream-info/libsigc++20.yaml +++ b/upstream-info/libsigcpp20.yaml @@ -1,4 +1,4 @@ version_control: github src_repo: libsigcplusplus/libsigcplusplus -tag_pattern: ^v +tag_prefix: "^v?2.99|^3" separator: . -- Gitee From 1f4759c45778253e498290d2ccef2ae6024ac8b1 Mon Sep 17 00:00:00 2001 From: Shinwell Hu Date: Thu, 13 Aug 2020 09:57:40 +0000 Subject: [PATCH 08/16] fix apr.yaml and apr-util.yaml --- upstream-info/apr-util.yaml | 2 +- upstream-info/apr.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/upstream-info/apr-util.yaml b/upstream-info/apr-util.yaml index 7b32c1af..fb3887b2 100644 --- a/upstream-info/apr-util.yaml +++ b/upstream-info/apr-util.yaml @@ -1,4 +1,4 @@ version_control: svn -src_repo: https://svn.apache.org/viewvc/apr/apr-util +src_repo: https://svn.apache.org/repos/asf/apr/apr-util tag_prefix: ^ separator: . diff --git a/upstream-info/apr.yaml b/upstream-info/apr.yaml index b3813c6e..210712c1 100644 --- a/upstream-info/apr.yaml +++ b/upstream-info/apr.yaml @@ -1,4 +1,4 @@ version_control: svn -src_repo: https://svn.apache.org/viewvc/apr/apr +src_repo: https://svn.apache.org/repos/asf/apr/apr tag_prefix: ^ separator: . -- Gitee From 6cadbd33ec5166b4fdde88300f1487b3eb0bc05d Mon Sep 17 00:00:00 2001 From: Shinwell Hu Date: Thu, 13 Aug 2020 10:27:57 +0000 Subject: [PATCH 09/16] fix yaml errors --- upstream-info/CUnit.yaml | 2 +- upstream-info/ctags.yaml | 2 +- upstream-info/edac-utils.yaml | 2 +- upstream-info/epydoc.yaml | 2 +- upstream-info/gnu-free-fonts.yaml | 4 ++-- upstream-info/irrlicht.yaml | 2 +- upstream-info/lame.yaml | 4 ++-- upstream-info/libavc1394.yaml | 6 +++--- upstream-info/libmodman.yaml | 4 ++-- upstream-info/liboauth.yaml | 8 ++++---- upstream-info/mcpp.yaml | 6 +++--- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/upstream-info/CUnit.yaml b/upstream-info/CUnit.yaml index 025e65d1..e4b8d28e 100644 --- a/upstream-info/CUnit.yaml +++ b/upstream-info/CUnit.yaml @@ -1,4 +1,4 @@ version_control: svn -src_repo: https://svn.code.sf.net/p/cunit/code/trunk +src_repo: https://svn.code.sf.net/p/cunit/code tag_prefix: separator: diff --git a/upstream-info/ctags.yaml b/upstream-info/ctags.yaml index 62517c8b..6420a6d2 100644 --- a/upstream-info/ctags.yaml +++ b/upstream-info/ctags.yaml @@ -1,4 +1,4 @@ version_control: svn -src_repo: https://svn.code.sf.net/p/ctags/code/trunk +src_repo: https://svn.code.sf.net/p/ctags/code tag_prefix: "^Ctags-" separator: "_" diff --git a/upstream-info/edac-utils.yaml b/upstream-info/edac-utils.yaml index db601828..e7e81edc 100644 --- a/upstream-info/edac-utils.yaml +++ b/upstream-info/edac-utils.yaml @@ -1,4 +1,4 @@ version_control: svn -src_repo: https://svn.code.sf.net/p/edac-utils/code/trunk +src_repo: https://svn.code.sf.net/p/edac-utils/code tag_prefix: separator: "." diff --git a/upstream-info/epydoc.yaml b/upstream-info/epydoc.yaml index dc13b6e4..cae631b7 100644 --- a/upstream-info/epydoc.yaml +++ b/upstream-info/epydoc.yaml @@ -1,4 +1,4 @@ version_control: svn -src_repo: https://epydoc.svn.sourceforge.net/svnroot/epydoc/trunk/epydoc +src_repo: https://svn.code.sf.net/p/epydoc/code tag_prefix: ^epydoc- separator: . diff --git a/upstream-info/gnu-free-fonts.yaml b/upstream-info/gnu-free-fonts.yaml index a9769aa0..c904707e 100644 --- a/upstream-info/gnu-free-fonts.yaml +++ b/upstream-info/gnu-free-fonts.yaml @@ -1,4 +1,4 @@ version_control: svn -src_repo: https://svn.savannah.gnu.org/viewvc/freefont -tag_repo: RELEASE_ +src_repo: svn://svn.savannah.gnu.org/freefont +tag_prefix: "^RELEASE_" separator: . diff --git a/upstream-info/irrlicht.yaml b/upstream-info/irrlicht.yaml index 3e1ab5f8..c810c620 100644 --- a/upstream-info/irrlicht.yaml +++ b/upstream-info/irrlicht.yaml @@ -1,4 +1,4 @@ version_control: svn -src_repo: https://svn.code.sf.net/p/irrlicht/code/trunk +src_repo: https://svn.code.sf.net/p/irrlicht/code tag_prefix: release- separator: . diff --git a/upstream-info/lame.yaml b/upstream-info/lame.yaml index 38141216..f3a62213 100644 --- a/upstream-info/lame.yaml +++ b/upstream-info/lame.yaml @@ -1,4 +1,4 @@ version_control: svn -src_repo: https://svn.code.sf.net/p/lame/svn/trunk/lame -tag_prefix: RELEASE_ +src_repo: https://svn.code.sf.net/p/lame/svn +tag_prefix: RELEASE__ separator: _ diff --git a/upstream-info/libavc1394.yaml b/upstream-info/libavc1394.yaml index d0a29d16..cce0a8ab 100644 --- a/upstream-info/libavc1394.yaml +++ b/upstream-info/libavc1394.yaml @@ -1,4 +1,4 @@ version_control: svn -src_repo: https://svn.code.sf.net/p/libavc1394/code/trunk -tag_prefix: "^v" -separator: "." +src_repo: https://svn.code.sf.net/p/libavc1394/code +tag_prefix: "^V_" +separator: "_" diff --git a/upstream-info/libmodman.yaml b/upstream-info/libmodman.yaml index 0641eaaa..9ce14c43 100644 --- a/upstream-info/libmodman.yaml +++ b/upstream-info/libmodman.yaml @@ -1,4 +1,4 @@ -version_control: svn -src_repo: https://code.google.com/archive/p/libmodman/source/default/source +version_control: NA +svn_url: https://code.google.com/archive/p/libmodman/source/default/source tag_prefix: ^libmodman- separator: . diff --git a/upstream-info/liboauth.yaml b/upstream-info/liboauth.yaml index 33547833..3741aa13 100644 --- a/upstream-info/liboauth.yaml +++ b/upstream-info/liboauth.yaml @@ -1,4 +1,4 @@ -version_control: svn -src_repo: https://svn.code.sf.net/p/liboauth/code/trunk -tag_prefix: liboauth-code -separator: ^liboauth- +version_control: github +src_repo: x42/liboauth +tag_prefix: "^v" +separator: "." diff --git a/upstream-info/mcpp.yaml b/upstream-info/mcpp.yaml index 34971c70..624fa01a 100644 --- a/upstream-info/mcpp.yaml +++ b/upstream-info/mcpp.yaml @@ -1,4 +1,4 @@ -version_control: svn -src_repo: https://svn.code.sf.net/p/mcpp/code/trunk/src -tag_prefix: ^V +version_control: github +src_repo: zeroc-ice/mcpp +tag_prefix: ^v separator: . -- Gitee From 4c71fe5b7e19344be7b51949449e0010c896aae5 Mon Sep 17 00:00:00 2001 From: Shinwell Hu Date: Thu, 13 Aug 2020 11:00:54 +0000 Subject: [PATCH 10/16] extend hg to support both raw and json. fix yaml errors --- advisors/check_upstream.py | 33 +++++++++++++++++++ advisors/oa_upgradable.py | 2 ++ upstream-info/SDL.yaml | 4 +-- upstream-info/SDL2.yaml | 2 +- upstream-info/nss.yaml | 2 +- ...-1.8.0-openjdk.yaml => openjdk-1.8.0.yaml} | 2 +- 6 files changed, 40 insertions(+), 5 deletions(-) rename upstream-info/{java-1.8.0-openjdk.yaml => openjdk-1.8.0.yaml} (99%) diff --git a/advisors/check_upstream.py b/advisors/check_upstream.py index df44ac2d..b84d6d8c 100755 --- a/advisors/check_upstream.py +++ b/advisors/check_upstream.py @@ -84,8 +84,40 @@ def dirty_redirect_tricks(url, resp): if "" in cookie: cookie.remove("") return need_trick, new_url, list(cookie) +def check_hg_raw(info): + eprint("{repo} > Using hg raw-tags".format(repo=info["src_repo"]+"/raw-tags")) + resp = load_last_query_result(info) + if resp == "": + headers = { + 'User-Agent' : 'Mozilla/5.0 (X11; Linux x86_64)' + } + url = urljoin(info["src_repo"] + "/", "raw-tags") + resp = requests.get(url, headers=headers) + resp = resp.text + need_trick, url, cookie = dirty_redirect_tricks(url, resp) + if need_trick: + # I dont want to introduce another dependency on requests + # but urllib handling cookie is outragely complex + c_dict = {} + for c in cookie: + k, v = c.split('=') + c_dict[k] = v + resp = requests.get(url, headers=headers, cookies=c_dict) + resp = resp.text + + last_query = {} + last_query["time_stamp"] = datetime.now() + last_query["raw_data"] = resp + info["last_query"] = last_query + tags = [] + for l in resp.splitlines(): + tags.append(l.split()[0]) + result_list = clean_tags(tags, info) + return result_list + def check_hg(info): + eprint("{repo} > Using hg json-tags".format(repo=info["src_repo"]+"/json-tags")) resp = load_last_query_result(info) if resp == "": headers = { @@ -117,6 +149,7 @@ def check_hg(info): result_list = clean_tags(result_list, info) return result_list + def check_metacpan(info): resp = load_last_query_result(info) if resp == "": diff --git a/advisors/oa_upgradable.py b/advisors/oa_upgradable.py index 7f5d49b6..ab145bc9 100755 --- a/advisors/oa_upgradable.py +++ b/advisors/oa_upgradable.py @@ -60,6 +60,8 @@ def get_ver_tags(gt, repo, cwd_path=None): return None if vc_type == "hg": tags = check_upstream.check_hg(pkg_info) + elif vc_type == "hg-raw": + tags = check_upstream.check_hg_raw(pkg_info) elif vc_type == "github": tags = check_upstream.check_github(pkg_info) elif vc_type == "git": diff --git a/upstream-info/SDL.yaml b/upstream-info/SDL.yaml index 5ebce56d..89da0333 100644 --- a/upstream-info/SDL.yaml +++ b/upstream-info/SDL.yaml @@ -1,4 +1,4 @@ -version_control: hg +version_control: hg-raw src_repo: http://hg.libsdl.org/SDL -tag_prefix: "release-" +tag_prefix: "release-(2)?" separator: "." diff --git a/upstream-info/SDL2.yaml b/upstream-info/SDL2.yaml index 73d2256d..40adf4e3 100644 --- a/upstream-info/SDL2.yaml +++ b/upstream-info/SDL2.yaml @@ -1,4 +1,4 @@ -version_control: hg +version_control: hg-raw src_repo: http://hg.libsdl.org/SDL tag_prefix: ^release- separator: . diff --git a/upstream-info/nss.yaml b/upstream-info/nss.yaml index d6ad75a3..b5d27ae6 100644 --- a/upstream-info/nss.yaml +++ b/upstream-info/nss.yaml @@ -1,4 +1,4 @@ version_control: hg src_repo: https://hg.mozilla.org/projects/nss -tag_prefix: ^NSS_ +tag_pattern: ^NSS_(.*)_RTM separator: _ diff --git a/upstream-info/java-1.8.0-openjdk.yaml b/upstream-info/openjdk-1.8.0.yaml similarity index 99% rename from upstream-info/java-1.8.0-openjdk.yaml rename to upstream-info/openjdk-1.8.0.yaml index 76c23c2a..b8138421 100644 --- a/upstream-info/java-1.8.0-openjdk.yaml +++ b/upstream-info/openjdk-1.8.0.yaml @@ -1,5 +1,5 @@ --- -version_control: hg +version_control: hg-raw src_repo: http://hg.openjdk.java.net/aarch64-port/jdk8u-shenandoah tag_prefix: jdk8u separator: "-" -- Gitee From 837b52fedb7463008c2f80db2ab409e3fb78b2c0 Mon Sep 17 00:00:00 2001 From: Shinwell Hu Date: Thu, 13 Aug 2020 11:17:30 +0000 Subject: [PATCH 11/16] extend svn support customized tag directory --- advisors/check_upstream.py | 3 ++- upstream-info/xmlrpc-c.yaml | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 upstream-info/xmlrpc-c.yaml diff --git a/advisors/check_upstream.py b/advisors/check_upstream.py index b84d6d8c..cea1d912 100755 --- a/advisors/check_upstream.py +++ b/advisors/check_upstream.py @@ -305,7 +305,8 @@ def check_gitee(info): def check_svn(info): resp = load_last_query_result(info) - repo_url = info["src_repo"] + "/tags" + tag_dir = info.get("tag_dir", "tags") + repo_url = info["src_repo"] + "/" + tag_dir if resp == "": resp = __check_svn_helper(repo_url) last_query = {} diff --git a/upstream-info/xmlrpc-c.yaml b/upstream-info/xmlrpc-c.yaml new file mode 100644 index 00000000..be2ff9d7 --- /dev/null +++ b/upstream-info/xmlrpc-c.yaml @@ -0,0 +1,5 @@ +version_control: svn +src_repo: https://svn.code.sf.net/p/xmlrpc-c/code +tag_dir: release_number +tag_prefix: "" +separator: "." -- Gitee From 8a65bb690aa1630ab7ecae1c2162c99e1805b334 Mon Sep 17 00:00:00 2001 From: Shinwell Hu Date: Thu, 13 Aug 2020 12:25:44 +0000 Subject: [PATCH 12/16] fix yaml errors --- upstream-info/atk.yaml | 4 ++-- upstream-info/bridge-utils.yaml | 4 ++++ upstream-info/celt051.yaml | 4 ++++ upstream-info/emacs.yaml | 4 ++++ upstream-info/gperftools.yaml | 2 +- upstream-info/guile.yaml | 4 ++++ upstream-info/iptables.yaml | 4 ++++ upstream-info/kurdit-unikurd-web-fonts.yaml | 3 ++- upstream-info/libmpeg2.yaml | 4 ++++ upstream-info/libpwquality.yaml | 2 +- upstream-info/libtalloc.yaml | 6 +++--- upstream-info/libwacom.yaml | 2 +- upstream-info/linux-firmware.yaml | 4 ++++ upstream-info/mod_auth_openidc.yaml | 4 ++++ upstream-info/nss-pem.yaml | 2 +- upstream-info/openssl-pkcs11.yaml | 2 +- upstream-info/spock.yaml | 2 +- 17 files changed, 45 insertions(+), 12 deletions(-) create mode 100644 upstream-info/bridge-utils.yaml create mode 100644 upstream-info/celt051.yaml create mode 100644 upstream-info/emacs.yaml create mode 100644 upstream-info/guile.yaml create mode 100644 upstream-info/iptables.yaml create mode 100644 upstream-info/libmpeg2.yaml create mode 100644 upstream-info/linux-firmware.yaml create mode 100644 upstream-info/mod_auth_openidc.yaml diff --git a/upstream-info/atk.yaml b/upstream-info/atk.yaml index 314c9cb0..74e874dd 100644 --- a/upstream-info/atk.yaml +++ b/upstream-info/atk.yaml @@ -1,8 +1,8 @@ --- version_control: gitlab.gnome src_repo: atk -tag_prefix: "^v" -separator: "." +tag_prefix: "^ATK_" +separator: "_" last_query: time_stamp: 2020-04-24 13:50:12.668396540 +00:00 raw_data: | diff --git a/upstream-info/bridge-utils.yaml b/upstream-info/bridge-utils.yaml new file mode 100644 index 00000000..5c688dc9 --- /dev/null +++ b/upstream-info/bridge-utils.yaml @@ -0,0 +1,4 @@ +version_control: git +src_repo: https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/bridge-utils.git +tag_prefix: '^v' +seperator: . diff --git a/upstream-info/celt051.yaml b/upstream-info/celt051.yaml new file mode 100644 index 00000000..a7c1c76e --- /dev/null +++ b/upstream-info/celt051.yaml @@ -0,0 +1,4 @@ +version_control: NA +rpm_repo: https://git.centos.org/rpms/celt051.git +tag_prefix: "^celt051-" +seperator: "." diff --git a/upstream-info/emacs.yaml b/upstream-info/emacs.yaml new file mode 100644 index 00000000..f9a510c7 --- /dev/null +++ b/upstream-info/emacs.yaml @@ -0,0 +1,4 @@ +version_control: git +src_repo: https://git.savannah.gnu.org/git/emacs.git +tag_prefix: ^emacs- +seperator: "." diff --git a/upstream-info/gperftools.yaml b/upstream-info/gperftools.yaml index d7db9d98..b75e1057 100644 --- a/upstream-info/gperftools.yaml +++ b/upstream-info/gperftools.yaml @@ -1,4 +1,4 @@ version_control: github src_repo: gperftools/gperftools -tag_prefix: ^v +tag_prefix: ^gperftools- separator: . diff --git a/upstream-info/guile.yaml b/upstream-info/guile.yaml new file mode 100644 index 00000000..09a431b7 --- /dev/null +++ b/upstream-info/guile.yaml @@ -0,0 +1,4 @@ +version_control: git +src_repo: https://git.savannah.gnu.org/git/guile.git +tag_prefix: ^v +seperator: "." diff --git a/upstream-info/iptables.yaml b/upstream-info/iptables.yaml new file mode 100644 index 00000000..d650d818 --- /dev/null +++ b/upstream-info/iptables.yaml @@ -0,0 +1,4 @@ +version_control: git +src_repo: git://git.netfilter.org/iptables.git +tag_prefix: "^v" +seperator: . diff --git a/upstream-info/kurdit-unikurd-web-fonts.yaml b/upstream-info/kurdit-unikurd-web-fonts.yaml index eaf17490..e90a1272 100644 --- a/upstream-info/kurdit-unikurd-web-fonts.yaml +++ b/upstream-info/kurdit-unikurd-web-fonts.yaml @@ -1,4 +1,5 @@ -version_control: github +version_control: NA src_repo: gooselinux/kurdit-unikurd-web-fonts +note: src_repo here is not the actual repo for font tag_prefix: ^ separator: . diff --git a/upstream-info/libmpeg2.yaml b/upstream-info/libmpeg2.yaml new file mode 100644 index 00000000..81643ce9 --- /dev/null +++ b/upstream-info/libmpeg2.yaml @@ -0,0 +1,4 @@ +version_control: CVS +src_repo: libmpeg2.cvs.sourceforge.net:/cvsroot/libmpeg2 +tag_prefix: NA +seperator: NA diff --git a/upstream-info/libpwquality.yaml b/upstream-info/libpwquality.yaml index 5b69f52b..4bf65dee 100644 --- a/upstream-info/libpwquality.yaml +++ b/upstream-info/libpwquality.yaml @@ -1,4 +1,4 @@ version_control: github src_repo: libpwquality/libpwquality -tag_prefix: ^v +tag_prefix: ^libpwquality- separator: . diff --git a/upstream-info/libtalloc.yaml b/upstream-info/libtalloc.yaml index 265c8f84..8352690f 100644 --- a/upstream-info/libtalloc.yaml +++ b/upstream-info/libtalloc.yaml @@ -1,4 +1,4 @@ -version_control: github -src_repo: nccgroup/libtalloc -tag_prefix: talloc- +version_control: git +src_repo: git://git.samba.org/samba.git +tag_prefix: "^talloc-" separator: "." diff --git a/upstream-info/libwacom.yaml b/upstream-info/libwacom.yaml index 3f754db8..a7cc25e5 100644 --- a/upstream-info/libwacom.yaml +++ b/upstream-info/libwacom.yaml @@ -1,4 +1,4 @@ version_control: github src_repo: linuxwacom/libwacom -tag_prefix: ^v +tag_prefix: ^libwacom- separator: . diff --git a/upstream-info/linux-firmware.yaml b/upstream-info/linux-firmware.yaml new file mode 100644 index 00000000..4330950c --- /dev/null +++ b/upstream-info/linux-firmware.yaml @@ -0,0 +1,4 @@ +version_control: git +src_repo: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git +tag_prefix: +seperator: diff --git a/upstream-info/mod_auth_openidc.yaml b/upstream-info/mod_auth_openidc.yaml new file mode 100644 index 00000000..6e4a7816 --- /dev/null +++ b/upstream-info/mod_auth_openidc.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: zmartzone/mod_auth_openidc +tag_prefix: "^v" +seperator: . diff --git a/upstream-info/nss-pem.yaml b/upstream-info/nss-pem.yaml index 32fafb19..72a46237 100644 --- a/upstream-info/nss-pem.yaml +++ b/upstream-info/nss-pem.yaml @@ -1,4 +1,4 @@ version_control: github src_repo: kdudka/nss-pem -tag_prefix: ^v +tag_prefix: ^nss-pem- separator: . diff --git a/upstream-info/openssl-pkcs11.yaml b/upstream-info/openssl-pkcs11.yaml index b8589c5a..cf107d65 100644 --- a/upstream-info/openssl-pkcs11.yaml +++ b/upstream-info/openssl-pkcs11.yaml @@ -1,4 +1,4 @@ version_control: github src_repo: OpenSC/libp11 -tag_prefix: ^v +tag_prefix: ^libp11- separator: . diff --git a/upstream-info/spock.yaml b/upstream-info/spock.yaml index cfa4fd95..642d643d 100644 --- a/upstream-info/spock.yaml +++ b/upstream-info/spock.yaml @@ -1,4 +1,4 @@ version_control: github src_repo: spockframework/spock tag_prefix: "spock-" -separator: "." +separator: "-" -- Gitee From 771161d0585469ec936dc1fbe0b6a13e0e8a733d Mon Sep 17 00:00:00 2001 From: Shinwell Hu Date: Thu, 13 Aug 2020 12:39:06 +0000 Subject: [PATCH 13/16] fix gdbm.yaml error --- upstream-info/gdbm.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upstream-info/gdbm.yaml b/upstream-info/gdbm.yaml index a5c7c6e1..d3b95602 100644 --- a/upstream-info/gdbm.yaml +++ b/upstream-info/gdbm.yaml @@ -1,4 +1,4 @@ version_control: git -src_repo: git://gnu.org.ua/gdbm.git -tag_prefix: gdbm- +src_repo: https://git.savannah.gnu.org/git/gdbm.git +tag_prefix: ^v separator: . -- Gitee From 421493a492c37293a073c43cc98c74bb71e0e21b Mon Sep 17 00:00:00 2001 From: Shinwell Hu Date: Thu, 13 Aug 2020 12:52:54 +0000 Subject: [PATCH 14/16] fix fabtests.yaml --- upstream-info/fabtests.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 upstream-info/fabtests.yaml diff --git a/upstream-info/fabtests.yaml b/upstream-info/fabtests.yaml new file mode 100644 index 00000000..db0fcb30 --- /dev/null +++ b/upstream-info/fabtests.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: ofiwg/fabtests +tag_prefix: ^v +seperator: . -- Gitee From 5d184c592246a716134adc123895f8bf9d2d58f4 Mon Sep 17 00:00:00 2001 From: Shinwell Hu Date: Thu, 13 Aug 2020 12:54:06 +0000 Subject: [PATCH 15/16] fix lshw.yaml --- upstream-info/lshw.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 upstream-info/lshw.yaml diff --git a/upstream-info/lshw.yaml b/upstream-info/lshw.yaml new file mode 100644 index 00000000..c72c7173 --- /dev/null +++ b/upstream-info/lshw.yaml @@ -0,0 +1,4 @@ +version_control: git +src_repo: https://ezix.org/src/pkg/lshw.git +tag_prefix: "B." +seperator: "." -- Gitee From 72a473c61c4ca2d9f64b0494a282d938e3949768 Mon Sep 17 00:00:00 2001 From: Shinwell Hu Date: Thu, 13 Aug 2020 14:04:12 +0000 Subject: [PATCH 16/16] extend support for ftp on gnu.org --- advisors/check_upstream.py | 18 ++++++++++++++++++ advisors/oa_upgradable.py | 2 ++ upstream-info/bc.yaml | 4 ++++ upstream-info/ed.yaml | 4 ++++ upstream-info/sharutils.yaml | 4 ++++ upstream-info/which.yaml | 4 ++++ 6 files changed, 36 insertions(+) create mode 100644 upstream-info/bc.yaml create mode 100644 upstream-info/ed.yaml create mode 100644 upstream-info/sharutils.yaml create mode 100644 upstream-info/which.yaml diff --git a/advisors/check_upstream.py b/advisors/check_upstream.py index cea1d912..7845c966 100755 --- a/advisors/check_upstream.py +++ b/advisors/check_upstream.py @@ -270,6 +270,24 @@ def check_github(info): tags = clean_tags(tags, info) return tags +def check_gnu_ftp(info): + headers = { + 'User-Agent' : 'Mozilla/5.0 (X11; Linux x86_64)' + } + url = urljoin("https://ftp.gnu.org/gnu/", 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=\"(.*)\">(\\1)") + 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) src_repos = info["src_repo"].split("/") diff --git a/advisors/oa_upgradable.py b/advisors/oa_upgradable.py index ab145bc9..8043cc0c 100755 --- a/advisors/oa_upgradable.py +++ b/advisors/oa_upgradable.py @@ -76,6 +76,8 @@ def get_ver_tags(gt, repo, cwd_path=None): tags = check_upstream.check_pypi(pkg_info) elif vc_type == "gitee": tags = check_upstream.check_gitee(pkg_info) + elif vc_type == "gnu-ftp": + tags = check_upstream.check_gnu_ftp(pkg_info) else: print("Unsupport version control method {vc}".format(vc=vc_type)) return None diff --git a/upstream-info/bc.yaml b/upstream-info/bc.yaml new file mode 100644 index 00000000..ff357aa0 --- /dev/null +++ b/upstream-info/bc.yaml @@ -0,0 +1,4 @@ +version_control: gnu-ftp +src_repo: bc +tag_pattern: bc-(.*).tar.gz(.sig)? +seperator: "." diff --git a/upstream-info/ed.yaml b/upstream-info/ed.yaml new file mode 100644 index 00000000..f70f29d6 --- /dev/null +++ b/upstream-info/ed.yaml @@ -0,0 +1,4 @@ +version_control: gnu-ftp +src_repo: ed +tag_pattern: ed-(.*).(tar.*) +seperator: "." diff --git a/upstream-info/sharutils.yaml b/upstream-info/sharutils.yaml new file mode 100644 index 00000000..cbf39631 --- /dev/null +++ b/upstream-info/sharutils.yaml @@ -0,0 +1,4 @@ +version_control: gnu-ftp +src_repo: sharutils +tag_pattern: sharutils-(.*).tar.gz(.sig)? +seperator: "." diff --git a/upstream-info/which.yaml b/upstream-info/which.yaml new file mode 100644 index 00000000..817b6152 --- /dev/null +++ b/upstream-info/which.yaml @@ -0,0 +1,4 @@ +version_control: gnu-ftp +src_repo: which +tag_pattern: which-(.*).(tar.*) +seperator: "." -- Gitee