agherzan / yubikey-full-disk-encryption

Use YubiKey to unlock a LUKS partition
Apache License 2.0
795 stars 50 forks source link

Make udisks dependency optional? #70

Closed thithib closed 3 years ago

thithib commented 3 years ago

Hi and thanks a lot for this great and quite useful project!

I've been wondering if you would consider making the use of udisksctl optional. At least on Arch Linux, udisks2 brings and pulls many things I don't need, just to allow unprivileged use of ykfde-open while your tool is otherwise attractively simple and standalone.

I think it would be rather straightforward to move udisks2 (and thus expect too) to optdepends, and check if udisksctl and expect are available on the system at runtime when reaching the unprivileged use case. What do you think?

Vincent43 commented 3 years ago

Without udisks ykfde-open can't be used unprivileged, do you want it to check for udisks/expect while running unprivileged and bail-out if they aren't available?

thithib commented 3 years ago

Precisely, yes.

Vincent43 commented 3 years ago

@thithib please test if https://github.com/agherzan/yubikey-full-disk-encryption/pull/71 works for you.

thithib commented 3 years ago

It works for me, thanks!

You may want to redirect stderr too, although I don't know in what cases "diagnostic messages" mentioned in the manual would be output with command -v...

Vincent43 commented 3 years ago

I added stderr redirect, thx.