tboot: fix build with gcc 14, refactor (#388574)

This commit is contained in:
kirillrdy
2025-03-10 19:40:22 +11:00
committed by GitHub
+11 -4
View File
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "mirror://sourceforge/tboot/${pname}-${version}.tar.gz";
sha256 = "sha256-TIs/xLxLBkKBN0a0CRB2KMmCq8QgICH1++i485WDU3A=";
hash = "sha256-TIs/xLxLBkKBN0a0CRB2KMmCq8QgICH1++i485WDU3A=";
};
buildInputs = [
@@ -34,14 +34,21 @@ stdenv.mkDerivation rec {
substituteInPlace docs/Makefile --replace /usr/share /share
'';
postPatch = ''
# compute the allocated size from the pointed type, to avoid the warning
substituteInPlace lcptools-v2/pconf_legacy.c \
--replace-fail "digest = malloc(SHA1_DIGEST_SIZE);" \
"digest = malloc(sizeof *digest);"
'';
installFlags = [ "DESTDIR=$(out)" ];
meta = with lib; {
meta = {
description = "Pre-kernel/VMM module that uses Intel(R) TXT to perform a measured and verified launch of an OS kernel/VMM";
homepage = "https://sourceforge.net/projects/tboot/";
changelog = "https://sourceforge.net/p/tboot/code/ci/v${version}/tree/CHANGELOG";
license = licenses.bsd3;
maintainers = with maintainers; [ ak ];
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ ak ];
platforms = [
"x86_64-linux"
"i686-linux"