From 6e497dbd0de89197a510d7654b41f881bfcecc3b Mon Sep 17 00:00:00 2001 From: Sayan Chowdhury Date: Wed, 6 Sep 2023 23:13:24 +0530 Subject: [PATCH] sys-boot/mokutil: Add from Gentoo It's from Gentoo commit cf90a21600e8d81c12b7e1143f43cd28f58dd70d. --- .../portage-stable/sys-boot/mokutil/Manifest | 1 + .../files/mokutil-0.6.0-conflict.patch | 38 +++++++++++++++++++ .../sys-boot/mokutil/metadata.xml | 11 ++++++ .../sys-boot/mokutil/mokutil-0.6.0.ebuild | 28 ++++++++++++++ 4 files changed, 78 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/sys-boot/mokutil/Manifest create mode 100644 sdk_container/src/third_party/portage-stable/sys-boot/mokutil/files/mokutil-0.6.0-conflict.patch create mode 100644 sdk_container/src/third_party/portage-stable/sys-boot/mokutil/metadata.xml create mode 100644 sdk_container/src/third_party/portage-stable/sys-boot/mokutil/mokutil-0.6.0.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/mokutil/Manifest b/sdk_container/src/third_party/portage-stable/sys-boot/mokutil/Manifest new file mode 100644 index 0000000000..24fa911ab2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/mokutil/Manifest @@ -0,0 +1 @@ +DIST mokutil-0.6.0.tar.gz 38047 BLAKE2B f2307807c700091f1e5a783b3ad8e7b3eaa17e05580b2c24fd0e92433c6b9bedfb51e9eb2d5d1c71448623b12b6667a573dd51ed03fc738aaf9815083e118ca0 SHA512 11a9d172dba4fbb674e58e5d82cb1dc65a80cff844c0eaebd106b4d4608b24a8207e0cfabf36fe1eedb67f68a8a18db2136c7b62aa3230ac104615e8284dbd7d diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/mokutil/files/mokutil-0.6.0-conflict.patch b/sdk_container/src/third_party/portage-stable/sys-boot/mokutil/files/mokutil-0.6.0-conflict.patch new file mode 100644 index 0000000000..6283fa3316 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/mokutil/files/mokutil-0.6.0-conflict.patch @@ -0,0 +1,38 @@ +From dd55c28236809fc30a7f079882914cde45560277 Mon Sep 17 00:00:00 2001 +From: Gary Lin +Date: Fri, 30 Jun 2023 10:36:54 +0800 +Subject: [PATCH] Avoid conflicting efi_char16_t type definitions + +It's not necessary to define 'efi_char16_t' as 'wchar_t' since we don't +need any wchar functions. Besides, it may conflict with efivar-38. This +commit defines 'efi_char16_t' as 'uint16_t' and adds the conditional +check to avoid the potential conflict. + +Fixes: https://github.com/lcp/mokutil/issues/66 + +Signed-off-by: Gary Lin +--- + src/mokutil.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/mokutil.h b/src/mokutil.h +index d47a380..bd02608 100644 +--- a/src/mokutil.h ++++ b/src/mokutil.h +@@ -33,13 +33,14 @@ + #define __MOKUTIL_H__ + + #include +-#include + + #include "signature.h" + + typedef unsigned long efi_status_t; + typedef uint8_t efi_bool_t; +-typedef wchar_t efi_char16_t; /* UNICODE character */ ++#ifndef efi_char16_t ++typedef uint16_t efi_char16_t; /* UNICODE character */ ++#endif + + typedef enum { + DELETE_MOK = 0, diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/mokutil/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-boot/mokutil/metadata.xml new file mode 100644 index 0000000000..cc8c212f86 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/mokutil/metadata.xml @@ -0,0 +1,11 @@ + + + + + zerochaos@gentoo.org + Rick Farina + + + lcp/mokutil + + diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/mokutil/mokutil-0.6.0.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/mokutil/mokutil-0.6.0.ebuild new file mode 100644 index 0000000000..b57693258f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/mokutil/mokutil-0.6.0.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="The utility to manipulate machines owner keys which managed in shim" +HOMEPAGE="https://github.com/lcp/mokutil" +SRC_URI="https://github.com/lcp/mokutil/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="dev-libs/openssl:= + sys-apps/keyutils:= + sys-libs/efivar:= + virtual/libcrypt:=" +RDEPEND="${DEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( "${FILESDIR}"/mokutil-0.6.0-conflict.patch ) + +src_prepare() { + default + eautoreconf +}