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 B9EC1158015 for ; Sat, 2 Dec 2023 07:13:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D95942BC04D; Sat, 2 Dec 2023 07:13:16 +0000 (UTC) Received: from smtp.gentoo.org (dev.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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B50612BC04D for ; Sat, 2 Dec 2023 07:13:16 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 062CC33E690 for ; Sat, 2 Dec 2023 07:13:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2C3B1144A for ; Sat, 2 Dec 2023 07:13:13 +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: <1701501016.bc1a2e327998227c5537b25bd81a146c17b3431c.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/autogen/, sys-devel/autogen/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-devel/autogen/autogen-5.18.16-r3.ebuild sys-devel/autogen/files/autogen-5.18.16-FORTIFY_SOURCE.patch sys-devel/autogen/files/autogen-5.18.16-configure-c99.patch X-VCS-Directories: sys-devel/autogen/files/ sys-devel/autogen/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: bc1a2e327998227c5537b25bd81a146c17b3431c X-VCS-Branch: master Date: Sat, 2 Dec 2023 07:13:13 +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: 4b48c8e7-b761-4b07-9edc-c85a96c29600 X-Archives-Hash: 8a2f78fc98cfa0cea369e5960939383e commit: bc1a2e327998227c5537b25bd81a146c17b3431c Author: Sam James gentoo org> AuthorDate: Sat Dec 2 07:09:52 2023 +0000 Commit: Sam James gentoo org> CommitDate: Sat Dec 2 07:10:16 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc1a2e32 sys-devel/autogen: fix configure modern c issues, fix FORTIFY_SOURCE=3 test issue Closes: https://bugs.gentoo.org/889394 Closes: https://bugs.gentoo.org/898590 Signed-off-by: Sam James gentoo.org> sys-devel/autogen/autogen-5.18.16-r3.ebuild | 74 +++++++++++++++ .../files/autogen-5.18.16-FORTIFY_SOURCE.patch | 100 +++++++++++++++++++++ .../files/autogen-5.18.16-configure-c99.patch | 42 +++++++++ 3 files changed, 216 insertions(+) diff --git a/sys-devel/autogen/autogen-5.18.16-r3.ebuild b/sys-devel/autogen/autogen-5.18.16-r3.ebuild new file mode 100644 index 000000000000..462f4d2b5059 --- /dev/null +++ b/sys-devel/autogen/autogen-5.18.16-r3.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools toolchain-funcs + +DESCRIPTION="Program and text file generation" +HOMEPAGE="https://www.gnu.org/software/autogen/" +SRC_URI=" + mirror://gnu/${PN}/rel${PV}/${P}.tar.xz + https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=lib/verify.h;h=3b57ddee0acffd23cc51bc8910a15cf879f90619;hb=537a5511ab0b1326e69b32f87593a50aedb8a589 -> ${P}-gnulib-3b57ddee0acffd23cc51bc8910a15cf879f90619-lib-verify.h +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="libopts static-libs" + +RDEPEND=" + >=dev-scheme/guile-2.0:= + dev-libs/libxml2 +" +DEPEND="${RDEPEND}" +# TODO: investigate & drop this! +BDEPEND="sys-apps/which" + +# We don't pass the flag explicitly, bug #796776. +# Let's fix it upstream after next autogen release if it happens. +QA_CONFIGURE_OPTIONS+=" --enable-snprintfv-convenience" + +PATCHES=( + "${FILESDIR}"/${PN}-5.18.16-no-werror.patch + "${FILESDIR}"/${PN}-5.18.16-rpath.patch + "${FILESDIR}"/${PN}-5.18.16-respect-TMPDIR.patch + "${FILESDIR}"/${PN}-5.18.16-make-4.3.patch + "${FILESDIR}"/${PN}-5.18.16-guile-3.patch + "${FILESDIR}"/${PN}-5.18.16-configure-c99.patch + "${FILESDIR}"/${PN}-5.18.16-FORTIFY_SOURCE.patch +) + +src_prepare() { + default + + # missing tarball file + cp "${DISTDIR}"/${P}-gnulib-3b57ddee0acffd23cc51bc8910a15cf879f90619-lib-verify.h autoopts/verify.h || die + + # May be able to drop this on next release (>5.18.16) + eautoreconf +} + +src_configure() { + # suppress possibly incorrect -R flag + export ag_cv_test_ldflags= + + # autogen requires run-time sanity of regex and string functions. + # Use defaults of linux-glibc until we need somethig more advanced. + if tc-is-cross-compiler ; then + export ag_cv_run_strcspn=no + export libopts_cv_with_libregex=yes + fi + + econf $(use_enable static-libs static) +} + +src_install() { + default + + find "${ED}" -name '*.la' -delete || die + + if ! use libopts ; then + rm "${ED}"/usr/share/autogen/libopts-*.tar.gz || die + fi +} diff --git a/sys-devel/autogen/files/autogen-5.18.16-FORTIFY_SOURCE.patch b/sys-devel/autogen/files/autogen-5.18.16-FORTIFY_SOURCE.patch new file mode 100644 index 000000000000..b8108c1c0ed1 --- /dev/null +++ b/sys-devel/autogen/files/autogen-5.18.16-FORTIFY_SOURCE.patch @@ -0,0 +1,100 @@ +https://bugs.gentoo.org/889394 +https://sourceforge.net/p/autogen/bugs/212/ +https://bugzilla.redhat.com/2173623 +https://siddhesh.in/posts/that-is-not-a-number-that-is-a-freed-object.html +https://gcc.gnu.org/PR105217 +https://src.fedoraproject.org/rpms/autogen/blob/684b717191dd8bcd4e01a7775e62d50bc41b8ccb/f/autogen-fortify.patch + +commit 772b282a4e858a27af610bcdcc8b66925cbf1a83 +Author: Tomas Korbar +Date: Tue Feb 28 16:08:13 2023 +0100 + + avoid GCC code analysis bug + +--- a/agen5/defLoad.c ++++ b/agen5/defLoad.c +@@ -448,17 +448,28 @@ read_defs(void) + FILE * fp; + def_input_mode_t in_mode = ready_def_input(&def_fname, &data_sz); + ++ /* ++ * "ready_def_input" has a lot of side effects. It's possible that ++ * there are no definitions, so "in_mode" is set to DONE and there's ++ * nothing to do. ++ */ + if (in_mode == INPUT_DONE) + return; + + /* + * Allocate the space we need for our definitions. ++ * "data_sz" was set by read_def_input to the size of the ++ * definitions file (or 4096 if we're reading from a fifo file). ++ * In that alternate case, we'll start the input size at 4096 bytes. ++ * The allocation includes space for context and a NUL byte or two + */ +- rem_sz = data_sz+4+sizeof(*base_ctx); +- base_ctx = (scan_ctx_t *)AGALOC(rem_sz, "file buf"); +- memset(VOIDP(base_ctx), 0, rem_sz); ++ { ++ size_t sz = data_sz + sizeof(long) + sizeof(*base_ctx); ++ base_ctx = (scan_ctx_t *)AGALOC(sz, "file buf"); ++ memset(VOIDP(base_ctx), 0, sz); ++ } + base_ctx->scx_line = 1; +- rem_sz = data_sz; ++ rem_sz = data_sz; // size available for storing def text + + /* + * Our base context will have its currency pointer set to this +@@ -482,6 +493,9 @@ read_defs(void) + if (fp == NULL) + AG_CANT(READ_DEF_OPEN, def_fname); + ++ /* ++ * If we're emitting dependency information, then do so. ++ */ + if (dep_fp != NULL) + add_source_file(def_fname); + } +@@ -516,8 +530,7 @@ read_defs(void) + * See if there is any space left + */ + if (rem_sz == 0) { +- scan_ctx_t * p; +- off_t dataOff; ++ off_t scan_off; + + /* + * IF it is a regular file, then we are done +@@ -527,24 +540,16 @@ read_defs(void) + + /* + * We have more data and we are out of space. +- * Try to reallocate our input buffer. ++ * AGREALOC will succeed or not return. + */ + data_sz += (rem_sz = 0x1000); +- dataOff = data - base_ctx->scx_data; +- p = AGREALOC(VOIDP(base_ctx), data_sz + 4 + sizeof(*base_ctx), +- "expand f buf"); ++ scan_off = data - base_ctx->scx_data; ++ base_ctx = AGREALOC(VOIDP(base_ctx), data_sz + 4 + sizeof(*base_ctx), ++ "expand f buf"); + +- /* +- * The buffer may have moved. Set the data pointer at an +- * offset within the new buffer and make sure our base pointer +- * has been corrected as well. +- */ +- if (p != base_ctx) { +- p->scx_scan = \ +- p->scx_data = (char *)(p + 1); +- data = p->scx_data + dataOff; +- base_ctx = p; +- } ++ base_ctx->scx_scan = \ ++ base_ctx->scx_data = (char *)(base_ctx + 1); ++ data = base_ctx->scx_data + scan_off; + } + } + diff --git a/sys-devel/autogen/files/autogen-5.18.16-configure-c99.patch b/sys-devel/autogen/files/autogen-5.18.16-configure-c99.patch new file mode 100644 index 000000000000..75e2e760a792 --- /dev/null +++ b/sys-devel/autogen/files/autogen-5.18.16-configure-c99.patch @@ -0,0 +1,42 @@ +https://bugs.gentoo.org/898590 +https://src.fedoraproject.org/rpms/autogen/c/7d157d98e73dcd1602111309a690643faa80e207?branch=rawhide +--- a/config/ag_macros.m4 ++++ b/config/ag_macros.m4 +@@ -113,7 +113,7 @@ AC_DEFUN([INVOKE_AG_MACROS_LAST],[ + fi + + AC_CACHE_CHECK([for static inline], [snv_cv_static_inline], [ +- AC_TRY_COMPILE([static inline foo(bar) int bar; { return bar; }], ++ AC_TRY_COMPILE([static inline int foo(bar) int bar; { return bar; }], + [return foo(0);], + [snv_cv_static_inline='static inline'], + [snv_cv_static_inline='static']) +@@ -428,7 +428,7 @@ int main (int argc, char ** argv) { + char zRej@<:@@:>@ = reject; + char zAcc@<:@@:>@ = "a-ok-eject"; + return strcspn( zAcc, zRej ) - 5; +-}] )] ++}] )], + [ag_cv_run_strcspn=yes],[ag_cv_run_strcspn=no],[ag_cv_run_strcspn=no] + ) # end of RUN_IFELSE + ]) # end of AC_CACHE_VAL for ag_cv_run_strcspn +--- a/configure ++++ b/configure +@@ -17338,7 +17338,7 @@ int main (int argc, char ** argv) { + char zAcc[] = "a-ok-eject"; + return strcspn( zAcc, zRej ) - 5; + } +- ag_cv_run_strcspn=yes ++#error + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + ag_cv_run_strcspn=no +@@ -18406,7 +18405,7 @@ else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-static inline foo(bar) int bar; { return bar; } ++static inline int foo(bar) int bar; { return bar; } + int + main () + {