[packages/libcarvpath] - rel 3; fix openssl build
arekm
arekm at pld-linux.org
Fri Sep 14 20:50:19 CEST 2018
commit 567a9b38945c5ffac7cf2fbbc7bf7d8737badd4d
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Fri Sep 14 20:50:10 2018 +0200
- rel 3; fix openssl build
libcarvpath.spec | 4 +++-
openssl.patch | 24 ++++++++++++++++++++++++
2 files changed, 27 insertions(+), 1 deletion(-)
---
diff --git a/libcarvpath.spec b/libcarvpath.spec
index 14a2a0d..2cd092c 100644
--- a/libcarvpath.spec
+++ b/libcarvpath.spec
@@ -1,11 +1,12 @@
Summary: Zero storage carving library
Name: libcarvpath
Version: 2.3.0
-Release: 2
+Release: 3
License: LGPL v2.1+
Group: Libraries
Source0: http://dl.sourceforge.net/carvpath/%{name}%{version}.tgz
# Source0-md5: dac237151a2fed70f86024abe55f9d5b
+Patch0: openssl.patch
URL: http://ocfa.sourceforge.net/libcarvpath/
BuildRequires: cmake
BuildRequires: sqlite3-devel
@@ -34,6 +35,7 @@ using %{name}, you will need to install %{name}-devel.
%prep
%setup -q -n %{name}%{version}
+%patch0 -p1
sed -e 's|/lib\b|/%{_lib}|g' -i src/CMakeLists.txt
%build
diff --git a/openssl.patch b/openssl.patch
new file mode 100644
index 0000000..b086c45
--- /dev/null
+++ b/openssl.patch
@@ -0,0 +1,24 @@
+--- libcarvpath2.3.0/src/longtoken.c~ 2010-03-03 09:12:42.000000000 +0100
++++ libcarvpath2.3.0/src/longtoken.c 2018-09-14 20:48:47.261547469 +0200
+@@ -86,12 +86,17 @@ char * carvpath_longtoken_lookup(const
+
+ /* Note: longtoken is overwitten by this function !! */
+ int carvpath_longtoken_fixup(char *longtoken,sqlite3 *db) {
+- EVP_MD_CTX CtxSHA1;
+- EVP_DigestInit(&CtxSHA1, EVP_sha1());
+- EVP_DigestUpdate(&CtxSHA1,longtoken, strlen(longtoken));
++ EVP_MD_CTX *CtxSHA1;
++ CtxSHA1 = EVP_MD_CTX_create();
++ if (!EVP_DigestInit(CtxSHA1, EVP_sha1())) {
++ errno=CARVPATH_ERR_ALLOC;
++ return 0;
++ }
++ EVP_DigestUpdate(CtxSHA1,longtoken, strlen(longtoken));
+ unsigned char sha1Buffer[EVP_MAX_MD_SIZE];
+ unsigned int sha1l;
+- EVP_DigestFinal(&CtxSHA1, sha1Buffer, &sha1l);
++ EVP_DigestFinal(CtxSHA1, sha1Buffer, &sha1l);
++ EVP_MD_CTX_destroy(CtxSHA1);
+ if (strlen(longtoken) < 41)
+ return 0;
+ int i;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libcarvpath.git/commitdiff/567a9b38945c5ffac7cf2fbbc7bf7d8737badd4d
More information about the pld-cvs-commit
mailing list