Skip to contentSkip to conversation

openssl: create package for openssl configuration file

PATCH In review [email protected] 3 participants 5 messages Oct 28, 2013 – Oct 30, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openssl: create package for openssl configuration file

From: Qiang Chen <[email protected]>

* 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)

---
 meta/recipes-connectivity/openssl/openssl.inc |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
meta/recipes-connectivity/openssl/openssl.inc +10 -2
index 78ff7ae..f4b786a 100644
@@ -33,13 +33,21 @@ export AS = "${CC} -c"
 
 inherit pkgconfig siteinfo multilib_header
 
-PACKAGES =+ "libcrypto libssl ${PN}-misc"
+PACKAGES =+ "libcrypto libssl ${PN}-misc openssl-conf"
 FILES_libcrypto = "${base_libdir}/libcrypto${SOLIBS}"
 FILES_libssl = "${libdir}/libssl.so.*"
 FILES_${PN} =+ " ${libdir}/ssl/*"
-FILES_${PN}-misc = "${libdir}/ssl/misc ${libdir}/ssl/openssl.cnf"
+FILES_${PN}-misc = "${libdir}/ssl/misc"
 FILES_${PN}-dev += "${base_libdir}/libcrypto${SOLIBSDEV}"
 
+# 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
 }
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 31 lines · On 10/27/2013 10:15 PM, [email protected] wrote:

From: Qiang Chen <[email protected]>

* 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)

---
  meta/recipes-connectivity/openssl/openssl.inc |   12 ++++++++++--
  1 file changed, 10 insertions(+), 2 deletions(-)
meta/recipes-connectivity/openssl/openssl.inc +0 -0
index 78ff7ae..f4b786a 100644

meta/recipes-connectivity/openssl/openssl.inc export AS = "${CC} -c" · line 36

Quoted 5 lines
meta/recipes-connectivity/openssl/openssl.inc +1 -1
@@ -33,13 +33,21 @@ export AS = "${CC} -c"
 
  inherit pkgconfig siteinfo multilib_header
 
-PACKAGES =+ "libcrypto libssl ${PN}-misc"
+PACKAGES =+ "libcrypto libssl ${PN}-misc openssl-conf"

How about ${BPN}-conf here instead?

Quoted 5 lines
meta/recipes-connectivity/openssl/openssl.inc +1 -1
  FILES_libcrypto = "${base_libdir}/libcrypto${SOLIBS}"
  FILES_libssl = "${libdir}/libssl.so.*"
  FILES_${PN} =+ " ${libdir}/ssl/*"
-FILES_${PN}-misc = "${libdir}/ssl/misc ${libdir}/ssl/openssl.cnf"
+FILES_${PN}-misc = "${libdir}/ssl/misc"

meta/recipes-connectivity/openssl/openssl.inc export AS = "${CC} -c" · line 50

Quoted 10 lines
meta/recipes-connectivity/openssl/openssl.inc +8 -0
  FILES_${PN}-dev += "${base_libdir}/libcrypto${SOLIBSDEV}"
 
+# 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"
+

Same here, please use ${BPN} instead of openssl for the package construction.

This actually points out an inssue with alot of other packages that use ${PN} for CONFFILES and packages that contain config files when setup on a multilib system. I will be filing a general bug against this and watching for patches.

Thanks
Sau!

Quoted 4 lines
meta/recipes-connectivity/openssl/openssl.inc +0 -0
  do_configure_prepend_darwin () {
  	sed -i -e '/version-script=openssl\.ld/d' Configure
  }
#2 lore raw
Quoted 38 lines · On Tuesday 29 October 2013 08:36:49 Saul Wold wrote:
Quoted 37 lines · On 10/27/2013 10:15 PM, [email protected] wrote:

From: Qiang Chen <[email protected]>

* 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)

---

  meta/recipes-connectivity/openssl/openssl.inc |   12 ++++++++++--
  1 file changed, 10 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/meta/recipes-connectivity/openssl/openssl.inc index 78ff7ae..f4b786a 100644

meta/recipes-connectivity/openssl/openssl.inc +0 -0
@@ -33,13 +33,21 @@ export AS = "${CC} -c"
 
Quoted 6 lines

meta/recipes-connectivity/openssl/openssl.inc export AS = "${CC} -c" · line 36

Quoted 4 lines
meta/recipes-connectivity/openssl/openssl.inc +1 -1
  inherit pkgconfig siteinfo multilib_header
 
-PACKAGES =+ "libcrypto libssl ${PN}-misc"
+PACKAGES =+ "libcrypto libssl ${PN}-misc openssl-conf"

How about ${BPN}-conf here instead?

Does this work when two multilib variants produce the same package name? I suspect you'll get warnings.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
author
#3 lore raw
Quoted 39 lines · Paul Eggleton
Quoted 38 lines · On Tuesday 29 October 2013 08:36:49 Saul Wold wrote:
Quoted 37 lines · On 10/27/2013 10:15 PM, [email protected] wrote:

From: Qiang Chen <[email protected]>

* 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)

---

   meta/recipes-connectivity/openssl/openssl.inc |   12 ++++++++++--
   1 file changed, 10 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/meta/recipes-connectivity/openssl/openssl.inc index 78ff7ae..f4b786a 100644

meta/recipes-connectivity/openssl/openssl.inc +0 -0
@@ -33,13 +33,21 @@ export AS = "${CC} -c"
 
Quoted 7 lines
Quoted 5 lines

meta/recipes-connectivity/openssl/openssl.inc export AS = "${CC} -c" · line 36

Quoted 4 lines
meta/recipes-connectivity/openssl/openssl.inc +1 -1
   inherit pkgconfig siteinfo multilib_header
 
-PACKAGES =+ "libcrypto libssl ${PN}-misc"
+PACKAGES =+ "libcrypto libssl ${PN}-misc openssl-conf"

How about ${BPN}-conf here instead?

Does this work when two multilib variants produce the same package name? I suspect you'll get warnings.

Hi Paul,

I will verify this problem before I send V2 patch.

Thanks.
Qiang

Quoted 5 lines

Cheers,
Paul

author
#4 lore raw
In reply to Saul Wold
Quoted 42 lines · Saul Wold
Quoted 25 lines · On 10/27/2013 10:15 PM, [email protected] wrote:

From: Qiang Chen <[email protected]>
* 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)

---
   meta/recipes-connectivity/openssl/openssl.inc |   12 ++++++++++--
   1 file changed, 10 insertions(+), 2 deletions(-)
meta/recipes-connectivity/openssl/openssl.inc +0 -0
index 78ff7ae..f4b786a 100644

meta/recipes-connectivity/openssl/openssl.inc export AS = "${CC} -c" · line 34

Quoted 3 lines
meta/recipes-connectivity/openssl/openssl.inc +1 -1
@@ -33,13 +33,21 @@ export AS = "${CC} -c"
   inherit pkgconfig siteinfo multilib_header
-PACKAGES =+ "libcrypto libssl ${PN}-misc"
+PACKAGES =+ "libcrypto libssl ${PN}-misc openssl-conf"

How about ${BPN}-conf here instead?

Quoted 12 lines
meta/recipes-connectivity/openssl/openssl.inc +7 -1
   FILES_libcrypto = "${base_libdir}/libcrypto${SOLIBS}"
   FILES_libssl = "${libdir}/libssl.so.*"
   FILES_${PN} =+ " ${libdir}/ssl/*"
-FILES_${PN}-misc = "${libdir}/ssl/misc ${libdir}/ssl/openssl.cnf"
+FILES_${PN}-misc = "${libdir}/ssl/misc"
   FILES_${PN}-dev += "${base_libdir}/libcrypto${SOLIBSDEV}"
+# 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"
Quoted 8 lines

meta/recipes-connectivity/openssl/openssl.inc export AS = "${CC} -c" · line 50

Quoted 2 lines
meta/recipes-connectivity/openssl/openssl.inc +2 -0
+RRECOMMENDS_libcrypto += "openssl-conf"
+

Same here, please use ${BPN} instead of openssl for the package construction.
This actually points out an inssue with alot of other packages that use ${PN} for CONFFILES and packages that contain config files when setup on a multilib system. I will be filing a general bug against this and watching for patches.

Hi Saul,

Thanks for your reminder! I will send V2 patch after verification according to your suggestion.

Thanks.
Qiang

Quoted 6 lines

Thanks
Sau!

Quoted 3 lines
meta/recipes-connectivity/openssl/openssl.inc +0 -0
   do_configure_prepend_darwin () {
       sed -i -e '/version-script=openssl\.ld/d' Configure
   }