GNU bug report logs - #53270
[PATCH] gnu: Add yubikey-oath-dmenu.

Previous Next

Package: guix-patches;

Reported by: John Kehayias <john.kehayias <at> protonmail.com>

Date: Fri, 14 Jan 2022 21:16:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53270 in the body.
You can then email your comments to 53270 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#53270; Package guix-patches. (Fri, 14 Jan 2022 21:16:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to John Kehayias <john.kehayias <at> protonmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 14 Jan 2022 21:16:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: Guix-patches <guix-patches <at> gnu.org>
Subject: [PATCH] gnu: Add yubikey-oath-dmenu.
Date: Fri, 14 Jan 2022 21:15:10 +0000
[Message part 1 (text/plain, inline)]
Hello!

Here is a patch to add yubikey-oath-dmenu, a handy way to get OATH codes from a Yubikey with a dmenu interface. I use it all the time (though through rofi). It seemed the best place was in the security-token module with similar yubikey packages. This is written in python but meant to run as a program rather than used as a library, so I called it without a python- prefix (and it runs with just non-propagated inputs).

Thanks!
John
[0001-gnu-Add-yubikey-oath-dmenu.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#53270; Package guix-patches. (Fri, 14 Jan 2022 23:02:02 GMT) Full text and rfc822 format available.

Message #8 received at 53270 <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: "53270 <at> debbugs.gnu.org" <53270 <at> debbugs.gnu.org>
Subject: [PATCH v2] gnu: Add yubikey-oath-dmenu.
Date: Fri, 14 Jan 2022 23:01:34 +0000
[Message part 1 (text/plain, inline)]
Updated patch to use 'search-input-file' rather than 'which'. Since these are not meant to be host-side build paths, but for the target machine, if I understand correctly why 'which' shouldn't be used here.
[0001-gnu-Add-yubikey-oath-dmenu.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#53270; Package guix-patches. (Sat, 15 Jan 2022 11:28:02 GMT) Full text and rfc822 format available.

Message #11 received at 53270 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: John Kehayias <john.kehayias <at> protonmail.com>, "53270 <at> debbugs.gnu.org"
 <53270 <at> debbugs.gnu.org>
Subject: Re: [bug#53270] [PATCH v2] gnu: Add yubikey-oath-dmenu.
Date: Sat, 15 Jan 2022 12:27:24 +0100
[Message part 1 (text/plain, inline)]
John Kehayias via Guix-patches via schreef op vr 14-01-2022 om 23:01
[+0000]:
> +          (replace 'install
> +            (lambda _
> +              (invoke "make" "install"
> +                      (string-append "DESTDIR=" #$output)
> +                      "PREFIX="))))))

Guix doesn't do staged installation
(https://www.gnu.org/software/automake/manual/html_node/DESTDIR.html),
so I would avoid (ab)using DESTDIR here.  Instead of this phase,
maybe do

          (replace 'install
            (lambda _
              (invoke "make" "install"
                      (string-append "PREFIX=" #$output)))))))

instead (untested)?

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#53270; Package guix-patches. (Sat, 15 Jan 2022 19:54:02 GMT) Full text and rfc822 format available.

Message #14 received at 53270 <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: "53270 <at> debbugs.gnu.org" <53270 <at> debbugs.gnu.org>
Subject: Re: [bug#53270] [PATCH v2] gnu: Add yubikey-oath-dmenu.
Date: Sat, 15 Jan 2022 19:52:50 +0000
[Message part 1 (text/plain, inline)]
Hi Maxime,

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Saturday, January 15th, 2022 at 6:27 AM, Maxime Devos wrote:

> Guix doesn't do staged installation
> (https://www.gnu.org/software/automake/manual/html_node/DESTDIR.html),
> so I would avoid (ab)using DESTDIR here. Instead of this phase,
> maybe do
> [...]
> (string-append "PREFIX=" #$output)))))))
> instead (untested)?
>

No idea why I had DESTDIR there (there are some old packages I made, live and learn!) but your suggestion has the same result.

Attached is v3 of the patch with just this adjustment.

Thanks!
John
[0001-gnu-Add-yubikey-oath-dmenu.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#53270; Package guix-patches. (Mon, 24 Jan 2022 06:16:02 GMT) Full text and rfc822 format available.

Message #17 received at 53270 <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: "53270 <at> debbugs.gnu.org" <53270 <at> debbugs.gnu.org>
Subject: Re: [bug#53270] [PATCH v3] gnu: Add yubikey-oath-dmenu.
Date: Mon, 24 Jan 2022 06:15:37 +0000
Hi Maxime,

I sent a v3 of the patch in response to your previous comment, were there other changes or comments you had in mind for this package?

Thanks!
John




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Mon, 24 Jan 2022 09:11:02 GMT) Full text and rfc822 format available.

Notification sent to John Kehayias <john.kehayias <at> protonmail.com>:
bug acknowledged by developer. (Mon, 24 Jan 2022 09:11:02 GMT) Full text and rfc822 format available.

Message #22 received at 53270-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: John Kehayias <john.kehayias <at> protonmail.com>
Cc: "53270 <at> debbugs.gnu.org" <53270-done <at> debbugs.gnu.org>,
 Maxime Devos <maximedevos <at> telenet.be>
Subject: Re: bug#53270: [PATCH] gnu: Add yubikey-oath-dmenu.
Date: Mon, 24 Jan 2022 10:10:00 +0100
[Message part 1 (text/plain, inline)]
Hi,

John Kehayias <john.kehayias <at> protonmail.com> skribis:

> From a5958b588cebd23012d7d9cbeb8f1e22a3802ea2 Mon Sep 17 00:00:00 2001
> From: John Kehayias <john.kehayias <at> protonmail.com>
> Date: Fri, 14 Jan 2022 16:11:47 -0500
> Subject: [PATCH] gnu: Add yubikey-oath-dmenu.
>
> * gnu/packages/security-token.scm (yubikey-oath-dmenu): New variable.

Applied.  I took the liberty to make the change below, to avoid using a
non-literal string as the ‘substitute*’ pattern (it’s possible to use a
non-literal string but more error prone).

Thanks John and Maxime!

Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index b2f9f83ba2..8190e1e1e2 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -471,14 +471,12 @@ (define-public yubikey-oath-dmenu
           (delete 'build)     ; or build
           (add-after 'unpack 'fix-paths
             (lambda* (#:key inputs #:allow-other-keys)
-              (for-each (lambda (tool)
-                          (substitute* "yubikey-oath-dmenu.py"
-                            (((string-append "'" tool))
-                             (string-append
-                              "'"
-                              (search-input-file inputs
-                                                 (string-append "/bin/" tool))))))
-                        (list "dmenu" "notify-send" "wl-copy" "xclip" "xdotool"))))
+              (substitute* "yubikey-oath-dmenu.py"
+                (("'(dmenu|notify-send|wl-copy|xclip|xdotool)" _ tool)
+                 (string-append
+                  "'"
+                  (search-input-file inputs
+                                     (string-append "/bin/" tool)))))))
           (replace 'install
             (lambda _
               (invoke "make" "install"

Information forwarded to guix-patches <at> gnu.org:
bug#53270; Package guix-patches. (Mon, 24 Jan 2022 15:47:02 GMT) Full text and rfc822 format available.

Message #25 received at 53270-done <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: "53270 <at> debbugs.gnu.org" <53270-done <at> debbugs.gnu.org>,
 Maxime Devos <maximedevos <at> telenet.be>
Subject: Re: bug#53270: [PATCH] gnu: Add yubikey-oath-dmenu.
Date: Mon, 24 Jan 2022 15:46:20 +0000
Hi,

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Monday, January 24th, 2022 at 4:10 AM, Ludovic Courtès wrote:

> > Subject: [PATCH] gnu: Add yubikey-oath-dmenu.
> > -   gnu/packages/security-token.scm (yubikey-oath-dmenu): New variable.
>
> Applied. I took the liberty to make the change below, to avoid using a
> non-literal string as the ‘substitute*’ pattern (it’s possible to use a
> non-literal string but more error prone).
>
> Thanks John and Maxime!
>

Ah, that's how you do that, I'll add that to my virtual packaging toolbox.

Thanks for pushing and thanks for the review Maxime!

John




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 22 Feb 2022 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 35 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.