Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gentoo Linux support #87

Open
powerman opened this issue Jun 2, 2022 · 1 comment
Open

Gentoo Linux support #87

powerman opened this issue Jun 2, 2022 · 1 comment

Comments

@powerman
Copy link

powerman commented Jun 2, 2022

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.

@danstiner
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants