2024-03-11 05:08:13 +01:00
|
|
|
Index: dpkg-1.22.5/configure.ac
|
2023-07-20 13:26:56 +02:00
|
|
|
===================================================================
|
2024-03-11 05:08:13 +01:00
|
|
|
--- dpkg-1.22.5.orig/configure.ac
|
|
|
|
+++ dpkg-1.22.5/configure.ac
|
|
|
|
@@ -111,6 +111,13 @@ AC_SYS_LARGEFILE
|
2023-07-20 13:26:56 +02:00
|
|
|
# Checks for libraries.
|
2023-09-18 07:18:35 +02:00
|
|
|
DPKG_LIB_RT
|
2023-07-20 13:26:56 +02:00
|
|
|
DPKG_LIB_MD
|
|
|
|
+AS_IF([test "x$have_libmd" = "xno"], [
|
|
|
|
+ DPKG_LIB_OPENSSL
|
2023-07-20 14:00:50 +02:00
|
|
|
+ AS_IF([test "x$have_libcrypto" = "xno"], [
|
2023-07-20 13:26:56 +02:00
|
|
|
+ AC_MSG_FAILURE([md5 digest functions not found in libmd or openssl])
|
|
|
|
+ ])
|
|
|
|
+])
|
|
|
|
+
|
|
|
|
DPKG_LIB_Z
|
|
|
|
DPKG_LIB_BZ2
|
|
|
|
DPKG_LIB_LZMA
|
2024-03-11 05:08:13 +01:00
|
|
|
@@ -335,6 +342,7 @@ Configuration:
|
2023-07-20 13:26:56 +02:00
|
|
|
libkvm . . . . . . . . . . . : ${have_libkvm:-no}
|
|
|
|
libselinux . . . . . . . . . : $have_libselinux
|
|
|
|
libmd . . . . . . . . . . . . : $have_libmd
|
|
|
|
+ libcryto . . . . . . . . . . : $have_libcrypto
|
|
|
|
libz . . . . . . . . . . . . : $have_libz_impl
|
|
|
|
liblzma . . . . . . . . . . . : $have_liblzma
|
|
|
|
libzstd . . . . . . . . . . . : $have_libzstd
|
2024-03-11 05:08:13 +01:00
|
|
|
Index: dpkg-1.22.5/lib/dpkg/buffer.c
|
2023-07-20 13:26:56 +02:00
|
|
|
===================================================================
|
2024-03-11 05:08:13 +01:00
|
|
|
--- dpkg-1.22.5.orig/lib/dpkg/buffer.c
|
|
|
|
+++ dpkg-1.22.5/lib/dpkg/buffer.c
|
2023-07-20 13:26:56 +02:00
|
|
|
@@ -23,10 +23,18 @@
|
|
|
|
#include <config.h>
|
|
|
|
#include <compat.h>
|
|
|
|
|
|
|
|
+#ifdef HAVE_MD5_H
|
|
|
|
+#include <md5.h>
|
|
|
|
+#elif HAVE_OPENSSL_MD5_H
|
|
|
|
+#include <openssl/md5.h>
|
|
|
|
+#define MD5Init MD5_Init
|
|
|
|
+#define MD5Update MD5_Update
|
|
|
|
+#define MD5Final MD5_Final
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
#include <errno.h>
|
|
|
|
-#include <md5.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <stdlib.h>
|
2024-03-11 05:08:13 +01:00
|
|
|
Index: dpkg-1.22.5/m4/dpkg-libs.m4
|
2023-07-20 13:26:56 +02:00
|
|
|
===================================================================
|
2024-03-11 05:08:13 +01:00
|
|
|
--- dpkg-1.22.5.orig/m4/dpkg-libs.m4
|
|
|
|
+++ dpkg-1.22.5/m4/dpkg-libs.m4
|
2023-07-20 13:26:56 +02:00
|
|
|
@@ -20,11 +20,26 @@ AC_DEFUN([DPKG_LIB_MD], [
|
|
|
|
MD_LIBS="$ac_cv_search_MD5Init"
|
|
|
|
])
|
|
|
|
])
|
|
|
|
- AS_IF([test "x$have_libmd" = "xno"], [
|
|
|
|
- AC_MSG_FAILURE([md5 digest functions not found])
|
|
|
|
- ])
|
|
|
|
])# DPKG_LIB_MD
|
|
|
|
|
|
|
|
+# DPKG_LIB_OPENSSL
|
|
|
|
+# -----------
|
|
|
|
+# Check for the digests support in openssl library.
|
|
|
|
+AC_DEFUN([DPKG_LIB_OPENSSL], [
|
|
|
|
+ AC_ARG_VAR([OPENSSL_LIBS], [linker flags for openssl library])
|
|
|
|
+ have_libcryto="no"
|
|
|
|
+ AC_CHECK_HEADERS([openssl/md5.h], [
|
|
|
|
+ dpkg_save_libcrypto_LIBS=$LIBS
|
|
|
|
+ AC_SEARCH_LIBS([MD5_Init], [crypto])
|
|
|
|
+ LIBS=$dpkg_save_libcrypto_LIBS
|
|
|
|
+ AS_IF([test "x$ac_cv_search_MD5_Init" != "xno"], [
|
|
|
|
+ have_libcrypto="yes"
|
|
|
|
+ OPENSSL_LIBS="$ac_cv_search_MD5_Init"
|
|
|
|
+ ])
|
|
|
|
+ ])
|
|
|
|
+])# DPKG_LIB_OPENSSL
|
|
|
|
+
|
|
|
|
+
|
|
|
|
# DPKG_WITH_COMPRESS_LIB(NAME, HEADER, FUNC)
|
|
|
|
# -------------------------------------------------
|
|
|
|
# Check for availability of a compression library.
|
2024-03-11 05:08:13 +01:00
|
|
|
Index: dpkg-1.22.5/lib/dpkg/Makefile.am
|
|
|
|
===================================================================
|
|
|
|
--- dpkg-1.22.5.orig/lib/dpkg/Makefile.am
|
|
|
|
+++ dpkg-1.22.5/lib/dpkg/Makefile.am
|
|
|
|
@@ -53,6 +53,7 @@ libdpkg_la_LIBADD = \
|
|
|
|
$(ZSTD_LIBS) \
|
|
|
|
$(BZ2_LIBS) \
|
|
|
|
$(MD_LIBS) \
|
|
|
|
+ $(OPENSSL_LIBS) \
|
|
|
|
$(LIBINTL) \
|
|
|
|
../compat/libcompat.la \
|
|
|
|
# EOL
|