diff --git a/0001-Make-sure-that-targeted-updates-dont-do-reinstalls.patch b/0001-Make-sure-that-targeted-updates-dont-do-reinstalls.patch deleted file mode 100644 index 1cd418a..0000000 --- a/0001-Make-sure-that-targeted-updates-dont-do-reinstalls.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 0e29e1188c19609e117478a0df1cb995a2f9e745 Mon Sep 17 00:00:00 2001 -From: Michael Schroeder -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 - diff --git a/CVE-2018-20534-20533-20532-Don-t-set-values-that-are-never-read.patch b/CVE-2018-20534-20533-20532-Don-t-set-values-that-are-never-read.patch deleted file mode 100644 index 633b168..0000000 --- a/CVE-2018-20534-20533-20532-Don-t-set-values-that-are-never-read.patch +++ /dev/null @@ -1,106 +0,0 @@ -From f3dd7c99087535f3d2aaa2a1ea069e71bd897dd7 Mon Sep 17 00:00:00 2001 -From: root -Date: Thu, 30 May 2019 08:13:19 -0400 -Subject: [PATCH] Don't set values that are never read - -Signed-off-by: root ---- - 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 eaeb52b..2fd3d54 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 62faf2d..69d4638 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 255ecb1..e59f8d1 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 1da28f6..b2fde31 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 afb26ea..bed9435 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 c92c332..cfde40c 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 2b7a863..85d53eb 100644 ---- a/src/repopage.c -+++ b/src/repopage.c -@@ -399,7 +399,6 @@ match_done: - litlen -= 32; - } - } -- litofs = 0; - } - return oo; - } --- -2.19.1 - diff --git a/CVE-2018-20534-20533-20532-Fix-Add-va_end-before-return.patch b/CVE-2018-20534-20533-20532-Fix-Add-va_end-before-return.patch deleted file mode 100644 index 55a2061..0000000 --- a/CVE-2018-20534-20533-20532-Fix-Add-va_end-before-return.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 8e1dba061d7962441f7e06b9a94d0ff24b158c6a Mon Sep 17 00:00:00 2001 -From: Jaroslav Rohel -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. - -Signed-off-by: root ---- - src/pool.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/pool.c b/src/pool.c -index 383edb2a..be6a4193 100644 ---- a/src/pool.c -+++ b/src/pool.c -@@ -1536,6 +1536,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.1 - diff --git a/CVE-2018-20534-20533-20532-Fix-Be-sure-that-NONBLOCK-is-set.patch b/CVE-2018-20534-20533-20532-Fix-Be-sure-that-NONBLOCK-is-set.patch deleted file mode 100644 index 04ee556..0000000 --- a/CVE-2018-20534-20533-20532-Fix-Be-sure-that-NONBLOCK-is-set.patch +++ /dev/null @@ -1,30 +0,0 @@ -From bbfce7d10015fd7f72bcd5dbbca6c30f02cd7f4d Mon Sep 17 00:00:00 2001 -From: Jaroslav Rohel -Date: Tue, 11 Dec 2018 12:40:42 +0100 -Subject: [PATCH 6/7] Fix: Be sure that NONBLOCK is set - -Signed-off-by: root ---- - 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.1 - diff --git a/CVE-2018-20534-20533-20532-Fix-Dereference-of-null-pointer.patch b/CVE-2018-20534-20533-20532-Fix-Dereference-of-null-pointer.patch deleted file mode 100644 index a9d9070..0000000 --- a/CVE-2018-20534-20533-20532-Fix-Dereference-of-null-pointer.patch +++ /dev/null @@ -1,26 +0,0 @@ -From c5883b20b7b021ee94111cb72777ab3ba3f50950 Mon Sep 17 00:00:00 2001 -From: Jaroslav Rohel -Date: Fri, 7 Dec 2018 07:05:10 +0100 -Subject: [PATCH 1/7] Fix: Dereference of null pointer - -Signed-off-by: root ---- - 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 fd46272b..46d83615 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.1 - diff --git a/CVE-2018-20534-20533-20532-Fix-Memory-leaks.patch b/CVE-2018-20534-20533-20532-Fix-Memory-leaks.patch deleted file mode 100644 index 806f47d..0000000 --- a/CVE-2018-20534-20533-20532-Fix-Memory-leaks.patch +++ /dev/null @@ -1,151 +0,0 @@ -From 98a75959e13699e2ef35b0b011a88a6d224f227e Mon Sep 17 00:00:00 2001 -From: Jaroslav Rohel -Date: Tue, 11 Dec 2018 10:14:04 +0100 -Subject: [PATCH 3/7] Fix: Memory leaks - -Signed-off-by: root ---- - 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 9acb4006..0d648208 100644 ---- a/ext/repo_rpmdb.c -+++ b/ext/repo_rpmdb.c -@@ -1896,6 +1896,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; - } -@@ -1908,12 +1910,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; - } -@@ -1922,6 +1928,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; - } -@@ -1932,6 +1940,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; - } -@@ -1971,6 +1981,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; - } -@@ -1991,6 +2003,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; - } -@@ -1999,6 +2012,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; - } -@@ -2007,6 +2021,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; - } -@@ -2014,6 +2029,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 b815c563..33998d47 100644 ---- a/ext/testcase.c -+++ b/ext/testcase.c -@@ -2365,6 +2365,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; - } -@@ -2377,12 +2378,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; -@@ -2390,6 +2393,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 d5b33287..68e92f33 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.1 - diff --git a/CVE-2018-20534-20533-20532-Fix-testsolv-segfault.patch b/CVE-2018-20534-20533-20532-Fix-testsolv-segfault.patch deleted file mode 100644 index 75dca53..0000000 --- a/CVE-2018-20534-20533-20532-Fix-testsolv-segfault.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 95c3d1b3aad7a003d129b957cf449d11edaca67b Mon Sep 17 00:00:00 2001 -From: Jaroslav Rohel -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) - -Signed-off-by: root ---- - ext/testcase.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/ext/testcase.c b/ext/testcase.c -index 33998d47..fe2636cb 100644 ---- a/ext/testcase.c -+++ b/ext/testcase.c -@@ -576,6 +576,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.1 - diff --git a/CVE-2018-20534-20533-20532-Fix-testsolv-segfaults.patch b/CVE-2018-20534-20533-20532-Fix-testsolv-segfaults.patch deleted file mode 100644 index 72c4cba..0000000 --- a/CVE-2018-20534-20533-20532-Fix-testsolv-segfaults.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 6de825c4d27022e48570824f0be77132c5b6d45a Mon Sep 17 00:00:00 2001 -From: Jaroslav Rohel -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) - -Signed-off-by: root ---- - ext/testcase.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ext/testcase.c b/ext/testcase.c -index fe2636cb..c8dd14ee 100644 ---- a/ext/testcase.c -+++ b/ext/testcase.c -@@ -2795,7 +2795,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.1 - diff --git a/libsolv-0.6.35.tar.gz b/libsolv-0.6.35.tar.gz deleted file mode 100644 index a579e1c..0000000 Binary files a/libsolv-0.6.35.tar.gz and /dev/null differ diff --git a/libsolv-0.7.7.tar.gz b/libsolv-0.7.7.tar.gz new file mode 100644 index 0000000..e1f4ede Binary files /dev/null and b/libsolv-0.7.7.tar.gz differ diff --git a/libsolv.spec b/libsolv.spec index c7bab83..f005380 100644 --- a/libsolv.spec +++ b/libsolv.spec @@ -1,110 +1,157 @@ -Name: libsolv -Version: 0.6.35 -Release: 5 -Summary: Package dependency solver -License: BSD -URL: https://github.com/openSUSE/libsolv -Source0: https://github.com/openSUSE/libsolv/archive/%{version}/%{name}-%{version}.tar.gz +%bcond_with python2_bindings +%bcond_without perl_bindings +%bcond_without ruby_bindings +%bcond_without python3_bindings +%bcond_without appdata +%bcond_without comps +%bcond_without complex_deps +%bcond_without helix_repo +%bcond_without suse_repo +%bcond_without debian_repo +%bcond_without arch_repo +%bcond_without multi_semantics +%bcond_with zchunk +%bcond_without zstd -Patch0: 0001-Make-sure-that-targeted-updates-dont-do-reinstalls.patch - -Patch6000: CVE-2018-20534-20533-20532-Fix-Dereference-of-null-pointer.patch -Patch6001: CVE-2018-20534-20533-20532-Fix-Add-va_end-before-return.patch -Patch6002: CVE-2018-20534-20533-20532-Fix-Memory-leaks.patch -Patch6003: CVE-2018-20534-20533-20532-Fix-testsolv-segfault.patch -Patch6004: CVE-2018-20534-20533-20532-Fix-testsolv-segfaults.patch -Patch6005: CVE-2018-20534-20533-20532-Fix-Be-sure-that-NONBLOCK-is-set.patch -Patch6006: CVE-2018-20534-20533-20532-Don-t-set-values-that-are-never-read.patch - -BuildRequires: cmake,gcc-c++,ninja-build,pkgconfig(rpm),zlib-devel,libsolv-devel -BuildRequires: libxml2-devel,xz-devel,bzip2-devel,libzstd-devel - -Requires: findutils -Requires: curl -Requires: gnupg2 - -Provides: %{name}-tools -Obsoletes: %{name}-tools - -Provides: %{name}-demo -Obsoletes: %{name}-demo +Name: libsolv +Version: 0.7.7 +Release: 2 +Summary: Package dependency solver +License: BSD +URL: https://github.com/openSUSE/libsolv +Source: https://github.com/openSUSE/libsolv/archive/%{version}/%{name}-%{version}.tar.gz +BuildRequires: cmake gcc-c++ ninja-build pkgconfig(rpm) zlib-devel +BuildRequires: libxml2-devel xz-devel bzip2-devel libzstd-devel +Requires: %{_bindir}/find %{_bindir}/curl %{_bindir}/gpg2 +Provides: libsolv-tools libsolv-demo +Obsoletes: libsolv-tools < %{version}-%{release} +Obsoletes: libsolv-demo < %{version}-%{release} %description -This is libsolv, a free package dependency solver using a satisfiability algorithm. +A free package dependency solver using a satisfiability algorithm. The +library is based on two major, but independent, blocks: -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: rpm-devel +- Using a dictionary approach to store and retrieve package + and dependency information. + +- Using satisfiability, a well known and researched topic, for + resolving package dependencies. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} rpm-devel %description devel Development files for %{name}. -%package -n perl-solv -Summary: Perl bindings for the %{name} library -BuildRequires: swig,perl-devel,perl-generators -Requires: %{name} = %{version}-%{release} +%package -n perl-solv +Summary: Perl bindings for the %{name} library +BuildRequires: swig perl-devel perl-generators +Requires: %{name} = %{version}-%{release} %description -n perl-solv Perl bindings for the %{name} library. -%package -n ruby-solv -Summary: Ruby bindings for the %{name} library -BuildRequires: swig,ruby-devel -Requires: %{name} = %{version}-%{release} +%package -n ruby-solv +Summary: Ruby bindings for the %{name} library +BuildRequires: swig ruby-devel +Requires: %{name} = %{version}-%{release} %description -n ruby-solv Ruby bindings for the %{name} library. -%package -n python2-solv -Summary: Python bindings for the %{name} library -BuildRequires: swig,python2-devel -Requires: %{name} = %{version}-%{release} + +%if %{with python2_bindings} +%package -n python2-solv +Summary: Python bindings for the %{name} library +%{?python_provide:%python_provide python2-solv} +BuildRequires: swig python2-devel +Requires: %{name} = %{version}-%{release} %description -n python2-solv -Python2 bindings for the %{name} library. +Python bindings for the %{name} library. +Python 2 version. +%endif -%package -n python3-solv -Summary: Python bindings for the %{name} library -BuildRequires: swig,python3-devel -Requires: %{name} = %{version}-%{release} +%package -n python3-solv +Summary: Python bindings for the %{name} library +%{?python_provide:%python_provide python3-solv} +BuildRequires: swig python3-devel +Requires: %{name} = %{version}-%{release} %description -n python3-solv Python bindings for the %{name} library. +Python 3 version. %package_help %prep -%autosetup -n %{name}-%{version} -p1 +%autosetup -p1 %build -%cmake . -GNinja -DFEDORA=1 -DENABLE_RPMDB=ON -DENABLE_RPMDB_BYRPMHEADER=ON -DENABLE_RPMDB_LIBRPM=ON \ - -DENABLE_RPMPKG_LIBRPM=ON -DENABLE_RPMMD=ON -DENABLE_COMPS=ON -DENABLE_APPDATA=ON -DUSE_VENDORDIRS=ON -DWITH_LIBXML2=ON \ - -DENABLE_LZMA_COMPRESSION=ON -DENABLE_BZIP2_COMPRESSION=ON -DENABLE_ZSTD_COMPRESSION=ON \ - -DENABLE_HELIXREPO=ON -DENABLE_SUSEREPO=ON -DENABLE_DEBIAN=ON -DENABLE_ARCHREPO=ON -DMULTI_SEMANTICS=ON \ - -DENABLE_COMPLEX_DEPS=1 -DENABLE_PERL=ON -DENABLE_RUBY=ON -DENABLE_PYTHON=ON -DPYTHON_EXECUTABLE=%{__python2} \ - -DENABLE_PYTHON3=ON -DPYTHON3_EXECUTABLE=%{__python3} - -%ninja_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_zstd:-DENABLE_ZSTD_COMPRESSION=ON} \ +%if %{with zchunk} + -DENABLE_ZCHUNK_COMPRESSION=ON \ + -DWITH_SYSTEM_ZCHUNK=ON \ +%endif + %{?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} + -DPYTHON_EXECUTABLE=%{__python2} \ +%if %{with python3_bindings} + -DENABLE_PYTHON3=ON \ + -DPYTHON3_EXECUTABLE=%{__python3} \ +%endif +%else + -DPYTHON_EXECUTABLE=%{__python3} \ +%endif +%endif + %{nil} +%ninja_build -C "%{_vpath_builddir}" %install -%ninja_install - -cp -a %{_libdir}/libsolv* %{buildroot}%{_libdir} +%ninja_install -C "%{_vpath_builddir}" %check -%ninja_test +%ninja_test -C "%{_vpath_builddir}" +%if %{undefined ldconfig_scriptlets} +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig +%else %ldconfig_scriptlets +%endif %files %license LICENSE* %{_libdir}/%{name}.so.* %{_libdir}/%{name}ext.so.* -%{_bindir}/{deltainfoxml2solv,dumpsolv,installcheck,mergesolv,repomdxml2solv,solv} -%{_bindir}/{rpmdb2solv,rpmmd2solv,rpms2solv,testsolv,updateinfoxml2solv,repo2solv} -%{_bindir}/{comps2solv,appdata2solv,deb2solv,archpkgs2solv,archrepo2solv,helix2solv,susetags2solv} +%{_bindir}/{solv,dumpsolv,installcheck,mergesolv,rpmdb2solv} +%{_bindir}/{rpms2solv,testsolv,repo2solv,comps2solv,appdata2solv,deb2solv} +%{_bindir}/{archpkgs2solv,archrepo2solv,helix2solv,repomdxml2solv} +%{_bindir}/{deltainfoxml2solv,updateinfoxml2solv,rpmmd2solv,susetags2solv} %files devel %{_libdir}/%{name}.so @@ -122,9 +169,11 @@ cp -a %{_libdir}/libsolv* %{buildroot}%{_libdir} %files -n ruby-solv %{ruby_vendorarchdir}/solv.so +%if %{with python2_bindings} %files -n python2-solv %{python2_sitearch}/_solv.so %{python2_sitearch}/solv.py* +%endif %files -n python3-solv %{python3_sitearch}/_solv.so @@ -137,11 +186,5 @@ cp -a %{_libdir}/libsolv* %{buildroot}%{_libdir} %{_mandir}/man3/%{name}*.3* %changelog -* Wed Nov 20 2019 fangyufa - 0.6.35-5 -- Type:enhancement -- ID:NA -- SUG:NA -- DESC:modify name of cve-patches - -* Sat Nov 9 2019 openEuler Buildteam - 0.6.35-4 -- Package init +* Tue Jan 7 2020 openEuler Buildteam - 0.7.7-2 +- Pakcage init