openssl: create package for openssl configuration file

Submitted by chase maupin on Dec. 16, 2010, 5:31 p.m.

Details

Message ID 1292520711-25044-1-git-send-email-Chase.Maupin@ti.com
State Accepted
Headers show

Commit Message

chase maupin Dec. 16, 2010, 5:31 p.m.
* Add the openssl-conf package to the list of packages to
  be created.  This package contains the openssl.cnf file
  which is used by both the openssl executable in the
  openssl package and the libcrypto library.
* This is to avoid messages like:
    WARNING: can't open config file: /usr/lib/ssl/openssl.cnf
* When running "openssl req" to request and generate a certificate
  the command will fail without the openssl.cnf file being
  installed on the target system.
* Made this package an RRECOMMENDS for libcrypto since:
    * libcrypto is a RDEPENDS for the openssl package
    * Users can specify a configuration file at another
      location so it is not stricly required and many
      commands will work without it (with warnings)
* Bumped the PR

Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
---
 recipes/openssl/openssl.inc |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/recipes/openssl/openssl.inc b/recipes/openssl/openssl.inc
index 95572e1..5ef322c 100644
--- a/recipes/openssl/openssl.inc
+++ b/recipes/openssl/openssl.inc
@@ -8,7 +8,7 @@  S = "${WORKDIR}/openssl-${PV}"
 
 inherit siteinfo
 
-INC_PR = "r13"
+INC_PR = "r14"
 
 AR_append = " r"
 CFLAG = "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \
@@ -22,10 +22,18 @@  export DIRS = "crypto ssl apps"
 export EX_LIBS = "-lgcc -ldl"
 export AS = "${CC} -c"
 
-PACKAGES =+ "libcrypto libssl ${PN}-misc"
+PACKAGES =+ "libcrypto libssl ${PN}-misc openssl-conf"
 FILES_libcrypto = "${libdir}/libcrypto.so.*"
 FILES_libssl = "${libdir}/libssl.so.*"
-FILES_${PN}-misc = "${libdir}/ssl/misc ${libdir}/ssl/openssl.cnf"
+FILES_${PN}-misc = "${libdir}/ssl/misc"
+
+# Add the openssl.cnf file to the openssl-conf package.  Make the libcrypto
+# package RRECOMMENDS on this package.  This will enable the configuration
+# file to be installed for both the base openssl package and the libcrypto
+# package since the base openssl package depends on the libcrypto package.
+FILES_openssl-conf = "${libdir}/ssl/openssl.cnf"
+CONFFILES_openssl-conf = "${libdir}/ssl/openssl.cnf"
+RRECOMMENDS_libcrypto += "openssl-conf"
 
 do_configure_prepend_darwin () {
 	sed -i -e '/version-script=openssl\.ld/d' Configure

Comments

Roman Khimov Dec. 18, 2010, 7:21 a.m.
? ????????? ?? ??????? 16 ??????? 2010 20:31:51 ????? Chase Maupin ???????:
> * Add the openssl-conf package to the list of packages to
>   be created.  This package contains the openssl.cnf file
>   which is used by both the openssl executable in the
>   openssl package and the libcrypto library.
> * This is to avoid messages like:
>     WARNING: can't open config file: /usr/lib/ssl/openssl.cnf
> * When running "openssl req" to request and generate a certificate
>   the command will fail without the openssl.cnf file being
>   installed on the target system.
> * Made this package an RRECOMMENDS for libcrypto since:
>     * libcrypto is a RDEPENDS for the openssl package
>     * Users can specify a configuration file at another
>       location so it is not stricly required and many
>       commands will work without it (with warnings)
> * Bumped the PR
> 
> Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>

Acked-by: Roman I Khimov <khimov@altell.ru>