Skip to contentSkip to conversation

mbedtls: separate general .inc and version-specific recipe

PATCH In review Roman Alyautdin 2 participants 4 messages Sep 23, 2016 – Sep 28, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mbedtls: separate general .inc and version-specific recipe

The patch proposes to separate general part of mbedtls recipe into .inc and introduces mbedtls_1.3.10.bb that requires mbedtls.inc. This will help to add another versions without duplication of general stuff

---
 .../recipes-connectivity/mbedtls/mbedtls.inc       |   35 ++++++++++++++++++++
 .../recipes-connectivity/mbedtls/mbedtls_1.3.10.bb |   35 +-------------------
 2 files changed, 36 insertions(+), 34 deletions(-)
 create mode 100644 meta-networking/recipes-connectivity/mbedtls/mbedtls.inc
meta-networking/recipes-connectivity/mbedtls/mbedtls.inc new file +35 -0
new file mode 100644
index 0000000..8bb6855
@@ -0,0 +1,35 @@
+SUMMARY = "Lightweight crypto and SSL/TLS library"
+DESCRIPTION = "mbedtls is a lean open source crypto library          \
+for providing SSL and TLS support in your programs. It offers        \
+an intuitive API and documented header files, so you can actually    \
+understand what the code does. It features:                          \
+                                                                     \
+ - Symmetric algorithms, like AES, Blowfish, Triple-DES, DES, ARC4,  \
+   Camellia and XTEA                                                 \
+ - Hash algorithms, like SHA-1, SHA-2, RIPEMD-160 and MD5            \
+ - Entropy pool and random generators, like CTR-DRBG and HMAC-DRBG   \
+ - Public key algorithms, like RSA, Elliptic Curves, Diffie-Hellman, \
+   ECDSA and ECDH                                                    \
+ - SSL v3 and TLS 1.0, 1.1 and 1.2                                   \
+ - Abstraction layers for ciphers, hashes, public key operations,    \
+   platform abstraction and threading                                \
+"
+
+HOMEPAGE = "https://polarssl.org"
+BUGTRACKER = "https://github.com/polarssl/polarssl/issues"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
+
+SECTION = "libdevel"
+
+SRC_URI = "https://tls.mbed.org/download/mbedtls-${PV}-gpl.tgz"
+
+
+DEPENDS = "openssl"
+RDEPENDS_${PN} += "libcrypto"
+PROVIDES += "polarssl"
+RPROVIDES_${PN} = "polarssl"
+EXTRA_OECMAKE = "-DUSE_SHARED_POLARSSL_LIBRARY=on -DLIB_INSTALL_DIR=${baselib}"
+
+inherit cmake
meta-networking/recipes-connectivity/mbedtls/mbedtls_1.3.10.bb +1 -34
index d5c7afe..3f1c1fe 100644
@@ -1,37 +1,4 @@
-SUMMARY = "Lightweight crypto and SSL/TLS library"
-DESCRIPTION = "mbedtls is a lean open source crypto library          \
-for providing SSL and TLS support in your programs. It offers        \
-an intuitive API and documented header files, so you can actually    \
-understand what the code does. It features:                          \
-                                                                     \
- - Symmetric algorithms, like AES, Blowfish, Triple-DES, DES, ARC4,  \
-   Camellia and XTEA                                                 \
- - Hash algorithms, like SHA-1, SHA-2, RIPEMD-160 and MD5            \
- - Entropy pool and random generators, like CTR-DRBG and HMAC-DRBG   \
- - Public key algorithms, like RSA, Elliptic Curves, Diffie-Hellman, \
-   ECDSA and ECDH                                                    \
- - SSL v3 and TLS 1.0, 1.1 and 1.2                                   \
- - Abstraction layers for ciphers, hashes, public key operations,    \
-   platform abstraction and threading                                \
-"
-
-HOMEPAGE = "https://polarssl.org"
-BUGTRACKER = "https://github.com/polarssl/polarssl/issues"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
-
-SECTION = "libdevel"
-
-SRC_URI = "https://tls.mbed.org/download/mbedtls-${PV}-gpl.tgz"
+require mbedtls.inc
 
 SRC_URI[md5sum] = "19ebbc96feceb430ad958dfe89cb633f"
 SRC_URI[sha256sum] = "746fd88e0c6623691fc56c4eed52e40a57b2da0ac80f6dd8995094aa6adb407e"
-
-DEPENDS = "openssl"
-RDEPENDS_${PN} += "libcrypto"
-PROVIDES += "polarssl"
-RPROVIDES_${PN} = "polarssl"
-EXTRA_OECMAKE = "-DUSE_SHARED_POLARSSL_LIBRARY=on -DLIB_INSTALL_DIR=${baselib}"
-
-inherit cmake
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 5 lines · Roman Alyautdin

The patch proposes to separate general part of mbedtls recipe into .inc and introduces mbedtls_1.3.10.bb that requires mbedtls.inc. This will help to add another versions without duplication of general stuff

I don't know why it was sent 4 times, but there is upgrade to 1.3.17 already in master-next:

OE @ ~/meta-openembedded $ git log --pretty=fuller meta-networking/recipes-connectivity/mbedtls/ commit c5af6e71907714821c0edfb23085f0a700b1118d

Author:     Wenzong Fan <[email protected]>
AuthorDate: Wed Sep 14 01:49:13 2016 -0400
Commit:     Martin Jansa <[email protected]>
CommitDate: Mon Sep 26 08:29:34 2016 +0200
    mbedtls: upgrade to 1.3.17

Which version do you need that it requires adding .inc instead of adding such version to meta-networking?

Quoted 98 lines
---
 .../recipes-connectivity/mbedtls/mbedtls.inc       |   35 ++++++++++++++++++++
 .../recipes-connectivity/mbedtls/mbedtls_1.3.10.bb |   35 +-------------------
 2 files changed, 36 insertions(+), 34 deletions(-)
 create mode 100644 meta-networking/recipes-connectivity/mbedtls/mbedtls.inc
meta-networking/recipes-connectivity/mbedtls/mbedtls.inc new file +35 -0
new file mode 100644
index 0000000..8bb6855
@@ -0,0 +1,35 @@
+SUMMARY = "Lightweight crypto and SSL/TLS library"
+DESCRIPTION = "mbedtls is a lean open source crypto library          \
+for providing SSL and TLS support in your programs. It offers        \
+an intuitive API and documented header files, so you can actually    \
+understand what the code does. It features:                          \
+                                                                     \
+ - Symmetric algorithms, like AES, Blowfish, Triple-DES, DES, ARC4,  \
+   Camellia and XTEA                                                 \
+ - Hash algorithms, like SHA-1, SHA-2, RIPEMD-160 and MD5            \
+ - Entropy pool and random generators, like CTR-DRBG and HMAC-DRBG   \
+ - Public key algorithms, like RSA, Elliptic Curves, Diffie-Hellman, \
+   ECDSA and ECDH                                                    \
+ - SSL v3 and TLS 1.0, 1.1 and 1.2                                   \
+ - Abstraction layers for ciphers, hashes, public key operations,    \
+   platform abstraction and threading                                \
+"
+
+HOMEPAGE = "https://polarssl.org"
+BUGTRACKER = "https://github.com/polarssl/polarssl/issues"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
+
+SECTION = "libdevel"
+
+SRC_URI = "https://tls.mbed.org/download/mbedtls-${PV}-gpl.tgz"
+
+
+DEPENDS = "openssl"
+RDEPENDS_${PN} += "libcrypto"
+PROVIDES += "polarssl"
+RPROVIDES_${PN} = "polarssl"
+EXTRA_OECMAKE = "-DUSE_SHARED_POLARSSL_LIBRARY=on -DLIB_INSTALL_DIR=${baselib}"
+
+inherit cmake
meta-networking/recipes-connectivity/mbedtls/mbedtls_1.3.10.bb +1 -34
index d5c7afe..3f1c1fe 100644
@@ -1,37 +1,4 @@
-SUMMARY = "Lightweight crypto and SSL/TLS library"
-DESCRIPTION = "mbedtls is a lean open source crypto library          \
-for providing SSL and TLS support in your programs. It offers        \
-an intuitive API and documented header files, so you can actually    \
-understand what the code does. It features:                          \
-                                                                     \
- - Symmetric algorithms, like AES, Blowfish, Triple-DES, DES, ARC4,  \
-   Camellia and XTEA                                                 \
- - Hash algorithms, like SHA-1, SHA-2, RIPEMD-160 and MD5            \
- - Entropy pool and random generators, like CTR-DRBG and HMAC-DRBG   \
- - Public key algorithms, like RSA, Elliptic Curves, Diffie-Hellman, \
-   ECDSA and ECDH                                                    \
- - SSL v3 and TLS 1.0, 1.1 and 1.2                                   \
- - Abstraction layers for ciphers, hashes, public key operations,    \
-   platform abstraction and threading                                \
-"
-
-HOMEPAGE = "https://polarssl.org"
-BUGTRACKER = "https://github.com/polarssl/polarssl/issues"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
-
-SECTION = "libdevel"
-
-SRC_URI = "https://tls.mbed.org/download/mbedtls-${PV}-gpl.tgz"
+require mbedtls.inc
 
 SRC_URI[md5sum] = "19ebbc96feceb430ad958dfe89cb633f"
 SRC_URI[sha256sum] = "746fd88e0c6623691fc56c4eed52e40a57b2da0ac80f6dd8995094aa6adb407e"
-
-DEPENDS = "openssl"
-RDEPENDS_${PN} += "libcrypto"
-PROVIDES += "polarssl"
-RPROVIDES_${PN} = "polarssl"
-EXTRA_OECMAKE = "-DUSE_SHARED_POLARSSL_LIBRARY=on -DLIB_INSTALL_DIR=${baselib}"
-
-inherit cmake
Signature · 7 lines
1.7.9.5

-- 
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#2 lore raw
Quoted 113 lines · Martin Jansa
Quoted 5 lines · Roman Alyautdin

The patch proposes to separate general part of mbedtls recipe into .inc and introduces mbedtls_1.3.10.bb that requires mbedtls.inc. This will help to add another versions without duplication of general stuff

I don't know why it was sent 4 times, but there is upgrade to 1.3.17 already in master-next:

OE @ ~/meta-openembedded $ git log --pretty=fuller meta-networking/recipes-connectivity/mbedtls/ commit c5af6e71907714821c0edfb23085f0a700b1118d

Author:     Wenzong Fan <[email protected]>
AuthorDate: Wed Sep 14 01:49:13 2016 -0400
Commit:     Martin Jansa <[email protected]>
CommitDate: Mon Sep 26 08:29:34 2016 +0200
     mbedtls: upgrade to 1.3.17

Which version do you need that it requires adding .inc instead of adding such version to meta-networking?

Quoted 93 lines
---
  .../recipes-connectivity/mbedtls/mbedtls.inc       |   35 ++++++++++++++++++++
  .../recipes-connectivity/mbedtls/mbedtls_1.3.10.bb |   35 +-------------------
  2 files changed, 36 insertions(+), 34 deletions(-)

create mode 100644 meta-networking/recipes-connectivity/mbedtls/mbedtls.inc

meta-networking/recipes-connectivity/mbedtls/mbedtls.inc new file +35 -0
new file mode 100644
index 0000000..8bb6855
@@ -0,0 +1,35 @@
+SUMMARY = "Lightweight crypto and SSL/TLS library"
+DESCRIPTION = "mbedtls is a lean open source crypto library          \
+for providing SSL and TLS support in your programs. It offers        \
+an intuitive API and documented header files, so you can actually    \
+understand what the code does. It features:                          \
+                                                                     \
+ - Symmetric algorithms, like AES, Blowfish, Triple-DES, DES, ARC4,  \
+   Camellia and XTEA                                                 \
+ - Hash algorithms, like SHA-1, SHA-2, RIPEMD-160 and MD5            \
+ - Entropy pool and random generators, like CTR-DRBG and HMAC-DRBG   \
+ - Public key algorithms, like RSA, Elliptic Curves, Diffie-Hellman, \
+   ECDSA and ECDH                                                    \
+ - SSL v3 and TLS 1.0, 1.1 and 1.2                                   \
+ - Abstraction layers for ciphers, hashes, public key operations,    \
+   platform abstraction and threading                                \
+"
+
+HOMEPAGE = "https://polarssl.org"
+BUGTRACKER = "https://github.com/polarssl/polarssl/issues"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
+
+SECTION = "libdevel"
+
+SRC_URI = "https://tls.mbed.org/download/mbedtls-${PV}-gpl.tgz"
+
+
+DEPENDS = "openssl"
+RDEPENDS_${PN} += "libcrypto"
+PROVIDES += "polarssl"
+RPROVIDES_${PN} = "polarssl"
+EXTRA_OECMAKE = "-DUSE_SHARED_POLARSSL_LIBRARY=on -DLIB_INSTALL_DIR=${baselib}"
+
+inherit cmake
meta-networking/recipes-connectivity/mbedtls/mbedtls_1.3.10.bb +1 -34
index d5c7afe..3f1c1fe 100644
@@ -1,37 +1,4 @@
-SUMMARY = "Lightweight crypto and SSL/TLS library"
-DESCRIPTION = "mbedtls is a lean open source crypto library          \
-for providing SSL and TLS support in your programs. It offers        \
-an intuitive API and documented header files, so you can actually    \
-understand what the code does. It features:                          \
-                                                                     \
- - Symmetric algorithms, like AES, Blowfish, Triple-DES, DES, ARC4,  \
-   Camellia and XTEA                                                 \
- - Hash algorithms, like SHA-1, SHA-2, RIPEMD-160 and MD5            \
- - Entropy pool and random generators, like CTR-DRBG and HMAC-DRBG   \
- - Public key algorithms, like RSA, Elliptic Curves, Diffie-Hellman, \
-   ECDSA and ECDH                                                    \
- - SSL v3 and TLS 1.0, 1.1 and 1.2                                   \
- - Abstraction layers for ciphers, hashes, public key operations,    \
-   platform abstraction and threading                                \
-"
-
-HOMEPAGE = "https://polarssl.org"
-BUGTRACKER = "https://github.com/polarssl/polarssl/issues"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
-
-SECTION = "libdevel"
-
-SRC_URI = "https://tls.mbed.org/download/mbedtls-${PV}-gpl.tgz"
+require mbedtls.inc
 
  SRC_URI[md5sum] = "19ebbc96feceb430ad958dfe89cb633f"
  SRC_URI[sha256sum] = "746fd88e0c6623691fc56c4eed52e40a57b2da0ac80f6dd8995094aa6adb407e"
-
-DEPENDS = "openssl"
-RDEPENDS_${PN} += "libcrypto"
-PROVIDES += "polarssl"
-RPROVIDES_${PN} = "polarssl"
-EXTRA_OECMAKE = "-DUSE_SHARED_POLARSSL_LIBRARY=on -DLIB_INSTALL_DIR=${baselib}"
-
-inherit cmake
Signature · 1 line
1.7.9.5
Quoted 7 lines
Quoted 5 lines
Signature · 4 lines
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Sorry for submitting 4 times - email misconfiguration.

There is a need of mbed TLS 2.3.0, the reason of not updating 1.3.17 is that many project will prefer to not rely on "the latest and the greatest", keep staying on maintained 1.3.*

So this will help to have a choice.

Secondly, unlike 1.3.17, 2.3.0 CMakeLists.txt depends on perl package presence. And this might be a significant thing for somebody.

My plan is if the approach is accepted to create mbedtls_2.3.0.bb with handling of this new perl requirement

#3 lore raw

Hi Martin, should I prepare "mbedtls.inc patch" against 1.3.17 in master-next branch or you found my explanation was not reasonable?

Martin:

Quoted 1 line

Which version do you need that it requires adding .inc instead of adding such version to meta-networking?

Roman:

Quoted 6 lines

There is a need of mbed TLS 2.3.0, the reason of not updating 1.3.17 is that many project will prefer to not rely on "the latest and the greatest", keep staying on maintained 1.3.*

Quoted 7 lines

So this will help to have a choice.

Secondly, unlike 1.3.17, 2.3.0 CMakeLists.txt depends on perl package presence. And this might be a significant thing for somebody.

My plan is if the approach is accepted to create mbedtls_2.3.0.bb with handling of this new perl requirement

Thanks,
Roman Alyautdin

Quoted 134 lines · Roman Alyautdin
Quoted 113 lines · Martin Jansa
Quoted 5 lines · Roman Alyautdin

The patch proposes to separate general part of mbedtls recipe into .inc and introduces mbedtls_1.3.10.bb that requires mbedtls.inc. This will help to add another versions without duplication of general stuff

I don't know why it was sent 4 times, but there is upgrade to 1.3.17 already in master-next:

OE @ ~/meta-openembedded $ git log --pretty=fuller meta-networking/recipes-connectivity/mbedtls/ commit c5af6e71907714821c0edfb23085f0a700b1118d

Author:     Wenzong Fan<[email protected]>
AuthorDate: Wed Sep 14 01:49:13 2016 -0400
Commit:     Martin Jansa<[email protected]>
CommitDate: Mon Sep 26 08:29:34 2016 +0200
     mbedtls: upgrade to 1.3.17

Which version do you need that it requires adding .inc instead of adding such version to meta-networking?

Quoted 93 lines
---
  .../recipes-connectivity/mbedtls/mbedtls.inc       |   35 ++++++++++++++++++++
  .../recipes-connectivity/mbedtls/mbedtls_1.3.10.bb |   35 +-------------------
  2 files changed, 36 insertions(+), 34 deletions(-)

create mode 100644 meta-networking/recipes-connectivity/mbedtls/mbedtls.inc

meta-networking/recipes-connectivity/mbedtls/mbedtls.inc new file +35 -0
new file mode 100644
index 0000000..8bb6855
@@ -0,0 +1,35 @@
+SUMMARY = "Lightweight crypto and SSL/TLS library"
+DESCRIPTION = "mbedtls is a lean open source crypto library          \
+for providing SSL and TLS support in your programs. It offers        \
+an intuitive API and documented header files, so you can actually    \
+understand what the code does. It features:                          \
+                                                                     \
+ - Symmetric algorithms, like AES, Blowfish, Triple-DES, DES, ARC4,  \
+   Camellia and XTEA                                                 \
+ - Hash algorithms, like SHA-1, SHA-2, RIPEMD-160 and MD5            \
+ - Entropy pool and random generators, like CTR-DRBG and HMAC-DRBG   \
+ - Public key algorithms, like RSA, Elliptic Curves, Diffie-Hellman, \
+   ECDSA and ECDH                                                    \
+ - SSL v3 and TLS 1.0, 1.1 and 1.2                                   \
+ - Abstraction layers for ciphers, hashes, public key operations,    \
+   platform abstraction and threading                                \
+"
+
+HOMEPAGE ="https://polarssl.org"
+BUGTRACKER ="https://github.com/polarssl/polarssl/issues"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM ="file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
+
+SECTION = "libdevel"
+
+SRC_URI ="https://tls.mbed.org/download/mbedtls-${PV}-gpl.tgz"
+
+
+DEPENDS = "openssl"
+RDEPENDS_${PN} += "libcrypto"
+PROVIDES += "polarssl"
+RPROVIDES_${PN} = "polarssl"
+EXTRA_OECMAKE = "-DUSE_SHARED_POLARSSL_LIBRARY=on -DLIB_INSTALL_DIR=${baselib}"
+
+inherit cmake
meta-networking/recipes-connectivity/mbedtls/mbedtls_1.3.10.bb +1 -34
index d5c7afe..3f1c1fe 100644
@@ -1,37 +1,4 @@
-SUMMARY = "Lightweight crypto and SSL/TLS library"
-DESCRIPTION = "mbedtls is a lean open source crypto library          \
-for providing SSL and TLS support in your programs. It offers        \
-an intuitive API and documented header files, so you can actually    \
-understand what the code does. It features:                          \
-                                                                     \
- - Symmetric algorithms, like AES, Blowfish, Triple-DES, DES, ARC4,  \
-   Camellia and XTEA                                                 \
- - Hash algorithms, like SHA-1, SHA-2, RIPEMD-160 and MD5            \
- - Entropy pool and random generators, like CTR-DRBG and HMAC-DRBG   \
- - Public key algorithms, like RSA, Elliptic Curves, Diffie-Hellman, \
-   ECDSA and ECDH                                                    \
- - SSL v3 and TLS 1.0, 1.1 and 1.2                                   \
- - Abstraction layers for ciphers, hashes, public key operations,    \
-   platform abstraction and threading                                \
-"
-
-HOMEPAGE ="https://polarssl.org"
-BUGTRACKER ="https://github.com/polarssl/polarssl/issues"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM ="file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
-
-SECTION = "libdevel"
-
-SRC_URI ="https://tls.mbed.org/download/mbedtls-${PV}-gpl.tgz"
+require mbedtls.inc
 
  SRC_URI[md5sum] = "19ebbc96feceb430ad958dfe89cb633f"
  SRC_URI[sha256sum] = "746fd88e0c6623691fc56c4eed52e40a57b2da0ac80f6dd8995094aa6adb407e"
-
-DEPENDS = "openssl"
-RDEPENDS_${PN} += "libcrypto"
-PROVIDES += "polarssl"
-RPROVIDES_${PN} = "polarssl"
-EXTRA_OECMAKE = "-DUSE_SHARED_POLARSSL_LIBRARY=on -DLIB_INSTALL_DIR=${baselib}"
-
-inherit cmake
Signature · 1 line
1.7.9.5
Quoted 7 lines
Quoted 5 lines
Signature · 4 lines
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Sorry for submitting 4 times - email misconfiguration.

There is a need of mbed TLS 2.3.0, the reason of not updating 1.3.17 is that many project will prefer to not rely on "the latest and the greatest", keep staying on maintained 1.3.*

So this will help to have a choice.

Secondly, unlike 1.3.17, 2.3.0 CMakeLists.txt depends on perl package presence. And this might be a significant thing for somebody.

My plan is if the approach is accepted to create mbedtls_2.3.0.bb with handling of this new perl requirement