diff --git a/0001-python-support-noinst_PYTHON-preceding-foo_PYTHON.patch b/0001-python-support-noinst_PYTHON-preceding-foo_PYTHON.patch new file mode 100644 index 0000000000000000000000000000000000000000..5d60b9a02b40c81f1b8dab6411c2deb038d5d41d --- /dev/null +++ b/0001-python-support-noinst_PYTHON-preceding-foo_PYTHON.patch @@ -0,0 +1,58 @@ +From ab347652df9ff8f65ba1be6aaa357cf3c2b16dca Mon Sep 17 00:00:00 2001 +From: Bogdan +Date: Wed, 5 Jul 2023 08:59:29 -0700 +Subject: [PATCH] python: support noinst_PYTHON preceding foo_PYTHON. + +This change fixes https://bugs.gnu.org/24507. + +* lib/am/python.am (am__pep3147_tweak): remove conditional +on %?INSTALL%. +* t/python-pr10995.sh: test with make uninstall. +--- + lib/am/python.am | 4 ++-- + t/python-pr10995.sh | 6 ++++++ + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/lib/am/python.am b/lib/am/python.am +index 98f95af1b..19f268efc 100644 +--- a/lib/am/python.am ++++ b/lib/am/python.am +@@ -94,11 +94,11 @@ endif %?INSTALL% + ## Uninstalling. ## + ## -------------- ## + +-if %?INSTALL% +- + ?FIRST?am__pep3147_tweak = \ + ?FIRST? sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.pyc __pycache__/&.*.pyo|' + ++if %?INSTALL% ++ + .PHONY uninstall-am: uninstall-%DIR%PYTHON + uninstall-%DIR%PYTHON: + @$(NORMAL_UNINSTALL) +diff --git a/t/python-pr10995.sh b/t/python-pr10995.sh +index 324be916e..abeb8a124 100644 +--- a/t/python-pr10995.sh ++++ b/t/python-pr10995.sh +@@ -17,6 +17,9 @@ + # Test automake bug#10995: am__py_compile doesn't get correctly defined + # when there a 'noinst_PYTHON' declaration precedes a 'foo_PYTHON' + # declaration. ++# Test also automake bug#24507: am__pep3147_tweak doesn't get correctly ++# defined when there a 'noinst_PYTHON' declaration precedes a 'foo_PYTHON' ++# declaration and 'make uninstall' fails functionally (just shows errors). + + required=python + . test-init.sh +@@ -53,4 +56,7 @@ py_installed --not inst/py/no.pyc + + $MAKE disttest + ++LC_ALL=C run_make -M uninstall ++grep 'command substitution' output && exit 1 ++ + : +-- +2.47.0 + diff --git a/0001-test-another-check-for-PEP-3147-induced-by-Python-3..patch b/0001-test-another-check-for-PEP-3147-induced-by-Python-3..patch new file mode 100644 index 0000000000000000000000000000000000000000..a83b1f628422db8bdd61c9a4ecbf006bd4a7dd48 --- /dev/null +++ b/0001-test-another-check-for-PEP-3147-induced-by-Python-3..patch @@ -0,0 +1,32 @@ +From f5b7751be8fb0fb9238f1d6acd5d6b592ad942cc Mon Sep 17 00:00:00 2001 +From: Bogdan +Date: Sun, 28 Jan 2024 18:12:50 -0800 +Subject: [PATCH] test: another check for PEP-3147 induced by Python 3.12.1. + +Fix for more of https://bugs.gnu.org/68119. + +* t/ax/am-test-lib.sh (python_has_pep3147) : +check sys.implementation.cache_tag as well as the (old) +imp.get_tag. For Python 3.12.1. +--- + t/ax/am-test-lib.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/t/ax/am-test-lib.sh b/t/ax/am-test-lib.sh +index 547b82bd4..72f409784 100644 +--- a/t/ax/am-test-lib.sh ++++ b/t/ax/am-test-lib.sh +@@ -634,6 +634,10 @@ python_has_pep3147 () + am_pep3147_tag=$($PYTHON -c 'import imp; print(imp.get_tag())') \ + || am_pep3147_tag=none + fi ++ if test "$am_pep3147_tag" = "none"; then ++ am_pep3147_tag=$($PYTHON -c 'import sys; print(sys.implementation.cache_tag)') \ ++ || am_pep3147_tag=none ++ fi + test $am_pep3147_tag != none + } + am_pep3147_tag= +-- +2.47.0 + diff --git a/0001-test-avoid-apostrophe-in-test-document.patch b/0001-test-avoid-apostrophe-in-test-document.patch new file mode 100644 index 0000000000000000000000000000000000000000..1e4a0ab72176874bd6ee18df8c90adb398dfbd66 --- /dev/null +++ b/0001-test-avoid-apostrophe-in-test-document.patch @@ -0,0 +1,51 @@ +From ed1368e8803e8934a8bbab52a38753484dba2a37 Mon Sep 17 00:00:00 2001 +From: Karl Berry +Date: Mon, 12 Dec 2022 14:50:33 -0800 +Subject: [PATCH] test: avoid apostrophe in test document. + +From automake patch https://bugs.gnu.org/59989 +(though a different solution), suggestion by Frederic Berat. + +* t/txinfo-include.sh: avoid apostrophes in test document, +since Texinfo 7.0 turns them into UTF-8 by default. +--- + t/txinfo-include.sh | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/t/txinfo-include.sh b/t/txinfo-include.sh +index 8a15f01b0..10fff0753 100644 +--- a/t/txinfo-include.sh ++++ b/t/txinfo-include.sh +@@ -28,6 +28,9 @@ main_TEXINFOS = one.texi two.texi three.texi + sub_more_TEXINFOS = sub/desc.texi sub/hist.texi + END + ++# We avoid apostrophes in the test document since Texinfo ++# turns them into UTF-8, which is not easy to grep. ++# + cat > main.texi << 'END' + \input texinfo + @setfilename main.info +@@ -61,8 +64,8 @@ END + + cat > three.texi << 'END' + @node three +-@chapter Chapter two +-GNU's Not Unix. ++@chapter Chapter three ++Quux quux quux. + END + + mkdir sub +@@ -106,7 +109,7 @@ check_info_contents () + srcdir=${1-.} + $FGREP "Foo bar, baz." $srcdir/main.info + $FGREP "Blah Blah Blah." $srcdir/main.info +- $FGREP "GNU's Not Unix." $srcdir/main.info ++ $FGREP "Quux quux quux." $srcdir/main.info + $FGREP 'It does something, really.' $srcdir/sub/more.info + $FGREP 'It was written somehow.' $srcdir/sub/more.info + } +-- +2.39.0 + diff --git a/0001-tests-Fix-type-defaults-error-in-link_cond-due-to-ma.patch b/0001-tests-Fix-type-defaults-error-in-link_cond-due-to-ma.patch new file mode 100644 index 0000000000000000000000000000000000000000..e08b977bc829bb5a9012b4215ccbf298f2ff00b6 --- /dev/null +++ b/0001-tests-Fix-type-defaults-error-in-link_cond-due-to-ma.patch @@ -0,0 +1,31 @@ +From 2a9908da9dbc075ee6c4e853cf3be0365b15f202 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20B=C3=A9rat?= +Date: Mon, 12 Dec 2022 08:05:53 +0100 +Subject: [PATCH] tests: Fix 'type defaults' error in link_cond due to main not + being properly declared + +This is related to an effort to prepare Automake for future GCC/Clang +versions which set c99 as default standard to be used. +Not properly declaring main as "int main(...)" is rejected since c99. + +* t/link_cond.sh: Add (void) to main definition. +--- + t/link_cond.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/t/link_cond.sh b/t/link_cond.sh +index 45d0d7f40..889623131 100644 +--- a/t/link_cond.sh ++++ b/t/link_cond.sh +@@ -52,7 +52,7 @@ $AUTOCONF + rm -f *.c++ + cat > less.c <<'END' + /* Valid C but deliberately invalid C++ */ +-main () ++int main (void) + { + int new = 0; + return new; +-- +2.39.1 + diff --git a/0001-tests-depcomp-ensure-make_ok-fails-when-run_make-fai.patch b/0001-tests-depcomp-ensure-make_ok-fails-when-run_make-fai.patch new file mode 100644 index 0000000000000000000000000000000000000000..5ffb9c6f58642ebb5bf8b9527af2e5651b74a0ff --- /dev/null +++ b/0001-tests-depcomp-ensure-make_ok-fails-when-run_make-fai.patch @@ -0,0 +1,34 @@ +From 6d6fc91c472fd84bd71a1b012fa9ab77bd94efea Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20B=C3=A9rat?= +Date: Mon, 12 Dec 2022 07:32:13 +0100 +Subject: [PATCH] tests: depcomp: ensure make_ok() fails when run_make fails + +While running automake tests with -std-gnu=c99, the compiler report +errors which lead to make to fail. Yet, these failures are ignored +during the tests, which considers them to be successful as stderror is +check for one specific pattern. + +If make fails, investigation should be made to discover why, whatever +the reason for the failure is. + +* t/ax/depcomp.sh: Make make_ok fail when make fails. +--- + t/ax/depcomp.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/t/ax/depcomp.sh b/t/ax/depcomp.sh +index 3c4db10e3..7a3ac63a7 100644 +--- a/t/ax/depcomp.sh ++++ b/t/ax/depcomp.sh +@@ -160,7 +160,7 @@ case $depcomp_with_libtool in + echo lib_LTLIBRARIES = libfoo.la >> Makefile.am + make_ok () + { +- run_make -M -- ${1+"$@"} ++ run_make -M -- ${1+"$@"} || return 1 + $FGREP 'unknown directive' output && return 1 + rm -f output + # Checks for stray files possibly left around by less common +-- +2.39.1 + diff --git a/automake.spec b/automake.spec index fdcd88affc68699be16b8f645ab89b3c21fe26cb..79a02e10a277c76ab77793d1d0f0695c2bf50498 100644 --- a/automake.spec +++ b/automake.spec @@ -1,4 +1,4 @@ -%define anolis_release 4 +%define anolis_release 5 # perform 'make check' by default %bcond_without check @@ -14,6 +14,13 @@ URL: http://www.gnu.org/software/automake/ Source0: ftp://ftp.gnu.org/gnu/automake/automake-%{version}.tar.xz Patch0001: 0001-Add-sw_64-arch-support.patch +Patch2: v3-0003-tests-Fix-implicit-function-declaration-in-ax-dep.patch +Patch3: v2-0002-tests-Fix-implicit-function-declaration-errors.patch +Patch4: 0001-tests-depcomp-ensure-make_ok-fails-when-run_make-fai.patch +Patch5: 0001-test-another-check-for-PEP-3147-induced-by-Python-3..patch +Patch6: 0001-python-support-noinst_PYTHON-preceding-foo_PYTHON.patch +Patch7: 0001-test-avoid-apostrophe-in-test-document.patch +Patch8: 0001-tests-Fix-type-defaults-error-in-link_cond-due-to-ma.patch BuildRequires: autoconf BuildRequires: coreutils @@ -40,6 +47,14 @@ BuildRequires: libtool BuildRequires: ncompress BuildRequires: sharutils BuildRequires: vala +BuildRequires: imake +BuildRequires: lzip +BuildRequires: texinfo-tex +BuildRequires: gcc-objc++ +BuildRequires: gcc-objc +BuildRequires: 2.65 +BuildRequires: perl-interpreter +BuildRequires: >= %endif Requires: autoconf >= 2.65 @@ -109,6 +124,12 @@ make install DESTDIR=%{buildroot} %doc AUTHORS README THANKS NEWS README.aclocal README.multilib %changelog +* Fri Aug 08 2025 wenyuzifang - 1.16.5-5 +- Fix test failure, ensure valid compilation with C99, avoid implicit function declaration errors +- Fix test failure, ensure valid compilation with C99, avoid implicit function declaration errors +- Fix test failure, ensure valid compilation with C99, avoid implicit function declaration errors +- Fix uninstall errors and ensure reliable removal of Python bytecode files +- Apply patch to ensure compatibility with modern compilers and prevent build failures * Fri Mar 7 2025 zhuyunfei - 1.16.5-4 - Add sw_64 arch support diff --git a/v2-0002-tests-Fix-implicit-function-declaration-errors.patch b/v2-0002-tests-Fix-implicit-function-declaration-errors.patch new file mode 100644 index 0000000000000000000000000000000000000000..b882e0391bed63e5d4f1cfb9eec48813b6122e6c --- /dev/null +++ b/v2-0002-tests-Fix-implicit-function-declaration-errors.patch @@ -0,0 +1,265 @@ +From 38f4f6dcdb907e0006a8e83246e010d5d5cad98d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20B=C3=A9rat?= +Date: Thu, 8 Dec 2022 10:09:14 +0100 +Subject: [PATCH v2 2/3] tests: Fix implicit function declaration errors +In-Reply-To: <20221212070554.1635775-3-fberat@redhat.com> + +Changes from v1: + Modifications to "t/ax/depcomp.sh" have been moved to a dedicated patch + +-- 8< -- + +This is related to an effort to prepare Automake for future GCC/Clang +versions which set c99 as default standard to be used. + +Function should be properly declared prior to use in order to be +compatible with c99 standard. +This is valid for both local functions and standard functions (as +printf). + +Modified files: + + * t/c-demo.sh + * t/cond35.sh + * t/dist-vs-built-sources.sh + * t/lex-clean.sh + * t/lex-multiple.sh + * t/lex-nodist.sh + * t/ltcond2.sh + * t/ltconv.sh + * t/subobj-clean-lt-pr10697.sh + * t/subobj-clean-pr10697.sh + * t/tags-pr12372.sh + * t/yacc-basic.sh + * t/yacc-clean.sh + * t/yacc-nodist.sh +--- + t/c-demo.sh | 1 + + t/cond35.sh | 2 ++ + t/dist-vs-built-sources.sh | 1 + + t/lex-clean.sh | 1 + + t/lex-multiple.sh | 4 ++++ + t/lex-nodist.sh | 2 ++ + t/ltcond2.sh | 2 ++ + t/ltconv.sh | 6 ++++++ + t/subobj-clean-lt-pr10697.sh | 10 +++++++++- + t/subobj-clean-pr10697.sh | 10 +++++++++- + t/tags-pr12372.sh | 3 ++- + t/yacc-basic.sh | 1 + + t/yacc-clean.sh | 4 ++++ + t/yacc-nodist.sh | 2 ++ + 14 files changed, 46 insertions(+), 3 deletions(-) + +diff --git a/t/c-demo.sh b/t/c-demo.sh +index 7e0e8d64f..d25bf214b 100644 +--- a/t/c-demo.sh ++++ b/t/c-demo.sh +@@ -113,6 +113,7 @@ test -f build-aux/compile # We have per-target flags on C sources. + ./configure --enable-dependency-tracking + + cat > src/main.c << 'END' ++#include + #include "foo.h" + #include "bar.h" + int main (void) +diff --git a/t/cond35.sh b/t/cond35.sh +index 215a22548..bad133970 100644 +--- a/t/cond35.sh ++++ b/t/cond35.sh +@@ -73,6 +73,8 @@ END + + cat > tparse.y << 'END' + %{ ++extern int yylex(void); ++ + void yyerror (const char *s) {} + %} + %token EOF +diff --git a/t/dist-vs-built-sources.sh b/t/dist-vs-built-sources.sh +index d038e66dd..db2776f9a 100644 +--- a/t/dist-vs-built-sources.sh ++++ b/t/dist-vs-built-sources.sh +@@ -41,6 +41,7 @@ foo_SOURCES = foo.c + END + + cat > foo.c << 'END' ++#include + #include "h.h" + int main (void) { printf ("%s\n", F); return 0; } + END +diff --git a/t/lex-clean.sh b/t/lex-clean.sh +index 5aa199338..e53da8fd2 100644 +--- a/t/lex-clean.sh ++++ b/t/lex-clean.sh +@@ -61,6 +61,7 @@ cat > lexer.l << 'END' + END + + cat > main.c << 'END' ++extern int yylex (void); + int main (void) + { + return yylex (); +diff --git a/t/lex-multiple.sh b/t/lex-multiple.sh +index 2655b633e..bf119ec84 100644 +--- a/t/lex-multiple.sh ++++ b/t/lex-multiple.sh +@@ -56,6 +56,10 @@ cat > main.c << 'END' + #include + #include + ++extern int yylex (void); ++extern int foolex (void); ++extern int bar_lex (void); ++ + int main (int argc, char *argv[]) + { + if (argc != 2) +diff --git a/t/lex-nodist.sh b/t/lex-nodist.sh +index 599539405..187dd5437 100644 +--- a/t/lex-nodist.sh ++++ b/t/lex-nodist.sh +@@ -62,6 +62,8 @@ CLEANFILES = $(nodist_prog_SOURCES) + END + + cat > main.c << 'END' ++extern int yylex (void); ++ + int main () + { + return yylex (); +diff --git a/t/ltcond2.sh b/t/ltcond2.sh +index 29244c9b3..7e7bcadc4 100644 +--- a/t/ltcond2.sh ++++ b/t/ltcond2.sh +@@ -73,6 +73,8 @@ void print (void) + END + + cat > main.c <<'END' ++extern void print(void); ++ + int main (void) + { + print(); +diff --git a/t/ltconv.sh b/t/ltconv.sh +index 2c4cc47a1..ec79ef80e 100644 +--- a/t/ltconv.sh ++++ b/t/ltconv.sh +@@ -91,6 +91,12 @@ echo 'int sub22 () { return 22; }' > sub2/sub22/sub22.c + + cat >test.c <<'EOF' + #include ++ ++extern int sub1 (void); ++extern int sub2 (void); ++extern int sub21 (void); ++extern int sub22 (void); ++ + int main () + { + if (1 != sub1 ()) +diff --git a/t/subobj-clean-lt-pr10697.sh b/t/subobj-clean-lt-pr10697.sh +index bb656c43f..53fc02f09 100644 +--- a/t/subobj-clean-lt-pr10697.sh ++++ b/t/subobj-clean-lt-pr10697.sh +@@ -83,7 +83,15 @@ libfoo_la_SOURCES = \ + END + + mkdir sub1 sub2 +-echo 'int libmain (void)' > main.c ++ ++echo "/* Subobj clean: libtool case*/" > main.c ++for i in 1 2; do ++ for j in a b c d e f; do ++ echo "extern void $j$i (void);" >> main.c ++ done ++done ++ ++echo 'int libmain (void)' >> main.c + echo '{' >> main.c + for i in 1 2; do + for j in a b c d e f; do +diff --git a/t/subobj-clean-pr10697.sh b/t/subobj-clean-pr10697.sh +index f77de8c92..a7f97f6d1 100644 +--- a/t/subobj-clean-pr10697.sh ++++ b/t/subobj-clean-pr10697.sh +@@ -81,7 +81,15 @@ foo_SOURCES = \ + END + + mkdir sub1 sub2 +-echo 'int main (void)' > main.c ++ ++echo "/* Subobj clean: generic case*/" > main.c ++for i in 1 2; do ++ for j in a b c d e f; do ++ echo "extern void $j$i (void);" >> main.c ++ done ++done ++ ++echo 'int main (void)' >> main.c + echo '{' >> main.c + for i in 1 2; do + for j in a b c d e f; do +diff --git a/t/tags-pr12372.sh b/t/tags-pr12372.sh +index b9c022f70..1a9e1e026 100644 +--- a/t/tags-pr12372.sh ++++ b/t/tags-pr12372.sh +@@ -53,7 +53,8 @@ noinst_PROGRAMS = zap + zap_SOURCES = zardoz.pc + END + +-echo 'int main(void) [ return bar(1); ]' > foo-main.pc ++echo 'extern int bar(int);' > foo-main.pc ++echo 'int main(void) [ return bar(1); ]' >> foo-main.pc + echo 'int bar(int x) { return !x; }' > barbar.c + echo 'int m@in(void) { return 0; }' > sub/zardoz.pc + +diff --git a/t/yacc-basic.sh b/t/yacc-basic.sh +index 5b258a30c..8cc0d06a2 100644 +--- a/t/yacc-basic.sh ++++ b/t/yacc-basic.sh +@@ -49,6 +49,7 @@ a : 'a' { exit(0); }; + END + + cat > foo.c << 'END' ++extern int yyparse(void); + int main () { yyparse (); return 1; } + END + +diff --git a/t/yacc-clean.sh b/t/yacc-clean.sh +index 373774b6a..fef079cf3 100644 +--- a/t/yacc-clean.sh ++++ b/t/yacc-clean.sh +@@ -65,6 +65,8 @@ END + + cat > sub1/parse.y << 'END' + %{ ++#include ++ + int yylex () { return (getchar ()); } + void yyerror (const char *s) {} + %} +@@ -74,6 +76,8 @@ END + cp sub1/parse.y sub2/parse.y + + cat > sub1/main.c << 'END' ++extern int yyparse(void); ++ + int main () + { + return yyparse (); +diff --git a/t/yacc-nodist.sh b/t/yacc-nodist.sh +index d350a80f9..4a8ebe9ca 100644 +--- a/t/yacc-nodist.sh ++++ b/t/yacc-nodist.sh +@@ -78,6 +78,8 @@ BUILT_SOURCES = parse.h + END + + cat > sub1/main.c << 'END' ++extern int yyparse(void); ++ + int main () + { + return yyparse (); +-- +2.38.1 + diff --git a/v3-0003-tests-Fix-implicit-function-declaration-in-ax-dep.patch b/v3-0003-tests-Fix-implicit-function-declaration-in-ax-dep.patch new file mode 100644 index 0000000000000000000000000000000000000000..4ff1f4e01ba6e5797569aa587414b02d2234810a --- /dev/null +++ b/v3-0003-tests-Fix-implicit-function-declaration-in-ax-dep.patch @@ -0,0 +1,58 @@ +From 5e74354030fe88e038a6fc1b3f4c2321df150352 Mon Sep 17 00:00:00 2001 +From: Frederic Berat +Date: Fri, 16 Dec 2022 06:42:45 +0100 +Subject: [PATCH v3] tests: Fix implicit function declaration in ax/depcomp.sh +In-Reply-To: <20230113064804.580F5340B54@smtp.gentoo.org> + +Change since v2: + - Replace the mv operation by a cp operation to ensure that subfoo.h is + considered being modified. + +-- 8< -- + +In depcomp.sh, the following occurs: + +1. Files are created so that headers and units are available in + subdirectories +2. Multiple "make" are executed, while modifying the content of the + headers, some should fail, others should succeed. +3. At the end, the "sub/subfoo.h" header gets removed. +4. make is executed again, which is expected to succeed. + +Yet, with c99, this can't work as the subfoo.h header contains +declaration that are used by foo.c. +Thus, we need to get them back, either by inserting the declaration in +foo.c (or any other header/unit), or by restoring subfoo.h to its +original state. + +The later solution seems the easiest path, being less intrusive in +depcomp.sh. +--- + t/ax/depcomp.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/t/ax/depcomp.sh b/t/ax/depcomp.sh +index 7a3ac63a7..c92f7c8df 100644 +--- a/t/ax/depcomp.sh ++++ b/t/ax/depcomp.sh +@@ -243,6 +243,7 @@ cat > sub/subfoo.h <<'END' + #include + extern int subfoo (void); + END ++cp sub/subfoo.h sub/subfoo.save + + cat > src/baz.c <<'END' + #include "baz.h" +@@ -399,8 +400,7 @@ do_test () + && rewrite "$srcdir"/sub/subfoo.h echo 'choke me' \ + && not $MAKE \ + && delete "$srcdir"/sub/subfoo.h \ +- && edit "$srcdir"/sub/subfoo.c -e 1d \ +- && edit "$srcdir"/foo.h -e 2d \ ++ && cp "$srcdir"/sub/subfoo.save "$srcdir"/sub/subfoo.h \ + && make_ok \ + || r='not ok' + result_ "$r" "$pfx dependency tracking works" +-- +2.39.0 +