[edk2-devel] [PATCH 2/3] CryptoPkg/OpensslLib: improve INF file consistency

Laszlo Ersek posted 3 patches 6 years, 2 months ago
[edk2-devel] [PATCH 2/3] CryptoPkg/OpensslLib: improve INF file consistency
Posted by Laszlo Ersek 6 years, 2 months ago
When diffing "OpensslLib.inf" against "OpensslLibCrypto.inf", the *only*
differences should be:

- BASE_NAME, MODULE_UNI_FILE, and FILE_GUID are expected to differ, in
  [Defines];

- "OpensslLib.inf" is expected to list "$(OPENSSL_PATH)/ssl/..." source
  files in the auto-generated part of the [Sources] section.

Commit 8906f076de35 ("CryptoPkg/OpensslLib: Add missing header files in
INF file", 2019-08-16) broke that invariant, by adding "buildinf.h" and
"rand_pool_noise.h" in different order to both INF files.

Fix that order in "OpensslLib.inf" now. (Note that this does not
re-establish full consistency between both INF files -- it just highlights
another problem, which we'll fix in the next patch.)

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Shenglei Zhang <shenglei.zhang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Fixes: 8906f076de35b222a7d62bcf6ed1a4a2498a5791
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---

Notes:
    Targeting edk2-stable201911.

 CryptoPkg/Library/OpensslLib/OpensslLib.inf | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
index 44e050f08d46..58202f83118d 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf
+++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
@@ -22,8 +22,6 @@ [Defines]
 #
 
 [Sources]
-  buildinf.h
-  rand_pool_noise.h
   $(OPENSSL_PATH)/e_os.h
 # Autogenerated files list starts here
   $(OPENSSL_PATH)/crypto/aes/aes_cbc.c
@@ -598,7 +596,8 @@ [Sources]
   $(OPENSSL_PATH)/ssl/record/record.h
   $(OPENSSL_PATH)/ssl/record/record_locl.h
 # Autogenerated files list ends here
-
+  buildinf.h
+  rand_pool_noise.h
   ossl_store.c
   rand_pool.c
 
-- 
2.19.1.3.g30247aa5d201



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#51028): https://edk2.groups.io/g/devel/message/51028
Mute This Topic: https://groups.io/mt/61075473/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 2/3] CryptoPkg/OpensslLib: improve INF file consistency
Posted by Wang, Jian J 6 years, 2 months ago
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>

Regards,
Jian

> -----Original Message-----
> From: Laszlo Ersek <lersek@redhat.com>
> Sent: Thursday, November 21, 2019 5:39 PM
> To: edk2-devel-groups-io <devel@edk2.groups.io>
> Cc: Wang, Jian J <jian.j.wang@intel.com>; Leif Lindholm
> <leif.lindholm@linaro.org>; Zhang, Shenglei <shenglei.zhang@intel.com>; Lu,
> XiaoyuX <xiaoyux.lu@intel.com>
> Subject: [PATCH 2/3] CryptoPkg/OpensslLib: improve INF file consistency
> 
> When diffing "OpensslLib.inf" against "OpensslLibCrypto.inf", the *only*
> differences should be:
> 
> - BASE_NAME, MODULE_UNI_FILE, and FILE_GUID are expected to differ, in
>   [Defines];
> 
> - "OpensslLib.inf" is expected to list "$(OPENSSL_PATH)/ssl/..." source
>   files in the auto-generated part of the [Sources] section.
> 
> Commit 8906f076de35 ("CryptoPkg/OpensslLib: Add missing header files in
> INF file", 2019-08-16) broke that invariant, by adding "buildinf.h" and
> "rand_pool_noise.h" in different order to both INF files.
> 
> Fix that order in "OpensslLib.inf" now. (Note that this does not
> re-establish full consistency between both INF files -- it just highlights
> another problem, which we'll fix in the next patch.)
> 
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Leif Lindholm <leif.lindholm@linaro.org>
> Cc: Shenglei Zhang <shenglei.zhang@intel.com>
> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> Fixes: 8906f076de35b222a7d62bcf6ed1a4a2498a5791
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
> 
> Notes:
>     Targeting edk2-stable201911.
> 
>  CryptoPkg/Library/OpensslLib/OpensslLib.inf | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf
> b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
> index 44e050f08d46..58202f83118d 100644
> --- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf
> +++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
> @@ -22,8 +22,6 @@ [Defines]
>  #
> 
>  [Sources]
> -  buildinf.h
> -  rand_pool_noise.h
>    $(OPENSSL_PATH)/e_os.h
>  # Autogenerated files list starts here
>    $(OPENSSL_PATH)/crypto/aes/aes_cbc.c
> @@ -598,7 +596,8 @@ [Sources]
>    $(OPENSSL_PATH)/ssl/record/record.h
>    $(OPENSSL_PATH)/ssl/record/record_locl.h
>  # Autogenerated files list ends here
> -
> +  buildinf.h
> +  rand_pool_noise.h
>    ossl_store.c
>    rand_pool.c
> 
> --
> 2.19.1.3.g30247aa5d201
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#51065): https://edk2.groups.io/g/devel/message/51065
Mute This Topic: https://groups.io/mt/61075473/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 2/3] CryptoPkg/OpensslLib: improve INF file consistency
Posted by Philippe Mathieu-Daudé 6 years, 2 months ago
On 11/21/19 10:38 AM, Laszlo Ersek via Groups.Io wrote:
> When diffing "OpensslLib.inf" against "OpensslLibCrypto.inf", the *only*
> differences should be:
> 
> - BASE_NAME, MODULE_UNI_FILE, and FILE_GUID are expected to differ, in
>    [Defines];
> 
> - "OpensslLib.inf" is expected to list "$(OPENSSL_PATH)/ssl/..." source
>    files in the auto-generated part of the [Sources] section.
> 
> Commit 8906f076de35 ("CryptoPkg/OpensslLib: Add missing header files in
> INF file", 2019-08-16) broke that invariant, by adding "buildinf.h" and
> "rand_pool_noise.h" in different order to both INF files.
> 
> Fix that order in "OpensslLib.inf" now. (Note that this does not
> re-establish full consistency between both INF files -- it just highlights
> another problem, which we'll fix in the next patch.)
> 
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Leif Lindholm <leif.lindholm@linaro.org>
> Cc: Shenglei Zhang <shenglei.zhang@intel.com>
> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> Fixes: 8906f076de35b222a7d62bcf6ed1a4a2498a5791
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
> 
> Notes:
>      Targeting edk2-stable201911.
> 
>   CryptoPkg/Library/OpensslLib/OpensslLib.inf | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
> index 44e050f08d46..58202f83118d 100644
> --- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf
> +++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
> @@ -22,8 +22,6 @@ [Defines]
>   #
>   
>   [Sources]
> -  buildinf.h
> -  rand_pool_noise.h
>     $(OPENSSL_PATH)/e_os.h
>   # Autogenerated files list starts here
>     $(OPENSSL_PATH)/crypto/aes/aes_cbc.c
> @@ -598,7 +596,8 @@ [Sources]
>     $(OPENSSL_PATH)/ssl/record/record.h
>     $(OPENSSL_PATH)/ssl/record/record_locl.h
>   # Autogenerated files list ends here
> -
> +  buildinf.h
> +  rand_pool_noise.h
>     ossl_store.c
>     rand_pool.c
>   
> 

Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
(safe for edk2-stable201911 IMHO)


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#51079): https://edk2.groups.io/g/devel/message/51079
Mute This Topic: https://groups.io/mt/61075473/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-