Merge ~lvoytek/ubuntu/+source/swtpm:add-sys-admin-oracular into ubuntu/+source/swtpm:ubuntu/devel
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | git-ubuntu bot | ||||||||
Approved revision: | not available | ||||||||
Merge reported by: | Lena Voytek | ||||||||
Merged at revision: | 795ee39205026106b218181e866fb501bb380485 | ||||||||
Proposed branch: | ~lvoytek/ubuntu/+source/swtpm:add-sys-admin-oracular | ||||||||
Merge into: | ubuntu/+source/swtpm:ubuntu/devel | ||||||||
Diff against target: |
38 lines (+12/-0) 2 files modified
debian/changelog (+10/-0) debian/usr.bin.swtpm (+2/-0) |
||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
git-ubuntu bot | Approve | ||
Bryce Harrington (community) | Approve | ||
Canonical Server Reporter | Pending | ||
Review via email: mp+468957@code.launchpad.net |
Description of the change
Add some additional apparmor permissions to fix lockfile and tpm_vtpm_proxy module access
PPA: https:/
Testing:
sys_admin test steps
$ sudo apt update && sudo apt dist-upgrade -y
$ sudo apt install swtpm apparmor -y
$ mkdir /tmp/myvtpm
# Before fix
$ sudo modprobe tpm_vtpm_proxy
$ sudo swtpm chardev --vtpm-proxy --tpmstate dir=/tmp/myvtpm --tpm2 --ctrl type=tcp,port=2322
swtpm: Ioctl to create vtpm proxy failed: Operation not permitted
$ sudo add-apt-repository ppa:lvoytek/
$ sudo apt update && sudo apt upgrade -y
# After fix
$ sudo modprobe tpm_vtpm_proxy
$ sudo swtpm chardev --vtpm-proxy --tpmstate dir=/tmp/myvtpm --tpm2 --ctrl type=tcp,port=2322
New TPM device: /dev/tpm1 (major/minor = 253/1)
lockfile test steps
$ sudo apt update && apt dist-upgrade -y
$ sudo apt install swtpm virt-manager apparmor -y
# Create a vm with virt-manager that uses a TPM2 device and start it
# A directory will show up in /var/lib/
# /var/lib/
$ sudo swtpm socket --print-states --tpmstate dir=/var/
swtpm: SWTPM_NVRAM_
# Stop vm and update
$ sudo add-apt-repository ppa:lvoytek/
$ sudo apt update && sudo apt upgrade -y
$ sudo killall swtpm
# Start vm again
$ sudo swtpm socket --print-states --tpmstate dir=/var/
{ "type": "swtpm", "states": [] }
All looks like it checks out.
Thank you for the almost- paint-by- numbers test cases, this will feed directly into the SRU test case. Only improvement would be a canned vm creation cmdline; I inadvertently created a container off the bat.
Oh, also minor note that this:
$ sudo apt update && apt dist-upgrade -y
Should be:
$ sudo apt update
$ sudo apt dist-upgrade -y
Everything else looks good, and packaging work is correct. +1 LGTM.