Skip to content

Commit 3498234

Browse files
tpm2_eventlog: Fix pretty print for efivar 39
The pretty print format of device paths was changed in efivar 39. Yaml files generated by efivar 39 are added to the fixtures. Fixes: #3422 Signed-off-by: Juergen Repp <juergen_repp@web.de>
1 parent fd2aa33 commit 3498234

12 files changed

+6730
-2
lines changed

Makefile.am

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,14 +650,20 @@ dist-hook:
650650
done;
651651

652652
prepare-check:
653-
if HAVE_EFIVAR_H
653+
if HAVE_EFIVAR_GE_39
654+
cp $(abs_top_srcdir)/test/integration/fixtures/event-pretty-39/event-*.yaml \
655+
$(abs_top_srcdir)/test/integration/fixtures/
656+
endif
657+
if HAVE_EFIVAR_L_39
654658
cp $(abs_top_srcdir)/test/integration/fixtures/event-pretty/event-*.yaml \
655659
$(abs_top_srcdir)/test/integration/fixtures/
656-
else
660+
endif
661+
if HAVE_EFIVAR_NO
657662
cp $(abs_top_srcdir)/test/integration/fixtures/event-raw/event-*.yaml \
658663
$(abs_top_srcdir)/test/integration/fixtures/
659664
endif
660665

666+
661667
check: prepare-check
662668

663669
if !HAVE_PANDOC

configure.ac

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,18 @@ AS_IF([test "x$with_efivar" = "xauto"],
103103
AC_CHECK_HEADERS([efivar/efivar.h],[efivar_h=yes ], [efivar = no ])
104104
AM_CONDITIONAL([HAVE_EFIVAR_H], [test "$efivar_h" = yes])
105105

106+
AS_IF([ test "x$efivar_h" = "xyes" ], [
107+
EFIVAR_VERSION=`$PKG_CONFIG --modversion efivar`,
108+
AX_COMPARE_VERSION([$EFIVAR_VERSION], [ge], [39],
109+
[ efivar_version=ge39 ],
110+
[ efivar_version=l39 ] ) ],
111+
[ efivar_version=no ]
112+
)
113+
114+
AM_CONDITIONAL([HAVE_EFIVAR_GE_39], [test "x$efivar_version" = "xge39" ])
115+
AM_CONDITIONAL([HAVE_EFIVAR_L_39], [test "x$efivar_version" = "xl39" ])
116+
AM_CONDITIONAL([HAVE_EFIVAR_NO], [test "x$efivar_version" = "xno" ])
117+
106118
# backwards compat with older pkg-config
107119
# - pull in AC_DEFUN from pkg.m4
108120
m4_ifndef([PKG_CHECK_VAR], [

test/integration/fixtures/event-pretty-39/event-arch-linux.bin.yaml

Lines changed: 686 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)