From d9468d51fb42bedf24bc8f40ea1ff5fadf206f1d Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 28 Apr 2020 05:34:42 -0400 Subject: [PATCH] import libsolv-0.7.7-1.el8 --- .gitignore | 2 +- .libsolv.metadata | 2 +- ...=> 0001-Backport-OpenSSL-for-hashes.patch} | 84 ++++++++++++------- ...xcluded-packages-as-a-best-candidate.patch | 58 ------------- ...nSSL-for-computing-hashes-by-default.patch | 25 ------ SPECS/libsolv.spec | 30 +++++-- 6 files changed, 80 insertions(+), 121 deletions(-) rename SOURCES/{0002-Add-support-for-computing-hashes-using-OpenSSL.patch => 0001-Backport-OpenSSL-for-hashes.patch} (65%) delete mode 100644 SOURCES/0001-Not-considered-excluded-packages-as-a-best-candidate.patch delete mode 100644 SOURCES/0003-Use-OpenSSL-for-computing-hashes-by-default.patch diff --git a/.gitignore b/.gitignore index b2f870c..e650dd7 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/libsolv-0.7.4.tar.gz +SOURCES/libsolv-0.7.7.tar.gz diff --git a/.libsolv.metadata b/.libsolv.metadata index d3fe0a2..9f7579b 100644 --- a/.libsolv.metadata +++ b/.libsolv.metadata @@ -1 +1 @@ -c7f87563faf2566d40c643a49d115aa4a6f01ac2 SOURCES/libsolv-0.7.4.tar.gz +be93515a4fca86e76c1dfd2f2cb99950de0f42a4 SOURCES/libsolv-0.7.7.tar.gz diff --git a/SOURCES/0002-Add-support-for-computing-hashes-using-OpenSSL.patch b/SOURCES/0001-Backport-OpenSSL-for-hashes.patch similarity index 65% rename from SOURCES/0002-Add-support-for-computing-hashes-using-OpenSSL.patch rename to SOURCES/0001-Backport-OpenSSL-for-hashes.patch index 94a5450..85125af 100644 --- a/SOURCES/0002-Add-support-for-computing-hashes-using-OpenSSL.patch +++ b/SOURCES/0001-Backport-OpenSSL-for-hashes.patch @@ -1,28 +1,31 @@ -From d053217223eff6e329da84b4d2e0c73d95e1a00f Mon Sep 17 00:00:00 2001 +From fc1fe251a565423327faad91b9341b1344334456 Mon Sep 17 00:00:00 2001 From: Jaroslav Rohel -Date: Thu, 28 Mar 2019 12:56:08 +0100 -Subject: [PATCH] Add support for computing hashes using OpenSSL +Date: Fri, 25 Oct 2019 14:33:22 +0200 +Subject: [PATCH 1/2] Add support for computing hashes using OpenSSL +It adds WITH_OPENSSL build option. +If it is ON, OpenSSL will be used instead of internal implementation +of computing hashes (MD5, SHA1, SHA224, SHA256, SHA384, SHA512). --- CMakeLists.txt | 11 ++++++++++- - src/CMakeLists.txt | 15 ++++++++++----- + src/CMakeLists.txt | 16 +++++++++++----- src/chksum.c | 32 ++++++++++++++++++++++++++++++++ tools/CMakeLists.txt | 2 +- - 4 files changed, 53 insertions(+), 7 deletions(-) + 4 files changed, 54 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index ab385f1..b2a0b72 100644 +index b39fd991..33ce8047 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -38,6 +38,7 @@ OPTION (ENABLE_ZSTD_COMPRESSION "Build with zstd compression support?" OFF) - OPTION (ENABLE_ZCHUNK_COMPRESSION "Build with zchunk compression support?" OFF) +@@ -39,6 +39,7 @@ OPTION (ENABLE_ZCHUNK_COMPRESSION "Build with zchunk compression support?" OFF) OPTION (WITH_SYSTEM_ZCHUNK "Use system zchunk library?" OFF) OPTION (WITH_LIBXML2 "Build with libxml2 instead of libexpat?" OFF) + OPTION (WITHOUT_COOKIEOPEN "Disable the use of stdio cookie opens?" OFF) +OPTION (WITH_OPENSSL "Use OpenSSL instead of internal implementation of hashes?" OFF) - # Library - IF (DEFINED LIB) -@@ -177,6 +178,11 @@ INCLUDE_DIRECTORIES (${EXPAT_INCLUDE_DIRS}) + include (GNUInstallDirs) + message (STATUS "Libraries will be installed in ${CMAKE_INSTALL_FULL_LIBDIR}") +@@ -160,6 +161,11 @@ INCLUDE_DIRECTORIES (${EXPAT_INCLUDE_DIRS}) ENDIF (WITH_LIBXML2 ) ENDIF (ENABLE_RPMMD OR ENABLE_SUSEREPO OR ENABLE_APPDATA OR ENABLE_COMPS OR ENABLE_HELIXREPO OR ENABLE_MDKREPO) @@ -34,16 +37,16 @@ index ab385f1..b2a0b72 100644 IF (ENABLE_ZLIB_COMPRESSION) FIND_PACKAGE (ZLIB REQUIRED) INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS}) -@@ -287,7 +293,7 @@ ENDIF (${CMAKE_MAJOR_VERSION} GREATER 2) +@@ -270,7 +276,7 @@ ENDIF (${CMAKE_MAJOR_VERSION} GREATER 2) # should create config.h with #cmakedefine instead... FOREACH (VAR HAVE_STRCHRNUL HAVE_FOPENCOOKIE HAVE_FUNOPEN WORDS_BIGENDIAN -- HAVE_RPM_DB_H HAVE_PGPDIGGETPARAMS WITH_LIBXML2 ) -+ HAVE_RPM_DB_H HAVE_PGPDIGGETPARAMS WITH_LIBXML2 WITH_OPENSSL) +- HAVE_RPM_DB_H HAVE_PGPDIGGETPARAMS WITH_LIBXML2 WITHOUT_COOKIEOPEN) ++ HAVE_RPM_DB_H HAVE_PGPDIGGETPARAMS WITH_LIBXML2 WITHOUT_COOKIEOPEN WITH_OPENSSL) IF(${VAR}) ADD_DEFINITIONS (-D${VAR}=1) SET (SWIG_FLAGS ${SWIG_FLAGS} -D${VAR}) -@@ -419,6 +425,9 @@ ENDIF (ENABLE_ZSTD_COMPRESSION) +@@ -407,6 +413,9 @@ ENDIF (ENABLE_ZSTD_COMPRESSION) IF (WITH_SYSTEM_ZCHUNK) SET (SYSTEM_LIBRARIES ${SYSTEM_LIBRARIES} ${ZCHUNK_LIBRARIES}) ENDIF (WITH_SYSTEM_ZCHUNK) @@ -54,7 +57,7 @@ index ab385f1..b2a0b72 100644 SET (SYSTEM_LIBRARIES ${RPMDB_LIBRARY} ${SYSTEM_LIBRARIES}) ENDIF (ENABLE_RPMDB) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index be487a7..fc3092a 100644 +index 6abb3adb..d356c7d6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -18,9 +18,8 @@ SET (libsolv_SRCS @@ -69,15 +72,14 @@ index be487a7..fc3092a 100644 SET (libsolv_HEADERS bitmap.h evr.h hash.h policy.h poolarch.h poolvendor.h pool.h -@@ -33,16 +32,22 @@ IF (ENABLE_CONDA) - SET (libsolv_SRCS ${libsolv_SRCS} conda.c) - ENDIF (ENABLE_CONDA) +@@ -43,14 +42,21 @@ IF (WIN32) + LIST (APPEND libsolv_SRCS ${WIN32_COMPAT_SOURCES}) + ENDIF (WIN32) +IF (NOT WITH_OPENSSL) + SET (libsolv_SRCS ${libsolv_SRCS} md5.c sha1.c sha2.c) +ENDIF (NOT WITH_OPENSSL) - - SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") ++ IF (HAVE_LINKER_VERSION_SCRIPT) SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LINK_FLAGS} -Wl,--version-script=${CMAKE_SOURCE_DIR}/src/libsolv.ver") ENDIF (HAVE_LINKER_VERSION_SCRIPT) @@ -95,7 +97,7 @@ index be487a7..fc3092a 100644 SET_TARGET_PROPERTIES(libsolv PROPERTIES OUTPUT_NAME "solv") diff --git a/src/chksum.c b/src/chksum.c -index df46145..d7b39e8 100644 +index 1f8ab471..9189b744 100644 --- a/src/chksum.c +++ b/src/chksum.c @@ -15,10 +15,42 @@ @@ -138,15 +140,15 @@ index df46145..d7b39e8 100644 +#endif + - struct s_Chksum { - Id type; - int done; + #ifdef _WIN32 + #include "strfncs.h" + #endif diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt -index 802dc50..b1f6c7a 100644 +index f19030eb..d477e195 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt -@@ -99,7 +99,7 @@ SET (tools_list ${tools_list} appdata2solv) - ENDIF (ENABLE_APPDATA) +@@ -116,7 +116,7 @@ SET(tools_list ${tools_list} repo2solv) + ENDIF (NOT WIN32) ADD_EXECUTABLE (dumpsolv dumpsolv.c ) -TARGET_LINK_LIBRARIES (dumpsolv libsolv) @@ -154,6 +156,28 @@ index 802dc50..b1f6c7a 100644 ADD_EXECUTABLE (mergesolv mergesolv.c ) TARGET_LINK_LIBRARIES (mergesolv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES}) --- -libgit2 0.27.8 +From ef403d41780fb2bac1df40cbb7a55967e8206127 Mon Sep 17 00:00:00 2001 +From: Jaroslav Rohel +Date: Tue, 9 Apr 2019 10:20:16 +0200 +Subject: [PATCH 2/2] Use OpenSSL for computing hashes by default + +It simplifies backporting to downstream, because +it does not need to change the .spec file for using OpenSSL. +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 33ce8047..5d1d6daf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -39,7 +39,7 @@ OPTION (ENABLE_ZCHUNK_COMPRESSION "Build with zchunk compression support?" OFF) + OPTION (WITH_SYSTEM_ZCHUNK "Use system zchunk library?" OFF) + OPTION (WITH_LIBXML2 "Build with libxml2 instead of libexpat?" OFF) + OPTION (WITHOUT_COOKIEOPEN "Disable the use of stdio cookie opens?" OFF) +-OPTION (WITH_OPENSSL "Use OpenSSL instead of internal implementation of hashes?" OFF) ++OPTION (WITH_OPENSSL "Use OpenSSL instead of internal implementation of hashes?" ON) + + include (GNUInstallDirs) + message (STATUS "Libraries will be installed in ${CMAKE_INSTALL_FULL_LIBDIR}") diff --git a/SOURCES/0001-Not-considered-excluded-packages-as-a-best-candidate.patch b/SOURCES/0001-Not-considered-excluded-packages-as-a-best-candidate.patch deleted file mode 100644 index 7ab480a..0000000 --- a/SOURCES/0001-Not-considered-excluded-packages-as-a-best-candidate.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 5ab0d7ab942d97cb6992c8b73b29b2a896e9fe7a Mon Sep 17 00:00:00 2001 -From: Jaroslav Mracek -Date: Fri, 22 Feb 2019 18:32:02 +0100 -Subject: [PATCH] Not considered excluded packages as a best candidate - ---- - src/policy.c | 28 ++++++++++++++++++++++++++++ - 1 file changed, 28 insertions(+) - -diff --git a/src/policy.c b/src/policy.c -index 5f61115..d51fa6f 100644 ---- a/src/policy.c -+++ b/src/policy.c -@@ -831,6 +831,33 @@ move_installed_to_front(Pool *pool, Queue *plist) - } - } - -+ -+/* -+ * prune_to_considered -+ * -+ * Keep only considered (pool->considered) solvables in plist. If pool->considered is NULL, it keeps -+ * all solvable in plist. If non of solvables in plist is in considered map, it returns empty plist. -+ */ -+static void -+prune_to_considered(Pool *pool, Queue *plist) -+{ -+ if (plist->count == 0) /* no need to prune if plist is empty */ -+ return; -+ if (!pool->considered) /* no need to prune if no considered map */ -+ return; -+ int i, j; -+ Id id; -+ for (i = j = 0; i < plist->count; i++) -+ { -+ id = plist->elements[i]; -+ if (MAPTST(pool->considered, id)) -+ { -+ plist->elements[j++] = id; -+ } -+ } -+ plist->count = j; -+} -+ - /* - * prune_to_best_version - * -@@ -1299,6 +1326,7 @@ policy_filter_unwanted(Solver *solv, Queue *plist, int mode) - return; - } - } -+ prune_to_considered(pool, plist); - if (plist->count > 1) - { - if (mode != POLICY_MODE_SUGGEST) --- -libgit2 0.27.7 - diff --git a/SOURCES/0003-Use-OpenSSL-for-computing-hashes-by-default.patch b/SOURCES/0003-Use-OpenSSL-for-computing-hashes-by-default.patch deleted file mode 100644 index e6b7005..0000000 --- a/SOURCES/0003-Use-OpenSSL-for-computing-hashes-by-default.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 1b8844c26318b91021606e729a604eb47cb37098 Mon Sep 17 00:00:00 2001 -From: Jaroslav Rohel -Date: Tue, 9 Apr 2019 10:20:16 +0200 -Subject: [PATCH] Use OpenSSL for computing hashes by default - ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b2a0b72..3450526 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -38,7 +38,7 @@ OPTION (ENABLE_ZSTD_COMPRESSION "Build with zstd compression support?" OFF) - OPTION (ENABLE_ZCHUNK_COMPRESSION "Build with zchunk compression support?" OFF) - OPTION (WITH_SYSTEM_ZCHUNK "Use system zchunk library?" OFF) - OPTION (WITH_LIBXML2 "Build with libxml2 instead of libexpat?" OFF) --OPTION (WITH_OPENSSL "Use OpenSSL instead of internal implementation of hashes?" OFF) -+OPTION (WITH_OPENSSL "Use OpenSSL instead of internal implementation of hashes?" ON) - - # Library - IF (DEFINED LIB) --- -libgit2 0.27.8 - diff --git a/SPECS/libsolv.spec b/SPECS/libsolv.spec index 9b59710..18ef61e 100644 --- a/SPECS/libsolv.spec +++ b/SPECS/libsolv.spec @@ -41,8 +41,8 @@ #global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: lib%{libname} -Version: 0.7.4 -Release: 3%{?commit:.git.%{commitnum}.%{?shortcommit}}%{?dist} +Version: 0.7.7 +Release: 1%{?commit:.git.%{commitnum}.%{?shortcommit}}%{?dist} Summary: Package dependency solver License: BSD @@ -52,11 +52,8 @@ Source: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz %else Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz %endif -# https://bugzilla.redhat.com/show_bug.cgi?id=1677583 -Patch0: 0001-Not-considered-excluded-packages-as-a-best-candidate.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1630300 -Patch1: 0002-Add-support-for-computing-hashes-using-OpenSSL.patch -Patch2: 0003-Use-OpenSSL-for-computing-hashes-by-default.patch +Patch1: 0001-Backport-OpenSSL-for-hashes.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -298,6 +295,27 @@ Python 3 version. %endif %changelog +* Tue Jun 11 2019 Ales Matej - 0.7.7-1 +- Update to 0.7.7 +- selected bug fixes: + * fix updating of too many packages in focusbest mode + * fix handling of disabled installed packages in distupgrade + * fix repository priority handling for multiversion packages + * better support of inverval deps in pool_match_dep() + * support src rpms that have non-empty provides + * fix favorq leaking between solver runs if the solver is reused + * fix SOLVER_FLAG_FOCUS_BEST updateing packages without reason + * be more correct with multiversion packages that obsolete their + own name + * allow building with swig-4.0.0 + * lock jobs now take precedence over dup and forcebest jobs +- new features + * new POOL_FLAG_WHATPROVIDESWITHDISABLED pool flag + * bindings: add get_disabled_list() and set_disabled_list() + * bindings: add whatcontainsdep() + * bindings: make the selection filters return the self object + * MSVC compilation support + * Tue Jun 11 2019 Pavla Kratochvilova - 0.7.4-3 - Backport patches: Use OpenSSL for computing hashes (RhBug:1630300)