Drop redundant atconfig

Similarly to the previous commit, just use the cmake vars directly in
atlocal.in, and drop atconfig entirely.

For the tests where we used $abs_srcdir to access $RPMTEST/data, replace
that with $RPMDATA which already contains the whole path.
This commit is contained in:
Michal Domonkos 2023-06-21 09:49:42 +02:00 committed by Panu Matilainen
parent 8e9b992d25
commit d90202cd1a
5 changed files with 54 additions and 59 deletions

View File

@ -14,7 +14,6 @@ else()
endif()
configure_file(atlocal.in atlocal @ONLY)
configure_file(atconfig.in atconfig @ONLY)
configure_file(package.m4.in package.m4 @ONLY)
set(TESTSUITE_AT

View File

@ -1,4 +0,0 @@
# communicate paths to autotest
abs_builddir=@CMAKE_CURRENT_BINARY_DIR@
abs_srcdir=@CMAKE_CURRENT_SOURCE_DIR@
abs_top_builddir=@CMAKE_BINARY_DIR@

View File

@ -1,13 +1,13 @@
RPMLIBDIR="@CMAKE_INSTALL_FULL_LIBDIR@"
LD_LIBRARY_PATH="${abs_builddir}/testing/${RPMLIBDIR}${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}"
LD_LIBRARY_PATH="@CMAKE_CURRENT_BINARY_DIR@/testing/${RPMLIBDIR}${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}"
export LD_LIBRARY_PATH
export RPMLIBDIR
PATH="${abs_builddir}/testing@CMAKE_INSTALL_FULL_BINDIR@:$PATH"
PATH="@CMAKE_CURRENT_BINARY_DIR@/testing@CMAKE_INSTALL_FULL_BINDIR@:$PATH"
export PATH
PYTHON=@PYTHON@
if test "${PYTHON}"; then
PYTHONPATH="${abs_builddir}/testing@Python3_SITEARCH@"
PYTHONPATH="@CMAKE_CURRENT_BINARY_DIR@/testing@Python3_SITEARCH@"
export PYTHONPATH
fi
@ -27,8 +27,8 @@ else
exit
fi
RPMTEST="${abs_builddir}/testing"
RPMDATA="${abs_srcdir}/data/"
RPMTEST="@CMAKE_CURRENT_BINARY_DIR@/testing"
RPMDATA="@CMAKE_CURRENT_SOURCE_DIR@/data/"
RPM_CONFIGDIR="${RPMTEST}/@RPM_CONFIGDIR@"
RPM_POPTEXEC_PATH="${RPMTEST}/@CMAKE_INSTALL_FULL_BINDIR@"

View File

@ -26,7 +26,7 @@ RPMDB_INIT
RPMTEST_CHECK([
run rpmbuild \
-ba "${abs_srcdir}"/data/SPECS/hello.spec
-ba ${RPMDATA}/SPECS/hello.spec
],
[0],
[ignore],
@ -158,7 +158,7 @@ RPMDB_INIT
RPMTEST_CHECK([
run rpmbuild \
-ba "${abs_srcdir}"/data/SPECS/hello-auto.spec
-ba ${RPMDATA}/SPECS/hello-auto.spec
],
[0],
[ignore],
@ -171,7 +171,7 @@ RPMDB_INIT
RPMTEST_CHECK([
run rpmbuild \
-ba "${abs_srcdir}"/data/SPECS/hello-autopatch.spec
-ba ${RPMDATA}/SPECS/hello-autopatch.spec
],
[0],
[ignore],
@ -238,7 +238,7 @@ RPMDB_INIT
RPMTEST_CHECK([
run rpmbuild \
--rebuild "${abs_srcdir}"/data/SRPMS/hello-1.0-1.src.rpm
--rebuild ${RPMDATA}/SRPMS/hello-1.0-1.src.rpm
],
[0],
[ignore],
@ -250,8 +250,8 @@ AT_KEYWORDS([build])
RPMDB_INIT
RPMTEST_CHECK([
run rpmbuild -bi "${abs_srcdir}"/data/SPECS/hello.spec &> /dev/null
run rpmbuild --quiet -bl --short-circuit "${abs_srcdir}"/data/SPECS/hello.spec
run rpmbuild -bi ${RPMDATA}/SPECS/hello.spec &> /dev/null
run rpmbuild --quiet -bl --short-circuit ${RPMDATA}/SPECS/hello.spec
],
[0],
[],
@ -969,7 +969,7 @@ RPMDB_INIT
# Use macros.debug to generate a debuginfo package.
export CFLAGS="-g"
rundebug rpmbuild --quiet \
--rebuild "${abs_srcdir}"/data/SRPMS/hello-1.0-1.src.rpm
--rebuild ${RPMDATA}/SRPMS/hello-1.0-1.src.rpm
# Extract the main package and inspect the hello binary
# It should contain .gnu_debugdata, but not the full .symtab
@ -1008,7 +1008,7 @@ RPMDB_INIT
export CFLAGS="-g"
rundebug rpmbuild --quiet \
--define="_find_debuginfo_opts -g" \
--rebuild "${abs_srcdir}"/data/SRPMS/hello-1.0-1.src.rpm
--rebuild ${RPMDATA}/SRPMS/hello-1.0-1.src.rpm
# Extract the main package and inspect the hello binary
# It should contain .symtab (because of strip -g), so doesn't .gnu_debugdata.
@ -1047,7 +1047,7 @@ RPMDB_INIT
rundebug rpmbuild --quiet \
--undefine "_unique_debug_names" \
--undefine "_unique_debug_srcs" \
-ba "${abs_srcdir}"/data/SPECS/hello2.spec
-ba ${RPMDATA}/SPECS/hello2.spec
# The debuginfo package should contain a .debug file for each binary
# and a dwz multi file that contains the shared debuginfo between them.
@ -1135,7 +1135,7 @@ RPMDB_INIT
# but pass --nodebuginfo to skip it.
export CFLAGS="-g"
rundebug rpmbuild --quiet --nodebuginfo \
--rebuild "${abs_srcdir}"/data/SRPMS/hello-1.0-1.src.rpm
--rebuild ${RPMDATA}/SRPMS/hello-1.0-1.src.rpm
# Extract the main package and inspect the hello binary
# It should not contain .gnu_debugdata, but the full .symtab
@ -1167,7 +1167,7 @@ RPMDB_INIT
rundebug rpmbuild --quiet \
--define "_unique_debug_names 1" \
-ba "${abs_srcdir}"/data/SPECS/hello2.spec
-ba ${RPMDATA}/SPECS/hello2.spec
# The debuginfo package should contain a .debug file for each binary
# and a dwz multi file that contains the shared debuginfo between them.
@ -1254,7 +1254,7 @@ RPMDB_INIT
# Build a package that has some debuginfo
rundebug rpmbuild --quiet \
-ba "${abs_srcdir}"/data/SPECS/hello2-suid.spec
-ba ${RPMDATA}/SPECS/hello2-suid.spec
# Unpack rpm so we can check the included binaries.
rpm2cpio ${RPMTEST}/build/RPMS/*/hello2-1.0-1.*.rpm \
@ -1287,7 +1287,7 @@ RPMDB_INIT
# Build a package that has some debuginfo
rundebug rpmbuild --quiet \
--define "_include_gdb_index 1" \
-ba "${abs_srcdir}"/data/SPECS/hello2.spec
-ba ${RPMDATA}/SPECS/hello2.spec
# Unpack the debuginfo rpms so we can check the .debug files.
rpm2cpio ${RPMTEST}/build/RPMS/*/hello2-debuginfo-1.0-1.*.rpm \
@ -1314,7 +1314,7 @@ RPMDB_INIT
# Build a package that has some debuginfo
rundebug rpmbuild --quiet \
--undefine "_include_gdb_index" \
-ba "${abs_srcdir}"/data/SPECS/hello2.spec
-ba ${RPMDATA}/SPECS/hello2.spec
# Unpack the debuginfo rpms so we can check the .debug files.
rpm2cpio ${RPMTEST}/build/RPMS/*/hello2-debuginfo-1.0-1.*.rpm \
@ -1343,7 +1343,7 @@ RPMDB_INIT
rundebug rpmbuild --quiet \
--define "__cc gcc" \
--define "_include_gdb_index 1" \
-ba "${abs_srcdir}"/data/SPECS/hello-g3.spec
-ba ${RPMDATA}/SPECS/hello-g3.spec
# Unpack the debuginfo rpms so we can check the .debug files.
rpm2cpio ${RPMTEST}/build/RPMS/*/hello-g3-debuginfo-1.0-1.*.rpm \
@ -1375,7 +1375,7 @@ RPMDB_INIT
rundebug rpmbuild --quiet \
--undefine "_find_debuginfo_dwz_opts" \
--define "_unique_debug_srcs 1" \
-ba "${abs_srcdir}"/data/SPECS/hello2.spec
-ba ${RPMDATA}/SPECS/hello2.spec
# Unpack the debuginfo rpms so we can check the .debug files.
rpm2cpio ${RPMTEST}/build/RPMS/*/hello2-debuginfo-1.0-1.*.rpm \
@ -1412,7 +1412,7 @@ RPMDB_INIT
rundebug rpmbuild --quiet \
--undefine "_find_debuginfo_dwz_opts" \
--undefine "_unique_debug_srcs" \
-ba "${abs_srcdir}"/data/SPECS/hello2.spec
-ba ${RPMDATA}/SPECS/hello2.spec
# Unpack the debuginfo rpms so we can check the .debug files.
rpm2cpio ${RPMTEST}/build/RPMS/*/hello2-debuginfo-1.0-1.*.rpm \
@ -1442,7 +1442,7 @@ RPMDB_INIT
rundebug rpmbuild --quiet \
--define "_debugsource_packages 1" \
-ba "${abs_srcdir}"/data/SPECS/hello2.spec
-ba ${RPMDATA}/SPECS/hello2.spec
# Unpack the debugsource rpm so we can check the sources are there.
rpm2cpio ${RPMTEST}/build/RPMS/*/hello2-debugsource-1.0-1.*.rpm \
@ -1474,7 +1474,7 @@ RPMDB_INIT
rundebug rpmbuild --quiet \
--define "_debugsource_packages 1" \
-ba "${abs_srcdir}"/data/SPECS/hello-cd.spec
-ba ${RPMDATA}/SPECS/hello-cd.spec
# Unpack the debuginfo rpms so we can check the sources are there.
rpm2cpio ${RPMTEST}/build/RPMS/*/test-debugsource-1.0-1.*.rpm \
@ -1502,7 +1502,7 @@ rundebug rpmbuild --quiet \
--undefine "_unique_debug_srcs" \
--undefine "_debugsource_packages" \
--undefine "_debuginfo_subpackages" \
-ba "${abs_srcdir}"/data/SPECS/test-subpackages.spec
-ba ${RPMDATA}/SPECS/test-subpackages.spec
# Check that there is just one debuginfo package.
ls ${RPMTEST}/build/RPMS/*/*debuginfo*rpm | wc --lines
@ -1541,7 +1541,7 @@ rundebug rpmbuild --quiet \
--undefine "_unique_debug_srcs" \
--undefine "_debugsource_packages" \
--define "_debuginfo_subpackages 1" \
-ba "${abs_srcdir}"/data/SPECS/test-subpackages.spec
-ba ${RPMDATA}/SPECS/test-subpackages.spec
# Check that there are 3 debuginfo packages.
ls ${RPMTEST}/build/RPMS/*/*debuginfo*rpm | wc --lines
@ -1622,7 +1622,7 @@ rundebug rpmbuild --quiet \
--define "_unique_debug_srcs 1" \
--undefine "_debugsource_packages" \
--define "_debuginfo_subpackages 1" \
-ba "${abs_srcdir}"/data/SPECS/test-subpackages.spec
-ba ${RPMDATA}/SPECS/test-subpackages.spec
# Check that there are 3 debuginfo packages.
ls ${RPMTEST}/build/RPMS/*/*debuginfo*rpm | wc --lines
@ -1703,7 +1703,7 @@ rundebug rpmbuild --quiet \
--define "_unique_debug_srcs 1" \
--define "_debugsource_packages 1" \
--define "_debuginfo_subpackages 1" \
-ba "${abs_srcdir}"/data/SPECS/test-subpackages.spec
-ba ${RPMDATA}/SPECS/test-subpackages.spec
# Check that there are 3 debuginfo packages.
ls ${RPMTEST}/build/RPMS/*/*debuginfo*rpm | wc --lines
@ -1787,7 +1787,7 @@ rundebug rpmbuild --quiet \
--define "_unique_debug_srcs 1" \
--define "_debugsource_packages 1" \
--define "_debuginfo_subpackages 1" \
-ba "${abs_srcdir}"/data/SPECS/test-subpackages-exclude.spec
-ba ${RPMDATA}/SPECS/test-subpackages-exclude.spec
# Check that there are 2 debuginfo packages.
ls ${RPMTEST}/build/RPMS/*/*debuginfo*rpm | wc --lines
@ -1848,7 +1848,7 @@ rundebug rpmbuild --quiet \
--define "_unique_debug_srcs 1" \
--define "_debugsource_packages 1" \
--define "_debuginfo_subpackages 1" \
-ba "${abs_srcdir}"/data/SPECS/test-subpackages-pathpostfixes.spec
-ba ${RPMDATA}/SPECS/test-subpackages-pathpostfixes.spec
# Check that there are 2 debuginfo packages.
ls ${RPMTEST}/build/RPMS/*/*debuginfo*rpm | wc --lines
@ -2002,7 +2002,7 @@ RPMDB_INIT
RPMTEST_CHECK([
run rpmbuild \
--quiet -bd "${abs_srcdir}"/data/SPECS/hello.spec
--quiet -bd ${RPMDATA}/SPECS/hello.spec
ls ls ${RPMTEST}/build/*/*.rpm | wc --lines
],
[0],

View File

@ -29,7 +29,7 @@ RPMDB_INIT
# Build, contains one ELF which should have a buildid.
rundebug rpmbuild \
--define="_build_id_links none" \
--quiet -ba "${abs_srcdir}"/data/SPECS/hello.spec
--quiet -ba ${RPMDATA}/SPECS/hello.spec
# There should be zero build-id files in both the main and debuginfo package
echo -n "hello build-id files: "
@ -62,7 +62,7 @@ rundebug rpmbuild \
--define="_build_id_links alldebug" \
--undefine "_unique_debug_names" \
--undefine "_unique_debug_srcs" \
--quiet -ba "${abs_srcdir}"/data/SPECS/hello.spec
--quiet -ba ${RPMDATA}/SPECS/hello.spec
# There should be zero build-id files in the main package
# Main and debug should be in the debuginfo package,
@ -150,7 +150,7 @@ RPMDB_INIT
rundebug rpmbuild \
--define="_build_id_links alldebug" \
--define="_unique_debug_names 1" \
--quiet -ba "${abs_srcdir}"/data/SPECS/hello.spec
--quiet -ba ${RPMDATA}/SPECS/hello.spec
# There should be zero build-id files in the main package
# Main and debug should be in the debuginfo package,
@ -239,7 +239,7 @@ rundebug rpmbuild \
--define="_build_id_links separate" \
--undefine "_unique_debug_names" \
--undefine "_unique_debug_srcs" \
--quiet -ba "${abs_srcdir}"/data/SPECS/hello.spec
--quiet -ba ${RPMDATA}/SPECS/hello.spec
# There should be one build-id files in the main and debuginfo package
# plus the .build-id/xx subdir, 2 in total.
@ -326,7 +326,7 @@ RPMDB_INIT
rundebug rpmbuild \
--define="_build_id_links separate" \
--define="_unique_debug_names 1" \
--quiet -ba "${abs_srcdir}"/data/SPECS/hello.spec
--quiet -ba ${RPMDATA}/SPECS/hello.spec
# There should be one build-id files in the main and debuginfo package
# plus the .build-id/xx subdir, 2 in total.
@ -414,7 +414,7 @@ rundebug rpmbuild \
--define="_build_id_links compat" \
--undefine "_unique_debug_names" \
--undefine "_unique_debug_srcs" \
--quiet -ba "${abs_srcdir}"/data/SPECS/hello.spec
--quiet -ba ${RPMDATA}/SPECS/hello.spec
# There should be one build-id files in the main and debuginfo package.
# the debuginfo package has one extra main build-id compat symlink
@ -514,7 +514,7 @@ RPMDB_INIT
rundebug rpmbuild \
--define="_build_id_links compat" \
--define="_unique_debug_names 1" \
--quiet -ba "${abs_srcdir}"/data/SPECS/hello.spec
--quiet -ba ${RPMDATA}/SPECS/hello.spec
# There should be one build-id files in the main and debuginfo package.
# the debuginfo package has one extra main build-id compat symlink
@ -613,7 +613,7 @@ RPMDB_INIT
# Should create two warnings
rundebug rpmbuild --quiet \
--define="_build_id_links alldebug" \
-ba "${abs_srcdir}"/data/SPECS/hello2cp.spec 2>&1 | grep "^warning: " \
-ba ${RPMDATA}/SPECS/hello2cp.spec 2>&1 | grep "^warning: " \
| cut -f1-3 -d' '
rpm2cpio ${RPMTEST}/build/RPMS/*/hello2-1.0-1.*.rpm \
@ -678,7 +678,7 @@ RPMDB_INIT
# No warnings for hard links
rundebug rpmbuild --quiet \
--define="_build_id_links alldebug" \
-ba "${abs_srcdir}"/data/SPECS/hello2ln.spec 2>&1 | grep "^warning: " \
-ba ${RPMDATA}/SPECS/hello2ln.spec 2>&1 | grep "^warning: " \
| cut -f1-3 -d' '
rpm2cpio ${RPMTEST}/build/RPMS/*/hello2-1.0-1.*.rpm \
@ -740,7 +740,7 @@ RPMDB_INIT
# Should create two warnings
rundebug rpmbuild --quiet \
--define="_build_id_links separate" \
-ba "${abs_srcdir}"/data/SPECS/hello2cp.spec 2>&1 | grep "^warning: " \
-ba ${RPMDATA}/SPECS/hello2cp.spec 2>&1 | grep "^warning: " \
| cut -f1-3 -d' '
rpm2cpio ${RPMTEST}/build/RPMS/*/hello2-1.0-1.*.rpm \
@ -802,7 +802,7 @@ RPMDB_INIT
# No warnings for hard links
rundebug rpmbuild --quiet \
--define="_build_id_links separate" \
-ba "${abs_srcdir}"/data/SPECS/hello2ln.spec 2>&1 | grep "^warning: " \
-ba ${RPMDATA}/SPECS/hello2ln.spec 2>&1 | grep "^warning: " \
| cut -f1-3 -d' '
rpm2cpio ${RPMTEST}/build/RPMS/*/hello2-1.0-1.*.rpm \
@ -861,7 +861,7 @@ RPMDB_INIT
# Should create two warnings
rundebug rpmbuild --quiet \
--define="_build_id_links compat" \
-ba "${abs_srcdir}"/data/SPECS/hello2cp.spec 2>&1 | grep "^warning: " \
-ba ${RPMDATA}/SPECS/hello2cp.spec 2>&1 | grep "^warning: " \
| cut -f1-3 -d' '
rpm2cpio ${RPMTEST}/build/RPMS/*/hello2-1.0-1.*.rpm \
@ -935,7 +935,7 @@ RPMDB_INIT
# No warnings for hard links
rundebug rpmbuild --quiet \
--define="_build_id_links compat" \
-ba "${abs_srcdir}"/data/SPECS/hello2ln.spec 2>&1 | grep "^warning: " \
-ba ${RPMDATA}/SPECS/hello2ln.spec 2>&1 | grep "^warning: " \
| cut -f1-3 -d' '
rpm2cpio ${RPMTEST}/build/RPMS/*/hello2-1.0-1.*.rpm \
@ -1009,7 +1009,7 @@ export CFLAGS="-g"
rundebug rpmbuild --quiet \
--define="_unique_build_ids 1" \
--undefine="_no_recompute_build_ids" \
-ba "${abs_srcdir}"/data/SPECS/hello.spec
-ba ${RPMDATA}/SPECS/hello.spec
rpm2cpio ${RPMTEST}/build/RPMS/*/hello-1.0-1.*.rpm \
| cpio -diu --quiet
@ -1028,7 +1028,7 @@ rm $hello_file
rundebug rpmbuild --quiet \
--define="_unique_build_ids 1" \
--undefine="_no_recompute_build_ids" \
-ba "${abs_srcdir}"/data/SPECS/hello-r2.spec
-ba ${RPMDATA}/SPECS/hello-r2.spec
rpm2cpio ${RPMTEST}/build/RPMS/*/hello-1.0-2.*.rpm \
| cpio -diu --quiet
@ -1053,7 +1053,7 @@ rundebug rpmbuild --quiet \
--undefine="_unique_debug_names" \
--undefine="_unique_debug_srcs" \
--define="_no_recompute_build_ids 1" \
-ba "${abs_srcdir}"/data/SPECS/hello.spec
-ba ${RPMDATA}/SPECS/hello.spec
rpm2cpio ${RPMTEST}/build/RPMS/*/hello-1.0-1.*.rpm \
| cpio -diu --quiet
@ -1081,7 +1081,7 @@ rundebug rpmbuild --quiet \
--undefine="_unique_debug_names" \
--undefine="_unique_debug_srcs" \
--define="_no_recompute_build_ids 1" \
-ba "${abs_srcdir}"/data/SPECS/hello-r2.spec
-ba ${RPMDATA}/SPECS/hello-r2.spec
rpm2cpio ${RPMTEST}/build/RPMS/*/hello-1.0-2.*.rpm \
| cpio -diu --quiet
@ -1116,7 +1116,7 @@ RPMDB_INIT
# No warnings for hard links
rundebug rpmbuild --quiet \
--define="_unique_build_ids 1" \
-ba "${abs_srcdir}"/data/SPECS/hello.spec
-ba ${RPMDATA}/SPECS/hello.spec
rpm2cpio ${RPMTEST}/build/RPMS/*/hello-1.0-1.*.rpm \
| cpio -diu --quiet
@ -1133,7 +1133,7 @@ rm $hello_file
# Build the "next" release, which has no changes except for the release update.
rundebug rpmbuild --quiet \
--define="_unique_build_ids 1" \
-ba "${abs_srcdir}"/data/SPECS/hello-r2.spec
-ba ${RPMDATA}/SPECS/hello-r2.spec
rpm2cpio ${RPMTEST}/build/RPMS/*/hello-1.0-2.*.rpm \
| cpio -diu --quiet
@ -1163,7 +1163,7 @@ rundebug rpmbuild --quiet \
--undefine="_unique_build_ids" \
--undefine="_unique_debug_names" \
--undefine="_unique_debug_srcs" \
-ba "${abs_srcdir}"/data/SPECS/hello.spec
-ba ${RPMDATA}/SPECS/hello.spec
rpm2cpio ${RPMTEST}/build/RPMS/*/hello-1.0-1.*.rpm \
| cpio -diu --quiet
@ -1182,7 +1182,7 @@ rundebug rpmbuild --quiet \
--undefine="_unique_build_ids" \
--undefine="_unique_debug_names" \
--undefine="_unique_debug_srcs" \
-ba "${abs_srcdir}"/data/SPECS/hello-r2.spec
-ba ${RPMDATA}/SPECS/hello-r2.spec
rpm2cpio ${RPMTEST}/build/RPMS/*/hello-1.0-2.*.rpm \
| cpio -diu --quiet
@ -1213,7 +1213,7 @@ rundebug rpmbuild \
--define="_build_id_links compat" \
--define "_unique_debug_names 1" \
--define "_unique_debug_srcs 1" \
--quiet -ba "${abs_srcdir}"/data/SPECS/hello-attr-buildid.spec
--quiet -ba ${RPMDATA}/SPECS/hello-attr-buildid.spec
runroot rpm -qp --qf "[[%{filenames} %{filemodes:perms}\n]]" \
/build/RPMS/*/test-1.0-1*rpm \
@ -1244,7 +1244,7 @@ rundebug rpmbuild \
--define="_build_id_links compat" \
--define "_unique_debug_names 1" \
--define "_unique_debug_srcs 1" \
--quiet -ba "${abs_srcdir}"/data/SPECS/hello-config-buildid.spec
--quiet -ba ${RPMDATA}/SPECS/hello-config-buildid.spec
# Should contain one config file.
runroot rpm -c -qp /build/RPMS/*/test-1.0-1*rpm