Skip to contentSkip to conversation

ima-evm-utils: Update to 1.4

PATCH New Armin Kuster 1 participant 1 message May 18, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ima-evm-utils: Update to 1.4

Switch from git to https in SRC_URI
Drop patches not upstreamed.

Passes OEQA:
RESULTS - ima.IMACheck.test_ima_enabled: PASSED (1.05s) RESULTS - ima.IMACheck.test_ima_hash: PASSED (6.13s) RESULTS - ima.IMACheck.test_ima_overwrite: PASSED (131.31s) RESULTS - ima.IMACheck.test_ima_signature: PASSED (69.03s)

---
 ...nd-line-apply-operation-to-all-paths.patch | 68 -------------------
 .../ima-evm-utils/disable-doc-creation.patch  | 50 --------------
 ...t-depend-on-xattr.h-with-IMA-defines.patch | 47 -------------
 ...-evm-utils_git.bb => ima-evm-utils_1.4.bb} | 18 +----
 4 files changed, 2 insertions(+), 181 deletions(-)
 delete mode 100644 meta-integrity/recipes-security/ima-evm-utils/ima-evm-utils/command-line-apply-operation-to-all-paths.patch
 delete mode 100644 meta-integrity/recipes-security/ima-evm-utils/ima-evm-utils/disable-doc-creation.patch
 delete mode 100644 meta-integrity/recipes-security/ima-evm-utils/ima-evm-utils/evmctl.c-do-not-depend-on-xattr.h-with-IMA-defines.patch
 rename meta-integrity/recipes-security/ima-evm-utils/{ima-evm-utils_git.bb => ima-evm-utils_1.4.bb} (52%)
meta-integrity/recipes-security/ima-evm-utils/ima-evm-utils/command-line-apply-operation-to-all-paths.patch deleted +0 -68
deleted file mode 100644
index 35c3162..0000000
@@ -1,68 +0,0 @@
-From 5834216fb3aa4e5e59ee13e871c70db1b4e13f02 Mon Sep 17 00:00:00 2001
-From: Patrick Ohly <[email protected]>
-Date: Fri, 30 Sep 2016 10:22:16 +0200
-Subject: [PATCH] command line: apply operation to all paths
-
-Previously, invocations like "evmctl ima_hash foo bar" silently
-ignored all parameters after the first path name ("foo" in this
-example).
-
-Now evmctl iterates over all specified paths. It aborts with an
-error as soon as the selected operation fails for a path.
-
-Supporting more than one parameter is useful in combination with
-"find" and "xargs" because it is noticably faster than invoking
-evmutil separately for each file, in particular when run under pseudo
-(a fakeroot environment used by the OpenEmbedded build system).
-
-This complements the recursive mode and can be used when more control
-over file selection is needed.
-
-Signed-off-by: Patrick Ohly <[email protected]>
----
- src/evmctl.c | 21 ++++++++++++---------
- 1 file changed, 12 insertions(+), 9 deletions(-)
-
-diff --git a/src/evmctl.c b/src/evmctl.c
-index 23cf54c..2072034 100644
---- a/src/evmctl.c
-+++ b/src/evmctl.c
-@@ -626,7 +626,7 @@ static int get_file_type(const char *path, const char *search_type)
- static int do_cmd(struct command *cmd, find_cb_t func)
- {
- 	char *path = g_argv[optind++];
--	int err, dts = REG_MASK; /* only regular files by default */
-+	int err = 0, dts = REG_MASK; /* only regular files by default */
- 
- 	if (!path) {
- 		log_err("Parameters missing\n");
-@@ -634,15 +634,18 @@ static int do_cmd(struct command *cmd, find_cb_t func)
- 		return -1;
- 	}
- 
--	if (recursive) {
--		if (search_type) {
--			dts = get_file_type(path, search_type);
--			if (dts < 0)
--				return dts;
-+	while (path && !err) {
-+		if (recursive) {
-+			if (search_type) {
-+				dts = get_file_type(path, search_type);
-+				if (dts < 0)
-+					return dts;
-+			}
-+			err = find(path, dts, func);
-+		} else {
-+			err = func(path);
- 		}
--		err = find(path, dts, func);
--	} else {
--		err = func(path);
-+		path = g_argv[optind++];
- 	}
- 
- 	return err;
--- 
-2.1.4
-
meta-integrity/recipes-security/ima-evm-utils/ima-evm-utils/disable-doc-creation.patch deleted +0 -50

50 lines not on this page · raw message

meta-integrity/recipes-security/ima-evm-utils/ima-evm-utils/evmctl.c-do-not-depend-on-xattr.h-with-IMA-defines.patch deleted +0 -47

47 lines not on this page · raw message

meta-integrity/recipes-security/ima-evm-utils/ima-evm-utils_1.4.bb renamed from meta-integrity/recipes-security/ima-evm-utils/ima-evm-utils_git.bb +2 -16
similarity index 52%
rename from meta-integrity/recipes-security/ima-evm-utils/ima-evm-utils_git.bb
rename to meta-integrity/recipes-security/ima-evm-utils/ima-evm-utils_1.4.bb
index fc7a2d6..4f1d1a3 100644
@@ -6,22 +6,8 @@ DEPENDS += "openssl attr keyutils"
 
 DEPENDS:class-native += "openssl-native keyutils-native"
 
-PV = "1.2.1+git${SRCPV}"
-SRCREV = "3eab1f93b634249c1720f65fcb495b1996f0256e"
-SRC_URI = "git://git.code.sf.net/p/linux-ima/ima-evm-utils;branch=ima-evm-utils-1.2.y"
-
-# Documentation depends on asciidoc, which we do not have, so
-# do not build documentation.
-SRC_URI += "file://disable-doc-creation.patch"
-
-# Workaround for upstream incompatibility with older Linux distros.
-# Relevant for us when compiling ima-evm-utils-native.
-SRC_URI += "file://evmctl.c-do-not-depend-on-xattr.h-with-IMA-defines.patch"
-
-# Required for xargs with more than one path as argument (better for performance).
-SRC_URI += "file://command-line-apply-operation-to-all-paths.patch"
-
-S = "${WORKDIR}/git"
+SRC_URI = "https://sourceforge.net/projects/linux-ima/files/${BPN}/${BP}.tar.gz"
+SRC_URI[sha256sum] = "fcf85b31d6292051b3679e5f17ffa7f89b6898957aad0f59aa4e9878884b27d1"
 
 inherit pkgconfig autotools features_check
 
Signature · 1 line
2.25.1