From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 98FB8158094 for ; Mon, 10 Oct 2022 21:36:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9C4D4E086C; Mon, 10 Oct 2022 21:36:39 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 838C2E086C for ; Mon, 10 Oct 2022 21:36:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 83188335D72 for ; Mon, 10 Oct 2022 21:36:38 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BA87D55B for ; Mon, 10 Oct 2022 21:36:36 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1665437788.9f829fb9b30d3bd85375fe57279d835abd21869d.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libical/, dev-libs/libical/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/libical/files/libical-3.0.15-fortify-source-3.patch dev-libs/libical/files/libical-3.0.15-revert-bad-fuzz-fix.patch dev-libs/libical/libical-3.0.15-r1.ebuild X-VCS-Directories: dev-libs/libical/ dev-libs/libical/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 9f829fb9b30d3bd85375fe57279d835abd21869d X-VCS-Branch: master Date: Mon, 10 Oct 2022 21:36:36 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 7dd50b8b-1505-4d32-9d67-d34820e39ffc X-Archives-Hash: a41bc6780e237bfe9889f868d516d8f8 commit: 9f829fb9b30d3bd85375fe57279d835abd21869d Author: Sam James gentoo org> AuthorDate: Mon Oct 10 21:36:05 2022 +0000 Commit: Sam James gentoo org> CommitDate: Mon Oct 10 21:36:28 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f829fb9 dev-libs/libical: backport parsing regression fix; backport F_S=3 fix Closes: https://bugs.gentoo.org/876625 Closes: https://bugs.gentoo.org/876622 Signed-off-by: Sam James gentoo.org> .../files/libical-3.0.15-fortify-source-3.patch | 43 ++++++++ .../files/libical-3.0.15-revert-bad-fuzz-fix.patch | 36 +++++++ dev-libs/libical/libical-3.0.15-r1.ebuild | 119 +++++++++++++++++++++ 3 files changed, 198 insertions(+) diff --git a/dev-libs/libical/files/libical-3.0.15-fortify-source-3.patch b/dev-libs/libical/files/libical-3.0.15-fortify-source-3.patch new file mode 100644 index 000000000000..830d646b74d0 --- /dev/null +++ b/dev-libs/libical/files/libical-3.0.15-fortify-source-3.patch @@ -0,0 +1,43 @@ +https://github.com/libical/libical/commit/d67034b31cebe0db3ca65342813336b123921a15 +https://github.com/libical/libical/issues/603 +https://bugs.gentoo.org/876625 + +From: Allen Winter +Date: Fri, 7 Oct 2022 09:43:32 -0400 +Subject: [PATCH] fix problem found with gcc fortify builds + +fixes: #603 +--- a/src/libical/icaltz-util.c ++++ b/src/libical/icaltz-util.c +@@ -732,7 +732,7 @@ icalcomponent *icaltzutil_fetch_timezone(const char *location) + for (i = 0; i < num_trans; i++) { + int by_day = 0; + time_t start; +- enum icalrecurrencetype_weekday dow; ++ enum icalrecurrencetype_weekday dow = ICAL_NO_WEEKDAY; + + prev_idx = idx; + idx = trans_idx[i]; +--- a/src/libicalss/icalbdbset.c ++++ b/src/libicalss/icalbdbset.c +@@ -529,7 +529,7 @@ int icalbdbset_get_key(DBC *dbcp, DBT *key, DBT *data) + int icalbdbset_delete(DB *dbp, DBT *key) + { + DB_TXN *tid; +- int ret; ++ int ret = 0; + int done = 0; + int retry = 0; + +--- a/src/test/regression.c ++++ b/src/test/regression.c +@@ -2322,7 +2322,7 @@ void test_fblist() + char *strp = out_str; + + for (i = 0; foo[i] != -1; i++) { +- snprintf(strp, 79, "%1d", foo[i]); ++ snprintf(strp, 79-i, "%1d", foo[i]); + strp++; + } + str_is("Checking freebusy validity", out_str, "1121110"); + diff --git a/dev-libs/libical/files/libical-3.0.15-revert-bad-fuzz-fix.patch b/dev-libs/libical/files/libical-3.0.15-revert-bad-fuzz-fix.patch new file mode 100644 index 000000000000..e6f4d33ad286 --- /dev/null +++ b/dev-libs/libical/files/libical-3.0.15-revert-bad-fuzz-fix.patch @@ -0,0 +1,36 @@ +https://github.com/libical/libical/commit/eeccee80d0485bdd3951924b294a82e8bc39a5f8 +https://bugs.gentoo.org/876622 + +From: Allen Winter +Date: Mon, 10 Oct 2022 14:58:29 -0400 +Subject: [PATCH] Revert "src/libical/icalparser.c - fix a fuzz issue for + integer overflow" + +This reverts commit ca3e2ad983771b90da259994b7a6d7de1fd1abdc. +--- a/src/libical/icalparser.c ++++ b/src/libical/icalparser.c +@@ -630,7 +630,6 @@ icalcomponent *icalparser_parse(icalparser *parser, + icalparser_line_gen_func line_gen_func) + { + char *line; +- unsigned int cnt = 0; + icalcomponent *c = 0; + icalcomponent *root = 0; + icalerrorstate es = icalerror_get_error_state(ICAL_MALFORMEDDATA_ERROR); +@@ -641,7 +640,6 @@ icalcomponent *icalparser_parse(icalparser *parser, + icalerror_set_error_state(ICAL_MALFORMEDDATA_ERROR, ICAL_ERROR_NONFATAL); + + do { +- cnt++; + line = icalparser_get_line(parser, line_gen_func); + + if ((c = icalparser_add_line(parser, line)) != 0) { +@@ -681,7 +679,7 @@ icalcomponent *icalparser_parse(icalparser *parser, + icalmemory_free_buffer(line); + cont = 1; + } +- } while (cont && cnt < TMP_BUF_SIZE); ++ } while (cont); + + icalerror_set_error_state(ICAL_MALFORMEDDATA_ERROR, es); + diff --git a/dev-libs/libical/libical-3.0.15-r1.ebuild b/dev-libs/libical/libical-3.0.15-r1.ebuild new file mode 100644 index 000000000000..f3c4f2d2e9b4 --- /dev/null +++ b/dev-libs/libical/libical-3.0.15-r1.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..11} ) +VALA_USE_DEPEND="vapigen" +inherit cmake python-any-r1 vala + +DESCRIPTION="Implementation of basic iCAL protocols" +HOMEPAGE="https://github.com/libical/libical" +SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="|| ( MPL-2.0 LGPL-2.1 )" +SLOT="0/3" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris" +IUSE="doc examples +glib +introspection static-libs test vala" + +REQUIRED_USE="introspection? ( glib ) vala? ( introspection )" + +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + dev-libs/icu:= + glib? ( dev-libs/glib:2 ) +" +DEPEND="${COMMON_DEPEND} + glib? ( dev-libs/libxml2:2 ) +" +RDEPEND="${COMMON_DEPEND} + sys-libs/timezone-data +" +BDEPEND=" + dev-lang/perl + virtual/pkgconfig + doc? ( + app-doc/doxygen[dot] + glib? ( dev-util/gtk-doc ) + ) + introspection? ( dev-libs/gobject-introspection ) + test? ( + ${PYTHON_DEPS} + glib? ( $(python_gen_any_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]') ) + ) + vala? ( $(vala_depend) ) +" + +DOCS=( + AUTHORS README.md ReleaseNotes.txt TEST THANKS TODO + doc/{AddingOrModifyingComponents.txt,UsingLibical.md} +) + +PATCHES=( + "${FILESDIR}/${PN}-3.0.4-tests.patch" + "${FILESDIR}/${PN}-3.0.11-pkgconfig-libdir.patch" + "${FILESDIR}/${P}-fortify-source-3.patch" + "${FILESDIR}/${P}-revert-bad-fuzz-fix.patch" +) + +python_check_deps() { + python_has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +src_prepare() { + cmake_src_prepare + + use examples || cmake_comment_add_subdirectory examples + use vala && vala_setup +} + +src_configure() { + local mycmakeargs=( + -DCMAKE_DISABLE_FIND_PACKAGE_BerkeleyDB=ON + -DICAL_BUILD_DOCS=$(usex doc) + -DICAL_GLIB=$(usex glib) + -DGOBJECT_INTROSPECTION=$(usex introspection) + -DSHARED_ONLY=$(usex !static-libs) + -DLIBICAL_BUILD_TESTING=$(usex test) + -DICAL_GLIB_VAPI=$(usex vala) + ) + if use vala; then + mycmakeargs+=( + -DVALAC="${VALAC}" + -DVAPIGEN="${VAPIGEN}" + ) + fi + cmake_src_configure +} + +src_compile() { + cmake_src_compile + + if use doc; then + cmake_src_compile docs + + HTML_DOCS=( "${BUILD_DIR}"/apidocs/html/. ) + fi +} + +src_test() { + local myctestargs=( + -E "(icalrecurtest|icalrecurtest-r)" # bug 660282 + ) + + cmake_src_test +} + +src_install() { + cmake_src_install + + if use examples; then + rm examples/CMakeLists.txt || die + dodoc -r examples + fi +}