From 54cc043afb1596c2e550ce37bfa0431bc0ba08a5 Mon Sep 17 00:00:00 2001 From: gaoyusong Date: Wed, 22 Feb 2023 18:10:43 +0800 Subject: [PATCH] optimize digest list feature patch format Signed-off-by: gaoyusong --- Add-digest-list-plugin.patch | 4 +-- ...l-when-deal-with-digest-list-process.patch | 35 ------------------- rpm.spec | 10 +++--- 3 files changed, 7 insertions(+), 42 deletions(-) delete mode 100644 Change-log-level-when-deal-with-digest-list-process.patch diff --git a/Add-digest-list-plugin.patch b/Add-digest-list-plugin.patch index d40af4f..4b767b2 100644 --- a/Add-digest-list-plugin.patch +++ b/Add-digest-list-plugin.patch @@ -346,7 +346,7 @@ index 0000000..992a7e8 + ret = lsetxattr(path, XATTR_NAME_IMA, + sig, sizeof(*sig_hdr) + sig_size_rounded, 0); + if (ret < 0) -+ rpmlog(RPMLOG_ERR, "digest_list: could not apply security.ima " ++ rpmlog(RPMLOG_NOTICE, "digest_list: could not apply security.ima " + "on '%s': %s\n", path, strerror(errno)); + else + rpmlog(RPMLOG_DEBUG, "digest_list: security.ima successfully " @@ -422,7 +422,7 @@ index 0000000..992a7e8 + ret = lsetxattr(path, XATTR_NAME_IMA, + sig, sizeof(*sig_hdr) + sig_size, 0); + if (ret < 0) -+ rpmlog(RPMLOG_ERR, "digest_list: could not apply security.ima " ++ rpmlog(RPMLOG_NOTICE, "digest_list: could not apply security.ima " + "on '%s': %s\n", path, strerror(errno)); + else + rpmlog(RPMLOG_DEBUG, "digest_list: security.ima successfully " diff --git a/Change-log-level-when-deal-with-digest-list-process.patch b/Change-log-level-when-deal-with-digest-list-process.patch deleted file mode 100644 index 9f10604..0000000 --- a/Change-log-level-when-deal-with-digest-list-process.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 16b57c4031fe7d86abe1a70c5e3ff1d6eea97a32 Mon Sep 17 00:00:00 2001 -From: gaoyusong -Date: Fri, 17 Feb 2023 15:08:05 +0800 -Subject: [PATCH] Change log level when deal with digest-list process - -Signed-off-by: gaoyusong ---- - plugins/digest_list.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/plugins/digest_list.c b/plugins/digest_list.c -index 4283d5e..a553d63 100644 ---- a/plugins/digest_list.c -+++ b/plugins/digest_list.c -@@ -295,7 +295,7 @@ static int write_rpm_digest_list_ima_xattr(rpmte te, char *path) - ret = lsetxattr(path, XATTR_NAME_IMA, - sig, sizeof(*sig_hdr) + sig_size_rounded, 0); - if (ret < 0) -- rpmlog(RPMLOG_ERR, "digest_list: could not apply security.ima " -+ rpmlog(RPMLOG_NOTICE, "digest_list: could not apply security.ima " - "on '%s': %s\n", path, strerror(errno)); - else - rpmlog(RPMLOG_DEBUG, "digest_list: security.ima successfully " -@@ -371,7 +371,7 @@ static int write_digest_list_ima_xattr(rpmte te, char *path, char *path_sig) - ret = lsetxattr(path, XATTR_NAME_IMA, - sig, sizeof(*sig_hdr) + sig_size, 0); - if (ret < 0) -- rpmlog(RPMLOG_ERR, "digest_list: could not apply security.ima " -+ rpmlog(RPMLOG_NOTICE, "digest_list: could not apply security.ima " - "on '%s': %s\n", path, strerror(errno)); - else - rpmlog(RPMLOG_DEBUG, "digest_list: security.ima successfully " --- -2.23.0 - diff --git a/rpm.spec b/rpm.spec index 6bbbf6c..5d85a23 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,6 +1,6 @@ Name: rpm Version: 4.15.1 -Release: 46 +Release: 47 Summary: RPM Package Manager License: GPLv2+ URL: http://www.rpm.org/ @@ -191,10 +191,7 @@ Patch171: backport-Fix-eiu-sourceURL-info-leak-in-rpmInstall.patch Patch172: backport-Fix-h-blob-leak-when-installing-source-rpms.patch Patch173: backport-Fix-Header-leak-when-running-rpm2cpio.patch Patch174: backport-Use-unsigned-integers-more-consistently-in-the-handl.patch - -Patch175: Change-log-level-when-deal-with-digest-list-process.patch - -Patch176: backport-Revert-back-to-implicit-database-creation-for-now.patch +Patch175: backport-Revert-back-to-implicit-database-creation-for-now.patch BuildRequires: gcc autoconf automake libtool make gawk popt-devel openssl-devel readline-devel libdb-devel BuildRequires: zlib-devel libzstd-devel xz-devel bzip2-devel libarchive-devel ima-evm-utils-devel @@ -478,6 +475,9 @@ make check || (cat tests/rpmtests.log; exit 0) %{_mandir}/man1/gendiff.1* %changelog +* Wed Feb 22 2023 gaoyusong - 4.15.1-47 +- optimize digest list feature patch format + * Wed Feb 22 2023 renhongxun - 4.15.1-46 - Revert back to implicit database creation for now