GNU bug report logs - #61018
[PATCH 0/2] Add pcsc-tools, and missing dependency perl-pcsc

Previous Next

Package: guix-patches;

Reported by: Jake Leporte <jakeleporte <at> outlook.com>

Date: Mon, 23 Jan 2023 04:35:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

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 61018 in the body.
You can then email your comments to 61018 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#61018; Package guix-patches. (Mon, 23 Jan 2023 04:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jake Leporte <jakeleporte <at> outlook.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 23 Jan 2023 04:35:02 GMT) Full text and rfc822 format available.

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

From: Jake Leporte <jakeleporte <at> outlook.com>
To: guix-patches <at> gnu.org
Cc: Jake Leporte <jakeleporte <at> outlook.com>
Subject: [PATCH 0/2] Add pcsc-tools, and missing dependency perl-pcsc
Date: Sun, 22 Jan 2023 22:29:22 -0600
This patch series adds PCSC Tools, which is a set of utilities useful for
debugging a smart card setup.

The `gscriptor' component doesn't seem to be working, but on my end, that
seems like a problem with `perl-gtk3' on Guix.  At any rate, the other PCSC
Tools are working, and since they are recommended in several smart card setup
tutorials for GNU/Linux, they would be nice to have in the distribution.

Jake Leporte (2):
  gnu: Add perl-pcsc.
  gnu: Add pcsc-tools.

 gnu/packages/perl.scm           | 36 ++++++++++++++++++++++++++++
 gnu/packages/security-token.scm | 42 +++++++++++++++++++++++++++++++++
 2 files changed, 78 insertions(+)


base-commit: 2b1e5cb6a82e60298b620ef8d2dbf90cfb925015
prerequisite-patch-id: 55ebfdbee35b36ac06da23b716337ecfef350452
prerequisite-patch-id: 12b9437ce6c6849e83e52cabad56672a5c73e2a7
prerequisite-patch-id: 52c97b6e4d8d4b78217423a3f1323d95a609de8c
prerequisite-patch-id: 213e646246e9cda4b2da70df3f2b3f9eb09612a2
--
2.34.1




Information forwarded to guix-patches <at> gnu.org:
bug#61018; Package guix-patches. (Mon, 23 Jan 2023 04:40:02 GMT) Full text and rfc822 format available.

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

From: Jake Leporte <jakeleporte <at> outlook.com>
To: 61018 <at> debbugs.gnu.org
Cc: Jake Leporte <jakeleporte <at> outlook.com>
Subject: [PATCH 1/2] gnu: Add perl-pcsc.
Date: Sun, 22 Jan 2023 22:39:30 -0600
---
 gnu/packages/perl.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index edf47f6..1972830 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -85,6 +85,7 @@ (define-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages sdl)
+  #:use-module (gnu packages security-token)
   #:use-module (gnu packages textutils)
   #:use-module (gnu packages video)
   #:use-module (gnu packages web)
@@ -12270,6 +12271,41 @@ (define-public perl-path-iterator-rule
 arduous to type for one-liners.")
     (license license:asl2.0)))
 
+(define-public perl-pcsc
+  (package
+    (name "perl-pcsc")
+    (version "1.4.14")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://cpan/authors/id/W/WH/WHOM/pcsc-perl-" version
+                    ".tar.bz2"))
+              (sha256
+               (base32
+                "17f6i16jv6ci6459vh6y3sz94vgcvykjjszcl4xsykryakjvf8i7"))))
+    (build-system perl-build-system)
+    (arguments
+     `(;; The tests for this package require access to a
+       ;; card reader with a card inserted, so they won't be
+       ;; possible to run in the build environment
+       #:tests? #f
+       #:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'patch-dlopen
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (substitute* "PCSCperl.h"
+                        (("dlopen\\(\"libpcsclite.so.1\"")
+                         (string-append "dlopen(\""
+                                        (assoc-ref inputs "pcsc-lite")
+                                        "/lib/libpcsclite.so.1\""))))))))
+    (native-inputs (list pkg-config))
+    (inputs (list pcsc-lite))
+    (synopsis "Perl library for PC/SC")
+    (description
+     "This library allows communication with a smart card using PC/SC from a Perl
+script.")
+    (home-page "https://pcsc-perl.apdu.fr/")
+    (license license:gpl2+)))
+
 (define-public perl-pod-constants
   (package
     (name "perl-pod-constants")
-- 
2.34.1





Information forwarded to guix-patches <at> gnu.org:
bug#61018; Package guix-patches. (Mon, 23 Jan 2023 04:41:01 GMT) Full text and rfc822 format available.

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

From: Jake Leporte <jakeleporte <at> outlook.com>
To: 61018 <at> debbugs.gnu.org
Cc: Jake Leporte <jakeleporte <at> outlook.com>
Subject: [PATCH 2/2] gnu: Add pcsc-tools.
Date: Sun, 22 Jan 2023 22:40:04 -0600
---
 gnu/packages/security-token.scm | 42 +++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index 619be42..162c3d5 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -253,6 +253,48 @@ (define-public pcsc-lite
                    license:isc                  ; src/strlcat.c src/strlcpy.c
                    license:gpl3+))))            ; src/spy/*
 
+(define-public pcsc-tools
+  (package
+    (name "pcsc-tools")
+    (version "1.6.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://salsa.debian.org/rousseau/pcsc-tools.git/")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "16kvw8y5289fp6y3z8l5w61gfrk872kd500a27sgr5k5dpr9vfbk"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'patch-data-paths
+                          (lambda _
+                            (substitute* "ATR_analysis"
+                              (((string-append
+                                 "\"/usr/local/pcsc/smartcard_list.txt\", "
+                                 "\"/usr/share/pcsc/smartcard_list.txt\", "
+                                 "\"/usr/local/share/pcsc/smartcard_list.txt\""))
+                               (string-append "\""
+                                #$output "/share/pcsc/smartcard_list.txt\"")))
+                            (substitute* "ATR_analysis.1p"
+                              (("^([.]IR [.]/) ,\n$" _ cwd)
+                               (string-append cwd "\n"))
+                              (("^[.]I /usr/local/pcsc/\n$")
+                               "")
+                              (("/usr/share/pcsc/\n$")
+                               (string-append #$output "/share/pcsc/\n"))))))))
+    (native-inputs (list autoconf automake libtool gnu-gettext pkg-config))
+    (inputs (list pcsc-lite))
+    (propagated-inputs (list perl perl-pcsc perl-gtk3))
+    (synopsis "Tools for use with smart cards and PC/SC")
+    (description
+     "This package provides @code{pcsc_scan}, @code{ATR_analysis}, @code{scriptor},
+and @code{gscriptor}.")
+    (home-page "https://pcsc-tools.apdu.fr/")
+    (license license:gpl2+)))
+
 (define-public ykclient
   (package
     (name "ykclient")
-- 
2.34.1





Information forwarded to guix-patches <at> gnu.org:
bug#61018; Package guix-patches. (Mon, 23 Jan 2023 23:02:01 GMT) Full text and rfc822 format available.

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

From: Jake Leporte <jakeleporte <at> outlook.com>
To: 61018 <at> debbugs.gnu.org
Cc: Jake Leporte <jakeleporte <at> outlook.com>
Subject: [PATCH v2] gnu: Add perl-pcsc.
Date: Mon, 23 Jan 2023 17:01:30 -0600
I've been notified that another one of my patches used the old "assoc-ref"-style
code, and noticed that I had done the same for my `perl-pcsc` patch.  I've now
updated this patch to use the new G-Exps style.

---
 gnu/packages/perl.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index edf47f6..61ade11 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -85,6 +85,7 @@ (define-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages sdl)
+  #:use-module (gnu packages security-token)
   #:use-module (gnu packages textutils)
   #:use-module (gnu packages video)
   #:use-module (gnu packages web)
@@ -12270,6 +12271,41 @@ (define-public perl-path-iterator-rule
 arduous to type for one-liners.")
     (license license:asl2.0)))
 
+(define-public perl-pcsc
+  (package
+    (name "perl-pcsc")
+    (version "1.4.14")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://cpan/authors/id/W/WH/WHOM/pcsc-perl-" version
+                    ".tar.bz2"))
+              (sha256
+               (base32
+                "17f6i16jv6ci6459vh6y3sz94vgcvykjjszcl4xsykryakjvf8i7"))))
+    (build-system perl-build-system)
+    (arguments
+     (list
+           ;; The tests for this package require access to a
+           ;; card reader with a card inserted, so they won't be
+           ;; possible to run in the build environment
+           #:tests? #f
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'patch-dlopen
+                          (lambda* (#:key inputs #:allow-other-keys)
+                            (substitute* "PCSCperl.h"
+                              (("libpcsclite.so.1")
+                               (search-input-file inputs
+                                                  "/lib/libpcsclite.so.1"))))))))
+    (native-inputs (list pkg-config))
+    (inputs (list pcsc-lite))
+    (synopsis "Perl library for PC/SC")
+    (description
+     "This library allows communication with a smart card using PC/SC from a Perl
+script.")
+    (home-page "https://pcsc-perl.apdu.fr/")
+    (license license:gpl2+)))
+
 (define-public perl-pod-constants
   (package
     (name "perl-pod-constants")

base-commit: 2b1e5cb6a82e60298b620ef8d2dbf90cfb925015
prerequisite-patch-id: 55ebfdbee35b36ac06da23b716337ecfef350452
prerequisite-patch-id: 12b9437ce6c6849e83e52cabad56672a5c73e2a7
prerequisite-patch-id: 52c97b6e4d8d4b78217423a3f1323d95a609de8c
prerequisite-patch-id: c95a220593ae5d078a06605d9b0b228ab2c9592c
-- 
2.34.1





Information forwarded to guix-patches <at> gnu.org:
bug#61018; Package guix-patches. (Fri, 27 Jan 2023 02:28:02 GMT) Full text and rfc822 format available.

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

From: Jake Leporte <jakeleporte <at> outlook.com>
To: 61018 <at> debbugs.gnu.org
Cc: Jake Leporte <jakeleporte <at> outlook.com>
Subject: [PATCH v2] gnu: Add pcsc-tools.
Date: Thu, 26 Jan 2023 20:26:54 -0600
After finally understanding wrap-program, I've corrected the `pcsc-tools'
package definition.  Everything, including `gscriptor', now works properly.

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

diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index 619be42..e57c919 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -253,6 +253,73 @@ (define-public pcsc-lite
                    license:isc                  ; src/strlcat.c src/strlcpy.c
                    license:gpl3+))))            ; src/spy/*
 
+(define-public pcsc-tools
+  (package
+    (name "pcsc-tools")
+    (version "1.6.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://salsa.debian.org/rousseau/pcsc-tools.git/")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "16kvw8y5289fp6y3z8l5w61gfrk872kd500a27sgr5k5dpr9vfbk"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'patch-data-paths
+                          (lambda _
+                            (substitute* "ATR_analysis"
+                              (((string-append
+                                 "\"/usr/local/pcsc/smartcard_list.txt\", "
+                                 "\"/usr/share/pcsc/smartcard_list.txt\", "
+                                 "\"/usr/local/share/pcsc/smartcard_list.txt\""))
+                               (string-append "\""
+                                #$output "/share/pcsc/smartcard_list.txt\"")))
+                            (substitute* "ATR_analysis.1p"
+                              (("^([.]IR [.]/) ,\n$" _ cwd)
+                               (string-append cwd "\n"))
+                              (("^[.]I /usr/local/pcsc/\n$")
+                               "")
+                              (("/usr/share/pcsc/\n$")
+                               (string-append #$output "/share/pcsc/\n")))))
+                        (add-after 'patch-source-shebangs 'patch-env-shebangs
+                          (lambda* (#:key inputs #:allow-other-keys)
+                            (substitute* '("ATR_analysis" "gscriptor"
+                                           "scriptor")
+                              (("/usr/bin/env perl")
+                               (search-input-file inputs "/bin/perl")))))
+                        (add-after 'patch-shebangs 'wrap-programs
+                          (lambda _
+                            (for-each (lambda (prog)
+                                        (wrap-program (string-append #$output
+                                                                     "/bin/"
+                                                                     prog)
+                                                      `("PERL5LIB" =
+                                                        (,(getenv "PERL5LIB") ,
+                                                         (string-append #$(this-package-input
+                                                                           "perl-gtk3")
+                                                          "/lib/perl5/site_perl")))))
+                                      '("ATR_analysis" "gscriptor" "scriptor"))
+                            (wrap-program (string-append #$output
+                                                         "/bin/gscriptor")
+                                          `("GI_TYPELIB_PATH" =
+                                            (,(getenv "GI_TYPELIB_PATH")))))))))
+    (native-inputs (list autoconf automake libtool gnu-gettext pkg-config))
+    (inputs (list bash-minimal ;for wrap-program
+                  perl
+                  perl-pcsc
+                  perl-gtk3
+                  pcsc-lite))
+    (synopsis "Tools for use with smart cards and PC/SC")
+    (description
+     "This package provides @code{pcsc_scan}, @code{ATR_analysis}, @code{scriptor},
+and @code{gscriptor}.")
+    (home-page "https://pcsc-tools.apdu.fr/")
+    (license license:gpl2+)))
+
 (define-public ykclient
   (package
     (name "ykclient")

base-commit: 2b1e5cb6a82e60298b620ef8d2dbf90cfb925015
prerequisite-patch-id: 55ebfdbee35b36ac06da23b716337ecfef350452
prerequisite-patch-id: 12b9437ce6c6849e83e52cabad56672a5c73e2a7
prerequisite-patch-id: 52c97b6e4d8d4b78217423a3f1323d95a609de8c
prerequisite-patch-id: 90b350ab4778843697da28bb10344a84ccacc70c
prerequisite-patch-id: 0d5a1f7cfe93822a3f3b11c19f4b2662a79cda17
-- 
2.34.1





Information forwarded to guix-patches <at> gnu.org:
bug#61018; Package guix-patches. (Fri, 27 Jan 2023 17:38:01 GMT) Full text and rfc822 format available.

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

From: Jake Leporte <jakeleporte <at> outlook.com>
To: 61018 <at> debbugs.gnu.org
Cc: Jake Leporte <jakeleporte <at> outlook.com>
Subject: [PATCH v3 1/2] gnu: Add perl-pcsc.
Date: Fri, 27 Jan 2023 11:37:10 -0600
I made a mistake and sent a bad patch in my last message.  Just to be clear, I'm
re-sending the two-patch series with my most recent, working patches.  I
apologize for the mistake.

---
 gnu/packages/perl.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index edf47f6..61ade11 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -85,6 +85,7 @@ (define-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages sdl)
+  #:use-module (gnu packages security-token)
   #:use-module (gnu packages textutils)
   #:use-module (gnu packages video)
   #:use-module (gnu packages web)
@@ -12270,6 +12271,41 @@ (define-public perl-path-iterator-rule
 arduous to type for one-liners.")
     (license license:asl2.0)))
 
+(define-public perl-pcsc
+  (package
+    (name "perl-pcsc")
+    (version "1.4.14")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://cpan/authors/id/W/WH/WHOM/pcsc-perl-" version
+                    ".tar.bz2"))
+              (sha256
+               (base32
+                "17f6i16jv6ci6459vh6y3sz94vgcvykjjszcl4xsykryakjvf8i7"))))
+    (build-system perl-build-system)
+    (arguments
+     (list
+           ;; The tests for this package require access to a
+           ;; card reader with a card inserted, so they won't be
+           ;; possible to run in the build environment
+           #:tests? #f
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'patch-dlopen
+                          (lambda* (#:key inputs #:allow-other-keys)
+                            (substitute* "PCSCperl.h"
+                              (("libpcsclite.so.1")
+                               (search-input-file inputs
+                                                  "/lib/libpcsclite.so.1"))))))))
+    (native-inputs (list pkg-config))
+    (inputs (list pcsc-lite))
+    (synopsis "Perl library for PC/SC")
+    (description
+     "This library allows communication with a smart card using PC/SC from a Perl
+script.")
+    (home-page "https://pcsc-perl.apdu.fr/")
+    (license license:gpl2+)))
+
 (define-public perl-pod-constants
   (package
     (name "perl-pod-constants")

base-commit: dbf965dd7b76dfa50ee80e037a7404e163b9917c
prerequisite-patch-id: 55ebfdbee35b36ac06da23b716337ecfef350452
prerequisite-patch-id: 6cb7b2d1972d3eeb5ad8b82239b17043e7263ab0
prerequisite-patch-id: 52c97b6e4d8d4b78217423a3f1323d95a609de8c
prerequisite-patch-id: 90b350ab4778843697da28bb10344a84ccacc70c
-- 
2.34.1





Information forwarded to guix-patches <at> gnu.org:
bug#61018; Package guix-patches. (Fri, 27 Jan 2023 17:39:02 GMT) Full text and rfc822 format available.

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

From: Jake Leporte <jakeleporte <at> outlook.com>
To: 61018 <at> debbugs.gnu.org
Cc: Jake Leporte <jakeleporte <at> outlook.com>
Subject: [PATCH v3 2/2] gnu: Add pcsc-tools.
Date: Fri, 27 Jan 2023 11:37:11 -0600
---
 gnu/packages/security-token.scm | 65 +++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index 619be42..45f4f27 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -48,6 +48,7 @@ (define-module (gnu packages security-token)
   #:use-module (guix build-system python)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
@@ -253,6 +254,70 @@ (define-public pcsc-lite
                    license:isc                  ; src/strlcat.c src/strlcpy.c
                    license:gpl3+))))            ; src/spy/*
 
+(define-public pcsc-tools
+  (package
+    (name "pcsc-tools")
+    (version "1.6.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://salsa.debian.org/rousseau/pcsc-tools.git/")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "16kvw8y5289fp6y3z8l5w61gfrk872kd500a27sgr5k5dpr9vfbk"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'patch-data-paths
+                 (lambda _
+                   (substitute* "ATR_analysis"
+                     (((string-append
+                        "\"/usr/local/pcsc/smartcard_list.txt\", "
+                        "\"/usr/share/pcsc/smartcard_list.txt\", "
+                        "\"/usr/local/share/pcsc/smartcard_list.txt\""))
+                      (string-append "\""
+                                     #$output
+                                     "/share/pcsc/smartcard_list.txt\"")))
+                   (substitute* "ATR_analysis.1p"
+                     (("^([.]IR [.]/) ,\n$" _ cwd)
+                      (string-append cwd "\n"))
+                     (("^[.]I /usr/local/pcsc/\n$")
+                      "")
+                     (("/usr/share/pcsc/\n$")
+                      (string-append #$output "/share/pcsc/\n")))))
+               (add-after 'patch-shebangs 'wrap-programs
+                 (lambda _
+                   (for-each
+                    (lambda (prog)
+                      (wrap-program (string-append #$output
+                                                   "/bin/"
+                                                   prog)
+                        `("PERL5LIB" =
+                          (,(getenv "PERL5LIB") ,
+                           (string-append #$(this-package-input
+                                             "perl-gtk3")
+                                          "/lib/perl5/site_perl")))))
+                    '("ATR_analysis" "gscriptor" "scriptor"))
+                   (wrap-program (string-append #$output
+                                                "/bin/gscriptor")
+                     `("GI_TYPELIB_PATH" =
+                       (,(getenv "GI_TYPELIB_PATH")))))))))
+    (native-inputs (list autoconf automake libtool gnu-gettext pkg-config))
+    (inputs (list bash-minimal ;for wrap-program
+                  perl
+                  perl-pcsc
+                  perl-gtk3
+                  pcsc-lite))
+    (synopsis "Tools for use with smart cards and PC/SC")
+    (description
+     "This package provides @code{pcsc_scan}, @code{ATR_analysis}, @code{scriptor},
+and @code{gscriptor}.")
+    (home-page "https://pcsc-tools.apdu.fr/")
+    (license license:gpl2+)))
+
 (define-public ykclient
   (package
     (name "ykclient")
-- 
2.34.1





Information forwarded to guix-patches <at> gnu.org:
bug#61018; Package guix-patches. (Sat, 28 Jan 2023 03:00:02 GMT) Full text and rfc822 format available.

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

From: Jake Leporte <jakeleporte <at> outlook.com>
To: 61018 <at> debbugs.gnu.org
Cc: Jake Leporte <jakeleporte <at> outlook.com>
Subject: [PATCH v4] gnu: Add pcsc-tools.
Date: Fri, 27 Jan 2023 20:57:52 -0600
---
 gnu/packages/security-token.scm | 62 +++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index 619be42..cddb438 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -48,6 +48,7 @@ (define-module (gnu packages security-token)
   #:use-module (guix build-system python)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
@@ -253,6 +254,67 @@ (define-public pcsc-lite
                    license:isc                  ; src/strlcat.c src/strlcpy.c
                    license:gpl3+))))            ; src/spy/*
 
+(define-public pcsc-tools
+  (package
+    (name "pcsc-tools")
+    (version "1.6.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://salsa.debian.org/rousseau/pcsc-tools.git/")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "16kvw8y5289fp6y3z8l5w61gfrk872kd500a27sgr5k5dpr9vfbk"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'patch-data-paths
+                 (lambda _
+                   (substitute* "ATR_analysis"
+                     (((string-append
+                        "\"/usr/local/pcsc/smartcard_list.txt\", "
+                        "\"/usr/share/pcsc/smartcard_list.txt\", "
+                        "\"/usr/local/share/pcsc/smartcard_list.txt\""))
+                      (string-append "\""
+                                     #$output
+                                     "/share/pcsc/smartcard_list.txt\"")))
+                   (substitute* "ATR_analysis.1p"
+                     (("^([.]IR [.]/) ,\n$" _ cwd)
+                      (string-append cwd "\n"))
+                     (("^[.]I /usr/local/pcsc/\n$")
+                      "")
+                     (("/usr/share/pcsc/\n$")
+                      (string-append #$output "/share/pcsc/\n")))))
+               (add-after 'patch-shebangs 'wrap-programs
+                 (lambda _
+                   (for-each
+                    (lambda (prog)
+                      (wrap-program (string-append #$output
+                                                   "/bin/"
+                                                   prog)
+                        `("PERL5LIB" =
+                          (,(getenv "PERL5LIB")))))
+                    '("ATR_analysis" "gscriptor" "scriptor"))
+                   (wrap-program (string-append #$output
+                                                "/bin/gscriptor")
+                     `("GI_TYPELIB_PATH" =
+                       (,(getenv "GI_TYPELIB_PATH")))))))))
+    (native-inputs (list autoconf automake libtool gnu-gettext pkg-config))
+    (inputs (list bash-minimal ;for wrap-program
+                  perl
+                  perl-pcsc
+                  perl-gtk3
+                  pcsc-lite))
+    (synopsis "Tools for use with smart cards and PC/SC")
+    (description
+     "This package provides @code{pcsc_scan}, @code{ATR_analysis}, @code{scriptor},
+and @code{gscriptor}.")
+    (home-page "https://pcsc-tools.apdu.fr/")
+    (license license:gpl2+)))
+
 (define-public ykclient
   (package
     (name "ykclient")
-- 
2.34.1





Information forwarded to guix-patches <at> gnu.org:
bug#61018; Package guix-patches. (Sat, 18 Feb 2023 00:37:02 GMT) Full text and rfc822 format available.

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

From: Jake Leporte <jakeleporte <at> outlook.com>
To: 61018 <at> debbugs.gnu.org
Cc: Jake Leporte <jakeleporte <at> outlook.com>
Subject: [PATCH v5 1/2] gnu: Add perl-pcsc.
Date: Fri, 17 Feb 2023 18:36:05 -0600
Re-submitting full patch series with bumped version number in order to
run QA.

---
 gnu/packages/perl.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 62f19ed..4d8a9d1 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -86,6 +86,7 @@ (define-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages sdl)
+  #:use-module (gnu packages security-token)
   #:use-module (gnu packages textutils)
   #:use-module (gnu packages video)
   #:use-module (gnu packages web)
@@ -12271,6 +12272,41 @@ (define-public perl-path-iterator-rule
 arduous to type for one-liners.")
     (license license:asl2.0)))

+(define-public perl-pcsc
+  (package
+    (name "perl-pcsc")
+    (version "1.4.14")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://cpan/authors/id/W/WH/WHOM/pcsc-perl-" version
+                    ".tar.bz2"))
+              (sha256
+               (base32
+                "17f6i16jv6ci6459vh6y3sz94vgcvykjjszcl4xsykryakjvf8i7"))))
+    (build-system perl-build-system)
+    (arguments
+     (list
+           ;; The tests for this package require access to a
+           ;; card reader with a card inserted, so they won't be
+           ;; possible to run in the build environment
+           #:tests? #f
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'patch-dlopen
+                          (lambda* (#:key inputs #:allow-other-keys)
+                            (substitute* "PCSCperl.h"
+                              (("libpcsclite.so.1")
+                               (search-input-file inputs
+                                                  "/lib/libpcsclite.so.1"))))))))
+    (native-inputs (list pkg-config))
+    (inputs (list pcsc-lite))
+    (synopsis "Perl library for PC/SC")
+    (description
+     "This library allows communication with a smart card using PC/SC from a Perl
+script.")
+    (home-page "https://pcsc-perl.apdu.fr/")
+    (license license:gpl2+)))
+
 (define-public perl-pod-constants
   (package
     (name "perl-pod-constants")

base-commit: 6dce27abbba01cb4e249c9bdb3c132cecc0a5c51
prerequisite-patch-id: 55ebfdbee35b36ac06da23b716337ecfef350452
prerequisite-patch-id: cc81d1d3eb9c0687793c8baf949901cd49c42650
prerequisite-patch-id: 52c97b6e4d8d4b78217423a3f1323d95a609de8c
prerequisite-patch-id: 90b350ab4778843697da28bb10344a84ccacc70c
--
2.39.1




Information forwarded to guix-patches <at> gnu.org:
bug#61018; Package guix-patches. (Sat, 18 Feb 2023 00:37:02 GMT) Full text and rfc822 format available.

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

From: Jake Leporte <jakeleporte <at> outlook.com>
To: 61018 <at> debbugs.gnu.org
Cc: Jake Leporte <jakeleporte <at> outlook.com>
Subject: [PATCH v5 2/2] gnu: Add pcsc-tools.
Date: Fri, 17 Feb 2023 18:36:06 -0600
Worked with the upstream developer to use m4 to substitute the correct
pcsc_dir value during configure, so the `patch-data-paths' phase will
be unneccessary in the next release.

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

diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index a7f5e3a..41cbafd 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -48,6 +48,7 @@ (define-module (gnu packages security-token)
   #:use-module (guix build-system python)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
@@ -253,6 +254,67 @@ (define-public pcsc-lite
                    license:isc                  ; src/strlcat.c src/strlcpy.c
                    license:gpl3+))))            ; src/spy/*

+(define-public pcsc-tools
+  (package
+    (name "pcsc-tools")
+    (version "1.6.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://salsa.debian.org/rousseau/pcsc-tools.git/")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "16kvw8y5289fp6y3z8l5w61gfrk872kd500a27sgr5k5dpr9vfbk"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'patch-data-paths
+                 (lambda _
+                   (substitute* "ATR_analysis"
+                     (((string-append
+                        "\"/usr/local/pcsc/smartcard_list.txt\", "
+                        "\"/usr/share/pcsc/smartcard_list.txt\", "
+                        "\"/usr/local/share/pcsc/smartcard_list.txt\""))
+                      (string-append "\""
+                                     #$output
+                                     "/share/pcsc/smartcard_list.txt\"")))
+                   (substitute* "ATR_analysis.1p"
+                     (("^([.]IR [.]/) ,\n$" _ cwd)
+                      (string-append cwd "\n"))
+                     (("^[.]I /usr/local/pcsc/\n$")
+                      "")
+                     (("/usr/share/pcsc/\n$")
+                      (string-append #$output "/share/pcsc/\n")))))
+               (add-after 'patch-shebangs 'wrap-programs
+                 (lambda _
+                   (for-each
+                    (lambda (prog)
+                      (wrap-program (string-append #$output
+                                                   "/bin/"
+                                                   prog)
+                        `("PERL5LIB" =
+                          (,(getenv "PERL5LIB")))))
+                    '("ATR_analysis" "gscriptor" "scriptor"))
+                   (wrap-program (string-append #$output
+                                                "/bin/gscriptor")
+                     `("GI_TYPELIB_PATH" =
+                       (,(getenv "GI_TYPELIB_PATH")))))))))
+    (native-inputs (list autoconf automake libtool gnu-gettext pkg-config))
+    (inputs (list bash-minimal ;for wrap-program
+                  perl
+                  perl-pcsc
+                  perl-gtk3
+                  pcsc-lite))
+    (synopsis "Tools for use with smart cards and PC/SC")
+    (description
+     "This package provides @code{pcsc_scan}, @code{ATR_analysis}, @code{scriptor},
+and @code{gscriptor}.")
+    (home-page "https://pcsc-tools.apdu.fr/")
+    (license license:gpl2+)))
+
 (define-public ykclient
   (package
     (name "ykclient")
--
2.39.1




Information forwarded to guix-patches <at> gnu.org:
bug#61018; Package guix-patches. (Mon, 27 Feb 2023 00:44:01 GMT) Full text and rfc822 format available.

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

From: Jake Leporte <jakeleporte <at> outlook.com>
To: 61018 <at> debbugs.gnu.org
Cc: Jake Leporte <jakeleporte <at> outlook.com>
Subject: [PATCH v6 0/2] Add pcsc-tools and dependency.
Date: Sun, 26 Feb 2023 18:42:33 -0600
Re-submitting with proper commit messages, and hoping to get QA to succeed.

Jake Leporte (2):
  gnu: Add perl-pcsc.
  gnu: Add pcsc-tools.

 gnu/packages/perl.scm           | 36 +++++++++++++++++++
 gnu/packages/security-token.scm | 62 +++++++++++++++++++++++++++++++++
 2 files changed, 98 insertions(+)


base-commit: 81fbf5d71fb95367a0a93e45a86de5e930589a05
prerequisite-patch-id: 55ebfdbee35b36ac06da23b716337ecfef350452
prerequisite-patch-id: cc81d1d3eb9c0687793c8baf949901cd49c42650
prerequisite-patch-id: 52c97b6e4d8d4b78217423a3f1323d95a609de8c
prerequisite-patch-id: 90b350ab4778843697da28bb10344a84ccacc70c
--
2.39.1




Information forwarded to guix-patches <at> gnu.org:
bug#61018; Package guix-patches. (Mon, 27 Feb 2023 00:44:02 GMT) Full text and rfc822 format available.

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

From: Jake Leporte <jakeleporte <at> outlook.com>
To: 61018 <at> debbugs.gnu.org
Cc: Jake Leporte <jakeleporte <at> outlook.com>
Subject: [PATCH v6 1/2] gnu: Add perl-pcsc.
Date: Sun, 26 Feb 2023 18:42:34 -0600
* gnu/packages/perl.scm (perl-pcsc): New variable.
---
 gnu/packages/perl.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index b6fb81e..a1a9983 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -86,6 +86,7 @@ (define-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages sdl)
+  #:use-module (gnu packages security-token)
   #:use-module (gnu packages textutils)
   #:use-module (gnu packages video)
   #:use-module (gnu packages web)
@@ -12269,6 +12270,41 @@ (define-public perl-path-iterator-rule
 arduous to type for one-liners.")
     (license license:asl2.0)))
 
+(define-public perl-pcsc
+  (package
+    (name "perl-pcsc")
+    (version "1.4.14")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://cpan/authors/id/W/WH/WHOM/pcsc-perl-" version
+                    ".tar.bz2"))
+              (sha256
+               (base32
+                "17f6i16jv6ci6459vh6y3sz94vgcvykjjszcl4xsykryakjvf8i7"))))
+    (build-system perl-build-system)
+    (arguments
+     (list
+           ;; The tests for this package require access to a
+           ;; card reader with a card inserted, so they won't be
+           ;; possible to run in the build environment
+           #:tests? #f
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'patch-dlopen
+                          (lambda* (#:key inputs #:allow-other-keys)
+                            (substitute* "PCSCperl.h"
+                              (("libpcsclite.so.1")
+                               (search-input-file inputs
+                                                  "/lib/libpcsclite.so.1"))))))))
+    (native-inputs (list pkg-config))
+    (inputs (list pcsc-lite))
+    (synopsis "Perl library for PC/SC")
+    (description
+     "This library allows communication with a smart card using PC/SC from a Perl
+script.")
+    (home-page "https://pcsc-perl.apdu.fr/")
+    (license license:gpl2+)))
+
 (define-public perl-pod-constants
   (package
     (name "perl-pod-constants")
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61018; Package guix-patches. (Mon, 27 Feb 2023 00:44:02 GMT) Full text and rfc822 format available.

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

From: Jake Leporte <jakeleporte <at> outlook.com>
To: 61018 <at> debbugs.gnu.org
Cc: Jake Leporte <jakeleporte <at> outlook.com>
Subject: [PATCH v6 2/2] gnu: Add pcsc-tools.
Date: Sun, 26 Feb 2023 18:42:35 -0600
* gnu/packages/security-token.scm (pcsc-tools): New variable.
---
 gnu/packages/security-token.scm | 62 +++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index a7f5e3a..41cbafd 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -48,6 +48,7 @@ (define-module (gnu packages security-token)
   #:use-module (guix build-system python)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
@@ -253,6 +254,67 @@ (define-public pcsc-lite
                    license:isc                  ; src/strlcat.c src/strlcpy.c
                    license:gpl3+))))            ; src/spy/*
 
+(define-public pcsc-tools
+  (package
+    (name "pcsc-tools")
+    (version "1.6.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://salsa.debian.org/rousseau/pcsc-tools.git/")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "16kvw8y5289fp6y3z8l5w61gfrk872kd500a27sgr5k5dpr9vfbk"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'patch-data-paths
+                 (lambda _
+                   (substitute* "ATR_analysis"
+                     (((string-append
+                        "\"/usr/local/pcsc/smartcard_list.txt\", "
+                        "\"/usr/share/pcsc/smartcard_list.txt\", "
+                        "\"/usr/local/share/pcsc/smartcard_list.txt\""))
+                      (string-append "\""
+                                     #$output
+                                     "/share/pcsc/smartcard_list.txt\"")))
+                   (substitute* "ATR_analysis.1p"
+                     (("^([.]IR [.]/) ,\n$" _ cwd)
+                      (string-append cwd "\n"))
+                     (("^[.]I /usr/local/pcsc/\n$")
+                      "")
+                     (("/usr/share/pcsc/\n$")
+                      (string-append #$output "/share/pcsc/\n")))))
+               (add-after 'patch-shebangs 'wrap-programs
+                 (lambda _
+                   (for-each
+                    (lambda (prog)
+                      (wrap-program (string-append #$output
+                                                   "/bin/"
+                                                   prog)
+                        `("PERL5LIB" =
+                          (,(getenv "PERL5LIB")))))
+                    '("ATR_analysis" "gscriptor" "scriptor"))
+                   (wrap-program (string-append #$output
+                                                "/bin/gscriptor")
+                     `("GI_TYPELIB_PATH" =
+                       (,(getenv "GI_TYPELIB_PATH")))))))))
+    (native-inputs (list autoconf automake libtool gnu-gettext pkg-config))
+    (inputs (list bash-minimal ;for wrap-program
+                  perl
+                  perl-pcsc
+                  perl-gtk3
+                  pcsc-lite))
+    (synopsis "Tools for use with smart cards and PC/SC")
+    (description
+     "This package provides @code{pcsc_scan}, @code{ATR_analysis}, @code{scriptor},
+and @code{gscriptor}.")
+    (home-page "https://pcsc-tools.apdu.fr/")
+    (license license:gpl2+)))
+
 (define-public ykclient
   (package
     (name "ykclient")
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61018; Package guix-patches. (Mon, 06 Mar 2023 01:31:01 GMT) Full text and rfc822 format available.

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

From: Jake Leporte <jakeleporte <at> outlook.com>
To: 61018 <at> debbugs.gnu.org
Cc: Jake Leporte <jakeleporte <at> outlook.com>
Subject: [PATCH v7 1/2] gnu: Add perl-pcsc.
Date: Sun,  5 Mar 2023 19:30:26 -0600
* gnu/packages/perl.scm (perl-pcsc): New variable.
---
 gnu/packages/perl.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index b6fb81e..a1a9983 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -86,6 +86,7 @@ (define-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages sdl)
+  #:use-module (gnu packages security-token)
   #:use-module (gnu packages textutils)
   #:use-module (gnu packages video)
   #:use-module (gnu packages web)
@@ -12269,6 +12270,41 @@ (define-public perl-path-iterator-rule
 arduous to type for one-liners.")
     (license license:asl2.0)))
 
+(define-public perl-pcsc
+  (package
+    (name "perl-pcsc")
+    (version "1.4.14")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://cpan/authors/id/W/WH/WHOM/pcsc-perl-" version
+                    ".tar.bz2"))
+              (sha256
+               (base32
+                "17f6i16jv6ci6459vh6y3sz94vgcvykjjszcl4xsykryakjvf8i7"))))
+    (build-system perl-build-system)
+    (arguments
+     (list
+           ;; The tests for this package require access to a
+           ;; card reader with a card inserted, so they won't be
+           ;; possible to run in the build environment
+           #:tests? #f
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'patch-dlopen
+                          (lambda* (#:key inputs #:allow-other-keys)
+                            (substitute* "PCSCperl.h"
+                              (("libpcsclite.so.1")
+                               (search-input-file inputs
+                                                  "/lib/libpcsclite.so.1"))))))))
+    (native-inputs (list pkg-config))
+    (inputs (list pcsc-lite))
+    (synopsis "Perl library for PC/SC")
+    (description
+     "This library allows communication with a smart card using PC/SC from a Perl
+script.")
+    (home-page "https://pcsc-perl.apdu.fr/")
+    (license license:gpl2+)))
+
 (define-public perl-pod-constants
   (package
     (name "perl-pod-constants")

base-commit: bbf88ad4e0cf98c2899542897c7a78ee4005c913
prerequisite-patch-id: 55ebfdbee35b36ac06da23b716337ecfef350452
prerequisite-patch-id: cc81d1d3eb9c0687793c8baf949901cd49c42650
prerequisite-patch-id: 52c97b6e4d8d4b78217423a3f1323d95a609de8c
prerequisite-patch-id: 76ab662c68c7b45a8c84eab1ec3dadc60a886ac3
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61018; Package guix-patches. (Mon, 06 Mar 2023 01:31:02 GMT) Full text and rfc822 format available.

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

From: Jake Leporte <jakeleporte <at> outlook.com>
To: 61018 <at> debbugs.gnu.org
Cc: Jake Leporte <jakeleporte <at> outlook.com>
Subject: [PATCH v7 2/2] gnu: Add pcsc-tools.
Date: Sun,  5 Mar 2023 19:30:27 -0600
* gnu/packages/security-token.scm (pcsc-tools): New variable.
---
 gnu/packages/security-token.scm | 62 +++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index a7f5e3a..41cbafd 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -48,6 +48,7 @@ (define-module (gnu packages security-token)
   #:use-module (guix build-system python)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
@@ -253,6 +254,67 @@ (define-public pcsc-lite
                    license:isc                  ; src/strlcat.c src/strlcpy.c
                    license:gpl3+))))            ; src/spy/*
 
+(define-public pcsc-tools
+  (package
+    (name "pcsc-tools")
+    (version "1.6.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://salsa.debian.org/rousseau/pcsc-tools.git/")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "16kvw8y5289fp6y3z8l5w61gfrk872kd500a27sgr5k5dpr9vfbk"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'patch-data-paths
+                 (lambda _
+                   (substitute* "ATR_analysis"
+                     (((string-append
+                        "\"/usr/local/pcsc/smartcard_list.txt\", "
+                        "\"/usr/share/pcsc/smartcard_list.txt\", "
+                        "\"/usr/local/share/pcsc/smartcard_list.txt\""))
+                      (string-append "\""
+                                     #$output
+                                     "/share/pcsc/smartcard_list.txt\"")))
+                   (substitute* "ATR_analysis.1p"
+                     (("^([.]IR [.]/) ,\n$" _ cwd)
+                      (string-append cwd "\n"))
+                     (("^[.]I /usr/local/pcsc/\n$")
+                      "")
+                     (("/usr/share/pcsc/\n$")
+                      (string-append #$output "/share/pcsc/\n")))))
+               (add-after 'patch-shebangs 'wrap-programs
+                 (lambda _
+                   (for-each
+                    (lambda (prog)
+                      (wrap-program (string-append #$output
+                                                   "/bin/"
+                                                   prog)
+                        `("PERL5LIB" =
+                          (,(getenv "PERL5LIB")))))
+                    '("ATR_analysis" "gscriptor" "scriptor"))
+                   (wrap-program (string-append #$output
+                                                "/bin/gscriptor")
+                     `("GI_TYPELIB_PATH" =
+                       (,(getenv "GI_TYPELIB_PATH")))))))))
+    (native-inputs (list autoconf automake libtool gnu-gettext pkg-config))
+    (inputs (list bash-minimal ;for wrap-program
+                  perl
+                  perl-pcsc
+                  perl-gtk3
+                  pcsc-lite))
+    (synopsis "Tools for use with smart cards and PC/SC")
+    (description
+     "This package provides @code{pcsc_scan}, @code{ATR_analysis}, @code{scriptor},
+and @code{gscriptor}.")
+    (home-page "https://pcsc-tools.apdu.fr/")
+    (license license:gpl2+)))
+
 (define-public ykclient
   (package
     (name "ykclient")
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61018; Package guix-patches. (Wed, 22 Mar 2023 01:41:02 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Jake Leporte <jakeleporte <at> outlook.com>
Cc: 61018 <at> debbugs.gnu.org
Subject: Re: bug#61018: [PATCH 0/2] Add pcsc-tools, and missing dependency
 perl-pcsc
Date: Tue, 21 Mar 2023 21:40:48 -0400
Hi,

Jake Leporte <jakeleporte <at> outlook.com> writes:

> * gnu/packages/perl.scm (perl-pcsc): New variable.
> ---
>  gnu/packages/perl.scm | 36 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 36 insertions(+)
>
> diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
> index b6fb81e..a1a9983 100644
> --- a/gnu/packages/perl.scm
> +++ b/gnu/packages/perl.scm
> @@ -86,6 +86,7 @@ (define-module (gnu packages perl)
>    #:use-module (gnu packages python)
>    #:use-module (gnu packages readline)
>    #:use-module (gnu packages sdl)
> +  #:use-module (gnu packages security-token)
>    #:use-module (gnu packages textutils)
>    #:use-module (gnu packages video)
>    #:use-module (gnu packages web)
> @@ -12269,6 +12270,41 @@ (define-public perl-path-iterator-rule
>  arduous to type for one-liners.")
>      (license license:asl2.0)))
>  
> +(define-public perl-pcsc
> +  (package
> +    (name "perl-pcsc")
> +    (version "1.4.14")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append
> +                    "mirror://cpan/authors/id/W/WH/WHOM/pcsc-perl-" version
> +                    ".tar.bz2"))
> +              (sha256
> +               (base32
> +                "17f6i16jv6ci6459vh6y3sz94vgcvykjjszcl4xsykryakjvf8i7"))))
> +    (build-system perl-build-system)
> +    (arguments
> +     (list
> +           ;; The tests for this package require access to a
> +           ;; card reader with a card inserted, so they won't be
> +           ;; possible to run in the build environment
> +           #:tests? #f
> +           #:phases #~(modify-phases %standard-phases
> +                        (add-after 'unpack 'patch-dlopen
> +                          (lambda* (#:key inputs #:allow-other-keys)
> +                            (substitute* "PCSCperl.h"
> +                              (("libpcsclite.so.1")
> +                               (search-input-file inputs
> +                                                  "/lib/libpcsclite.so.1"))))))))
> +    (native-inputs (list pkg-config))
> +    (inputs (list pcsc-lite))
> +    (synopsis "Perl library for PC/SC")
> +    (description
> +     "This library allows communication with a smart card using PC/SC from a Perl
> +script.")
> +    (home-page "https://pcsc-perl.apdu.fr/")
> +    (license license:gpl2+)))
> +
>  (define-public perl-pod-constants
>    (package
>      (name "perl-pod-constants")

I've installed this change with the following small modification
(reword the comment and end it with a period):

--8<---------------cut here---------------start------------->8---
modified   gnu/packages/perl.scm
@@ -12339,17 +12339,16 @@ (define-public perl-pcsc
     (build-system perl-build-system)
     (arguments
      (list
-           ;; The tests for this package require access to a
-           ;; card reader with a card inserted, so they won't be
-           ;; possible to run in the build environment
-           #:tests? #f
-           #:phases #~(modify-phases %standard-phases
-                        (add-after 'unpack 'patch-dlopen
-                          (lambda* (#:key inputs #:allow-other-keys)
-                            (substitute* "PCSCperl.h"
-                              (("libpcsclite.so.1")
-                               (search-input-file inputs
-                                                  "/lib/libpcsclite.so.1"))))))))
+      ;; The test suite is disabled because it requires access to a card
+      ;; reader with a card inserted.
+      #:tests? #f
+      #:phases #~(modify-phases %standard-phases
+                   (add-after 'unpack 'patch-dlopen
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       (substitute* "PCSCperl.h"
+                         (("libpcsclite.so.1")
+                          (search-input-file inputs
+                                             "/lib/libpcsclite.so.1"))))))))
     (native-inputs (list pkg-config))
     (inputs (list pcsc-lite))
     (synopsis "Perl library for PC/SC")
--8<---------------cut here---------------end--------------->8---

-- 
Thanks,
Maxim




Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Wed, 22 Mar 2023 01:51:02 GMT) Full text and rfc822 format available.

Notification sent to Jake Leporte <jakeleporte <at> outlook.com>:
bug acknowledged by developer. (Wed, 22 Mar 2023 01:51:03 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Jake Leporte <jakeleporte <at> outlook.com>
Cc: 61018-done <at> debbugs.gnu.org
Subject: Re: bug#61018: [PATCH 0/2] Add pcsc-tools, and missing dependency
 perl-pcsc
Date: Tue, 21 Mar 2023 21:50:17 -0400
Hello,

Jake Leporte <jakeleporte <at> outlook.com> writes:

> * gnu/packages/perl.scm (perl-pcsc): New variable.
> ---
>  gnu/packages/perl.scm | 36 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 36 insertions(+)
>
> diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
> index b6fb81e..a1a9983 100644
> --- a/gnu/packages/perl.scm
> +++ b/gnu/packages/perl.scm
> @@ -86,6 +86,7 @@ (define-module (gnu packages perl)
>    #:use-module (gnu packages python)
>    #:use-module (gnu packages readline)
>    #:use-module (gnu packages sdl)
> +  #:use-module (gnu packages security-token)
>    #:use-module (gnu packages textutils)
>    #:use-module (gnu packages video)
>    #:use-module (gnu packages web)
> @@ -12269,6 +12270,41 @@ (define-public perl-path-iterator-rule
>  arduous to type for one-liners.")
>      (license license:asl2.0)))
>  
> +(define-public perl-pcsc
> +  (package
> +    (name "perl-pcsc")
> +    (version "1.4.14")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append
> +                    "mirror://cpan/authors/id/W/WH/WHOM/pcsc-perl-" version
> +                    ".tar.bz2"))
> +              (sha256
> +               (base32
> +                "17f6i16jv6ci6459vh6y3sz94vgcvykjjszcl4xsykryakjvf8i7"))))
> +    (build-system perl-build-system)
> +    (arguments
> +     (list
> +           ;; The tests for this package require access to a
> +           ;; card reader with a card inserted, so they won't be
> +           ;; possible to run in the build environment
> +           #:tests? #f
> +           #:phases #~(modify-phases %standard-phases
> +                        (add-after 'unpack 'patch-dlopen
> +                          (lambda* (#:key inputs #:allow-other-keys)
> +                            (substitute* "PCSCperl.h"
> +                              (("libpcsclite.so.1")
> +                               (search-input-file inputs
> +                                                  "/lib/libpcsclite.so.1"))))))))
> +    (native-inputs (list pkg-config))
> +    (inputs (list pcsc-lite))
> +    (synopsis "Perl library for PC/SC")
> +    (description
> +     "This library allows communication with a smart card using PC/SC from a Perl
> +script.")
> +    (home-page "https://pcsc-perl.apdu.fr/")
> +    (license license:gpl2+)))
> +

I've also installed this one with the following changes:

modified   gnu/packages/security-token.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2022 John Kehayias <john.kehayias <at> protonmail.com>
 ;;; Copyright © 2022 Petr Hodina <phodina <at> protonmail.com>
 ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
+;;; Copyright © 2023 Jake Leporte <jakeleporte <at> outlook.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -278,13 +279,12 @@ (define-public pcsc-tools
                         "\"/usr/local/pcsc/smartcard_list.txt\", "
                         "\"/usr/share/pcsc/smartcard_list.txt\", "
                         "\"/usr/local/share/pcsc/smartcard_list.txt\""))
-                      (string-append "\""
-                                     #$output
+                      (string-append "\"" #$output
                                      "/share/pcsc/smartcard_list.txt\"")))
                    (substitute* "ATR_analysis.1p"
-                     (("^([.]IR [.]/) ,\n$" _ cwd)
+                     (("^(\\.IR \\./) ,\n$" _ cwd)
                       (string-append cwd "\n"))
-                     (("^[.]I /usr/local/pcsc/\n$")
+                     (("^\\.I /usr/local/pcsc/\n$")
                       "")

Because \\. is more widespread (conventional) than [.] in the guix code
base.

                      (("/usr/share/pcsc/\n$")
                       (string-append #$output "/share/pcsc/\n")))))
@@ -292,26 +292,22 @@ (define-public pcsc-tools
                  (lambda _
                    (for-each
                     (lambda (prog)
-                      (wrap-program (string-append #$output
-                                                   "/bin/"
-                                                   prog)
-                        `("PERL5LIB" =
-                          (,(getenv "PERL5LIB")))))
+                      (wrap-program (string-append #$output "/bin/" prog)
+                        `("PERL5LIB" = (,(getenv "PERL5LIB")))))
                     '("ATR_analysis" "gscriptor" "scriptor"))
-                   (wrap-program (string-append #$output
-                                                "/bin/gscriptor")
-                     `("GI_TYPELIB_PATH" =
-                       (,(getenv "GI_TYPELIB_PATH")))))))))
+                   (wrap-program (string-append #$output "/bin/gscriptor")
+                     `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))))))

Tightened the indentation a bit (I guess this was 'guix style', which
doesn't always produce perfect results).

     (native-inputs (list autoconf automake libtool gnu-gettext pkg-config))
-    (inputs (list bash-minimal ;for wrap-program
+    (inputs (list bash-minimal          ;for wrap-program
                   perl
-                  perl-pcsc
                   perl-gtk3
-                  pcsc-lite))
-    (synopsis "Tools for use with smart cards and PC/SC")
-    (description
-     "This package provides @code{pcsc_scan}, @code{ATR_analysis}, @code{scriptor},
-and @code{gscriptor}.")
+                  pcsc-lite
+                  perl-pcsc))
+    (synopsis "Smart cards and PC/SC tools")

I streamlined the synopsis a bit,

+    (description "This package provides the @command{pcsc_scan},
+@command{ATR_analysis}, @command{scriptor}, and @command{gscriptor} commands,
+which are useful tools to test a PC/SC driver, card or reader or send commands
+in a friendly environment (text or graphical user interface).")
     (home-page "https://pcsc-tools.apdu.fr/")

and expounded the description, changing @code to @command.

Thank you!

-- 
Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 19 Apr 2023 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year ago.

Previous Next


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