[packages/partimage] - rel 5; fix openssl build

arekm arekm at pld-linux.org
Sat Sep 22 16:23:22 CEST 2018


commit 07a9a67727649be92c17ea3ca7b4738afbfcb3c1
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sat Sep 22 16:23:15 2018 +0200

    - rel 5; fix openssl build

 02-openssl.patch   | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 03-openssl11.patch | 15 ++++++++++++++
 build.patch        | 11 ++++++++++
 partimage.spec     | 16 +++++++++++---
 4 files changed, 100 insertions(+), 3 deletions(-)
---
diff --git a/partimage.spec b/partimage.spec
index 228d6b0..fd5bd4e 100644
--- a/partimage.spec
+++ b/partimage.spec
@@ -3,7 +3,7 @@ Summary(pl.UTF-8):	Narzędzie do zapisu partycji w skompresowanych plikach
 Summary(pt_BR.UTF-8):	Ferramenta para criar e restaurar backup de partições
 Name:		partimage
 Version:	0.6.9
-Release:	4
+Release:	5
 License:	GPL v2
 Group:		Applications/System
 Source0:	http://downloads.sourceforge.net/partimage/%{name}-%{version}.tar.bz2
@@ -15,11 +15,16 @@ Source4:	%{name}d-ssl.cnf
 Patch0:		%{name}-fix_debug.patch
 Patch1:		%{name}-descr.patch
 Patch2:		%{name}-gzFile.patch
+Patch3:		02-openssl.patch
+Patch4:		03-openssl11.patch
+Patch5:		build.patch
 URL:		http://www.partimage.org/
+BuildRequires:	autoconf
 BuildRequires:	automake
 BuildRequires:	bzip2-devel
 BuildRequires:	gettext-tools
 BuildRequires:	libstdc++-devel
+BuildRequires:	libtool
 BuildRequires:	newt-devel
 BuildRequires:	openssl-devel
 BuildRequires:	pam-devel
@@ -106,10 +111,15 @@ Server dla Partimage.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
 
 %build
-cp -f /usr/share/automake/config.sub .
-rm -f po/stamp-po
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__automake}
 %configure \
 	--disable-silent-rules \
 	--enable-pam \
diff --git a/02-openssl.patch b/02-openssl.patch
new file mode 100644
index 0000000..dcb5fed
--- /dev/null
+++ b/02-openssl.patch
@@ -0,0 +1,61 @@
+Index: partimage-0.6.8/src/client/netclient.cpp
+===================================================================
+--- partimage-0.6.8.orig/src/client/netclient.cpp	2009-09-24 21:21:42.000000000 +0200
++++ partimage-0.6.8/src/client/netclient.cpp	2011-04-03 16:55:38.379221262 +0200
+@@ -43,9 +43,8 @@
+     {
+       showDebug(3, "initializing client ssl\n");
+       SSLeay_add_ssl_algorithms();
+-      meth = SSLv2_client_method();
+       SSL_load_error_strings();
+-      ctx = SSL_CTX_new(meth);
++      ctx = SSL_CTX_new(SSLv23_client_method());
+       if (!ctx)
+         THROW(ERR_SSL_CTX);
+       m_bUseSSL = (ctx != NULL);
+Index: partimage-0.6.9/src/client/netclient.h
+===================================================================
+--- partimage-0.6.9.orig/src/client/netclient.h
++++ partimage-0.6.9/src/client/netclient.h
+@@ -35,11 +35,6 @@ private:
+ #ifdef HAVE_SSL
+   SSL_CTX * ctx;
+   X509 * server_cert;
+-#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+-  SSL_METHOD const * meth;
+-#else
+-  SSL_METHOD * meth;
+-#endif // OPENSSL_VERSION_NUMBER
+ 
+ #endif
+   bool m_bUseSSL;
+Index: partimage-0.6.8/src/server/netserver.h
+===================================================================
+--- partimage-0.6.9.orig/src/server/netserver.h
++++ partimage-0.6.9/src/server/netserver.h
+@@ -41,11 +41,6 @@ private:
+ #ifdef HAVE_SSL
+   SSL_CTX * ctx;
+   X509 * client_cert;
+-#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+-  SSL_METHOD const * meth; 
+-#else
+-  SSL_METHOD * meth;
+-#endif // OPENSSL_VERSION_NUMBER
+  
+   int err;
+ #endif
+Index: partimage-0.6.8/src/server/netserver.cpp
+===================================================================
+--- partimage-0.6.8.orig/src/server/netserver.cpp	2011-04-03 16:55:48.707091421 +0200
++++ partimage-0.6.8/src/server/netserver.cpp	2011-04-03 16:56:18.462717343 +0200
+@@ -39,8 +39,7 @@
+     {
+       SSL_load_error_strings();
+       SSLeay_add_ssl_algorithms();
+-      meth = SSLv23_server_method();
+-      ctx = SSL_CTX_new(meth);
++      ctx = SSL_CTX_new(SSLv23_server_method());
+       if (!ctx)
+         {
+           ERR_print_errors_fp(stderr);
diff --git a/03-openssl11.patch b/03-openssl11.patch
new file mode 100644
index 0000000..dde9801
--- /dev/null
+++ b/03-openssl11.patch
@@ -0,0 +1,15 @@
+Description: OpenSSL: check for a symbol that actually exists in 1.1
+Author: Chris West (Faux) <git at goeswhere.com>
+Bug-Debian: https://bugs.debian.org/859549
+
+--- partimage-0.6.9.orig/configure.ac
++++ partimage-0.6.9/configure.ac
+@@ -240,7 +240,7 @@ if test "$SSL" = "yes"; then
+   AC_CHECKING([ for SSL Library and Header files ... ])
+   AC_SEARCH_HEADERS(rsa.h crypto.h x509.h pem.h ssl.h err.h,
+     $SSL_HDR_DIR /usr/include/ssl /usr/include/openssl /usr/include,
+-    [  AC_CHECK_LIB(crypto, CRYPTO_lock, [LIBS="$LIBS -lcrypto"],
++    [  AC_CHECK_LIB(crypto, CRYPTO_free, [LIBS="$LIBS -lcrypto"],
+         AC_MSG_ERROR([ Required for SSL Crypto Library not found. ])
+       )
+        AC_CHECK_LIB(ssl, SSL_CTX_new,
diff --git a/build.patch b/build.patch
new file mode 100644
index 0000000..0abc854
--- /dev/null
+++ b/build.patch
@@ -0,0 +1,11 @@
+--- partimage-0.6.9/src/client/misc.h~	2018-09-22 16:20:57.000000000 +0200
++++ partimage-0.6.9/src/client/misc.h	2018-09-22 16:21:18.478570026 +0200
+@@ -36,7 +36,7 @@ struct COptions;
+ #endif
+ 
+ #ifndef makedev
+-  #define makedev(maj,min) (((maj) << 8) | min))
++  #define makedev(maj,min) (((maj) << 8) | min)
+ #endif
+ 
+ // =======================================================
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/partimage.git/commitdiff/07a9a67727649be92c17ea3ca7b4738afbfcb3c1



More information about the pld-cvs-commit mailing list