From d2e162df1e26e595c385c3bc14879bdb6649c73e Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Thu, 13 Jan 2022 15:17:49 +0100 Subject: [PATCH 1/3] Remove hard-coded version in zimcheck-test.cpp --- test/zimcheck-test.cpp | 44 +++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/test/zimcheck-test.cpp b/test/zimcheck-test.cpp index 5e6ed618..673620fe 100644 --- a/test/zimcheck-test.cpp +++ b/test/zimcheck-test.cpp @@ -254,7 +254,7 @@ TEST(zimcheck, integrity_goodzimfile) { const std::string expected_output( "[INFO] Checking zim file data/zimfiles/good.zim" "\n" - "[INFO] Zimcheck version is 3.0.0" "\n" + "[INFO] Zimcheck version is " VERSION "\n" "[INFO] Verifying ZIM-archive structure integrity..." "\n" "[INFO] Overall Test Status: Pass" "\n" "[INFO] Total time taken by zimcheck: 0 seconds." "\n" @@ -273,7 +273,7 @@ TEST(zimcheck, checksum_goodzimfile) { const std::string expected_output( "[INFO] Checking zim file data/zimfiles/good.zim" "\n" - "[INFO] Zimcheck version is 3.0.0" "\n" + "[INFO] Zimcheck version is " VERSION "\n" "[INFO] Verifying Internal Checksum..." "\n" "[INFO] Overall Test Status: Pass" "\n" "[INFO] Total time taken by zimcheck: 0 seconds." "\n" @@ -292,7 +292,7 @@ TEST(zimcheck, metadata_goodzimfile) { const std::string expected_output( "[INFO] Checking zim file data/zimfiles/good.zim" "\n" - "[INFO] Zimcheck version is 3.0.0" "\n" + "[INFO] Zimcheck version is " VERSION "\n" "[INFO] Searching for metadata entries..." "\n" "[INFO] Overall Test Status: Pass" "\n" "[INFO] Total time taken by zimcheck: 0 seconds." "\n" @@ -311,7 +311,7 @@ TEST(zimcheck, favicon_goodzimfile) { const std::string expected_output( "[INFO] Checking zim file data/zimfiles/good.zim" "\n" - "[INFO] Zimcheck version is 3.0.0" "\n" + "[INFO] Zimcheck version is " VERSION "\n" "[INFO] Searching for Favicon..." "\n" "[INFO] Overall Test Status: Pass" "\n" "[INFO] Total time taken by zimcheck: 0 seconds." "\n" @@ -330,7 +330,7 @@ TEST(zimcheck, mainpage_goodzimfile) { const std::string expected_output( "[INFO] Checking zim file data/zimfiles/good.zim" "\n" - "[INFO] Zimcheck version is 3.0.0" "\n" + "[INFO] Zimcheck version is " VERSION "\n" "[INFO] Searching for main page..." "\n" "[INFO] Overall Test Status: Pass" "\n" "[INFO] Total time taken by zimcheck: 0 seconds." "\n" @@ -349,7 +349,7 @@ TEST(zimcheck, article_content_goodzimfile) { const std::string expected_output( "[INFO] Checking zim file data/zimfiles/good.zim" "\n" - "[INFO] Zimcheck version is 3.0.0" "\n" + "[INFO] Zimcheck version is " VERSION "\n" "[INFO] Verifying Articles' content..." "\n" "[INFO] Overall Test Status: Pass" "\n" "[INFO] Total time taken by zimcheck: 0 seconds." "\n" @@ -372,7 +372,7 @@ TEST(zimcheck, redundant_articles_goodzimfile) { const std::string expected_output( "[INFO] Checking zim file data/zimfiles/good.zim" "\n" - "[INFO] Zimcheck version is 3.0.0" "\n" + "[INFO] Zimcheck version is " VERSION "\n" "[INFO] Verifying Articles' content..." "\n" "[INFO] Searching for redundant articles..." "\n" " Verifying Similar Articles for redundancies..." "\n" @@ -393,7 +393,7 @@ TEST(zimcheck, redirect_loop_goodzimfile) { const std::string expected_output( "[INFO] Checking zim file data/zimfiles/good.zim" "\n" - "[INFO] Zimcheck version is 3.0.0" "\n" + "[INFO] Zimcheck version is " VERSION "\n" "[INFO] Checking for redirect loops..." "\n" "[INFO] Overall Test Status: Pass" "\n" "[INFO] Total time taken by zimcheck: 0 seconds." "\n" @@ -410,7 +410,7 @@ TEST(zimcheck, redirect_loop_goodzimfile) const std::string ALL_CHECKS_OUTPUT_ON_GOODZIMFILE( "[INFO] Checking zim file data/zimfiles/good.zim" "\n" - "[INFO] Zimcheck version is 3.0.0" "\n" + "[INFO] Zimcheck version is " VERSION "\n" "[INFO] Verifying ZIM-archive structure integrity..." "\n" "[INFO] Avoiding redundant checksum test (already performed by the integrity check)." "\n" "[INFO] Searching for metadata entries..." "\n" @@ -476,7 +476,7 @@ TEST(zimcheck, json_goodzimfile) ASSERT_EQ( "{" "\n" - " \"zimcheck_version\" : \"3.0.0\"," "\n" + " \"zimcheck_version\" : \"" VERSION "\"," "\n" " \"checks\" : [" "\n" " \"checksum\"," "\n" " \"integrity\"," "\n" @@ -503,7 +503,7 @@ TEST(zimcheck, bad_checksum) { const std::string expected_output( "[INFO] Checking zim file data/zimfiles/bad_checksum.zim" "\n" - "[INFO] Zimcheck version is 3.0.0" "\n" + "[INFO] Zimcheck version is " VERSION "\n" "[INFO] Verifying Internal Checksum..." "\n" " [ERROR] Wrong Checksum in ZIM archive" "\n" "[ERROR] Invalid checksum:" "\n" @@ -526,7 +526,7 @@ TEST(zimcheck, metadata_poorzimfile) { const std::string expected_stdout( "[INFO] Checking zim file data/zimfiles/poor.zim" "\n" - "[INFO] Zimcheck version is 3.0.0" "\n" + "[INFO] Zimcheck version is " VERSION "\n" "[INFO] Searching for metadata entries..." "\n" "[ERROR] Missing metadata entries:" "\n" " Title" "\n" @@ -548,7 +548,7 @@ TEST(zimcheck, favicon_poorzimfile) { const std::string expected_stdout( "[INFO] Checking zim file data/zimfiles/poor.zim" "\n" - "[INFO] Zimcheck version is 3.0.0" "\n" + "[INFO] Zimcheck version is " VERSION "\n" "[INFO] Searching for Favicon..." "\n" "[ERROR] Favicon:" "\n" " Favicon is missing" "\n" @@ -569,7 +569,7 @@ TEST(zimcheck, mainpage_poorzimfile) { const std::string expected_stdout( "[INFO] Checking zim file data/zimfiles/poor.zim" "\n" - "[INFO] Zimcheck version is 3.0.0" "\n" + "[INFO] Zimcheck version is " VERSION "\n" "[INFO] Searching for main page..." "\n" "[ERROR] Missing mainpage:" "\n" " Main Page Index stored in Archive Header: 4294967295" "\n" @@ -590,7 +590,7 @@ TEST(zimcheck, empty_items_poorzimfile) { const std::string expected_stdout( "[INFO] Checking zim file data/zimfiles/poor.zim" "\n" - "[INFO] Zimcheck version is 3.0.0" "\n" + "[INFO] Zimcheck version is " VERSION "\n" "[INFO] Verifying Articles' content..." "\n" "[ERROR] Empty articles:" "\n" " Entry empty.html is empty" "\n" @@ -611,7 +611,7 @@ TEST(zimcheck, internal_url_check_poorzimfile) { const std::string expected_stdout( "[INFO] Checking zim file data/zimfiles/poor.zim" "\n" - "[INFO] Zimcheck version is 3.0.0" "\n" + "[INFO] Zimcheck version is " VERSION "\n" "[INFO] Verifying Articles' content..." "\n" "[ERROR] Invalid internal links found:" "\n" " The following links:" "\n" @@ -636,7 +636,7 @@ TEST(zimcheck, external_url_check_poorzimfile) { const std::string expected_stdout( "[INFO] Checking zim file data/zimfiles/poor.zim" "\n" - "[INFO] Zimcheck version is 3.0.0" "\n" + "[INFO] Zimcheck version is " VERSION "\n" "[INFO] Verifying Articles' content..." "\n" "[ERROR] Invalid external links found:" "\n" " http://a.io/pic.png is an external dependence in article external_link.html" "\n" @@ -657,7 +657,7 @@ TEST(zimcheck, redundant_poorzimfile) { const std::string expected_stdout( "[INFO] Checking zim file data/zimfiles/poor.zim" "\n" - "[INFO] Zimcheck version is 3.0.0" "\n" + "[INFO] Zimcheck version is " VERSION "\n" "[INFO] Verifying Articles' content..." "\n" "[INFO] Searching for redundant articles..." "\n" " Verifying Similar Articles for redundancies..." "\n" @@ -680,7 +680,7 @@ TEST(zimcheck, redirect_loop_poorzimfile) { const std::string expected_output( "[INFO] Checking zim file data/zimfiles/poor.zim" "\n" - "[INFO] Zimcheck version is 3.0.0" "\n" + "[INFO] Zimcheck version is " VERSION "\n" "[INFO] Checking for redirect loops..." "\n" "[ERROR] Redirect loop(s) exist:" "\n" " Redirect loop exists from entry redirect_loop.html" "\n" @@ -704,7 +704,7 @@ TEST(zimcheck, redirect_loop_poorzimfile) const std::string ALL_CHECKS_OUTPUT_ON_POORZIMFILE( "[INFO] Checking zim file data/zimfiles/poor.zim" "\n" - "[INFO] Zimcheck version is 3.0.0" "\n" + "[INFO] Zimcheck version is " VERSION "\n" "[INFO] Verifying ZIM-archive structure integrity..." "\n" "[INFO] Avoiding redundant checksum test (already performed by the integrity check)." "\n" "[INFO] Searching for metadata entries..." "\n" @@ -775,7 +775,7 @@ TEST(zimcheck, json_bad_checksum) ASSERT_EQ( "{" "\n" - " \"zimcheck_version\" : \"3.0.0\"," "\n" + " \"zimcheck_version\" : \"" VERSION "\"," "\n" " \"checks\" : [" "\n" " \"checksum\"" "\n" " ]," "\n" @@ -802,7 +802,7 @@ TEST(zimcheck, json_poorzimfile) ASSERT_EQ( "{" "\n" - " \"zimcheck_version\" : \"3.0.0\"," "\n" + " \"zimcheck_version\" : \"" VERSION "\"," "\n" " \"checks\" : [" "\n" " \"checksum\"," "\n" " \"integrity\"," "\n" From 4fe469f11343334f8b317399b6b1ff7613fd2ec3 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Thu, 13 Jan 2022 15:18:20 +0100 Subject: [PATCH 2/3] New version 3.1.0 --- ChangeLog | 13 +++++++++++++ debian/control | 2 +- meson.build | 4 ++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6de9a538..23900db8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +zim-tools 3.1.0 +=============== + + * zimcheck: Fix json output (Use `"` instead of `'`) for strings + (@mgautierfr #281) + * zimcheck: Avoid undefined behavior (and crash) when testing link's content. + (@mgautierfr #280) + * The `--version` option now also print the version of all dependencies (@kelson42, #275) + * zimcheck: Add the zimcheck version in the output log (@kelson42, #274) + * CI: Readd build on Ubuntu Impish (@kelson42, #267) + * CI: Add build on Ubuntu Jammy (@legoktm, #273) + + zim-tools 3.0.0 =============== diff --git a/debian/control b/debian/control index 4e49985d..4c21012c 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,7 @@ Maintainer: Kiwix team Build-Depends: debhelper-compat (= 13), meson, pkg-config, - libzim-dev (>= 6.3.0), + libzim-dev (>= 7.2.0), libmagic-dev, zlib1g-dev, libgumbo-dev, diff --git a/meson.build b/meson.build index 7fb60198..acd158df 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('zim-tools', ['c', 'cpp'], - version : '3.0.0', # Also change zimcheck_version in tests + version : '3.1.0', license : 'GPLv3+', default_options : ['c_std=c11', 'cpp_std=c++11', 'werror=true']) @@ -16,7 +16,7 @@ if static_linkage endif endif -libzim_dep = dependency('libzim', version : '>=7.0.0', static:static_linkage) +libzim_dep = dependency('libzim', version : '>=7.2.0', static:static_linkage) with_xapian_support = compiler.has_header_symbol('zim/zim.h', 'LIBZIM_WITH_XAPIAN') find_library_in_compiler = meson.version().version_compare('>=0.31.0') From 4904a96b5c581d4b5382b232e4108ae0b9a9471e Mon Sep 17 00:00:00 2001 From: Emmanuel Engelhart Date: Sat, 15 Jan 2022 16:21:58 +0100 Subject: [PATCH 3/3] Fix typo is git pseudo --- ChangeLog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 23900db8..a79f6dcf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25,7 +25,7 @@ zim-tools 3.0.0 use (@data-man #235) * remove zstd compression options. We are now always creating zim file with zstd (@kelson42 #261, 264) - * zimwriterfs: Do not use the extension of file as mimetype (@mgautier #265) + * zimwriterfs: Do not use the extension of file as mimetype (@mgautierfr #265) * zimcheck: Improve performance of detection of the kind of url (@veloman-yunkan #179) * Support new protocols xmpp, news and urn (@kelson42 #205) @@ -37,9 +37,9 @@ zim-tools 3.0.0 * zimdump: Fix argument --ns not working (@maneesh #216) * Add zimcheck unit tests (@veloman-yunkan #215) * zimdump: Fix http redirect (@veloman-yunkan #225) - * Adapt zim tools to new libzim api (@mgautier @veloman-yunkan @maneesh) + * Adapt zim tools to new libzim api (@mgautierfr @veloman-yunkan @maneesh) * Compile zimsearch binary only if libzim is compiled with xapian - (@mgautier, #201) + (@mgautierfr, #201) * Docker : Better open zimtools image (@rgaudin #209) zim-tools 2.1.0