Version in base suite: 1.10.2-1 Base version: megatools_1.10.2-1 Target version: megatools_1.10.2-1+deb10u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/m/megatools/megatools_1.10.2-1.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/m/megatools/megatools_1.10.2-1+deb10u1.dsc changelog | 7 +++++ patches/series | 1 patches/support-new-links.patch | 56 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) diff -Nru megatools-1.10.2/debian/changelog megatools-1.10.2/debian/changelog --- megatools-1.10.2/debian/changelog 2018-08-01 07:42:42.000000000 +0000 +++ megatools-1.10.2/debian/changelog 2020-04-15 11:43:30.000000000 +0000 @@ -1,3 +1,10 @@ +megatools (1.10.2-1+deb10u1) buster; urgency=medium + + * debian/patches/support-new-links.patch: + - Add support for the new format of mega.nz links. + + -- Alberto Garcia Wed, 15 Apr 2020 13:43:30 +0200 + megatools (1.10.2-1) unstable; urgency=medium * New upstream release (Closes: #905156). diff -Nru megatools-1.10.2/debian/patches/series megatools-1.10.2/debian/patches/series --- megatools-1.10.2/debian/patches/series 2018-08-01 07:42:42.000000000 +0000 +++ megatools-1.10.2/debian/patches/series 2020-04-15 11:43:30.000000000 +0000 @@ -1 +1,2 @@ make-verbose.patch +support-new-links.patch diff -Nru megatools-1.10.2/debian/patches/support-new-links.patch megatools-1.10.2/debian/patches/support-new-links.patch --- megatools-1.10.2/debian/patches/support-new-links.patch 1970-01-01 00:00:00.000000000 +0000 +++ megatools-1.10.2/debian/patches/support-new-links.patch 2020-04-15 11:43:30.000000000 +0000 @@ -0,0 +1,56 @@ +From: Alberto Garcia +Subject: Support new format of mega.nz links +Origin: https://megous.com/git/megatools/commit/?id=5d04a6203a231e8a3ea19bd1f203faee88e4b3a9 +Index: megatools/tools/dl.c +=================================================================== +--- megatools.orig/tools/dl.c ++++ megatools/tools/dl.c +@@ -320,6 +320,7 @@ int main(int ac, char *av[]) + { + gc_error_free GError *local_err = NULL; + gc_regex_unref GRegex *file_regex = NULL, *folder_regex = NULL; ++ gc_regex_unref GRegex *file_regex2 = NULL, *folder_regex2 = NULL;; + gint i; + int status = 0; + +@@ -353,11 +354,20 @@ int main(int ac, char *av[]) + 0, NULL); + g_assert(file_regex != NULL); + ++ file_regex2 = g_regex_new("^https?://mega\\.nz/file/([a-z0-9_-]{8})#([a-z0-9_-]{43})$", G_REGEX_CASELESS, ++ 0, NULL); ++ g_assert(file_regex2 != NULL); ++ + folder_regex = + g_regex_new("^https?://mega(?:\\.co)?\\.nz/#F!([a-z0-9_-]{8})!([a-z0-9_-]{22})(![a-z0-9_-]{8})?$", + G_REGEX_CASELESS, 0, NULL); + g_assert(folder_regex != NULL); + ++ folder_regex2 = ++ g_regex_new("^https?://mega\\.nz/folder/([a-z0-9_-]{8})#([a-z0-9_-]{22})$", ++ G_REGEX_CASELESS, 0, NULL); ++ g_assert(folder_regex2 != NULL); ++ + // create session + + s = tool_start_session(TOOL_SESSION_OPEN | TOOL_SESSION_AUTH_ONLY | TOOL_SESSION_AUTH_OPTIONAL); +@@ -377,7 +387,8 @@ int main(int ac, char *av[]) + gc_free gchar *specific = NULL; + gc_free gchar *link = tool_convert_filename(av[i], FALSE); + +- if (g_regex_match(file_regex, link, 0, &m1)) { ++ if (g_regex_match(file_regex, link, 0, &m1) || ++ g_regex_match(file_regex2, link, 0, &m1)) { + handle = g_match_info_fetch(m1, 1); + key = g_match_info_fetch(m1, 2); + +@@ -398,7 +409,8 @@ int main(int ac, char *av[]) + if (opt_print_names) + g_print("%s\n", cur_file); + } +- } else if (g_regex_match(folder_regex, link, 0, &m2)) { ++ } else if (g_regex_match(folder_regex, link, 0, &m2) || ++ g_regex_match(folder_regex2, link, 0, &m2)) { + if (opt_stream) { + g_printerr("ERROR: Can't stream from a directory!\n"); + tool_fini(s);