Skip to contentSkip to conversation

package/perl-crypt-openssl-guess: new package

PATCH Superseded Bernd Kuhls 2 participants 7 messages Aug 19, 2018 – Aug 21, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 package/perl-crypt-openssl-guess: new package

Needed for upcoming version bumps of perl-crypt-openssl-random and perl-crypt-openssl-rsa.

---
 DEVELOPERS                                          |  1 +
 package/Config.in                                   |  1 +
 package/perl-crypt-openssl-guess/Config.in          |  6 ++++++
 .../perl-crypt-openssl-guess.hash                   |  6 ++++++
 .../perl-crypt-openssl-guess.mk                     | 13 +++++++++++++
 5 files changed, 27 insertions(+)
 create mode 100644 package/perl-crypt-openssl-guess/Config.in
 create mode 100644 package/perl-crypt-openssl-guess/perl-crypt-openssl-guess.hash
 create mode 100644 package/perl-crypt-openssl-guess/perl-crypt-openssl-guess.mk
DEVELOPERS +1 -0
index d1bfc98360..f65c688c21 100644
@@ -330,6 +330,7 @@ F:	package/libyuv/
 F:	package/mesa3d/
 F:	package/minidlna/
 F:	package/mjpg-streamer/
+F:	package/perl-crypt-openssl-guess/
 F:	package/perl-crypt-openssl-random/
 F:	package/perl-crypt-openssl-rsa/
 F:	package/perl-digest-sha1/
package/Config.in +1 -0
index 9b6e5b0250..6ca3259918 100644
@@ -671,6 +671,7 @@ menu "Perl libraries/modules"
 	source "package/perl-convert-asn1/Config.in"
 	source "package/perl-crypt-blowfish/Config.in"
 	source "package/perl-crypt-cbc/Config.in"
+	source "package/perl-crypt-openssl-guess/Config.in"
 	source "package/perl-crypt-openssl-random/Config.in"
 	source "package/perl-crypt-openssl-rsa/Config.in"
 	source "package/perl-data-optlist/Config.in"
package/perl-crypt-openssl-guess/Config.in new file +6 -0
new file mode 100644
index 0000000000..6527609d37
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_PERL_CRYPT_OPENSSL_GUESS
+	bool "perl-crypt-openssl-guess"
+	help
+	  Guess OpenSSL include path
+
+	  https://metacpan.org/pod/Crypt::OpenSSL::Guess
package/perl-crypt-openssl-guess/perl-crypt-openssl-guess.hash new file +6 -0
new file mode 100644
index 0000000000..327b06900a
@@ -0,0 +1,6 @@
+# retrieved by scancpan from http://cpan.metacpan.org/
+md5    e768fe2c07826b0ac9ea604c79f93032 Crypt-OpenSSL-Guess-0.11.tar.gz
+sha256 aa6b18e38cb852cbad80a58cd90c395b40819d4d01e0ab37e7703149094d7167 Crypt-OpenSSL-Guess-0.11.tar.gz
+
+# computed by scancpan
+sha256 5c739f181ce7aa31d739277996ff230067dad39332e5597c0dffd36e5d784072 LICENSE
package/perl-crypt-openssl-guess/perl-crypt-openssl-guess.mk new file +13 -0
new file mode 100644
index 0000000000..7a1a82014c
@@ -0,0 +1,13 @@
+################################################################################
+#
+# perl-crypt-openssl-guess
+#
+################################################################################
+
+PERL_CRYPT_OPENSSL_GUESS_VERSION = 0.11
+PERL_CRYPT_OPENSSL_GUESS_SOURCE = Crypt-OpenSSL-Guess-$(PERL_CRYPT_OPENSSL_GUESS_VERSION).tar.gz
+PERL_CRYPT_OPENSSL_GUESS_SITE = $(BR2_CPAN_MIRROR)/authors/id/A/AK/AKIYM
+PERL_CRYPT_OPENSSL_GUESS_LICENSE = Artistic or GPL-1.0+
+PERL_CRYPT_OPENSSL_GUESS_LICENSE_FILES = LICENSE
+
+$(eval $(perl-package))
Signature · 1 line
2.18.0
#1 lore raw

PATCH 2/3 package/perl-crypt-openssl-random: bump version to 0.15

Changelog:
https://metacpan.org/changes/distribution/Crypt-OpenSSL-Random

Added new build dependency to perl-crypt-openssl-guess and force it to search for openssl in STAGING_DIR. Added license hash.

---
 package/perl-crypt-openssl-random/Config.in            |  1 +
 .../perl-crypt-openssl-random.hash                     |  7 +++++--
 .../perl-crypt-openssl-random.mk                       | 10 ++++++++--
 3 files changed, 14 insertions(+), 4 deletions(-)
package/perl-crypt-openssl-random/Config.in +1 -0
index 2ceb78dfd6..de474c13d5 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_PERL_CRYPT_OPENSSL_RANDOM
 	bool "perl-crypt-openssl-random"
 	depends on !BR2_STATIC_LIBS
 	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_PERL_CRYPT_OPENSSL_GUESS
 	help
 	  OpenSSL/LibreSSL pseudo-random number generator access
 
package/perl-crypt-openssl-random/perl-crypt-openssl-random.hash +5 -2
index caacdc9015..57677e3445 100644
@@ -1,3 +1,6 @@
 # retrieved by scancpan from http://cpan.metacpan.org/
-md5    5d71337503e0356ce1ce1481504e5885 Crypt-OpenSSL-Random-0.11.tar.gz
-sha256 bb8c81c6a39b9b13a22d818ee9a746242f136f0fadceb6b9776ae615e7524c7a Crypt-OpenSSL-Random-0.11.tar.gz
+md5    bcde8d5a822c91376deda3c4f0c75fbe Crypt-OpenSSL-Random-0.15.tar.gz
+sha256 f0876faa1ba3111e39b86aa730c603211eff2905e460c72a57b61e8cf475cef4 Crypt-OpenSSL-Random-0.15.tar.gz
+
+# computed by scancpan
+sha256 fdaba2134145d3e252c5930180b2bcb13b5367ad5a8713d6868f014cd25c496f LICENSE
package/perl-crypt-openssl-random/perl-crypt-openssl-random.mk +8 -2
index de029e9af0..775a0ab2c5 100644
@@ -4,11 +4,17 @@
 #
 ################################################################################
 
-PERL_CRYPT_OPENSSL_RANDOM_VERSION = 0.11
+PERL_CRYPT_OPENSSL_RANDOM_VERSION = 0.15
 PERL_CRYPT_OPENSSL_RANDOM_SOURCE = Crypt-OpenSSL-Random-$(PERL_CRYPT_OPENSSL_RANDOM_VERSION).tar.gz
 PERL_CRYPT_OPENSSL_RANDOM_SITE = $(BR2_CPAN_MIRROR)/authors/id/R/RU/RURBAN
-PERL_CRYPT_OPENSSL_RANDOM_DEPENDENCIES = openssl
+PERL_CRYPT_OPENSSL_RANDOM_DEPENDENCIES = \
+	perl-crypt-openssl-guess \
+	openssl
 PERL_CRYPT_OPENSSL_RANDOM_LICENSE = Artistic or GPL-1.0+
 PERL_CRYPT_OPENSSL_RANDOM_LICENSE_FILES = LICENSE
 
+# Try as hard as possible to remedy to the brain-damage their build-system
+# suffers from: don't search for openssl, they pick the host-system one.
+PERL_CRYPT_OPENSSL_RANDOM_CONF_ENV = OPENSSL_PREFIX=$(STAGING_DIR)/usr
+
 $(eval $(perl-package))
Signature · 1 line
2.18.0
#2 lore raw

PATCH 2/3 package/perl-crypt-openssl-random: bump version to 0.15

Hello,

Quoted 4 lines · Bernd Kuhls
package/perl-crypt-openssl-random/perl-crypt-openssl-random.mk +1 -1
-PERL_CRYPT_OPENSSL_RANDOM_VERSION = 0.11
+PERL_CRYPT_OPENSSL_RANDOM_VERSION = 0.15
 PERL_CRYPT_OPENSSL_RANDOM_SOURCE = Crypt-OpenSSL-Random-$(PERL_CRYPT_OPENSSL_RANDOM_VERSION).tar.gz
 PERL_CRYPT_OPENSSL_RANDOM_SITE = $(BR2_CPAN_MIRROR)/authors/id/R/RU/RURBAN

package/perl-crypt-openssl-random/perl-crypt-openssl-random.mk line 18

Quoted 10 lines
package/perl-crypt-openssl-random/perl-crypt-openssl-random.mk +6 -1
-PERL_CRYPT_OPENSSL_RANDOM_DEPENDENCIES = openssl
+PERL_CRYPT_OPENSSL_RANDOM_DEPENDENCIES = \
+	perl-crypt-openssl-guess \
+	openssl
 PERL_CRYPT_OPENSSL_RANDOM_LICENSE = Artistic or GPL-1.0+
 PERL_CRYPT_OPENSSL_RANDOM_LICENSE_FILES = LICENSE
 
+# Try as hard as possible to remedy to the brain-damage their build-system
+# suffers from: don't search for openssl, they pick the host-system one.
+PERL_CRYPT_OPENSSL_RANDOM_CONF_ENV = OPENSSL_PREFIX=$(STAGING_DIR)/usr

So, there's a new dependency on a module that helps guessing the path to OpenSSL library/headers, but you nonetheless have to force where they are located ? Seems strange :-)

Perhaps those Perl people should learn about pkg-config rather than:

    my @guesses = (
        '/home/linuxbrew/.linuxbrew/opt/openssl/bin/openssl' => '/home/linuxbrew/.linuxbrew/opt/openssl', # LinuxBrew openssl
        '/usr/local/opt/openssl/bin/openssl' => '/usr/local/opt/openssl', # OSX homebrew openssl
        '/usr/local/bin/openssl'         => '/usr/local', # OSX homebrew openssl
        '/opt/local/bin/openssl'         => '/opt/local', # Macports openssl
        '/usr/bin/openssl'               => '/usr',
        '/usr/sbin/openssl'              => '/usr',
        '/opt/ssl/bin/openssl'           => '/opt/ssl',
        '/opt/ssl/sbin/openssl'          => '/opt/ssl',
        '/usr/local/ssl/bin/openssl'     => '/usr/local/ssl',
        '/usr/local/openssl/bin/openssl' => '/usr/local/openssl',
        '/apps/openssl/std/bin/openssl'  => '/apps/openssl/std',
        '/usr/sfw/bin/openssl'           => '/usr/sfw', # Open Solaris
        'C:\OpenSSL\bin\openssl.exe'     => 'C:\OpenSSL',
        'C:\OpenSSL-Win32\bin\openssl.exe'        => 'C:\OpenSSL-Win32',
        $Config{prefix} . '\bin\openssl.exe'      => $Config{prefix},           # strawberry perl
        $Config{prefix} . '\..\c\bin\openssl.exe' => $Config{prefix} . '\..\c', # strawberry perl
        '/sslexe/openssl.exe'            => '/sslroot',  # VMS, openssl.org
        '/ssl$exe/openssl.exe'           => '/ssl$root', # VMS, HP install
    );

but oh well...

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 2/3 package/perl-crypt-openssl-random: bump version to 0.15

Hello,

Quoted 3 lines · Thomas Petazzoni

So, there's a new dependency on a module that helps guessing the path to OpenSSL library/headers, but you nonetheless have to force where they are located ? Seems strange :-)

In fact, more serious question: figuring out the path to OpenSSL libs/headers is something that is needed at build time. But you're adding perl-crypt-openssl-guess as a target package. I don't understand how it makes sense. Could you clarify ?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH 2/3 package/perl-crypt-openssl-random: bump version to 0.15

Am Sun, 19 Aug 2018 23:25:23 +0200 schrieb Thomas Petazzoni:

Quoted 4 lines

In fact, more serious question: figuring out the path to OpenSSL libs/headers is something that is needed at build time. But you're adding perl-crypt-openssl-guess as a target package. I don't understand how it makes sense. Could you clarify ?

Hi Thomas,

I did not forget about answering your question, was just busy with the security bump for libX11 ;)

In fact you were right about that only the host package is needed. I guess during the build tests I mixed up the target and host versions, first I used the target package, which caused an error in the other packages, then I tried the host package, which was broken as well (but I kept its files in the host install of perl), then switched back to the target package, still broken, and at last I added the "OPENSSL_PREFIX=" hack to the target package which, together with the still installed host files, produced working builds of perl-crypt-openssl-{random, rsa}. But I did not notice that really the host files were, together with the hack, were responsible for the sucessful build.

Sorry for the confusion ;)

Regards, Bernd

#5 lore raw

PATCH 2/3 package/perl-crypt-openssl-random: bump version to 0.15

Hello,

Quoted 2 lines · Bernd Kuhls

I did not forget about answering your question, was just busy with the security bump for libX11 ;)

Hehe, OK :-)

Quoted 10 lines

In fact you were right about that only the host package is needed. I guess during the build tests I mixed up the target and host versions, first I used the target package, which caused an error in the other packages, then I tried the host package, which was broken as well (but I kept its files in the host install of perl), then switched back to the target package, still broken, and at last I added the "OPENSSL_PREFIX=" hack to the target package which, together with the still installed host files, produced working builds of perl-crypt-openssl-{random, rsa}. But I did not notice that really the host files were, together with the hack, were responsible for the sucessful build.

OK, thanks for the additional explanation, makes sense. I'll give it a test build.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#6 lore raw

PATCH 3/3 package/perl-crypt-openssl-rsa: bump version to 0.30

In reply to Bernd Kuhls

Changelog:
https://metacpan.org/changes/distribution/Crypt-OpenSSL-RSA

Added new build dependency to perl-crypt-openssl-guess and force it to search for openssl in STAGING_DIR. Added license hash. Updated _SITE according to scancpan.

---
 package/perl-crypt-openssl-rsa/Config.in             |  1 +
 .../perl-crypt-openssl-rsa.hash                      |  7 +++++--
 .../perl-crypt-openssl-rsa/perl-crypt-openssl-rsa.mk | 12 +++++++++---
 3 files changed, 15 insertions(+), 5 deletions(-)
package/perl-crypt-openssl-rsa/Config.in +1 -0
index 1fa1fd9881..4d33284f0a 100644
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_PERL_CRYPT_OPENSSL_RSA
 	bool "perl-crypt-openssl-rsa"
 	depends on !BR2_STATIC_LIBS
+	select BR2_PACKAGE_PERL_CRYPT_OPENSSL_GUESS
 	select BR2_PACKAGE_PERL_CRYPT_OPENSSL_RANDOM
 	help
 	  RSA encoding and decoding, using the openSSL libraries
package/perl-crypt-openssl-rsa/perl-crypt-openssl-rsa.hash +5 -2
index 6e060ce672..0d101d7bb8 100644
@@ -1,3 +1,6 @@
 # retrieved by scancpan from http://cpan.metacpan.org/
-md5    86217a5036fc63779c30420b5fd84129 Crypt-OpenSSL-RSA-0.28.tar.gz
-sha256 5357f977464bb3a8184cf2d3341851a10d5515b4b2b0dfb88bf78995c0ded7be Crypt-OpenSSL-RSA-0.28.tar.gz
+md5    10bca2fc6d0ba1aa329f227424ae87d5 Crypt-OpenSSL-RSA-0.30.tar.gz
+sha256 23e13531397af102db4fd24bcf70137add7c85c23cca697c43aa71c2959a29ac Crypt-OpenSSL-RSA-0.30.tar.gz
+
+# computed by scancpan
+sha256 8a693ad3f52daeeb5ac5deceb1e1109c9c87095ed5ba6506d6d5c106e4066f5a LICENSE
package/perl-crypt-openssl-rsa/perl-crypt-openssl-rsa.mk +9 -3
index b853d9953e..118ee66a5e 100644
@@ -4,11 +4,17 @@
 #
 ################################################################################
 
-PERL_CRYPT_OPENSSL_RSA_VERSION = 0.28
+PERL_CRYPT_OPENSSL_RSA_VERSION = 0.30
 PERL_CRYPT_OPENSSL_RSA_SOURCE = Crypt-OpenSSL-RSA-$(PERL_CRYPT_OPENSSL_RSA_VERSION).tar.gz
-PERL_CRYPT_OPENSSL_RSA_SITE = $(BR2_CPAN_MIRROR)/authors/id/P/PE/PERLER
-PERL_CRYPT_OPENSSL_RSA_DEPENDENCIES = perl-crypt-openssl-random
+PERL_CRYPT_OPENSSL_RSA_SITE = $(BR2_CPAN_MIRROR)/authors/id/T/TO/TODDR
+PERL_CRYPT_OPENSSL_RSA_DEPENDENCIES = \
+	perl-crypt-openssl-guess \
+	perl-crypt-openssl-random
 PERL_CRYPT_OPENSSL_RSA_LICENSE = Artistic or GPL-1.0+
 PERL_CRYPT_OPENSSL_RSA_LICENSE_FILES = LICENSE
 
+# Try as hard as possible to remedy to the brain-damage their build-system
+# suffers from: don't search for openssl, they pick the host-system one.
+PERL_CRYPT_OPENSSL_RSA_CONF_ENV = OPENSSL_PREFIX=$(STAGING_DIR)/usr
+
 $(eval $(perl-package))
Signature · 1 line
2.18.0