* [bug#61018] [PATCH 0/2] Add pcsc-tools, and missing dependency perl-pcsc
@ 2023-01-23 4:29 Jake Leporte
2023-01-23 4:39 ` [bug#61018] [PATCH 1/2] gnu: Add perl-pcsc Jake Leporte
` (8 more replies)
0 siblings, 9 replies; 12+ messages in thread
From: Jake Leporte @ 2023-01-23 4:29 UTC (permalink / raw)
To: 61018; +Cc: Jake Leporte
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#61018] [PATCH 1/2] gnu: Add perl-pcsc.
2023-01-23 4:29 [bug#61018] [PATCH 0/2] Add pcsc-tools, and missing dependency perl-pcsc Jake Leporte
@ 2023-01-23 4:39 ` Jake Leporte
2023-01-23 4:40 ` [bug#61018] [PATCH 2/2] gnu: Add pcsc-tools Jake Leporte
` (7 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Jake Leporte @ 2023-01-23 4:39 UTC (permalink / raw)
To: 61018; +Cc: Jake Leporte
---
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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#61018] [PATCH 2/2] gnu: Add pcsc-tools.
2023-01-23 4:29 [bug#61018] [PATCH 0/2] Add pcsc-tools, and missing dependency perl-pcsc Jake Leporte
2023-01-23 4:39 ` [bug#61018] [PATCH 1/2] gnu: Add perl-pcsc Jake Leporte
@ 2023-01-23 4:40 ` Jake Leporte
2023-01-23 23:01 ` [bug#61018] [PATCH v2] gnu: Add perl-pcsc Jake Leporte
` (6 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Jake Leporte @ 2023-01-23 4:40 UTC (permalink / raw)
To: 61018; +Cc: Jake Leporte
---
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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#61018] [PATCH v2] gnu: Add perl-pcsc.
2023-01-23 4:29 [bug#61018] [PATCH 0/2] Add pcsc-tools, and missing dependency perl-pcsc Jake Leporte
2023-01-23 4:39 ` [bug#61018] [PATCH 1/2] gnu: Add perl-pcsc Jake Leporte
2023-01-23 4:40 ` [bug#61018] [PATCH 2/2] gnu: Add pcsc-tools Jake Leporte
@ 2023-01-23 23:01 ` Jake Leporte
2023-01-27 2:26 ` [bug#61018] [PATCH v2] gnu: Add pcsc-tools Jake Leporte
` (5 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Jake Leporte @ 2023-01-23 23:01 UTC (permalink / raw)
To: 61018; +Cc: Jake Leporte
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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#61018] [PATCH v2] gnu: Add pcsc-tools.
2023-01-23 4:29 [bug#61018] [PATCH 0/2] Add pcsc-tools, and missing dependency perl-pcsc Jake Leporte
` (2 preceding siblings ...)
2023-01-23 23:01 ` [bug#61018] [PATCH v2] gnu: Add perl-pcsc Jake Leporte
@ 2023-01-27 2:26 ` Jake Leporte
2023-01-27 17:37 ` [bug#61018] [PATCH v3 1/2] gnu: Add perl-pcsc Jake Leporte
` (4 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Jake Leporte @ 2023-01-27 2:26 UTC (permalink / raw)
To: 61018; +Cc: Jake Leporte
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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#61018] [PATCH v3 1/2] gnu: Add perl-pcsc.
2023-01-23 4:29 [bug#61018] [PATCH 0/2] Add pcsc-tools, and missing dependency perl-pcsc Jake Leporte
` (3 preceding siblings ...)
2023-01-27 2:26 ` [bug#61018] [PATCH v2] gnu: Add pcsc-tools Jake Leporte
@ 2023-01-27 17:37 ` Jake Leporte
2023-01-28 2:57 ` [bug#61018] [PATCH v4] gnu: Add pcsc-tools Jake Leporte
` (3 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Jake Leporte @ 2023-01-27 17:37 UTC (permalink / raw)
To: 61018; +Cc: Jake Leporte
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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#61018] [PATCH v4] gnu: Add pcsc-tools.
2023-01-23 4:29 [bug#61018] [PATCH 0/2] Add pcsc-tools, and missing dependency perl-pcsc Jake Leporte
` (4 preceding siblings ...)
2023-01-27 17:37 ` [bug#61018] [PATCH v3 1/2] gnu: Add perl-pcsc Jake Leporte
@ 2023-01-28 2:57 ` Jake Leporte
2023-02-18 0:36 ` [bug#61018] [PATCH v5 1/2] gnu: Add perl-pcsc Jake Leporte
` (2 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Jake Leporte @ 2023-01-28 2:57 UTC (permalink / raw)
To: 61018; +Cc: Jake Leporte
---
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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#61018] [PATCH v5 1/2] gnu: Add perl-pcsc.
2023-01-23 4:29 [bug#61018] [PATCH 0/2] Add pcsc-tools, and missing dependency perl-pcsc Jake Leporte
` (5 preceding siblings ...)
2023-01-28 2:57 ` [bug#61018] [PATCH v4] gnu: Add pcsc-tools Jake Leporte
@ 2023-02-18 0:36 ` Jake Leporte
2023-02-27 0:42 ` [bug#61018] [PATCH v6 0/2] Add pcsc-tools and dependency Jake Leporte
2023-03-06 1:30 ` [bug#61018] [PATCH v7 1/2] gnu: Add perl-pcsc Jake Leporte
8 siblings, 0 replies; 12+ messages in thread
From: Jake Leporte @ 2023-02-18 0:36 UTC (permalink / raw)
To: 61018; +Cc: Jake Leporte
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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#61018] [PATCH v6 0/2] Add pcsc-tools and dependency.
2023-01-23 4:29 [bug#61018] [PATCH 0/2] Add pcsc-tools, and missing dependency perl-pcsc Jake Leporte
` (6 preceding siblings ...)
2023-02-18 0:36 ` [bug#61018] [PATCH v5 1/2] gnu: Add perl-pcsc Jake Leporte
@ 2023-02-27 0:42 ` Jake Leporte
2023-03-06 1:30 ` [bug#61018] [PATCH v7 1/2] gnu: Add perl-pcsc Jake Leporte
8 siblings, 0 replies; 12+ messages in thread
From: Jake Leporte @ 2023-02-27 0:42 UTC (permalink / raw)
To: 61018; +Cc: Jake Leporte
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#61018] [PATCH v7 1/2] gnu: Add perl-pcsc.
2023-01-23 4:29 [bug#61018] [PATCH 0/2] Add pcsc-tools, and missing dependency perl-pcsc Jake Leporte
` (7 preceding siblings ...)
2023-02-27 0:42 ` [bug#61018] [PATCH v6 0/2] Add pcsc-tools and dependency Jake Leporte
@ 2023-03-06 1:30 ` Jake Leporte
2023-03-22 1:40 ` [bug#61018] [PATCH 0/2] Add pcsc-tools, and missing dependency perl-pcsc Maxim Cournoyer
2023-03-22 1:50 ` bug#61018: " Maxim Cournoyer
8 siblings, 2 replies; 12+ messages in thread
From: Jake Leporte @ 2023-03-06 1:30 UTC (permalink / raw)
To: 61018; +Cc: Jake Leporte
* 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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#61018] [PATCH 0/2] Add pcsc-tools, and missing dependency perl-pcsc
2023-03-06 1:30 ` [bug#61018] [PATCH v7 1/2] gnu: Add perl-pcsc Jake Leporte
@ 2023-03-22 1:40 ` Maxim Cournoyer
2023-03-22 1:50 ` bug#61018: " Maxim Cournoyer
1 sibling, 0 replies; 12+ messages in thread
From: Maxim Cournoyer @ 2023-03-22 1:40 UTC (permalink / raw)
To: Jake Leporte; +Cc: 61018
Hi,
Jake Leporte <jakeleporte@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
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#61018: [PATCH 0/2] Add pcsc-tools, and missing dependency perl-pcsc
2023-03-06 1:30 ` [bug#61018] [PATCH v7 1/2] gnu: Add perl-pcsc Jake Leporte
2023-03-22 1:40 ` [bug#61018] [PATCH 0/2] Add pcsc-tools, and missing dependency perl-pcsc Maxim Cournoyer
@ 2023-03-22 1:50 ` Maxim Cournoyer
1 sibling, 0 replies; 12+ messages in thread
From: Maxim Cournoyer @ 2023-03-22 1:50 UTC (permalink / raw)
To: Jake Leporte; +Cc: 61018-done
Hello,
Jake Leporte <jakeleporte@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@protonmail.com>
;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
+;;; Copyright © 2023 Jake Leporte <jakeleporte@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
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-03-22 1:51 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-23 4:29 [bug#61018] [PATCH 0/2] Add pcsc-tools, and missing dependency perl-pcsc Jake Leporte
2023-01-23 4:39 ` [bug#61018] [PATCH 1/2] gnu: Add perl-pcsc Jake Leporte
2023-01-23 4:40 ` [bug#61018] [PATCH 2/2] gnu: Add pcsc-tools Jake Leporte
2023-01-23 23:01 ` [bug#61018] [PATCH v2] gnu: Add perl-pcsc Jake Leporte
2023-01-27 2:26 ` [bug#61018] [PATCH v2] gnu: Add pcsc-tools Jake Leporte
2023-01-27 17:37 ` [bug#61018] [PATCH v3 1/2] gnu: Add perl-pcsc Jake Leporte
2023-01-28 2:57 ` [bug#61018] [PATCH v4] gnu: Add pcsc-tools Jake Leporte
2023-02-18 0:36 ` [bug#61018] [PATCH v5 1/2] gnu: Add perl-pcsc Jake Leporte
2023-02-27 0:42 ` [bug#61018] [PATCH v6 0/2] Add pcsc-tools and dependency Jake Leporte
2023-03-06 1:30 ` [bug#61018] [PATCH v7 1/2] gnu: Add perl-pcsc Jake Leporte
2023-03-22 1:40 ` [bug#61018] [PATCH 0/2] Add pcsc-tools, and missing dependency perl-pcsc Maxim Cournoyer
2023-03-22 1:50 ` bug#61018: " Maxim Cournoyer
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).