Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] openssl: create package for openssl configuration file
@ 2013-10-28  5:15 qiang.chen
  2013-10-29 15:36 ` Saul Wold
  0 siblings, 1 reply; 5+ messages in thread
From: qiang.chen @ 2013-10-28  5:15 UTC (permalink / raw)
  To: openembedded-core

From: Qiang Chen <qiang.chen@windriver.com>

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

Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
Signed-off-by: Qiang Chen <qiang.chen@windriver.com>
---
 meta/recipes-connectivity/openssl/openssl.inc |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc
index 78ff7ae..f4b786a 100644
--- a/meta/recipes-connectivity/openssl/openssl.inc
+++ b/meta/recipes-connectivity/openssl/openssl.inc
@@ -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
 }
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] openssl: create package for openssl configuration file
  2013-10-28  5:15 [PATCH] openssl: create package for openssl configuration file qiang.chen
@ 2013-10-29 15:36 ` Saul Wold
  2013-10-29 16:03   ` Paul Eggleton
  2013-10-30  9:33   ` Qiang Chen
  0 siblings, 2 replies; 5+ messages in thread
From: Saul Wold @ 2013-10-29 15:36 UTC (permalink / raw)
  To: qiang.chen, openembedded-core

On 10/27/2013 10:15 PM, qiang.chen@windriver.com wrote:
> From: Qiang Chen <qiang.chen@windriver.com>
>
> * 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)
>
> Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
> Signed-off-by: Qiang Chen <qiang.chen@windriver.com>
> ---
>   meta/recipes-connectivity/openssl/openssl.inc |   12 ++++++++++--
>   1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc
> index 78ff7ae..f4b786a 100644
> --- a/meta/recipes-connectivity/openssl/openssl.inc
> +++ b/meta/recipes-connectivity/openssl/openssl.inc
> @@ -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?

>   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"
> +
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!
>   do_configure_prepend_darwin () {
>   	sed -i -e '/version-script=openssl\.ld/d' Configure
>   }
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] openssl: create package for openssl configuration file
  2013-10-29 15:36 ` Saul Wold
@ 2013-10-29 16:03   ` Paul Eggleton
  2013-10-30  9:35     ` Qiang Chen
  2013-10-30  9:33   ` Qiang Chen
  1 sibling, 1 reply; 5+ messages in thread
From: Paul Eggleton @ 2013-10-29 16:03 UTC (permalink / raw)
  To: Saul Wold; +Cc: openembedded-core

On Tuesday 29 October 2013 08:36:49 Saul Wold wrote:
> On 10/27/2013 10:15 PM, qiang.chen@windriver.com wrote:
> > From: Qiang Chen <qiang.chen@windriver.com>
> > 
> > * 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)
> > 
> > Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
> > Signed-off-by: Qiang Chen <qiang.chen@windriver.com>
> > ---
> > 
> >   meta/recipes-connectivity/openssl/openssl.inc |   12 ++++++++++--
> >   1 file changed, 10 insertions(+), 2 deletions(-)
> > 
> > diff --git a/meta/recipes-connectivity/openssl/openssl.inc
> > b/meta/recipes-connectivity/openssl/openssl.inc index 78ff7ae..f4b786a
> > 100644
> > --- a/meta/recipes-connectivity/openssl/openssl.inc
> > +++ b/meta/recipes-connectivity/openssl/openssl.inc
> > @@ -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?

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

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] openssl: create package for openssl configuration file
  2013-10-29 15:36 ` Saul Wold
  2013-10-29 16:03   ` Paul Eggleton
@ 2013-10-30  9:33   ` Qiang Chen
  1 sibling, 0 replies; 5+ messages in thread
From: Qiang Chen @ 2013-10-30  9:33 UTC (permalink / raw)
  To: Saul Wold; +Cc: openembedded-core

On 10/29/2013 11:36 PM, Saul Wold wrote:

> On 10/27/2013 10:15 PM, qiang.chen@windriver.com wrote:
>> From: Qiang Chen <qiang.chen@windriver.com>
>> * 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)
>> Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
>> Signed-off-by: Qiang Chen <qiang.chen@windriver.com>
>> ---
>>    meta/recipes-connectivity/openssl/openssl.inc |   12 ++++++++++--
>>    1 file changed, 10 insertions(+), 2 deletions(-)
>> diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc
>> index 78ff7ae..f4b786a 100644
>> --- a/meta/recipes-connectivity/openssl/openssl.inc
>> +++ b/meta/recipes-connectivity/openssl/openssl.inc
>> @@ -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?
>>    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"
>> +
> 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

> Thanks
>      Sau!
>>    do_configure_prepend_darwin () {
>>        sed -i -e '/version-script=openssl\.ld/d' Configure
>>    }
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] openssl: create package for openssl configuration file
  2013-10-29 16:03   ` Paul Eggleton
@ 2013-10-30  9:35     ` Qiang Chen
  0 siblings, 0 replies; 5+ messages in thread
From: Qiang Chen @ 2013-10-30  9:35 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

On 10/30/2013 12:03 AM, Paul Eggleton wrote:

> On Tuesday 29 October 2013 08:36:49 Saul Wold wrote:
>> On 10/27/2013 10:15 PM, qiang.chen@windriver.com wrote:
>>> From: Qiang Chen <qiang.chen@windriver.com>
>>>
>>> * 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)
>>>
>>> Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
>>> Signed-off-by: Qiang Chen <qiang.chen@windriver.com>
>>> ---
>>>
>>>    meta/recipes-connectivity/openssl/openssl.inc |   12 ++++++++++--
>>>    1 file changed, 10 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/meta/recipes-connectivity/openssl/openssl.inc
>>> b/meta/recipes-connectivity/openssl/openssl.inc index 78ff7ae..f4b786a
>>> 100644
>>> --- a/meta/recipes-connectivity/openssl/openssl.inc
>>> +++ b/meta/recipes-connectivity/openssl/openssl.inc
>>> @@ -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?
> 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

>
> Cheers,
> Paul
>
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-10-30  9:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-28  5:15 [PATCH] openssl: create package for openssl configuration file qiang.chen
2013-10-29 15:36 ` Saul Wold
2013-10-29 16:03   ` Paul Eggleton
2013-10-30  9:35     ` Qiang Chen
2013-10-30  9:33   ` Qiang Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox