Description of problem: rpm-4.13.0.1-37 enabled %_debugsource_packages and %_debuginfo_subpackages by patching macros.in. This caused the testsuite to fail since the tests are setup to selectively enable/disable these. The upstream default rpm settings are split like the fedora rpm/redhat-rpm-config settings. With macros.in setting the default and macros.debug for those tests that need debug packages. Unfortunately this means that %check now ignores any test failures again. Which can catch build or toolchain issues. The best fix, IMHO, would be to leave the upstream defaults alone and move the setting of %_debugsource_packages and %_debuginfo_subpackages to redhat-rpm-config default macros. This is also how other debug packages defaults are set like %_enable_debug_packages and %_include_minidebuginfo.
I think we should just do --undefine from respective tests...
Somewhat related "macros should include %_include_gdb_index 1 to generate .gdb_index sections by default" https://bugzilla.redhat.com/show_bug.cgi?id=1476722 Probably good to fix these together.