From ab66fee6a440871bccf8476e940ec812bb2df782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Tue, 19 Feb 2019 11:11:05 +0100 Subject: [PATCH] Add patch to fix the output formatting of a test --- ...t-4.4.3-test-alg-hmac-sha1_Use_fputs.patch | 40 +++++++++++++++++++ libxcrypt.spec | 6 ++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 libxcrypt-4.4.3-test-alg-hmac-sha1_Use_fputs.patch diff --git a/libxcrypt-4.4.3-test-alg-hmac-sha1_Use_fputs.patch b/libxcrypt-4.4.3-test-alg-hmac-sha1_Use_fputs.patch new file mode 100644 index 0000000..e41c19b --- /dev/null +++ b/libxcrypt-4.4.3-test-alg-hmac-sha1_Use_fputs.patch @@ -0,0 +1,40 @@ +From 8d109010f022ac75e383ac74d1961c0c63a16c3a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= +Date: Tue, 19 Feb 2019 10:59:43 +0100 +Subject: [PATCH] test-alg-hmac-sha1: Use fputs() instead of puts(). + +puts() appends a newline character at the +end of the output, while fputs() does not. +--- + test-alg-hmac-sha1.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/test-alg-hmac-sha1.c b/test-alg-hmac-sha1.c +index 167f0b4..5a87c7b 100644 +--- a/test-alg-hmac-sha1.c ++++ b/test-alg-hmac-sha1.c +@@ -162,15 +162,15 @@ main (void) + if (strcmp (dbuf, test->expect) != 0) + { + n = 1; +- printf ("\nkey="); +- puts (test->key); +- puts (", data="); +- puts (test->data); +- printf (",\nresult="); +- puts (dbuf); +- puts (": "); +- puts (test->expect); +- printf ("\n"); ++ fputs ("\nkey=", stdout); ++ fputs (test->key, stdout); ++ fputs (", data=", stdout); ++ fputs (test->data, stdout); ++ fputs (",\nresult=", stdout); ++ fputs (dbuf, stdout); ++ fputs (": ", stdout); ++ fputs (test->expect, stdout); ++ fputs ("\n", stdout); + } + } + return n; diff --git a/libxcrypt.spec b/libxcrypt.spec index ceb8e85..9453f7a 100644 --- a/libxcrypt.spec +++ b/libxcrypt.spec @@ -143,7 +143,7 @@ fi \ Name: libxcrypt Version: 4.4.3 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Extended crypt library for descrypt, md5crypt, bcrypt, and others # For explicit license breakdown, see the @@ -154,6 +154,7 @@ Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz # Patch 0000 - 2999: Backported patches from upstream. Patch0000: %{url}/commit/2e4135284e7aaeac2218878041de31d8e724dc8f.patch#/%{name}-4.4.3-test-alg-hmac-sha1_Fix_format-overflow.patch +Patch0001: %{url}/commit/8d109010f022ac75e383ac74d1961c0c63a16c3a.patch#/%{name}-4.4.3-test-alg-hmac-sha1_Use_fputs.patch # Patch 3000 - 5999: Backported patches from pull requests. @@ -460,6 +461,9 @@ done %changelog +* Tue Feb 19 2019 Björn Esser - 4.4.3-7 +- Add patch to fix the output formatting of a test + * Wed Feb 06 2019 Björn Esser - 4.4.3-6 - Always build all supported hash methods - Drop distcheck at the end of %%check stage