[packages/dislocker] Rel 3; fix build with mbedtls 3

arekm arekm at pld-linux.org
Fri Apr 22 10:34:17 CEST 2022


commit 1110c435728478fc4c2f6a18f4d0d9ab190a51fd
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri Apr 22 10:33:33 2022 +0200

    Rel 3; fix build with  mbedtls 3

 dislocker.spec |  4 +++-
 mbedtls.patch  | 19 +++++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)
---
diff --git a/dislocker.spec b/dislocker.spec
index 988f728..42211f6 100644
--- a/dislocker.spec
+++ b/dislocker.spec
@@ -6,12 +6,13 @@ Summary:	Read BitLocker encrypted volumes under Linux
 Summary(pl.UTF-8):	Odczyt wolumenów szyfrowanych BitLockerem spod Linuksa
 Name:		dislocker
 Version:	0.7.3
-Release:	2
+Release:	3
 License:	GPL v2+
 Group:		Applications/File
 #Source0Download: https://github.com/Aorimn/dislocker/releases
 Source0:	https://github.com/Aorimn/dislocker/archive/v%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	ff1a5a0120cedf04c6146da91dfbd27c
+Patch0:		mbedtls.patch
 URL:		https://github.com/Aorimn/dislocker
 BuildRequires:	cmake >= 2.6
 BuildRequires:	libfuse-devel
@@ -54,6 +55,7 @@ partycje NTFS.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %{__sed} -i -e '1s,/usr/bin/env ruby,/usr/bin/ruby,' src/dislocker-find.rb.in
 
diff --git a/mbedtls.patch b/mbedtls.patch
new file mode 100644
index 0000000..d598450
--- /dev/null
+++ b/mbedtls.patch
@@ -0,0 +1,19 @@
+--- dislocker-0.7.3.org/include/dislocker/ssl_bindings.h.in	2020-11-17 21:29:35.000000000 +0100
++++ dislocker-0.7.3/include/dislocker/ssl_bindings.h.in	2022-04-22 10:29:58.349841704 +0200
+@@ -26,14 +26,14 @@
+ /*
+  * Here stand the bindings for polarssl SHA256/SHA2/SHA-2 function for dislocker
+  */
+-#include "@POLARSSL_INC_FOLDER@/config.h"
++#include "@POLARSSL_INC_FOLDER@/build_info.h"
+ #include "@POLARSSL_INC_FOLDER@/version.h"
+ #include "@POLARSSL_INC_FOLDER@/aes.h"
+ 
+ // Function's name changed
+ #if defined(MBEDTLS_SHA256_C)
+ #  include "mbedtls/sha256.h"
+-#  if MBEDTLS_VERSION_NUMBER >= 0x02070000
++#  if MBEDTLS_VERSION_NUMBER >= 0x02070000 && MBEDTLS_VERSION_NUMBER < 0x03000000
+ #    define SHA256(input, len, output)         mbedtls_sha256_ret(input, len, output, 0)
+ #  else
+ #    define SHA256(input, len, output)         mbedtls_sha256(input, len, output, 0)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/dislocker.git/commitdiff/1110c435728478fc4c2f6a18f4d0d9ab190a51fd



More information about the pld-cvs-commit mailing list