Skip to contentSkip to conversation

openssl-qoriq: Sync with oe-core recipe

PATCH New Fabio Berton 1 participant 1 message Jun 7, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openssl-qoriq: Sync with oe-core recipe

Sync with oe-core recipe to make maintenance easier, copy all patches and let both openssl recipe more similar.

---
 recipes-connectivity/openssl/openssl-qoriq.inc     |   72 +-
 ...build-with-clang-using-external-assembler.patch |   45 +
 .../Use-SHA256-not-MD5-as-default-digest.patch     |   69 +
 .../openssl-qoriq/configure-musl-target.patch      |   27 +
 .../crypto_use_bigint_in_x86-64_perl.patch         |   44 -
 .../openssl-qoriq/debian/c_rehash-compat.patch     |   71 +
 .../openssl/openssl-qoriq/debian/ca.patch          |   22 +
 .../openssl-qoriq/debian/debian-targets.patch      |   73 +
 .../openssl/openssl-qoriq/debian/man-dir.patch     |   15 +
 .../openssl/openssl-qoriq/debian/man-section.patch |   34 +
 .../openssl-qoriq/{ => debian}/no-rpath.patch      |    0
 .../openssl/openssl-qoriq/debian/no-symbolic.patch |   15 +
 .../openssl/openssl-qoriq/debian/pic.patch         |  177 +
 .../openssl-qoriq/debian/version-script.patch      | 4663 ++++++++++++++++++++
 .../openssl/openssl-qoriq/debian1.0.2/soname.patch |   13 +
 .../openssl-qoriq/debian1.0.2/version-script.patch | 4656 +++++++++++++++++++
 .../openssl-qoriq/fix-cipher-des-ede3-cfb1.patch   |    2 +-
 ...-pointer-dereference-in-EVP_DigestInit_ex.patch |   23 +
 .../openssl/openssl-qoriq/openssl-c_rehash.sh      |  222 +
 .../openssl-util-perlpath.pl-cwd.patch             |   34 +
 .../openssl-qoriq/openssl_fix_for_x32.patch        |    4 +-
 .../openssl/openssl-qoriq/parallel.patch           |  337 ++
 .../openssl/openssl-qoriq_1.0.2k.bb                |   51 +-
 23 files changed, 10576 insertions(+), 93 deletions(-)
 create mode 100644 recipes-connectivity/openssl/openssl-qoriq/0001-Fix-build-with-clang-using-external-assembler.patch
 create mode 100644 recipes-connectivity/openssl/openssl-qoriq/Use-SHA256-not-MD5-as-default-digest.patch
 create mode 100644 recipes-connectivity/openssl/openssl-qoriq/configure-musl-target.patch
 delete mode 100644 recipes-connectivity/openssl/openssl-qoriq/crypto_use_bigint_in_x86-64_perl.patch
 create mode 100644 recipes-connectivity/openssl/openssl-qoriq/debian/c_rehash-compat.patch
 create mode 100644 recipes-connectivity/openssl/openssl-qoriq/debian/ca.patch
 create mode 100644 recipes-connectivity/openssl/openssl-qoriq/debian/debian-targets.patch
 create mode 100644 recipes-connectivity/openssl/openssl-qoriq/debian/man-dir.patch
 create mode 100644 recipes-connectivity/openssl/openssl-qoriq/debian/man-section.patch
 rename recipes-connectivity/openssl/openssl-qoriq/{ => debian}/no-rpath.patch (100%)
 create mode 100644 recipes-connectivity/openssl/openssl-qoriq/debian/no-symbolic.patch
 create mode 100644 recipes-connectivity/openssl/openssl-qoriq/debian/pic.patch
 create mode 100644 recipes-connectivity/openssl/openssl-qoriq/debian/version-script.patch
 create mode 100644 recipes-connectivity/openssl/openssl-qoriq/debian1.0.2/soname.patch
 create mode 100644 recipes-connectivity/openssl/openssl-qoriq/debian1.0.2/version-script.patch
 create mode 100644 recipes-connectivity/openssl/openssl-qoriq/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch
 create mode 100644 recipes-connectivity/openssl/openssl-qoriq/openssl-c_rehash.sh
 create mode 100644 recipes-connectivity/openssl/openssl-qoriq/openssl-util-perlpath.pl-cwd.patch
 create mode 100644 recipes-connectivity/openssl/openssl-qoriq/parallel.patch
recipes-connectivity/openssl/openssl-qoriq.inc +45 -27
index 965291c5..612ec096 100644
@@ -28,7 +28,6 @@ S = "${WORKDIR}/openssl-${PV}"
 
 PACKAGECONFIG[perl] = ",,,"
 
-AR_append = " r"
 TERMIO_libc-musl = "-DTERMIOS"
 TERMIO ?= "-DTERMIO"
 # Avoid binaries being marked as requiring an executable stack since it 
@@ -39,17 +38,17 @@ CFLAG = "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_END
 export DIRS = "crypto ssl apps"
 export EX_LIBS = "-lgcc -ldl"
 export AS = "${CC} -c"
-EXTRA_OEMAKE = "-e MAKEFLAGS="
 
-inherit pkgconfig siteinfo multilib_header ptest
+inherit pkgconfig siteinfo multilib_header ptest relative_symlinks
 
 PACKAGES =+ "libcrypto libssl ${PN}-misc ${PN}-conf"
 FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}"
 FILES_libssl = "${libdir}/libssl${SOLIBS}"
 FILES_${PN} =+ " ${libdir}/ssl/*"
-FILES_${PN}-misc = "${libdir}/ssl/misc ${bindir}/c_rehash"
-RDEPENDS_${PN}-misc = "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perl', '', d)}"
-FILES_${PN}-dev += "${base_libdir}/libcrypto${SOLIBSDEV}"
+FILES_${PN}-misc = "${libdir}/ssl/misc"
+RDEPENDS_${PN}-misc = "${@bb.utils.filter('PACKAGECONFIG', 'perl', d)}"
+
+PROVIDES += "openssl10"
 
 # Add the openssl.cnf file to the openssl-conf package.  Make the libcrypto
 # package RRECOMMENDS on this package.  This will enable the configuration
@@ -119,15 +118,24 @@ do_configure () {
 	linux-gnu64-x86_64)
 		target=linux-x86_64
 		;;
-	linux-mips)
-		target=debian-mips
+	linux-gnun32-mips*el)
+		target=debian-mipsn32el
+		;;
+	linux-gnun32-mips*)
+		target=debian-mipsn32
 		;;
-	linux-mipsel)
+	linux-mips*64*el)
+		target=debian-mips64el
+		;;
+	linux-mips*64*)
+		target=debian-mips64
+		;;
+	linux-mips*el)
 		target=debian-mipsel
 		;;
-        linux-*-mips64 | linux-mips64)
-               target=linux-mips
-                ;;
+	linux-mips*)
+		target=debian-mips
+		;;
 	linux-microblaze*|linux-nios2*)
 		target=linux-generic32
 		;;
@@ -181,26 +189,18 @@ do_install () {
 	oe_libinstall -so libcrypto ${D}${libdir}
 	oe_libinstall -so libssl ${D}${libdir}
 
-        # Moving libcrypto to /lib
-        if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
-                mkdir -p ${D}/${base_libdir}/
-                mv ${D}${libdir}/libcrypto* ${D}${base_libdir}/
-                sed -i s#libdir=\$\{exec_prefix\}\/lib#libdir=${base_libdir}# ${D}/${libdir}/pkgconfig/libcrypto.pc
-        fi
-
 	install -d ${D}${includedir}
 	cp --dereference -R include/openssl ${D}${includedir}
 
+	install -Dm 0755 ${WORKDIR}/openssl-c_rehash.sh ${D}${bindir}/c_rehash
+	sed -i -e 's,/etc/openssl,${sysconfdir}/ssl,g' ${D}${bindir}/c_rehash
+
 	oe_multilib_header openssl/opensslconf.h
-	if [ "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perl', '', d)}" = "perl" ]; then
-                install -m 0755 ${S}/tools/c_rehash ${D}${bindir}
-                sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${bindir}/c_rehash
+	if [ "${@bb.utils.filter('PACKAGECONFIG', 'perl', d)}" ]; then
 		sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/CA.pl
 		sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/tsget
-        # The c_rehash utility isn't installed by the normal installation process.
-        else
-                rm -f ${D}${bindir}/c_rehash
-                rm -f ${D}${libdir}/ssl/misc/CA.pl ${D}${libdir}/ssl/misc/tsget
+	else
+		rm -f ${D}${libdir}/ssl/misc/CA.pl ${D}${libdir}/ssl/misc/tsget
 	fi
 
 	# Create SSL structure
@@ -217,9 +217,13 @@ do_install () {
 
 do_install_ptest () {
 	cp -r -L Makefile.org Makefile test ${D}${PTEST_PATH}
+
+        # Replace the path to native perl with the path to target perl
+        sed -i 's,^PERL=.*,PERL=${bindir}/perl,' ${D}${PTEST_PATH}/Makefile
+
 	cp Configure config e_os.h ${D}${PTEST_PATH}
 	cp -r -L include ${D}${PTEST_PATH}
-	ln -sf ${base_libdir}/libcrypto.a ${D}${PTEST_PATH}
+	ln -sf ${libdir}/libcrypto.a ${D}${PTEST_PATH}
 	ln -sf ${libdir}/libssl.a ${D}${PTEST_PATH}
 	mkdir -p ${D}${PTEST_PATH}/crypto
 	cp crypto/constant_time_locl.h ${D}${PTEST_PATH}/crypto
@@ -228,10 +232,24 @@ do_install_ptest () {
 	ln -sf ${libdir}/ssl/misc/CA.sh  ${D}${PTEST_PATH}/apps
 	ln -sf ${sysconfdir}/ssl/openssl.cnf ${D}${PTEST_PATH}/apps
 	ln -sf ${bindir}/openssl         ${D}${PTEST_PATH}/apps
+	cp apps/server.pem              ${D}${PTEST_PATH}/apps
 	cp apps/server2.pem             ${D}${PTEST_PATH}/apps
 	mkdir -p ${D}${PTEST_PATH}/util
 	install util/opensslwrap.sh    ${D}${PTEST_PATH}/util
 	install util/shlib_wrap.sh     ${D}${PTEST_PATH}/util
+	# Time stamps are relevant for "make alltests", otherwise
+	# make may try to recompile binaries. Not only must the
+	# binary files be newer than the sources, they also must
+	# be more recent than the header files in /usr/include.
+	#
+	# Using "cp -a" is not sufficient, because do_install
+	# does not preserve the original time stamps.
+	#
+	# So instead of using the original file stamps, we set
+	# the current time for all files. Binaries will get
+	# modified again later when stripping them, but that's okay.
+	touch ${D}${PTEST_PATH}
+	find ${D}${PTEST_PATH} -type f -print0 | xargs --verbose -0 touch -r ${D}${PTEST_PATH}
 }
 
 do_install_append_class-native() {
recipes-connectivity/openssl/openssl-qoriq/0001-Fix-build-with-clang-using-external-assembler.patch new file +45 -0

45 lines not on this page · raw message

recipes-connectivity/openssl/openssl-qoriq/Use-SHA256-not-MD5-as-default-digest.patch new file +69 -0

69 lines not on this page · raw message

recipes-connectivity/openssl/openssl-qoriq/configure-musl-target.patch new file +27 -0
new file mode 100644
index 00000000..613dc7b7
@@ -0,0 +1,27 @@
+Add musl triplet support
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+
+Index: openssl-1.0.2a/Configure
+===================================================================
+--- openssl-1.0.2a.orig/Configure
++++ openssl-1.0.2a/Configure
+@@ -431,7 +431,7 @@ my %table=(
+ #
+ #       ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
+ #
+-"linux-armv4",	"gcc: -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"linux-armv4", "gcc: -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ "linux-aarch64","gcc: -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ # Configure script adds minimally required -march for assembly support,
+ # if no -march was specified at command line. mips32 and mips64 below
+@@ -504,6 +504,8 @@ my %table=(
+ "linux-gnueabi-armeb","$ENV{'CC'}:-DB_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ "linux-uclibceabi-arm","$ENV{'CC'}:-DL_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ "linux-uclibceabi-armeb","$ENV{'CC'}:-DB_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"linux-musleabi-arm","$ENV{'CC'}:-DL_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"linux-musleabi-armeb","$ENV{'CC'}:-DB_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ 
+ "linux-avr32","$ENV{'CC'}:-O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).",
+ 
recipes-connectivity/openssl/openssl-qoriq/crypto_use_bigint_in_x86-64_perl.patch deleted +0 -44

44 lines not on this page · raw message

recipes-connectivity/openssl/openssl-qoriq/debian/c_rehash-compat.patch new file +71 -0

71 lines not on this page · raw message

recipes-connectivity/openssl/openssl-qoriq/debian/ca.patch new file +22 -0
new file mode 100644
index 00000000..fb745e43
@@ -0,0 +1,22 @@
+Upstream-Status: Backport [debian]
+
+Index: openssl-0.9.8m/apps/CA.pl.in
+===================================================================
+--- openssl-0.9.8m.orig/apps/CA.pl.in	2006-04-28 00:28:51.000000000 +0000
++++ openssl-0.9.8m/apps/CA.pl.in	2010-02-27 00:36:51.000000000 +0000
+@@ -65,6 +65,7 @@
+ foreach (@ARGV) {
+ 	if ( /^(-\?|-h|-help)$/ ) {
+ 	    print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-signcert|-verify\n";
++	    print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
+ 	    exit 0;
+ 	} elsif (/^-newcert$/) {
+ 	    # create a certificate
+@@ -165,6 +166,7 @@
+ 	} else {
+ 	    print STDERR "Unknown arg $_\n";
+ 	    print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
++	    print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
+ 	    exit 1;
+ 	}
+ }
recipes-connectivity/openssl/openssl-qoriq/debian/debian-targets.patch new file +73 -0

73 lines not on this page · raw message

recipes-connectivity/openssl/openssl-qoriq/debian/man-dir.patch new file +15 -0
new file mode 100644
index 00000000..4085e3b1
@@ -0,0 +1,15 @@
+Upstream-Status: Backport [debian]
+
+Index: openssl-1.0.0c/Makefile.org
+===================================================================
+--- openssl-1.0.0c.orig/Makefile.org	2010-12-12 16:11:27.000000000 +0100
++++ openssl-1.0.0c/Makefile.org	2010-12-12 16:11:37.000000000 +0100
+@@ -131,7 +131,7 @@
+ 
+ MAKEFILE= Makefile
+ 
+-MANDIR=$(OPENSSLDIR)/man
++MANDIR=/usr/share/man
+ MAN1=1
+ MAN3=3
+ MANSUFFIX=
recipes-connectivity/openssl/openssl-qoriq/debian/man-section.patch new file +34 -0
new file mode 100644
index 00000000..21c1d1a4
@@ -0,0 +1,34 @@
+Upstream-Status: Backport [debian]
+
+Index: openssl-1.0.0c/Makefile.org
+===================================================================
+--- openssl-1.0.0c.orig/Makefile.org	2010-12-12 16:11:37.000000000 +0100
++++ openssl-1.0.0c/Makefile.org	2010-12-12 16:13:28.000000000 +0100
+@@ -160,7 +160,8 @@
+ MANDIR=/usr/share/man
+ MAN1=1
+ MAN3=3
+-MANSUFFIX=
++MANSUFFIX=ssl
++MANSECTION=SSL
+ HTMLSUFFIX=html
+ HTMLDIR=$(OPENSSLDIR)/html
+ SHELL=/bin/sh
+@@ -651,7 +652,7 @@
+ 		echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
+ 		(cd `$(PERL) util/dirname.pl $$i`; \
+ 		sh -c "$$pod2man \
+-			--section=$$sec --center=OpenSSL \
++			--section=$${sec}$(MANSECTION) --center=OpenSSL \
+ 			--release=$(VERSION) `basename $$i`") \
+ 			>  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
+ 		$(PERL) util/extract-names.pl < $$i | \
+@@ -668,7 +669,7 @@
+ 		echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
+ 		(cd `$(PERL) util/dirname.pl $$i`; \
+ 		sh -c "$$pod2man \
+-			--section=$$sec --center=OpenSSL \
++			--section=$${sec}$(MANSECTION) --center=OpenSSL \
+ 			--release=$(VERSION) `basename $$i`") \
+ 			>  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
+ 		$(PERL) util/extract-names.pl < $$i | \
recipes-connectivity/openssl/openssl-qoriq/debian/no-rpath.patch renamed from recipes-connectivity/openssl/openssl-qoriq/no-rpath.patch +0 -0
similarity index 100%
rename from recipes-connectivity/openssl/openssl-qoriq/no-rpath.patch
rename to recipes-connectivity/openssl/openssl-qoriq/debian/no-rpath.patch
recipes-connectivity/openssl/openssl-qoriq/debian/no-symbolic.patch new file +15 -0
new file mode 100644
index 00000000..cc4408ab
@@ -0,0 +1,15 @@
+Upstream-Status: Backport [debian]
+
+Index: openssl-1.0.0c/Makefile.shared
+===================================================================
+--- openssl-1.0.0c.orig/Makefile.shared	2010-12-12 16:13:36.000000000 +0100
++++ openssl-1.0.0c/Makefile.shared	2010-12-12 16:13:44.000000000 +0100
+@@ -151,7 +151,7 @@
+ 	SHLIB_SUFFIX=; \
+ 	ALLSYMSFLAGS='-Wl,--whole-archive'; \
+ 	NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
+-	SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
++	SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
+ 
+ DO_GNU_APP=LDFLAGS="$(CFLAGS)"
+ 
recipes-connectivity/openssl/openssl-qoriq/debian/pic.patch new file +177 -0

177 lines not on this page · raw message

recipes-connectivity/openssl/openssl-qoriq/debian/version-script.patch new file +4663 -0

2,279 lines not on this page · raw message

recipes-connectivity/openssl/openssl-qoriq/debian1.0.2/soname.patch new file +13 -0
new file mode 100644
index 00000000..f9cdfec8

Lines of this file are not shown. View the raw message.

recipes-connectivity/openssl/openssl-qoriq/debian1.0.2/version-script.patch new file +4656 -0

4,656 lines not on this page · raw message

recipes-connectivity/openssl/openssl-qoriq/fix-cipher-des-ede3-cfb1.patch +1 -1
index 06d1ea69..2a318a45 100644

Lines of this file are not shown. View the raw message.

recipes-connectivity/openssl/openssl-qoriq/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch new file +23 -0
new file mode 100644
index 00000000..f736e5c0

Lines of this file are not shown. View the raw message.

recipes-connectivity/openssl/openssl-qoriq/openssl-c_rehash.sh new file +222 -0

222 lines not on this page · raw message

recipes-connectivity/openssl/openssl-qoriq/openssl-util-perlpath.pl-cwd.patch new file +34 -0
new file mode 100644
index 00000000..065b9b12

Lines of this file are not shown. View the raw message.

recipes-connectivity/openssl/openssl-qoriq/openssl_fix_for_x32.patch +2 -2
index cbce32c8..0f08a642 100644

Lines of this file are not shown. View the raw message.

recipes-connectivity/openssl/openssl-qoriq/parallel.patch new file +337 -0

337 lines not on this page · raw message

recipes-connectivity/openssl/openssl-qoriq_1.0.2k.bb +32 -19

51 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.11.0

Part of the diff is not shown here. View the raw message.