[PATCH 0/1] Fix libykpers reference in python-yubikey-manager

  • Done
  • quality assurance status badge
Details
2 participants
  • Dhruvin Gandhi
  • Ludovic Courtès
Owner
unassigned
Submitted by
Dhruvin Gandhi
Severity
normal
D
D
Dhruvin Gandhi wrote on 2 Jul 2021 23:18
(address . guix-patches@gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20210702211816.27199-1-contact@dhruvin.dev
libykpers from yubikey-personalization package is required by
python-yubikey-manager to perform otp operations.

This patch fixes it. ($ ykman -v)

PS: The yubikey packages in the repo are quite old now and there are major
version changes upstream. I'll soon submit patches, fixing some of them.

Dhruvin Gandhi (1):
gnu: python-yubikey-manager: Fix libykpers reference.

gnu/packages/security-token.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

--
2.32.0
D
D
Dhruvin Gandhi wrote on 2 Jul 2021 23:21
[PATCH 1/1] gnu: python-yubikey-manager: Fix libykpers reference.
(address . 49342@debbugs.gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20210702212159.27440-1-contact@dhruvin.dev
* gnu/packages/security-token.scm (python-yubikey-manager): Fix libykpers reference.
---
gnu/packages/security-token.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (30 lines)
diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index 49ca1dc01e..3c2f336497 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -657,6 +657,23 @@ implementing a Relying Party.")
(base32
"11rsmcaj60k3y5m5gdhr2nbbz0w5dm3m04klyxz0fh5hnpcmr7fm"))))
(build-system python-build-system)
+ (arguments
+ '(#:modules ((srfi srfi-1)
+ (guix build utils)
+ (guix build python-build-system))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-libykpers-reference
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "ykman/driver_otp.py"
+ (("Ykpers\\('ykpers-1', '1'\\)")
+ (string-append
+ "Ykpers('"
+ (find (negate symbolic-link?)
+ (find-files (assoc-ref inputs "yubikey-personalization")
+ "^libykpers-.*\\.so\\..*"))
+ "')")))
+ #t)))))
(propagated-inputs
`(("python-six" ,python-six)
("python-pyscard" ,python-pyscard)
--
2.32.0
D
D
Dhruvin Gandhi wrote on 3 Jul 2021 06:32
[PATCH v2 0/1] Update Copyright
(address . 49342@debbugs.gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20210703043217.3200-1-contact@dhruvin.dev
I missed updating the copyright in last patch. Here's v2.

Dhruvin Gandhi (1):
gnu: python-yubikey-manager: Fix libykpers reference.

gnu/packages/security-token.scm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)


base-commit: eef099a2e1648032c571567c6da29ccd86e72058
--
2.32.0
D
D
Dhruvin Gandhi wrote on 3 Jul 2021 06:32
[PATCH v2 1/1] gnu: python-yubikey-manager: Fix libykpers reference.
(address . 49342@debbugs.gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20210703043217.3200-2-contact@dhruvin.dev
* gnu/packages/security-token.scm (python-yubikey-manager): Fix libykpers reference.
---
gnu/packages/security-token.scm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index 49ca1dc01e..8af27176cc 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2020 Raphaël Mélotte <raphael.melotte@mind.be>
;;; Copyright © 2021 Antero Mejr <antero@kodmin.com>
;;; Copyright © 2021 Sergey Trofimov <sarg@sarg.org.ru>
+;;; Copyright © 2021 Dhruvin Gandhi <contact@dhruvin.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -657,6 +658,23 @@ implementing a Relying Party.")
(base32
"11rsmcaj60k3y5m5gdhr2nbbz0w5dm3m04klyxz0fh5hnpcmr7fm"))))
(build-system python-build-system)
+ (arguments
+ '(#:modules ((srfi srfi-1)
+ (guix build utils)
+ (guix build python-build-system))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-libykpers-reference
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "ykman/driver_otp.py"
+ (("Ykpers\\('ykpers-1', '1'\\)")
+ (string-append
+ "Ykpers('"
+ (find (negate symbolic-link?)
+ (find-files (assoc-ref inputs "yubikey-personalization")
+ "^libykpers-.*\\.so\\..*"))
+ "')")))
+ #t)))))
(propagated-inputs
`(("python-six" ,python-six)
("python-pyscard" ,python-pyscard)
--
2.32.0
D
D
Dhruvin Gandhi wrote on 8 Jul 2021 08:12
Re: [PATCH v2 0/1] Update Copyright
(address . 49342@debbugs.gnu.org)
87o8bdcp0w.fsf@dhruvin.dev
Dhruvin Gandhi <contact@dhruvin.dev> writes:

Toggle quote (13 lines)
> I missed updating the copyright in last patch. Here's v2.
>
> Dhruvin Gandhi (1):
> gnu: python-yubikey-manager: Fix libykpers reference.
>
> gnu/packages/security-token.scm | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
>
> base-commit: eef099a2e1648032c571567c6da29ccd86e72058
> --
> 2.32.0

Are there any updates on the patch? It'd be great if we can merge it.
The patch only adds (links) a missing library at runtime. It can be
verified by running `ykman -v` before and after the patch.
Thanks.
L
L
Ludovic Courtès wrote on 30 Jul 2021 22:50
Re: bug#49342: [PATCH 0/1] Fix libykpers reference in python-yubikey-manager
(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)(address . 49342-done@debbugs.gnu.org)
87pmuzzfu4.fsf_-_@gnu.org
Hi Dhruvin,

Dhruvin Gandhi <contact@dhruvin.dev> skribis:

Toggle quote (2 lines)
> * gnu/packages/security-token.scm (python-yubikey-manager): Fix libykpers reference.

Applied.

Thank you, and apologies for the delay!

Ludo’.
Closed
?