Skip to content

Commit

Permalink
samples: Use different script for local testing than install
Browse files Browse the repository at this point in the history
Use a different script for local testing that what is installed into
/usr/share/swtpm/swtpm-localca.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
  • Loading branch information
stefanberger committed Jul 17, 2021
1 parent fd00c5f commit 935a7bc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Makefile
/samples/swtpm-create-user-config-files
/samples/swtpm_localca
/samples/swtpm-localca
/samples/swtpm-localca.2inst
/samples/swtpm-localca.conf
/samples/swtpm_localca_conf.h
/src/selinux/*.pp.bz2
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ AC_CONFIG_FILES([Makefile \
etc/Makefile \
etc/swtpm_setup.conf \
samples/Makefile \
samples/swtpm-localca.2inst \
samples/swtpm-localca.conf \
samples/swtpm-create-user-config-files \
samples/swtpm_localca_conf.h \
Expand Down
10 changes: 8 additions & 2 deletions samples/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ samplessysconfdir = $(sysconfdir)

samplesconf_SCRIPTS = \
swtpm-create-tpmca \
swtpm-create-user-config-files \
swtpm-localca
swtpm-create-user-config-files

samplessysconf_DATA = \
swtpm-localca.conf \
Expand Down Expand Up @@ -53,6 +52,13 @@ install-data-local:
chmod 0750 $(DESTDIR)$(localstatedir)/lib/swtpm-localca || true; \
fi

install-exec-local:
$(MKDIR_P) $(DESTDIR)$(samplesconfdir)
$(INSTALL_SCRIPT) swtpm-localca.2inst $(DESTDIR)$(samplesconfdir)/swtpm-localca

uninstall-local:
rm -f $(DESTDIR)$(samplesconfdir)/swtpm-localca

EXTRA_DIST= \
swtpm-create-tpmca \
swtpm-create-user-config-files \
Expand Down
5 changes: 5 additions & 0 deletions samples/swtpm-localca.2inst.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh

@BINDIR@/swtpm_localca "$@"

exit $?

0 comments on commit 935a7bc

Please sign in to comment.