Skip to contentSkip to conversation

openssl: convert to Makefile.autotools.in and bump version to 0.9.8g

PATCH New Hans-Christian Egtvedt 2 participants 5 messages Aug 12, 2008 – Sep 11, 2008

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 openssl: convert to Makefile.autotools.in and bump version to 0.9.8g

This patch converts building of OpenSSL to use Makefile.autotools.in and bumps the version to 0.9.8g. The patches are updated to reflect this version upgrade. A architecture specific patch for AVR32 is also introduced which optimizes DES and AES by using assembler.

---
I stripped out the rather large AVR32 optimization patch, that patch can be grabbed from
http://www.atmel.no/~hcegtvedt/patches/openssl-0.9.8g-avr32-asm-optimizations.patch.avr32

 package/openssl/Config.in                          |   16 +-
 package/openssl/openssl-0.9.7m.patch.avr32         |   11 -
 ...enssl-0.9.8g-add-avr32-to-configure.patch.avr32 |   12 +
 .../openssl/openssl-0.9.8g-do-not-build-docs.patch |   13 +
 package/openssl/openssl-nodocs.patch               |   13 -
 package/openssl/openssl.mk                         |  124 +-
 package/openssl/openssl.patch                      |  250 -
 8 files changed, 6374 insertions(+), 366 deletions(-)
 delete mode 100644 package/openssl/openssl-0.9.7m.patch.avr32
 create mode 100644 package/openssl/openssl-0.9.8g-add-avr32-to-configure.patch.avr32
 create mode 100644 package/openssl/openssl-0.9.8g-do-not-build-docs.patch
 delete mode 100644 package/openssl/openssl-nodocs.patch
 delete mode 100644 package/openssl/openssl.patch
package/openssl/Config.in +13 -3
index f5a82ad..bc8dc74 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_OPENSSL
 	bool "openssl"
+	select BR2_PACKAGE_ZLIB
 	help
 	  A collaborative effort to develop a robust, commercial-grade, fully 
 	  featured, and Open Source toolkit implementing the Secure Sockets 
@@ -8,8 +9,17 @@ config BR2_PACKAGE_OPENSSL
 
 	  http://www.openssl.org/
 
-config BR2_PACKAGE_OPENSSL_TARGET_HEADERS
-	bool "openssl headers in target"
+config BR2_PACKAGE_OPENSSL_BIN
+	bool "openssl binary"
 	depends on BR2_PACKAGE_OPENSSL
+	default no
 	help
-	  Put openssl headers in the target.
+	  Install the openssl binary to the target file system. This is a
+	  command line tool for doing various crypthographic stuff.
+
+config BR2_PACKAGE_OPENSSL_ENGINES
+	bool "openssl additional engines"
+	depends on BR2_PACKAGE_OPENSSL
+	default no
+	help 
+	  Install additional encryption engine libraries.
package/openssl/openssl-0.9.7m.patch.avr32 deleted +0 -11
deleted file mode 100644
index 20dc1fc..0000000
@@ -1,11 +0,0 @@
-diff -urN openssl-0.9.7m-0rig/Configure openssl-0.9.7m/Configure
---- openssl-0.9.7m-0rig/Configure	2008-07-05 08:59:46.000000000 +0200
-+++ openssl-0.9.7m/Configure	2008-07-05 09:05:10.000000000 +0200
-@@ -396,6 +396,7 @@
- "linux-alpha-ev5","gcc:-DTERMIO -O3 -mcpu=ev5 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
- "linux-arm","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
- "linux-armeb","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"linux-avr32","gcc:-DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
- "linux-freebsd-alpha","gcc:-DTERMIOS -O -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
- "linux-freebsd-i386",  "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::-pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
- "linux-hppa","gcc:-DB_ENDIAN -DTERMIO -O2 -Wall::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
package/openssl/openssl-0.9.8g-add-avr32-to-configure.patch.avr32 new file +12 -0
new file mode 100644
index 0000000..f983aa7
@@ -0,0 +1,12 @@
+Index: openssl-0.9.8g/Configure
+===================================================================
+--- openssl-0.9.8g.orig/Configure	2008-08-08 13:33:59.000000000 +0200
++++ openssl-0.9.8g/Configure	2008-08-08 13:36:29.000000000 +0200
+@@ -322,6 +322,7 @@
+ "linux-ia32-icc",	"icc:-DL_ENDIAN -DTERMIO -O2 -no_cpprt::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ "linux-elf",	"gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ "linux-aout",	"gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -march=i486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
++"linux-avr32",	"avr32-linux-gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG BF_PTR:${avr32_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ ####
+ "linux-generic64","gcc:-DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ "linux-ppc64",	"gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::linux_ppc64.o::::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
package/openssl/openssl-0.9.8g-do-not-build-docs.patch new file +13 -0
new file mode 100644
index 0000000..135a9d3
@@ -0,0 +1,13 @@
+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 \
package/openssl/openssl-nodocs.patch deleted +0 -13
deleted file mode 100644
index 135a9d3..0000000
@@ -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 \
package/openssl/openssl.mk +35 -89

143 lines not on this page · raw message

package/openssl/openssl.patch deleted +0 -250

250 lines not on this page · raw message

Signature · 1 line
1.5.4.3
#1 lore raw

PATCH v2 1/1 openssl: convert to Makefile.autotools.in and bump version to 0.9.8g

Quoted 1 line · Hans-Christian Egtvedt

This patch converts building of OpenSSL to use Makefile.autotools.in and bumps

OpenSSL doesn't use autotools though, so is this a good idea?

Quoted 5 lines

+$(OPENSSL_TARGET_CONFIGURE):

package/openssl/openssl.mk +4 -0
+	(cd $(OPENSSL_DIR); \
+		$(TARGET_CONFIGURE_ARGS) \
+		$(TARGET_CONFIGURE_OPTS) \
+		./Configure \

package/openssl/openssl.mk ifeq ($(OPENSSL_TARGET_ARCH),) · line 45

Quoted 10 lines
package/openssl/openssl.mk +9 -0
+			linux-$(OPENSSL_TARGET_ARCH) \
+			--prefix=/usr \
+			--openssldir=/usr/lib/ssl \
+			threads \
+			shared \
+			no-idea \
+			no-mdc2 \
+			no-rc5 \
+			zlib-dynamic \
 	)

Once you've overriden the CONFIGURE stage, is there much benefit left in using Makefile.autotools.in?

cheers
Hamish

Signature · 1 line
Hamish Moffatt VK3SB <[email protected]> <[email protected]>
#2 lore raw

PATCH v2 1/1 openssl: convert to Makefile.autotools.in and bump version to 0.9.8g

Quoted 15 lines · Hamish Moffatt
Quoted 1 line · Hans-Christian Egtvedt

This patch converts building of OpenSSL to use Makefile.autotools.in and bumps

OpenSSL doesn't use autotools though, so is this a good idea?

Quoted 10 lines

+$(OPENSSL_TARGET_CONFIGURE):

package/openssl/openssl.mk +9 -0
+	(cd $(OPENSSL_DIR); \
+		$(TARGET_CONFIGURE_ARGS) \
+		$(TARGET_CONFIGURE_OPTS) \
+		./Configure \
+			linux-$(OPENSSL_TARGET_ARCH) \
+			--prefix=/usr \
+			--openssldir=/usr/lib/ssl \
+			threads \
+			shared \
Quoted 9 lines

package/openssl/openssl.mk ifeq ($(OPENSSL_TARGET_ARCH),) · line 45

Quoted 5 lines
package/openssl/openssl.mk +4 -0
+			no-idea \
+			no-mdc2 \
+			no-rc5 \
+			zlib-dynamic \
 	)

Once you've overriden the CONFIGURE stage, is there much benefit left in using Makefile.autotools.in?

The Makefile is smaller now, and IMHO easier to read.

Installation of man pages, info pages and header/development works better now.

I though the autotools was not purely for autotools stuff, but a way to make every package simpler to read and install in a more general way?

Signature · 2 lines
With kind regards,
Hans-Christian Egtvedt, Applications Engineer
#3 lore raw

PATCH v2 1/1 openssl: convert to Makefile.autotools.in and bump version to 0.9.8g

Quoted 8 lines · On Wed, 13 Aug 2008 07:39:18 +0200 Hans-Christian Egtvedt…
Quoted 7 lines · Hamish Moffatt
Quoted 2 lines · Hans-Christian Egtvedt

This patch converts building of OpenSSL to use
Makefile.autotools.in and bumps

OpenSSL doesn't use autotools though, so is this a good idea?

<snipp override of configure rule>

Quoted 4 lines
Quoted 3 lines

Once you've overriden the CONFIGURE stage, is there much benefit left in using Makefile.autotools.in?

Quoted 9 lines

The Makefile is smaller now, and IMHO easier to read.

Installation of man pages, info pages and header/development works better now.

I though the autotools was not purely for autotools stuff, but a way to make every package simpler to read and install in a more general way?

No other comments for using Makefile.autotools.in for not autotools packages? I still find Makefile.autotools.in much smoother than the old style package.mk. To generalize packages must be a win-win?

Signature · 2 lines
Best regards,
Hans-Christian Egtvedt
#4 lore raw

PATCH v2 1/1 openssl: convert to Makefile.autotools.in and bump version to 0.9.8g

Quoted 9 lines · Hans-Christian Egtvedt
Quoted 3 lines · On Wed, 13 Aug 2008 07:39:18 +0200 Hans-Christian Egtvedt…

I though the autotools was not purely for autotools stuff, but a way to make every package simpler to read and install in a more general way?

No other comments for using Makefile.autotools.in for not autotools packages? I still find Makefile.autotools.in much smoother than the old style package.mk. To generalize packages must be a win-win?

I guess if it works then it's ok to use it for now. If it breaks in the future we can fix it then. I suppose the OpenSSL developers have deliberately chosen to mimic the autoconf configure interface given how well known it is, so it fits Makefile.autotools.in too.

Hamish

Signature · 1 line
Hamish Moffatt VK3SB <[email protected]> <[email protected]>