Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
5c24c2910a
!338 Don't segfault on missing priority tag
From: @mmzzmm 
Reviewed-by: @xujing99 
Signed-off-by: @xujing99
2024-06-05 06:36:45 +00:00
Zhao Mengmeng
fd25d7a772 Don't segfault on missing priority tag
Backport upstream 4.17.x commit
5b58ea7cfb
to fix a possible segfault on librpm.

Centos fixes this in rpm-4.16.1.3-30.

Signed-off-by: Zhao Mengmeng <zhaomengmeng@kylinos.cn>
2024-06-04 11:30:09 +08:00
openeuler-ci-bot
104af16a6a
!331 [sync] PR-329: backport some patches from upstream
From: @openeuler-sync-bot 
Reviewed-by: @xujing99 
Signed-off-by: @xujing99
2024-05-07 09:21:03 +00:00
gengqihu
1e8195b2b8 Backport some patches from upstream
(cherry picked from commit ddf9598908c02d67cf24c347372a46a7fed6a732)
2024-05-07 16:36:04 +08:00
openeuler-ci-bot
9d15a64f78
!325 [sync] PR-324: fix macros autopath num error
From: @openeuler-sync-bot 
Reviewed-by: @xujing99 
Signed-off-by: @xujing99
2024-04-16 07:28:45 +00:00
yangchenguang
44692f0e43 fix macros autopath num error
Signed-off-by: yangchenguang <yangchenguang@kylinsec.com.cn>
(cherry picked from commit 660cc6d31e01064789ea42e31fcf8e42c09a7add)
2024-03-26 11:23:34 +08:00
openeuler-ci-bot
61dca9f7ad
!314 [sync] PR-313: 同步上游社区补丁
From: @openeuler-sync-bot 
Reviewed-by: @licunlong 
Signed-off-by: @licunlong
2024-03-25 06:46:40 +00:00
hongjinghao
26a8750ad7 Fix memleak and let eBPF ELF files be packaged in noarch packages
(cherry picked from commit 7be7f1b9c564d90a4d60cd4500677a60b307e250)
2024-03-25 14:28:56 +08:00
openeuler-ci-bot
f2618d7172
!299 [sync] PR-298: backport some patches from upstream
From: @openeuler-sync-bot 
Reviewed-by: @xujing99 
Signed-off-by: @xujing99
2024-03-14 03:29:46 +00:00
gengqihu
a76ab889cd backport some patches from upstream
(cherry picked from commit 1722ec5626a68ae00e2b12820c2317b42a86f937)
2024-03-14 08:39:18 +08:00
15 changed files with 594 additions and 1 deletions

View File

@ -0,0 +1,38 @@
From 7108c172f4e60c83ecc1eeb2a766eb7eaa5956d7 Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Fri, 15 Mar 2024 10:03:26 +0200
Subject: [PATCH] An enumeration is not a bitfield, use an integer instead
Enums are good for individual bitfield flag names, but combination of
the bits is not a legit value really.
Conflict:don't modify rpmfileutil.h because 8ef29094fa is not mearged; modify
rpmio/rpmmacro.h instead of include/rpm/rpmmacro.h because 650ba79f is not
mearged; adapt context.
Reference:https://github.com/rpm-software-management/rpm/commit/7108c172f4e60c83ecc1eeb2a766eb7eaa5956d7
---
rpmio/rpmmacro.h | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/rpmio/rpmmacro.h b/rpmio/rpmmacro.h
index 979763a76..7b23fda59 100644
--- a/rpmio/rpmmacro.h
+++ b/rpmio/rpmmacro.h
@@ -62,10 +62,11 @@ extern const char * macrofiles;
/* rpm macro expansion flags */
#define RPMEXPAND_EXPAND_ARGS (1 << 0) /*!< expand arguments of parametric macros */
-typedef enum rpmMacroFlags_e {
+enum rpmMacroFlags_e {
RPMMACRO_DEFAULT = 0,
RPMMACRO_LITERAL = (1 << 0), /*!< do not expand body of macro */
-} rpmMacroFlags;
+};
+typedef rpmFlags rpmMacroFlags;
/** \ingroup rpmmacro
* Print macros to file stream.
--
2.33.0

View File

@ -0,0 +1,40 @@
From 920c1f38b1dfff49bec68515882ade4c03c90512 Mon Sep 17 00:00:00 2001
From: Florian Festi <ffesti@redhat.com>
Date: Fri, 20 Aug 2021 15:14:16 +0200
Subject: [PATCH] Don't segfault on missing priority tag
Resolves: #1636
Related: #1638
(cherry picked from commit fd57fc716231c8296d340fdb4c0f6eac176f7f7c)
---
lib/rpmtriggers.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/rpmtriggers.c b/lib/rpmtriggers.c
index 53646a5..17257b4 100644
--- a/lib/rpmtriggers.c
+++ b/lib/rpmtriggers.c
@@ -517,7 +517,8 @@ rpmRC runFileTriggers(rpmts ts, rpmte te, rpmsenseFlags sense,
if (matchFunc(ts, te, pfx, sense)) {
for (i = 0; i < rpmdbIndexIteratorNumPkgs(ii); i++) {
struct rpmtd_s priorities;
- unsigned int priority;
+ unsigned int priority = 0;
+ unsigned int *priority_ptr;
unsigned int offset = rpmdbIndexIteratorPkgOffset(ii, i);
unsigned int tix = rpmdbIndexIteratorTagNum(ii, i);
@@ -535,7 +536,9 @@ rpmRC runFileTriggers(rpmts ts, rpmte te, rpmsenseFlags sense,
trigH = rpmdbGetHeaderAt(rpmtsGetRdb(ts), offset);
headerGet(trigH, priorityTag, &priorities, HEADERGET_MINMEM);
rpmtdSetIndex(&priorities, tix);
- priority = *rpmtdGetUint32(&priorities);
+ priority_ptr = rpmtdGetUint32(&priorities);
+ if (priority_ptr)
+ priority = *priority_ptr;
headerFree(trigH);
/* Store file trigger in array */
--
2.33.0

View File

@ -0,0 +1,85 @@
From 1825dbf8244b129665a69481c4537a57b9e03a8f Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Wed, 21 Feb 2024 16:07:05 +0200
Subject: [PATCH] Fix a memleak on invalid command line options
The OS will clean it up yes, but in the meanwhile ASAN (when enabled)
blew up on your face and scared you silly. Use the opportunity to add a
test for a test on invalid option.
---
lib/poptALL.c | 11 ++++++++---
tests/rpmgeneral.at | 10 +++++++++-
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/lib/poptALL.c b/lib/poptALL.c
index 0fa1c40..3c4c096 100644
--- a/lib/poptALL.c
+++ b/lib/poptALL.c
@@ -294,7 +294,7 @@ rpmcliFini(poptContext optCon)
poptContext
rpmcliInit(int argc, char *const argv[], struct poptOption * optionsTable)
{
- poptContext optCon;
+ poptContext optCon = NULL;
int rc;
const char *ctx, *execPath;
@@ -332,14 +332,14 @@ rpmcliInit(int argc, char *const argv[], struct poptOption * optionsTable)
while ((rc = poptGetNextOpt(optCon)) > 0) {
fprintf(stderr, _("%s: option table misconfigured (%d)\n"),
xgetprogname(), rc);
- exit(EXIT_FAILURE);
+ goto err;
}
if (rc < -1) {
fprintf(stderr, "%s: %s: %s\n", xgetprogname(),
poptBadOption(optCon, POPT_BADOPTION_NOALIAS),
poptStrerror(rc));
- exit(EXIT_FAILURE);
+ goto err;
}
/* Read rpm configuration (if not already read). */
@@ -351,4 +351,9 @@ rpmcliInit(int argc, char *const argv[], struct poptOption * optionsTable)
}
return optCon;
+
+err:
+ poptFreeContext(optCon);
+ exit(EXIT_FAILURE);
+ return NULL; /* not reached */
}
diff --git a/tests/rpmgeneral.at b/tests/rpmgeneral.at
index 5cbfc23..6d85ace 100644
--- a/tests/rpmgeneral.at
+++ b/tests/rpmgeneral.at
@@ -26,7 +26,6 @@ AT_CHECK([runroot rpm --version],[0],
])
AT_CLEANUP
-
# ------------------------------
AT_SETUP([rpmbuild --version])
AT_KEYWORDS([basic])
@@ -35,6 +34,15 @@ AT_CHECK([runroot rpmbuild --version],[0],
])
AT_CLEANUP
+AT_SETUP([rpm invalid option])
+AT_KEYWORDS([basic])
+AT_CHECK([runroot rpm --badopt],
+[1],
+[],
+[rpm: --badopt: unknown option
+])
+AT_CLEANUP
+
# Check that libtool versioning matches expectations, it's easy to screw up.
AT_SETUP([rpm library version])
AT_KEYWORDS([basic])
--
2.33.0

View File

@ -0,0 +1,31 @@
From 656fe42af1d497c35769c740fcc98950e1455bad Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Wed, 24 Jan 2024 12:44:34 +0200
Subject: [PATCH] Fix a theoretical use of uninitialized struct members
If rpmScriptFromTriggerTag() was called with tm other than the three
handled cases in the switch, the rpmtd_s structs would be uninitialized
and weird things could happen. The value of tm is hardwired in all the
existing callers AFAICS but the extra safety doesn't hurt either.
Discovered by static analysis in RHEL.
---
lib/rpmscript.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/rpmscript.c b/lib/rpmscript.c
index b18f851a3..3f6313278 100644
--- a/lib/rpmscript.c
+++ b/lib/rpmscript.c
@@ -641,6 +641,8 @@ rpmScript rpmScriptFromTriggerTag(Header h, rpmTagVal triggerTag,
headerGet(h, RPMTAG_TRANSFILETRIGGERSCRIPTFLAGS, &tflags, hgflags);
prefix = "transfile";
break;
+ default:
+ return NULL;
}
if (rpmtdSetIndex(&tscripts, ix) >= 0 && rpmtdSetIndex(&tprogs, ix) >= 0) {
--
2.33.0

View File

@ -0,0 +1,33 @@
From 6c01f4c84f768b6c6b247a11106bf51b40015e66 Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Mon, 18 Mar 2024 09:56:51 +0200
Subject: [PATCH] Fix an enum/int type mismatch in rpmfiArchiveReadToFilePsm()
rpmfiDigestAlgo() hysterically returns a signed int (and that's what
really ought to be changed) but lets at least make all these uses
consistent.
Conflict:modify pgpHashAlgo instead of rpmHashAlgo because
01d6605d93e9b5 is not mearged.
Reference:https://github.com/rpm-software-management/rpm/commit/6c01f4c84f768b6c6b247a11106bf51b40015e66
---
lib/rpmfi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/rpmfi.c b/lib/rpmfi.c
index cfb388b4c..db1460711 100644
--- a/lib/rpmfi.c
+++ b/lib/rpmfi.c
@@ -2384,7 +2384,7 @@ int rpmfiArchiveReadToFilePsm(rpmfi fi, FD_t fd, int nodigest, rpmpsm psm)
rpm_loff_t left = rpmfiFSize(fi);
const unsigned char * fidigest = NULL;
- pgpHashAlgo digestalgo = 0;
+ int digestalgo = 0;
int rc = 0;
char buf[BUFSIZ*4];
--
2.33.0

View File

@ -0,0 +1,28 @@
From 90cfa466ae88b06595012084eada25a42064322c Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Mon, 18 Mar 2024 09:48:48 +0200
Subject: [PATCH] Fix an enum/int type mismatch in transaction verify code
Conflict:NA
Reference:https://github.com/rpm-software-management/rpm/commit/90cfa466ae88b06595012084eada25a42064322c
---
lib/transaction.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/transaction.c b/lib/transaction.c
index fcde554a6..6a49eb242 100644
--- a/lib/transaction.c
+++ b/lib/transaction.c
@@ -1288,7 +1288,7 @@ static int verifyPackageFiles(rpmts ts, rpm_loff_t total)
.vfylevel = vfylevel,
};
int verified = 0;
- rpmRC prc = RPMRC_FAIL;
+ int prc = RPMRC_FAIL;
rpmtsNotify(ts, p, RPMCALLBACK_VERIFY_PROGRESS, oc++, total);
FD_t fd = rpmtsNotify(ts, p, RPMCALLBACK_INST_OPEN_FILE, 0, 0);
--
2.33.0

View File

@ -0,0 +1,30 @@
From 3a227fdf2965aa6bfc0727170419e9da6cf1fbe2 Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Mon, 18 Mar 2024 09:50:05 +0200
Subject: [PATCH] Fix enum type mismatch in rpmTagGetValue()
This returns a tag value, not type.
Conflict:NA
Reference:https://github.com/rpm-software-management/rpm/commit/3a227fdf2965aa6bfc0727170419e9da6cf1fbe2
---
lib/tagname.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/tagname.c b/lib/tagname.c
index 4e7c30d2b..4748cf19c 100644
--- a/lib/tagname.c
+++ b/lib/tagname.c
@@ -171,7 +171,7 @@ rpmTagType rpmTagGetType(rpmTagVal tag)
rpmTagVal rpmTagGetValue(const char * tagstr)
{
const struct headerTagTableEntry_s *t;
- rpmTagType tagval = RPMTAG_NOT_FOUND;
+ rpmTagVal tagval = RPMTAG_NOT_FOUND;
pthread_once(&tagsLoaded, loadTags);
--
2.33.0

View File

@ -0,0 +1,68 @@
From f2eb6fa6ba77fbf5f62add8a01544cce8c0beb6b Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Fri, 15 Mar 2024 16:41:28 +0200
Subject: [PATCH] Fix some int/enum confusion in the build code
These things are not really returning rpmRC values, especially as they
need to pass around RPMRC_MISSINGBUILDREQUIRES which is not part of the
enum.
For doRmSource(), 0 and 1 aren't any more enums values than 0 and -1 are,
and besides, the sole caller isn't even checking the return code.
Conflict:NA
Reference:https://github.com/rpm-software-management/rpm/commit/f2eb6fa6ba77fbf5f62add8a01544cce8c0beb6b
---
build/build.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/build/build.c b/build/build.c
index 8e6c8f842..69ab69fc9 100644
--- a/build/build.c
+++ b/build/build.c
@@ -78,7 +78,7 @@ static char * buildHost(void)
/**
*/
-static rpmRC doRmSource(rpmSpec spec)
+static int doRmSource(rpmSpec spec)
{
struct Source *p;
Package pkg;
@@ -100,7 +100,7 @@ static rpmRC doRmSource(rpmSpec spec)
}
}
exit:
- return !rc ? 0 : 1;
+ return rc;
}
/*
@@ -290,9 +290,9 @@ static int doBuildRequires(rpmSpec spec, int test)
return rc;
}
-static rpmRC doCheckBuildRequires(rpmts ts, rpmSpec spec, int test)
+static int doCheckBuildRequires(rpmts ts, rpmSpec spec, int test)
{
- rpmRC rc = RPMRC_OK;
+ int rc = RPMRC_OK;
rpmps ps = rpmSpecCheckDeps(ts, spec);
if (ps) {
@@ -323,9 +323,9 @@ static rpmRC doBuildDir(rpmSpec spec, int test, StringBuf *sbp)
return rc;
}
-static rpmRC buildSpec(rpmts ts, BTA_t buildArgs, rpmSpec spec, int what)
+static int buildSpec(rpmts ts, BTA_t buildArgs, rpmSpec spec, int what)
{
- rpmRC rc = RPMRC_OK;
+ int rc = RPMRC_OK;
int missing_buildreqs = 0;
int test = (what & RPMBUILD_NOBUILD);
char *cookie = buildArgs->cookie ? xstrdup(buildArgs->cookie) : NULL;
--
2.33.0

View File

@ -0,0 +1,31 @@
From 26a1323022e3153d99b2f1095fe040f52fb2e3f3 Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Tue, 30 Jan 2024 14:55:54 +0200
Subject: [PATCH] Fix spec parser leaks from %*trans -f <file>
Conflict:don't free preunTransFile and postunTransFile because
db46bd8bd1 is not merged
The untrans-versions leak because grepping around didn't turn up
the trans-counterparts ... because they didn't exist either.
Those leaks are adults by now.
---
build/spec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/build/spec.c b/build/spec.c
index 824afba27..6f8a6a155 100644
--- a/build/spec.c
+++ b/build/spec.c
@@ -143,6 +143,8 @@ Package freePackage(Package pkg)
pkg->preUnFile = _free(pkg->preUnFile);
pkg->postUnFile = _free(pkg->postUnFile);
pkg->verifyFile = _free(pkg->verifyFile);
+ pkg->preTransFile = _free(pkg->preTransFile);
+ pkg->postTransFile = _free(pkg->postTransFile);
pkg->header = headerFree(pkg->header);
pkg->ds = rpmdsFree(pkg->ds);
--
2.33.0

View File

@ -0,0 +1,44 @@
From 5ece87a250880b08ccecfc5b34986347d8cca843 Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Thu, 8 Feb 2024 09:44:51 +0200
Subject: [PATCH] Let eBPF ELF files be packaged in noarch packages
eBPF ELF represents a virtual machine where our file colors make no
sense at all. Filter out the color from these files to avoid a
"Arch dependent binaries in noarch package" error from them in noarch
packages.
We don't want to pull in clang to the check images just because of
this, so add a pre-built binary for the check and a simple way to
reproduce from the test-spec.
Fixes: #2875
Reference:https://github.com/rpm-software-management/rpm/commit/5ece87a250880b08ccecfc5b34986347d8cca843
Conflict:Deleted binary files and test code because it would add clang
Requires.
---
build/rpmfc.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/build/rpmfc.c b/build/rpmfc.c
index 07171fa..6d40a19 100644
--- a/build/rpmfc.c
+++ b/build/rpmfc.c
@@ -1151,6 +1151,13 @@ static uint32_t getElfColor(const char *fn)
color = RPMFC_ELF32;
break;
}
+
+ /* Exceptions to coloring */
+ switch (ehdr.e_machine) {
+ case EM_BPF:
+ color = 0;
+ break;
+ }
}
if (elf)
elf_end(elf);
--
2.33.0

View File

@ -0,0 +1,40 @@
From 7bf818c8344ecbf0e14a26e6393582ae79df864e Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Tue, 30 Jan 2024 15:04:03 +0200
Subject: [PATCH] Tip-toe around rpmfiFN() thin ice in fsm
Conflict:adapt context
Any pointer gotten from rpmfiFN() is only valid until the next
rpmfiFN() call, and here the path can end up inside plugins which
may have their own reasons for calling rpmfiFN(). At which point
the dest we passed would be invalid. strdup() it to appease ASAN,
but this needs a saner solution really.
---
lib/fsm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/fsm.c b/lib/fsm.c
index a54e43bae..36708acc3 100644
--- a/lib/fsm.c
+++ b/lib/fsm.c
@@ -736,7 +736,7 @@ static int fsmSetmeta(const char *path, rpmfi fi, rpmPlugins plugins,
int nofcaps)
{
int rc = 0;
- const char *dest = rpmfiFN(fi);
+ char *dest = xstrdup(rpmfiFN(fi));
if (!rc && !getuid()) {
rc = fsmChown(path, st->st_mode, st->st_uid, st->st_gid);
@@ -756,6 +756,7 @@ static int fsmSetmeta(int fd, int dirfd, const char *path,
rc = rpmpluginsCallFsmFilePrepare(plugins, fi,
path, dest, st->st_mode, action);
}
+ free(dest);
return rc;
}
--
2.33.0

View File

@ -0,0 +1,28 @@
From 1d6987a8ede061db611ff02eda62315e0ae24d2b Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Mon, 18 Mar 2024 10:02:52 +0200
Subject: [PATCH] Use the internal DB_CTRL* enum for intenal uses consistently
Conflict:NA
Reference:https://github.com/rpm-software-management/rpm/commit/1d6987a8ede061db611ff02eda62315e0ae24d2b
---
lib/rpmdb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/rpmdb.c b/lib/rpmdb.c
index 2f0d72afd..4ad12230b 100644
--- a/lib/rpmdb.c
+++ b/lib/rpmdb.c
@@ -69,7 +69,7 @@ static int buildIndexes(rpmdb db)
dbSetFSync(db, 0);
- dbCtrl(db, RPMDB_CTRL_LOCK_RW);
+ dbCtrl(db, DB_CTRL_LOCK_RW);
mi = rpmdbInitIterator(db, RPMDBI_PACKAGES, NULL, 0);
while ((h = rpmdbNextIterator(mi))) {
--
2.33.0

View File

@ -0,0 +1,32 @@
From 97aa64d8281974fb369c66d5aef8650515b89c52 Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Wed, 24 Jan 2024 12:03:39 +0200
Subject: [PATCH] Use unsigned integers for buildtime too for Y2K38 safety
This little patch buys us 68 extra years to move to 64bit time tags
in rpm. That seems achievable.
Fixes: #1228
---
build/build.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/build/build.c b/build/build.c
index e4081c673..0ac8bf6c9 100644
--- a/build/build.c
+++ b/build/build.c
@@ -36,9 +36,9 @@ static rpm_time_t getBuildTime(void)
if (srcdate == endptr || *endptr || errno != 0)
rpmlog(RPMLOG_ERR, _("unable to parse SOURCE_DATE_EPOCH\n"));
else
- buildTime = (int32_t) epoch;
+ buildTime = (uint32_t) epoch;
} else
- buildTime = (int32_t) time(NULL);
+ buildTime = (uint32_t) time(NULL);
return buildTime;
}
--
2.33.0

View File

@ -0,0 +1,36 @@
From 0e09712b6e67c704ea1c9fcc57d6fb0497691063 Mon Sep 17 00:00:00 2001
From: yangchenguang <yangchenguang@kylinsec.com.cn>
Date: Tue, 26 Mar 2024 10:27:35 +0800
Subject: [PATCH] fix macros autopath num error
fix: https://github.com/rpm-software-management/rpm/commit/c495d73449cb707bf8b3a0f47a67bba115c00bcf
%autopatch: Fix patch number parameters
Those where not converted to integers for to lookup though not converted
to the actual file name.
Thanks to Vít Ondruch for pointing this out, suggesting the fix and
insisting on a test case!
Resolves: #1766
Signed-off-by: yangchenguang <yangchenguang@kylinsec.com.cn>
---
macros.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/macros.in b/macros.in
index 4dbf5b6..643b02b 100644
--- a/macros.in
+++ b/macros.in
@@ -1256,7 +1256,7 @@ for i, p in ipairs(patches) do
bynum[patch_nums[i]] = p
end
for i, a in ipairs(arg) do
- local p = bynum[a]
+ local p = bynum[tonumber(a)]
if p then
print(rpm.expand("%__apply_patch -m %{basename:"..p.."} "..options..p.." "..i.."\\n"))
else
--
2.39.1

View File

@ -1,6 +1,6 @@
Name: rpm
Version: 4.17.0
Release: 33
Release: 38
Summary: RPM Package Manager
License: GPLv2+
URL: http://www.rpm.org/
@ -114,6 +114,20 @@ Patch6075: backport-Fix-rpmDigestBundleFinal-and-Update-return-code-on-i.patch
Patch6076: backport-Actually-return-an-error-in-parseScript-if-parsing-f.patch
Patch6077: backport-Check-inside-root-when-querying-for-files.patch
Patch6078: backport-Fix-regression-on-ctrl-c-during-transaction-killing-.patch
Patch6079: backport-Use-unsigned-integers-for-buildtime-too-for-Y2K38-sa.patch
Patch6080: backport-Fix-a-theoretical-use-of-uninitialized-struct-member.patch
Patch6081: backport-Fix-spec-parser-leaks-from-trans-f-file.patch
Patch6082: backport-Tip-toe-around-rpmfiFN-thin-ice-in-fsm.patch
Patch6083: backport-Fix-a-memleak-on-invalid-command-line-options.patch
Patch6084: backport-Let-eBPF-ELF-files-be-packaged-in-noarch-packages.patch
Patch6085: fix-macros-autopath-num-error.patch
Patch6086: backport-Fix-some-int-enum-confusion-in-the-build-code.patch
Patch6087: backport-Use-the-internal-DB_CTRL-enum-for-intenal-uses-consi.patch
Patch6088: backport-An-enumeration-is-not-a-bitfield-use-an-integer-inst.patch
Patch6089: backport-Fix-an-enum-int-type-mismatch-in-rpmfiArchiveReadToF.patch
Patch6090: backport-Fix-an-enum-int-type-mismatch-in-transaction-verify-.patch
Patch6091: backport-Fix-enum-type-mismatch-in-rpmTagGetValue.patch
Patch6092: backport-Don-t-segfault-on-missing-priority-tag.patch
BuildRequires: gcc autoconf automake libtool make gawk popt-devel openssl-devel readline-devel
BuildRequires: zlib-devel zstd-devel >= 1.3.8 xz-devel bzip2-devel libarchive-devel ima-evm-utils-devel
@ -404,6 +418,21 @@ make check || (cat tests/rpmtests.log; exit 0)
%{_mandir}/man1/gendiff.1*
%changelog
* Tue Jun 04 2024 Zhao Mengmeng <zhaomengmeng@kylinos.cn> - 4.17.0-38
- Don't segfault on missing priority tag
* Tue May 7 2024 gengqihu<gengqihu2@h-partners.com> - 4.17.0-37
- Backport some patches from upstream
* Tue Mar 26 2024 yangchenguang <yangchenguang@kylinsec.com.cn> - 4.17.0-36
- fix macros autopath num error
* Mon Mar 25 2024 hongjinghao<hongjinghao@huawei.com> - 4.17.0-35
- Fix memleak and let eBPF ELF files be packaged in noarch packages
* Wed Mar 13 2024 gengqihu<gengqihu2@h-partners.com> - 4.17.0-34
- Backport some patches from upstream
* Wed Feb 21 2024 gengqihu<gengqihu2@h-partners.com> - 4.17.0-33
- Modify the version of zstd in Requires