swtpm-create-user-config-files script contains unevaluated @DATAROOTDIR@ variable

Bug #1989598 reported by Josef Petermann
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
swtpm (Ubuntu)
Triaged
Low
Unassigned
Jammy
Triaged
Low
Unassigned

Bug Description

Hi,

*Description*:
the swtpm setup tool located at `/usr/share/swtpm/swtpm-create-user-config-files` contains the unevaluated String `@DATAROOT@` at line 68. This causes the user's swtpm config to be corrupted and swtpm fails to initialize properly in a libvirt user session.

According to the author of the swtpm tool this error is probably introduced in the build/packaging process (see linked github issue).

https://github.com/stefanberger/swtpm/issues/749#issuecomment-1246901959

Here is the actual content of the file:
```
grep -n DATAROOT /usr/share/swtpm/swtpm-create-user-config-files
68:create_certs_tool = @DATAROOTDIR@/swtpm/swtpm-localca
```

I would expect the line to be:
```
create_certs_tool = /usr/share/swtpm/swtpm-localca
```

*Version Info*:
OS: Ubuntu 22.04.1 LTS
swtpm: 0.6.3-0ubuntu3

Could you please fix the build/packaging process?

Thanks and Best Regards,
Josef

Tags: bitesize jammy
Revision history for this message
Nick Rosbrook (enr0n) wrote :

It looks like this is a side effect of debian/patches/0001-Install-swtpm-localca-to-the-correct-path.patch, which is an Ubuntu-specific patch. I think samples/swtpm-create-user-config-files.in also needs to be patched to use LIBEXECDIR instead of DATAROOTDIR.

tags: added: bitesize
Changed in swtpm (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Changed in swtpm (Ubuntu Jammy):
status: New → Triaged
importance: Undecided → Low
Nick Rosbrook (enr0n)
tags: added: foundations-triage-discuss
tags: removed: foundations-triage-discuss
tags: added: jammy
Revision history for this message
Lena Voytek (lvoytek) wrote :

Currently tracking the fix for this issue at (LP: #2016744) Marking as duplicate

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.