Update to 0.7.24, Backport patch

Resolves: rhbz#2174869
Resolves: rhbz#2184658
Resolves: rhbz#2185061
This commit is contained in:
Jaroslav Rohel 2023-05-16 13:18:04 +02:00
parent 5a7818da4c
commit 75542bc460
5 changed files with 92 additions and 28 deletions

1
.gitignore vendored
View File

@ -60,3 +60,4 @@
/libsolv-0.7.19.tar.gz
/libsolv-0.7.20.tar.gz
/libsolv-0.7.22.tar.gz
/libsolv-0.7.24.tar.gz

View File

@ -1,22 +1,20 @@
From 11eab76046e2df31248d358ab85bdbcf366d2c78 Mon Sep 17 00:00:00 2001
From: Nicola Sella <nsella@redhat.com>
Date: Wed, 11 Nov 2020 14:52:14 +0100
Subject: [PATCH 1/1] Add support for computing hashes using OpenSSL
From 49859c1ad32487de6adb65eedf4b81f021e1b0e8 Mon Sep 17 00:00:00 2001
From: Jaroslav Rohel <jrohel@redhat.com>
Date: Fri, 25 Oct 2019 14:33:22 +0200
Subject: [PATCH] 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).
Rebase of https://github.com/openSUSE/libsolv/commit/9839a88e4fda23b46015170b201c98da7bcdd55e
---
CMakeLists.txt | 13 +++++++++++--
src/CMakeLists.txt | 16 +++++++++++-----
src/CMakeLists.txt | 13 ++++++++++---
src/chksum.c | 32 ++++++++++++++++++++++++++++++++
tools/CMakeLists.txt | 2 +-
4 files changed, 55 insertions(+), 8 deletions(-)
4 files changed, 54 insertions(+), 6 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3541f496..e73dc552 100644
index f899c49..23615bd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,6 +40,7 @@ OPTION (ENABLE_ZCHUNK_COMPRESSION "Build with zchunk compression support?" OFF)
@ -61,22 +59,23 @@ index 3541f496..e73dc552 100644
SET (SYSTEM_LIBRARIES ${RPMDB_LIBRARY} ${SYSTEM_LIBRARIES})
ENDIF (ENABLE_RPMDB)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index bbf30bac..ece870ee 100644
index ca04b39..a0ce267 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -18,9 +18,8 @@ SET (libsolv_SRCS
@@ -18,9 +18,9 @@ SET (libsolv_SRCS
solver.c solverdebug.c repo_solv.c repo_write.c evr.c pool.c
queue.c repo.c repodata.c repopage.c util.c policy.c solvable.c
transaction.c order.c rules.c problems.c linkedpkg.c cplxdeps.c
- chksum.c md5.c sha1.c sha2.c solvversion.c selection.c
- fileprovides.c diskusage.c suse.c solver_util.c cleandeps.c
- userinstalled.c filelistfilter.c)
- userinstalled.c filelistfilter.c decision.c)
+ chksum.c solvversion.c selection.c fileprovides.c diskusage.c
+ suse.c solver_util.c cleandeps.c userinstalled.c filelistfilter.c)
+ suse.c solver_util.c cleandeps.c userinstalled.c
+ filelistfilter.c decision.c)
SET (libsolv_HEADERS
bitmap.h evr.h hash.h policy.h poolarch.h poolvendor.h pool.h
@@ -43,14 +42,21 @@ IF (WIN32)
@@ -43,14 +43,21 @@ IF (WIN32)
LIST (APPEND libsolv_SRCS ${WIN32_COMPAT_SOURCES})
ENDIF (WIN32)
@ -89,19 +88,17 @@ index bbf30bac..ece870ee 100644
ENDIF (HAVE_LINKER_VERSION_SCRIPT)
IF (DISABLE_SHARED)
- ADD_LIBRARY (libsolv STATIC ${libsolv_SRCS})
+ ADD_LIBRARY (libsolv STATIC ${libsolv_SRCS})
ADD_LIBRARY (libsolv STATIC ${libsolv_SRCS})
ELSE (DISABLE_SHARED)
- ADD_LIBRARY (libsolv SHARED ${libsolv_SRCS})
+ ADD_LIBRARY (libsolv SHARED ${libsolv_SRCS})
+ IF (WITH_OPENSSL)
+ TARGET_LINK_LIBRARIES (libsolv ${OPENSSL_CRYPTO_LIBRARY})
+ ENDIF (WITH_OPENSSL)
ADD_LIBRARY (libsolv SHARED ${libsolv_SRCS})
+ IF (WITH_OPENSSL)
+ TARGET_LINK_LIBRARIES (libsolv ${OPENSSL_CRYPTO_LIBRARY})
+ ENDIF (WITH_OPENSSL)
ENDIF (DISABLE_SHARED)
IF (WIN32)
diff --git a/src/chksum.c b/src/chksum.c
index 1f8ab471..9189b744 100644
index 1f8ab47..9189b74 100644
--- a/src/chksum.c
+++ b/src/chksum.c
@@ -15,10 +15,42 @@
@ -148,7 +145,7 @@ index 1f8ab471..9189b744 100644
#include "strfncs.h"
#endif
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index f19030eb..d477e195 100644
index f19030e..d477e19 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -116,7 +116,7 @@ SET(tools_list ${tools_list} repo2solv)
@ -160,6 +157,6 @@ index f19030eb..d477e195 100644
ADD_EXECUTABLE (mergesolv mergesolv.c )
TARGET_LINK_LIBRARIES (mergesolv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})
--
2.26.2
--
libgit2 1.3.2

View File

@ -0,0 +1,60 @@
From 9a3f2a2e161c7bcd2da94f6878b2b1470afc09b2 Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
Date: Tue, 18 Apr 2023 11:57:50 +0200
Subject: [PATCH] Treat condition both as positive and negative literal in
pool_add_pos_literals_complex_dep
That's because (A IF B ELSE C) gets rewritten to (A OR ~B) AND (C OR B) and
(A UNLESS B ELSE C) gets rewritten to (A AND ~B) OR (C AND B). In both
cases we have A, B, ~B, C.
This resolves issue #527
---
src/cplxdeps.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/cplxdeps.c b/src/cplxdeps.c
index 6c40752e..26e754d9 100644
--- a/src/cplxdeps.c
+++ b/src/cplxdeps.c
@@ -405,6 +405,7 @@ pool_add_pos_literals_complex_dep(Pool *pool, Id dep, Queue *q, Map *m, int neg)
Reldep *rd2 = GETRELDEP(pool, rd->evr);
if (rd2->flags == REL_ELSE)
{
+ pool_add_pos_literals_complex_dep(pool, rd2->name, q, m, !neg);
pool_add_pos_literals_complex_dep(pool, rd2->evr, q, m, !neg);
dep = rd2->name;
}
--
2.40.1
From 2c55198fb476e616ac29a45befe2746be09b7547 Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
Date: Tue, 18 Apr 2023 12:36:40 +0200
Subject: [PATCH] Add testcase for last commit
---
test/testcases/cplxdeps/ifelse_rec.t | 10 ++++++++++
1 file changed, 10 insertions(+)
create mode 100644 test/testcases/cplxdeps/ifelse_rec.t
diff --git a/test/testcases/cplxdeps/ifelse_rec.t b/test/testcases/cplxdeps/ifelse_rec.t
new file mode 100644
index 00000000..ea467027
--- /dev/null
+++ b/test/testcases/cplxdeps/ifelse_rec.t
@@ -0,0 +1,10 @@
+repo appstream 0 testtags <inline>
+#>=Pkg: xorg-x11-server-Xorg 1.20.11 18.el9 noarch
+#>=Req: missing-req
+#>=Pkg: pass 1.7.4 6.el9 noarch
+#>=Rec: xclip <IF> (xorg-x11-server-Xorg <ELSE> wl-clipboard)
+repo @System 0 empty
+system unset * @System
+job install pkg pass-1.7.4-6.el9.noarch@appstream
+result transaction,problems <inline>
+#>install pass-1.7.4-6.el9.noarch@appstream
--
2.40.1

View File

@ -22,8 +22,8 @@
%define __cmake_switch(b:) %[%{expand:%%{?with_%{-b*}}} ? "ON" : "OFF"]
Name: lib%{libname}
Version: 0.7.22
Release: 4%{?dist}
Version: 0.7.24
Release: 1%{?dist}
Summary: Package dependency solver
License: BSD
@ -34,6 +34,7 @@ Patch1: 0001-Add-support-for-computing-hashes-using-OpenSSL.patch
Patch2: 0002-Revert-Improve-choice-rule-generation.patch
Patch3: 0003-Revert-Add-complex_deps-requirement-to-choice1b-test.patch
Patch4: 0004-Revert-Add-more-choicerules-tests.patch
Patch5: 0005-Treat-condition-both-as-positive-and-negative-litera.patch
BuildRequires: cmake
BuildRequires: gcc-c++
@ -260,6 +261,11 @@ export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
%endif
%changelog
* Tue May 16 2023 Jaroslav Rohel <jrohel@redhat.com> - 0.7.24-1
- Update to 0.7.24
- Backport Treat condition both as positive and negative literal in pool_add_pos_literals_complex_dep
(RhBug:2185061,2190136)
* Thu Dec 15 2022 Nicola Sella <nsella@redhat.com> - 0.7.22-4
- Delete patch "Move OpenSSL functions" to fix ABI change

View File

@ -1 +1 @@
SHA512 (libsolv-0.7.22.tar.gz) = be375e9cd60728683d08587abd5405eb9b8522dff092c76eabec8d5f1608225335639b2b247429619df1b5c493d1edbd5ad4f14755cb6e2eb120f0ba162e3bb5
SHA512 (libsolv-0.7.24.tar.gz) = a0975d3f80ae8c364d5b32df4c26bc7eb5abb3be81259595848f1f5f74b00e708af3153074041d49383547718e68cee2e82cf4bdeab6221dfdcc605812689d37