]> TLD Linux GIT Repositories - packages/poldek.git/commitdiff
- merged 0.44.0 from PLD master
authorMarcin Krol <hawk@tld-linux.org>
Tue, 22 Apr 2025 17:44:59 +0000 (19:44 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Tue, 22 Apr 2025 17:44:59 +0000 (19:44 +0200)
29 files changed:
boolean-deps.patch [deleted file]
db-index-format.patch [deleted file]
egrep-is-obsolete.patch [deleted file]
fix-reinstall-sigsev.patch [new file with mode: 0644]
gcc14.patch [deleted file]
minus.patch [deleted file]
more-trace.patch [deleted file]
no-bdb-for-rpm-org.patch [deleted file]
poldek-https-redirect.patch [deleted file]
poldek-info.patch [deleted file]
poldek-multiarch-x32.patch [deleted file]
poldek-pc.patch [deleted file]
poldek-rsa_sig_rpmorg.patch [deleted file]
poldek.spec
proxy-fix.patch [new file with mode: 0644]
restore-verify-all.patch [new file with mode: 0644]
rpm-4.15.patch [deleted file]
rpm-4.18.patch [deleted file]
rpm4-cpuinfo-deps.patch [deleted file]
rpm4-no-dir-deps.patch [deleted file]
rpm4-rpmvercmp.patch [deleted file]
rpm4-script-req-workaround.patch [deleted file]
rpm4-uname-deps.patch [deleted file]
skip-buildid-obsoletes.patch [deleted file]
sorted-ls-upgradable.patch [deleted file]
sqlite-rpmdb.patch [deleted file]
trurlib-shared.patch [deleted file]
verify-fix.patch [new file with mode: 0644]
verify-signature.patch [deleted file]

diff --git a/boolean-deps.patch b/boolean-deps.patch
deleted file mode 100644 (file)
index 325d1c7..0000000
+++ /dev/null
@@ -1,335 +0,0 @@
-diff -ur poldek-0.42.2/capreq.h poldek-0.42.2-boolean-deps/capreq.h
---- poldek-0.42.2/capreq.h     2020-01-25 22:59:59.000000000 +0100
-+++ poldek-0.42.2-boolean-deps/capreq.h        2022-06-08 20:48:12.797280673 +0200
-@@ -58,6 +58,22 @@
-     char    _buff[0];            /* for evr, first byte is always '\0' */
- };
-+#define CAPREQ_BOOL_OP_AND      (1 << 0)
-+#define CAPREQ_BOOL_OP_OR       (1 << 1)
-+#define CAPREQ_BOOL_OP_IF       (1 << 2)
-+#define CAPREQ_BOOL_OP_UNLESS   (1 << 3)
-+#define CAPREQ_BOOL_OP_ELSE     (1 << 4)
-+#define CAPREQ_BOOL_OP_WITH     (1 << 5)
-+#define CAPREQ_BOOL_OP_WITHOUT  (1 << 6)
-+
-+struct boolean_req {
-+    uint16_t op;                  // and, or, ir (else), with, without, unless (else)
-+    struct capreq* req;
-+    struct boolean_req* left;     // left (and|or|with|without) right
-+    struct boolean_req* leftn;    // left (if|unless) right (else leftn)
-+    struct boolean_req* right;
-+};
-+
- /* CAUTION: side effects! */
- #define capreq_name(cr)     (cr)->name
- #define capreq_name_len(cr)     (cr)->namelen
-diff -ur poldek-0.42.2/install3/requirements.c poldek-0.42.2-boolean-deps/install3/requirements.c
---- poldek-0.42.2/install3/requirements.c      2020-04-06 14:24:18.000000000 +0200
-+++ poldek-0.42.2-boolean-deps/install3/requirements.c 2022-06-08 20:48:12.797280673 +0200
-@@ -16,13 +16,163 @@
- #include "ictx.h"
--static int skip_boolean_dep(const struct capreq *cr) {
--    if (capreq_is_boolean(cr)) {
--        logn(LOGWARN, "%s: skipping boolean dependency (not supported yet)",
--             capreq_stra(cr));
--        return 1;
-+static struct BooleanOpComp {
-+  const char *n;
-+  int l;
-+  uint16_t op;
-+} BooleanOps[] = {
-+  { "and",     3, CAPREQ_BOOL_OP_AND },
-+  { "or",      2, CAPREQ_BOOL_OP_OR },
-+  { "if",      2, CAPREQ_BOOL_OP_IF },
-+  { "unless",  6, CAPREQ_BOOL_OP_UNLESS },
-+  { "with",    4, CAPREQ_BOOL_OP_WITH },
-+  { "without", 7, CAPREQ_BOOL_OP_WITHOUT },
-+  { NULL, 0, 0},
-+};
-+
-+static struct capreq* parse_single_dep(char *req, int *len) {
-+    char *q, *cap, *name, *evr = NULL;
-+    int name_len, evr_len;
-+    struct capreq* cr = NULL;
-+    uint16_t op;
-+
-+    cap = q = strdup(req);
-+    DBGF("dep: %s", q);
-+    // skip whitespace
-+    while (*q == ' ')
-+        q++;
-+    DBGF("ltrim: %s", q);
-+    name = q;
-+    // look for the end of normal dep
-+    while (*q != ' ')
-+        q++;
-+    name_len = q - name;
-+    DBGF("to parse: %s, name: %s, name_len: %d", q, name, name_len);
-+    while (*q == ' ')
-+        q++;
-+    DBGF("ltrim: %s", q);
-+    op = 0;
-+    while (*q != ' ') {
-+        if (*q == '<')
-+            op |= REL_LT;
-+        else if (*q == '=')
-+            op |= REL_EQ;
-+        else if (*q == '>')
-+            op |= REL_GT;
-+        else
-+            break;
-+        q++;
-+    }
-+    DBGF("to parse: %s, op: %d", q, op);
-+    while (*q == ' ')
-+        q++;
-+    DBGF("ltrim: %s", q);
-+    if (op) {
-+        evr = q;
-+        while (*q != ' ' && *q != ')')
-+            q++;
-+        evr_len = q - evr;
-+        DBGF("to parse: evr: %s, evr_len: %d", evr, evr_len);
-+    }
-+    DBGF("to parse: %s", q);
-+    while (*q == ' ')
-+        q++;
-+    DBGF("ltrim: %s", q);
-+    *len = q - cap;
-+    *(name + name_len) = '\0';
-+    DBGF("name: %s, name_len: %d", name, name_len);
-+    if (evr) {
-+        *(evr + evr_len) = '\0';
-+        DBGF("evr: %s, evr_len: %d", evr, evr_len);
-+    }
-+    cr = capreq_new_evr(NULL, name, evr, op, 0);
-+    free(cap);
-+    return cr;
-+}
-+
-+static struct boolean_req* parse_boolean_dep(const char *strreq, uint16_t op, int* len) {
-+    char *p, *q, *cap;
-+    struct boolean_req *breq;
-+    int parsed_len;
-+    struct BooleanOpComp *o;
-+
-+    cap = p = strdup(strreq);
-+    // boolean dep must start with '(' except if we're chaining 'and' or 'or'
-+    if (op != CAPREQ_BOOL_OP_AND && op != CAPREQ_BOOL_OP_OR) {
-+        if (*p != '(')
-+            return NULL;
-+        p++;
-+    }
-+    DBGF("breq: %s", p);
-+    breq = malloc(sizeof(struct boolean_req));
-+    bzero(breq, sizeof(struct boolean_req));
-+    // skip whitespace
-+    while (*p == ' ')
-+        p++;
-+    DBGF("breq ltrim: %s", p);
-+    // nested dep
-+    q = p;
-+    if (*p == '(')
-+        breq->left = parse_boolean_dep(p, 0, &parsed_len);
-+    else
-+        breq->req = parse_single_dep(p, &parsed_len);
-+    q += parsed_len;
-+    DBGF("breq to parse: %s", q);
-+    if (*q == ')') {
-+        if (len)
-+            *len = q - cap;
-+        return breq;
-     }
--    return 0;
-+
-+    for (o = BooleanOps; o->n; o++)
-+        if (!strncmp(q, o->n, o->l))
-+            break;
-+    breq->op = o->op;
-+    if (!breq->op) {
-+        DBGF("fail no-op");
-+        return NULL;
-+    }
-+    q += o->l;
-+    while (*q == ' ')
-+        q++;
-+    if (*q == '(')
-+        breq->right = parse_boolean_dep(q, breq->op, &parsed_len);
-+    else {
-+        breq->right = malloc(sizeof(struct boolean_req));
-+        bzero(breq->right, sizeof(struct boolean_req));
-+        breq->right->req = parse_single_dep(q, &parsed_len);
-+    }
-+    q += parsed_len;
-+    if (*q == ')') {
-+        if (len)
-+            *len = q - cap;
-+        return breq;
-+    }
-+
-+    if (breq->op == CAPREQ_BOOL_OP_IF || breq->op == CAPREQ_BOOL_OP_UNLESS) {
-+        if (!strncmp(q, "else", 4)) {
-+            q += 4;
-+          while (*q == ' ')
-+              q++;
-+          if (*q == '(')
-+              breq->leftn = parse_boolean_dep(q, breq->op, &parsed_len);
-+          else {
-+              breq->leftn = malloc(sizeof(struct boolean_req));
-+              bzero(breq->leftn, sizeof(struct boolean_req));
-+              breq->leftn->req = parse_single_dep(q, &parsed_len);
-+          }
-+      }
-+    }
-+    while (*q == ' ')
-+        q++;
-+    if (*q != ')' && op != CAPREQ_BOOL_OP_AND && op != CAPREQ_BOOL_OP_OR) {
-+        DBGF("fail no closing paren");
-+        return NULL;
-+    }
-+
-+    if (len)
-+        *len = q - cap;
-+    return breq;
- }
- static
-@@ -553,8 +703,11 @@
- }
-+
-+// i3pkg - package to be installed
-+// req - dependency we are looking for
- static int process_req(int indent, struct i3ctx *ictx,
--                       struct i3pkg *i3pkg, const struct capreq *req)
-+                       struct i3pkg *i3pkg, const struct capreq *req, int boolean)
- {
-     struct poldek_ts *ts = ictx->ts; /* just for short */
-     struct pkg       *pkg, *tomark = NULL;
-@@ -644,7 +797,8 @@
-     else
-         errfmt = _("%s: req %s not found");
--    i3_error(ictx, pkg, I3ERR_NOTFOUND, errfmt, pkg_id(pkg), strreq);
-+    if (boolean == 0)
-+        i3_error(ictx, pkg, I3ERR_NOTFOUND, errfmt, pkg_id(pkg), strreq);
-     rc = 0;
-  l_end:
-@@ -653,6 +807,49 @@
-     return rc;
- }
-+static int process_boolean_req(int indent, struct i3ctx *ictx,
-+                               struct i3pkg *i3pkg, const struct boolean_req *breq)
-+{
-+    int rcl, rcr, rce;
-+    if (breq->req)
-+        rcl = process_req(indent, ictx, i3pkg, breq->req, 1);
-+    else
-+        rcl = process_boolean_req(indent, ictx, i3pkg, breq->left);
-+    if (breq->op != CAPREQ_BOOL_OP_OR)
-+        if (breq->right)
-+            rcr = process_boolean_req(indent, ictx, i3pkg, breq->right);
-+        else
-+            return rcl;
-+    switch (breq->op) {
-+        case CAPREQ_BOOL_OP_AND:
-+            return (rcl > 0 && rcr > 0) ? 1 : -1;
-+        case CAPREQ_BOOL_OP_OR:
-+            if (rcl <= 0 && breq->right)
-+                return process_boolean_req(indent, ictx, i3pkg, breq->right);
-+            return rcl;
-+        case CAPREQ_BOOL_OP_IF:
-+            if (rcr > 0)
-+                return rcl;
-+            if (breq->leftn)
-+                return process_boolean_req(indent, ictx, i3pkg, breq->leftn);
-+            return 1;
-+        case CAPREQ_BOOL_OP_UNLESS:
-+            if (rcr <= 0)
-+                return rcl;
-+            if (breq->leftn)
-+                return process_boolean_req(indent, ictx, i3pkg, breq->leftn);
-+            return 1;
-+        case CAPREQ_BOOL_OP_WITH:
-+          // TODO: check that both deps are stisfied by the same package
-+            return (rcl > 0 && rcr > 0) ? 1 : -1;
-+        case CAPREQ_BOOL_OP_WITHOUT:
-+          // TODO: check that both deps are stisfied by the same package
-+            return (rcl > 0 && rcr <= 0) ? 1 : -1;
-+        default:
-+            return -1;
-+    }
-+    return -1;
-+}
- static tn_array *with_suggests(int indent, struct i3ctx *ictx, struct pkg *pkg)
- {
-@@ -660,6 +857,7 @@
-     struct pkg *oldpkg = NULL;
-     char *autochoice = NULL;    /* testing only */
-     int i;
-+    struct boolean_req* breq;
-     if (pkg->sugs == NULL)
-         return NULL;
-@@ -693,8 +891,14 @@
-         //trace(indent, "%d) suggested %s", i, reqstr);
--        if (skip_boolean_dep(req))
-+        if (capreq_is_boolean(req)) {
-+            logn(LOGWARN, "%s: skipping boolean dependency (weak deps not supported yet)",
-+                capreq_stra(req));
-+            // TODO
-+            // breq = parse_boolean_dep(capreq_name(req), 0, NULL);
-+            // process_boolean_req(indent, ictx, i3pkg, breq);
-             continue;
-+        }
-         if (iset_provides(ictx->inset, req)) {
-             trace(indent, "- %s: already marked", reqstr);
-@@ -791,6 +995,7 @@
-     const struct capreq *req = NULL;
-     unsigned            itflags = PKG_ITER_REQIN;
-     int                 nerrors = 0, backtrack = 0;
-+    struct boolean_req* breq;
-     pkg = i3pkg->pkg;
-     n_assert(pkg);
-@@ -806,10 +1011,18 @@
-     while ((req = pkg_req_iter_get(it))) {
-         int rc;
--        if (skip_boolean_dep(req))
--            continue;
-+        if (capreq_is_boolean(req)) {
-+            msgn_i(1, indent, "%s required by %s",
-+                   capreq_stra(req), pkg->name ? pkg->name : "(null)");
-+            breq = parse_boolean_dep(capreq_name(req), 0, NULL);
-+            rc = process_boolean_req(indent + 2, ictx, i3pkg, breq);
-+            if (rc <= 0)
-+                i3_error(ictx, i3pkg->pkg, I3ERR_NOTFOUND, _("%s: req %s not found"), pkg_id(i3pkg->pkg), capreq_stra(req));
-+        } else {
-+            rc = process_req(indent, ictx, i3pkg, req, 0);
-+        }
--        if ((rc = process_req(indent, ictx, i3pkg, req)) <= 0) {
-+        if (rc <= 0) {
-             nerrors++;
-             if (rc < 0) {
-                 backtrack = 1;
-@@ -836,7 +1049,7 @@
-               req = n_array_nth(suggests, i);
--              if ((rc = process_req(indent, ictx, i3pkg, req)) <= 0) {
-+              if ((rc = process_req(indent, ictx, i3pkg, req, 0)) <= 0) {
-                   nerrors++;
-                   if (rc < 0) {
-                       backtrack = 1;
diff --git a/db-index-format.patch b/db-index-format.patch
deleted file mode 100644 (file)
index 76d9de0..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- poldek-0.42.2/pm/rpmorg/rpmdb_depdirs.c~   2020-10-21 15:02:08.000000000 +0200
-+++ poldek-0.42.2/pm/rpmorg/rpmdb_depdirs.c    2020-10-21 15:02:22.244854642 +0200
-@@ -74,9 +74,7 @@
-     
-     index = "Requirename";
--#ifdef HAVE_RPM_5
-     dbtype = DB_BTREE; /* XXX: should be detected at runtime */
--#endif
-     if (rootdir == NULL)
-         rootdir = "/";
-     
diff --git a/egrep-is-obsolete.patch b/egrep-is-obsolete.patch
deleted file mode 100644 (file)
index d2a434e..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
---- poldek-0.42.2/scripts/vfcompr~     2020-01-25 22:59:59.000000000 +0100
-+++ poldek-0.42.2/scripts/vfcompr      2022-09-11 12:57:50.696482611 +0200
-@@ -11,7 +11,7 @@
-     typeset dest=$2
-     cmd="bzip2 --stdout ${src}"
--    if echo ${dest} | egrep ".gz" >/dev/null; then
-+    if echo ${dest} | grep -E ".gz" >/dev/null; then
-         cmd="gzip -9nf --stdout ${src}"
-     fi
-     echo "$cmd > $dest"
-@@ -34,7 +34,7 @@
-     fi
-     cmd="bunzip2 --keep --stdout ${src}"
--    if echo ${src} | egrep ".gz" >/dev/null; then
-+    if echo ${src} | grep -E ".gz" >/dev/null; then
-         cmd="gunzip --stdout ${src}"
-     fi
-     rm -f "$dest"
---- poldek-0.42.2/Makefile.extra~      2020-01-25 22:59:59.000000000 +0100
-+++ poldek-0.42.2/Makefile.extra       2022-09-11 12:59:01.885518021 +0200
-@@ -72,7 +72,7 @@
- POTFILES_in:
-       -rm -f poldek-git*
--      -find . -type f -name \*.c | egrep -v '(poldek-.*/|Cellar/|intl/|trurlib/|tndb/|python/|tests/|conf_sections.c)'  | sed 's|^\./||' | LC_ALL=C sort > po/POTFILES.in
-+      -find . -type f -name \*.c | grep -E -v '(poldek-.*/|Cellar/|intl/|trurlib/|tndb/|python/|tests/|conf_sections.c)'  | sed 's|^\./||' | LC_ALL=C sort > po/POTFILES.in
- misarch: mclean
-       $(MAKE) -C . backup cparch=1 backupdir=/z
---- poldek-0.42.2/tests/sh/03-up-loop~ 2020-04-09 12:53:57.000000000 +0200
-+++ poldek-0.42.2/tests/sh/03-up-loop  2022-09-11 13:00:01.988044987 +0200
-@@ -15,10 +15,10 @@
- load() {
-   $POLDEK_UP -q --skip-installed -Osource="test,type=pndir $REPOURL" -n test \
--           --cmd 'desc -al *' | egrep -v '^Path:' > $TMPDIR/local-dump
-+           --cmd 'desc -al *' | grep -E -v '^Path:' > $TMPDIR/local-dump
-   $POLDEK_NOCONF -q --skip-installed --st pndir -s $REPO \
--           --cmd 'desc -al *' | egrep -v '^Path:' > $TMPDIR/remote-dump
-+           --cmd 'desc -al *' | grep -E -v '^Path:' > $TMPDIR/remote-dump
-   #less         $TMPDIR/remote-dump
-   #ls -l $TMPDIR/remote-dump $TMPDIR/local-dump
---- poldek-0.42.2/tests/sh/lib/setup~  2020-03-27 08:50:43.000000000 +0100
-+++ poldek-0.42.2/tests/sh/lib/setup   2022-09-11 13:00:26.557717267 +0200
-@@ -56,7 +56,7 @@
- while test $# -gt 0 ; do
-     case "${1}" in
-         -l)
--           egrep -B 1 ^test $0 | sed 's|()||g;s|{||g'; exit; shift ;;
-+           grep -E -B 1 ^test $0 | sed 's|()||g;s|{||g'; exit; shift ;;
-         --source-repo)
-             shift; SOURCE_REPO="${1}"; shift ;;
---- poldek-0.42.2/tests/sh/lib/solver-setup~   2020-03-31 11:46:23.000000000 +0200
-+++ poldek-0.42.2/tests/sh/lib/solver-setup    2022-09-11 13:00:42.930832785 +0200
-@@ -8,7 +8,7 @@
-     [ $# -gt 0 ] && version="$1";
-     #echo "v $version"
-     if [ -n "$version" ]; then
--        if echo "$version" | egrep -qv -- '^-'; then
-+        if echo "$version" | grep -E -qv -- '^-'; then
-             shift
-         else
-             version="1-1"
-@@ -85,17 +85,17 @@
-     fi
-     # run again to check installation results
--    typeset out=$($POLDEK_INSTALL $cmd --parsable-tr-summary | egrep "^%[IDR]")
-+    typeset out=$($POLDEK_INSTALL $cmd --parsable-tr-summary | grep -E "^%[IDR]")
-     if [ -n "$expected" ]; then
--        typeset n_all=$(echo $out | sed 's|%|\n%|g' | egrep '^%[ID]' | wc -l)
--        typeset n=$(echo $out | sed 's|%|\n%|g' | egrep "^%[ID] ($regexp)" | wc -l)
-+        typeset n_all=$(echo $out | sed 's|%|\n%|g' | grep -E '^%[ID]' | wc -l)
-+        typeset n=$(echo $out | sed 's|%|\n%|g' | grep -E "^%[ID] ($regexp)" | wc -l)
-         assertEquals "unexpected ($n_all) number of packages (expected $n)" "$n_all" "$n"
-         assertEquals "not all or non expected packages installed (expected $expected)" "$n" "$n_expected"
-     fi
-     if [ -n "$rm_expected" ]; then
--        typeset n_all=$(echo $out | sed 's|%|\n%|g' | egrep '^%R' | wc -l)
--        typeset n=$(echo  $out | sed 's|%|\n%|g' | egrep "^%R ($rm_regexp)" | wc -l)
-+        typeset n_all=$(echo $out | sed 's|%|\n%|g' | grep -E '^%R' | wc -l)
-+        typeset n=$(echo  $out | sed 's|%|\n%|g' | grep -E "^%R ($rm_regexp)" | wc -l)
-         assertEquals "unexpected ($n_all) number of packages removed (expected $n)" "$n_all" "$n"
-         assertEquals "not all or non expected packages removed (expected $rm_expected)" "$n" "$rm_n_expected"
-     fi
-@@ -127,12 +127,12 @@
-         $POLDEK_UNINSTALL $cmd --test
-     fi
--    typeset out=$($POLDEK_UNINSTALL $cmd --parsable-tr-summary | egrep "^%[DR]")
-+    typeset out=$($POLDEK_UNINSTALL $cmd --parsable-tr-summary | grep -E "^%[DR]")
-     [ $? -eq 0 ] || fail "$POLDEK_INSTALL $cmd failed"
-     if [ -n "$expected" ]; then
--        typeset n_all=$(echo $out | sed 's|%|\n%|g' | egrep '^%[RD]' | wc -l)
--        typeset n=$(echo $out | sed 's|%|\n%|g' | egrep "^%[RD] ($regexp)" | wc -l)
-+        typeset n_all=$(echo $out | sed 's|%|\n%|g' | grep -E '^%[RD]' | wc -l)
-+        typeset n=$(echo $out | sed 's|%|\n%|g' | grep -E "^%[RD] ($regexp)" | wc -l)
-         assertEquals "unexpected ($n_all) number of packages (expected $n)" "$n_all" "$n"
-         assertEquals "not all or non expected packages uninstalled (expected $expected)" "$n" "$n_expected"
-     fi
diff --git a/fix-reinstall-sigsev.patch b/fix-reinstall-sigsev.patch
new file mode 100644 (file)
index 0000000..bc05b88
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/pkgset-dep.c b/pkgset-dep.c
+index ddaf74e..f035cd9 100644
+--- a/pkgset-dep.c
++++ b/pkgset-dep.c
+@@ -293,6 +293,8 @@ tn_array *get_conflicted(int indent, struct pkgset *ps,
+     const struct capreq_idx_ent *ent;
+     const char *cnflname = capreq_name(cnfl);
++    pkgset__index_caps(ps);
++
+     if ((ent = capreq_idx_lookup(&ps->cap_idx, cnflname, capreq_name_len(cnfl)))) {
+         struct pkg **suspkgs = (struct pkg **)ent->pkgs;
+         int nmatch = 0;
diff --git a/gcc14.patch b/gcc14.patch
deleted file mode 100644 (file)
index 8d509c0..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- poldek-0.42.2/pm/rpmorg/install.c.orig     2020-01-25 22:59:59.000000000 +0100
-+++ poldek-0.42.2/pm/rpmorg/install.c  2024-11-26 23:59:38.132248185 +0100
-@@ -77,8 +77,8 @@
- static void *install_cb(const void *h __attribute__((unused)),
-                         const enum rpmCallbackType_e op,
--                        const long long unsigned int amount,
--                        const long long unsigned int total,
-+                        const long unsigned int amount,
-+                        const long unsigned int total,
-                         const void *pkgpath,
-                         void *data __attribute__((unused)))
- {
diff --git a/minus.patch b/minus.patch
deleted file mode 100644 (file)
index 3f394cf..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -up poldek-0.42.2/ts_summary.c.rel poldek-0.42.2/ts_summary.c
---- poldek-0.42.2/ts_summary.c.rel
-+++ poldek-0.42.2/ts_summary.c
-@@ -202,7 +202,7 @@
-         poldek_term_snprintf_c(old_color, old, sizeof(old), "%s", old_pkg->rel);
-         poldek_term_snprintf_c(new_color, new, sizeof(new), "%s", pkg->rel);
--        n = n_snprintf(line, size, "%s-%s.(%s => %s).%s",
-+        n = n_snprintf(line, size, "%s-%s-(%s => %s).%s",
-                    pkg->name, pkg->ver, old, new, arch);
-     } else if (!eq_ver && !eq_rel) {
diff --git a/more-trace.patch b/more-trace.patch
deleted file mode 100644 (file)
index d96c7a9..0000000
+++ /dev/null
@@ -1,259 +0,0 @@
-diff -ur poldek-0.42.2/cli/cmd_chain.c poldek-0.42.2-booldeps/cli/cmd_chain.c
---- poldek-0.42.2/cli/cmd_chain.c      2020-01-25 22:59:59.000000000 +0100
-+++ poldek-0.42.2-booldeps/cli/cmd_chain.c     2022-05-19 16:33:21.159335140 +0200
-@@ -29,7 +29,6 @@
- #include "compiler.h"
- #include "i18n.h"
- #include "poldek_util.h"
--#define ENABLE_TRACE 0
- #include "log.h"
- #include "cli.h"
- #include "cmd_chain.h"
-diff -ur poldek-0.42.2/conf.c poldek-0.42.2-booldeps/conf.c
---- poldek-0.42.2/conf.c       2020-03-10 11:19:28.000000000 +0100
-+++ poldek-0.42.2-booldeps/conf.c      2022-05-19 16:32:35.185649828 +0200
-@@ -34,7 +34,6 @@
- #include <trurl/nstream.h>
- #include <vfile/vfile.h>
--#define ENABLE_TRACE 0
- #include "compiler.h"
- #include "i18n.h"
- #include "log.h"
-diff -ur poldek-0.42.2/depdirs.c poldek-0.42.2-booldeps/depdirs.c
---- poldek-0.42.2/depdirs.c    2020-01-25 22:59:59.000000000 +0100
-+++ poldek-0.42.2-booldeps/depdirs.c   2022-05-19 16:32:32.922297335 +0200
-@@ -22,7 +22,6 @@
- #include <trurl/nassert.h>
- #include <trurl/nmalloc.h>
--#define ENABLE_TRACE 0
- #include "compiler.h"
- #include "log.h"
- #include "i18n.h"
-diff -ur poldek-0.42.2/install3/ictx.h poldek-0.42.2-booldeps/install3/ictx.h
---- poldek-0.42.2/install3/ictx.h      2020-04-04 21:01:09.000000000 +0200
-+++ poldek-0.42.2-booldeps/install3/ictx.h     2022-05-19 16:32:43.675720130 +0200
-@@ -17,7 +17,6 @@
- #include <trurl/trurl.h>
- #include <sigint/sigint.h>
--#define ENABLE_TRACE 0
- #include "i18n.h"
- #include "log.h"
- #include "misc.h"
-diff -ur poldek-0.42.2/install3/iset.c poldek-0.42.2-booldeps/install3/iset.c
---- poldek-0.42.2/install3/iset.c      2020-01-25 22:59:59.000000000 +0100
-+++ poldek-0.42.2-booldeps/install3/iset.c     2022-05-19 16:32:41.449035264 +0200
-@@ -14,8 +14,6 @@
- # include "config.h"
- #endif
--#define ENABLE_TRACE 0
--
- #include <stdlib.h>
- #include <string.h>
- #include <sys/param.h>          /* for PATH_MAX */
-diff -ur poldek-0.42.2/pkg.c poldek-0.42.2-booldeps/pkg.c
---- poldek-0.42.2/pkg.c        2022-05-20 16:21:07.639370807 +0200
-+++ poldek-0.42.2-booldeps/pkg.c       2022-05-19 16:49:06.084231070 +0200
-@@ -27,7 +27,6 @@
- #include <trurl/nstr.h>
- #include <trurl/nassert.h>
--#define ENABLE_TRACE 0
- #include "compiler.h"
- #include "i18n.h"
- #include "log.h"
-@@ -683,7 +682,7 @@
-             }
-             if (cap_xmatch_req(cap, req, flags)) {
--                DBGF("  cap[%d] %s -> match\n", i, capreq_snprintf_s(cap));
-+                DBGF("  cap[%d] %s -> match (pkg: %s)\n", i, capreq_snprintf_s(cap), pkg->name);
-                 return 1;
-             }
-diff -ur poldek-0.42.2/pkgcmp.c poldek-0.42.2-booldeps/pkgcmp.c
---- poldek-0.42.2/pkgcmp.c     2020-03-16 14:27:06.000000000 +0100
-+++ poldek-0.42.2-booldeps/pkgcmp.c    2022-05-19 16:34:31.123077977 +0200
-@@ -22,7 +22,6 @@
- #include <trurl/nstr.h>
- #include <trurl/nassert.h>
--#define ENABLE_TRACE 0
- #include "compiler.h"
- #include "i18n.h"
- #include "log.h"
-@@ -360,9 +359,9 @@
- #if ENABLE_TRACE
-     if (pkg_cmp_name_evr_rev(p1, p2) == 0)
--        logn(LOGNOTICE, "uniq %s: keep %s (score %d), removed %s (score %d)",
-+        logn(LOGNOTICE, "uniq %s: keep %s (score %d), removed %s",
-              pkg_snprintf_s(p1), pkg_arch(p1), pkg_arch_score(p1),
--             pkg_arch(p2), pkg_archscore(p2));
-+             pkg_arch(p2));
- #endif
-     rc = pkg_cmp_name_evr_rev(p1, p2);
-diff -ur poldek-0.42.2/pkgdir/pkgdir.c poldek-0.42.2-booldeps/pkgdir/pkgdir.c
---- poldek-0.42.2/pkgdir/pkgdir.c      2020-03-26 10:22:47.000000000 +0100
-+++ poldek-0.42.2-booldeps/pkgdir/pkgdir.c     2022-05-19 16:33:01.562526953 +0200
-@@ -35,7 +35,6 @@
- #include <vfile/vfile.h>
--#define ENABLE_TRACE 0
- #include "compiler.h"
- #include "i18n.h"
- #include "log.h"
-diff -ur poldek-0.42.2/pkgdir/source.c poldek-0.42.2-booldeps/pkgdir/source.c
---- poldek-0.42.2/pkgdir/source.c      2020-03-16 15:23:52.000000000 +0100
-+++ poldek-0.42.2-booldeps/pkgdir/source.c     2022-05-19 16:32:57.605830198 +0200
-@@ -29,8 +29,6 @@
- #include <vfile/vfile.h>
--#define ENABLE_TRACE 0
--
- #include "compiler.h"
- #include "pkgdir.h"
- #include "pkgdir_intern.h"
-diff -ur poldek-0.42.2/pkgdir/source_mkidx.c poldek-0.42.2-booldeps/pkgdir/source_mkidx.c
---- poldek-0.42.2/pkgdir/source_mkidx.c        2020-03-25 21:14:48.000000000 +0100
-+++ poldek-0.42.2-booldeps/pkgdir/source_mkidx.c       2022-05-19 16:32:55.049143819 +0200
-@@ -29,8 +29,6 @@
- #include <vfile/vfile.h>
--#define ENABLE_TRACE 0
--
- #include "compiler.h"
- #include "pkgdir.h"
- #include "pkgdir_intern.h"
-diff -ur poldek-0.42.2/pkgiter.c poldek-0.42.2-booldeps/pkgiter.c
---- poldek-0.42.2/pkgiter.c    2020-04-04 21:01:09.000000000 +0200
-+++ poldek-0.42.2-booldeps/pkgiter.c   2022-05-19 16:33:05.289221486 +0200
-@@ -24,7 +24,6 @@
- #include <trurl/nstr.h>
- #include <trurl/nassert.h>
--#define ENABLE_TRACE 0
- #include "compiler.h"
- #include "i18n.h"
- #include "log.h"
-diff -ur poldek-0.42.2/pkgroup.c poldek-0.42.2-booldeps/pkgroup.c
---- poldek-0.42.2/pkgroup.c    2020-01-25 22:59:59.000000000 +0100
-+++ poldek-0.42.2-booldeps/pkgroup.c   2022-05-19 16:33:19.022653641 +0200
-@@ -21,8 +21,6 @@
- #include <trurl/trurl.h>
--#define ENABLE_TRACE 0
--
- #include "compiler.h"
- #include "i18n.h"
- #include "log.h"
-diff -ur poldek-0.42.2/pm/pkgdb.c poldek-0.42.2-booldeps/pm/pkgdb.c
---- poldek-0.42.2/pm/pkgdb.c   2020-04-05 21:03:29.000000000 +0200
-+++ poldek-0.42.2-booldeps/pm/pkgdb.c  2022-05-19 18:03:20.192624394 +0200
-@@ -409,6 +409,7 @@
-     struct pkg  pkg;
-     int         rc;
-+    DBGF("header_cap_match_req\n");
-     rc = 0;
-     memset(&pkg, 0, sizeof(pkg));
-     pkg.caps = capreq_arr_new(0);
-@@ -456,7 +457,7 @@
-     int is_file;
-     is_file = (*capreq_name(req) == '/' ? 1 : 0);
--    //tracef(0, "%s %d", capreq_snprintf_s(req), n_array_size(exclude));
-+    tracef(0, "%s %d", capreq_snprintf_s(req), n_array_size(exclude));
-     if (!is_file && db_match(db, PMTAG_NAME, req, exclude, ma_flags))
-         return 1;
-diff -ur poldek-0.42.2/pm/rpm/rpmdb_it.c poldek-0.42.2-booldeps/pm/rpm/rpmdb_it.c
---- poldek-0.42.2/pm/rpm/rpmdb_it.c    2020-01-25 22:59:59.000000000 +0100
-+++ poldek-0.42.2-booldeps/pm/rpm/rpmdb_it.c   2022-05-19 16:32:46.145740124 +0200
-@@ -14,7 +14,6 @@
- # include "config.h"
- #endif
--#define ENABLE_TRACE 0
- #include "i18n.h"
- #include "misc.h"
- #include "log.h"
-diff -ur poldek-0.42.2/pm/rpmorg/rpmdb_it.c poldek-0.42.2-booldeps/pm/rpmorg/rpmdb_it.c
---- poldek-0.42.2/pm/rpmorg/rpmdb_it.c 2020-01-25 22:59:59.000000000 +0100
-+++ poldek-0.42.2-booldeps/pm/rpmorg/rpmdb_it.c        2022-05-19 16:32:49.022429816 +0200
-@@ -14,7 +14,6 @@
- # include "config.h"
- #endif
--#define ENABLE_TRACE 0
- #include "i18n.h"
- #include "misc.h"
- #include "log.h"
-diff -ur poldek-0.42.2/pm/rpmorg/rpm_pkg_ld.c poldek-0.42.2-booldeps/pm/rpmorg/rpm_pkg_ld.c
---- poldek-0.42.2/pm/rpmorg/rpm_pkg_ld.c       2022-05-20 16:21:07.646037483 +0200
-+++ poldek-0.42.2-booldeps/pm/rpmorg/rpm_pkg_ld.c      2022-05-20 15:27:51.747648780 +0200
-@@ -218,10 +218,10 @@
-             goto l_end;
-         } else {
--            msg(5, "%s%s: %s\n",
-+            DBGF("%s%s: %s, %s\n",
-                 cr->cr_flags & CAPREQ_PREREQ ?
-                 (pmcap_tag == PMCAP_OBSL ? "obsl" : "pre" ):"",
--                tgs->label, capreq_snprintf_s(cr));
-+                tgs->label, capreq_snprintf_s(cr), name);
-             n_array_push(arr, cr);
-         }
-     }
-diff -ur poldek-0.42.2/tndb/write.c poldek-0.42.2-booldeps/tndb/write.c
---- poldek-0.42.2/tndb/write.c 2020-01-25 23:27:30.000000000 +0100
-+++ poldek-0.42.2-booldeps/tndb/write.c        2022-05-19 16:33:15.672630089 +0200
-@@ -28,7 +28,6 @@
- #include <trurl/narray.h>
- #include <trurl/nassert.h>
--#define ENABLE_TRACE 0
- #include "compiler.h"
- #include "tndb_int.h"
- #include "tndb.h"
-diff -ur poldek-0.42.2/uninstall.c poldek-0.42.2-booldeps/uninstall.c
---- poldek-0.42.2/uninstall.c  2020-01-25 22:59:59.000000000 +0100
-+++ poldek-0.42.2-booldeps/uninstall.c 2022-05-19 16:32:52.129121034 +0200
-@@ -27,7 +27,6 @@
- #include <trurl/trurl.h>
- #include "sigint/sigint.h"
--#define ENABLE_TRACE 0
- #include "compiler.h"
- #include "i18n.h"
- #include "log.h"
-diff -ur poldek-0.42.2/upgrade-dist.c poldek-0.42.2-booldeps/upgrade-dist.c
---- poldek-0.42.2/upgrade-dist.c       2020-01-25 22:59:59.000000000 +0100
-+++ poldek-0.42.2-booldeps/upgrade-dist.c      2022-05-19 16:33:23.476017725 +0200
-@@ -29,7 +29,6 @@
- #include <sigint/sigint.h>
--#define ENABLE_TRACE 0
- #include "compiler.h"
- #include "i18n.h"
- #include "log.h"
-diff -ur poldek-0.42.2/vfile/vopen3.c poldek-0.42.2-booldeps/vfile/vopen3.c
---- poldek-0.42.2/vfile/vopen3.c       2020-01-25 22:59:59.000000000 +0100
-+++ poldek-0.42.2-booldeps/vfile/vopen3.c      2022-05-19 16:32:37.749004646 +0200
-@@ -50,7 +50,6 @@
- #include <trurl/nassert.h>
- #include <trurl/nmalloc.h>
--#define ENABLE_TRACE 0
- #include "compiler.h"
- #include "i18n.h"
- #include "log.h"                /* for DBGF */
diff --git a/no-bdb-for-rpm-org.patch b/no-bdb-for-rpm-org.patch
deleted file mode 100644 (file)
index 992566d..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- poldek-0.42.2/configure.ac~        2021-11-11 23:41:40.000000000 +0100
-+++ poldek-0.42.2/configure.ac 2021-11-11 23:52:39.152953112 +0100
-@@ -327,7 +327,7 @@
-       #fi
- else
-     if test "${is_rpmorg}." = "yes."; then
--      AC_CHECK_LIB(db, db_create, [DBLIB="-ldb"],,[$LIBS])
-+      : ;
-     else
-         AC_CHECK_LIB(db4, db_create, [DBLIB="-ldb4" DBINCLUDE="-I/usr/include/db4"],
-             [AC_CHECK_LIB(db-4.1, db_create, [DBLIB="-ldb-4.1" DBINCLUDE="-I/usr/include/db4.1"],
-@@ -372,9 +372,11 @@
-                             AC_DEFINE([HAVE_RPM_4_2],1,[])])
- AC_CHECK_FUNCS(hGetColor, AC_DEFINE([HAVE_RPM_HGETCOLOR],1,[]))
-+if test "${is_rpmorg}." != "yes."; then
- AC_CHECK_HEADERS([db_185.h],,[
-       AC_MSG_WARN(["disabled synchronization with db file-dependencies"]) ])
- AC_CHECK_FUNCS(__db185_open)
-+fi
- dnl 4.0.4 has cross dependenecies(?)
- if test "${is_rpm4_0_4}." = "yes." -a "${ENABLE_STATIC}." = "yes." ; then
diff --git a/poldek-https-redirect.patch b/poldek-https-redirect.patch
deleted file mode 100644 (file)
index 4a7cb8c..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
---- poldek-0.42.2/vfile/vfffmod.c.orig 2020-01-25 22:59:59.000000000 +0100
-+++ poldek-0.42.2/vfile/vfffmod.c      2023-10-19 14:05:44.263325854 +0200
-@@ -269,10 +269,10 @@
-         char topath[PATH_MAX + 128], *topathp = vreq.redirected_to;
-         int  foreign_proto = 0;
--        n_assert(cn->proto == VCN_PROTO_HTTP);
-+        n_assert(cn->proto == VCN_PROTO_HTTP || cn->proto == VCN_PROTO_HTTPS);
-         if (*vreq.redirected_to == '/') {
--            snprintf(topath, sizeof(topath), "http://%s%s", req->host,
-+            snprintf(topath, sizeof(topath), "http%s://%s%s", cn->proto == VCN_PROTO_HTTPS ? "s" : "" , req->host,
-                      vreq.redirected_to);
-             topathp = topath;
-         } else if (strncmp(vreq.redirected_to, "http://", 7) != 0)
diff --git a/poldek-info.patch b/poldek-info.patch
deleted file mode 100644 (file)
index 975e094..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---- poldek-0.42.2/doc/manual.xml.orig  2020-01-25 22:59:59.000000000 +0100
-+++ poldek-0.42.2/doc/manual.xml       2020-04-13 16:10:47.472359736 +0200
-@@ -44,7 +44,7 @@
-  <titleabbrev role="texinfo-node">poldek</titleabbrev>
-  <abstract role="texinfo-node">
-   <para>
--    full-featured frontend to RPM.
-+    Full-featured frontend to RPM
-   </para>
-  </abstract>
---- poldek-0.42.2/doc/Makefile.am.orig 2020-01-25 22:59:59.000000000 +0100
-+++ poldek-0.42.2/doc/Makefile.am      2020-04-13 16:12:58.478316683 +0200
-@@ -81,7 +81,7 @@
-       docbook2X2texi --xinclude $< -o $(@D) || docbook2texi --xinclude $< || true
-       perl -pi -e 's|\@emph\{|\@samp\{|g' poldek.texi
-       makeinfo --no-split --force poldek.texi -o $@
--      perl -pi -e 's/^\* poldek manual: \(poldek\)(.+)$$/* poldek: (poldek)$$1/' $@
-+      perl -pi -e 's/^\* poldek manual: \(poldek\)\. *(.+)$$/* poldek: (poldek).\t\t\t$$1/' $@
-       rm -f *.texi
- manual.html: manual.xml.xhtml.tmp
diff --git a/poldek-multiarch-x32.patch b/poldek-multiarch-x32.patch
deleted file mode 100644 (file)
index 50b7136..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/pkg.c b/pkg.c
-index 9e1bf9c..ed62efd 100644
---- a/pkg.c
-+++ b/pkg.c
-@@ -74,8 +74,11 @@ int pkgmod_register_arch(const char *arch)
-         an_arch->score = pm_architecture_score(arch);
-         n_assert(an_arch->score >= 0);
--        if (!an_arch->score)    /* make it most less preferred */
--            an_arch->score = INT_MAX - 1;
-+        if (an_arch->score == 0) {
-+            /* make it most less preferred, but differ from other zero-scored
-+               archs (i686 and x86_64 on x32 case) */
-+            an_arch->score = INT_MAX - n_array_size(architecture_a) - 1;
-+        }
-         DBGF("register %s with score %d\n", arch, an_arch->score);
-         memcpy(an_arch->arch, arch, len + 1);
diff --git a/poldek-pc.patch b/poldek-pc.patch
deleted file mode 100644 (file)
index 983e08b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- poldek-0.42.0/Makefile.am.orig     2020-03-13 21:18:10.790060106 +0100
-+++ poldek-0.42.0/Makefile.am  2020-03-14 14:15:41.899317877 +0100
-@@ -135,7 +135,7 @@
- poldek.pc:
-       @ ( echo 'prefix=$(prefix)'; \
-               echo 'exec_prefix=$${exec_prefix}'; \
--              echo 'libdir=$${exec_prefix}/lib'; \
-+              echo 'libdir=$(libdir)'; \
-               echo 'includedir=$${includedir}'; \
-               echo ''; \
-               echo 'Name: poldek'; \
diff --git a/poldek-rsa_sig_rpmorg.patch b/poldek-rsa_sig_rpmorg.patch
deleted file mode 100644 (file)
index cc1701e..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- poldek-0.42.2/pm/rpmorg/signature.c.orig   2021-04-17 12:56:41.167478071 +0200
-+++ poldek-0.42.2/pm/rpmorg/signature.c        2021-04-17 12:56:12.007632757 +0200
-@@ -99,6 +99,9 @@
-         switch (td.tag) {
-             case RPMSIGTAG_RSA:
-+                flags |= PKGVERIFY_PGP;
-+                flags |= PKGVERIFY_GPG;
-+                break;
-             case RPMSIGTAG_PGP5:      /* XXX legacy */
-             case RPMSIGTAG_PGP:
-                 flags |= PKGVERIFY_PGP;
index a855c9186107ea13fd7168e4f6b137b1a5411af5..8cf09f997aab863a655a18e0c7d934e523dc3da6 100644 (file)
 # required versions (forced to avoid SEGV with mixed db used by rpm and poldek)
 %define                ver_rpm         1:4.14
 
+%define                rel     8
 Summary:       RPM packages management helper tool
 Summary(hu.UTF-8):     RPM csomagkezelést segítÅ‘ eszköz
 Summary(pl.UTF-8):     Pomocnicze narzÄ™dzie do zarzÄ…dzania pakietami RPM
 Name:          poldek
-Version:       0.42.2
-Release:       24
+Version:       0.44.0
+Release:       %{rel}
 License:       GPL v2
 Group:         Applications/System
 #Source0:      http://poldek.pld-linux.org/download/snapshots/%{name}-%{version}-cvs%{snap}.tar.bz2
 Source0:       https://github.com/poldek-pm/poldek/releases/download/v%{version}/%{name}-%{version}.tar.xz
-# Source0-md5: 2759fe45bc50efb6084d5338d725411a
+# Source0-md5: cd0eab5e6fe2ac6995c03541506561fc
 Source1:       tld.conf
 Source2:       tld-multilib.conf
 Source3:       tld-debuginfo.conf
@@ -33,30 +34,10 @@ Source7:    %{name}.png
 Patch0:                %{name}-config.patch
 Patch1:                pm-hooks.patch
 Patch2:                %{name}-ext-down-enable.patch
-Patch3:                %{name}-pc.patch
-Patch4:                %{name}-info.patch
-Patch5:                %{name}-multiarch-x32.patch
-Patch6:                rpm-4.15.patch
-Patch7:                db-index-format.patch
-Patch8:                rpm4-uname-deps.patch
-Patch9:                sqlite-rpmdb.patch
-Patch10:       rpm4-cpuinfo-deps.patch
-Patch11:       rpm4-no-dir-deps.patch
-Patch12:       rpm4-rpmvercmp.patch
-Patch13:       trurlib-shared.patch
-Patch14:       rpm4-script-req-workaround.patch
-Patch15:       skip-buildid-obsoletes.patch
-Patch16:       verify-signature.patch
-Patch17:       %{name}-rsa_sig_rpmorg.patch
-Patch18:       no-bdb-for-rpm-org.patch
-Patch19:       more-trace.patch
-Patch20:       boolean-deps.patch
-Patch21:       sorted-ls-upgradable.patch
-Patch22:       egrep-is-obsolete.patch
-Patch23:       minus.patch
-Patch24:       %{name}-https-redirect.patch
-Patch25:       gcc14.patch
-Patch26:       rpm-4.18.patch
+Patch3:                fix-reinstall-sigsev.patch
+Patch4:                restore-verify-all.patch
+Patch5:                proxy-fix.patch
+Patch6:                verify-fix.patch
 URL:           http://poldek.pld-linux.org/
 BuildRequires: autoconf >= 2.63
 BuildRequires: automake >= 1:1.11
@@ -85,7 +66,7 @@ BuildRequires:        tar >= 1:1.22
 BuildRequires: texinfo
 BuildRequires: xmlto
 BuildRequires: xz
-BuildRequires: zlib-devel
+BuildRequires: zlib-ng-devel
 BuildRequires: zstd-devel
 %if %{with static}
 BuildRequires: bzip2-static
@@ -97,7 +78,7 @@ BuildRequires:        pcre-static
 BuildRequires: popt-static
 BuildRequires: readline-static
 BuildRequires: rpm-static
-BuildRequires: zlib-static
+BuildRequires: zlib-ng-static
 BuildRequires: zstd-static
 %endif
 Requires(postun):      awk
@@ -230,28 +211,6 @@ ModuÅ‚y jÄ™zyka Python dla poldka.
 %patch -P 4 -p1
 %patch -P 5 -p1
 %patch -P 6 -p1
-%patch -P 7 -p1
-%patch -P 8 -p1
-%patch -P 9 -p1
-%patch -P 10 -p1
-%patch -P 11 -p1
-%patch -P 12 -p1
-cd trurlib
-%patch -P 13 -p1
-cd ..
-%patch -P 14 -p1
-%patch -P 15 -p1
-%patch -P 16 -p1
-%patch -P 17 -p1
-%patch -P 18 -p1
-%patch -P 19 -p1
-%patch -P 20 -p1
-%patch -P 21 -p1
-%patch -P 22 -p1
-%patch -P 23 -p1
-%patch -P 24 -p1
-%patch -P 25 -p1
-%patch -P 26 -p1
 
 %{__rm} doc/poldek.info
 %{__rm} m4/libtool.m4 m4/lt*.m4
@@ -361,7 +320,6 @@ cp -a conf configs
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/_poldekmod.{la,so}
 %endif
 
-
 %find_lang %{name}
 
 %clean
@@ -394,7 +352,7 @@ fi
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc ChangeLog README* NEWS configs
+%doc README* NEWS.md doc/NEWS.old doc/manual.{css,html} configs
 %dir %{_sysconfdir}/%{name}
 %dir %{_sysconfdir}/%{name}/pre-install.d
 %{_sysconfdir}/%{name}/pre-install.d/README
@@ -438,10 +396,10 @@ fi
 %attr(755,root,root) %{_libdir}/libtndb.so.*.*.*
 %attr(755,root,root) %{_libdir}/libtrurl.so.*.*.*
 %attr(755,root,root) %{_libdir}/libvfile.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libpoclidek.so.1
-%attr(755,root,root) %ghost %{_libdir}/libpoldek.so.3
+%attr(755,root,root) %ghost %{_libdir}/libpoclidek.so.2
+%attr(755,root,root) %ghost %{_libdir}/libpoldek.so.4
 %attr(755,root,root) %ghost %{_libdir}/libtndb.so.0
-%attr(755,root,root) %ghost %{_libdir}/libtrurl.so.0
+%attr(755,root,root) %ghost %{_libdir}/libtrurl.so.1
 %attr(755,root,root) %ghost %{_libdir}/libvfile.so.0
 %endif
 
diff --git a/proxy-fix.patch b/proxy-fix.patch
new file mode 100644 (file)
index 0000000..06aeb7c
--- /dev/null
@@ -0,0 +1,119 @@
+commit ab4f31ec7afa21d7a769ad6ceb5ec176667191b2
+Author: mis <mistoo@gmail.com>
+Date:   Sat Mar 1 20:02:11 2025 +0100
+
+    fix: do not check http connection with 'HEAD /' when proxied
+
+diff --git a/vfile/vfff/http.c b/vfile/vfff/http.c
+index 92effa2..fa0fc74 100644
+--- a/vfile/vfff/http.c
++++ b/vfile/vfff/http.c
+@@ -790,27 +790,6 @@ static time_t parse_date(const char *dt)
+     return ts;
+ }
+-static
+-int vhttp_vcn_is_alive(struct vcn *cn)
+-{
+-    char req_line[256];
+-
+-    if (cn->state != VCN_ALIVE)
+-        return 0;
+-
+-    make_req_line(req_line, sizeof(req_line), "HEAD", "/");
+-
+-    if (!httpcn_req(cn, req_line, NULL))
+-        return 0;
+-
+-    if (!httpcn_get_resp(cn)) {
+-        cn->state = VCN_DEAD;
+-        return 0;
+-    }
+-
+-    return 1;
+-}
+-
+ static int is_closing_connection_status(struct http_resp *resp)
+ {
+     int close_cn = 0;
+@@ -836,6 +815,34 @@ static int is_closing_connection_status(struct http_resp *resp)
+     return close_cn;
+ }
++static int vhttp_vcn_is_alive(struct vcn *cn)
++{
++    char req_line[256];
++
++    if (cn->state != VCN_ALIVE)
++        return 0;
++
++    if (cn->flags & VCN_PROXIED)
++        return 0;
++
++    make_req_line(req_line, sizeof(req_line), "HEAD", "/");
++
++    if (!httpcn_req(cn, req_line, NULL))
++        return 0;
++
++    if (!httpcn_get_resp(cn)) {
++        cn->state = VCN_DEAD;
++        return 0;
++    }
++
++    if (is_closing_connection_status(cn->resp)) {
++        cn->state = VCN_DEAD;
++        return 0;
++    }
++
++    return 1;
++}
++
+ static
+ int is_redirected_connection(struct http_resp *resp, struct vfff_req *rreq)
+ {
+diff --git a/vfile/vfff/vfff.c b/vfile/vfff/vfff.c
+index f745ec1..cd014f9 100644
+--- a/vfile/vfff/vfff.c
++++ b/vfile/vfff/vfff.c
+@@ -436,5 +436,10 @@ int vfff_transfer_file(struct vcn *cn, struct vfff_req *vreq, long total_size)
+     if (vreq->progress_fn)
+         vreq->progress_fn(vreq->progress_fn_data, total_size, -1);
+-    return is_err == 0;
++    if (is_err == 0 && cn->state == VCN_ALIVE) {
++        cn->ts_is_alive = time(0); /* update alive timestamp on success */
++        return 1;
++    }
++
++    return 0;
+ }
+diff --git a/vfile/vfff/vfff.h b/vfile/vfff/vfff.h
+index 22665b0..4f448de 100644
+--- a/vfile/vfff/vfff.h
++++ b/vfile/vfff/vfff.h
+@@ -60,6 +60,7 @@ struct vfff_req;
+ /* flags */
+ #define VCN_SUPPORTS_SIZE  (1 << 0)
+ #define VCN_SUPPORTS_MDTM  (1 << 1)
++#define VCN_PROXIED        (1 << 9)
+ struct vcn {
+     int       proto;
+diff --git a/vfile/vfffmod.c b/vfile/vfffmod.c
+index 98f828d..c6a8503 100644
+--- a/vfile/vfffmod.c
++++ b/vfile/vfffmod.c
+@@ -202,8 +202,12 @@ static struct vcn *vcn_pool_do_connect(struct vf_request *req)
+     if (cn == NULL) {
+         cn = vcn_new(vcn_proto, host, port, login, passwd,
+                      req->proxy_login, req->proxy_passwd);
+-        if (cn)
++        if (cn) {
++            if (req->proxy_host)
++                cn->flags |= VCN_PROXIED;
++
+             n_list_push(vcn_pool, cn);
++        }
+     }
+     return cn;
diff --git a/restore-verify-all.patch b/restore-verify-all.patch
new file mode 100644 (file)
index 0000000..2779e06
--- /dev/null
@@ -0,0 +1,88 @@
+diff --git a/arg_packages.c b/arg_packages.c
+index 48499a9..fab7618 100644
+--- a/arg_packages.c
++++ b/arg_packages.c
+@@ -350,6 +350,11 @@ int arg_packages_add_pkg(struct arg_packages *aps, struct pkg *pkg)
+     return 1;
+ }
++int arg_packages_add_pkgs(struct arg_packages *aps, const tn_array *pkgs)
++{
++    n_array_concat_ex(aps->packages, pkgs, (tn_fn_dup)pkg_link);
++    return 1;
++}
+ static
+ int arg_packages_load_list(struct arg_packages *aps, const char *fpath)
+diff --git a/arg_packages.h b/arg_packages.h
+index 611111a..13e8ba2 100644
+--- a/arg_packages.h
++++ b/arg_packages.h
+@@ -38,7 +38,7 @@ EXPORT int arg_packages_add_pkgmaska(struct arg_packages *aps, tn_array *masks);
+ EXPORT int arg_packages_add_pkgfile(struct arg_packages *aps, const char *pathname);
+ EXPORT int arg_packages_add_pkglist(struct arg_packages *aps, const char *path);
+ EXPORT int arg_packages_add_pkg(struct arg_packages *aps, struct pkg *pkg);
+-EXPORT int arg_packages_add_pkga(struct arg_packages *aps, tn_array *pkgs);
++EXPORT int arg_packages_add_pkgs(struct arg_packages *aps, const tn_array *pkgs);
+ EXPORT int arg_packages_setup(struct arg_packages *aps, struct pm_ctx *ctx);
+diff --git a/poldek_ts.c b/poldek_ts.c
+index 5185f55..398aafd 100644
+--- a/poldek_ts.c
++++ b/poldek_ts.c
+@@ -943,44 +943,31 @@ static int ts_run_uninstall(struct poldek_ts *ts)
+ /* just verify deps, conflicts, ordering, etc */
+ static int ts_run_verify(struct poldek_ts *ts)
+ {
+-    int nerr = 0, rc = 1;
++    int nerr = 0;
+     //n_assert(poldek_ts_issetf(ts, POLDEK_TS_VERIFY));
+-    if (poldek_ts_get_arg_count(ts) == 0) {
+-        logn(LOGERR, _("Nothing to do"));
++    if (!ts_prerun(ts))
+         return 0;
+-        // XXX disabled feature of whole set verification, does anybody needs that?
+-        //load_sources(ts->ctx);
+-
+-    } else {
+-        if (!ts_prerun(ts))
+-            return 0;
+-        if (!load_sources(ts->ctx))
+-            return 0;
+-
+-        unsigned flags = TS_MARK_DEPS | TS_MARK_VERBOSE | TS_MARK_CAPSINLINE;
+-        rc = ts_mark_arg_packages(ts, flags);
+-        (void)rc;               /* XXX unused for now */
+-    }
++    if (!load_sources(ts->ctx))
++        return 0;
+-    /* XXX disabled feature of whole set verification
+-    if (poldek_ts_get_arg_count(ts) > 0) {
+-        pkgs = pkgmark_get_packages(ts->pms, PKGMARK_MARK | PKGMARK_DEP);
++    unsigned flags = TS_MARK_DEPS | TS_MARK_CAPSINLINE;
++    if (poldek_ts_get_arg_count(ts) == 0) { /* no args */
++        arg_packages_add_pkgs(ts->aps, ts->ctx->ps->pkgs);
+     } else {
+-        pkgs = n_ref(ts->ctx->ps->pkgs);
++        flags |= TS_MARK_VERBOSE;
+     }
+-    if (pkgs == NULL)
+-        return 0;
+-    */
++    ts_mark_arg_packages(ts, flags);
+     tn_array *pkgs = pkgmark_get_packages(ts->pms, PKGMARK_ANY);
+     if (pkgs == NULL)
+         return 0;
++    /* just print errors here, deps are already verified by ts_mark_arg_packages */
+     if (ts->getop(ts, POLDEK_OP_VRFY_DEPS)) {
+         msgn(3, _("Verifying dependencies..."));
+         if (pkgmark_log_unsatisfied_dependecies(ts->pms) > 0)
diff --git a/rpm-4.15.patch b/rpm-4.15.patch
deleted file mode 100644 (file)
index d4168ed..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
---- poldek-0.42.2/pm/rpmorg/signature.c.orig   2020-10-07 23:33:17.051835958 +0200
-+++ poldek-0.42.2/pm/rpmorg/signature.c        2020-10-07 23:34:10.408960665 +0200
-@@ -101,18 +101,18 @@
-             case RPMSIGTAG_RSA:
-             case RPMSIGTAG_PGP5:      /* XXX legacy */
-             case RPMSIGTAG_PGP:
--                flags |= VRFYSIG_SIGNPGP;
-+                flags |= PKGVERIFY_PGP;
-                 break;
-             case RPMSIGTAG_DSA:
-             case RPMSIGTAG_GPG:
--                flags |= VRFYSIG_SIGNGPG;
-+                flags |= PKGVERIFY_GPG;
-                 break;
-             case RPMSIGTAG_LEMD5_2:
-             case RPMSIGTAG_LEMD5_1:
-             case RPMSIGTAG_MD5:
--                flags |= VRFYSIG_DGST;
-+                flags |= PKGVERIFY_MD;
-                 break;
-             default:
-@@ -137,7 +137,7 @@
-     int                       rc;
--    n_assert(flags & (VRFYSIG_DGST | VRFYSIG_SIGN));
-+    n_assert(flags & (PKGVERIFY_MD | PKGVERIFY_GPG | PKGVERIFY_PGP));
-     if (!rpm_signatures(path, &presented_signs, NULL))
-         return 0;
-@@ -146,13 +146,13 @@
-         char signam[255];
-         int n = 0;
--        if (flags & VRFYSIG_DGST)
-+        if (flags & PKGVERIFY_MD)
-             n += n_snprintf(&signam[n], sizeof(signam) - n, "digest/");
--        if (flags & VRFYSIG_SIGNGPG)
-+        if (flags & PKGVERIFY_GPG)
-             n += n_snprintf(&signam[n], sizeof(signam) - n, "gpg/");
--        if (flags & VRFYSIG_SIGNPGP)
-+        if (flags & PKGVERIFY_PGP)
-             n += n_snprintf(&signam[n], sizeof(signam) - n, "pgp/");
-         n_assert(n > 0);
-@@ -163,29 +163,27 @@
-              signam);
-         return 0;
-     }
--    unsigned qva_flags = RPMVSF_DEFAULT;
-+    unsigned vfyflags = RPMVSF_DEFAULT;
--    if ((flags & (VRFYSIG_SIGNPGP | VRFYSIG_SIGNGPG)) == 0) {
--        qva_flags |= RPMVSF_MASK_NOSIGNATURES;
-+    if ((flags & (PKGVERIFY_PGP | PKGVERIFY_GPG)) == 0) {
-+        vfyflags |= RPMVSF_MASK_NOSIGNATURES;
-     }
-     // always check digests - without them rpmVerifySignature returns error
--    //if ((flags & VRFYSIG_DGST) == 0)
--    //   qva_flags |= RPMVSF_MASK_NODIGESTS;
--
--    memset(&qva, '\0', sizeof(qva));
--    qva.qva_flags = qva_flags;
-+    //if ((flags & PKGVERIFY_MD) == 0)
-+    //   vfyflags |= RPMVSF_MASK_NODIGESTS;
-     rc = -1;
-     fdt = Fopen(path, "r.ufdio");
-     if (fdt != NULL && Ferror(fdt) == 0) {
-         ts = rpmtsCreate();
-+        rpmtsSetVfyFlags(ts, vfyflags);
-         rc = rpmVerifySignatures(&qva, ts, fdt, n_basenam(path));
-         rpmtsFree(ts);
-         DBGF("rpmVerifySignatures[md=%d, sign=%d] %s %s\n",
--             flags & VRFYSIG_DGST ? 1:0, flags & VRFYSIG_SIGN ? 1:0,
-+             flags & PKGVERIFY_MD ? 1:0, flags & (PKGVERIFY_GPG | PKGVERIFY_PGP) ? 1:0,
-              n_basenam(path), rc == 0 ? "OK" : "BAD");
-     }
-@@ -196,24 +196,12 @@
- static
- int do_pm_rpm_verify_signature(void *pm_rpm, const char *path, unsigned flags)
- {
--    unsigned rpmflags = 0;
--
--    pm_rpm = pm_rpm;
-     if (access(path, R_OK) != 0) {
-         logn(LOGERR, "%s: verify signature failed: %m", path);
-         return 0;
-     }
--    if (flags & PKGVERIFY_GPG)
--        rpmflags |= VRFYSIG_SIGNGPG;
--
--    if (flags & PKGVERIFY_PGP)
--        rpmflags |= VRFYSIG_SIGNPGP;
--
--    if (flags & PKGVERIFY_MD)
--        rpmflags |= VRFYSIG_DGST;
--
--    return do_verify_signature(path, rpmflags);
-+    return do_verify_signature(path, flags);
- }
- extern int pm_rpm_verbose;
---- poldek-0.42.2/pm/rpmorg/pm_rpm.h.orig      2020-10-07 23:34:34.276110954 +0200
-+++ poldek-0.42.2/pm/rpmorg/pm_rpm.h   2020-10-07 23:34:40.173648478 +0200
-@@ -69,10 +69,6 @@
-                               struct poldek_ts *ts);
- #include <rpm/rpmcli.h>
--#define VRFYSIG_DGST     VERIFY_DIGEST
--#define VRFYSIG_SIGN     VERIFY_SIGNATURE
--#define VRFYSIG_SIGNGPG  VERIFY_SIGNATURE
--#define VRFYSIG_SIGNPGP  VERIFY_SIGNATURE
- int pm_rpm_verify_signature(void *pm_rpm, const char *path, unsigned flags);
diff --git a/rpm-4.18.patch b/rpm-4.18.patch
deleted file mode 100644 (file)
index d893bb9..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- poldek-0.42.2/pm/rpmorg/install.c~ 2025-01-03 23:00:37.000000000 +0100
-+++ poldek-0.42.2/pm/rpmorg/install.c  2025-01-03 23:07:13.436664378 +0100
-@@ -77,8 +77,8 @@
- static void *install_cb(const void *h __attribute__((unused)),
-                         const enum rpmCallbackType_e op,
--                        const long unsigned int amount,
--                        const long unsigned int total,
-+                        const rpm_loff_t amount, 
-+                        const rpm_loff_t total,
-                         const void *pkgpath,
-                         void *data __attribute__((unused)))
- {
diff --git a/rpm4-cpuinfo-deps.patch b/rpm4-cpuinfo-deps.patch
deleted file mode 100644 (file)
index feab6a8..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- poldek-0.42.2/pm/rpmorg/misc.c~    2020-11-01 10:27:32.000000000 +0100
-+++ poldek-0.42.2/pm/rpmorg/misc.c     2020-11-15 10:30:02.296719845 +0100
-@@ -79,6 +79,9 @@
- #ifdef HAVE_RPMDSUNAME
-         (rpmcap_fn)rpmdsUname,
- #endif
-+#ifdef HAVE_RPMDSCPUINFO
-+        (rpmcap_fn)rpmdsCpuinfo,
-+#endif
-         NULL,
-     };
diff --git a/rpm4-no-dir-deps.patch b/rpm4-no-dir-deps.patch
deleted file mode 100644 (file)
index f05ee0d..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
---- poldek-0.42.2/pm/rpmorg/Makefile.am~       2020-01-25 23:03:28.000000000 +0100
-+++ poldek-0.42.2/pm/rpmorg/Makefile.am        2020-11-15 10:28:44.040052400 +0100
-@@ -8,7 +8,6 @@
- libpm_rpm_la_SOURCES =                        \
-       mod.c                           \
-       rpmdb_it.c                      \
--      rpmdb_depdirs.c                 \
-       install.c                       \
-       signature.c                     \
-       misc.c                          \
---- poldek-0.42.2/pm/rpmorg/mod.c~     2020-01-25 22:59:59.000000000 +0100
-+++ poldek-0.42.2/pm/rpmorg/mod.c      2020-11-15 10:28:21.190049426 +0100
-@@ -26,7 +26,7 @@
-     pm_rpm_satisfies,
-     pm_rpm_dbpath, 
-     pm_rpm_dbmtime,
--    pm_rpm_dbdepdirs,
-+    NULL,                       /* pm_rpm_dbdepdirs */
-     
- (void *(*)(void *, void *, const char *, const char *, mode_t, tn_hash *))pm_rpm_opendb,
-     (void (*)(void *))pm_rpm_closedb,
---- poldek-0.42.2/lib_init.c.orig      2020-03-16 21:23:10.000000000 +0100
-+++ poldek-0.42.2/lib_init.c   2021-02-12 19:32:47.579273016 +0100
-@@ -1433,8 +1433,9 @@
-                     break;
-                 case POLDEK_OP_AUTODIRDEP:
-+#if !defined(HAVE_RPMDSUNAME) || defined(HAVE_RPMORG)
-                     v = 0;
--#ifdef HAVE_RPMDSUNAME          /* rpmdsUname - rpm 4.4.6  */
-+#else          /* rpmdsUname - rpm 4.4.6  */
-                     v = 1;
- #endif
-                     break;
---- poldek-0.42.2/conf_sections.c~     2020-01-25 23:10:38.000000000 +0100
-+++ poldek-0.42.2/conf_sections.c      2021-02-13 18:32:16.569364907 +0100
-@@ -214,9 +214,13 @@
-              0, { 0 } },
-              
-    { "auto directory dependencies", 
-+#if defined(HAVE_RPMORG)
-+     CONF_TYPE_BOOLEAN3 | CONF_TYPE_F_OBSL, NULL, 0, { 0 } },
-+#else
-      CONF_TYPE_BOOLEAN3,
-              "auto",
-              POLDEK_OP_AUTODIRDEP, { 0 } },
-+#endif
-              
-    { "follow", 
-      CONF_TYPE_BOOLEAN,
diff --git a/rpm4-rpmvercmp.patch b/rpm4-rpmvercmp.patch
deleted file mode 100644 (file)
index a2cbf18..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-From 70940292e321f1b7f4af217425810ed4110f6333 Mon Sep 17 00:00:00 2001
-From: Jan Palus <atler@pld-linux.org>
-Date: Sat, 31 Oct 2020 00:32:04 +0100
-Subject: [PATCH] implement rpmvercmp for rpm.org
-
----
- pm/rpmorg/rpmvercmp.c | 24 ++++++++++++++++--------
- 1 file changed, 16 insertions(+), 8 deletions(-)
-
-diff --git a/pm/rpmorg/rpmvercmp.c b/pm/rpmorg/rpmvercmp.c
-index 7e40e15..36bf9e5 100644
---- a/pm/rpmorg/rpmvercmp.c
-+++ b/pm/rpmorg/rpmvercmp.c
-@@ -49,18 +49,15 @@ static void parse(const char *evrstr, EVR_t evr)
- #endif
- #endif
--#ifdef HAVE_RPMORG
--int main(void)
--{
--    printf("not implemented");
--    exit(EXIT_SUCCESS);
--}
--#else
- int main(int argc, char *argv[])
- {
-     int cmprc;
-     const char *v1, *v2;
-+#ifdef HAVE_RPMORG
-+    rpmver evr1, evr2;
-+#else
-     EVR_t evr1, evr2;
-+#endif
-     if (argc < 3) {
-         printf("Usage: rpmvercmp VERSION1 VERSION2\n");
-@@ -81,6 +78,12 @@ int main(int argc, char *argv[])
-       exit(2);
-     }
-+#ifdef HAVE_RPMORG
-+    evr1 = rpmverParse(v1);
-+    evr2 = rpmverParse(v2);
-+
-+    cmprc = rpmverCmp(evr1, evr2);
-+#else
-     evr1 = malloc(sizeof(struct EVR_s));
-     evr2 = malloc(sizeof(struct EVR_s));
-@@ -93,17 +96,22 @@ int main(int argc, char *argv[])
- #endif
-     cmprc = rpmEVRcompare(evr1, evr2);
-+#endif
-     printf("%s %s %s\n", v1, cmprc == 0 ?  "==" : cmprc > 0 ? ">" : "<", v2);
-     if (cmprc < 0)
-         cmprc = 2;
-+#ifdef HAVE_RPMORG
-+    rpmverFree(evr1);
-+    rpmverFree(evr2);
-+#else
-     free((char *)evr1->str);
-     free((char *)evr2->str);
-     free(evr1);
-     free(evr2);
-+#endif
-     exit(cmprc);
- }
--#endif
diff --git a/rpm4-script-req-workaround.patch b/rpm4-script-req-workaround.patch
deleted file mode 100644 (file)
index 9f75d75..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
---- poldek-0.42.2/pm/rpmorg/rpm_pkg_ld.c~      2020-03-26 16:54:55.000000000 +0100
-+++ poldek-0.42.2/pm/rpmorg/rpm_pkg_ld.c       2021-01-11 00:29:34.123702919 +0100
-@@ -71,12 +71,13 @@
-     else
- #endif
-+/*
-         if (isInstallPreReq(rpmflags))
-             rflags |= CAPREQ_PREREQ;
-     if (isErasePreReq(rpmflags))
-         rflags |= CAPREQ_PREREQ_UN;
--
-+*/
-     DBGFIF(rflags & (CAPREQ_PREREQ | CAPREQ_PREREQ_UN),
-            "(%s, %s)\n",
-            rflags & CAPREQ_PREREQ ? "pre":"",
diff --git a/rpm4-uname-deps.patch b/rpm4-uname-deps.patch
deleted file mode 100644 (file)
index 611c0ed..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- poldek-0.42.2/pm/rpmorg/misc.c~    2020-01-25 22:59:59.000000000 +0100
-+++ poldek-0.42.2/pm/rpmorg/misc.c     2020-10-22 08:56:32.637093626 +0200
-@@ -76,6 +76,9 @@
-     int       i;
-     rpmcap_fn functions[] = {
-         rpmdsRpmlib,
-+#ifdef HAVE_RPMDSUNAME
-+        (rpmcap_fn)rpmdsUname,
-+#endif
-         NULL,
-     };
diff --git a/skip-buildid-obsoletes.patch b/skip-buildid-obsoletes.patch
deleted file mode 100644 (file)
index 1b2e7c1..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- poldek-0.42.2/install3/obsoletes.c.orig    2020-01-25 22:59:59.000000000 +0100
-+++ poldek-0.42.2/install3/obsoletes.c 2021-03-16 13:14:05.667576984 +0100
-@@ -188,6 +188,8 @@
-         "/usr/share/doc/*",
-         "/usr/share/man/*.[0-9]",
-         "/usr/src/examples/*",
-+        "/usr/lib/.build-id",
-+        "/usr/lib/.build-id/*",
-         "*.desktop",
-         "*.mo",
-         "*.gz",
diff --git a/sorted-ls-upgradable.patch b/sorted-ls-upgradable.patch
deleted file mode 100644 (file)
index b97253f..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-From b7c0f1246788d1716c519387d75d7920ef59865a Mon Sep 17 00:00:00 2001
-From: Jan Palus <jpalus@fastmail.com>
-Date: Tue, 30 Aug 2022 16:32:24 +0200
-Subject: [PATCH] cli/ls: sort entries just before listing (after filtering)
-
-fixes global entries order being broken after doing `ls -ut`.
-"upgradable" listing overrides `ls_ents` and hence sort order
-restoration operates on wrong array. observed broken beavior:
-
-- invoking:
-  (1) ls -u
-  (2) ls -ut
-  (3) ls -u
-
-  should result in (1) and (3) being the same while in fact (2) and (3)
-  are the same
-
-- after invoking `ls -ut` package name completion is broken since it
-  uses binary search and therefore relies on correct order
-
-also doing `ls -u` might get marginally faster since it no longer needs
-to sort all available packages, but only those which are upgradable.
----
- cli/ls.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/cli/ls.c b/cli/ls.c
-index 1808f43..5a94374 100644
---- a/cli/ls.c
-+++ b/cli/ls.c
-@@ -368,9 +368,6 @@ static int ls(struct cmdctx *cmdctx)
-         goto l_end;
-     }
--    if ((cmpf = select_cmpf(cmdctx->_flags)))
--         n_array_sort_ex(ls_ents, cmpf);
--
-     if (cmdctx->_flags & OPT_LS_UPGRADEABLE) {
-         tn_array *tmp;
-@@ -386,6 +383,9 @@ static int ls(struct cmdctx *cmdctx)
-     }
-     if (n_array_size(ls_ents)) {
-+        if ((cmpf = select_cmpf(cmdctx->_flags)))
-+            n_array_sort_ex(ls_ents, cmpf);
-+
-         rc = do_ls(ls_ents, cmdctx, evrs);
-         if (cmpf)
--- 
-2.37.2
-
diff --git a/sqlite-rpmdb.patch b/sqlite-rpmdb.patch
deleted file mode 100644 (file)
index ffe5eaa..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- poldek-0.42.2/pm/rpmorg/rpm.c.orig 2020-01-25 22:59:59.000000000 +0100
-+++ poldek-0.42.2/pm/rpmorg/rpm.c      2020-11-01 10:11:24.892206997 +0100
-@@ -286,6 +286,10 @@
-     pm_rpm = pm_rpm;
-+    char *backend = rpmExpand("%{_db_backend}", NULL);
-+    if (backend != NULL && strncmp(backend, "sqlite", 6) == 0) {
-+        file = "rpmdb.sqlite";
-+    }
-     snprintf(path, sizeof(path), "%s/%s", dbpath, file);
-     if (stat(path, &st) != 0)
diff --git a/trurlib-shared.patch b/trurlib-shared.patch
deleted file mode 100644 (file)
index 7764486..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-From 67817281c4346832356febca89373742a0cde8b1 Mon Sep 17 00:00:00 2001
-From: Jan Palus <atler@pld-linux.org>
-Date: Sat, 31 Oct 2020 00:04:11 +0100
-Subject: [PATCH] create symbolic link for dynamic lib as well
-
-both tndb and vfile in poldek link against libtrurl and due to the way
-linking is configured it is always linked with static libtrurl (only
-libtrurl.a link provided). this causes two issues:
-
-- mixes dynamically linked libraries with statically linked libtrurl
-  and since nothing enforces -fPIC in the latter it results in error:
-
-libtool: warning: relinking 'libtndb.la'
-libtool: install: ... -o .libs/libtndb.so.0.2.0
-/usr/bin/ld: ./../trurlib/libtrurl.a(ndie.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `__stack_chk_guard@@GLIBC_2.17' which may bind externally can not be used when making a shared object; recompile with -fPIC
-/usr/bin/ld: ./../trurlib/libtrurl.a(ndie.o)(.text+0x8): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `__stack_chk_guard@@GLIBC_2.17'
-/usr/bin/ld: final link failed: bad value
-
-- includes copy of libtrurl in dynamic libraries even though poldek
-  provides dynamic libtrurl
----
- Makefile.am | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Makefile.am b/Makefile.am
-index 7c41374..0d13380 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -146,5 +146,6 @@ tests:  $(EXTRA_PROGRAMS)
- all-local:
-       @ln -sf .libs/libtrurl.a libtrurl.a
-+      @ln -sf .libs/libtrurl.so libtrurl.so
- include Makefile.extra
diff --git a/verify-fix.patch b/verify-fix.patch
new file mode 100644 (file)
index 0000000..7951b1a
--- /dev/null
@@ -0,0 +1,223 @@
+diff --git a/trurlib/include/trurl/nhash.h b/trurlib/include/trurl/nhash.h
+index e03fa9c..3ffe267 100644
+--- a/trurlib/include/trurl/nhash.h
++++ b/trurlib/include/trurl/nhash.h
+@@ -104,6 +104,7 @@ uint32_t n_hash_compute_index_hash(const tn_hash *ht, uint32_t raw_hash);
+ struct trurl_hash_iterator {
+     tn_hash *ht;
+     int pos;
++    int bpos;
+ };
+ typedef struct trurl_hash_iterator tn_hash_it;
+diff --git a/trurlib/n_hash_get.c b/trurlib/n_hash_get.c
+index 81c612b..48f0897 100644
+--- a/trurlib/n_hash_get.c
++++ b/trurlib/n_hash_get.c
+@@ -8,21 +8,39 @@ void n_hash_it_init(tn_hash_it *hi, tn_hash *ht)
+ {
+     hi->ht = ht;
+     hi->pos = 0;
++    hi->bpos = 0;
+ }
+ void *n_hash_it_get(tn_hash_it *hi, const char **key) {
+     struct hash_bucket **tbl = hi->ht->table;
+     size_t i = hi->pos;
+-    while (tbl[i] == NULL && i < hi->ht->size)
++    while (i < hi->ht->size && tbl[i] == NULL)
+         i++;
+     if (i >= hi->ht->size)
+         return NULL;
+-    struct hash_bucket *ptr = tbl[i];
++    struct hash_bucket *ptr;
++    int j = 0;
++
++    ptr = tbl[i];
++    while (ptr != NULL) {
++        if (j == hi->bpos)
++            break;
++        ptr = ptr->next;
++        j++;
++    }
++
++    n_assert(ptr);
++
++    if (ptr->next == NULL) {
++        hi->pos = i + 1;
++        hi->bpos = 0;
++    } else {
++        hi->bpos++;
++    }
+-    hi->pos = i + 1;
+     if (key)
+         *key = ptr->key;
+diff --git a/pkgmark.c b/pkgmark.c
+index 84ea6f4..9845bce 100644
+--- a/pkgmark.c
++++ b/pkgmark.c
+@@ -351,8 +351,9 @@ void pkgmark_massset(struct pkgmark_set *pms, int set, uint32_t flag)
+         return;
+     tn_hash_it it;
+-    struct pkg_mark *m;
++    n_hash_it_init(&it, pms->ht);
++    struct pkg_mark *m;
+     while ((m = n_hash_it_get(&it, NULL)) != NULL) {
+         if (set)
+             m->flags |= flag;
+diff --git a/cli/dent.c b/cli/dent.c
+index b24a723..f4cd4bb 100644
+--- a/cli/dent.c
++++ b/cli/dent.c
+@@ -36,13 +36,14 @@ struct pkg_dent *pkg_dent_new(struct poclidek_ctx *cctx, const char *name,
+                               struct pkg *pkg, int flags, const char *dirpath)
+ {
+     struct pkg_dent *ent;
+-    int dirpath_at = 0, dirpath_len = 0, len = 0;
++    int name_len = 0, dirpath_at = 0, dirpath_len = 0, len = 0;
+     if (name) {
+         while (*name == '/')
+             name++;
+-        len += strlen(name) + 1;
++        name_len = strlen(name);
++        len += name_len + 1;
+         n_assert(flags & PKG_DENT_DIR);
+         n_assert(dirpath);
+@@ -60,7 +61,7 @@ struct pkg_dent *pkg_dent_new(struct poclidek_ctx *cctx, const char *name,
+     if (name) {
+         char *p;
+-        memcpy(ent->_buf, name, len);
++        memcpy(ent->_buf, name, name_len + 1);
+         ent->name = ent->_buf;
+         if (dirpath) {
+diff --git a/cli/ls.c b/cli/ls.c
+index 0027ee0..e2bc01d 100644
+--- a/cli/ls.c
++++ b/cli/ls.c
+@@ -585,9 +585,10 @@ int do_ls(const tn_array *ents, struct cmdctx *cmdctx, const tn_array *evrs)
+             cmdctx_printf(cmdctx, "%-*s %-*s\n",
+                         term_width_div2 + term_width_div2/10 - 1, pkg_name,
+                         (term_width/7), group ? group : "(unset)");
+-      }
+-        else if (flags & OPT_LS_SOURCERPM) {
+-            const char *srcrpm = pkg_srcfilename_s(pkg);
++      } else if (flags & OPT_LS_SOURCERPM) {
++            char buf[512];
++            const char *srcrpm = pkg_srcfilename(pkg, buf, sizeof(buf));
++
+             cmdctx_printf(cmdctx, "%-*s %-*s\n",
+                         term_width_div2 + term_width_div2/10 - 1, pkg_name,
+                         (term_width/7), srcrpm ? srcrpm : "(unset)");
+diff --git a/vfile/vfile.h b/vfile/vfile.h
+index 3b55b00..b1612f2 100644
+--- a/vfile/vfile.h
++++ b/vfile/vfile.h
+@@ -174,11 +174,11 @@ EXPORT int vf_url_as_path(char *buf, size_t size, const char *url);
+ /* replace password with "x" * len(password) */
+ EXPORT const char *vf_url_hidepasswd(char *buf, int size, const char *url);
+-#define vf_url_hidepasswd_s(url) vf_url_hidepasswd(alloca(PATH_MAX), PATH_MAX, url)
++#define vf_url_hidepasswd_s(url) vf_url_hidepasswd(alloca(256), 256, url)
+ /* applies vf_url_hidepasswd() + slim down url string to maxl */
+ EXPORT const char *vf_url_slim(char *buf, int size, const char *url, int maxl);
+-#define vf_url_slim_s(url, maxl) vf_url_slim(alloca(PATH_MAX), PATH_MAX, url, (maxl) > 40 ? (maxl) : 40)
++#define vf_url_slim_s(url, maxl) vf_url_slim(alloca(256), 256, url, (maxl) > 40 ? (maxl) : 40)
+ EXPORT char *vf_url_unescape(const char *url);
+diff --git a/pkg.h b/pkg.h
+index 15a68c4..59f3e84 100644
+--- a/pkg.h
++++ b/pkg.h
+@@ -223,14 +223,14 @@ EXPORT int pkg_has_pkgcnfl(struct pkg *pkg, struct pkg *cpkg);
+ /* src.rpm */
+ EXPORT char *pkg_srcfilename(const struct pkg *pkg, char *buf, size_t size);
+-#define pkg_srcfilename_s(pkg) pkg_srcfilename(pkg, alloca(512), 512)
++#define pkg_srcfilename_s(pkg) pkg_srcfilename(pkg, alloca(256), 256)
+ /* RET %path/%name-%version-%release.%arch.rpm  */
+ EXPORT char *pkg_filename(const struct pkg *pkg, char *buf, size_t size);
+-#define pkg_filename_s(pkg) pkg_filename(pkg, alloca(512), 512)
++#define pkg_filename_s(pkg) pkg_filename(pkg, alloca(256), 256)
+ EXPORT char *pkg_path(const struct pkg *pkg, char *buf, size_t size);
+-#define pkg_path_s(pkg) pkg_path(pkg, alloca(512), 512)
++#define pkg_path_s(pkg) pkg_path(pkg, alloca(256), 256)
+ EXPORT char *pkg_localpath(const struct pkg *pkg, char *path, size_t size,
+                     const char *cachedir);
+@@ -251,13 +251,13 @@ EXPORT int pkg_printf(const struct pkg *pkg, const char *str);
+ EXPORT int pkg_snprintf(char *str, size_t size, const struct pkg *pkg);
+ EXPORT char *pkg_str(char *str, size_t size, const struct pkg *pkg);
+-#define pkg_snprintf_s(pkg) pkg_str(alloca(512), 512, pkg)
+-#define pkg_snprintf_s0(pkg) pkg_str(alloca(512), 512, pkg)
+-#define pkg_snprintf_s1(pkg) pkg_str(alloca(512), 512, pkg)
++#define pkg_snprintf_s(pkg) pkg_str(alloca(256), 256, pkg)
++#define pkg_snprintf_s0(pkg) pkg_str(alloca(256), 256, pkg)
++#define pkg_snprintf_s1(pkg) pkg_str(alloca(256), 256, pkg)
+ EXPORT int pkg_evr_snprintf(char *str, size_t size, const struct pkg *pkg);
+ EXPORT char *pkg_evr_str(char *str, size_t size, const struct pkg *pkg);
+-#define pkg_evr_snprintf_s(pkg) pkg_evr_str(alloca(512), 512, pkg)
++#define pkg_evr_snprintf_s(pkg) pkg_evr_str(alloca(256), 256, pkg)
+ /* must be free()d by pkguinf_free(); see pkgu.h */
+ EXPORT struct pkguinf *pkg_uinf(const struct pkg *pkg);
+diff --git a/pkgdir/pkg_restore.c b/pkgdir/pkg_restore.c
+index e7e9373..8dfb4c9 100644
+--- a/pkgdir/pkg_restore.c
++++ b/pkgdir/pkg_restore.c
+@@ -202,9 +202,9 @@ struct pkg *pkg_restore_st(tn_stream *st, tn_alloc *na, struct pkg *pkg,
+     int                  tag, last_tag, tag_binsize = PKG_STORETAG_SIZENIL;
+     const  char          *errmg_double_tag = "%s:%lu: double '%c' tag";
+     const  char          *errmg_ldtag = "%s:%lu: load '%c' tag error";
++    int                  load_full_fl = (ldflags & PKGDIR_LD_FULLFLIST);
+ #if 0
+-    printf("FULL %d\n", (ldflags & PKGDIR_LD_FULLFLIST));
+     if (depdirs) {
+         int i;
+         printf("depdirs %p %d\n", depdirs, n_array_size(depdirs));
+@@ -387,13 +387,13 @@ struct pkg *pkg_restore_st(tn_stream *st, tn_alloc *na, struct pkg *pkg,
+             case PKG_STORETAG_FL:
+                 pkgt.nodep_files_offs = n_stream_tell(st);
+-                //printf("flag_fullflist %d, %p\n", flag_fullflist, depdirs);
+-                if ((ldflags & PKGDIR_LD_FULLFLIST) == 0 && depdirs == NULL) {
++                if (!load_full_fl && depdirs == NULL) {
+                     pkgfl_skip_st(st);
+                 } else {
+                     tn_tuple *fl;
+-                    if (pkgfl_restore_st(na, &fl, st, depdirs, 1) < 0) {
++
++                    if (pkgfl_restore_st(na, &fl, st, load_full_fl ? NULL : depdirs, 1) < 0) {
+                         logn(LOGERR, errmg_ldtag, fn, ul_offs, *line);
+                         nerr++;
+                         goto l_end;
+@@ -422,6 +422,10 @@ struct pkg *pkg_restore_st(tn_stream *st, tn_alloc *na, struct pkg *pkg,
+                         pkgt.pkgfl = ffl;
+                     }
++
++                    pkgt.flags |= PKGT_HAS_FILES;
++                    if (load_full_fl)
++                        pkgt.flags |= PKGT_HAS_ALLFILES;
+                 }
+                 break;
diff --git a/verify-signature.patch b/verify-signature.patch
deleted file mode 100644 (file)
index f676de8..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -up poldek-0.42.2/pkgfetch.c._orig poldek-0.42.2/pkgfetch.c
-diff -up poldek-0.42.2/pm/rpmorg/signature.c._orig poldek-0.42.2/pm/rpmorg/signature.c
---- poldek-0.42.2/pm/rpmorg/signature.c._orig  2021-03-19 15:02:55.589828096 +0100
-+++ poldek-0.42.2/pm/rpmorg/signature.c        2021-03-20 18:02:34.286105414 +0100
-@@ -177,6 +177,11 @@ static int do_verify_signature(const cha
-     if (fdt != NULL && Ferror(fdt) == 0) {
-         ts = rpmtsCreate();
-         rpmtsSetVfyFlags(ts, vfyflags);
-+      if ((flags & (PKGVERIFY_PGP | PKGVERIFY_GPG)) == 0) {
-+          int vfylevel = rpmtsVfyLevel(ts);
-+          vfylevel &= ~RPMSIG_SIGNATURE_TYPE;
-+          rpmtsSetVfyLevel(ts, vfylevel);
-+      }
-         rc = rpmVerifySignatures(&qva, ts, fdt, n_basenam(path));
-         rpmtsFree(ts);