wok-next rev 20719
partimage: use patches
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sun May 27 15:45:14 2018 +0300 (2018-05-27) |
parents | 573a3ae3bb9f |
children | eea9609125ad |
files | partimage/receipt partimage/stuff/partimage-0.6.7_gcc4.u partimage/stuff/patches/partimage-0.6.9-zlib-1.2.6.patch partimage/stuff/patches/series partimage/stuff/patches/use-SSLv3-by-default.patch |
line diff
1.1 --- a/partimage/receipt Sun May 27 15:09:21 2018 +0300 1.2 +++ b/partimage/receipt Sun May 27 15:45:14 2018 +0300 1.3 @@ -6,27 +6,36 @@ 1.4 SHORT_DESC="Saves partitions in an image file" 1.5 MAINTAINER="erjo@slitaz.org" 1.6 LICENSE="GPL2" 1.7 +WEB_SITE="http://www.partimage.org/" 1.8 + 1.9 TARBALL="$PACKAGE-$VERSION.tar.bz2" 1.10 -WEB_SITE="http://www.partimage.org/Index.fr.html" 1.11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" 1.12 1.13 -BUILD_DEPENDS="newt newt-dev slang-dev bzip2-dev openssl-dev zlib-dev pam-dev" 1.14 +BUILD_DEPENDS="gettext newt newt-dev slang-dev bzip2-dev openssl-dev zlib-dev \ 1.15 +pam-dev" 1.16 SPLIT="partimage partimage-pam:pam" 1.17 1.18 compile_rules() { 1.19 + sed -i 's/CRYPTO_lock/X509_new/g' configure 1.20 + 1.21 case $SET in 1.22 - '') SET_ARGS='--disable-pam';; 1.23 - pam) SET_ARGS='--enable-pam';; 1.24 - esac 1.25 - 1.26 - sed -i 's/gzFile \*m_gzImageFile/gzFile m_gzImageFile/' src/client/imagefile.h 1.27 - sed -i 's/(gzFile \*) gzdopen/gzdopen/' src/client/imagefile.cpp 1.28 - 1.29 - ./configure \ 1.30 - $SET_ARGS \ 1.31 - $CONFIGURE_ARGS && 1.32 - make && 1.33 - make DESTDIR=$DESTDIR install || return 1 1.34 + '') 1.35 + ./configure \ 1.36 + --disable-pam \ 1.37 + $CONFIGURE_ARGS && 1.38 + make && 1.39 + make install 1.40 + ;; 1.41 + pam) 1.42 + ./configure \ 1.43 + --enable-pam \ 1.44 + $CONFIGURE_ARGS && 1.45 + make && 1.46 + make pamfile && 1.47 + make install && 1.48 + install -Dm644 partimaged.pam $install/etc/pam.d/partimaged 1.49 + ;; 1.50 + esac || return 1 1.51 1.52 install -Dm600 $stuff/etc/partimaged/partimaged.cert $install/etc/partimaged/partimaged.cert 1.53 install -Dm600 $stuff/etc/partimaged/partimaged.key $install/etc/partimaged/partimaged.key 1.54 @@ -36,16 +45,15 @@ 1.55 } 1.56 1.57 genpkg_rules() { 1.58 + copy @std 1.59 case $PACKAGE in 1.60 partimage) 1.61 - copy @std 1.62 - DEPENDS="newt bzip2 openssl slitaz-base-files zlib gcc-lib-base" 1.63 + DEPENDS="bzlib newt openssl slang zlib" 1.64 ;; 1.65 partimage-pam) 1.66 - copy @std 1.67 CAT="system-tools|using PAM" 1.68 PROVIDE="partimage:pam" 1.69 - DEPENDS="newt bzip2 openssl slitaz-base-files zlib pam gcc-lib-base" 1.70 + DEPENDS="bzlib newt openssl pam slang zlib" 1.71 ;; 1.72 esac 1.73 }
2.1 --- a/partimage/stuff/partimage-0.6.7_gcc4.u Sun May 27 15:09:21 2018 +0300 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,66 +0,0 @@ 2.4 ---- partimage-0.6.7-ori/src/client/main.cpp Sun Feb 3 21:58:00 2008 2.5 -+++ partimage-0.6.7/src/client/main.cpp Thu Sep 24 12:03:23 2009 2.6 -@@ -26,9 +26,11 @@ 2.7 - #include <sys/param.h> 2.8 - #endif 2.9 - 2.10 -+ 2.11 - #include <stdlib.h> 2.12 - #include <stdio.h> 2.13 - #include <unistd.h> 2.14 -+#include <cstdlib> 2.15 - 2.16 - #define __STDC_FORMAT_MACROS 2.17 - #include <inttypes.h> 2.18 ---- partimage-0.6.7-ori/src/client/misc.cpp Sun Feb 3 21:58:00 2008 2.19 -+++ partimage-0.6.7/src/client/misc.cpp Fri Sep 25 15:14:39 2009 2.20 -@@ -24,6 +24,7 @@ 2.21 - #include <unistd.h> 2.22 - #define __STDC_FORMAT_MACROS 2.23 - #include <inttypes.h> 2.24 -+#include <cstring> 2.25 - 2.26 - #ifdef HAVE_SYS_PARAM_H 2.27 - #include <sys/param.h> 2.28 -@@ -2372,7 +2373,7 @@ 2.29 - 2.30 - static char *sfdisk_line_to_partition_device(const char *line) 2.31 - { 2.32 -- if (char *p = strchr(line, ':')) { 2.33 -+ if (const char *p = strchr(line, ':')) { 2.34 - while (p[-1] == ' ' && p > line) p--; 2.35 - return strndup(line, p - line); 2.36 - } else { 2.37 ---- partimage-0.6.7-ori/src/server/partimaged-main.cpp Sun Feb 3 21:57:53 2008 2.38 -+++ partimage-0.6.7/src/server/partimaged-main.cpp Thu Sep 24 10:31:42 2009 2.39 -@@ -27,7 +27,7 @@ 2.40 - 2.41 - #include <stdio.h> 2.42 - #include <stdlib.h> 2.43 --#include <iostream.h> 2.44 -+#include <iostream> 2.45 - #include <sys/types.h> 2.46 - #include <sys/stat.h> 2.47 - #include <signal.h> 2.48 ---- partimage-0.6.7-ori/src/server/partimaged.cpp Sun Feb 3 21:57:53 2008 2.49 -+++ partimage-0.6.7/src/server/partimaged.cpp Thu Sep 24 10:32:08 2009 2.50 -@@ -22,7 +22,7 @@ 2.51 - 2.52 - #include <stdio.h> 2.53 - #include <stdlib.h> 2.54 --#include <iostream.h> 2.55 -+#include <iostream> 2.56 - 2.57 - #include "net.h" 2.58 - #include "netserver.h" 2.59 ---- partimage-0.6.7-ori/src/shared/net.h Sun Feb 3 21:57:55 2008 2.60 -+++ partimage-0.6.7/src/shared/net.h Thu Sep 24 10:32:35 2009 2.61 -@@ -28,7 +28,7 @@ 2.62 - #include <sys/types.h> 2.63 - #include <sys/socket.h> 2.64 - #include <arpa/inet.h> 2.65 --#include <iostream.h> 2.66 -+#include <iostream> 2.67 - #include <pthread.h> 2.68 - 2.69 - #include "pathnames.h"
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/partimage/stuff/patches/partimage-0.6.9-zlib-1.2.6.patch Sun May 27 15:45:14 2018 +0300 3.3 @@ -0,0 +1,35 @@ 3.4 +diff --git a/src/client/imagefile.cpp b/src/client/imagefile.cpp 3.5 +index dd83411..62d0f72 100644 3.6 +--- a/src/client/imagefile.cpp 3.7 ++++ b/src/client/imagefile.cpp 3.8 +@@ -783,7 +783,7 @@ void CImage::openWriting() 3.9 + else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression 3.10 + { 3.11 + showDebug(1, "open gzip\n"); 3.12 +- m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "wb"); //"wb1h"); 3.13 ++ m_gzImageFile = gzdopen(m_nFdImage, "wb"); //"wb1h"); 3.14 + if (m_gzImageFile == NULL) 3.15 + { 3.16 + showDebug(1, "error:%d %s\n", errno, strerror(errno)); 3.17 +@@ -1098,7 +1098,7 @@ void CImage::openReading(CVolumeHeader *vh /* = NULL */) 3.18 + } 3.19 + else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression 3.20 + { 3.21 +- m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "rb"); 3.22 ++ m_gzImageFile = gzdopen(m_nFdImage, "rb"); 3.23 + if (m_gzImageFile == NULL) 3.24 + THROW(ERR_ERRNO, errno); 3.25 + else 3.26 +diff --git a/src/client/imagefile.h b/src/client/imagefile.h 3.27 +index 4ba8910..6adb098 100644 3.28 +--- a/src/client/imagefile.h 3.29 ++++ b/src/client/imagefile.h 3.30 +@@ -41,7 +41,7 @@ class CImage 3.31 + COptions m_options; 3.32 + 3.33 + FILE *m_fImageFile; 3.34 +- gzFile *m_gzImageFile; 3.35 ++ gzFile m_gzImageFile; 3.36 + BZFILE *m_bzImageFile; 3.37 + 3.38 + int m_nFdImage;
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/partimage/stuff/patches/series Sun May 27 15:45:14 2018 +0300 4.3 @@ -0,0 +1,3 @@ 4.4 +# from https://www.archlinux.org/packages/community/x86_64/partimage/ 4.5 +partimage-0.6.9-zlib-1.2.6.patch 4.6 +use-SSLv3-by-default.patch
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/partimage/stuff/patches/use-SSLv3-by-default.patch Sun May 27 15:45:14 2018 +0300 5.3 @@ -0,0 +1,80 @@ 5.4 +From 8b05af027723ff3a64040275d4050ff0e992d629 Mon Sep 17 00:00:00 2001 5.5 +From: Marko Kohtala <marko.kohtala@gmail.com> 5.6 +Date: Sun, 9 Feb 2014 22:54:11 +0200 5.7 +Subject: [PATCH] Use SSLv3 by default 5.8 + 5.9 +SSLv2_client_method may be hidden. Use the SSLv23_client_method instead. 5.10 + 5.11 +This is a fix from Debian package partimage-0.6.8-2.2. 5.12 + 5.13 +Signed-off-by: Marko Kohtala <marko.kohtala@gmail.com> 5.14 +--- 5.15 + src/client/netclient.cpp | 3 +-- 5.16 + src/client/netclient.h | 6 ------ 5.17 + src/server/netserver.cpp | 3 +-- 5.18 + src/server/netserver.h | 6 ------ 5.19 + 4 files changed, 2 insertions(+), 16 deletions(-) 5.20 + 5.21 +diff --git a/src/client/netclient.cpp b/src/client/netclient.cpp 5.22 +index 30b8d5c..43b2672 100644 5.23 +--- a/src/client/netclient.cpp 5.24 ++++ b/src/client/netclient.cpp 5.25 +@@ -43,9 +43,8 @@ CNetClient::CNetClient(bool bMustLogin, bool bUseSSL):CNet() 5.26 + { 5.27 + showDebug(3, "initializing client ssl\n"); 5.28 + SSLeay_add_ssl_algorithms(); 5.29 +- meth = SSLv2_client_method(); 5.30 + SSL_load_error_strings(); 5.31 +- ctx = SSL_CTX_new(meth); 5.32 ++ ctx = SSL_CTX_new(SSLv23_client_method()); 5.33 + if (!ctx) 5.34 + THROW(ERR_SSL_CTX); 5.35 + m_bUseSSL = (ctx != NULL); 5.36 +diff --git a/src/client/netclient.h b/src/client/netclient.h 5.37 +index 8423798..9d98b39 100644 5.38 +--- a/src/client/netclient.h 5.39 ++++ b/src/client/netclient.h 5.40 +@@ -35,12 +35,6 @@ class CNetClient : public CNet 5.41 + #ifdef HAVE_SSL 5.42 + SSL_CTX * ctx; 5.43 + X509 * server_cert; 5.44 +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L 5.45 +- SSL_METHOD const * meth; 5.46 +-#else 5.47 +- SSL_METHOD * meth; 5.48 +-#endif // OPENSSL_VERSION_NUMBER 5.49 +- 5.50 + #endif 5.51 + bool m_bUseSSL; 5.52 + bool m_bMustLogin; 5.53 +diff --git a/src/server/netserver.cpp b/src/server/netserver.cpp 5.54 +index a542760..28c43cc 100644 5.55 +--- a/src/server/netserver.cpp 5.56 ++++ b/src/server/netserver.cpp 5.57 +@@ -39,8 +39,7 @@ CNetServer::CNetServer( uint32_t ip4_addr, unsigned short int port):CNet() 5.58 + { 5.59 + SSL_load_error_strings(); 5.60 + SSLeay_add_ssl_algorithms(); 5.61 +- meth = SSLv23_server_method(); 5.62 +- ctx = SSL_CTX_new(meth); 5.63 ++ ctx = SSL_CTX_new(SSLv23_server_method()); 5.64 + if (!ctx) 5.65 + { 5.66 + ERR_print_errors_fp(stderr); 5.67 +diff --git a/src/server/netserver.h b/src/server/netserver.h 5.68 +index 01f6b6c..29d2a32 100644 5.69 +--- a/src/server/netserver.h 5.70 ++++ b/src/server/netserver.h 5.71 +@@ -41,12 +41,6 @@ class CNetServer : public CNet 5.72 + #ifdef HAVE_SSL 5.73 + SSL_CTX * ctx; 5.74 + X509 * client_cert; 5.75 +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L 5.76 +- SSL_METHOD const * meth; 5.77 +-#else 5.78 +- SSL_METHOD * meth; 5.79 +-#endif // OPENSSL_VERSION_NUMBER 5.80 +- 5.81 + int err; 5.82 + #endif 5.83 +