From 8b75022696622dd53f19a7d10cd2e02924fde47b Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Fri, 11 Oct 2024 14:23:34 +0200 Subject: [PATCH 1/2] configs: re-enable OpenSSL backend for libssh/libssh2 NETOPEER2 requries the OpenSSL backend of libssh. By default, except on minimal builds, is to use GCrypt backend. Gcrypt is selected because of Podman, which is not in the minimal builds. Signed-off-by: Joachim Wiberg --- configs/aarch64_defconfig | 2 ++ configs/aarch64_minimal_defconfig | 2 ++ configs/x86_64_defconfig | 2 ++ configs/x86_64_minimal_defconfig | 2 ++ 4 files changed, 8 insertions(+) diff --git a/configs/aarch64_defconfig b/configs/aarch64_defconfig index 93caf938b..c61303d9b 100644 --- a/configs/aarch64_defconfig +++ b/configs/aarch64_defconfig @@ -56,7 +56,9 @@ BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN=y BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE=y BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON_GUNICORN=y +BR2_PACKAGE_LIBSSH_OPENSSL=y BR2_PACKAGE_LIBSSH2=y +BR2_PACKAGE_LIBSSH2_OPENSSL=y BR2_PACKAGE_LIBXCRYPT=y BR2_PACKAGE_LIBOPENSSL_BIN=y BR2_PACKAGE_LIBCURL_CURL=y diff --git a/configs/aarch64_minimal_defconfig b/configs/aarch64_minimal_defconfig index 9cfea06a1..1c1f885c0 100644 --- a/configs/aarch64_minimal_defconfig +++ b/configs/aarch64_minimal_defconfig @@ -55,7 +55,9 @@ BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN=y BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE=y BR2_PACKAGE_PYTHON3=y +BR2_PACKAGE_LIBSSH_OPENSSL=y BR2_PACKAGE_LIBSSH2=y +BR2_PACKAGE_LIBSSH2_OPENSSL=y BR2_PACKAGE_LIBXCRYPT=y BR2_PACKAGE_LIBOPENSSL_BIN=y BR2_PACKAGE_LIBCURL_CURL=y diff --git a/configs/x86_64_defconfig b/configs/x86_64_defconfig index e94440f1a..a55fd4139 100644 --- a/configs/x86_64_defconfig +++ b/configs/x86_64_defconfig @@ -51,7 +51,9 @@ BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN=y BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE=y BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON_GUNICORN=y +BR2_PACKAGE_LIBSSH_OPENSSL=y BR2_PACKAGE_LIBSSH2=y +BR2_PACKAGE_LIBSSH2_OPENSSL=y BR2_PACKAGE_LIBXCRYPT=y BR2_PACKAGE_LIBOPENSSL_BIN=y BR2_PACKAGE_LIBCURL_CURL=y diff --git a/configs/x86_64_minimal_defconfig b/configs/x86_64_minimal_defconfig index c5621a24f..90de8c9f7 100644 --- a/configs/x86_64_minimal_defconfig +++ b/configs/x86_64_minimal_defconfig @@ -50,7 +50,9 @@ BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN=y BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE=y BR2_PACKAGE_PYTHON3=y +BR2_PACKAGE_LIBSSH_OPENSSL=y BR2_PACKAGE_LIBSSH2=y +BR2_PACKAGE_LIBSSH2_OPENSSL=y BR2_PACKAGE_LIBXCRYPT=y BR2_PACKAGE_LIBOPENSSL_BIN=y BR2_PACKAGE_LIBCURL_CURL=y From 60b8f97ad6c4882adb1515b4a9682e1deac09475 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Fri, 11 Oct 2024 14:58:16 +0200 Subject: [PATCH 2/2] package/test-mode: rename to confd-test-mode Declare that confd-test-mode depends on confd, otherwise with 'select', a call to `make update-defconfig` will remove BR2_PACKAGE_CONFD=y, which we feel is very confusing -- in particular when comparing any defconfig that does not have test-mode package. Signed-off-by: Joachim Wiberg --- configs/aarch64_defconfig | 3 +- configs/aarch64_minimal_defconfig | 3 +- configs/r2s_defconfig | 2 +- configs/riscv64_defconfig | 2 +- configs/x86_64_defconfig | 3 +- configs/x86_64_minimal_defconfig | 3 +- package/Config.in | 2 +- package/confd-test-mode/Config.in | 10 +++++++ package/confd-test-mode/confd-test-mode.mk | 32 ++++++++++++++++++++++ package/test-mode/Config.in | 10 ------- package/test-mode/test-mode.mk | 32 ---------------------- 11 files changed, 53 insertions(+), 49 deletions(-) create mode 100644 package/confd-test-mode/Config.in create mode 100644 package/confd-test-mode/confd-test-mode.mk delete mode 100644 package/test-mode/Config.in delete mode 100644 package/test-mode/test-mode.mk diff --git a/configs/aarch64_defconfig b/configs/aarch64_defconfig index c61303d9b..6a89a92fc 100644 --- a/configs/aarch64_defconfig +++ b/configs/aarch64_defconfig @@ -130,7 +130,8 @@ INFIX_DESC="Infix is a Network Operating System based on Linux. It can be set u INFIX_HOME="https://github.com/kernelkit/infix/" INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc" INFIX_SUPPORT="mailto:kernelkit@googlegroups.com" -BR2_PACKAGE_TEST_MODE=y +BR2_PACKAGE_CONFD=y +BR2_PACKAGE_CONFD_TEST_MODE=y BR2_PACKAGE_CURIOS_HTTPD=y BR2_PACKAGE_CURIOS_NFTABLES=y BR2_PACKAGE_EXECD=y diff --git a/configs/aarch64_minimal_defconfig b/configs/aarch64_minimal_defconfig index 1c1f885c0..e4df9be79 100644 --- a/configs/aarch64_minimal_defconfig +++ b/configs/aarch64_minimal_defconfig @@ -113,7 +113,8 @@ INFIX_DESC="Infix is a Network Operating System based on Linux. It can be set u INFIX_HOME="https://github.com/kernelkit/infix/" INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc" INFIX_SUPPORT="mailto:kernelkit@googlegroups.com" -BR2_PACKAGE_TEST_MODE=y +BR2_PACKAGE_CONFD=y +BR2_PACKAGE_CONFD_TEST_MODE=y BR2_PACKAGE_GENCERT=y BR2_PACKAGE_STATD=y BR2_PACKAGE_FACTORY=y diff --git a/configs/r2s_defconfig b/configs/r2s_defconfig index 76d4ffb3f..9fdd0be86 100644 --- a/configs/r2s_defconfig +++ b/configs/r2s_defconfig @@ -173,6 +173,7 @@ INFIX_HOME="https://github.com/kernelkit/infix/" INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc" INFIX_SUPPORT="mailto:kernelkit@googlegroups.com" BR2_PACKAGE_CONFD=y +# BR2_PACKAGE_CONFD_TEST_MODE is not set BR2_PACKAGE_EXECD=y BR2_PACKAGE_GENCERT=y BR2_PACKAGE_STATD=y @@ -199,7 +200,6 @@ BR2_PACKAGE_PODMAN_DRIVER_VFS=y BR2_PACKAGE_TETRIS=y BR2_PACKAGE_ROUSETTE=y BR2_PACKAGE_HOST_PYTHON_YANGDOC=y -# BR2_PACKAGE_TEST_MODE is not set TRUSTED_KEYS=y TRUSTED_KEYS_DEVELOPMENT=y # GNS3_APPLIANCE is not set diff --git a/configs/riscv64_defconfig b/configs/riscv64_defconfig index d5f59014a..64105dd81 100644 --- a/configs/riscv64_defconfig +++ b/configs/riscv64_defconfig @@ -164,6 +164,7 @@ INFIX_HOME="https://github.com/kernelkit/infix/" INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc" INFIX_SUPPORT="mailto:kernelkit@googlegroups.com" BR2_PACKAGE_CONFD=y +# BR2_PACKAGE_CONFD_TEST_MODE is not set BR2_PACKAGE_EXECD=y BR2_PACKAGE_GENCERT=y BR2_PACKAGE_STATD=y @@ -190,7 +191,6 @@ BR2_PACKAGE_PODMAN_DRIVER_VFS=y BR2_PACKAGE_TETRIS=y BR2_PACKAGE_ROUSETTE=y BR2_PACKAGE_HOST_PYTHON_YANGDOC=y -# BR2_PACKAGE_TEST_MODE is not set TRUSTED_KEYS=y TRUSTED_KEYS_DEVELOPMENT=y # GNS3_APPLIANCE is not set diff --git a/configs/x86_64_defconfig b/configs/x86_64_defconfig index a55fd4139..e47daea83 100644 --- a/configs/x86_64_defconfig +++ b/configs/x86_64_defconfig @@ -134,7 +134,8 @@ INFIX_DESC="Infix is a Network Operating System based on Linux. It can be set u INFIX_HOME="https://github.com/kernelkit/infix/" INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc" INFIX_SUPPORT="mailto:kernelkit@googlegroups.com" -BR2_PACKAGE_TEST_MODE=y +BR2_PACKAGE_CONFD=y +BR2_PACKAGE_CONFD_TEST_MODE=y BR2_PACKAGE_CURIOS_HTTPD=y BR2_PACKAGE_CURIOS_NFTABLES=y BR2_PACKAGE_EXECD=y diff --git a/configs/x86_64_minimal_defconfig b/configs/x86_64_minimal_defconfig index 90de8c9f7..d0368b44d 100644 --- a/configs/x86_64_minimal_defconfig +++ b/configs/x86_64_minimal_defconfig @@ -117,7 +117,8 @@ INFIX_DESC="Infix is a Network Operating System based on Linux. It can be set u INFIX_HOME="https://github.com/kernelkit/infix/" INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc" INFIX_SUPPORT="mailto:kernelkit@googlegroups.com" -BR2_PACKAGE_TEST_MODE=y +BR2_PACKAGE_CONFD=y +BR2_PACKAGE_CONFD_TEST_MODE=y BR2_PACKAGE_GENCERT=y BR2_PACKAGE_STATD=y BR2_PACKAGE_FACTORY=y diff --git a/package/Config.in b/package/Config.in index bcb98f824..1b6320f33 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1,6 +1,6 @@ menu "Packages" source "$BR2_EXTERNAL_INFIX_PATH/package/confd/Config.in" -source "$BR2_EXTERNAL_INFIX_PATH/package/test-mode/Config.in" +source "$BR2_EXTERNAL_INFIX_PATH/package/confd-test-mode/Config.in" source "$BR2_EXTERNAL_INFIX_PATH/package/curios-httpd/Config.in" source "$BR2_EXTERNAL_INFIX_PATH/package/curios-nftables/Config.in" source "$BR2_EXTERNAL_INFIX_PATH/package/execd/Config.in" diff --git a/package/confd-test-mode/Config.in b/package/confd-test-mode/Config.in new file mode 100644 index 000000000..f0926291a --- /dev/null +++ b/package/confd-test-mode/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_CONFD_TEST_MODE + bool "confd test mode" + depends on BR2_PACKAGE_CONFD + select BR2_PACKAGE_LIBITE + select BR2_PACKAGE_LIBYANG + select BR2_PACKAGE_SYSREPO + select BR2_PACKAGE_LIBSRX + help + A companion plugin to confd providing functionality required to + run tests with Infamy, i.e., enable Infix test mode. diff --git a/package/confd-test-mode/confd-test-mode.mk b/package/confd-test-mode/confd-test-mode.mk new file mode 100644 index 000000000..0786b1b86 --- /dev/null +++ b/package/confd-test-mode/confd-test-mode.mk @@ -0,0 +1,32 @@ +CONFD_TEST_MODE_VERSION = 1.0 +CONFD_TEST_MODE_SITE_METHOD = local +CONFD_TEST_MODE_SITE = $(BR2_EXTERNAL_INFIX_PATH)/src/test-mode +CONFD_TEST_MODE_LICENSE = BSD-3-Clause +CONFD_TEST_MODE_LICENSE_FILES = LICENSE +CONFD_TEST_MODE_REDISTRIBUTE = NO +CONFD_TEST_MODE_DEPENDENCIES = sysrepo libite libyang confd +CONFD_TEST_MODE_AUTORECONF = YES +CONFD_TEST_MODE_SYSREPO_SHM_PREFIX = sr_buildroot$(subst /,_,$(CONFIG_DIR))_test_mode + +COMMON_SYSREPO_ENV = \ + SYSREPO_SHM_PREFIX=$(CONFD_SYSREPO_SHM_PREFIX) \ + SYSREPOCTL_EXECUTABLE="$(HOST_DIR)/bin/sysrepoctl" \ + SYSREPOCFG_EXECUTABLE="$(HOST_DIR)/bin/sysrepocfg" \ + SEARCH_PATH="$(TARGET_DIR)/usr/share/yang/modules/confd/" + +define CONFD_TEST_MODE_INSTALL_YANG_MODULES + $(COMMON_SYSREPO_ENV) \ + SEARCH_PATH="$(TARGET_DIR)/usr/share/yang/modules/test-mode/" $(BR2_EXTERNAL_INFIX_PATH)/utils/sysrepo-load-modules.sh $(@D)/yang/test-mode.inc +endef +define CONFD_TEST_MODE_PERMISSIONS + /etc/sysrepo/data/ r 660 root wheel - - - - - + /etc/sysrepo/data d 770 root wheel - - - - - +endef +define CONFD_TEST_MODE_CLEANUP + rm -f /dev/shm/$(CONFD_TEST_MODE_SYSREPO_SHM_PREFIX)* +endef + +CONFD_TEST_MODE_PRE_INSTALL_TARGET_HOOKS += CONFD_TEST_MODE_CLEANUP +CONFD_TEST_MODE_POST_INSTALL_TARGET_HOOKS += CONFD_TEST_MODE_INSTALL_YANG_MODULES + +$(eval $(autotools-package)) diff --git a/package/test-mode/Config.in b/package/test-mode/Config.in deleted file mode 100644 index 4ebff4127..000000000 --- a/package/test-mode/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_TEST_MODE - bool "test-mode" - select BR2_PACKAGE_LIBITE - select BR2_PACKAGE_LIBYANG - select BR2_PACKAGE_SYSREPO - select BR2_PACKAGE_LIBSRX - select BR2_PACKAGE_CONFD - help - A plugin to sysrepo that provides functionality required to - run tests with infamy. diff --git a/package/test-mode/test-mode.mk b/package/test-mode/test-mode.mk deleted file mode 100644 index d32a51611..000000000 --- a/package/test-mode/test-mode.mk +++ /dev/null @@ -1,32 +0,0 @@ -TEST_MODE_VERSION = 1.0 -TEST_MODE_SITE_METHOD = local -TEST_MODE_SITE = $(BR2_EXTERNAL_INFIX_PATH)/src/test-mode -TEST_MODE_LICENSE = BSD-3-Clause -TEST_MODE_LICENSE_FILES = LICENSE -TEST_MODE_REDISTRIBUTE = NO -TEST_MODE_DEPENDENCIES = sysrepo libite libyang confd -TEST_MODE_AUTORECONF = YES -TEST_MODE_SYSREPO_SHM_PREFIX = sr_buildroot$(subst /,_,$(CONFIG_DIR))_test_mode - -COMMON_SYSREPO_ENV = \ - SYSREPO_SHM_PREFIX=$(CONFD_SYSREPO_SHM_PREFIX) \ - SYSREPOCTL_EXECUTABLE="$(HOST_DIR)/bin/sysrepoctl" \ - SYSREPOCFG_EXECUTABLE="$(HOST_DIR)/bin/sysrepocfg" \ - SEARCH_PATH="$(TARGET_DIR)/usr/share/yang/modules/confd/" - -define TEST_MODE_INSTALL_YANG_MODULES - $(COMMON_SYSREPO_ENV) \ - SEARCH_PATH="$(TARGET_DIR)/usr/share/yang/modules/test-mode/" $(BR2_EXTERNAL_INFIX_PATH)/utils/sysrepo-load-modules.sh $(@D)/yang/test-mode.inc -endef -define TEST_MODE_PERMISSIONS - /etc/sysrepo/data/ r 660 root wheel - - - - - - /etc/sysrepo/data d 770 root wheel - - - - - -endef -define TEST_MODE_CLEANUP - rm -f /dev/shm/$(TEST_MODE_SYSREPO_SHM_PREFIX)* -endef - -TEST_MODE_PRE_INSTALL_TARGET_HOOKS += TEST_MODE_CLEANUP -TEST_MODE_POST_INSTALL_TARGET_HOOKS += TEST_MODE_INSTALL_YANG_MODULES - -$(eval $(autotools-package))