Compare commits

...

10 Commits

Author SHA1 Message Date
eabdullin
a03f845f27 import UBI libsolv-0.7.20-6.el8 2023-11-14 20:09:32 +00:00
CentOS Sources
beb7eadb6e import libsolv-0.7.20-4.el8_7 2022-12-14 14:08:03 +00:00
CentOS Sources
3928071d27 import libsolv-0.7.20-3.el8 2022-11-08 13:31:02 +00:00
CentOS Sources
634fee06d0 import libsolv-0.7.20-1.el8 2022-05-10 10:48:57 +00:00
CentOS Sources
11d0d27c78 import libsolv-0.7.19-1.el8 2021-11-09 09:55:59 +00:00
CentOS Sources
6bf946f715 import libsolv-0.7.16-3.el8_4 2021-11-02 16:59:20 +00:00
CentOS Sources
4d010af58a import libsolv-0.7.16-2.el8 2021-09-09 20:59:45 +00:00
CentOS Sources
61e436b751 import libsolv-0.7.11-1.el8 2021-09-09 20:59:42 +00:00
CentOS Sources
d9468d51fb import libsolv-0.7.7-1.el8 2021-09-09 20:59:40 +00:00
CentOS Sources
8f4422ccd0 import libsolv-0.7.4-3.el8 2021-09-09 20:59:37 +00:00
14 changed files with 965 additions and 775 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/libsolv-0.6.35.tar.gz
SOURCES/libsolv-0.7.20.tar.gz

View File

@ -1 +1 @@
4f53d60467ddab4099cfe5eb91a3fe7260666209 SOURCES/libsolv-0.6.35.tar.gz
35be0bb4422af55bc8434f3c33367dbb7dc50cba SOURCES/libsolv-0.7.20.tar.gz

View File

@ -0,0 +1,160 @@
From c56a7db62db6d62b53830f8f1af4d5a70e86d69f Mon Sep 17 00:00:00 2001
From: Jaroslav Rohel <jrohel@redhat.com>
Date: Fri, 25 Oct 2019 14:33:22 +0200
Subject: [PATCH 1/3] 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 | 13 +++++++++++--
src/CMakeLists.txt | 12 +++++++++---
src/chksum.c | 32 ++++++++++++++++++++++++++++++++
tools/CMakeLists.txt | 2 +-
4 files changed, 53 insertions(+), 6 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3541f496..e73dc552 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,6 +40,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)
include (GNUInstallDirs)
message (STATUS "Libraries will be installed in ${CMAKE_INSTALL_FULL_LIBDIR}")
@@ -164,6 +165,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)
+IF (WITH_OPENSSL)
+FIND_PACKAGE (OpenSSL REQUIRED)
+INCLUDE_DIRECTORIES (${OPENSSL_INCLUDE_DIR})
+ENDIF(WITH_OPENSSL)
+
IF (ENABLE_ZLIB_COMPRESSION)
FIND_PACKAGE (ZLIB REQUIRED)
INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS})
@@ -288,8 +294,8 @@ 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_RPMDBNEXTITERATORHEADERBLOB HAVE_RPMDBFSTAT
- WITH_LIBXML2 WITHOUT_COOKIEOPEN)
+ HAVE_RPM_DB_H HAVE_PGPDIGGETPARAMS HAVE_RPMDBNEXTITERATORHEADERBLOB HAVE_RPMDBFSTAT
+ WITH_LIBXML2 WITHOUT_COOKIEOPEN WITH_OPENSSL)
IF(${VAR})
ADD_DEFINITIONS (-D${VAR}=1)
SET (SWIG_FLAGS ${SWIG_FLAGS} -D${VAR})
@@ -426,6 +432,9 @@ ENDIF (ENABLE_ZSTD_COMPRESSION)
IF (WITH_SYSTEM_ZCHUNK)
SET (SYSTEM_LIBRARIES ${SYSTEM_LIBRARIES} ${ZCHUNK_LIBRARIES})
ENDIF (WITH_SYSTEM_ZCHUNK)
+IF (WITH_OPENSSL)
+SET (SYSTEM_LIBRARIES ${SYSTEM_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARY})
+ENDIF (WITH_OPENSSL)
IF (ENABLE_RPMDB)
SET (SYSTEM_LIBRARIES ${RPMDB_LIBRARY} ${SYSTEM_LIBRARIES})
ENDIF (ENABLE_RPMDB)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index bbf30bac..6b5ea42b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -18,9 +18,8 @@ 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)
+ chksum.c solvversion.c selection.c fileprovides.c diskusage.c
+ suse.c solver_util.c cleandeps.c userinstalled.c filelistfilter.c)
SET (libsolv_HEADERS
bitmap.h evr.h hash.h policy.h poolarch.h poolvendor.h pool.h
@@ -43,6 +42,10 @@ 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)
+
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)
@@ -51,6 +54,9 @@ IF (DISABLE_SHARED)
ADD_LIBRARY (libsolv STATIC ${libsolv_SRCS})
ELSE (DISABLE_SHARED)
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
--- a/src/chksum.c
+++ b/src/chksum.c
@@ -15,10 +15,42 @@
#include "util.h"
#include "chksum.h"
+#ifdef WITH_OPENSSL
+
+#include <openssl/md5.h>
+#include <openssl/sha.h>
+
+typedef SHA_CTX SHA1_CTX;
+typedef SHA256_CTX SHA224_CTX;
+typedef SHA512_CTX SHA384_CTX;
+
+#define solv_MD5_Init(ctx) MD5_Init(ctx)
+#define solv_MD5_Update(ctx, data, len) MD5_Update(ctx, data, len)
+#define solv_MD5_Final(md, ctx) MD5_Final(md, ctx)
+#define solv_SHA1_Init(ctx) SHA1_Init(ctx)
+#define solv_SHA1_Update(ctx, data, len) SHA1_Update(ctx, data, len)
+#define solv_SHA1_Final(ctx, md) SHA1_Final(md, ctx)
+#define solv_SHA224_Init(ctx) SHA224_Init(ctx)
+#define solv_SHA224_Update(ctx, data, len) SHA224_Update(ctx, data, len)
+#define solv_SHA224_Final(md, ctx) SHA224_Final(md, ctx)
+#define solv_SHA256_Init(ctx) SHA256_Init(ctx)
+#define solv_SHA256_Update(ctx, data, len) SHA256_Update(ctx, data, len)
+#define solv_SHA256_Final(md, ctx) SHA256_Final(md, ctx)
+#define solv_SHA384_Init(ctx) SHA384_Init(ctx)
+#define solv_SHA384_Update(ctx, data, len) SHA384_Update(ctx, data, len)
+#define solv_SHA384_Final(md, ctx) SHA384_Final(md, ctx)
+#define solv_SHA512_Init(ctx) SHA512_Init(ctx)
+#define solv_SHA512_Update(ctx, data, len) SHA512_Update(ctx, data, len)
+#define solv_SHA512_Final(md, ctx) SHA512_Final(md, ctx)
+
+#else
+
#include "md5.h"
#include "sha1.h"
#include "sha2.h"
+#endif
+
#ifdef _WIN32
#include "strfncs.h"
#endif
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index f19030eb..d477e195 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -116,7 +116,7 @@ SET(tools_list ${tools_list} repo2solv)
ENDIF (NOT WIN32)
ADD_EXECUTABLE (dumpsolv dumpsolv.c )
-TARGET_LINK_LIBRARIES (dumpsolv libsolv)
+TARGET_LINK_LIBRARIES (dumpsolv libsolv ${SYSTEM_LIBRARIES})
ADD_EXECUTABLE (mergesolv mergesolv.c )
TARGET_LINK_LIBRARIES (mergesolv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})
--
2.31.1

View File

@ -1,61 +0,0 @@
From 0e29e1188c19609e117478a0df1cb995a2f9e745 Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
Date: Fri, 28 Sep 2018 14:48:14 +0200
Subject: [PATCH] Make sure that targeted updates don't do reinstalls
---
src/solver.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/solver.c b/src/solver.c
index 6405f4a..a4e0c4b 100644
--- a/src/solver.c
+++ b/src/solver.c
@@ -2957,7 +2957,9 @@ add_update_target(Solver *solv, Id p, Id how)
Pool *pool = solv->pool;
Solvable *s = pool->solvables + p;
Repo *installed = solv->installed;
- Id pi, pip;
+ Id pi, pip, identicalp;
+ int startcnt, endcnt;
+
if (!solv->update_targets)
{
solv->update_targets = solv_calloc(1, sizeof(Queue));
@@ -2968,6 +2970,8 @@ add_update_target(Solver *solv, Id p, Id how)
queue_push2(solv->update_targets, p, p);
return;
}
+ identicalp = 0;
+ startcnt = solv->update_targets->count;
FOR_PROVIDES(pi, pip, s->name)
{
Solvable *si = pool->solvables + pi;
@@ -2982,9 +2986,9 @@ add_update_target(Solver *solv, Id p, Id how)
if (how & SOLVER_CLEANDEPS)
add_cleandeps_updatepkg(solv, pi);
queue_push2(solv->update_targets, pi, p);
- /* check if it's ok to keep the installed package */
+ /* remember an installed package that is identical to p */
if (s->evr == si->evr && solvable_identical(s, si))
- queue_push2(solv->update_targets, pi, pi);
+ identicalp = pi;
}
if (s->obsoletes)
{
@@ -3014,6 +3018,12 @@ add_update_target(Solver *solv, Id p, Id how)
}
}
}
+ /* also allow upgrading to an identical installed package */
+ if (identicalp)
+ {
+ for (endcnt = solv->update_targets->count; startcnt < endcnt; startcnt += 2)
+ queue_push2(solv->update_targets, solv->update_targets->elements[startcnt], identicalp);
+ }
}
static int
--
libgit2 0.26.6

View File

@ -0,0 +1,311 @@
From 9b89a186e3769631b6cee859be9d69063cfdfb94 Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
Date: Fri, 25 Feb 2022 16:47:21 +0100
Subject: [PATCH 2/3] Add support for storing user data in a solv file
Userdata can be arbritrary (binary)data with a maximum size of
65535 bytes. It can be read without reading the complete
solv file, but do not forget to rewind the fp after reading
the user data.
New functions:
void
void repowriter_set_userdata(Repowriter *writer, const void *data, int len)
int solv_read_userdata(FILE *fp, unsigned char **datap, int *lenp)
---
src/libsolv.ver | 2 ++
src/pooltypes.h | 6 ++++--
src/repo_solv.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++
src/repo_solv.h | 1 +
src/repo_write.c | 24 ++++++++++++++++++++-
src/repo_write.h | 3 +++
tools/dumpsolv.c | 50 ++++++++++++++++++++++++++++++++++++++++----
7 files changed, 133 insertions(+), 7 deletions(-)
diff --git a/src/libsolv.ver b/src/libsolv.ver
index ee40d0ad..4c6fbf4f 100644
--- a/src/libsolv.ver
+++ b/src/libsolv.ver
@@ -255,6 +255,7 @@ SOLV_1.0 {
repowriter_set_keyqueue;
repowriter_set_repodatarange;
repowriter_set_solvablerange;
+ repowriter_set_userdata;
repowriter_write;
selection_add;
selection_filter;
@@ -288,6 +289,7 @@ SOLV_1.0 {
solv_malloc;
solv_malloc2;
solv_oom;
+ solv_read_userdata;
solv_realloc;
solv_realloc2;
solv_replacebadutf8;
diff --git a/src/pooltypes.h b/src/pooltypes.h
index e1f77b0e..3bde155a 100644
--- a/src/pooltypes.h
+++ b/src/pooltypes.h
@@ -23,9 +23,11 @@
#define SOLV_VERSION_6 6
#define SOLV_VERSION_7 7
#define SOLV_VERSION_8 8
+#define SOLV_VERSION_9 9
-#define SOLV_FLAG_PREFIX_POOL 4
-#define SOLV_FLAG_SIZE_BYTES 8
+#define SOLV_FLAG_PREFIX_POOL 4
+#define SOLV_FLAG_SIZE_BYTES 8
+#define SOLV_FLAG_USERDATA 16
struct s_Stringpool;
typedef struct s_Stringpool Stringpool;
diff --git a/src/repo_solv.c b/src/repo_solv.c
index 761d06e6..2ba602b2 100644
--- a/src/repo_solv.c
+++ b/src/repo_solv.c
@@ -514,6 +514,7 @@ repo_add_solv(Repo *repo, FILE *fp, int flags)
switch (solvversion)
{
case SOLV_VERSION_8:
+ case SOLV_VERSION_9:
break;
default:
return pool_error(pool, SOLV_ERROR_UNSUPPORTED, "unsupported SOLV version");
@@ -552,6 +553,18 @@ repo_add_solv(Repo *repo, FILE *fp, int flags)
return pool_error(pool, SOLV_ERROR_CORRUPT, "main repository contains holes, cannot extend");
}
+ /******* Part 0: skip optional userdata ******************************/
+
+ if (solvflags & SOLV_FLAG_USERDATA)
+ {
+ unsigned int userdatalen = read_u32(&data);
+ if (userdatalen >= 65536)
+ return pool_error(pool, SOLV_ERROR_CORRUPT, "illegal userdata length");
+ while (userdatalen--)
+ if (getc(data.fp) == EOF)
+ return pool_error(pool, SOLV_ERROR_EOF, "unexpected EOF");
+ }
+
/******* Part 1: string IDs *****************************************/
sizeid = read_u32(&data); /* size of string space */
@@ -1353,3 +1366,44 @@ printf("=> %s %s %p\n", pool_id2str(pool, keys[key].name), pool_id2str(pool, key
return 0;
}
+int
+solv_read_userdata(FILE *fp, unsigned char **datap, int *lenp)
+{
+ unsigned char d[4 * 10], *ud = 0;
+ unsigned int n;
+ if (fread(d, sizeof(d), 1, fp) != 1)
+ return SOLV_ERROR_EOF;
+ n = d[0] << 24 | d[1] << 16 | d[2] << 8 | d[3];
+ if (n != ('S' << 24 | 'O' << 16 | 'L' << 8 | 'V'))
+ return SOLV_ERROR_NOT_SOLV;
+ n = d[4] << 24 | d[5] << 16 | d[6] << 8 | d[7];
+ switch(n)
+ {
+ case SOLV_VERSION_8:
+ case SOLV_VERSION_9:
+ break;
+ default:
+ return SOLV_ERROR_UNSUPPORTED;
+ }
+ n = d[32] << 24 | d[33] << 16 | d[34] << 8 | d[35];
+ if (!(n & SOLV_FLAG_USERDATA))
+ n = 0;
+ else
+ n = d[36] << 24 | d[37] << 16 | d[38] << 8 | d[39];
+ if (n >= 65536)
+ return SOLV_ERROR_CORRUPT;
+ if (n)
+ {
+ ud = solv_malloc(n + 1);
+ if (fread(ud, n, 1, fp) != 1)
+ {
+ solv_free(ud);
+ return SOLV_ERROR_EOF;
+ }
+ ud[n] = 0;
+ }
+ *datap = ud;
+ if (lenp)
+ *lenp = (int)n;
+ return 0;
+}
diff --git a/src/repo_solv.h b/src/repo_solv.h
index 0c663949..57bf1772 100644
--- a/src/repo_solv.h
+++ b/src/repo_solv.h
@@ -23,6 +23,7 @@ extern "C" {
#endif
extern int repo_add_solv(Repo *repo, FILE *fp, int flags);
+extern int solv_read_userdata(FILE *fp, unsigned char **datap, int *lenp);
#define SOLV_ADD_NO_STUBS (1 << 8)
diff --git a/src/repo_write.c b/src/repo_write.c
index af4e7599..a11de002 100644
--- a/src/repo_write.c
+++ b/src/repo_write.c
@@ -1071,6 +1071,7 @@ repowriter_create(Repo *repo)
Repowriter *
repowriter_free(Repowriter *writer)
{
+ solv_free(writer->userdata);
return solv_free(writer);
}
@@ -1107,6 +1108,17 @@ repowriter_set_solvablerange(Repowriter *writer, int solvablestart, int solvable
writer->solvableend = solvableend;
}
+void
+repowriter_set_userdata(Repowriter *writer, const void *data, int len)
+{
+ writer->userdata = solv_free(writer->userdata);
+ writer->userdatalen = 0;
+ if (len < 0 || len >= 65536)
+ return;
+ writer->userdata = len ? solv_memdup(data, len) : 0;
+ writer->userdatalen = len;
+}
+
/*
* the code works the following way:
*
@@ -1898,7 +1910,10 @@ for (i = 1; i < target.nkeys; i++)
/* write file header */
write_u32(&target, 'S' << 24 | 'O' << 16 | 'L' << 8 | 'V');
- write_u32(&target, SOLV_VERSION_8);
+ if (writer->userdatalen)
+ write_u32(&target, SOLV_VERSION_9);
+ else
+ write_u32(&target, SOLV_VERSION_8);
/* write counts */
@@ -1911,7 +1926,14 @@ for (i = 1; i < target.nkeys; i++)
solv_flags = 0;
solv_flags |= SOLV_FLAG_PREFIX_POOL;
solv_flags |= SOLV_FLAG_SIZE_BYTES;
+ if (writer->userdatalen)
+ solv_flags |= SOLV_FLAG_USERDATA;
write_u32(&target, solv_flags);
+ if (writer->userdatalen)
+ {
+ write_u32(&target, writer->userdatalen);
+ write_blob(&target, writer->userdata, writer->userdatalen);
+ }
if (nstrings)
{
diff --git a/src/repo_write.h b/src/repo_write.h
index 34716705..7734b013 100644
--- a/src/repo_write.h
+++ b/src/repo_write.h
@@ -32,6 +32,8 @@ typedef struct s_Repowriter {
int (*keyfilter)(Repo *repo, Repokey *key, void *kfdata);
void *kfdata;
Queue *keyq;
+ void *userdata;
+ int userdatalen;
} Repowriter;
/* repowriter flags */
@@ -46,6 +48,7 @@ void repowriter_set_keyfilter(Repowriter *writer, int (*keyfilter)(Repo *repo, R
void repowriter_set_keyqueue(Repowriter *writer, Queue *keyq);
void repowriter_set_repodatarange(Repowriter *writer, int repodatastart, int repodataend);
void repowriter_set_solvablerange(Repowriter *writer, int solvablestart, int solvableend);
+void repowriter_set_userdata(Repowriter *writer, const void *data, int len);
int repowriter_write(Repowriter *writer, FILE *fp);
/* convenience functions */
diff --git a/tools/dumpsolv.c b/tools/dumpsolv.c
index 13076574..49651fbe 100644
--- a/tools/dumpsolv.c
+++ b/tools/dumpsolv.c
@@ -13,6 +13,7 @@
static int with_attr;
static int dump_json;
+static int dump_userdata;
#include "pool.h"
#include "chksum.h"
@@ -394,10 +395,7 @@ int main(int argc, char **argv)
int c, i, j, n;
Solvable *s;
- pool = pool_create();
- pool_setloadcallback(pool, loadcallback, 0);
-
- while ((c = getopt(argc, argv, "haj")) >= 0)
+ while ((c = getopt(argc, argv, "uhaj")) >= 0)
{
switch(c)
{
@@ -410,11 +408,55 @@ int main(int argc, char **argv)
case 'j':
dump_json = 1;
break;
+ case 'u':
+ dump_userdata++;
+ break;
default:
usage(1);
break;
}
}
+ if (dump_userdata)
+ {
+ if (optind == argc)
+ argc++;
+ for (; optind < argc; optind++)
+ {
+ unsigned char *userdata = 0;
+ int r, userdatalen = 0;
+ if (argv[optind] && freopen(argv[optind], "r", stdin) == 0)
+ {
+ perror(argv[optind]);
+ exit(1);
+ }
+ r = solv_read_userdata(stdin, &userdata, &userdatalen);
+ if (r)
+ {
+ fprintf(stderr, "could not read userdata: error %d\n", r);
+ exit(1);
+ }
+ if (dump_userdata > 1)
+ {
+ /* dump raw */
+ if (userdatalen && fwrite(userdata, userdatalen, 1, stdout) != 1)
+ {
+ perror("fwrite");
+ exit(1);
+ }
+ }
+ else
+ {
+ for (r = 0; r < userdatalen; r++)
+ printf("%02x", userdata[r]);
+ printf("\n");
+ }
+ solv_free(userdata);
+ }
+ exit(0);
+ }
+
+ pool = pool_create();
+ pool_setloadcallback(pool, loadcallback, 0);
if (!dump_json)
pool_setdebuglevel(pool, 1);
if (dump_json)
--
2.31.1

View File

@ -1,412 +0,0 @@
From b581b8e135b3d381d6df7e392a3f31b88697ea26 Mon Sep 17 00:00:00 2001
From: Jaroslav Rohel <jrohel@redhat.com>
Date: Fri, 7 Dec 2018 07:05:10 +0100
Subject: [PATCH 1/7] Fix: Dereference of null pointer
---
ext/repo_repomdxml.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ext/repo_repomdxml.c b/ext/repo_repomdxml.c
index 760d481f..b2a5b8dd 100644
--- a/ext/repo_repomdxml.c
+++ b/ext/repo_repomdxml.c
@@ -181,7 +181,7 @@ startElement(struct solv_xmlparser *xmlp, int state, const char *name, const cha
while (value)
{
char *p = strchr(value, ',');
- if (*p)
+ if (p)
*p++ = 0;
if (*value)
repodata_add_poolstr_array(pd->data, SOLVID_META, REPOSITORY_UPDATES, value);
--
2.19.2
From 17ebf9e87309e8815df865fef8c6e44f185cb16b Mon Sep 17 00:00:00 2001
From: Jaroslav Rohel <jrohel@redhat.com>
Date: Tue, 11 Dec 2018 09:50:06 +0100
Subject: [PATCH 2/7] Fix: Add va_end() before return
The va_end() performs cleanup.
If va_end() is not called before a function that calls va_start() returns,
the behavior is undefined.
---
src/pool.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/pool.c b/src/pool.c
index 60cc0f49..f03b43f9 100644
--- a/src/pool.c
+++ b/src/pool.c
@@ -1505,6 +1505,7 @@ pool_debug(Pool *pool, int type, const char *format, ...)
vprintf(format, args);
else
vfprintf(stderr, format, args);
+ va_end(args);
return;
}
vsnprintf(buf, sizeof(buf), format, args);
--
2.19.2
From 24acb5dea18bef01fae13db414b2369dfae951b4 Mon Sep 17 00:00:00 2001
From: Jaroslav Rohel <jrohel@redhat.com>
Date: Tue, 11 Dec 2018 10:14:04 +0100
Subject: [PATCH 3/7] Fix: Memory leaks
---
ext/repo_rpmdb.c | 16 ++++++++++++++++
ext/testcase.c | 4 ++++
tools/repo2solv.c | 1 +
3 files changed, 21 insertions(+)
diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c
index 75bb6780..ff939978 100644
--- a/ext/repo_rpmdb.c
+++ b/ext/repo_rpmdb.c
@@ -1939,6 +1939,8 @@ repo_add_rpm(Repo *repo, const char *rpm, int flags)
if (fread(lead, 96 + 16, 1, fp) != 1 || getu32(lead) != 0xedabeedb)
{
pool_error(pool, -1, "%s: not a rpm", rpm);
+ solv_chksum_free(leadsigchksumh, NULL);
+ solv_chksum_free(chksumh, NULL);
fclose(fp);
return 0;
}
@@ -1951,12 +1953,16 @@ repo_add_rpm(Repo *repo, const char *rpm, int flags)
if (lead[78] != 0 || lead[79] != 5)
{
pool_error(pool, -1, "%s: not a rpm v5 header", rpm);
+ solv_chksum_free(leadsigchksumh, NULL);
+ solv_chksum_free(chksumh, NULL);
fclose(fp);
return 0;
}
if (getu32(lead + 96) != 0x8eade801)
{
pool_error(pool, -1, "%s: bad signature header", rpm);
+ solv_chksum_free(leadsigchksumh, NULL);
+ solv_chksum_free(chksumh, NULL);
fclose(fp);
return 0;
}
@@ -1965,6 +1971,8 @@ repo_add_rpm(Repo *repo, const char *rpm, int flags)
if (sigcnt >= MAX_SIG_CNT || sigdsize >= MAX_SIG_DSIZE)
{
pool_error(pool, -1, "%s: bad signature header", rpm);
+ solv_chksum_free(leadsigchksumh, NULL);
+ solv_chksum_free(chksumh, NULL);
fclose(fp);
return 0;
}
@@ -1975,6 +1983,8 @@ repo_add_rpm(Repo *repo, const char *rpm, int flags)
{
if (!headfromfp(&state, rpm, fp, lead + 96, sigcnt, sigdsize, sigpad, chksumh, leadsigchksumh))
{
+ solv_chksum_free(leadsigchksumh, NULL);
+ solv_chksum_free(chksumh, NULL);
fclose(fp);
return 0;
}
@@ -2014,6 +2024,8 @@ repo_add_rpm(Repo *repo, const char *rpm, int flags)
if (fread(lead, l, 1, fp) != 1)
{
pool_error(pool, -1, "%s: unexpected EOF", rpm);
+ solv_chksum_free(leadsigchksumh, NULL);
+ solv_chksum_free(chksumh, NULL);
fclose(fp);
return 0;
}
@@ -2034,6 +2046,7 @@ repo_add_rpm(Repo *repo, const char *rpm, int flags)
if (fread(lead, 16, 1, fp) != 1)
{
pool_error(pool, -1, "%s: unexpected EOF", rpm);
+ solv_chksum_free(chksumh, NULL);
fclose(fp);
return 0;
}
@@ -2042,6 +2055,7 @@ repo_add_rpm(Repo *repo, const char *rpm, int flags)
if (getu32(lead) != 0x8eade801)
{
pool_error(pool, -1, "%s: bad header", rpm);
+ solv_chksum_free(chksumh, NULL);
fclose(fp);
return 0;
}
@@ -2050,6 +2064,7 @@ repo_add_rpm(Repo *repo, const char *rpm, int flags)
if (sigcnt >= MAX_HDR_CNT || sigdsize >= MAX_HDR_DSIZE)
{
pool_error(pool, -1, "%s: bad header", rpm);
+ solv_chksum_free(chksumh, NULL);
fclose(fp);
return 0;
}
@@ -2057,6 +2072,7 @@ repo_add_rpm(Repo *repo, const char *rpm, int flags)
if (!headfromfp(&state, rpm, fp, lead, sigcnt, sigdsize, 0, chksumh, 0))
{
+ solv_chksum_free(chksumh, NULL);
fclose(fp);
return 0;
}
diff --git a/ext/testcase.c b/ext/testcase.c
index aa72a8d7..3901d90d 100644
--- a/ext/testcase.c
+++ b/ext/testcase.c
@@ -2348,6 +2348,7 @@ testcase_write_mangled(Solver *solv, const char *dir, int resultflags, const cha
if (fclose(fp))
{
pool_error(solv->pool, 0, "testcase_write: write error");
+ solv_free(result);
strqueue_free(&sq);
return 0;
}
@@ -2360,12 +2361,14 @@ testcase_write_mangled(Solver *solv, const char *dir, int resultflags, const cha
if (!(fp = fopen(out, "w")))
{
pool_error(solv->pool, 0, "testcase_write: could not open '%s' for writing", out);
+ solv_free(cmd);
strqueue_free(&sq);
return 0;
}
if (*cmd && fwrite(cmd, strlen(cmd), 1, fp) != 1)
{
pool_error(solv->pool, 0, "testcase_write: write error");
+ solv_free(cmd);
strqueue_free(&sq);
fclose(fp);
return 0;
@@ -2373,6 +2376,7 @@ testcase_write_mangled(Solver *solv, const char *dir, int resultflags, const cha
if (fclose(fp))
{
pool_error(solv->pool, 0, "testcase_write: write error");
+ solv_free(cmd);
strqueue_free(&sq);
return 0;
}
diff --git a/tools/repo2solv.c b/tools/repo2solv.c
index e055e408..30a41f42 100644
--- a/tools/repo2solv.c
+++ b/tools/repo2solv.c
@@ -208,6 +208,7 @@ read_plaindir_repo(Repo *repo, const char *dir)
repodata_set_location(data, p, 0, 0, bp[0] == '.' && bp[1] == '/' ? bp + 2 : bp);
solv_free(rpm);
}
+ solv_free(buf);
fclose(fp);
while (waitpid(pid, &wstatus, 0) == -1)
{
--
2.19.2
From 6800ad0aaaf709df45c22d92320be42d51b6c704 Mon Sep 17 00:00:00 2001
From: Jaroslav Rohel <jrohel@redhat.com>
Date: Tue, 11 Dec 2018 10:22:09 +0100
Subject: [PATCH 4/7] Fix: testsolv segfault
ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fab0e11bf2b bp 0x7ffdfc044b70 sp 0x7ffdfc044a90 T0)
0 0x7fab0e11bf2a in testcase_str2dep_complex /home/company/real_sanitize/libsolv-master/ext/testcase.c:577
1 0x7fab0e11c80f in testcase_str2dep /home/company/real_sanitize/libsolv-master/ext/testcase.c:656
2 0x7fab0e12e64a in testcase_read /home/company/real_sanitize/libsolv-master/ext/testcase.c:2952
3 0x402aa5 in main /home/company/real_sanitize/libsolv-master/tools/testsolv.c:148
4 0x7fab0d9d2a3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20a3f)
5 0x401bb8 in _start (/home/company/real_sanitize/libsolv-master/build/install/bin/testsolv+0x401bb8)
---
ext/testcase.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ext/testcase.c b/ext/testcase.c
index 3901d90d..dd20de14 100644
--- a/ext/testcase.c
+++ b/ext/testcase.c
@@ -571,6 +571,8 @@ testcase_str2dep_complex(Pool *pool, const char **sp, int relop)
Id flags, id, id2, namespaceid = 0;
struct oplist *op;
+ if (!s)
+ return 0;
while (*s == ' ' || *s == '\t')
s++;
if (!strncmp(s, "namespace:", 10))
--
2.19.2
From 3c43749d26145e26e0337238ca566aeae157a654 Mon Sep 17 00:00:00 2001
From: Jaroslav Rohel <jrohel@redhat.com>
Date: Tue, 11 Dec 2018 10:27:15 +0100
Subject: [PATCH 5/7] Fix: testsolv segfaults
ERROR: AddressSanitizer: SEGV on unknown address 0x0000000002f0 (pc 0x7f31501d3bd2 bp 0x7ffcfe4d4a50 sp 0x7ffcfe4d4a30 T0)
0 0x7f31501d3bd1 in pool_whatprovides /home/company/real_sanitize/libsolv-master/src/pool.h:331
1 0x7f31501d895e in testcase_str2solvid /home/company/real_sanitize/libsolv-master/ext/testcase.c:793
2 0x7f31501e8388 in testcase_read /home/company/real_sanitize/libsolv-master/ext/testcase.c:2807
3 0x402aa5 in main /home/company/real_sanitize/libsolv-master/tools/testsolv.c:148
4 0x7f314fa8da3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20a3f)
5 0x401bb8 in _start (/home/company/real_sanitize/libsolv-master/build/install/bin/testsolv+0x401bb8)
ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f5af9e7815f bp 0x7ffc4c843a40 sp 0x7ffc4c8436c0 T0)
0 0x7f5af9e7815e in testcase_read /home/company/real_sanitize/libsolv-master/ext/testcase.c:2799
1 0x402aa5 in main /home/company/real_sanitize/libsolv-master/tools/testsolv.c:148
2 0x7f5af971da3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20a3f)
3 0x401bb8 in _start (/home/company/real_sanitize/libsolv-master/build/install/bin/testsolv+0x401bb8)
---
ext/testcase.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ext/testcase.c b/ext/testcase.c
index dd20de14..83467fe2 100644
--- a/ext/testcase.c
+++ b/ext/testcase.c
@@ -2772,7 +2772,7 @@ testcase_read(Pool *pool, FILE *fp, const char *testcase, Queue *job, char **res
{
int i = strlen(pieces[1]);
s = strchr(pieces[1], '(');
- if (!s && pieces[1][i - 1] != ')')
+ if (!s || pieces[1][i - 1] != ')')
{
pool_error(pool, 0, "testcase_read: bad namespace '%s'", pieces[1]);
}
--
2.19.2
From 3723154d0cca4ee9b08e35dfa48a90a6659d05c8 Mon Sep 17 00:00:00 2001
From: Jaroslav Rohel <jrohel@redhat.com>
Date: Tue, 11 Dec 2018 12:40:42 +0100
Subject: [PATCH 6/7] Fix: Be sure that NONBLOCK is set
---
examples/solv/fastestmirror.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/examples/solv/fastestmirror.c b/examples/solv/fastestmirror.c
index d2ebd97a..0ee4e73b 100644
--- a/examples/solv/fastestmirror.c
+++ b/examples/solv/fastestmirror.c
@@ -68,7 +68,11 @@ findfastest(char **urls, int nurls)
socks[i] = socket(result->ai_family, result->ai_socktype, result->ai_protocol);
if (socks[i] >= 0)
{
- fcntl(socks[i], F_SETFL, O_NONBLOCK);
+ if (fcntl(socks[i], F_SETFL, O_NONBLOCK) == -1)
+ {
+ close(socks[i]);
+ socks[i] = -1;
+ }
if (connect(socks[i], result->ai_addr, result->ai_addrlen) == -1)
{
if (errno != EINPROGRESS)
--
2.19.2
From 52bf7e7e56e16928b449cad7fb803eb38555db0a Mon Sep 17 00:00:00 2001
From: Jaroslav Rohel <jrohel@redhat.com>
Date: Tue, 11 Dec 2018 12:58:34 +0100
Subject: [PATCH 7/7] Don't set values that are never read
---
ext/pool_fileconflicts.c | 1 -
ext/repo_appdata.c | 2 +-
ext/repo_comps.c | 2 +-
src/cleandeps.c | 1 -
src/dirpool.c | 2 +-
src/order.c | 1 -
src/repopage.c | 1 -
7 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/ext/pool_fileconflicts.c b/ext/pool_fileconflicts.c
index eaeb52b2..2fd3d540 100644
--- a/ext/pool_fileconflicts.c
+++ b/ext/pool_fileconflicts.c
@@ -590,7 +590,6 @@ findfileconflicts_alias_cb(void *cbdatav, const char *fn, struct filelistinfo *i
if (!info->dirlen)
return;
- dp = fn + info->dirlen;
if (info->diridx != cbdata->lastdiridx)
{
cbdata->lastdiridx = info->diridx;
diff --git a/ext/repo_appdata.c b/ext/repo_appdata.c
index 62faf2d8..69d46386 100644
--- a/ext/repo_appdata.c
+++ b/ext/repo_appdata.c
@@ -103,7 +103,7 @@ startElement(struct solv_xmlparser *xmlp, int state, const char *name, const cha
{
struct parsedata *pd = xmlp->userdata;
Pool *pool = pd->pool;
- Solvable *s = pd->solvable;
+ Solvable *s;
const char *type;
/* ignore all language tags */
diff --git a/ext/repo_comps.c b/ext/repo_comps.c
index 255ecb16..e59f8d12 100644
--- a/ext/repo_comps.c
+++ b/ext/repo_comps.c
@@ -107,7 +107,7 @@ startElement(struct solv_xmlparser *xmlp, int state, const char *name, const cha
{
struct parsedata *pd = xmlp->userdata;
Pool *pool = pd->pool;
- Solvable *s = pd->solvable;
+ Solvable *s;
switch(state)
{
diff --git a/src/cleandeps.c b/src/cleandeps.c
index 1da28f6e..b2fde317 100644
--- a/src/cleandeps.c
+++ b/src/cleandeps.c
@@ -748,7 +748,6 @@ solver_createcleandepsmap(Solver *solv, Map *cleandepsmap, int unneeded)
continue;
if (strncmp(pool_id2str(pool, s->name), "pattern:", 8) != 0)
continue;
- dp = s->repo->idarraydata + s->requires;
for (dp = s->repo->idarraydata + s->requires; *dp; dp++)
FOR_PROVIDES(p, pp, *dp)
if (pool->solvables[p].repo == installed)
diff --git a/src/dirpool.c b/src/dirpool.c
index afb26ea5..bed9435e 100644
--- a/src/dirpool.c
+++ b/src/dirpool.c
@@ -85,7 +85,7 @@ dirpool_make_dirtraverse(Dirpool *dp)
return;
dp->dirs = solv_extend_resize(dp->dirs, dp->ndirs, sizeof(Id), DIR_BLOCK);
dirtraverse = solv_calloc_block(dp->ndirs, sizeof(Id), DIR_BLOCK);
- for (parent = 0, i = 0; i < dp->ndirs; i++)
+ for (i = 0; i < dp->ndirs; i++)
{
if (dp->dirs[i] > 0)
continue;
diff --git a/src/order.c b/src/order.c
index c92c3328..cfde40c9 100644
--- a/src/order.c
+++ b/src/order.c
@@ -1066,7 +1066,6 @@ transaction_order(Transaction *trans, int flags)
#if 0
printf("do %s [%d]\n", pool_solvid2str(pool, te->p), temedianr[i]);
#endif
- s = pool->solvables + te->p;
for (j = te->edges; od.invedgedata[j]; j++)
{
struct _TransactionElement *te2 = od.tes + od.invedgedata[j];
diff --git a/src/repopage.c b/src/repopage.c
index 2b7a863b..85d53eb9 100644
--- a/src/repopage.c
+++ b/src/repopage.c
@@ -399,7 +399,6 @@ match_done:
litlen -= 32;
}
}
- litofs = 0;
}
return oo;
}
--
2.19.2

View File

@ -0,0 +1,68 @@
From 07a1a0fd83f108a0e9b1f801b52ff2bd26722097 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= <amatej@redhat.com>
Date: Thu, 27 Jan 2022 08:38:27 +0100
Subject: [PATCH] Allow accessing toolversion at runtime and increase it
---
src/libsolv.ver | 1 +
src/solvversion.c | 1 +
src/solvversion.h.in | 3 ++-
tools/common_write.c | 1 +
4 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/libsolv.ver b/src/libsolv.ver
index 4c6fbf4f..89517f50 100644
--- a/src/libsolv.ver
+++ b/src/libsolv.ver
@@ -306,6 +306,7 @@ SOLV_1.0 {
solv_version_major;
solv_version_minor;
solv_version_patch;
+ solv_toolversion;
solvable_add_deparray;
solvable_add_idarray;
solvable_add_poolstr_array;
diff --git a/src/solvversion.c b/src/solvversion.c
index d66e1958..51d57a63 100644
--- a/src/solvversion.c
+++ b/src/solvversion.c
@@ -11,3 +11,4 @@ const char solv_version[] = LIBSOLV_VERSION_STRING;
int solv_version_major = LIBSOLV_VERSION_MAJOR;
int solv_version_minor = LIBSOLV_VERSION_MINOR;
int solv_version_patch = LIBSOLV_VERSION_PATCH;
+const char solv_toolversion[] = LIBSOLV_TOOLVERSION;
diff --git a/src/solvversion.h.in b/src/solvversion.h.in
index 43b566a1..da0ad743 100644
--- a/src/solvversion.h.in
+++ b/src/solvversion.h.in
@@ -23,6 +23,7 @@ extern const char solv_version[];
extern int solv_version_major;
extern int solv_version_minor;
extern int solv_version_patch;
+extern const char solv_toolversion[];
#cmakedefine LIBSOLV_FEATURE_LINKED_PKGS
#cmakedefine LIBSOLV_FEATURE_COMPLEX_DEPS
@@ -48,6 +49,6 @@ extern int solv_version_patch;
#cmakedefine LIBSOLVEXT_FEATURE_ZCHUNK_COMPRESSION
/* see tools/common_write.c for toolversion history */
-#define LIBSOLV_TOOLVERSION "1.1"
+#define LIBSOLV_TOOLVERSION "1.2"
#endif
diff --git a/tools/common_write.c b/tools/common_write.c
index 36f8dd89..8fda3e33 100644
--- a/tools/common_write.c
+++ b/tools/common_write.c
@@ -19,6 +19,7 @@
/* toolversion history
* 1.0: initial tool version
* 1.1: changed PRODUCT_ENDOFLIFE parsing
+ * 1.2: added UPDATE_COLLECTIONLIST to updateinfo
*/
static int
--
2.31.1

View File

@ -1,25 +0,0 @@
From 0302dce36cb5066a5c818d616a047dc93cfd025d Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
Date: Thu, 22 Nov 2018 12:02:00 +0100
Subject: [PATCH] Fix off-by-one error in the "oneof" parsing code
---
ext/testcase.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ext/testcase.c b/ext/testcase.c
index ffc8b8a..469218d 100644
--- a/ext/testcase.c
+++ b/ext/testcase.c
@@ -1071,7 +1071,7 @@ testcase_str2job(Pool *pool, const char *str, Id *whatp)
Queue q;
job |= SOLVER_SOLVABLE_ONE_OF;
queue_init(&q);
- if (npieces > 3 && strcmp(pieces[2], "nothing") != 0)
+ if (npieces > 2 && strcmp(pieces[2], "nothing") != 0)
{
for (i = 2; i < npieces; i++)
{
--
libgit2 0.27.7

View File

@ -1,46 +0,0 @@
From 5323eb7e5c0c8dcdf339113f091317afaed810cc Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
Date: Tue, 15 Jan 2019 14:06:08 +0100
Subject: [PATCH] Do not disable infarch rules when they don't conflict with the job
---
src/rules.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/rules.c b/src/rules.c
index 2087b35..175cb8d 100644
--- a/src/rules.c
+++ b/src/rules.c
@@ -2126,7 +2126,13 @@ jobtodisablelist(Solver *solv, Id how, Id what, Queue *q)
if ((set & SOLVER_SETARCH) != 0 && solv->infarchrules != solv->infarchrules_end)
{
if (select == SOLVER_SOLVABLE)
- queue_push2(q, DISABLE_INFARCH, pool->solvables[what].name);
+ {
+ for (i = solv->infarchrules; i < solv->infarchrules_end; i++)
+ if (solv->rules[i].p == -what)
+ break;
+ if (i < solv->infarchrules_end)
+ queue_push2(q, DISABLE_INFARCH, pool->solvables[what].name);
+ }
else
{
int qcnt = q->count;
@@ -2140,8 +2146,12 @@ jobtodisablelist(Solver *solv, Id how, Id what, Queue *q)
if (q->elements[i + 1] == s->name)
break;
if (i < q->count)
- continue;
- queue_push2(q, DISABLE_INFARCH, s->name);
+ continue; /* already have that DISABLE_INFARCH element */
+ for (i = solv->infarchrules; i < solv->infarchrules_end; i++)
+ if (solv->rules[i].p == -p)
+ break;
+ if (i < solv->infarchrules_end)
+ queue_push2(q, DISABLE_INFARCH, s->name);
}
}
}
--
libgit2 0.27.7

View File

@ -0,0 +1,60 @@
From 91125fe786cb6de2f050430fa51e11c501f17aed 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 11fac9a31e892125e19246101b5604322836467d 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

@ -1,39 +0,0 @@
From 2e88b25f5419d686b1d817cb1edecbb3305a0d1b Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
Date: Tue, 15 Jan 2019 14:10:38 +0100
Subject: [PATCH] Add testcase for last commit
---
test/testcases/lockstep/infarch_install_best.t | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100644 test/testcases/lockstep/infarch_install_best.t
diff --git a/test/testcases/lockstep/infarch_install_best.t b/test/testcases/lockstep/infarch_install_best.t
new file mode 100644
index 0000000..e9c4859
--- /dev/null
+++ b/test/testcases/lockstep/infarch_install_best.t
@@ -0,0 +1,20 @@
+# test for issue 292
+repo system 0 testtags <inline>
+#>=Pkg: nss 3.39.0 2.fc29 x86_64
+#>=Pkg: nss-sysinit 3.39.0 2.fc29 x86_64
+#>=Req: nss = 3.39.0-2.fc29
+repo available 0 testtags <inline>
+#>=Pkg: nss 3.39.0 2.fc29 i686
+#>=Pkg: nss 3.41.0 1.fc29 x86_64
+#>=Pkg: nss-sysinit 3.41.0 1.fc29 x86_64
+#>=Req: nss = 3.41.0-1.fc29
+
+system x86_64 rpm system
+
+poolflags implicitobsoleteusescolors
+solverflags allowvendorchange keepexplicitobsoletes bestobeypolicy keeporphans yumobsoletes
+
+job install oneof nss-3.41.0-1.fc29.x86_64@available [setevr,setarch]
+result transaction,problems <inline>
+#>upgrade nss-3.39.0-2.fc29.x86_64@system nss-3.41.0-1.fc29.x86_64@available
+#>upgrade nss-sysinit-3.39.0-2.fc29.x86_64@system nss-sysinit-3.41.0-1.fc29.x86_64@available
--
libgit2 0.27.7

View File

@ -0,0 +1,125 @@
From 78b2d8148bea1dc12b854d9c11691d5f1bc33fd8 Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
Date: Wed, 19 Apr 2023 13:09:10 +0200
Subject: [PATCH] Allow to break arch lock-step on erase operations
We allow it if SOLVER_SETARCH is (auto-)set in the erase job.
---
src/rules.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/src/rules.c b/src/rules.c
index 212df322..bbabc55f 100644
--- a/src/rules.c
+++ b/src/rules.c
@@ -1668,6 +1668,16 @@ solver_addinfarchrules(Solver *solv, Map *addedmap)
if (first)
continue; /* not the first in the group */
+ if (!bestscore && allowedarchs.count > 1 && pool->implicitobsoleteusescolors)
+ {
+ for (j = 0; j < allowedarchs.count; j++)
+ {
+ a = pool_arch2score(pool, allowedarchs.elements[j]);
+ if (a && a != 1 && (!bestscore || a < bestscore))
+ bestscore = a;
+ }
+ }
+
if (!bestscore)
continue; /* did not find a score for this group */
@@ -2456,6 +2466,20 @@ jobtodisablelist(Solver *solv, Id how, Id what, Queue *q)
case SOLVER_ERASE:
if (!installed)
break;
+ set = how & SOLVER_SETMASK;
+ if (!(set & (SOLVER_NOAUTOSET | SOLVER_SETARCH)) && pool->implicitobsoleteusescolors && solv->infarchrules != solv->infarchrules_end)
+ {
+ if (select == SOLVER_SOLVABLE)
+ set |= SOLVER_SETARCH;
+ else if ((select == SOLVER_SOLVABLE_NAME || select == SOLVER_SOLVABLE_PROVIDES) && ISRELDEP(what))
+ {
+ Reldep *rd = GETRELDEP(pool, what);
+ if (rd->flags <= 7 && ISRELDEP(rd->name))
+ rd = GETRELDEP(pool, rd->name);
+ if (rd->flags == REL_ARCH)
+ set |= SOLVER_SETARCH;
+ }
+ }
if (select == SOLVER_SOLVABLE_ALL || (select == SOLVER_SOLVABLE_REPO && what == installed->repoid))
{
FOR_REPO_SOLVABLES(installed, p, s)
@@ -2465,6 +2489,8 @@ jobtodisablelist(Solver *solv, Id how, Id what, Queue *q)
if (pool->solvables[p].repo == installed)
{
queue_push2(q, DISABLE_UPDATE, p);
+ if ((set & SOLVER_SETARCH) != 0 && pool->implicitobsoleteusescolors && solv->infarchrules != solv->infarchrules_end)
+ queue_push2(q, DISABLE_INFARCH, pool->solvables[p].name); /* allow to break the lock-step */
#ifdef ENABLE_LINKED_PKGS
if (solv->instbuddy && solv->instbuddy[p - installed->start] > 1)
queue_push2(q, DISABLE_UPDATE, solv->instbuddy[p - installed->start]);
--
2.40.1
From dc4c91a71eda2950df11724945ebd5151883a041 Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
Date: Fri, 21 Apr 2023 16:15:10 +0200
Subject: [PATCH] Only disable infarch rules on erase if the package was in
lock-step
Fiexes issue #528
---
src/rules.c | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/src/rules.c b/src/rules.c
index bbabc55f..c909ae0b 100644
--- a/src/rules.c
+++ b/src/rules.c
@@ -2279,6 +2279,31 @@ solver_addblackrules(Solver *solv)
#define DISABLE_DUP 3
#define DISABLE_BLACK 4
+/* check if installed package p is in lock-step with another installed package */
+static int
+installed_is_in_lockstep(Solver *solv, Id p)
+{
+ Pool *pool = solv->pool;
+ Repo *installed = solv->installed;
+ int rid;
+ Id pp, l;
+ Rule *r;
+
+ if (!installed)
+ return 0;
+ for (rid = solv->infarchrules, r = solv->rules + rid; rid < solv->infarchrules_end; rid++, r++)
+ {
+ if (r->p >= 0)
+ continue;
+ if (pool->solvables[-r->p].repo != installed)
+ continue;
+ FOR_RULELITERALS(l, pp, r)
+ if (l == p)
+ return 1;
+ }
+ return 0;
+}
+
static void
jobtodisablelist(Solver *solv, Id how, Id what, Queue *q)
{
@@ -2490,7 +2515,8 @@ jobtodisablelist(Solver *solv, Id how, Id what, Queue *q)
{
queue_push2(q, DISABLE_UPDATE, p);
if ((set & SOLVER_SETARCH) != 0 && pool->implicitobsoleteusescolors && solv->infarchrules != solv->infarchrules_end)
- queue_push2(q, DISABLE_INFARCH, pool->solvables[p].name); /* allow to break the lock-step */
+ if (installed_is_in_lockstep(solv, p))
+ queue_push2(q, DISABLE_INFARCH, pool->solvables[p].name); /* allow to break the lock-step */
#ifdef ENABLE_LINKED_PKGS
if (solv->instbuddy && solv->instbuddy[p - installed->start] > 1)
queue_push2(q, DISABLE_UPDATE, solv->instbuddy[p - installed->start]);
--
2.40.1

View File

@ -1,101 +0,0 @@
From c14beb31bea06d0a46176a20cef4261067d5fc63 Mon Sep 17 00:00:00 2001
From: Jaroslav Mracek <jmracek@redhat.com>
Date: Thu, 17 Jan 2019 12:48:05 +0100
Subject: [PATCH] Add support for modular updateinfo.xml data
---
ext/repo_updateinfoxml.c | 37 +++++++++++++++++++++++++++++++++++++
src/knownid.h | 8 ++++++++
2 files changed, 45 insertions(+)
diff --git a/ext/repo_updateinfoxml.c b/ext/repo_updateinfoxml.c
index 7ba0062..5e03105 100644
--- a/ext/repo_updateinfoxml.c
+++ b/ext/repo_updateinfoxml.c
@@ -37,6 +37,7 @@
* <pkglist>
* <collection short="F8">
* <name>Fedora 8</name>
+ * <module name="pki-deps" stream="10.6" version="20181019123559" context="9edba152" arch="x86_64"/>
* <package arch="ppc64" name="imlib-debuginfo" release="6.fc8" src="http://download.fedoraproject.org/pub/fedora/linux/updates/8/ppc64/imlib-debuginfo-1.9.15-6.fc8.ppc64.rpm" version="1.9.15">
* <filename>imlib-debuginfo-1.9.15-6.fc8.ppc64.rpm</filename>
* <reboot_suggested>True</reboot_suggested>
@@ -70,6 +71,7 @@ enum state {
STATE_RELOGIN,
STATE_RIGHTS,
STATE_SEVERITY,
+ STATE_MODULE,
NUMSTATES
};
@@ -92,6 +94,7 @@ static struct solv_xmlparser_element stateswitches[] = {
{ STATE_PKGLIST, "collection", STATE_COLLECTION, 0 },
{ STATE_COLLECTION, "name", STATE_NAME, 1 },
{ STATE_COLLECTION, "package", STATE_PACKAGE, 0 },
+ { STATE_COLLECTION, "module", STATE_MODULE, 0 },
{ STATE_PACKAGE, "filename", STATE_FILENAME, 1 },
{ STATE_PACKAGE, "reboot_suggested",STATE_REBOOT, 1 },
{ STATE_PACKAGE, "restart_suggested",STATE_RESTART, 1 },
@@ -321,6 +324,40 @@ startElement(struct solv_xmlparser *xmlp, int state, const char *name, const cha
repodata_set_id(pd->data, pd->collhandle, UPDATE_COLLECTION_ARCH, a);
break;
}
+ case STATE_MODULE:
+ {
+ const char *name = 0, *stream = 0, *version = 0, *context = 0, *arch = 0;
+ Id name_id, stream_id, version_id, context_id, arch_id = 0;
+ for (; *atts; atts += 2)
+ {
+ if (!strcmp(*atts, "arch"))
+ arch = atts[1];
+ else if (!strcmp(*atts, "name"))
+ name = atts[1];
+ else if (!strcmp(*atts, "stream"))
+ stream = atts[1];
+ else if (!strcmp(*atts, "version"))
+ version = atts[1];
+ else if (!strcmp(*atts, "context"))
+ context = atts[1];
+ }
+ name_id = pool_str2id(pool, name, 1);
+ if (arch)
+ arch_id = pool_str2id(pool, arch, 1);
+ stream_id = pool_str2id(pool, stream, 1);
+ version_id = pool_str2id(pool, version, 1);
+ context_id = pool_str2id(pool, context, 1);
+
+ Id module_handle = repodata_new_handle(pd->data);
+ repodata_set_id(pd->data, module_handle, UPDATE_MODULE_NAME, name_id);
+ repodata_set_id(pd->data, module_handle, UPDATE_MODULE_STREAM, stream_id);
+ repodata_set_id(pd->data, module_handle, UPDATE_MODULE_VERSION, version_id);
+ repodata_set_id(pd->data, module_handle, UPDATE_MODULE_CONTEXT, context_id);
+ if (arch_id)
+ repodata_set_id(pd->data, module_handle, UPDATE_MODULE_ARCH, arch_id);
+ repodata_add_flexarray(pd->data, pd->handle, UPDATE_MODULE, module_handle);
+ break;
+ }
default:
break;
diff --git a/src/knownid.h b/src/knownid.h
index 64cc6fc..14d2ded 100644
--- a/src/knownid.h
+++ b/src/knownid.h
@@ -262,6 +262,14 @@ KNOWNID(SOLVABLE_INSTALLSTATUS, "solvable:installstatus"), /* debian install st
KNOWNID(SOLVABLE_PREREQ_IGNOREINST, "solvable:prereq_ignoreinst"), /* ignore these pre-requires for installed packages */
+/* 'content' of patch, usually list of modules */
+KNOWNID(UPDATE_MODULE, "update:module"), /* "name stream version context arch" */
+KNOWNID(UPDATE_MODULE_NAME, "update:module:name"), /* name */
+KNOWNID(UPDATE_MODULE_STREAM, "update:module:stream"), /* stream */
+KNOWNID(UPDATE_MODULE_VERSION, "update:module:version"), /* version */
+KNOWNID(UPDATE_MODULE_CONTEXT, "update:module:context"), /* context */
+KNOWNID(UPDATE_MODULE_ARCH, "update:module:arch"), /* architecture */
+
KNOWNID(ID_NUM_INTERNAL, 0)
#ifdef KNOWNID_INITIALIZE
--
libgit2 0.27.7

View File

@ -1,23 +1,13 @@
%global libname solv
%if (0%{?rhel} && 0%{?rhel} <= 7) || (0%{?fedora} && 0%{?fedora} <= 29)
%bcond_without python2_bindings
%else
%bcond_with python2_bindings
%endif
%if 0%{?rhel} && 0%{?rhel} <= 7
%bcond_with perl_bindings
%bcond_with ruby_bindings
%bcond_with python3_bindings
%else
%bcond_without python_bindings
%bcond_without perl_bindings
%bcond_without ruby_bindings
%bcond_without python3_bindings
%endif
# Creates special prefixed pseudo-packages from appdata metadata
%bcond_without appdata
# Creates special prefixed "group:", "category:" pseudo-packages
%bcond_without comps
%bcond_without conda
# For rich dependencies
%bcond_without complex_deps
%if 0%{?rhel}
@ -27,6 +17,7 @@
%bcond_with arch_repo
# For handling deb + rpm at the same time
%bcond_with multi_semantics
%bcond_with zchunk
%else
%bcond_without helix_repo
%bcond_without suse_repo
@ -34,15 +25,19 @@
%bcond_without arch_repo
# For handling deb + rpm at the same time
%bcond_without multi_semantics
%bcond_without zchunk
%endif
%bcond_without zstd
#global commitnum 2901
#global commit 47fbaa2a0892866d30ec0e1b4c885532d0aca7b8
#global shortcommit %(c=%{commit}; echo ${c:0:7})
#global shortcommit %%(c=%%{commit}; echo ${c:0:7})
%define __cmake_switch(b:) %{expand:%%{?with_%{-b*}:ON}}%{expand:%%{!?with_%{-b*}:OFF}}
Name: lib%{libname}
Version: 0.6.35
Release: 6%{?commit:.git.%{commitnum}.%{?shortcommit}}%{?dist}
Version: 0.7.20
Release: 6%{?dist}
Summary: Package dependency solver
License: BSD
@ -52,12 +47,12 @@ Source: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
%else
Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
%endif
Patch0: 0001-Make-sure-that-targeted-updates-dont-do-reinstalls.patch
Patch1: 0002-Fix-memory-leaks-memory-access.patch
Patch2: 0003-Fix-off-by-one-error-in-the-oneof-parsing-code.patch
Patch3: 0004-Do-not-disable-infarch-rules-when-they-dont-conflict-with-the-job.patch
Patch4: 0005-Add-testcase-for-last-commit.patch
Patch5: 0006-Add-support-for-modular-updateinfoxml-data.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1630300
Patch1: 0001-Add-support-for-computing-hashes-using-OpenSSL.patch
Patch2: 0002-Add-support-for-storing-user-data-in-a-solv-file.patch
Patch3: 0003-Allow-accessing-toolversion-at-runtime-and-increase-.patch
Patch4: 0004-Treat-condition-both-as-positive-and-negative-litera.patch
Patch5: 0005-Allow_break_arch_lock_step_on_erase.patch
BuildRequires: cmake
BuildRequires: gcc-c++
@ -66,10 +61,22 @@ BuildRequires: pkgconfig(rpm)
BuildRequires: zlib-devel
# -DWITH_LIBXML2=ON
BuildRequires: libxml2-devel
# -DWITH_OPENSSL=ON
BuildRequires: pkgconfig(openssl)
# -DENABLE_LZMA_COMPRESSION=ON
BuildRequires: xz-devel
# -DENABLE_BZIP2_COMPRESSION=ON
BuildRequires: bzip2-devel
%if %{with zstd}
# -DENABLE_ZSTD_COMPRESSION=ON
BuildRequires: libzstd-devel
%endif
%if %{with zchunk}
# -DENABLE_ZCHUNK_COMPRESSION=ON
BuildRequires: pkgconfig(zck)
%endif
# https://bugzilla.redhat.com/show_bug.cgi?id=1830346
Conflicts: rpm%{?_isa} < 4.14.3
%description
A free package dependency solver using a satisfiability algorithm. The
@ -92,13 +99,8 @@ Development files for %{name}.
%package tools
Summary: Package dependency solver tools
Requires: %{name}%{?_isa} = %{version}-%{release}
# repo2solv dependencies. All of those are used in shell-script.
Requires: %{_bindir}/gzip
Requires: %{_bindir}/bzip2
Requires: %{_bindir}/lzma
Requires: %{_bindir}/xz
Requires: %{_bindir}/cat
Requires: %{_bindir}/find
# repo2solv dependencies. Used as execl()
Requires: /usr/bin/find
%description tools
Package dependency solver tools.
@ -107,8 +109,8 @@ Package dependency solver tools.
Summary: Applications demoing the %{name} library
Requires: %{name}%{?_isa} = %{version}-%{release}
# solv dependencies. Used as execlp() and system()
Requires: %{_bindir}/curl
Requires: %{_bindir}/gpg2
Requires: /usr/bin/curl
Requires: /usr/bin/gpg2
%description demo
Applications demoing the %{name} library.
@ -136,21 +138,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
Ruby bindings for the %{name} library.
%endif
%if %{with python2_bindings}
%package -n python2-%{libname}
Summary: Python bindings for the %{name} library
%{?python_provide:%python_provide python2-%{libname}}
BuildRequires: swig
BuildRequires: python2-devel
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python2-%{libname}
Python bindings for the %{name} library.
Python 2 version.
%endif
%if %{with python3_bindings}
%if %{with python_bindings}
%package -n python3-%{libname}
Summary: Python bindings for the %{name} library
%{?python_provide:%python_provide python3-%{libname}}
@ -168,51 +156,51 @@ Python 3 version.
%autosetup -p1 %{?commit:-n %{name}-%{commit}}
%build
%cmake . -B"%{_vpath_builddir}" -GNinja \
-DFEDORA=1 \
-DENABLE_RPMDB=ON \
-DENABLE_RPMDB_BYRPMHEADER=ON \
-DENABLE_RPMDB_LIBRPM=ON \
-DENABLE_RPMPKG_LIBRPM=ON \
-DENABLE_RPMMD=ON \
%{?with_comps:-DENABLE_COMPS=ON} \
%{?with_appdata:-DENABLE_APPDATA=ON} \
-DUSE_VENDORDIRS=ON \
-DWITH_LIBXML2=ON \
-DENABLE_LZMA_COMPRESSION=ON \
-DENABLE_BZIP2_COMPRESSION=ON \
%{?with_helix_repo:-DENABLE_HELIXREPO=ON} \
%{?with_suse_repo:-DENABLE_SUSEREPO=ON} \
%{?with_debian_repo:-DENABLE_DEBIAN=ON} \
%{?with_arch_repo:-DENABLE_ARCHREPO=ON} \
%{?with_multi_semantics:-DMULTI_SEMANTICS=ON} \
%{?with_complex_deps:-DENABLE_COMPLEX_DEPS=1} \
%{?with_perl_bindings:-DENABLE_PERL=ON} \
%{?with_ruby_bindings:-DENABLE_RUBY=ON} \
%if %{with python2_bindings} || %{with python3_bindings}
-DENABLE_PYTHON=ON \
%if %{with python2_bindings}
-DPythonLibs_FIND_VERSION=%{python2_version} \
-DPythonLibs_FIND_VERSION_MAJOR=2 \
%if %{with python3_bindings}
-DENABLE_PYTHON3=ON \
-DPYTHON3_EXECUTABLE=%{__python3} \
%endif
%else
-DPythonLibs_FIND_VERSION=%{python3_version} \
-DPythonLibs_FIND_VERSION_MAJOR=3 \
%cmake -GNinja \
-DFEDORA=1 \
-DENABLE_RPMDB=ON \
-DENABLE_RPMDB_BYRPMHEADER=ON \
-DENABLE_RPMDB_LIBRPM=ON \
-DENABLE_RPMPKG_LIBRPM=ON \
-DENABLE_RPMMD=ON \
-DENABLE_COMPS=%{__cmake_switch -b comps} \
-DENABLE_APPDATA=%{__cmake_switch -b appdata} \
-DUSE_VENDORDIRS=ON \
-DWITH_LIBXML2=ON \
-DWITH_OPENSSL=ON \
-DENABLE_LZMA_COMPRESSION=ON \
-DENABLE_BZIP2_COMPRESSION=ON \
-DENABLE_ZSTD_COMPRESSION=%{__cmake_switch -b zstd} \
-DENABLE_ZCHUNK_COMPRESSION=%{__cmake_switch -b zchunk} \
%if %{with zchunk}
-DWITH_SYSTEM_ZCHUNK=ON \
%endif
-DENABLE_HELIXREPO=%{__cmake_switch -b helix_repo} \
-DENABLE_SUSEREPO=%{__cmake_switch -b suse_repo} \
-DENABLE_DEBIAN=%{__cmake_switch -b debian_repo} \
-DENABLE_ARCHREPO=%{__cmake_switch -b arch_repo} \
-DMULTI_SEMANTICS=%{__cmake_switch -b multi_semantics} \
-DENABLE_COMPLEX_DEPS=%{__cmake_switch -b complex_deps} \
-DENABLE_CONDA=%{__cmake_switch -b conda} \
-DENABLE_PERL=%{__cmake_switch -b perl_bindings} \
-DENABLE_RUBY=%{__cmake_switch -b ruby_bindings} \
-DENABLE_PYTHON=%{__cmake_switch -b python_bindings} \
%if %{with python_bindings}
-DPYTHON_EXECUTABLE=%{python3} \
%endif
%{nil}
%ninja_build -C "%{_vpath_builddir}"
%cmake_build
%install
%ninja_install -C "%{_vpath_builddir}"
%cmake_install
%check
%ninja_test -C "%{_vpath_builddir}"
%ctest
%ldconfig_scriptlets
# Python smoke test (not tested in %%ctest):
export PYTHONPATH=%{buildroot}%{python3_sitearch}
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
%python3 -c 'import solv'
%files
%license LICENSE*
@ -267,6 +255,9 @@ Python 3 version.
%if %{with suse_repo}
%solv_tool susetags2solv
%endif
%if %{with conda}
%{_bindir}/conda2solv
%endif
%files demo
%solv_tool solv
@ -282,13 +273,7 @@ Python 3 version.
%{ruby_vendorarchdir}/%{libname}.so
%endif
%if %{with python2_bindings}
%files -n python2-%{libname}
%{python2_sitearch}/_%{libname}.so
%{python2_sitearch}/%{libname}.py*
%endif
%if %{with python3_bindings}
%if %{with python_bindings}
%files -n python3-%{libname}
%{python3_sitearch}/_%{libname}.so
%{python3_sitearch}/%{libname}.py
@ -296,6 +281,171 @@ Python 3 version.
%endif
%changelog
* Wed Jun 21 2023 Jaroslav Rohel <jrohel@redhat.com> - 0.7.20-6
- Backport Allow to break arch lock-step on erase operations (RhBug:2172288,2172292)
* Wed May 17 2023 Jaroslav Rohel <jrohel@redhat.com> - 0.7.20-5
- Backport Treat condition both as positive and negative literal in pool_add_pos_literals_complex_dep
(RhBug:2185061,2190136)
* Wed Dec 07 2022 Nicola Sella <nsella@redhat.com> - 0.7.20-4
- Drop patch to fix pick of old build (RhBug:2150300,RhBug:2151551)
* Thu May 05 2022 Lukas Hrazky <lhrazky@redhat.com> - 0.7.20-3
- Allow accessing toolversion at runtime and increase it
* Wed May 04 2022 Lukas Hrazky <lhrazky@redhat.com> - 0.7.20-2
- Add support for storing user data in a solv file
- Improve choice rule generation
* Tue Nov 09 2021 Pavla Kratochvilova <pkratoch@redhat.com> - 0.7.20-1
- Update to 0.7.20
- new SOLVER_EXCLUDEFROMWEAK job to ignore pkgs for weak dependencies
- support for environments in comps parser
- fix misparsing of '&' in attributes with libxml2
- choice rules: treat orphaned packages as newest
- fix compatibility with Python 3.10
* Tue Jul 27 2021 Pavla Kratochvilova <pkratoch@redhat.org> - 0.7.19-1
- Update to 0.7.19
- repo_add_conda: add flag to skip v2 packages
- fix rare segfault in resolve_jobrules() that could happen if new rules are learnt
- fix error handling in solv_xfopen_fd()
- fix memory leaks
* Fri Apr 30 2021 Pavla Kratochvilova <pkratoch@redhat.org> - 0.7.17-2
- Fix rpm dependency
* Thu Apr 29 2021 Pavla Kratochvilova <pkratoch@redhat.org> - 0.7.17-1
- Update to 0.7.17
- selected bug fixes:
* repo_write: fix handling of nested flexarray
* improve choicerule generation a bit more to cover more cases
* harden testcase parser against repos being added too late
* support python-3.10
* check %_dbpath macro in rpmdb code
- new features:
* handle default/visible/langonly attributes in comps parser
* support multiple collections in updateinfo parser
* add '-D' option in rpmdb2solv to set the dbpath
* Thu Jan 14 2021 Nicola Sella <nsella@redhat.com> - 0.7.16-2
- Enable zstd compression in libsolv
* Wed Nov 11 2020 Nicola Sella <nsella@redhat.com> - 0.7.16-1
- Update to 0.7.16
- selected bug fixes:
* make testcase_mangle_repo_names deal correctly with freed repos
[bnc#1177238]
* fix add_complex_recommends() selecting conflicted packages in
rare cases leading to crashes
* improve choicerule generation so that package updates are
prefered in more cases
* fix deduceq2addedmap clearing bits outside of the map
* conda: feature depriorization and fix startswith implementation
* Fix solvable swapping messing up idarrays
* fix ruleinfo of complex dependencies returning the wrong origin
* fix solv_zchunk decoding error if large chunks are used
[bnc#1159314]
- new features
* new testcase_mangle_repo_names() function
* new solv_fmemopen() function
* Enable zstd compression support for sle15 and sle15-sp2
* Support blacklisted packages in solver_findproblemrule()
[bnc#1172135]
* Support rules with multiple negative literals in choice rule
generation
* build with -DENABLE_RPMDB_LIBRPM=1 on SUSE to support
multiple rpm database backends
* added two new function to make libzypp independent of the rpm
database format
* support conda constrains dependencies
* Mon Apr 06 2020 Ales Matej <amatej@redhat.org> - 0.7.11-1
- Update to 0.7.11
- selected bug fixes:
* support arch<->noarch package changes when creating patch
conflicts from the updateinfo data
* also support other rpm database types
* fixed solv_zchunk decoding error if large chunks are used
* treat retracted pathes as irrelevant
* made add_update_target work with multiversion installs
- new features
* support for SOLVER_BLACKLIST jobs that block the installation of matched
packages unless they are directly selected by an SOLVER_INSTALL job
* libsolv now also parses the patch status in the updateinfo parser
* new solvable_matchessolvable() function
* support conda constrains dependencies
* new rpm_stat_database() function
* new rpm_hash_database_state() function
* 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
- Backport patches: Use OpenSSL for computing hashes (RhBug:1630300)
* Wed May 29 2019 Pavla Kratochvilova <pkratoch@redhat.org> - 0.7.4-2
- Backport patch: Not considered excluded packages as a best candidate (RhBug:1677583)
* Fri Apr 26 2019 Pavla Kratochvilova <pkratoch@redhat.org> - 0.7.4-1
- soname bump to "1"
- incompatible API changes:
* bindings: Selection.flags is now an attribute
* repodata_lookup_num now works like the other lookup_num functions
- new functions:
* selection_make_matchsolvable
* selection_make_matchsolvablelist
* pool_whatmatchessolvable
* repodata_search_arrayelement
* repodata_lookup_kv_uninternalized
* repodata_search_uninternalized
* repodata_translate_dir
- new repowriter interface to write solv files allowing better
control over what gets written
- support for filtered file lists with a custom filter
- dropped support of (since a long time unused) REPOKEY_TYPE_U32
- selected bug fixes:
* fix nasty off-by-one error in repo_write
* do not autouninstall packages because of forcebest updates
* fixed a couple of null pointer derefs and potential memory
leaks
* made disfavoring recommended packages work if strong recommends
is enabled
* no longer disable infarch rules when they don't conflict with
the job
* repo_add_rpmdb: do not copy bad solvables from the old solv file
* fix cleandeps updates not updating all packages
- new features:
* support rpm's new '^' version separator
* support set/get_considered_list in bindings
* new experimental SOLVER_FLAG_ONLY_NAMESPACE_RECOMMENDED flag
* do favor evaluation before pruning allowing to (dis)favor
specific package versions
* bindings: support pool.matchsolvable(), pool.whatmatchessolvable()
pool.best_solvables() and selection.matchsolvable()
* experimental DISTTYPE_CONDA and REL_CONDA support
* Fri Feb 08 2019 Jaroslav Mracek <jmracek@redhat.com> - 0.6.35-6
- Backport patch to add support for modular updateinfoxml data