From 7db31c182dcea5e5a568e5930b948446cbcf9d3c Mon Sep 17 00:00:00 2001 From: bizhiyuan Date: Tue, 29 Oct 2024 19:12:48 +0800 Subject: [PATCH] Build: Remove build-time support for running splint. Build: Remove unneeded cruft from configure.ac --- ...uild-time-support-for-running-splint.patch | 66 +++++++++++++++++++ ...ove-unneeded-cruft-from-configure.ac.patch | 62 +++++++++++++++++ booth.spec | 9 ++- 3 files changed, 135 insertions(+), 2 deletions(-) create mode 100644 backport-Build-Remove-build-time-support-for-running-splint.patch create mode 100644 backport-Build-Remove-unneeded-cruft-from-configure.ac.patch diff --git a/backport-Build-Remove-build-time-support-for-running-splint.patch b/backport-Build-Remove-build-time-support-for-running-splint.patch new file mode 100644 index 0000000..4870750 --- /dev/null +++ b/backport-Build-Remove-build-time-support-for-running-splint.patch @@ -0,0 +1,66 @@ +From 6f3dee6613da932062de3c2fad00e1e472601585 Mon Sep 17 00:00:00 2001 +From: Chris Lumens +Date: Wed, 26 Jun 2024 15:44:56 -0400 +Subject: [PATCH 45/50] Build: Remove build-time support for running splint. + +This is a C linter that sees commits only very seldomly, and there's no +references in the booth git log to any commits to fix problems by +splint. This leads me to believe that probably no one is actually +running it. +--- + Makefile.am | 3 --- + configure.ac | 5 ----- + src/Makefile.am | 3 --- + 3 files changed, 11 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 1148203..1115043 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -119,9 +119,6 @@ uninstall-local: + + test: check + +-lint: +- for dir in src; do make -C $$dir lint; done +- + clean-local: + rm -rf test/*.pyc test/__pycache__ test/runtests.py test/boothtestenv.py cov* $(SPEC) + -rm -rf booth-*.rpm $(TARFILE) +diff --git a/configure.ac b/configure.ac +index 6b86bbe..3a8ebec 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -180,9 +180,6 @@ cc_supports_flag() { + ## local defines + PACKAGE_FEATURES="" + +-LINT_FLAGS="-weak -unrecog +posixlib +ignoresigns -fcnuse \ +- -badflag -D__gnuc_va_list=va_list -D__attribute\(x\)=" +- + # local options + + AC_ARG_ENABLE([fatal-warnings], +@@ -475,8 +472,6 @@ LIBS="$LIBS $XML_LIBS $LIBGNUTLS_LIBS" + # substitute what we need: + AC_SUBST([INITDDIR]) + +-AC_SUBST([LINT_FLAGS]) +- + BOOTH_LIB_DIR=${localstatedir}/lib/booth + BOOTH_CORE_DIR=${localstatedir}/lib/booth/cores + BOOTHSYSCONFDIR=${sysconfdir}/booth +diff --git a/src/Makefile.am b/src/Makefile.am +index 4023791..b3c35bb 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -53,6 +53,3 @@ endif + if COREDUMP_NURSING + boothd_LDADD += -lplumb + endif +- +-lint: +- -splint $(INCLUDES) $(LINT_FLAGS) $(CFLAGS) *.c +-- +2.25.1 + diff --git a/backport-Build-Remove-unneeded-cruft-from-configure.ac.patch b/backport-Build-Remove-unneeded-cruft-from-configure.ac.patch new file mode 100644 index 0000000..addedbc --- /dev/null +++ b/backport-Build-Remove-unneeded-cruft-from-configure.ac.patch @@ -0,0 +1,62 @@ +From b8c9ff822dfed1d5de2eb99726dff7f77122d956 Mon Sep 17 00:00:00 2001 +From: Chris Lumens +Date: Wed, 26 Jun 2024 16:17:34 -0400 +Subject: [PATCH 46/50] Build: Remove unneeded cruft from configure.ac. + +* Whatever WITH_LIST used to do, it is no longer referenced anywhere. + +* Remove support for building as ANSI C. +--- + configure.ac | 15 +-------------- + 1 file changed, 1 insertion(+), 14 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 3a8ebec..97abbbd 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -20,8 +20,6 @@ AC_CANONICAL_HOST + + AC_LANG([C]) + +-AC_SUBST(WITH_LIST, [""]) +- + dnl Fix default variables - "prefix" variable if not specified + if test "$prefix" = "NONE"; then + prefix="/usr" +@@ -436,16 +434,6 @@ else + COVERAGE_LDFLAGS="" + fi + +- +-if test "x${enable_ansi}" = xyes && \ +- cc_supports_flag -std=iso9899:199409 ; then +- AC_MSG_NOTICE([Enabling ANSI Compatibility]) +- ANSI_CPPFLAGS="-ansi -D_GNU_SOURCE -DANSI_ONLY" +- PACKAGE_FEATURES="$PACKAGE_FEATURES ansi" +-else +- ANSI_CPPFLAGS="" +-fi +- + if test "x${enable_fatal_warnings}" = xyes && \ + cc_supports_flag -Werror ; then + AC_MSG_NOTICE([Enabling Fatal Warnings (-Werror)]) +@@ -465,7 +453,7 @@ fi + # final build of *FLAGS + CFLAGS="$ENV_CFLAGS $OPT_CFLAGS $GDB_FLAGS $OS_CFLAGS \ + $COVERAGE_CFLAGS $EXTRA_WARNINGS $WERROR_CFLAGS $LIBGNUTLS_CFLAGS" +-CPPFLAGS="$ENV_CPPFLAGS $ANSI_CPPFLAGS $OS_CPPFLAGS $GLIB_CFLAGS $RESMON_CFLAGS $XML_CFLAGS" ++CPPFLAGS="$ENV_CPPFLAGS $OS_CPPFLAGS $GLIB_CFLAGS $RESMON_CFLAGS $XML_CFLAGS" + LDFLAGS="$ENV_LDFLAGS $COVERAGE_LDFLAGS $OS_LDFLAGS" + LIBS="$LIBS $XML_LIBS $LIBGNUTLS_LIBS" + +@@ -521,7 +509,6 @@ AC_MSG_RESULT([ Extra compiler warnings = ${EXTRA_WARNING}]) + AC_MSG_RESULT([ Env. defined CFLAG = ${ENV_CFLAGS}]) + AC_MSG_RESULT([ Env. defined CPPFLAGS = ${ENV_CPPFLAGS}]) + AC_MSG_RESULT([ Env. defined LDFLAGS = ${ENV_LDFLAGS}]) +-AC_MSG_RESULT([ ANSI defined CPPFLAGS = ${ANSI_CPPFLAGS}]) + AC_MSG_RESULT([ Coverage CFLAGS = ${COVERAGE_CFLAGS}]) + AC_MSG_RESULT([ Coverage LDFLAGS = ${COVERAGE_LDFLAGS}]) + AC_MSG_RESULT([ Fatal War. CFLAGS = ${WERROR_CFLAGS}]) +-- +2.25.1 + diff --git a/booth.spec b/booth.spec index 054f9f0..f36eed9 100644 --- a/booth.spec +++ b/booth.spec @@ -24,7 +24,7 @@ %bcond_with run_build_tests %bcond_with include_unit_test -%global release 6 +%global release 7 ## User and group to use for nonprivileged services (should be in sync with pacemaker) %global uname hacluster @@ -66,7 +66,8 @@ patch15: backport-Refactor-Remove-global-booth_conf-variable-in-find_myse patch16: backport-Refactor-Add-a-function-to-convert-a-BOOTH_DAEMON_ST.patch patch17: backport-Refactor-Add-a-function-to-get-the-port-from-a-booth.patch patch18: backport-Refactor-Use-asprintf-instead-of-a-static-buffer-in-.patch - +patch19: backport-Build-Remove-build-time-support-for-running-splint.patch +patch20: backport-Build-Remove-unneeded-cruft-from-configure.ac.patch # direct build process dependencies BuildRequires: autoconf BuildRequires: automake @@ -314,6 +315,10 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Tue Oct 29 2024 bizhiyuan -1.2-7 +- Build: Remove build-time support for running splint. +- Build: Remove unneeded cruft from configure.ac + * Thu Oct 24 2024 bizhiyuan -1.2-6 - Apply setup_udp_server refactorings -- Gitee