tpm2-software / tpm2-totp

Attest the trustworthiness of a device against a human using time-based one-time passwords
https://tpm2-software.github.io
BSD 3-Clause "New" or "Revised" License
163 stars 36 forks source link

dist: add dracut module for plymouth-tpm2-totp #37

Closed diabonas closed 5 years ago

diabonas commented 5 years ago

Add a dracut module to display the TOTP during boot. Since most distributions using dracut will have plymouth as well, use plymouth-tpm2-totp for this purpose.

The module is comparable to the already existing mkinitcpio hooks, but with dracut we can use udev in order to wait for the TPM to be detected by the kernel, which might help avoiding some race conditions.

Since we now detect the plymouth installation location using pkg-config, we can use this for the mkinitcpio hooks as well, making them more robust against custom installation locations. Also simplify the mkinitcpio hooks directory detection a bit to look similar to the new dracut code and rename PLYMOUTH to HAVE_PLYMOUTH for consistency.

codecov[bot] commented 5 years ago

Codecov Report

Merging #37 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #37   +/-   ##
=======================================
  Coverage   80.48%   80.48%           
=======================================
  Files           5        5           
  Lines         820      820           
=======================================
  Hits          660      660           
  Misses        160      160

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 473e6c0...4abacf2. Read the comment docs.

diabonas commented 5 years ago

Other that this, I guess we are lacking some new entries for the .gitignore. But I opened #38 which (including git.mk) should help us out very much...

The only newly generated file in the PR should be dist/dracut/module-setup.sh, which I added to .gitignore. But yeah, git.mk should make life much easier anyway :+1: