Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jun 2021 20:46:04 GMT
From:      Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 2b8b5f592728 - main - security/p5-Crypt-SMIME: Fix test
Message-ID:  <202106302046.15UKk4sW054129@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2b8b5f5927285ae364e5d0b9685d355d8c470188

commit 2b8b5f5927285ae364e5d0b9685d355d8c470188
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2021-06-30 20:36:36 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2021-06-30 20:43:38 +0000

    security/p5-Crypt-SMIME: Fix test
    
    Before:
    t/01-smime.t .......... skipped: No package `openssl' found
    t/02-smime.more.t ..... skipped: No package `openssl' found
    t/03-chained-certs.t .. skipped: No package `openssl' found
    t/04-taint.t .......... skipped: No package `openssl' found
    
    After:
    t/01-smime.t .......... # Using `/usr/bin/openssl' to generate a keypair
    t/01-smime.t .......... ok
    t/02-smime.more.t ..... # Using `/usr/bin/openssl' to generate a keypair
    t/02-smime.more.t ..... ok
    t/03-chained-certs.t .. # Using `/usr/bin/openssl' to generate a keypair
    t/03-chained-certs.t .. ok
    t/04-taint.t .......... # Using `/usr/bin/openssl' to generate a keypair
    t/04-taint.t .......... ok
---
 security/p5-Crypt-SMIME/Makefile                         |  4 ++++
 security/p5-Crypt-SMIME/files/patch-t-01-smime.t         | 11 +++++++++++
 security/p5-Crypt-SMIME/files/patch-t-02-smime.more.t    | 11 +++++++++++
 security/p5-Crypt-SMIME/files/patch-t-03-chained-certs.t | 11 +++++++++++
 security/p5-Crypt-SMIME/files/patch-t-04-taint.t         | 11 +++++++++++
 5 files changed, 48 insertions(+)

diff --git a/security/p5-Crypt-SMIME/Makefile b/security/p5-Crypt-SMIME/Makefile
index fb076d196b67..763d15f714c8 100644
--- a/security/p5-Crypt-SMIME/Makefile
+++ b/security/p5-Crypt-SMIME/Makefile
@@ -22,6 +22,10 @@ USES=		perl5 ssl
 USE_PERL5=	configure
 
 CONFIGURE_ENV=	LIBCRYPTO_CFLAGS="-I${OPENSSLINC}" LIBCRYPTO_LIBS="-L${OPENSSLLIB} -lcrypto"
+MAKE_ENV=	OPENSSLBASE=${OPENSSLBASE}
+
+post-patch:
+	@${RM} ${WRKSRC}/t/*.orig
 
 post-install:
 	${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/Crypt/SMIME/SMIME.so
diff --git a/security/p5-Crypt-SMIME/files/patch-t-01-smime.t b/security/p5-Crypt-SMIME/files/patch-t-01-smime.t
new file mode 100644
index 000000000000..c8c901dfc441
--- /dev/null
+++ b/security/p5-Crypt-SMIME/files/patch-t-01-smime.t
@@ -0,0 +1,11 @@
+--- t/01-smime.t.orig	2016-12-01 08:42:33 UTC
++++ t/01-smime.t
+@@ -11,7 +11,7 @@ use Config;
+ my (%key, %csr, %crt, %p12);
+ do {
+     my $OPENSSL = do {
+-        if (defined(my $prefix = ExtUtils::PkgConfig->variable('openssl', 'prefix'))) {
++        if (defined(my $prefix = $ENV{OPENSSLBASE})) {
+             my $OPENSSL = $prefix . '/bin/openssl' . $Config{exe_ext};
+             if (-x $OPENSSL) {
+                 diag "Using `$OPENSSL' to generate a keypair";
diff --git a/security/p5-Crypt-SMIME/files/patch-t-02-smime.more.t b/security/p5-Crypt-SMIME/files/patch-t-02-smime.more.t
new file mode 100644
index 000000000000..53f577d283f2
--- /dev/null
+++ b/security/p5-Crypt-SMIME/files/patch-t-02-smime.more.t
@@ -0,0 +1,11 @@
+--- t/02-smime.more.t.orig	2018-01-10 05:31:23 UTC
++++ t/02-smime.more.t
+@@ -11,7 +11,7 @@ use Config;
+ my ($key, $crt);
+ do {
+     my $OPENSSL = do {
+-        if (defined(my $prefix = ExtUtils::PkgConfig->variable('openssl', 'prefix'))) {
++        if (defined(my $prefix = $ENV{OPENSSLBASE})) {
+             my $OPENSSL = $prefix . '/bin/openssl' . $Config{exe_ext};
+             if (-x $OPENSSL) {
+                 diag "Using `$OPENSSL' to generate a keypair";
diff --git a/security/p5-Crypt-SMIME/files/patch-t-03-chained-certs.t b/security/p5-Crypt-SMIME/files/patch-t-03-chained-certs.t
new file mode 100644
index 000000000000..570f8e6fbf59
--- /dev/null
+++ b/security/p5-Crypt-SMIME/files/patch-t-03-chained-certs.t
@@ -0,0 +1,11 @@
+--- t/03-chained-certs.t.orig	2018-02-22 09:33:03 UTC
++++ t/03-chained-certs.t
+@@ -29,7 +29,7 @@ use Config;
+ my (%key, %csr, %crt);
+ do {
+     my $OPENSSL = do {
+-        if (defined(my $prefix = ExtUtils::PkgConfig->variable('openssl', 'prefix'))) {
++        if (defined(my $prefix = $ENV{OPENSSLBASE})) {
+             my $OPENSSL = $prefix . '/bin/openssl' . $Config{exe_ext};
+             if (-x $OPENSSL) {
+                 diag "Using `$OPENSSL' to generate a keypair";
diff --git a/security/p5-Crypt-SMIME/files/patch-t-04-taint.t b/security/p5-Crypt-SMIME/files/patch-t-04-taint.t
new file mode 100644
index 000000000000..ce17711bacd9
--- /dev/null
+++ b/security/p5-Crypt-SMIME/files/patch-t-04-taint.t
@@ -0,0 +1,11 @@
+--- t/04-taint.t.orig	2018-02-21 04:39:06 UTC
++++ t/04-taint.t
+@@ -24,7 +24,7 @@ do {
+     untaint $ENV{PATH};
+ 
+     my $OPENSSL = do {
+-        if (defined(my $prefix = ExtUtils::PkgConfig->variable('openssl', 'prefix'))) {
++        if (defined(my $prefix = $ENV{OPENSSLBASE})) {
+             my $OPENSSL = $prefix . '/bin/openssl' . $Config{exe_ext};
+             if (-x $OPENSSL) {
+                 untaint $OPENSSL;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106302046.15UKk4sW054129>