diff --git a/partimage-0.6.9-glibc-2.36.patch b/partimage-0.6.9-glibc-2.36.patch new file mode 100644 index 0000000..8e0e00e --- /dev/null +++ b/partimage-0.6.9-glibc-2.36.patch @@ -0,0 +1,13 @@ +https://bugs.gentoo.org/580290 + +--- a/src/client/misc.h ++++ b/src/client/misc.h +@@ -36,7 +36,7 @@ struct COptions; + #endif + + #ifndef makedev +- #define makedev(maj,min) (((maj) << 8) | min)) ++ #define makedev(maj,min) (((maj) << 8) | (min)) + #endif + + // ======================================================= diff --git a/partimage-0.6.9-libz-1.2.11.patch b/partimage-0.6.9-libz-1.2.11.patch new file mode 100644 index 0000000..0f311d2 --- /dev/null +++ b/partimage-0.6.9-libz-1.2.11.patch @@ -0,0 +1,35 @@ +diff --git a/src/client/imagefile.cpp b/src/client/imagefile.cpp +index dd83411..62d0f72 100644 +--- a/src/client/imagefile.cpp ++++ b/src/client/imagefile.cpp +@@ -783,7 +783,7 @@ void CImage::openWriting() + else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression + { + showDebug(1, "open gzip\n"); +- m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "wb"); //"wb1h"); ++ m_gzImageFile = gzdopen(m_nFdImage, "wb"); //"wb1h"); + if (m_gzImageFile == NULL) + { + showDebug(1, "error:%d %s\n", errno, strerror(errno)); +@@ -1098,7 +1098,7 @@ void CImage::openReading(CVolumeHeader *vh /* = NULL */) + } + else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression + { +- m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "rb"); ++ m_gzImageFile = gzdopen(m_nFdImage, "rb"); + if (m_gzImageFile == NULL) + THROW(ERR_ERRNO, errno); + else +diff --git a/src/client/imagefile.h b/src/client/imagefile.h +index 4ba8910..6adb098 100644 +--- a/src/client/imagefile.h ++++ b/src/client/imagefile.h +@@ -41,7 +41,7 @@ class CImage + COptions m_options; + + FILE *m_fImageFile; +- gzFile *m_gzImageFile; ++ gzFile m_gzImageFile; + BZFILE *m_bzImageFile; + + int m_nFdImage; diff --git a/partimage-0.6.9-use-SSLv3-by-default.patch b/partimage-0.6.9-use-SSLv3-by-default.patch new file mode 100644 index 0000000..cf21995 --- /dev/null +++ b/partimage-0.6.9-use-SSLv3-by-default.patch @@ -0,0 +1,80 @@ +From 8b05af027723ff3a64040275d4050ff0e992d629 Mon Sep 17 00:00:00 2001 +From: Marko Kohtala +Date: Sun, 9 Feb 2014 22:54:11 +0200 +Subject: [PATCH] Use SSLv3 by default + +SSLv2_client_method may be hidden. Use the SSLv23_client_method instead. + +This is a fix from Debian package partimage-0.6.8-2.2. + +Signed-off-by: Marko Kohtala +--- + src/client/netclient.cpp | 3 +-- + src/client/netclient.h | 6 ------ + src/server/netserver.cpp | 3 +-- + src/server/netserver.h | 6 ------ + 4 files changed, 2 insertions(+), 16 deletions(-) + +diff --git a/src/client/netclient.cpp b/src/client/netclient.cpp +index 30b8d5c..43b2672 100644 +--- a/src/client/netclient.cpp ++++ b/src/client/netclient.cpp +@@ -43,9 +43,8 @@ CNetClient::CNetClient(bool bMustLogin, bool bUseSSL):CNet() + { + 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); +diff --git a/src/client/netclient.h b/src/client/netclient.h +index 8423798..9d98b39 100644 +--- a/src/client/netclient.h ++++ b/src/client/netclient.h +@@ -35,12 +35,6 @@ class CNetClient : public CNet + #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; + bool m_bMustLogin; +diff --git a/src/server/netserver.cpp b/src/server/netserver.cpp +index a542760..28c43cc 100644 +--- a/src/server/netserver.cpp ++++ b/src/server/netserver.cpp +@@ -39,8 +39,7 @@ CNetServer::CNetServer( uint32_t ip4_addr, unsigned short int port):CNet() + { + 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/src/server/netserver.h b/src/server/netserver.h +index 01f6b6c..29d2a32 100644 +--- a/src/server/netserver.h ++++ b/src/server/netserver.h +@@ -41,12 +41,6 @@ class CNetServer : public CNet + #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 + diff --git a/partimage.spec b/partimage.spec index 9bb944e..adedda1 100644 --- a/partimage.spec +++ b/partimage.spec @@ -1,18 +1,21 @@ %define partimag_uid 65027 %define partimag_gid 65027 Name: partimage -Release: 1mamba +Release: 2mamba Version: 0.6.9 Summary: A Linux/UNIX utility which saves partitions in many formats Group: System/Tools Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco -URL: http://www.partimage.org +URL: https://www.partimage.org/ Source: http://downloads.sourceforge.net/project/partimage/stable/%{version}/%{name}-%{version}.tar.bz2 Source1: mkinstalldirs Patch0: %{name}-0.6.7-gcc43.patch Patch1: %{name}-0.6.7-gcc44.patch +Patch2: partimage-0.6.9-use-SSLv3-by-default.patch +Patch3: partimage-0.6.9-glibc-2.36.patch +Patch4: partimage-0.6.9-libz-1.2.11.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -24,18 +27,26 @@ BuildRequires: libslang-devel BuildRequires: libstdc++6-devel BuildRequires: libz-devel ## AUTOBUILDREQ-END -BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Partition Image is a Linux/UNIX utility which saves partitions in many formats (see below) to an image file. The image file can be compressed in the GZIP/BZIP2 formats to save disk space, and split into multiple files to be copied on removable floppies (ZIP for example). Partitions can be saved across the network since version 0.6.0. +%debug_package + %prep %setup -q +%define _default_patch_fuzz 2 #%patch0 -p1 #%patch1 -p1 -cp %{SOURCE1} . +%patch2 -p1 -b .use-SSLv3-by-default +%patch3 -p1 -b .glibc-2.36 +%patch4 -p1 -b .libz-1.2.11 + +#cp %{SOURCE1} . + +sed -e 's/CRYPTO_lock/X509_new/g' -i configure %build %configure @@ -77,6 +88,9 @@ exit 0 %exclude %{_datadir}/doc/partimage/* %changelog +* Sat Sep 24 2022 Automatic Build System 0.6.9-2mamba +- automatic rebuild by autodist + * Mon Aug 09 2010 Automatic Build System 0.6.9-1mamba - automatic update by autodist