!42 update libsolv to 0.7.22

From: @han_hui_hui 
Reviewed-by: @anonymous_z 
Signed-off-by: @anonymous_z
This commit is contained in:
openeuler-ci-bot 2022-11-09 09:44:50 +00:00 committed by Gitee
commit 1f43668bc4
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 10 additions and 66 deletions

Binary file not shown.

BIN
0.7.22.tar.gz Normal file

Binary file not shown.

View File

@ -1,30 +0,0 @@
From 2b5e6c28be7dffe1a3b5e90a35c5ee425c08aeb0 Mon Sep 17 00:00:00 2001
From: niner <nine@detonation.org>
Date: Tue, 8 Feb 2022 18:10:54 +0100
Subject: [PATCH] Fix segfault on conflict resolution when using bindings
Solutionelement objects were created with a wrong solutionid (i.e. the
solution element id was used for the solutionid field). This led to invalid
array indexes when trying to read the extraflags which then escalated
into a segfault. Fix by setting solutionid correctly in the Solutionelement
constructor.
---
bindings/solv.i | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bindings/solv.i b/bindings/solv.i
index 3a6bac46..1d35bf61 100644
--- a/bindings/solv.i
+++ b/bindings/solv.i
@@ -3411,7 +3411,7 @@ returnself(matchsolvable)
e = solv_calloc(1, sizeof(*e));
e->solv = solv;
e->problemid = problemid;
- e->solutionid = id;
+ e->solutionid = solutionid;
e->id = id;
e->type = type;
e->p = p;
--
2.27.0

View File

@ -1,30 +0,0 @@
From dd6e977782816e330a8f60cf78ca3d12fead3b10 Mon Sep 17 00:00:00 2001
From: Jon Turney <jon.turney@dronecode.org.uk>
Date: Sun, 14 Aug 2022 18:45:20 +0100
Subject: [PATCH] Ensure duplinvolvedmap_all is reset when a solver is reused
Otherwise, if solver is used with a SOLVER_DISTUPGRADE job, then reused
without one, this will cause solver_addduprules() to be called, even
though needduprules is 0, which will crash trying to dereference
solv->dupmap, which is NULL because solver_createdupmaps() hasn't been
called.
Conflict:NA
Reference:https://github.com/openSUSE/libsolv/commit/dd6e977782816e330a8f60cf78ca3d12fead3b10
---
src/solver.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/solver.c b/src/solver.c
index 28341d6d3..e3779e232 100644
--- a/src/solver.c
+++ b/src/solver.c
@@ -3533,6 +3533,7 @@ solver_solve(Solver *solv, Queue *job)
map_zerosize(&solv->bestupdatemap);
solv->fixmap_all = 0;
map_zerosize(&solv->fixmap);
+ solv->dupinvolvedmap_all = 0;
map_zerosize(&solv->dupmap);
map_zerosize(&solv->dupinvolvedmap);
solv->process_orphans = 0;

View File

@ -14,16 +14,14 @@
%bcond_without conda
Name: libsolv
Version: 0.7.20
Release: 3
Version: 0.7.22
Release: 1
Summary: Package dependency solver
License: BSD
URL: https://github.com/openSUSE/libsolv
Source: https://github.com/openSUSE/libsolv/archive/refs/tags/%{version}.tar.gz
Patch0: Fix-segfault-on-conflict-resolution-when-using-bindi.patch
Patch1: Fix-memory-leak-when-using-testsolv-to-execute-cases.patch
Patch2: ensure-duplinvolvedmap_all-is-reset.patch
Patch0: Fix-memory-leak-when-using-testsolv-to-execute-cases.patch
BuildRequires: cmake gcc-c++ ninja-build pkgconfig(rpm) zlib-devel
BuildRequires: libxml2-devel xz-devel bzip2-devel
@ -56,7 +54,7 @@ Development files for %{name}.
%package tools
Summary: Package dependency solver tools
Requires: %{name} = %{version}-%{release}
Requires: %{_bindir}/find
Requires: /usr/bin/find
%description tools
Package dependency solver tools.
@ -217,6 +215,12 @@ Python 3 version.
%{_mandir}/man3/%{name}*.3*
%changelog
* Tue Nov 8 2022 hanhuihui<hanhuihui5@huawei.com> - 0.7.22-1
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:update libsolv to 0.7.22-1
* Fri Oct 21 2022 hanhuihui<hanhuihui5@huawei.com> - 0.7.20-3
- Type:bugfix
- ID:NA