I use this patch to make an assembly of packages which
use openssl without care for the version installed by
the linux distro that I'm using. In this case, I'm
installing openssl in /opt/assembly. After patching,
I configure openssl as such
./Configure --prefix=/opt/assembly shared
linux-elf-rpath
After installation, my downstream packages pick up the
correct compiler options as such
$ pkg-config --libs
/opt/assmebly/lib/pkgconfig/openssl.pc
-Wl,-R/opt/assembly/lib -L/opt/etrade/lib -lssl
-lcrypto -ldl
Without this patch, downstream packages typically pull
in the OS provided openssl and weird things start
happening.
I'd be interested in your thoughts on this approach.
Thanks,
Lee Thompson
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com diff -Nru openssl-0.9.8.orig/Configure openssl-0.9.8/Configure
--- openssl-0.9.8.orig/Configure 2006-01-11 20:40:01.000000000 -0600
+++ openssl-0.9.8/Configure 2006-01-12 20:09:48.000000000 -0600
@@ -318,6 +318,7 @@
#### IA-32 targets...
"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-elf-rpath", "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:-Wl,-R/opt/assembly/lib:.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-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)",
diff -Nru openssl-0.9.8.orig/Makefile.org openssl-0.9.8/Makefile.org
--- openssl-0.9.8.orig/Makefile.org 2006-01-11 20:40:01.000000000 -0600
+++ openssl-0.9.8/Makefile.org 2006-01-12 19:17:06.000000000 -0600
@@ -287,7 +287,7 @@
echo 'Description: OpenSSL cryptography library'; \
echo 'Version: '$(VERSION); \
echo 'Requires: '; \
- echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
+ echo 'Libs: $(SHARED_LDFLAGS) -L$${libdir} -lcrypto $(EX_LIBS)'; \
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
libssl.pc: Makefile
@@ -300,7 +300,7 @@
echo 'Description: Secure Sockets Layer and cryptography libraries'; \
echo 'Version: '$(VERSION); \
echo 'Requires: '; \
- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
+ echo 'Libs: $(SHARED_LDFLAGS) -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
openssl.pc: Makefile
@@ -313,7 +313,7 @@
echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
echo 'Version: '$(VERSION); \
echo 'Requires: '; \
- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
+ echo 'Libs: $(SHARED_LDFLAGS) -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
Makefile: Makefile.org Configure config