"The Google Authenticator project includes implementations of one-time passcode generators for several mobile platforms, as well as a pluggable authentication module (PAM). One-time passcodes are generated using open standards developed by the Initiative for Open Authentication (OATH) (which is unrelated to OAuth). These implementations support the HMAC-Based One-time Password (HOTP) algorithm specified in RFC 4226 and the Time-based One-time Password (TOTP) algorithm specified in RFC 6238. Implementations This project currently offers mobile application implementations of HOTP/TOTP for Android, iOS, and Blackberry, as well as a PAM module. " Informative blog post: http://www.sharpley.org.uk/lightdm-google-authentication Please add it to the tree.
Maybe you can speed up the inclusion process by submitting an ebuild for review :)
Created attachment 317522 [details, diff] drop qrencode automagic
Created attachment 317524 [details, diff] google-authenticator-1.0-Makefile.patch
Created attachment 317526 [details, diff] google-authenticator-1.0-dropqrencode.patch
Comment on attachment 317526 [details, diff] google-authenticator-1.0-dropqrencode.patch >Sa 2. Jun 08:15:51 CEST 2012 >Manuel Rueger (gentoo@rueg.eu) >Drops the complete qrencode-dependend code. >No automagic wanted. > >--- google-authenticator.c.old 2012-06-02 08:11:02.707494577 +0200 >+++ google-authenticator.c 2012-06-02 08:12:44.782495926 +0200 >@@ -183,114 +183,6 @@ > const char *url = getURL(secret, label, &encoderURL, use_totp); > puts(encoderURL); > >- // Only newer systems have support for libqrencode. So, instead of requiring >- // it at build-time, we look for it at run-time. If it cannot be found, the >- // user can still type the code in manually, or he can copy the URL into >- // his browser. >- if (isatty(1)) { >- void *qrencode = dlopen("libqrencode.so.2", RTLD_NOW | RTLD_LOCAL); >- if (!qrencode) { >- qrencode = dlopen("libqrencode.so.3", RTLD_NOW | RTLD_LOCAL); >- } >- if (qrencode) { >- typedef struct { >- int version; >- int width; >- unsigned char *data; >- } QRcode; >- QRcode *(*QRcode_encodeString8bit)(const char *, int, int) = >- (QRcode *(*)(const char *, int, int)) >- dlsym(qrencode, "QRcode_encodeString8bit"); >- void (*QRcode_free)(QRcode *qrcode) = >- (void (*)(QRcode *))dlsym(qrencode, "QRcode_free"); >- if (QRcode_encodeString8bit && QRcode_free) { >- QRcode *qrcode = QRcode_encodeString8bit(url, 0, 1); >- char *ptr = (char *)qrcode->data; >- // Output QRCode using ANSI colors. Instead of black on white, we >- // output black on grey, as that works independently of whether the >- // user runs his terminals in a black on white or white on black color >- // scheme. >- // But this requires that we print a border around the entire QR Code. >- // Otherwise, readers won't be able to recognize it. >- if (qr_mode != QR_UTF8) { >- for (int i = 0; i < 2; ++i) { >- printf(ANSI_BLACKONGREY); >- for (int x = 0; x < qrcode->width + 4; ++x) printf(" "); >- puts(ANSI_RESET); >- } >- for (int y = 0; y < qrcode->width; ++y) { >- printf(ANSI_BLACKONGREY" "); >- int isBlack = 0; >- for (int x = 0; x < qrcode->width; ++x) { >- if (*ptr++ & 1) { >- if (!isBlack) { >- printf(ANSI_BLACK); >- } >- isBlack = 1; >- } else { >- if (isBlack) { >- printf(ANSI_WHITE); >- } >- isBlack = 0; >- } >- printf(" "); >- } >- if (isBlack) { >- printf(ANSI_WHITE); >- } >- puts(" "ANSI_RESET); >- } >- for (int i = 0; i < 2; ++i) { >- printf(ANSI_BLACKONGREY); >- for (int x = 0; x < qrcode->width + 4; ++x) printf(" "); >- puts(ANSI_RESET); >- } >- } else { >- // Drawing the QRCode with Unicode block elements is desirable as >- // it makes the code much smaller, which is often easier to scan. >- // Unfortunately, many terminal emulators do not display these >- // Unicode characters properly. >- printf(ANSI_BLACKONGREY); >- for (int i = 0; i < qrcode->width + 4; ++i) { >- printf(" "); >- } >- puts(ANSI_RESET); >- for (int y = 0; y < qrcode->width; y += 2) { >- printf(ANSI_BLACKONGREY" "); >- for (int x = 0; x < qrcode->width; ++x) { >- int top = qrcode->data[y*qrcode->width + x] & 1; >- int bottom = 0; >- if (y+1 < qrcode->width) { >- bottom = qrcode->data[(y+1)*qrcode->width + x] & 1; >- } >- if (top) { >- if (bottom) { >- printf(UTF8_BOTH); >- } else { >- printf(UTF8_TOPHALF); >- } >- } else { >- if (bottom) { >- printf(UTF8_BOTTOMHALF); >- } else { >- printf(" "); >- } >- } >- } >- puts(" "ANSI_RESET); >- } >- printf(ANSI_BLACKONGREY); >- for (int i = 0; i < qrcode->width + 4; ++i) { >- printf(" "); >- } >- puts(ANSI_RESET); >- } >- QRcode_free(qrcode); >- } >- dlclose(qrencode); >- } >- } >- > free((char *)url); > free(encoderURL); > }
Created attachment 317528 [details] google-authenticator-1.0.ebuild
Created attachment 317736 [details] google-authenticator-1.0.ebuild This will soon be in the sunrise overlay. You can find it at: http://git.overlays.gentoo.org/gitweb/?p=proj/sunrise-reviewed.git;a=tree;f=sys-auth/google-authenticator
Any chance this could get to distro proper?
Created attachment 406804 [details] google-authenticator-9999.ebuild I've updated the sunrise ebuild to build from github.
It would be great to have this in the main portage tree. Having to enable sunrise just for this (or copy it into the local portage overlay) is rather annoying. Especially considering that there's always some error spam when using eix-sync with sunrise enabled...
Any new package needs a maintainer to enter the main tree. If that sounds like you, check out https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers
I wouldn't mind, especially considering how little activity this specific package has.
well, simply declare ckearly you wish / want to become the proxy maintianer nd it's a start. In this case there is already an ebuild submitted by someone else which confuses ownership. However we can sort that. Consider joining in the irc channel listed in https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers
in the tree now because i wants it https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=987becfd4f95c4527156e2c51ebe6972e33b280d