From 58dea68faa4f5feb9aa4e63db2d7a7826bd0b3d8 Mon Sep 17 00:00:00 2001 From: Andrea Pappacoda Date: Sun, 23 Jan 2022 00:38:09 +0100 Subject: [PATCH 2/5] d/patches: fix GCC 11 build. Closes: #983985 --- debian/patches/gcc-11.patch | 87 +++++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 88 insertions(+) create mode 100644 debian/patches/gcc-11.patch create mode 100644 debian/patches/series diff --git a/debian/patches/gcc-11.patch b/debian/patches/gcc-11.patch new file mode 100644 index 0000000..e39208a --- /dev/null +++ b/debian/patches/gcc-11.patch @@ -0,0 +1,87 @@ +Origin: upstream, https://gitlab.linphone.org/BC/public/bctoolbox/-/commit/9ac0e412c45bf28d02829e9d912342359714f638 +Bug-Debian: https://bugs.debian.org/983985 +Last-Update: 2022-01-22 + +From 9ac0e412c45bf28d02829e9d912342359714f638 Mon Sep 17 00:00:00 2001 +From: Sylvain Berfini +Date: Wed, 28 Apr 2021 14:11:30 +0200 +Subject: [PATCH] Fixed desktop build with gcc 11 + +--- + include/bctoolbox/port.h | 2 +- + src/crypto/mbedtls.c | 18 +++++++++--------- + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/include/bctoolbox/port.h b/include/bctoolbox/port.h +index 5bdbfde..3543172 100644 +--- a/include/bctoolbox/port.h ++++ b/include/bctoolbox/port.h +@@ -751,7 +751,7 @@ BCTBX_PUBLIC void bctbx_uint32_to_str(uint8_t output_string[9], uint32_t input_u + * + * Note : there is no check on the length or validity as an hexa string on the input, incorrect byte is silently mapped to 0 + */ +-BCTBX_PUBLIC uint32_t bctbx_str_to_uint32(const uint8_t input_string[9]); ++BCTBX_PUBLIC uint32_t bctbx_str_to_uint32(const uint8_t *input_string); + + /** + * @brief Convert an unsigned 64 bits integer into the corresponding hexadecimal string(including null termination character) +diff --git a/src/crypto/mbedtls.c b/src/crypto/mbedtls.c +index 1e7c205..10155a6 100644 +--- a/src/crypto/mbedtls.c ++++ b/src/crypto/mbedtls.c +@@ -1538,7 +1538,7 @@ void bctbx_sha384(const uint8_t *input, + uint8_t hashLength, + uint8_t *output) + { +- uint8_t hashOutput[48]; ++ uint8_t hashOutput[64]; + mbedtls_sha512(input, inputLength, hashOutput, 1); /* last param to one to select SHA384 and not SHA512 */ + + /* check output length, can't be>48 */ +@@ -1791,8 +1791,8 @@ int32_t bctbx_aes_gcm_finish(bctbx_aes_gcm_context_t *context, + * @param[out] output Output data buffer + * + */ +-void bctbx_aes128CfbEncrypt(const uint8_t key[16], +- const uint8_t IV[16], ++void bctbx_aes128CfbEncrypt(const uint8_t *key, ++ const uint8_t *IV, + const uint8_t *input, + size_t inputLength, + uint8_t *output) +@@ -1823,8 +1823,8 @@ void bctbx_aes128CfbEncrypt(const uint8_t key[16], + * @param[out] output Output data buffer + * + */ +-void bctbx_aes128CfbDecrypt(const uint8_t key[16], +- const uint8_t IV[16], ++void bctbx_aes128CfbDecrypt(const uint8_t *key, ++ const uint8_t *IV, + const uint8_t *input, + size_t inputLength, + uint8_t *output) +@@ -1855,8 +1855,8 @@ void bctbx_aes128CfbDecrypt(const uint8_t key[16], + * @param[out] output Output data buffer + * + */ +-void bctbx_aes256CfbEncrypt(const uint8_t key[32], +- const uint8_t IV[16], ++void bctbx_aes256CfbEncrypt(const uint8_t *key, ++ const uint8_t *IV, + const uint8_t *input, + size_t inputLength, + uint8_t *output) +@@ -1884,8 +1884,8 @@ void bctbx_aes256CfbEncrypt(const uint8_t key[32], + * @param[out] output Output data buffer + * + */ +-void bctbx_aes256CfbDecrypt(const uint8_t key[32], +- const uint8_t IV[16], ++void bctbx_aes256CfbDecrypt(const uint8_t *key, ++ const uint8_t *IV, + const uint8_t *input, + size_t inputLength, + uint8_t *output) +-- +GitLab + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..0b8ea4e --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +gcc-11.patch -- GitLab From e08a8c589483634e7c2479af1443cc52ee2ff965 Mon Sep 17 00:00:00 2001 From: Andrea Pappacoda Date: Sun, 23 Jan 2022 00:53:53 +0100 Subject: [PATCH 3/5] d/control: use debhelper-compat (= 13) --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 4770fcf..986a80b 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Priority: optional Maintainer: Debian VoIP Team Uploaders: Bernhard Schmidt Build-Depends: cmake, - debhelper-compat (= 12), + debhelper-compat (= 13), libmbedtls-dev, Standards-Version: 4.5.1 Section: libs -- GitLab From bb57bbb60fdcbf383a7f9143a65f449f665509d3 Mon Sep 17 00:00:00 2001 From: Andrea Pappacoda Date: Sun, 23 Jan 2022 00:54:27 +0100 Subject: [PATCH 4/5] d/control: bump Standards-Version to 4.6.0 --- debian/control | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 986a80b..48e21f7 100644 --- a/debian/control +++ b/debian/control @@ -5,11 +5,12 @@ Uploaders: Bernhard Schmidt Build-Depends: cmake, debhelper-compat (= 13), libmbedtls-dev, -Standards-Version: 4.5.1 +Standards-Version: 4.6.0 Section: libs Homepage: https://gitlab.linphone.org/BC/public/bctoolbox Vcs-Git: https://salsa.debian.org/pkg-voip-team/linphone-stack/bctoolbox.git Vcs-Browser: https://salsa.debian.org/pkg-voip-team/linphone-stack/bctoolbox +Rules-Requires-Root: no Package: libbctoolbox-dev Section: libdevel -- GitLab From e303c33e210ba8fa2bb4dea614c3b97e13e95de3 Mon Sep 17 00:00:00 2001 From: Andrea Pappacoda Date: Sun, 23 Jan 2022 00:58:33 +0100 Subject: [PATCH 5/5] Release 4.4.34-0.1 --- debian/changelog | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/debian/changelog b/debian/changelog index b7d0ed5..d4185e1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,18 @@ +bctoolbox (4.4.34-0.1) unstable; urgency=medium + + * Non-maintainer upload + + [ Bernhard Schmidt ] + * Drop cmake version constraint satisfied in oldstable + + [ Andrea Pappacoda ] + * New upstream version 4.4.34 + * d/patches: fix GCC 11 build. Closes: #983985 + * d/control: use debhelper-compat (= 13) + * d/control: bump Standards-Version to 4.6.0 + + -- Andrea Pappacoda Sun, 23 Jan 2022 00:55:41 +0100 + bctoolbox (4.4.13-2) unstable; urgency=medium * Team upload -- GitLab