summaryrefslogtreecommitdiff
path: root/dev-libs/protobuf-c
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/protobuf-c
parent5a2cecfc8661e1d3a762adf05cf8eb142cd41710 (diff)
gentoo auto-resync : 23:12:2024 - 06:31:00
Diffstat (limited to 'dev-libs/protobuf-c')
-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
6 files changed, 90 insertions, 64 deletions
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[@]}"