unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#49370] [PATCH] gnu: mbedtls-apache: Update to 2.26.0.
@ 2021-07-04  0:16 Matthew James Kraai
  2021-07-05  7:06 ` bug#49370: " Efraim Flashner
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew James Kraai @ 2021-07-04  0:16 UTC (permalink / raw)
  To: 49370; +Cc: Matthew James Kraai

* gnu/packages/patches/mbedtls-apache-reduce-level-of-Wformat-truncation.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/tls.scm (mbedtls-apache): Update to 2.26.0.
---
 gnu/local.mk                                  |  1 +
 ...e-reduce-level-of-Wformat-truncation.patch | 29 +++++++++++++++++++
 gnu/packages/tls.scm                          |  5 ++--
 3 files changed, 33 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/mbedtls-apache-reduce-level-of-Wformat-truncation.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index b197ec55f9..6a44438918 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1422,6 +1422,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/maven-enforcer-api-fix-old-dependencies.patch	\
   %D%/packages/patches/maven-generate-component-xml.patch		\
   %D%/packages/patches/maven-generate-javax-inject-named.patch		\
+  %D%/packages/patches/mbedtls-apache-reduce-level-of-Wformat-truncation.patch	\
   %D%/packages/patches/mcrypt-CVE-2012-4409.patch			\
   %D%/packages/patches/mcrypt-CVE-2012-4426.patch			\
   %D%/packages/patches/mcrypt-CVE-2012-4527.patch			\
diff --git a/gnu/packages/patches/mbedtls-apache-reduce-level-of-Wformat-truncation.patch b/gnu/packages/patches/mbedtls-apache-reduce-level-of-Wformat-truncation.patch
new file mode 100644
index 0000000000..7f3c2d8c05
--- /dev/null
+++ b/gnu/packages/patches/mbedtls-apache-reduce-level-of-Wformat-truncation.patch
@@ -0,0 +1,29 @@
+From 2065a8d8af27c6cb1e40c9462b5933336dca7434 Mon Sep 17 00:00:00 2001
+From: Paul Elliott <paul.elliott@arm.com>
+Date: Wed, 17 Mar 2021 13:12:22 +0000
+Subject: [PATCH] Reduce level of -Wformat-truncation
+
+Reduce level of format truncation warnings due to issues with false
+positives (an unknown size buffer is always treated as size 1)
+
+Signed-off-by: Paul Elliott <paul.elliott@arm.com>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2ab2e01eb..14ca7b696 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -198,7 +198,7 @@ if(CMAKE_COMPILER_IS_GNU)
+         endif()
+     endif()
+     if (GCC_VERSION VERSION_GREATER 7.0 OR GCC_VERSION VERSION_EQUAL 7.0)
+-      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat-overflow=2 -Wformat-truncation=2")
++      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat-overflow=2 -Wformat-truncation")
+     endif()
+     set(CMAKE_C_FLAGS_RELEASE     "-O2")
+     set(CMAKE_C_FLAGS_DEBUG       "-O0 -g3")
+-- 
+2.32.0
+
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index 60005cf339..bb669859b9 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -946,7 +946,7 @@ then ported to the GNU / Linux environment.")
     (name "mbedtls-apache")
     ;; XXX Check whether ‘-Wformat-signedness’ still breaks mbedtls-for-hiawatha
     ;; when updating.
-    (version "2.23.0")
+    (version "2.26.0")
     (source
      (origin
        (method git-fetch)
@@ -954,7 +954,8 @@ then ported to the GNU / Linux environment.")
              (url "https://github.com/ARMmbed/mbedtls")
              (commit (string-append "mbedtls-" version))))
        (sha256
-        (base32 "13fa9h2i989cbf8n8c0j019mshv6wg213va18my1s787lhcq2d62"))
+        (base32 "0scwpmrgvg6q7rvqkc352d2fqlsx0aylcbyibcp1f1rsn8iiif2m"))
+       (patches (search-patches "mbedtls-apache-reduce-level-of-Wformat-truncation.patch"))
        (file-name (git-file-name name version))))
     (build-system cmake-build-system)
     (arguments
-- 
2.32.0





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#49370: [PATCH] gnu: mbedtls-apache: Update to 2.26.0.
  2021-07-04  0:16 [bug#49370] [PATCH] gnu: mbedtls-apache: Update to 2.26.0 Matthew James Kraai
@ 2021-07-05  7:06 ` Efraim Flashner
  0 siblings, 0 replies; 2+ messages in thread
From: Efraim Flashner @ 2021-07-05  7:06 UTC (permalink / raw)
  To: Matthew James Kraai; +Cc: 49370-done

[-- Attachment #1: Type: text/plain, Size: 307 bytes --]

The patch only affected the one line so I turned it into a snippet.

Thanks! Patch pushed.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-05  7:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-04  0:16 [bug#49370] [PATCH] gnu: mbedtls-apache: Update to 2.26.0 Matthew James Kraai
2021-07-05  7:06 ` bug#49370: " Efraim Flashner

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).