summaryrefslogtreecommitdiff
path: root/dont-remove-ima-xattr-of-parser-when-upgrading.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-09-10 03:05:12 +0000
committerCoprDistGit <infra@openeuler.org>2023-09-10 03:05:12 +0000
commit2bc2b430bc4c1a9a0bfd1c01da68bd53bf7da052 (patch)
treea2af4fd609c7decacbf0ea11926ea338596fb179 /dont-remove-ima-xattr-of-parser-when-upgrading.patch
parent0ae9f87336a3d78d8fbc0a1e5c75cba5f9cf8597 (diff)
automatic import of rpm
Diffstat (limited to 'dont-remove-ima-xattr-of-parser-when-upgrading.patch')
-rw-r--r--dont-remove-ima-xattr-of-parser-when-upgrading.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/dont-remove-ima-xattr-of-parser-when-upgrading.patch b/dont-remove-ima-xattr-of-parser-when-upgrading.patch
new file mode 100644
index 0000000..b2e0424
--- /dev/null
+++ b/dont-remove-ima-xattr-of-parser-when-upgrading.patch
@@ -0,0 +1,35 @@
+From 2c27c71952ce3ac61afeabd3ef4e1d182574e905 Mon Sep 17 00:00:00 2001
+From: luhuaxin <luhuaxin1@huawei.com>
+Date: Tue, 15 Mar 2022 20:54:06 +0800
+Subject: [PATCH] dont remove ima xattr of parser when upgrading
+
+Signed-off-by: luhuaxin <luhuaxin1@huawei.com>
+---
+ plugins/digest_list.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/plugins/digest_list.c b/plugins/digest_list.c
+index 0692b5b..1d7ef92 100644
+--- a/plugins/digest_list.c
++++ b/plugins/digest_list.c
+@@ -576,9 +576,16 @@ static rpmRC digest_list_file_common(rpmPlugin plugin, rpmfi fi,
+ if (!pre && --digest_list_counter)
+ return RPMRC_OK;
+
++ rpmlog(RPMLOG_DEBUG, "process ima digest, pre: %d, action: %d, teType: %d\n",
++ pre, action, rpmteType(cur_te));
+ process_digest_list(cur_te, 0, pre);
+- if (!strcmp(rpmteN(cur_te), "digest-list-tools"))
++ if (!strcmp(rpmteN(cur_te), "digest-list-tools")) {
++ if (pre && rpmteType(cur_te) == TR_REMOVED)
++ return RPMRC_OK;
++
++ rpmlog(RPMLOG_DEBUG, "process parser digest\n");
+ process_digest_list(cur_te, 1, pre);
++ }
+
+ return RPMRC_OK;
+ }
+--
+2.33.0
+