Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CFE-2780: Fixed warnings from automake #5678

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/acceptance_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
with:
submodules: recursive
- name: Install dependencies
run: sudo apt-get update -y && sudo apt-get install -y libssl-dev libpam0g-dev liblmdb-dev byacc curl libyaml-dev librsync-dev
run: sudo apt-get update -y && sudo apt-get install -y libssl-dev libpam0g-dev liblmdb-dev byacc curl libyaml-dev librsync-dev autoconf-archive
- name: Run autotools / configure
run: ./autogen.sh --enable-debug
- name: Compile and link (make)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/asan_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
with:
submodules: recursive
- name: Install dependencies
run: sudo apt-get update -y && sudo apt-get install -y libssl-dev libpam0g-dev liblmdb-dev byacc curl librsync-dev
run: sudo apt-get update -y && sudo apt-get install -y libssl-dev libpam0g-dev liblmdb-dev byacc curl librsync-dev autoconf-archive
- name: Run autotools / configure
run: ./autogen.sh --enable-debug
- name: Compile and link (make)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

- name: Install dependencies (C)
if: ${{ matrix.language == 'cpp' }}
run: sudo apt-get update -y && sudo apt-get install -y libssl-dev libpam0g-dev liblmdb-dev byacc curl librsync-dev
run: sudo apt-get update -y && sudo apt-get install -y libssl-dev libpam0g-dev liblmdb-dev byacc curl librsync-dev autoconf-archive

- name: Build (C)
if: ${{ matrix.language == 'cpp' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/job-static-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
sudo apt-get install -y dpkg-dev debhelper g++ libncurses6 pkg-config \
build-essential libpam0g-dev fakeroot gcc make autoconf buildah \
liblmdb-dev libacl1-dev libcurl4-openssl-dev libyaml-dev libxml2-dev \
libssl-dev libpcre2-dev librsync-dev
libssl-dev libpcre2-dev librsync-dev autoconf-archive

- name: Run Autogen
run: NO_CONFIGURE=1 PROJECT=community ./buildscripts/build-scripts/autogen
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
with:
submodules: recursive
- name: Install dependencies
run: brew install lmdb automake openssl pcre2 autoconf libtool librsync
run: brew install lmdb automake openssl pcre2 autoconf libtool librsync autoconf-archive
- name: Check tools
run: command -v libtool && command -v automake && command -v autoconf
- name: Check tools versions
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
with:
submodules: recursive
- name: Install dependencies
run: sudo apt-get update -y && sudo apt-get install -y libssl-dev libpam0g-dev liblmdb-dev byacc curl shellcheck librsync-dev
run: sudo apt-get update -y && sudo apt-get install -y libssl-dev libpam0g-dev liblmdb-dev byacc curl shellcheck librsync-dev autoconf-archive
- name: Run autotools / configure
run: ./autogen.sh --enable-debug
- name: Run shellcheck
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
with:
submodules: recursive
- name: Install dependencies
run: sudo apt-get update -y && sudo apt-get install -y libssl-dev libpam0g-dev liblmdb-dev byacc curl librsync-dev
run: sudo apt-get update -y && sudo apt-get install -y libssl-dev libpam0g-dev liblmdb-dev byacc curl librsync-dev autoconf-archive
- name: Run autotools / configure
run: ./autogen.sh --enable-debug
- name: Compile and link (make)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/valgrind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
path: masterfiles
submodules: recursive
- name: Install dependencies
run: sudo apt-get update -y && sudo apt-get install -y libssl-dev libpam0g-dev liblmdb-dev byacc curl libyaml-dev valgrind librsync-dev
run: sudo apt-get update -y && sudo apt-get install -y libssl-dev libpam0g-dev liblmdb-dev byacc curl libyaml-dev valgrind librsync-dev autoconf-archive
- name: Run autotools / configure
run: ./autogen.sh --enable-debug --with-systemd-service
- name: Compile and link (make)
Expand Down
17 changes: 7 additions & 10 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dnl # Run ./autogen.sh to build configure script
dnl #
dnl ##########################################################################

AC_PREREQ(2.63)
AC_PREREQ([2.63])

m4_define([cfversion_from_env], m4_normalize(m4_esyscmd([echo $EXPLICIT_VERSION])))
m4_define([cfversion_from_file], m4_normalize(m4_esyscmd([cat CFVERSION])))
Expand All @@ -46,7 +46,7 @@ m4_ifval(cfversion_from_env, [
])


AC_INIT(cfengine, cfversion)
AC_INIT([cfengine],[cfversion])
AC_CONFIG_SRCDIR([libpromises/generic_agent.c])
AC_CANONICAL_TARGET

Expand All @@ -69,7 +69,7 @@ m4_define(SERIAL_TESTS, m4_bmatch(AUTOMAKE_VERSION, [^1\.\([0-9]\|1[0-1]\)\(\.\|
AC_MSG_RESULT(AUTOMAKE_VERSION)


AM_INIT_AUTOMAKE([tar-ustar] SERIAL_TESTS)
AM_INIT_AUTOMAKE([tar-ustar] SERIAL_TESTS [subdir-objects])
AM_MAINTAINER_MODE([enable])

m4_divert_text([DEFAULTS], [: "${AR_FLAGS=cr}"])
Expand Down Expand Up @@ -126,13 +126,13 @@ AC_EXEEXT
dnl GCC specific flags
m4_include([m4/cf3_gcc_flags.m4])

# Use either new LT_INIT or old AC_DISABLE_STATIC/AC_PROG_LIBTOOL macros
# Use either new LT_INIT or old AC_DISABLE_STATIC/LT_INIT macros
m4_ifdef([LT_INIT],
[LT_INIT([disable-static])],
[AC_DISABLE_STATIC
AC_PROG_LIBTOOL])
LT_INIT])

AM_PROG_LEX
AC_PROG_LEX(noyywrap)
AC_PROG_YACC
AC_PROG_INSTALL
AC_PATH_PROG([PERL], [perl])
Expand Down Expand Up @@ -163,7 +163,7 @@ if test "x$with_pthreads" != x && test "x$with_pthreads" != "xyes" && test "x$wi
CPPFLAGS="-I$with_pthreads/include $CPPFLAGS"
fi

ACX_PTHREAD([],
AX_PTHREAD([],
[AC_MSG_ERROR(pthread-compatible library is required to build CFEngine)])

CC="$PTHREAD_CC"
Expand Down Expand Up @@ -767,9 +767,6 @@ AC_CHECK_HEADERS(sys/jail.h, [], [], [AC_INCLUDES_DEFAULT
])
AC_CHECK_HEADERS(net/route.h netinet/in.h netinet/ip.h)


AC_HEADER_STDC
AC_HEADER_TIME
AC_HEADER_SYS_WAIT
AC_HEADER_DIRENT
AC_HEADER_STDBOOL
Expand Down
6 changes: 3 additions & 3 deletions examples/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ MAINTAINERCLEANFILES = Makefile.in mdate-sh

# only re-run the outputs for examples that already have an example_output block
remake:
perl ./remake_outputs.pl $(shell grep -l example_output $(dist_examples_DATA))
perl ./remake_outputs.pl `shell grep -l example_output $(dist_examples_DATA)`

recheck:
perl ./remake_outputs.pl -c $(shell grep -l example_output $(dist_examples_DATA))
perl ./remake_outputs.pl -c `shell grep -l example_output $(dist_examples_DATA)`

recheck_verbose:
perl ./remake_outputs.pl -v -c $(shell grep -l example_output $(dist_examples_DATA))
perl ./remake_outputs.pl -v -c `shell grep -l example_output $(dist_examples_DATA)`
4 changes: 2 additions & 2 deletions tests/load/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ db_load_LDADD = ../unit/libdb.la


lastseen_load_SOURCES = lastseen_load.c \
$(srcdir)/../../libpromises/lastseen.c \
$(srcdir)/../../libntech/libutils/statistics.c
../../libpromises/lastseen.c \
../../libntech/libutils/statistics.c
lastseen_load_LDADD = ../unit/libdb.la ../../libpromises/libpromises.la
endif

Expand Down
2 changes: 1 addition & 1 deletion tests/static-check/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fi
function create_image() {
local c=$(buildah from -q $BASE_IMG)
buildah run $c -- dnf -q -y install "@C Development Tools and Libraries" clang cppcheck which diffutils file >/dev/null 2>&1
buildah run $c -- dnf -q -y install pcre-devel pcre2-devel openssl-devel libxml2-devel pam-devel lmdb-devel libacl-devel libyaml-devel curl-devel libvirt-devel librsync-devel >/dev/null 2>&1
buildah run $c -- dnf -q -y install pcre-devel pcre2-devel openssl-devel libxml2-devel pam-devel lmdb-devel libacl-devel libyaml-devel curl-devel libvirt-devel librsync-devel autoconf-archive >/dev/null 2>&1
buildah run $c -- dnf clean all >/dev/null 2>&1

# Copy checksum of this file into container. We use the checksum to detect
Expand Down
24 changes: 13 additions & 11 deletions tests/unit/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -381,27 +381,29 @@ verify_databases_test_LDADD = ../../cf-agent/libcf-agent.la libtest.la
iteration_test_SOURCES = iteration_test.c

cf_upgrade_test_SOURCES = cf_upgrade_test.c \
$(top_srcdir)/cf-upgrade/alloc-mini.c \
$(top_srcdir)/cf-upgrade/alloc-mini.h \
$(top_srcdir)/cf-upgrade/command_line.c \
$(top_srcdir)/cf-upgrade/command_line.h \
$(top_srcdir)/cf-upgrade/configuration.c \
$(top_srcdir)/cf-upgrade/configuration.h \
$(top_srcdir)/cf-upgrade/log.c $(top_srcdir)/cf-upgrade/log.h \
$(top_srcdir)/cf-upgrade/process.c $(top_srcdir)/cf-upgrade/process.h \
$(top_srcdir)/cf-upgrade/update.c \
$(top_srcdir)/cf-upgrade/update.h
cf_upgrade_test_CPPFLAGS = -I$(top_srcdir)/cf-upgrade -I$(top_srcdir)/libntech/libutils -I$(top_srcdir)
../../cf-upgrade/alloc-mini.c \
../../cf-upgrade/alloc-mini.h \
../../cf-upgrade/command_line.c \
../../cf-upgrade/command_line.h \
../../cf-upgrade/configuration.c \
../../cf-upgrade/configuration.h \
../../cf-upgrade/log.c ../../cf-upgrade/log.h \
../../cf-upgrade/process.c ../../cf-upgrade/process.h \
../../cf-upgrade/update.c \
../../cf-upgrade/update.h
cf_upgrade_test_CPPFLAGS = -I../../cf-upgrade -I../../libntech/libutils -I../../
cf_upgrade_test_LDADD = libtest.la ../../libntech/libcompat/libcompat.la

if !NT
check_PROGRAMS += nfs_test
nfs_test_SOURCES = nfs_test.c
nfs_test_LDADD = ../../libpromises/libpromises.la libtest.la

init_script_test_helper_LDADD =
init_script_test_helper_SOURCES = init_script_test_helper.c
init_script_test.sh: init_script_test_helper
CLEANFILES += init_script_test_helper
noinst_PROGRAMS += init_script_test_helper
endif
EXTRA_DIST += init_script_test_helper.c
EXTRA_DIST += init_script_test.sh
8 changes: 4 additions & 4 deletions tests/unit/init_script_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ fi
# Fail on any error.
set -e

cp init_script_test_helper $CFTEST_PREFIX/bin/cf-test-execd
cp init_script_test_helper $CFTEST_PREFIX/bin/cf-test-serverd
cp init_script_test_helper $CFTEST_PREFIX/bin/cf-test-monitord
cp init_script_test_helper $CFTEST_PREFIX/bin/cf-test-agent
cp .libs/init_script_test_helper $CFTEST_PREFIX/bin/cf-test-execd
cp .libs/init_script_test_helper $CFTEST_PREFIX/bin/cf-test-serverd
cp .libs/init_script_test_helper $CFTEST_PREFIX/bin/cf-test-monitord
cp .libs/init_script_test_helper $CFTEST_PREFIX/bin/cf-test-agent

touch $CFTEST_PREFIX/inputs/promises.cf

Expand Down
2 changes: 1 addition & 1 deletion tests/valgrind-check/Containerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:22.04 AS build
RUN DEBIAN_FRONTEND=noninteractive apt-get update -y
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y libssl-dev libxml2-dev libpam0g-dev liblmdb-dev libacl1-dev libpcre2-dev librsync-dev
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python3 git flex bison byacc automake make autoconf libtool valgrind
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python3 git flex bison byacc automake make autoconf libtool valgrind autoconf-archive
COPY masterfiles masterfiles
COPY core core
WORKDIR core
Expand Down
Loading