import libsolv-0.7.7-1.el8

This commit is contained in:
CentOS Sources 2020-04-28 05:34:42 -04:00 committed by Andrew Lukoshko
parent 8f4422ccd0
commit d9468d51fb
6 changed files with 80 additions and 121 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/libsolv-0.7.4.tar.gz SOURCES/libsolv-0.7.7.tar.gz

View File

@ -1 +1 @@
c7f87563faf2566d40c643a49d115aa4a6f01ac2 SOURCES/libsolv-0.7.4.tar.gz be93515a4fca86e76c1dfd2f2cb99950de0f42a4 SOURCES/libsolv-0.7.7.tar.gz

View File

@ -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 <jrohel@redhat.com> From: Jaroslav Rohel <jrohel@redhat.com>
Date: Thu, 28 Mar 2019 12:56:08 +0100 Date: Fri, 25 Oct 2019 14:33:22 +0200
Subject: [PATCH] Add support for computing hashes using OpenSSL 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 ++++++++++- CMakeLists.txt | 11 ++++++++++-
src/CMakeLists.txt | 15 ++++++++++----- src/CMakeLists.txt | 16 +++++++++++-----
src/chksum.c | 32 ++++++++++++++++++++++++++++++++ src/chksum.c | 32 ++++++++++++++++++++++++++++++++
tools/CMakeLists.txt | 2 +- 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 diff --git a/CMakeLists.txt b/CMakeLists.txt
index ab385f1..b2a0b72 100644 index b39fd991..33ce8047 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -38,6 +38,7 @@ OPTION (ENABLE_ZSTD_COMPRESSION "Build with zstd compression support?" OFF) @@ -39,6 +39,7 @@ OPTION (ENABLE_ZCHUNK_COMPRESSION "Build with zchunk compression support?" OFF)
OPTION (ENABLE_ZCHUNK_COMPRESSION "Build with zchunk compression support?" OFF)
OPTION (WITH_SYSTEM_ZCHUNK "Use system zchunk library?" OFF) OPTION (WITH_SYSTEM_ZCHUNK "Use system zchunk library?" OFF)
OPTION (WITH_LIBXML2 "Build with libxml2 instead of libexpat?" 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?" OFF)
# Library include (GNUInstallDirs)
IF (DEFINED LIB) message (STATUS "Libraries will be installed in ${CMAKE_INSTALL_FULL_LIBDIR}")
@@ -177,6 +178,11 @@ INCLUDE_DIRECTORIES (${EXPAT_INCLUDE_DIRS}) @@ -160,6 +161,11 @@ INCLUDE_DIRECTORIES (${EXPAT_INCLUDE_DIRS})
ENDIF (WITH_LIBXML2 ) ENDIF (WITH_LIBXML2 )
ENDIF (ENABLE_RPMMD OR ENABLE_SUSEREPO OR ENABLE_APPDATA OR ENABLE_COMPS OR ENABLE_HELIXREPO OR ENABLE_MDKREPO) 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) IF (ENABLE_ZLIB_COMPRESSION)
FIND_PACKAGE (ZLIB REQUIRED) FIND_PACKAGE (ZLIB REQUIRED)
INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS}) 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... # should create config.h with #cmakedefine instead...
FOREACH (VAR HAVE_STRCHRNUL HAVE_FOPENCOOKIE HAVE_FUNOPEN WORDS_BIGENDIAN 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 WITHOUT_COOKIEOPEN)
+ HAVE_RPM_DB_H HAVE_PGPDIGGETPARAMS WITH_LIBXML2 WITH_OPENSSL) + HAVE_RPM_DB_H HAVE_PGPDIGGETPARAMS WITH_LIBXML2 WITHOUT_COOKIEOPEN WITH_OPENSSL)
IF(${VAR}) IF(${VAR})
ADD_DEFINITIONS (-D${VAR}=1) ADD_DEFINITIONS (-D${VAR}=1)
SET (SWIG_FLAGS ${SWIG_FLAGS} -D${VAR}) 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) IF (WITH_SYSTEM_ZCHUNK)
SET (SYSTEM_LIBRARIES ${SYSTEM_LIBRARIES} ${ZCHUNK_LIBRARIES}) SET (SYSTEM_LIBRARIES ${SYSTEM_LIBRARIES} ${ZCHUNK_LIBRARIES})
ENDIF (WITH_SYSTEM_ZCHUNK) ENDIF (WITH_SYSTEM_ZCHUNK)
@ -54,7 +57,7 @@ index ab385f1..b2a0b72 100644
SET (SYSTEM_LIBRARIES ${RPMDB_LIBRARY} ${SYSTEM_LIBRARIES}) SET (SYSTEM_LIBRARIES ${RPMDB_LIBRARY} ${SYSTEM_LIBRARIES})
ENDIF (ENABLE_RPMDB) ENDIF (ENABLE_RPMDB)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index be487a7..fc3092a 100644 index 6abb3adb..d356c7d6 100644
--- a/src/CMakeLists.txt --- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt +++ b/src/CMakeLists.txt
@@ -18,9 +18,8 @@ SET (libsolv_SRCS @@ -18,9 +18,8 @@ SET (libsolv_SRCS
@ -69,15 +72,14 @@ index be487a7..fc3092a 100644
SET (libsolv_HEADERS SET (libsolv_HEADERS
bitmap.h evr.h hash.h policy.h poolarch.h poolvendor.h pool.h bitmap.h evr.h hash.h policy.h poolarch.h poolvendor.h pool.h
@@ -33,16 +32,22 @@ IF (ENABLE_CONDA) @@ -43,14 +42,21 @@ IF (WIN32)
SET (libsolv_SRCS ${libsolv_SRCS} conda.c) LIST (APPEND libsolv_SRCS ${WIN32_COMPAT_SOURCES})
ENDIF (ENABLE_CONDA) ENDIF (WIN32)
+IF (NOT WITH_OPENSSL) +IF (NOT WITH_OPENSSL)
+ SET (libsolv_SRCS ${libsolv_SRCS} md5.c sha1.c sha2.c) + SET (libsolv_SRCS ${libsolv_SRCS} md5.c sha1.c sha2.c)
+ENDIF (NOT WITH_OPENSSL) +ENDIF (NOT WITH_OPENSSL)
+
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
IF (HAVE_LINKER_VERSION_SCRIPT) 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") 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) ENDIF (HAVE_LINKER_VERSION_SCRIPT)
@ -95,7 +97,7 @@ index be487a7..fc3092a 100644
SET_TARGET_PROPERTIES(libsolv PROPERTIES OUTPUT_NAME "solv") SET_TARGET_PROPERTIES(libsolv PROPERTIES OUTPUT_NAME "solv")
diff --git a/src/chksum.c b/src/chksum.c diff --git a/src/chksum.c b/src/chksum.c
index df46145..d7b39e8 100644 index 1f8ab471..9189b744 100644
--- a/src/chksum.c --- a/src/chksum.c
+++ b/src/chksum.c +++ b/src/chksum.c
@@ -15,10 +15,42 @@ @@ -15,10 +15,42 @@
@ -138,15 +140,15 @@ index df46145..d7b39e8 100644
+#endif +#endif
+ +
struct s_Chksum { #ifdef _WIN32
Id type; #include "strfncs.h"
int done; #endif
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 802dc50..b1f6c7a 100644 index f19030eb..d477e195 100644
--- a/tools/CMakeLists.txt --- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt
@@ -99,7 +99,7 @@ SET (tools_list ${tools_list} appdata2solv) @@ -116,7 +116,7 @@ SET(tools_list ${tools_list} repo2solv)
ENDIF (ENABLE_APPDATA) ENDIF (NOT WIN32)
ADD_EXECUTABLE (dumpsolv dumpsolv.c ) ADD_EXECUTABLE (dumpsolv dumpsolv.c )
-TARGET_LINK_LIBRARIES (dumpsolv libsolv) -TARGET_LINK_LIBRARIES (dumpsolv libsolv)
@ -154,6 +156,28 @@ index 802dc50..b1f6c7a 100644
ADD_EXECUTABLE (mergesolv mergesolv.c ) ADD_EXECUTABLE (mergesolv mergesolv.c )
TARGET_LINK_LIBRARIES (mergesolv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES}) 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 <jrohel@redhat.com>
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}")

View File

@ -1,58 +0,0 @@
From 5ab0d7ab942d97cb6992c8b73b29b2a896e9fe7a Mon Sep 17 00:00:00 2001
From: Jaroslav Mracek <jmracek@redhat.com>
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

View File

@ -1,25 +0,0 @@
From 1b8844c26318b91021606e729a604eb47cb37098 Mon Sep 17 00:00:00 2001
From: Jaroslav Rohel <jrohel@redhat.com>
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

View File

@ -41,8 +41,8 @@
#global shortcommit %(c=%{commit}; echo ${c:0:7}) #global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: lib%{libname} Name: lib%{libname}
Version: 0.7.4 Version: 0.7.7
Release: 3%{?commit:.git.%{commitnum}.%{?shortcommit}}%{?dist} Release: 1%{?commit:.git.%{commitnum}.%{?shortcommit}}%{?dist}
Summary: Package dependency solver Summary: Package dependency solver
License: BSD License: BSD
@ -52,11 +52,8 @@ Source: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
%else %else
Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
%endif %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 # https://bugzilla.redhat.com/show_bug.cgi?id=1630300
Patch1: 0002-Add-support-for-computing-hashes-using-OpenSSL.patch Patch1: 0001-Backport-OpenSSL-for-hashes.patch
Patch2: 0003-Use-OpenSSL-for-computing-hashes-by-default.patch
BuildRequires: cmake BuildRequires: cmake
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -298,6 +295,27 @@ Python 3 version.
%endif %endif
%changelog %changelog
* Tue Jun 11 2019 Ales Matej <amatej@redhat.org> - 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 <pkratoch@redhat.org> - 0.7.4-3 * Tue Jun 11 2019 Pavla Kratochvilova <pkratoch@redhat.org> - 0.7.4-3
- Backport patches: Use OpenSSL for computing hashes (RhBug:1630300) - Backport patches: Use OpenSSL for computing hashes (RhBug:1630300)