From 2fc0e9a0ecf5f9e1a0883901faedfc7a30a550a8ec1b9f4ac396e130023dec14 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Mon, 17 Jul 2023 12:59:01 +0000 Subject: [PATCH 1/5] Accepting request 1091260 from home:pgajdos - version update to 1.21.22 https://git.dpkg.org/cgit/dpkg/dpkg.git/tree/debian/changelog OBS-URL: https://build.opensuse.org/request/show/1091260 OBS-URL: https://build.opensuse.org/package/show/system:packagemanager/dpkg?expand=0&rev=91 --- dpkg.changes | 6 ++++++ dpkg.spec | 9 ++++----- dpkg_1.21.22.tar.xz | 3 +++ dpkg_1.21.8.tar.xz | 3 --- update-alternatives.spec | 3 ++- 5 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 dpkg_1.21.22.tar.xz delete mode 100644 dpkg_1.21.8.tar.xz diff --git a/dpkg.changes b/dpkg.changes index 5417eb6..f708bc8 100644 --- a/dpkg.changes +++ b/dpkg.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 7 11:15:53 UTC 2023 - pgajdos@suse.com + +- version update to 1.21.22 + https://git.dpkg.org/cgit/dpkg/dpkg.git/tree/debian/changelog + ------------------------------------------------------------------- Thu May 4 14:28:36 UTC 2023 - Frederic Crozat diff --git a/dpkg.spec b/dpkg.spec index e9465a7..dc7df03 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -17,7 +17,7 @@ Name: dpkg -Version: 1.21.8 +Version: 1.21.22 Release: 0 Summary: Debian package management system License: GPL-2.0-or-later @@ -98,7 +98,8 @@ export CFLAGS="%{?build_cflags:%build_cflags}%{?!build_cflags:%optflags}" --disable-silent-rules \ --with-libselinux \ --localstatedir=%{_localstatedir}/lib \ - --with-admindir=%{_localstatedir}/lib/dpkg + --with-admindir=%{_localstatedir}/lib/dpkg \ + --docdir=%{_docdir}/%{name} # configure somehow does not detect architecture correctly in OBS (bnc#469337), so # let's do an awful hack and fix it in config.h @@ -157,11 +158,9 @@ exit 0 %files %license COPYING -%doc ABOUT-NLS AUTHORS doc/triggers.txt NEWS README* THANKS TODO debian/changelog +%{_docdir}/%{name} %{_mandir}/man*/* %exclude %{_mandir}/man*/update-alternatives* -%exclude %{_datadir}/doc/dpkg/*.txt -%exclude %{_datadir}/doc/dpkg/README* %dir %{_sysconfdir}/dpkg %config(noreplace) %{_sysconfdir}/dpkg/* %{_bindir}/* diff --git a/dpkg_1.21.22.tar.xz b/dpkg_1.21.22.tar.xz new file mode 100644 index 0000000..e611e1a --- /dev/null +++ b/dpkg_1.21.22.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a1d15481bba79d7a4899fd55b4b6b18a987ca8d56ee8c43e9cab63b8a0a3545 +size 5419900 diff --git a/dpkg_1.21.8.tar.xz b/dpkg_1.21.8.tar.xz deleted file mode 100644 index 2b2698f..0000000 --- a/dpkg_1.21.8.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0ffc63c475ff2ba9c2820e48fa3bccb60955561ae22c2aed542f1412a7ca3e22 -size 5076924 diff --git a/update-alternatives.spec b/update-alternatives.spec index a029ee5..d000b0d 100644 --- a/update-alternatives.spec +++ b/update-alternatives.spec @@ -17,7 +17,7 @@ Name: update-alternatives -Version: 1.21.8 +Version: 1.21.22 Release: 0 Summary: Maintain symbolic links determining default commands License: GPL-2.0-or-later @@ -29,6 +29,7 @@ Patch0: update-alternatives-suse.patch Patch1: update-alternatives-slavetomaster.patch BuildRequires: autoconf BuildRequires: automake +BuildRequires: libmd-devel BuildRequires: libtool BuildRequires: ncurses-devel BuildRequires: pkgconfig From 8c84d9eaf07dbc49351d89fd63c47abc683c0215fd27d5da107c96ca49102b04 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Thu, 20 Jul 2023 11:26:56 +0000 Subject: [PATCH 2/5] - openssl.patch: use openssl library for MD5 calculation instead of relying on libmd. libmd is not in Ring0 OBS-URL: https://build.opensuse.org/package/show/system:packagemanager/dpkg?expand=0&rev=92 --- dpkg.changes | 6 +++ dpkg.spec | 4 +- openssl.patch | 97 ++++++++++++++++++++++++++++++++++++++++ update-alternatives.spec | 1 - 4 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 openssl.patch diff --git a/dpkg.changes b/dpkg.changes index f708bc8..db31b68 100644 --- a/dpkg.changes +++ b/dpkg.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jul 20 11:25:20 UTC 2023 - Adam Majer + +- openssl.patch: use openssl library for MD5 calculation instead + of relying on libmd. libmd is not in Ring0 + ------------------------------------------------------------------- Wed Jun 7 11:15:53 UTC 2023 - pgajdos@suse.com diff --git a/dpkg.spec b/dpkg.spec index dc7df03..7902bc2 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -30,15 +30,16 @@ Patch1: update-alternatives-suse.patch # PATCH-FIX-SUSE: tar of Leap 42.{2,3} does not recognize --sort=name, --clamp-mtime options Patch2: drop-tar-option.patch Patch3: ncurses-fix.patch +Patch4: openssl.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc-c++ BuildRequires: gpg2 BuildRequires: libbz2-devel -BuildRequires: libmd-devel BuildRequires: libselinux-devel BuildRequires: libtool BuildRequires: ncurses-devel +BuildRequires: openssl-devel BuildRequires: po4a >= 0.59 BuildRequires: update-alternatives BuildRequires: xz-devel @@ -89,6 +90,7 @@ Libraries and header files for dpkg. %patch2 -p1 %endif %patch3 -p1 +%patch4 -p1 %build %global _lto_cflags %{_lto_cflags} -ffat-lto-objects diff --git a/openssl.patch b/openssl.patch new file mode 100644 index 0000000..d6120fd --- /dev/null +++ b/openssl.patch @@ -0,0 +1,97 @@ +Index: dpkg-1.21.22/configure.ac +=================================================================== +--- dpkg-1.21.22.orig/configure.ac ++++ dpkg-1.21.22/configure.ac +@@ -94,6 +94,13 @@ AC_SYS_LARGEFILE + + # Checks for libraries. + DPKG_LIB_MD ++AS_IF([test "x$have_libmd" = "xno"], [ ++ DPKG_LIB_OPENSSL ++ AS_IF([test "x$have_libopenssl" = "xno"], [ ++ AC_MSG_FAILURE([md5 digest functions not found in libmd or openssl]) ++ ]) ++]) ++ + DPKG_LIB_Z + DPKG_LIB_BZ2 + DPKG_LIB_LZMA +@@ -286,6 +293,7 @@ Configuration: + libkvm . . . . . . . . . . . : ${have_libkvm:-no} + libselinux . . . . . . . . . : $have_libselinux + libmd . . . . . . . . . . . . : $have_libmd ++ libcryto . . . . . . . . . . : $have_libcrypto + libz . . . . . . . . . . . . : $have_libz_impl + liblzma . . . . . . . . . . . : $have_liblzma + libzstd . . . . . . . . . . . : $have_libzstd +Index: dpkg-1.21.22/lib/dpkg/Makefile.am +=================================================================== +--- dpkg-1.21.22.orig/lib/dpkg/Makefile.am ++++ dpkg-1.21.22/lib/dpkg/Makefile.am +@@ -36,7 +36,7 @@ libdpkg_la_LDFLAGS += \ + -Wl,--version-script=$(srcdir)/libdpkg.map \ + # EOL + endif +-libdpkg_la_LDFLAGS += $(MD_LIBS) ++libdpkg_la_LDFLAGS += $(MD_LIBS) $(OPENSSL_LIBS) + libdpkg_la_LIBADD = \ + ../compat/libcompat.la \ + # EOL +Index: dpkg-1.21.22/lib/dpkg/buffer.c +=================================================================== +--- dpkg-1.21.22.orig/lib/dpkg/buffer.c ++++ dpkg-1.21.22/lib/dpkg/buffer.c +@@ -23,10 +23,18 @@ + #include + #include + ++#ifdef HAVE_MD5_H ++#include ++#elif HAVE_OPENSSL_MD5_H ++#include ++#define MD5Init MD5_Init ++#define MD5Update MD5_Update ++#define MD5Final MD5_Final ++#endif ++ + #include + + #include +-#include + #include + #include + #include +Index: dpkg-1.21.22/m4/dpkg-libs.m4 +=================================================================== +--- dpkg-1.21.22.orig/m4/dpkg-libs.m4 ++++ dpkg-1.21.22/m4/dpkg-libs.m4 +@@ -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. diff --git a/update-alternatives.spec b/update-alternatives.spec index d000b0d..523cdb2 100644 --- a/update-alternatives.spec +++ b/update-alternatives.spec @@ -29,7 +29,6 @@ Patch0: update-alternatives-suse.patch Patch1: update-alternatives-slavetomaster.patch BuildRequires: autoconf BuildRequires: automake -BuildRequires: libmd-devel BuildRequires: libtool BuildRequires: ncurses-devel BuildRequires: pkgconfig From 3630a316eeff83ae03ea3b7b22e67e2e896cf18ce3440d0fa6d08c210223d6ca Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Thu, 20 Jul 2023 11:36:36 +0000 Subject: [PATCH 3/5] - require Perl 5.28.1 or later - openssl.patch: use openssl library for MD5 calculation instead of relying on libmd. libmd is not in Ring0 OBS-URL: https://build.opensuse.org/package/show/system:packagemanager/dpkg?expand=0&rev=93 --- dpkg.changes | 1 + dpkg.spec | 1 + update-alternatives.changes | 6 ++++++ update-alternatives.spec | 2 ++ 4 files changed, 10 insertions(+) diff --git a/dpkg.changes b/dpkg.changes index db31b68..7839336 100644 --- a/dpkg.changes +++ b/dpkg.changes @@ -3,6 +3,7 @@ Thu Jul 20 11:25:20 UTC 2023 - Adam Majer - openssl.patch: use openssl library for MD5 calculation instead of relying on libmd. libmd is not in Ring0 +- require Perl 5.28.1 or later ------------------------------------------------------------------- Wed Jun 7 11:15:53 UTC 2023 - pgajdos@suse.com diff --git a/dpkg.spec b/dpkg.spec index 7902bc2..ee78dc2 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -40,6 +40,7 @@ BuildRequires: libselinux-devel BuildRequires: libtool BuildRequires: ncurses-devel BuildRequires: openssl-devel +BuildRequires: perl >= 5.28.1 BuildRequires: po4a >= 0.59 BuildRequires: update-alternatives BuildRequires: xz-devel diff --git a/update-alternatives.changes b/update-alternatives.changes index 1412bd4..02aa7cf 100644 --- a/update-alternatives.changes +++ b/update-alternatives.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jul 20 11:25:20 UTC 2023 - Adam Majer + +- openssl.patch: use openssl library for MD5 calculation instead + of relying on libmd. libmd is not in Ring0 + ------------------------------------------------------------------- Thu May 4 14:28:36 UTC 2023 - Frederic Crozat diff --git a/update-alternatives.spec b/update-alternatives.spec index 523cdb2..4b3934b 100644 --- a/update-alternatives.spec +++ b/update-alternatives.spec @@ -27,10 +27,12 @@ Source0: https://ftp.debian.org/debian/pool/main/d/dpkg/dpkg_%{version}.t Source3: sensible-editor Patch0: update-alternatives-suse.patch Patch1: update-alternatives-slavetomaster.patch +Patch2: openssl.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool BuildRequires: ncurses-devel +BuildRequires: openssl-devel BuildRequires: pkgconfig Provides: alternatives = %{version} From 7a523d4b61a966eff098e06412ef67fe3b47d056a8a795da4f390603ac056d7e Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Thu, 20 Jul 2023 11:39:28 +0000 Subject: [PATCH 4/5] - require Perl 5.28.1 or later OBS-URL: https://build.opensuse.org/package/show/system:packagemanager/dpkg?expand=0&rev=94 --- update-alternatives.changes | 1 + update-alternatives.spec | 1 + 2 files changed, 2 insertions(+) diff --git a/update-alternatives.changes b/update-alternatives.changes index 02aa7cf..8c61adc 100644 --- a/update-alternatives.changes +++ b/update-alternatives.changes @@ -3,6 +3,7 @@ Thu Jul 20 11:25:20 UTC 2023 - Adam Majer - openssl.patch: use openssl library for MD5 calculation instead of relying on libmd. libmd is not in Ring0 +- require Perl 5.28.1 or later ------------------------------------------------------------------- Thu May 4 14:28:36 UTC 2023 - Frederic Crozat diff --git a/update-alternatives.spec b/update-alternatives.spec index 4b3934b..649fb29 100644 --- a/update-alternatives.spec +++ b/update-alternatives.spec @@ -33,6 +33,7 @@ BuildRequires: automake BuildRequires: libtool BuildRequires: ncurses-devel BuildRequires: openssl-devel +BuildRequires: perl >= 5.28.1 BuildRequires: pkgconfig Provides: alternatives = %{version} From 63c858bbf89aa14c654ac80f445f474de982ea8dc188f66487b6fb10181ea0f0 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Thu, 20 Jul 2023 12:00:50 +0000 Subject: [PATCH 5/5] OBS-URL: https://build.opensuse.org/package/show/system:packagemanager/dpkg?expand=0&rev=95 --- openssl.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openssl.patch b/openssl.patch index d6120fd..9307930 100644 --- a/openssl.patch +++ b/openssl.patch @@ -8,7 +8,7 @@ Index: dpkg-1.21.22/configure.ac DPKG_LIB_MD +AS_IF([test "x$have_libmd" = "xno"], [ + DPKG_LIB_OPENSSL -+ AS_IF([test "x$have_libopenssl" = "xno"], [ ++ AS_IF([test "x$have_libcrypto" = "xno"], [ + AC_MSG_FAILURE([md5 digest functions not found in libmd or openssl]) + ]) +])