$ /usr/share/swtpm/swtpm-create-user-config-files --overwrite
Environment variable XDG_CONFIG_HOME is not set. Using ${HOME}/.config.
Writing /home/stefanb/.config/swtpm_setup.conf.
Writing /home/stefanb/.config/swtpm-localca.conf.
Writing /home/stefanb/.config/swtpm-localca.options.
$ swtpm_setup --tpm2 --tpmstate . --overwrite --create-ek-cert
Starting vTPM manufacturing as stefanb:stefanb @ Sun 23 Apr 2023 12:07:17 PM EDT
TPM is listening on Unix socket.
Successfully created RSA 2048 EK with handle 0x81010001.
Could not find @DATAROOTDIR@/swtpm/swtpm-localca in PATH. <<<<<<<<<<
An error occurred. Authoring the TPM state failed.
Ending vTPM manufacturing @ Sun 23 Apr 2023 12:07:17 PM EDT
I tested the proposed package and the test case I described here (https:/ /bugs.launchpad .net/ubuntu/ +source/ swtpm/+ bug/2016744) still does not work:
$ /usr/share/ swtpm/swtpm- create- user-config- files --overwrite .config/ swtpm_setup. conf. .config/ swtpm-localca. conf. .config/ swtpm-localca. options.
Environment variable XDG_CONFIG_HOME is not set. Using ${HOME}/.config.
Writing /home/stefanb/
Writing /home/stefanb/
Writing /home/stefanb/
$ swtpm_setup --tpm2 --tpmstate . --overwrite --create-ek-cert /swtpm/ swtpm-localca in PATH. <<<<<<<<<<
Starting vTPM manufacturing as stefanb:stefanb @ Sun 23 Apr 2023 12:07:17 PM EDT
TPM is listening on Unix socket.
Successfully created RSA 2048 EK with handle 0x81010001.
Could not find @DATAROOTDIR@
An error occurred. Authoring the TPM state failed.
Ending vTPM manufacturing @ Sun 23 Apr 2023 12:07:17 PM EDT
$ grep DATAROOT /usr/share/ swtpm/swtpm- create- user-config- files /swtpm/ swtpm-localca
create_certs_tool = @DATAROOTDIR@
The @DATAROOTDIR@ should have been replaced during 'configure'.