rust-u2f icon indicating copy to clipboard operation
rust-u2f copied to clipboard

Gentoo Linux support

Open powerman opened this issue 2 years ago • 1 comments

Thanks for the tool! I've used it to enable 2FA on Google without providing my phone number or Android phone.

I've added package (ebuild) for Gentoo Linux in my overlay (https://github.com/powerman/powerman-overlay/tree/master/app-crypt/rust-u2f), so it can be installed on Gentoo using:

# layman -a powerman
# emerge app-crypt/rust-u2f

I don't use systemd but I was able to successfully run it using runit service management this way:

/etc/service/softu2f/run

#!/bin/bash

umask 0007

rm -rf /run/softu2f
mkdir -p /run/softu2f
chgrp sys /run/softu2f

exec chpst -u root:sys /usr/lib/softu2f/system-daemon -s /run/softu2f/softu2f.sock

/etc/service/softu2f-user/run

#!/bin/bash

sv s /etc/service/x | grep -q ^run: || exit
sv s /etc/service/softu2f | grep -q ^run: || exit

. /etc/profile
export DBUS_SESSION_BUS_ADDRESS="$(<~powerman/.local/share/env/DBUS_SESSION_BUS_ADDRESS)"

exec chpst -u powerman:sys /usr/lib/softu2f/user-daemon -s /run/softu2f/softu2f.sock

The only weird issue I noticed is binaries built with --release does not working, unlike debug binaries. There are no output, it just doesn't work, so it's hard to make a good bugreport.

powerman avatar Jun 02 '22 21:06 powerman

Very cool! First I heard of someone running this on Gentoo, nice job getting it working. Happy to leave this issue open for anyone else who'd like to do the same.

The --release thing was a bug, just fixed it.

danstiner avatar Oct 26 '22 06:10 danstiner