openssl: use git formatted patches
PATCH 1/2 openssl: use git formatted patches
Using Git formatted patches makes it easier to adjust the patches when needed.
---
...time-building-manpages-if-we-re-not-going.patch | 27 +++++++++
...odev-Fix-issue-with-signature-generation.patch} | 70 +++++++++++++---------
...h-minus-inste.patch => 0003-Fix-c_rehash.patch} | 10 ++--
package/openssl/001-do-not-build-docs.patch | 13 ----
4 files changed, 74 insertions(+), 46 deletions(-)
create mode 100644 package/openssl/0001-Dont-waste-time-building-manpages-if-we-re-not-going.patch
rename package/openssl/{003-cryptodev-Fix-issue-with-signature-generation.patch => 0002-cryptodev-Fix-issue-with-signature-generation.patch} (82%)
rename package/openssl/{005-Make-c_rehash-match-commands-starting-with-minus-inste.patch => 0003-Fix-c_rehash.patch} (71%)
delete mode 100644 package/openssl/001-do-not-build-docs.patchpackage/openssl/0001-Dont-waste-time-building-manpages-if-we-re-not-going.patch new file +27 -0
@@ -0,0 +1,27 @@ +From 53980448064b362a58e4ab2aca6f38fec93c07c3 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <[email protected]> +Date: Sat, 16 May 2015 18:53:51 +0200 +Subject: [PATCH 1/3] Dont waste time building manpages if we're not going to + use em. + +Signed-off-by: Thomas Petazzoni <[email protected]> +--- + Makefile.org | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.org b/Makefile.org +index b7a3f96..8a47840 100644 +--- a/Makefile.org ++++ b/Makefile.org +@@ -536,7 +536,7 @@ dist: + dist_pem_h: + (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean) + +-install: all install_docs install_sw ++install: all install_sw + + install_sw: + @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ +-- +2.1.0 +
package/openssl/0002-cryptodev-Fix-issue-with-signature-generation.patch renamed from package/openssl/003-cryptodev-Fix-issue-with-signature-generation.patch +41 -29
233 lines not on this page · raw message
package/openssl/0003-Fix-c_rehash.patch renamed from package/openssl/005-Make-c_rehash-match-commands-starting-with-minus-inste.patch +6 -4
@@ -1,8 +1,10 @@ -From 079cae9d7628f16b9efdf5723d2bfae5bdc2ba4e Mon Sep 17 00:00:00 2001 +From e2b290598f513a5bc4d8187cbc53bbc98b7a1e49 Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias <[email protected]> Date: Tue, 27 Jan 2015 18:27:32 -0300 -Subject: [PATCH] Make c_rehash match commands starting with - (minus) instead - of minus in any starting position, otherwise a directory named a-b breaks it +Subject: [PATCH 3/3] Fix c_rehash + +Make c_rehash match commands starting with - (minus) instead of minus +in any starting position, otherwise a directory named a-b breaks it Signed-off-by: Gustavo Zacarias <[email protected]> ---
@@ -23,5 +25,5 @@ index 887e927..1df2fab 100644 last if ( $flag eq '--'); if ( $flag =~ /-old/) { -- -2.0.5 +2.1.0
package/openssl/001-do-not-build-docs.patch deleted +0 -13
@@ -1,13 +0,0 @@ -Dont waste time building manpages if we're not going to use em. - ---- openssl/Makefile.org -+++ openssl/Makefile.org -@@ -792,7 +792,7 @@ - dist_pem_h: - (cd crypto/pem; $(MAKE) CC='${CC}' SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean) - --install: all install_docs install_sw -+install: all install_sw - - install_sw: - @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
Signature · 1 line
2.1.0
PATCH 1/2 openssl: use git formatted patches
Gustavo,
Quoted 4 lines · Thomas Petazzoni
Using Git formatted patches makes it easier to adjust the patches when needed.
Signed-off-by Thomas Petazzoni <[email protected]>
Since you are the de-facto maintainer of the OpenSSL package, could you give your opinion about the two patches in this series. I believe PATCH 1/2 is OK, but what do you think about PATCH 2/2 ?
Back in November 2014, Bernd also submitted some patches to enable parallel build of OpenSSL, see
http://lists.busybox.net/pipermail/buildroot/2014-November/112183.html.
Peter and I rejected them because they were a bit big. My proposal relies on downloading Gentoo patches instead, but I don't now if it's really any better, since those patches may cause some problems in the future to bump OpenSSL.
What do you think? Should we simply wait for OpenSSL upstream to see the light and support parallel build?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/2 openssl: use git formatted patches
On 20/07/15 11:07, Thomas Petazzoni wrote:
Hi Thomas.
Quoted 3 lines
Since you are the de-facto maintainer of the OpenSSL package, could you give your opinion about the two patches in this series. I believe PATCH 1/2 is OK, but what do you think about PATCH 2/2 ?
It looks fine, however it needs a small refresh (c_rehash was fixed upstream, hence gone).
Quoted 10 lines
Back in November 2014, Bernd also submitted some patches to enable parallel build of OpenSSL, see
http://lists.busybox.net/pipermail/buildroot/2014-November/112183.html.
Peter and I rejected them because they were a bit big. My proposal relies on downloading Gentoo patches instead, but I don't now if it's really any better, since those patches may cause some problems in the future to bump OpenSSL.What do you think? Should we simply wait for OpenSSL upstream to see the light and support parallel build?
I don't expect build patches to change much among what are usually security bumps, and also gentoo has a history of being fast updating openssl.
I wouldn't hold my breath expecting openssl upstream to fix anything soon, example patch we have:
http://rt.openssl.org/Ticket/Display.html?id=2770&user=guest&pass=guest
And my personal history with sending patches to them (c_rehash being one of the cases BTW) vouches for that. If you send it to the RT it may get "lost" for whatever reason, if you send the patch to the openssl-dev mailing list it gets ignored.
So +1 from me, openssl is one of those builds you see building and yawn about.
If it becomes an obstacle to a security bump we can just roll back to $(MAKE1) until a new patchset arrives.
Regards.
PATCH 2/2 openssl: enable parallel build and installation
In reply to Thomas PetazzoniOn my build server, the current build of OpenSSL takes 1 minutes and 20 seconds. With this commit applied, enabling parallel build and installation, the build only takes 28 seconds.
All the patches are downloaded from Gentoo.
There is apparently some interest in upstream OpenSSL to enable
parallel build, see for example commit
https://github.com/openssl/openssl/commit/c3f22253b139793ff3b91ff7e6969e180cf06815. This commit is not part of any OpenSSL release, but we can hope that the problem will resolved in the future.
I have tested 20 consecutive builds of a config that has openssl and host-openssl being used by uboot-tools and host-uboot-tools (through the FIT image support).
--- ...ste-time-building-manpages-if-we-re-not-going.patch | 12 ++++++------ ...cryptodev-Fix-issue-with-signature-generation.patch | 2 +- package/openssl/0003-Fix-c_rehash.patch | 2 +- package/openssl/openssl.hash | 4 ++++ package/openssl/openssl.mk | 18 +++++++++++++----- 5 files changed, 25 insertions(+), 13 deletions(-)
package/openssl/0001-Dont-waste-time-building-manpages-if-we-re-not-going.patch +6 -6
@@ -1,4 +1,4 @@ -From 53980448064b362a58e4ab2aca6f38fec93c07c3 Mon Sep 17 00:00:00 2001 +From 167e29662b07805eac9ef67e10af9d71761233c3 Mon Sep 17 00:00:00 2001 From: Mike Frysinger <[email protected]> Date: Sat, 16 May 2015 18:53:51 +0200 Subject: [PATCH 1/3] Dont waste time building manpages if we're not going to
@@ -10,17 +10,17 @@ Signed-off-by: Thomas Petazzoni <[email protected]> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.org b/Makefile.org -index b7a3f96..8a47840 100644 +index f2c5eff..4d58a9a 100644 --- a/Makefile.org +++ b/Makefile.org -@@ -536,7 +536,7 @@ dist: +@@ -539,7 +539,7 @@ dist: dist_pem_h: (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean) --install: all install_docs install_sw -+install: all install_sw +-install: install_docs install_sw ++install: install_sw - install_sw: + install_dirs: @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ -- 2.1.0
package/openssl/0002-cryptodev-Fix-issue-with-signature-generation.patch +1 -1
@@ -1,4 +1,4 @@ -From 0718df24bd828f26d7d0e8e7f935d8e21f70ebca Mon Sep 17 00:00:00 2001 +From 426288a7c55ddd2ad63a11d8a05defe165448213 Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias <[email protected]> Date: Sat, 16 May 2015 18:55:08 +0200 Subject: [PATCH 2/3] cryptodev: Fix issue with signature generation
package/openssl/0003-Fix-c_rehash.patch +1 -1
@@ -1,4 +1,4 @@ -From e2b290598f513a5bc4d8187cbc53bbc98b7a1e49 Mon Sep 17 00:00:00 2001 +From c52bc9d5e2195427aa322f2607d55211306648f1 Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias <[email protected]> Date: Tue, 27 Jan 2015 18:27:32 -0300 Subject: [PATCH 3/3] Fix c_rehash
package/openssl/openssl.hash +4 -0
@@ -2,3 +2,7 @@ # From https://www.openssl.org/source/openssl-1.0.2a.tar.gz.sha1 md5 a06c547dac9044161a477211049f60ef openssl-1.0.2a.tar.gz sha1 46ecd325b8e587fa491f6bb02ad4a9fb9f382f5f openssl-1.0.2a.tar.gz +sha256 db2dcdb27062923d2818f988787bb802c292053d1d8a5bf032800e658c7bd196 openssl-1.0.2a-parallel-build.patch?revision=1.2 +sha256 147c3eeaad614c044749ea527cb433eae5e2d5cad34a78c6ba61cd967bfbe01f openssl-1.0.2a-parallel-obj-headers.patch?revision=1.1 +sha256 eddd8a5123748052c598214487ac178e4bfa4e31ba2ec520c70d59c8c5bfa2e9 openssl-1.0.2a-parallel-install-dirs.patch?revision=1.1 +sha256 5be3c20d64cadaed7bc4e8e500e8a67faafded7fb326779620fdb29397c44d87 openssl-1.0.2a-parallel-symlinking.patch?revision=1.1
package/openssl/openssl.mk +13 -5
@@ -13,6 +13,14 @@ OPENSSL_DEPENDENCIES = zlib HOST_OPENSSL_DEPENDENCIES = host-zlib OPENSSL_TARGET_ARCH = generic32 OPENSSL_CFLAGS = $(TARGET_CFLAGS) +OPENSSL_GENTOO_PATCHES = \ + build.patch?revision=1.2 \ + obj-headers.patch?revision=1.1 \ + install-dirs.patch?revision=1.1 \ + symlinking.patch?revision=1.1 +OPENSSL_PATCH = \ + $(foreach p,$(OPENSSL_GENTOO_PATCHES),\ + https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-libs/openssl/files/openssl-1.0.2a-parallel-$(p)) ifeq ($(BR2_PACKAGE_OPENSSL_BIN),) define OPENSSL_DISABLE_APPS
@@ -95,23 +103,23 @@ define OPENSSL_CONFIGURE_CMDS endef define HOST_OPENSSL_BUILD_CMDS - $(MAKE1) -C $(@D) + $(MAKE) -C $(@D) endef define OPENSSL_BUILD_CMDS - $(MAKE1) -C $(@D) + $(MAKE) -C $(@D) endef define OPENSSL_INSTALL_STAGING_CMDS - $(MAKE1) -C $(@D) INSTALL_PREFIX=$(STAGING_DIR) install + $(MAKE) -C $(@D) INSTALL_PREFIX=$(STAGING_DIR) install endef define HOST_OPENSSL_INSTALL_CMDS - $(MAKE1) -C $(@D) install + $(MAKE) -C $(@D) install endef define OPENSSL_INSTALL_TARGET_CMDS - $(MAKE1) -C $(@D) INSTALL_PREFIX=$(TARGET_DIR) install + $(MAKE) -C $(@D) INSTALL_PREFIX=$(TARGET_DIR) install rm -rf $(TARGET_DIR)/usr/lib/ssl rm -f $(TARGET_DIR)/usr/bin/c_rehash endef
Signature · 1 line
2.1.0