-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
97 additions
and
3 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
srcpkgs/tpm2-tss/patches/dont-run-sysusers-in-Makefile.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
diff --git a/Makefile.am b/Makefile.am | ||
index ce19aac3..22a8c075 100644 | ||
--- a/Makefile.am | ||
+++ b/Makefile.am | ||
@@ -498,10 +498,9 @@ fapi-config.json: dist/fapi-config.json.in | ||
-e 's|[@]userstatedir@|$(userstatedir)|g' \ | ||
< "$<" > "$@" | ||
|
||
-sysusers_DATA = dist/sysusers.d/tpm2-tss.conf | ||
tmpfiles_DATA = tpm2-tss-fapi.conf | ||
|
||
-EXTRA_DIST += dist/sysusers.d/tpm2-tss.conf dist/tmpfiles.d/tpm2-tss-fapi.conf.in | ||
+EXTRA_DIST += dist/tmpfiles.d/tpm2-tss-fapi.conf.in | ||
CLEANFILES += tpm2-tss-fapi.conf | ||
|
||
# We have to do this ourselves, in order to get absolute paths | ||
@@ -726,13 +725,6 @@ EXTRA_DIST += dist/tpm-udev.rules | ||
|
||
install-dirs: | ||
if HOSTOS_LINUX | ||
-if SYSD_SYSUSERS | ||
- @echo "systemd-sysusers $(DESTDIR)$(sysconfdir)/sysusers.d/tpm2-tss.conf" | ||
- @systemd-sysusers $(DESTDIR)$(sysconfdir)/sysusers.d/tpm2-tss.conf || echo "WARNING Failed to create the tss user and group" | ||
-else | ||
- @echo "call make_tss_user_and_group" | ||
- @$(call make_tss_user_and_group) || echo "WARNING Failed to create the tss user and group" | ||
-endif | ||
if SYSD_TMPFILES | ||
@echo "systemd-tmpfiles --create $(DESTDIR)$(sysconfdir)/tmpfiles.d/tpm2-tss-fapi.conf" | ||
@systemd-tmpfiles --create $(DESTDIR)$(sysconfdir)/tmpfiles.d/tpm2-tss-fapi.conf|| echo "WARNING Failed to create the FAPI directories with the correct permissions" | ||
diff --git a/configure.ac b/configure.ac | ||
index 6482944f..44c0e383 100644 | ||
--- a/configure.ac | ||
+++ b/configure.ac | ||
@@ -483,22 +483,9 @@ AS_IF([test "x$enable_integration" = "xyes" && test "x$enable_self_generated_cer | ||
[AC_MSG_WARN([Running integration tests without EK certificate verification, use --enable-self-generated-certificate for full test coverage])]) | ||
|
||
# Check for systemd helper tools used by make install | ||
-AC_CHECK_PROG(systemd_sysusers, systemd-sysusers, yes) | ||
-AM_CONDITIONAL(SYSD_SYSUSERS, test "x$systemd_sysusers" = "xyes") | ||
AC_CHECK_PROG(systemd_tmpfiles, systemd-tmpfiles, yes) | ||
AM_CONDITIONAL(SYSD_TMPFILES, test "x$systemd_tmpfiles" = "xyes") | ||
|
||
-# Check all tools used by make install | ||
-AS_IF([test "$HOSTOS" = "Linux"], | ||
- [ AC_CHECK_PROG(useradd, useradd, yes) | ||
- AC_CHECK_PROG(groupadd, groupadd, yes) | ||
- AC_CHECK_PROG(adduser, adduser, yes) | ||
- AC_CHECK_PROG(addgroup, addgroup, yes) | ||
- AS_IF([test "x$addgroup" != "xyes" && test "x$groupadd" != "xyes" ], | ||
- [AC_MSG_ERROR([addgroup or groupadd are needed.])]) | ||
- AS_IF([test "x$adduser" != "xyes" && test "x$useradd" != "xyes" ], | ||
- [AC_MSG_ERROR([adduser or useradd are needed.])])]) | ||
- | ||
AC_SUBST([PATH]) | ||
|
||
dnl --------- Doxy Gen ----------------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
From: https://git.alpinelinux.org/aports/tree/community/tpm2-tss/musl-32bit-stat-workaround.patch | ||
|
||
diff --git a/Makefile-test.am b/Makefile-test.am | ||
index 020b6680..135195ee 100644 | ||
--- a/Makefile-test.am | ||
+++ b/Makefile-test.am | ||
@@ -648,7 +648,8 @@ test_unit_fapi_io_LDFLAGS = $(TESTS_LDFLAGS) $(JSONC_LIBS) $(CURL_LIBS) \ | ||
-Wl,--wrap=write \ | ||
-Wl,--wrap=fileno \ | ||
-Wl,--wrap=fclose \ | ||
- -Wl,--wrap=stat | ||
+ -Wl,--wrap=stat \ | ||
+ -Wl,--wrap=__stat_time64 | ||
test_unit_fapi_io_SOURCES = test/unit/fapi-io.c \ | ||
src/tss2-fapi/ifapi_json_deserialize.c \ | ||
src/tss2-fapi/ifapi_json_serialize.c \ | ||
diff --git a/test/unit/fapi-io.c b/test/unit/fapi-io.c | ||
index 41600ca9..08936d7e 100644 | ||
--- a/test/unit/fapi-io.c | ||
+++ b/test/unit/fapi-io.c | ||
@@ -57,6 +57,12 @@ int | ||
return 0; | ||
} | ||
|
||
+int | ||
+ __wrap___stat_time64(const char *pathname, struct stat *statbuf, ...) | ||
+{ | ||
+ return __wrap_stat(pathname, statbuf); | ||
+} | ||
+ | ||
FILE * | ||
__real_fopen(const char *pathname, const char* mode, ...); | ||
FILE * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters