More extensions in deconfig and some clarifications in howto
I appreciate this project.
I was trying to de-autoconfiscate Kea at https://gitlab.isc.org/isc-projects/kea, and ran into some obstacles. Some could be fixed or clarified. Hence this patch: more-extensions-in-deconfig-and-some-clarifications-in-howto.patch. Could not open MR directly.
-
It was not clear to me that running
makemakein the top-level directory means passing the top-level directory as a parameter. The script was stalling and I thought I had stumbled on a serious bug. I pondered fixing the script, but it turns out that it already tries to default to the current directory, but only after trying to accept input from stdin which is where my script was stuck at. I didn't understand the use of this stdin input, so I decided to suggest mentioning in the docs that you're supposed to runmakemake .. -
We use raw string literals with custom delimiters, and those are not supported by unifdef. I fixed this by turning them into default delimiters in Kea. Added a paragraph to howto docs.
-
Added
.cc,.cc.in,.cc.skel,.h.inextensions to deconfig. They are all used in Kea. Also sorted extensions lexicographically if you don't mind. It's a good way to spot duplicates.
I still have some obstacles that I haven't overcome yet. I'll briefly mention some of them in case it's obvious what's happening.
One is that deconfig did not remove the config.h include from some files, and so it probably didn't use them for further processing either:
src/bin/agent/ca_process.cc
src/bin/d2/d2_process.cc
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp4/main.cc
src/bin/dhcp4/tests/decline_unittest.cc
src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
src/bin/dhcp4/tests/dora_unittest.cc
src/bin/dhcp4/tests/kea_controller_unittest.cc
src/bin/dhcp6/dhcp6_srv.cc
src/bin/dhcp6/main.cc
src/bin/dhcp6/tests/decline_unittest.cc
src/bin/dhcp6/tests/dhcp6_srv_unittest.cc
src/bin/dhcp6/tests/kea_controller_unittest.cc
src/bin/lfc/lfc_controller.cc
src/bin/netconf/netconf_process.cc
src/bin/perfdhcp/command_options.cc
src/hooks/dhcp/high_availability/tests/ha_config_unittest.cc
src/lib/asiodns/io_fetch.h
src/lib/asiolink/io_asio_socket.h
src/lib/asiolink/openssl_tls.cc
src/lib/asiolink/tests/tls_unittest.cc
src/lib/asiolink/testutils/openssl_sample_client.cc
src/lib/asiolink/testutils/openssl_sample_server.cc
src/lib/dhcp/iface_mgr_linux.cc
src/lib/dhcp/pkt_filter_inet.cc
src/lib/dhcp/tests/iface_mgr_unittest.cc
src/lib/dhcpsrv/packet_fuzzer.cc
src/lib/dhcpsrv/tests/cfg_iface_unittest.cc
src/lib/dns/edns.cc
src/lib/dns/labelsequence.cc
src/lib/dns/tests/labelsequence_unittest.cc
src/lib/http/tests/tls_client_unittests.cc
src/lib/log/compiler/message.cc
src/lib/log/log_formatter.cc
src/lib/log/logger_manager.cc
src/lib/log/logger_manager_impl.cc
src/lib/log/tests/log_formatter_unittest.cc
src/lib/mysql/tests/mysql_connection_unittest.cc
src/lib/pgsql/pgsql_connection.cc
src/lib/pgsql/tests/pgsql_connection_unittest.cc
src/lib/process/cfgrpt/tests/config_report_unittests.cc
src/lib/process/d_controller.cc
src/lib/process/tests/d_controller_unittests.cc
src/lib/testutils/log_utils.h
src/lib/testutils/test_to_element.cc
src/lib/util/chrono_time_utils.cc
src/lib/util/unittests/check_valgrind.cc
Another is that on checking the code resulted from running deconfig, I am met with errors caused, on one hand by missing ifdefs, on files such as this one which conditionally defines wrappers based on what is available on the system at compile time. I don't grasp whether the used ifdefs will be available some place else than config.h, or if I'm supposed to adapt the code to use no ifdefs.