diff --git a/patch-8-fix-extra-newline-gets-printes-out-when-compressing-multiple-files.patch b/patch-8-fix-extra-newline-gets-printes-out-when-compressing-multiple-files.patch new file mode 100644 index 0000000000000000000000000000000000000000..0ba81845fa1fb15571cac385e5ed0ac3d21ddbee --- /dev/null +++ b/patch-8-fix-extra-newline-gets-printes-out-when-compressing-multiple-files.patch @@ -0,0 +1,35 @@ +diff -Nur zstd-1.5.0/programs/fileio.c new-zstd/programs/fileio.c +--- zstd-1.5.0/programs/fileio.c 2021-05-14 22:59:34.000000000 +0800 ++++ new-zstd/programs/fileio.c 2021-12-06 16:16:11.466665414 +0800 +@@ -889,26 +889,25 @@ + if (fCtx->nbFilesTotal > 1 && !prefs->overwrite) { + if (g_display_prefs.displayLevel <= displayLevelCutoff) { + if (prefs->removeSrcFile) { +- DISPLAYLEVEL(1, "zstd: Aborting... not deleting files and processing into dst: %s", outFileName); ++ DISPLAYLEVEL(1, "zstd: Aborting... not deleting files and processing into dst: %s\n", outFileName); + error = 1; + } + } else { + if (!strcmp(outFileName, stdoutmark)) { +- DISPLAYLEVEL(2, "zstd: WARNING: all input files will be processed and concatenated into stdout. "); ++ DISPLAYLEVEL(2, "zstd: WARNING: all input files will be processed and concatenated into stdout. \n"); + } else { +- DISPLAYLEVEL(2, "zstd: WARNING: all input files will be processed and concatenated into a single output file: %s ", outFileName); ++ DISPLAYLEVEL(2, "zstd: WARNING: all input files will be processed and concatenated into a single output file: %s \n", outFileName); + } +- DISPLAYLEVEL(2, "\nThe concatenated output CANNOT regenerate the original directory tree. ") ++ DISPLAYLEVEL(2, "The concatenated output CANNOT regenerate the original directory tree. \n") + if (prefs->removeSrcFile) { + if (fCtx->hasStdoutOutput) { +- DISPLAYLEVEL(1, "\nAborting. Use -f if you really want to delete the files and output to stdout"); ++ DISPLAYLEVEL(1, "Aborting. Use -f if you really want to delete the files and output to stdout\n"); + error = 1; + } else { + error = g_display_prefs.displayLevel > displayLevelCutoff && UTIL_requireUserConfirmation("This is a destructive operation. Proceed? (y/n): ", "Aborting...", "yY", fCtx->hasStdinInput); + } + } + } +- DISPLAY("\n"); + } + return error; + } diff --git a/zstd.spec b/zstd.spec index 8c8703d57a7cc7cede05728c05b31b56152534a3..7513f11c825ab7e4ef64433ba5981eccebbef110 100644 --- a/zstd.spec +++ b/zstd.spec @@ -2,7 +2,7 @@ Name: zstd Version: 1.5.0 -Release: 10 +Release: 11 Summary: A fast lossless compression algorithm License: BSD and GPLv2 URL: https://github.com/facebook/zstd @@ -15,6 +15,7 @@ Patch4: backport-zstd-1.5.0-patch-4-limit-train-samples.patch Patch5: patch-5-add-test-case-survive-a-list-of-files-which-long-file-name-length.patch Patch6: backport-zstd-1.5.0-patch-6-fix-a-determinism-bug-with-the-DUBT.patch Patch7: patch-7-add-test-case.patch +Patch8: patch-8-fix-extra-newline-gets-printes-out-when-compressing-multiple-files.patch BuildRequires: gtest-devel gcc-c++ pkg-config @@ -93,6 +94,9 @@ install -D -m644 programs/zstd.1 %{buildroot}%{_mandir}/man1/pzstd.1 %{_mandir}/man1/*.1* %changelog +* Mon Dec 06 2021 helei - 1.5.0.11 +* fix extra newline gets printes out when compressing multiple files + * Fri Dec 03 2021 zhangxiao - 1.5.0.10 * add test case