summaryrefslogtreecommitdiff
path: root/dev-libs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-12-23 06:31:00 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-12-23 06:31:00 +0000
commit338095605b6c9c82690f77f27a32490c9a57bdcb (patch)
tree72a4d7ec7ba10ea6da4d4f7d25b68915b12edde6 /dev-libs
parent5a2cecfc8661e1d3a762adf05cf8eb142cd41710 (diff)
gentoo auto-resync : 23:12:2024 - 06:31:00
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/Manifest.gzbin100484 -> 100489 bytes
-rw-r--r--dev-libs/botan/Manifest5
-rw-r--r--dev-libs/botan/botan-2.19.5.ebuild2
-rw-r--r--dev-libs/botan/botan-3.6.1.ebuild3
-rw-r--r--dev-libs/botan/files/botan-3.6.1-tests-glibcxx_assertions.patch40
-rw-r--r--dev-libs/protobuf-c/Manifest8
-rw-r--r--dev-libs/protobuf-c/files/protobuf-c-1.5.0-free-corruption.patch44
-rw-r--r--dev-libs/protobuf-c/protobuf-c-1.4.1-r2.ebuild (renamed from dev-libs/protobuf-c/protobuf-c-1.4.1-r1.ebuild)11
-rw-r--r--dev-libs/protobuf-c/protobuf-c-1.4.1.ebuild53
-rw-r--r--dev-libs/protobuf-c/protobuf-c-1.5.0-r3.ebuild (renamed from dev-libs/protobuf-c/protobuf-c-1.5.0-r2.ebuild)9
-rw-r--r--dev-libs/protobuf-c/protobuf-c-1.5.0-r4.ebuild (renamed from dev-libs/protobuf-c/protobuf-c-1.5.0.ebuild)29
11 files changed, 136 insertions, 68 deletions
diff --git a/dev-libs/Manifest.gz b/dev-libs/Manifest.gz
index be42abe2056f..7932a779b319 100644
--- a/dev-libs/Manifest.gz
+++ b/dev-libs/Manifest.gz
Binary files differ
diff --git a/dev-libs/botan/Manifest b/dev-libs/botan/Manifest
index 60493935c7e2..091926d1a5dc 100644
--- a/dev-libs/botan/Manifest
+++ b/dev-libs/botan/Manifest
@@ -3,6 +3,7 @@ AUX botan-2.19.5-cloudflare.patch 3012 BLAKE2B 066cd7a5d1e384ebd0596e2af0f00f98c
AUX botan-2.19.5-no-distutils.patch 2597 BLAKE2B 5d2cf7e89939abdbf97cb01f6364809782c504c22a613b0fb0fdd112beda35b7f824fb9756a5782b55de775926c4447f3cbf5cc2803844acdd115e6ac1db8cce SHA512 171400cffbefb1d6a50bd0cd134083c6e63efd439a9f0129152637dcc4d3ec00d06494e6d8d3a526a71198a2f3e3a87951e23bcf8f647b3e9e7e3e59c9370c98
AUX botan-3.2.0-ninja.patch 575 BLAKE2B f75eb0a16fadfae6e0a1bb554262d8d902152c054fd97c19a1c4eda31a780138efd42ce05992896d16d98415c555a7cfa01b6dfa201c7e97ad971deab851e7b7 SHA512 ff9078ae1a43404680cf757da15bd17541f51f8de02a1a8d02f075676a1e35ff9a78adba0f3b84847634bc4904ed7b5824df6c708785865a4d01d4f9139e617b
AUX botan-3.6.1-boost-1.87.patch 14585 BLAKE2B 175d0a7e0bd16fb1e8f1d2493ad41e6633ec32284704cfb182892acf35695adb38f142ebf557697a422b40b11a0b7842f9852b45022168ffa691ddd84f8334a3 SHA512 f4adea3772b7bff4304c3189f3be38c75c2a3ddcfeb451f7578e2f0e1487e2d1eedef0c7dd782a699cf966931a7ab32f0ca4079d9145b7c43495a6281bf68bea
+AUX botan-3.6.1-tests-glibcxx_assertions.patch 1989 BLAKE2B 21ecc6ac95f228c648da3b14927392378691078a67a2aeebaac18895646c03d531bf98342f6a10d40ae5eefbe5e65b565cb62ea860f70a8875673a21164d36d5 SHA512 41a8fcb9a7c865aceb70393f0ccbf5ac8bd7387cd6ec99e4806dbe02a6b90ddb016914bc6f14a5ae742c4989bfd68a0e28ec36b06cc1cb065a27aa62c0cced0d
DIST Botan-2.19.3.tar.xz 6105896 BLAKE2B 6d7778d9e9a101c76f35c65b0fb0201641cd91967ba934510f3836ee4b924d54cabdc760dd460997679250aa66e1d2a99369cd03f8fb9e7b2fe672d4b355215f SHA512 80012397e2aa7cc88a9536340ac9b770d1195fddda53b9d4cfde82318dd05f9d4f925bbdff773aba99883a701f4d30581e9d5c97e915fa80c3ca2acfa5a92110
DIST Botan-2.19.3.tar.xz.asc 488 BLAKE2B cd86bf77306aad2956cced6ac4fb96081279af88743e87d8fe5437e72e9fa8db8aaf40d0b5cb9c5b3a85204cb7d63c3baa3054126ab4c9a2db527e6835a069d7 SHA512 9142f932c958138b4bac32f503a550e6c73b61612690a280dcb98efe8c367aa6bd3cd88b4ed4decec376bb87596a780a21bdcb01d4a3573a1c44fbeb0aa49d23
DIST Botan-2.19.4.tar.xz 6099528 BLAKE2B c35dfec5aad13c76fe09b33f97a72d15f84bfd6c434cae89be13c3fd3e6f7deaa9ea21474890bb6a1f4fa7d23369c32b9fc747862233eac33c8c88dbc912d31f SHA512 2fab4347367703dce8302b7710698ed228c6cc6dd609c39829ba17ad580407ed40d822862d467aa7aea4bfd633c1f1d1c0d437e86376f453845cc609596335d8
@@ -19,10 +20,10 @@ DIST Botan-3.6.1.tar.xz 7581864 BLAKE2B 744eed158e021d26b9414b3a098e017e6e2c2160
DIST Botan-3.6.1.tar.xz.asc 488 BLAKE2B 3538c941f707a182f86226dfdbb8222570671e0bce3ca61137a5d978c2b1f5e658ffc1168d7e73a1861210adfac8aa661124c9cbc4950973f7b1e2c3360aab90 SHA512 871c6d91368d8a080e704afb53b1339c6d06aa57aaa45f260bccf1cb1ed31c635587ba930f954ab55668a7ca13b89b2f2acba3c0f1723e3f7190c6ebe9dc2e0b
EBUILD botan-2.19.3-r2.ebuild 5084 BLAKE2B 4e38d5f419f00e83691cc0eabf70679ef9c2b3ca6583de89bdd629ff047b7ed2fb42e8a577b4352bd5702925de8df0c4c1694562d2fa7b37a3599e13af276da9 SHA512 018dc521bc66d71373865307debdf1bd556b8c663fde27a8e2abb1ab96ce783851024255d8059b0c0146f6ea33d8c43469e77d07996bf3c4ccc7b69a90c0c65a
EBUILD botan-2.19.4.ebuild 5158 BLAKE2B 851298f127c510589a3f1a19fef3485318e8ec7bc90f197101cc8d0950cfd935b9f8299d8994135d1d1c6790da5ef5d9492322d6ec2f193b50f7ef6dcd20b05e SHA512 1f3c042a943b5e51d2c10d62ea96e6772457423667f8803ea39e8443f74641be99893eb0015f179c2a9a0440d1a8fccf81134eb963fae5d03ec289ad5a032a4d
-EBUILD botan-2.19.5.ebuild 5211 BLAKE2B 680b22edc892be863fdab189b2b9c753d41c31dcd39f999b4d039e0a9f2b1f73575c7aee72a860e2f3e74fc5dbfeba4fa057d9039e351c647ded82a1094ba74c SHA512 f3260993c3149bba2ec86bb782919ecc2c7cd8e3fc20ba544aaf56ec6e17f64e63d0d7a6adc12ad53bed977f3af1880a57f3be9554d24d032af838ec6c8ac8a0
+EBUILD botan-2.19.5.ebuild 5228 BLAKE2B 4c058bdca20c9c31ad2287d71686820d211011228183c0ee448b9ee41132d1593e29a950f436c58b3a0bbb360eeccb6673f0b2b2a4210988249d1da4290afbc5 SHA512 79981d9c133f0df7c5bbf494d8eca30c47295ab44759eb60f567978a879ecdd3ed3c7537b968a7c5a933b3ed794d34b3c9102d435bf3b950a3784ce5ed153e8c
EBUILD botan-3.1.1.ebuild 5687 BLAKE2B 2a54f03f4c60f34a426306a440c961d8c670d353dc309eece4b89c251e280a3025faf8c46d76b5f3c2778678fb5302bffa4d13192b7c49b83ff2c4830bd53cf9 SHA512 039403784b9e5314fbf44491a075337e82b88a872965d9c4ec230c9e62b72d2758fb22c0270232faaf07c6de85bc6c9476986f5a264b5253cdb147f8d6c0fd09
EBUILD botan-3.2.0-r1.ebuild 5949 BLAKE2B d3896126f123289ba540718729e96b72fb5c40527be15fe3b7921040210014efdb65748c4dc601130949bf48fced3864f746915ee9ada72f77d85120fbf85a10 SHA512 623175e58b1b045757ff939c05b1cc55357e0d32b76485027ab45179adc5278eb01f46bac5b944ebbb00e0fcb6963da4ae7202721546c306dc0355e7bb747161
EBUILD botan-3.2.0-r2.ebuild 5974 BLAKE2B 0d13e2fd6b89cd5cd4254b0d4d109ce1df29f7e191df73c453786db9e2c134fc79a7faa592147c0bd780e1ea2e0d0c230b51402e028ea1b45f6fa188e20cd8a5 SHA512 d1ec5f53985ddcd8ef65439385a9fa4b33be4686e8fbcedf1c7c3b15eeb74dc635bf46bbba39195e6a5487297ac71e68b9442c129ab36d92c60b8d366dfde1f3
EBUILD botan-3.3.0.ebuild 6000 BLAKE2B 536ec0d6f2b6d832bcd2bfe5a8ecc9f1656ec644fb023dafd0592a5b1492b13fdb9ee75d5c9a6589b822a3882aec19ca35dc737766d4cd073cac7357e1225acb SHA512 179a8f6c557b4d797bb2508d409c0bfff23d35b7d46cc398a888f7f0a6a4e05049800f0dfc62505b7b1448b92a81c3b53001645dd4fd0395848b79336f268009
-EBUILD botan-3.6.1.ebuild 5984 BLAKE2B e88d6380a0ff866a1c2cd5da3898f550de57f74453bbc71c83a2b38b544ed64ee6b4f29ab246d5240720dc9c37ed8371b62198a6bea324b42a687fa79c15aea8 SHA512 78e32e4a696549b39ca7d798cc0767f7c17edd55e5a9c3c251abe748772c95de6acfcb2e59572e4fac8e2a9a0cf5c9f356d8c556050a9a3ea4a7f475f815ddfc
+EBUILD botan-3.6.1.ebuild 6028 BLAKE2B 7d0f1b20d19aa9a621884c68ff8bfd3b03490fa73c419e500f671fb569ffecd5b87c2872a7c32833886a6801563b2ddfa2f240c2e5241b4010d9f6395504080e SHA512 b3bc760fe23468bd88abe86b8ffbc1bc45a24dc5ad09cf3e5bf12cb2cc22115743e84c49e6c0e870f68a235ac79cce391a1f8ca2d13d937e1da3b139ff899592
MISC metadata.xml 587 BLAKE2B 8d46466fee633fda0f81549a6e512e4ef5963eda31d7c882cee2fe2bfae8b0379509f046d0bdfdb1fe9481eea0585f1754753ed6b509c4f922b8fbf9ae089f39 SHA512 258e04098b9db5821a66e38d02ffb195b57378621fd2a549c8892744cf257be857ebf75c8e4a2f041cd267f07c2f1c3a5fca8df61db0538d8282507cf03a029d
diff --git a/dev-libs/botan/botan-2.19.5.ebuild b/dev-libs/botan/botan-2.19.5.ebuild
index bece06dd2ab4..f042f0f6df33 100644
--- a/dev-libs/botan/botan-2.19.5.ebuild
+++ b/dev-libs/botan/botan-2.19.5.ebuild
@@ -194,7 +194,7 @@ src_test() {
src_install() {
default
- if [[ -d "${ED}"/usr/share/doc/${P} ]] ; then
+ if [[ -d "${ED}"/usr/share/doc/${P} && ${P} != ${PF} ]] ; then
# --docdir in configure controls the parent directory unfortunately
mv "${ED}"/usr/share/doc/${P} "${ED}"/usr/share/doc/${PF} || die
fi
diff --git a/dev-libs/botan/botan-3.6.1.ebuild b/dev-libs/botan/botan-3.6.1.ebuild
index a74ebb175427..e47afaa7b00d 100644
--- a/dev-libs/botan/botan-3.6.1.ebuild
+++ b/dev-libs/botan/botan-3.6.1.ebuild
@@ -56,7 +56,8 @@ BDEPEND="
# https://botan.randombit.net/handbook/packaging.html#minimize-distribution-patches
PATCHES=(
- "${FILESDIR}"/${PN}-3.6.1-boost-1.87.patch
+ "${FILESDIR}"/${P}-boost-1.87.patch
+ "${FILESDIR}"/${P}-tests-glibcxx_assertions.patch
)
python_check_deps() {
diff --git a/dev-libs/botan/files/botan-3.6.1-tests-glibcxx_assertions.patch b/dev-libs/botan/files/botan-3.6.1-tests-glibcxx_assertions.patch
new file mode 100644
index 000000000000..204adbc15825
--- /dev/null
+++ b/dev-libs/botan/files/botan-3.6.1-tests-glibcxx_assertions.patch
@@ -0,0 +1,40 @@
+https://github.com/randombit/botan/issues/4491
+https://github.com/randombit/botan/commit/3e0cb45cc94764e3ff221ceb141421a83eb27aef
+
+From 3e0cb45cc94764e3ff221ceb141421a83eb27aef Mon Sep 17 00:00:00 2001
+From: Jack Lloyd <jack@randombit.net>
+Date: Mon, 28 Oct 2024 18:13:52 -0400
+Subject: [PATCH] Workaround apparent libstdc++ bug in Ubuntu 24.04
+
+The iterator checks failed when we attempted to use first to extract
+ideal_granularity bytes out of dummy_buffer, but on testing it failed
+exactly when ideal_granularity was 256 bytes, the same size as
+dummy_buffer itself.
+
+Increase the size and add an assert that the buffer is large enough.
+---
+ src/tests/test_ffi.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/tests/test_ffi.cpp b/src/tests/test_ffi.cpp
+index 647e6ad10b..592435b142 100644
+--- a/src/tests/test_ffi.cpp
++++ b/src/tests/test_ffi.cpp
+@@ -1381,7 +1381,7 @@ class FFI_AEAD_Test final : public FFI_Test {
+ std::vector<uint8_t> ciphertext(ideal_granularity * pt_multiplier + taglen);
+ TEST_FFI_OK(botan_rng_get, (rng, plaintext.data(), plaintext.size()));
+
+- std::vector<uint8_t> dummy_buffer(256);
++ std::vector<uint8_t> dummy_buffer(1024);
+ TEST_FFI_OK(botan_rng_get, (rng, dummy_buffer.data(), dummy_buffer.size()));
+ std::vector<uint8_t> dummy_buffer_reference = dummy_buffer;
+
+@@ -1405,6 +1405,7 @@ class FFI_AEAD_Test final : public FFI_Test {
+ // input if there is no space in the output buffer. Even when
+ // the cipher is a mode that won't produce any output until the
+ // entire message is processed. Hence, give it some dummy buffer.
++ BOTAN_ASSERT_NOMSG(dummy_buffer.size() > ideal_granularity);
+ auto ct_chunk = (requires_entire_message) ? std::span(dummy_buffer).first(ideal_granularity)
+ : ct_stuffer.first(ideal_granularity);
+
+
diff --git a/dev-libs/protobuf-c/Manifest b/dev-libs/protobuf-c/Manifest
index bc463fb3d76a..2d8ee51acd64 100644
--- a/dev-libs/protobuf-c/Manifest
+++ b/dev-libs/protobuf-c/Manifest
@@ -2,10 +2,10 @@ AUX protobuf-c-1.3.0-no-build-tests.patch 1020 BLAKE2B adda0e4764283d00093709bc9
AUX protobuf-c-1.4.0-include-path.patch 8092 BLAKE2B d1abcadbaf41789a882427cbae6d34e481f4bb66af95d95f0e33909bf25978b6adf80ba33094688e8a56ab51a7c0ee2b7aaba02ec591c286e824358ce671c212 SHA512 162b23bfd165c1dadaeb0f6c9eddc68819b5454c856def2d7a09d50d5694eaf5174ee6402197ff0d2e4465eb8f3130e0ef009f7f4d6de9fdbbd7af5fcf937ffb
AUX protobuf-c-1.4.1-protobuf-22.patch 17194 BLAKE2B 711d3913f391775501f823af7ffd25fb5bffe748d255d88ebab7be406b2165e57d3197d15d3f08774745c4615a9a54fb8b051d3e801563a1ceeca1b8a5101175 SHA512 745e012a553c84a379a1c047147ba4fc9b06882561876a594546144d88d79cac9ff4327480a67808949957d158b5bc18aa7f94960856d07da43b2027d76a3067
AUX protobuf-c-1.5.0-Clean-CMake.patch 4287 BLAKE2B b51be01e919ffdd3a5f5feef2c0c719b9eb74ac7917742b4ca16de45231a41bb511ad5e7befa9512fbd4c468a321ff8963562f3d20255a388a7bc439fd02f961 SHA512 9dd32b1327833f57facdab7bdd1c5beed4723a0dbb71c4ff7041e090b7b2d040f8a9abae29274d66d536317a2e6da17fff82f37c8be9b570627aa2b6a349ea91
+AUX protobuf-c-1.5.0-free-corruption.patch 1609 BLAKE2B c90b244dcea5f5534a4e4a49d2998ffbcfea734583c73bca2d3064f843749cdb2f9d511bcfd6f30b09c575f2467f6278968fe9fb8b61d58c21ecf8e5685e848e SHA512 87a280b09497fb12a0ef9862c880412751c087ebdac482ac94b34bc654bab8cbea388cb5bc047c0c2abb1c1c144a06f175956137565d9ddc87f64227e0d76462
DIST protobuf-c-1.4.1.tar.gz 513596 BLAKE2B b5e87a3154863581b81790a26b6b522c2b3ad138e966053f20c6264b4a7677d6c5bff8e27faa7c6cfa9e982b72b06e2f518a3def9f6db13241c3cb3ee9afc8f6 SHA512 190a4aa5c607853e6bf860b0974deb21e4f7f6209e810251eaca9612b59ea676779b0ca217fb1572914ffb8de3315a7d24f162b14d447ee671a9adc5b1271e41
DIST protobuf-c-1.5.0.tar.gz 507251 BLAKE2B 7b428655901f4fd74b67b75419552e7c02065a5291aed4dcc1d55b98c986caa9ccf846eb5e98e0954420c3e5bea559b0078843e00daa7b5c63465eec21e28204 SHA512 175c9fc901cab88308730eea982dd62b1e0decdceb80aa53be163f17a440b4acecb834a784beab5cd71186413a322a323f4539758a8727ca51801cf92f9bd3da
-EBUILD protobuf-c-1.4.1-r1.ebuild 1182 BLAKE2B 8310d9ad0c1aeafced124879c18f426c825ede090a1602a2b782fd279eb2a078739a99a679a7539204b0a6a56a2fb412c7b28feff40fda7df7106c726096f8bb SHA512 98cc54dc597ae23f2ea57f850ac14bd4a626f517650d3e52c6fec15011b5fe72509f039584cb51a4a00cf073bdb916a6c13f33297a9d7ef9b2385791164b20ef
-EBUILD protobuf-c-1.4.1.ebuild 1141 BLAKE2B 37cbc52f324dd23965bcb450d6b8815d799a5eda7bd891067ecb69e5603aedda6903c901e8b296bdb5fe9d7e277edafebaa08f5ce75976f57511f59aecb92051 SHA512 4b62de15d68e7a49a2e4f8f8cebccc14376cff9c6df2fba18cfc46e2591480c0a09d50d3d2633fc8a8f3c581282ff5447aa726919a70b3aec00919bd8a856686
-EBUILD protobuf-c-1.5.0-r2.ebuild 1229 BLAKE2B 7df933bc6a80c66893cdcb7f73c0a523ee2928551bb553de4535152a6f38bc7c0d88b13849b45e21d80fdbb0b1571f028c220e618e23efda8caaf26d5abb14ca SHA512 f9881f530a97ffae48fc582d17530d4a968a16761f97065b739ae7c5395ce1ffbb672087a10c27498aaacc75c862c3657c687786f6ec231ec5eb6e64b74692eb
-EBUILD protobuf-c-1.5.0.ebuild 977 BLAKE2B 346fd2051522ede1a5c67ef47790809b5adad6724991635f7899fe8e583a17f665b90624b89b7cdc6e12fd09d9755e654d3ec95b4b51ada738a5100bf204f041 SHA512 0b99495cc09fc00c1fdda380bd50734b684f807bee8f61bcca3fc5a481e72da672429aec79495ee31ca260fa8842430f5949764f84ae6bdeceaffdd7ec634ce2
+EBUILD protobuf-c-1.4.1-r2.ebuild 1342 BLAKE2B eacc99926c4effa44ba0d6da73cee4aa7e121e49a17c45bf2876708243352faacb337ad4975fbff309a64acfcba1f99afc472c1cf66c5a13b59bfec17df97ed0 SHA512 8df2975d411150e53356424b274826565f10c8abc5dfbe57ea037024b1095c4241133b971c3496a57bbc44137c09554fa0f2a4431cc4f30bc72031299ff980a9
+EBUILD protobuf-c-1.5.0-r3.ebuild 1389 BLAKE2B 2b0d754cad2c9203320567425dd459b1c5a855629e2f5d05e1d26ad234599c9290dd79ceea3f86ab27463edf5ad36b710527f3a52feec11a10b1c3ea607b6def SHA512 831e38453d77606e2005718ae2831bcfab8fec5dd8838823a0399c897c6122743d683d130538beccefec9d3995fd20536e8161791ce90fe1242b150aa7adecb2
+EBUILD protobuf-c-1.5.0-r4.ebuild 1473 BLAKE2B a72421654cd97ee69a1d00cf4597a38c36f4cba5e78f6fe3da8dbe95784385d6143b79023f9306920818837ec38ed877138f2910781d727e05332d3b285a28f1 SHA512 133a7684228274fdaffdaa947fbbe27816084e7244e75aa39a6050ac050760f31262db19370d7731d5f037eb2104782eae2251ec7cf96c19dc3ab8b574f21aea
MISC metadata.xml 334 BLAKE2B faf0bb965591d515842465979c2c5224d21f7cc820d529ffc6dd8081b9c6d9bb80118f7c9767844b3c855f324054463a65880bd8851a95835c70246dfa8ae1c9 SHA512 6ba2fd30a13dca3180099c390f5b715062b0b082eb977ffa9b582f29693ea1b9c00870ebf4f5783261e5f05358a9b1ccf8ed5c9b35325432721099db4676a9aa
diff --git a/dev-libs/protobuf-c/files/protobuf-c-1.5.0-free-corruption.patch b/dev-libs/protobuf-c/files/protobuf-c-1.5.0-free-corruption.patch
new file mode 100644
index 000000000000..c6795231bbfc
--- /dev/null
+++ b/dev-libs/protobuf-c/files/protobuf-c-1.5.0-free-corruption.patch
@@ -0,0 +1,44 @@
+https://github.com/protobuf-c/protobuf-c/issues/690
+https://github.com/protobuf-c/protobuf-c/pull/703
+
+From 55c8b0dc688b070f4fa860d055a6365c0ae11bb3 Mon Sep 17 00:00:00 2001
+From: Stephan Mueller <smueller@chronox.de>
+Date: Sun, 21 Jan 2024 11:04:34 +0100
+Subject: [PATCH] Fix memory corruption by initlizalizing pointer
+
+A memory corruption in protobuf_c_message_free_unpacked happens at the
+following line:
+
+ if (message->unknown_fields != NULL)
+ do_free(allocator, message->unknown_fields);
+
+The do_free will free ->unknown_fields. This is may be wrong, because
+protobuf_c_message_unpack uses malloc as the default allocator, allocates
+rv with malloc. At the end, however, ->unknown_fields is only initialized
+if there are some. That means if there are no such fields ->unknown_fields
+is an uninitialized pointer.
+
+The patch initializes the pointer to NULL to ensure the check before free
+is performed on initialized memory in case there is no unknown_field.
+
+This fixes https://github.com/protobuf-c/protobuf-c/issues/690
+
+Signed-off-by: Stephan Mueller <smueller@chronox.de>
+---
+ protobuf-c/protobuf-c.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/protobuf-c/protobuf-c.c b/protobuf-c/protobuf-c.c
+index 776ee4fb..0c18f89b 100644
+--- a/protobuf-c/protobuf-c.c
++++ b/protobuf-c/protobuf-c.c
+@@ -3278,6 +3278,8 @@ protobuf_c_message_unpack(const ProtobufCMessageDescriptor *desc,
+ n_unknown * sizeof(ProtobufCMessageUnknownField));
+ if (rv->unknown_fields == NULL)
+ goto error_cleanup;
++ } else {
++ rv->unknown_fields = NULL;
+ }
+
+ /* do real parsing */
+
diff --git a/dev-libs/protobuf-c/protobuf-c-1.4.1-r1.ebuild b/dev-libs/protobuf-c/protobuf-c-1.4.1-r2.ebuild
index f19d1016e21e..9807ffedacc5 100644
--- a/dev-libs/protobuf-c/protobuf-c-1.4.1-r1.ebuild
+++ b/dev-libs/protobuf-c/protobuf-c-1.4.1-r2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-inherit autotools multilib-minimal
+inherit autotools flag-o-matic multilib-minimal
MY_PV="${PV/_/-}"
MY_P="${PN}-${MY_PV}"
@@ -42,6 +42,13 @@ src_prepare() {
eautoreconf
}
+src_configure() {
+ # Workaround for bug #946366
+ append-flags $(test-flags-CC -fzero-init-padding-bits=unions)
+
+ multilib-minimal_src_configure
+}
+
multilib_src_configure() {
local myeconfargs=(
$(use_enable static-libs static)
diff --git a/dev-libs/protobuf-c/protobuf-c-1.4.1.ebuild b/dev-libs/protobuf-c/protobuf-c-1.4.1.ebuild
deleted file mode 100644
index 3b380a3a7362..000000000000
--- a/dev-libs/protobuf-c/protobuf-c-1.4.1.ebuild
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools multilib-minimal
-
-MY_PV="${PV/_/-}"
-MY_P="${PN}-${MY_PV}"
-
-DESCRIPTION="Protocol Buffers implementation in C"
-HOMEPAGE="https://github.com/protobuf-c/protobuf-c"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/${MY_P}.tar.gz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="BSD-2"
-# Subslot == SONAME version
-SLOT="0/1.0.0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="static-libs test"
-RESTRICT="!test? ( test )"
-
-BDEPEND=">=dev-libs/protobuf-3:0
- virtual/pkgconfig"
-DEPEND=">=dev-libs/protobuf-3:0=[${MULTILIB_USEDEP}]"
-RDEPEND="${DEPEND}"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.4.0-include-path.patch
-)
-
-src_prepare() {
- default
-
- if ! use test; then
- eapply "${FILESDIR}"/${PN}-1.3.0-no-build-tests.patch
- fi
-
- eautoreconf
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- $(use_enable static-libs static)
- )
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_install_all() {
- find "${ED}" -name '*.la' -type f -delete || die
- einstalldocs
-}
diff --git a/dev-libs/protobuf-c/protobuf-c-1.5.0-r2.ebuild b/dev-libs/protobuf-c/protobuf-c-1.5.0-r3.ebuild
index 5633caaa249d..c37c0de027c7 100644
--- a/dev-libs/protobuf-c/protobuf-c-1.5.0-r2.ebuild
+++ b/dev-libs/protobuf-c/protobuf-c-1.5.0-r3.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit autotools multilib-minimal
+inherit autotools flag-o-matic multilib-minimal
MY_PV="${PV/_/-}"
MY_P="${PN}-${MY_PV}"
@@ -41,6 +41,13 @@ src_prepare() {
eautoreconf
}
+src_configure() {
+ # Workaround for bug #946366
+ append-flags $(test-flags-CC -fzero-init-padding-bits=unions)
+
+ multilib-minimal_src_configure
+}
+
multilib_src_configure() {
local myeconfargs=(
$(use_enable static-libs static)
diff --git a/dev-libs/protobuf-c/protobuf-c-1.5.0.ebuild b/dev-libs/protobuf-c/protobuf-c-1.5.0-r4.ebuild
index 8176345fd3c3..d2ebd1a4e5f0 100644
--- a/dev-libs/protobuf-c/protobuf-c-1.5.0.ebuild
+++ b/dev-libs/protobuf-c/protobuf-c-1.5.0-r4.ebuild
@@ -3,7 +3,9 @@
EAPI=8
-inherit autotools multilib-minimal
+# Check 'next' branch for backports.
+
+inherit autotools flag-o-matic multilib-minimal
MY_PV="${PV/_/-}"
MY_P="${PN}-${MY_PV}"
@@ -16,24 +18,43 @@ S="${WORKDIR}/${MY_P}"
LICENSE="BSD-2"
# Subslot == SONAME version
SLOT="0/1.0.0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~sparc ~x86"
IUSE="static-libs"
BDEPEND="
>=dev-libs/protobuf-3:0
virtual/pkgconfig
"
-DEPEND=">=dev-libs/protobuf-3:0=[${MULTILIB_USEDEP}]"
-RDEPEND="${DEPEND}"
+DEPEND="
+ >=dev-libs/protobuf-3:0=[${MULTILIB_USEDEP}]"
+# NOTE
+# protobuf links to abseil-cpp libraries via it's .pc files.
+# To cause rebuild when the abseil-cpp version changes we add it to RDEPEND only.
+RDEPEND="${DEPEND}
+ dev-cpp/abseil-cpp:=[${MULTILIB_USEDEP}]
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.5.0-Clean-CMake.patch"
+ "${FILESDIR}/${P}-free-corruption.patch"
+)
src_prepare() {
default
eautoreconf
}
+src_configure() {
+ # Workaround for bug #946366
+ append-flags $(test-flags-CC -fzero-init-padding-bits=unions)
+
+ multilib-minimal_src_configure
+}
+
multilib_src_configure() {
local myeconfargs=(
$(use_enable static-libs static)
+ --enable-year2038
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"