All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/6] package/libyang: bump to version 3.4.2
@ 2024-12-19 15:21 Heiko Thiery
  2024-12-19 15:21 ` [Buildroot] [PATCH 2/6] package/libnetconf2: bump to version 3.5.1 Heiko Thiery
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Heiko Thiery @ 2024-12-19 15:21 UTC (permalink / raw)
  To: buildroot; +Cc: Fiona Klute, Heiko Thiery, Jan Kundrát

The LICENSE hash has to be updated due to copyright year change.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
 package/libyang/libyang.hash | 4 ++--
 package/libyang/libyang.mk   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/libyang/libyang.hash b/package/libyang/libyang.hash
index e03278adfd..eb8388166a 100644
--- a/package/libyang/libyang.hash
+++ b/package/libyang/libyang.hash
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  77a0aaaeb3df720aeb70d6896e32e2c2be099d48df73e3cfb52567051af3e44b  libyang-2.1.148.tar.gz
-sha256  0b7ec43747d211a1e49c53588b0822062947bab6bdcc95238578beab34cba5bb  LICENSE
+sha256  2767902aeffc55c55767f4ecfe5371c422174794edd8aa2b02028d5fe3f8b82c  libyang-3.4.2.tar.gz
+sha256  f4fbaa09c8b2faa6a873a38181ff860e2ff90808320f71deb369f03ddfb920da  LICENSE
diff --git a/package/libyang/libyang.mk b/package/libyang/libyang.mk
index fca0cd63f8..2f095c7e9b 100644
--- a/package/libyang/libyang.mk
+++ b/package/libyang/libyang.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBYANG_VERSION = 2.1.148
+LIBYANG_VERSION = 3.4.2
 LIBYANG_SITE = $(call github,CESNET,libyang,v$(LIBYANG_VERSION))
 LIBYANG_LICENSE = BSD-3-Clause
 LIBYANG_LICENSE_FILES = LICENSE
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 2/6] package/libnetconf2: bump to version 3.5.1
  2024-12-19 15:21 [Buildroot] [PATCH 1/6] package/libyang: bump to version 3.4.2 Heiko Thiery
@ 2024-12-19 15:21 ` Heiko Thiery
  2024-12-28 22:40   ` Thomas Petazzoni via buildroot
  2024-12-19 15:21 ` [Buildroot] [PATCH 3/6] package/sysrepo: bump to version 2.11.7 Heiko Thiery
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Heiko Thiery @ 2024-12-19 15:21 UTC (permalink / raw)
  To: buildroot; +Cc: Fiona Klute, Heiko Thiery, Jan Kundrát

Since version 3.x the options for TLS and SSH are merged to SSH_TLS. Thus
we also require LIBCURL. The openssl package dependency is now mandatory
and only selected when libssh-server and libcurl is selected.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
 package/libnetconf2/libnetconf2.hash |  2 +-
 package/libnetconf2/libnetconf2.mk   | 26 +++++++-------------------
 2 files changed, 8 insertions(+), 20 deletions(-)

diff --git a/package/libnetconf2/libnetconf2.hash b/package/libnetconf2/libnetconf2.hash
index 675c76a500..78fc5c8400 100644
--- a/package/libnetconf2/libnetconf2.hash
+++ b/package/libnetconf2/libnetconf2.hash
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  72e9a6461fadbd22f0cf0d23ba68d62b297c8f564f7f2bee069748fb67fc3a24  libnetconf2-2.1.28.tar.gz
+sha256  0d49e796798015e35a08bfbd53a3dd4004cb9a26d4b1dd1f90940a427d483bbb  libnetconf2-3.5.1.tar.gz
 sha256  bd962ab457c8a8cb8faaaa36c11484680f3c9a47dbc336507817ae8935384064  LICENSE
diff --git a/package/libnetconf2/libnetconf2.mk b/package/libnetconf2/libnetconf2.mk
index 88163926c0..40812cc0f0 100644
--- a/package/libnetconf2/libnetconf2.mk
+++ b/package/libnetconf2/libnetconf2.mk
@@ -4,41 +4,29 @@
 #
 ################################################################################
 
-LIBNETCONF2_VERSION = 2.1.28
+LIBNETCONF2_VERSION = 3.5.1
 LIBNETCONF2_SITE = $(call github,CESNET,libnetconf2,v$(LIBNETCONF2_VERSION))
 LIBNETCONF2_INSTALL_STAGING = YES
 LIBNETCONF2_LICENSE = BSD-3-Clause
 LIBNETCONF2_LICENSE_FILES = LICENSE
-LIBNETCONF2_DEPENDENCIES = libyang
+LIBNETCONF2_DEPENDENCIES = libyang libxcrypt openssl
 HOST_LIBNETCONF2_DEPENDENCIES = host-libyang
 
 LIBNETCONF2_CONF_OPTS = \
 	-DENABLE_TESTS=OFF \
 	-DENABLE_VALGRIND_TESTS=OFF
 
-ifeq ($(BR2_PACKAGE_LIBSSH_SERVER), y)
-LIBNETCONF2_CONF_OPTS += -DENABLE_SSH=ON
-LIBNETCONF2_DEPENDENCIES += libssh
+ifeq ($(BR2_PACKAGE_LIBSSH_SERVER)$(BR2_PACKAGE_LIBOPENSSL)$(BR2_PACKAGE_LIBCURL),yyy)
+LIBNETCONF2_CONF_OPTS += -DENABLE_SSH_TLS=ON
+LIBNETCONF2_DEPENDENCIES += libssh libcurl
 else
-LIBNETCONF2_CONF_OPTS += -DENABLE_SSH=OFF
-endif
-
-ifeq ($(BR2_PACKAGE_LIBOPENSSL), y)
-LIBNETCONF2_CONF_OPTS += -DENABLE_TLS=ON
-LIBNETCONF2_DEPENDENCIES += openssl
-else
-LIBNETCONF2_CONF_OPTS += -DENABLE_TLS=OFF
-endif
-
-ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
-LIBNETCONF2_DEPENDENCIES += libxcrypt
+LIBNETCONF2_CONF_OPTS += -DENABLE_SSH_TLS=OFF
 endif
 
 HOST_LIBNETCONF2_CONF_OPTS = \
 	-DENABLE_TESTS=OFF \
 	-DENABLE_VALGRIND_TESTS=OFF \
-	-DENABLE_SSH=OFF \
-	-DENABLE_TLS=OFF
+	-DENABLE_TLS_SSH=OFF
 
 $(eval $(cmake-package))
 $(eval $(host-cmake-package))
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 3/6] package/sysrepo: bump to version 2.11.7
  2024-12-19 15:21 [Buildroot] [PATCH 1/6] package/libyang: bump to version 3.4.2 Heiko Thiery
  2024-12-19 15:21 ` [Buildroot] [PATCH 2/6] package/libnetconf2: bump to version 3.5.1 Heiko Thiery
@ 2024-12-19 15:21 ` Heiko Thiery
  2024-12-19 15:21 ` [Buildroot] [PATCH 4/6] package/netopeer2: bump to version 2.2.31 Heiko Thiery
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Heiko Thiery @ 2024-12-19 15:21 UTC (permalink / raw)
  To: buildroot; +Cc: Fiona Klute, Heiko Thiery, Jan Kundrát

Add new config options to enable/disable binary tools/daemon. By default
this options are enabled.

Also some sysv init script shellcheck warnings are fixed.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
 package/sysrepo/Config.in          | 21 +++++++++++++++++++++
 package/sysrepo/S51sysrepo-plugind |  3 ++-
 package/sysrepo/sysrepo.hash       |  2 +-
 package/sysrepo/sysrepo.mk         |  5 ++++-
 4 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/package/sysrepo/Config.in b/package/sysrepo/Config.in
index b1535bed9f..ff75575952 100644
--- a/package/sysrepo/Config.in
+++ b/package/sysrepo/Config.in
@@ -16,6 +16,27 @@ config BR2_PACKAGE_SYSREPO
 
 if BR2_PACKAGE_SYSREPO
 
+config BR2_PACKAGE_SYSREPO_SYSREPOCFG
+	bool "enable sysrepocfg"
+	default y
+	help
+	  Enable sysrepocfg.
+	  Build binary tool sysrepocfg
+
+config BR2_PACKAGE_SYSREPO_SYSREPOCTL
+	bool "enable sysrepoctl"
+	default y
+	help
+	  Enable sysrepoctl.
+	  Build binary tool sysrepoctl
+
+config BR2_PACKAGE_SYSREPO_PLUGIND
+	bool "enable sysrepo-plugind"
+	default y
+	help
+	  Enable sysrepo-plugind.
+	  Build binary daemon sysrepo-plugind
+
 config BR2_PACKAGE_SYSREPO_EXAMPLES
 	bool "enable examples"
 	help
diff --git a/package/sysrepo/S51sysrepo-plugind b/package/sysrepo/S51sysrepo-plugind
index 60ea3ba7a9..4bee6c1705 100644
--- a/package/sysrepo/S51sysrepo-plugind
+++ b/package/sysrepo/S51sysrepo-plugind
@@ -10,6 +10,7 @@ SYSREPO_PLUGIND_ARGS=""
 
 start() {
 	printf 'Starting %s: ' "$DAEMON"
+	# shellcheck disable=SC2086 # we need the word splitting
 	start-stop-daemon -S -q -x "$EXECUTABLE" \
 		-- $SYSREPO_PLUGIND_ARGS
 	status=$?
@@ -45,7 +46,7 @@ reload() {
 }
 
 case "$1" in
-    start|stop|restart|reload)
+	start|stop|restart|reload)
 		"$1";;
 	*)
 		echo "Usage: $0 {start|stop|restart|reload}"
diff --git a/package/sysrepo/sysrepo.hash b/package/sysrepo/sysrepo.hash
index 056f70787d..93c336e1a9 100644
--- a/package/sysrepo/sysrepo.hash
+++ b/package/sysrepo/sysrepo.hash
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  467efed8d0f62c26a0d200602b911096eb2d67858e620937ab68f96b316fa9b7  sysrepo-2.2.150.tar.gz
+sha256  45a98a71827dd1428e2c6b7dedea47558cdfbc491042bbdbc0c52e607ab8266e  sysrepo-2.11.7.tar.gz
 sha256  88f1b7e5c64d2c113e07105aa9c0fb80639b40287565be1c2afd0949df83d826  LICENSE
diff --git a/package/sysrepo/sysrepo.mk b/package/sysrepo/sysrepo.mk
index 7f2570bd7d..c215be0159 100644
--- a/package/sysrepo/sysrepo.mk
+++ b/package/sysrepo/sysrepo.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-SYSREPO_VERSION = 2.2.150
+SYSREPO_VERSION = 2.11.7
 SYSREPO_SITE = $(call github,sysrepo,sysrepo,v$(SYSREPO_VERSION))
 SYSREPO_INSTALL_STAGING = YES
 SYSREPO_LICENSE = BSD-3-Clause
@@ -18,6 +18,9 @@ endif
 
 SYSREPO_CONF_OPTS = \
 	-DBUILD_EXAMPLES=$(if $(BR2_PACKAGE_SYSREPO_EXAMPLES),ON,OFF) \
+	-DENABLE_SYSREPOCFG=$(if $(BR2_PACKAGE_SYSREPO_SYSREPOCFG),ON,OFF) \
+	-DENABLE_SYSREPOCTL=$(if $(BR2_PACKAGE_SYSREPO_SYSREPOCTL),ON,OFF) \
+	-DENABLE_SYSREPO_PLUGIND=$(if $(BR2_PACKAGE_SYSREPO_PLUGIND),ON,OFF) \
 	-DENABLE_TESTS=OFF \
 	-DENABLE_VALGRIND_TESTS=OFF \
 	-DREPO_PATH=/etc/sysrepo
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 4/6] package/netopeer2: bump to version 2.2.31
  2024-12-19 15:21 [Buildroot] [PATCH 1/6] package/libyang: bump to version 3.4.2 Heiko Thiery
  2024-12-19 15:21 ` [Buildroot] [PATCH 2/6] package/libnetconf2: bump to version 3.5.1 Heiko Thiery
  2024-12-19 15:21 ` [Buildroot] [PATCH 3/6] package/sysrepo: bump to version 2.11.7 Heiko Thiery
@ 2024-12-19 15:21 ` Heiko Thiery
  2024-12-19 15:21 ` [Buildroot] [PATCH 5/6] support/testing/tests/package/test_sysrepo.py: add new test Heiko Thiery
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Heiko Thiery @ 2024-12-19 15:21 UTC (permalink / raw)
  To: buildroot; +Cc: Fiona Klute, Heiko Thiery, Jan Kundrát

Add select for BR2_PACKAGE_LIBCURL since this is a requirement for
libnetconf2 to add TLS_SSH support.
Package configuration option to set ssh authorized keys format
and option to enable/disable calling syrepo setup script.
The utils/check-package script complained about the init script, so this
is fixed in advance.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
 package/netopeer2/Config.in                   | 20 +++++++++++++++++--
 .../{S52netopeer2 => S52netopeer2-server}     |  2 +-
 package/netopeer2/netopeer2.hash              |  2 +-
 package/netopeer2/netopeer2.mk                | 12 ++++++++---
 4 files changed, 29 insertions(+), 7 deletions(-)
 rename package/netopeer2/{S52netopeer2 => S52netopeer2-server} (92%)

diff --git a/package/netopeer2/Config.in b/package/netopeer2/Config.in
index db31a786a1..5adff14ac7 100644
--- a/package/netopeer2/Config.in
+++ b/package/netopeer2/Config.in
@@ -14,9 +14,10 @@ config BR2_PACKAGE_NETOPEER2
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # sysrepo
 	select BR2_PACKAGE_LIBNETCONF2
 	select BR2_PACKAGE_LIBSSH
-	select BR2_PACKAGE_LIBSSH_SERVER # For libnetconf2 to have SSH
+	select BR2_PACKAGE_LIBSSH_SERVER # For libnetconf2 to have SSH/TLS support
+	select BR2_PACKAGE_LIBCURL # For libnetconf2 to have SSH/TLS support
+	select BR2_PACKAGE_OPENSSL # For libnetconf2 to have SSH/TLS support
 	select BR2_PACKAGE_LIBYANG
-	select BR2_PACKAGE_OPENSSL # For libnetconf2 to have TLS
 	select BR2_PACKAGE_SYSREPO
 	help
 	  Netopeer2 is a set of tools implementing network configuration
@@ -33,4 +34,19 @@ config BR2_PACKAGE_NETOPEER2_CLI
 	help
 	  Enable netopeer2 CLI.
 
+config BR2_PACKAGE_NETOPEER2_SSH_AUTHORIZED_KEYS_FORMAT
+	string "ssh authorized keys format"
+	help
+	  Enable netopeer2 CLI.
+	  sshd-like pattern (with '%h', '%u', '%U') for determining
+	  path to users SSH authorized_keys file
+
+config BR2_PACKAGE_NETOPEER2_SYSREPO_SETUP
+	bool "sysrepo modules setup"
+	default y
+	help
+	  Install sysrepo modules
+	  Install required modules with their default configuration
+	  into sysrepo using a script
+
 endif
diff --git a/package/netopeer2/S52netopeer2 b/package/netopeer2/S52netopeer2-server
similarity index 92%
rename from package/netopeer2/S52netopeer2
rename to package/netopeer2/S52netopeer2-server
index cadd6b9feb..3fd993b578 100644
--- a/package/netopeer2/S52netopeer2
+++ b/package/netopeer2/S52netopeer2-server
@@ -7,7 +7,7 @@ NETOPEER2_SERVER_ARGS=""
 
 start() {
 	printf 'Starting %s: ' "$DAEMON"
-
+	# shellcheck disable=SC2086 # we need the word splitting
 	start-stop-daemon -S -q -p $PIDFILE -x "/usr/sbin/$DAEMON" \
 		-- $NETOPEER2_SERVER_ARGS
 	status=$?
diff --git a/package/netopeer2/netopeer2.hash b/package/netopeer2/netopeer2.hash
index 6a278fbbaf..853696ae79 100644
--- a/package/netopeer2/netopeer2.hash
+++ b/package/netopeer2/netopeer2.hash
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  2b1daac037f18c303e0c0dc3318ba30196459472e4c59f2f8547ee74d4cdf31d  netopeer2-2.1.49.tar.gz
+sha256  99c4827626852f9d4028330a79efa0b291580aceb0bfd8ae9aaf4ecea66ccc3b  netopeer2-2.2.31.tar.gz
 sha256  b46f161fbdcf127d3ef22602e15958c3092fe3294f71a2dc8cdf8f6689cba95b  LICENSE
diff --git a/package/netopeer2/netopeer2.mk b/package/netopeer2/netopeer2.mk
index 47fcd31acd..125451587a 100644
--- a/package/netopeer2/netopeer2.mk
+++ b/package/netopeer2/netopeer2.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-NETOPEER2_VERSION = 2.1.49
+NETOPEER2_VERSION = 2.2.31
 NETOPEER2_SITE = $(call github,CESNET,Netopeer2,v$(NETOPEER2_VERSION))
 NETOPEER2_DL_SUBDIR = netopeer2
 NETOPEER2_LICENSE = BSD-3-Clause
@@ -17,8 +17,14 @@ endif
 
 NETOPEER2_CONF_OPTS = \
 	-DBUILD_CLI=$(if $(BR2_PACKAGE_NETOPEER2_CLI),ON,OFF) \
+	-DSYSREPO_SETUP=$(if $(BR2_PACKAGE_NETOPEER2_SYSREPO_SETUP),ON,OFF) \
 	-DENABLE_TESTS=OFF
 
+ifneq ($(call qstrip,$(BR2_PACKAGE_NETOPEER2_SSH_AUTHORIZED_KEYS_FORMAT)),)
+NETOPEER2_CONF_OPTS += \
+	-DSSH_AUTHORIZED_KEYS_FORMAT=$(call qstrip,$(BR2_PACKAGE_NETOPEER2_SSH_AUTHORIZED_KEYS_FORMAT))
+endif
+
 # Set a build specific SYSREPO_SHM_PREFIX to ensure we can safely delete the
 # files. This also ensures that concurrent parallel builds will not be
 # affected mutualy.
@@ -29,8 +35,8 @@ NETOPEER2_MAKE_ENV = \
 	SYSREPO_SHM_PREFIX=$(NETOPEER2_SYSREPO_SHM_PREFIX)
 
 define NETOPEER2_INSTALL_INIT_SYSV
-	$(INSTALL) -m 755 -D package/netopeer2/S52netopeer2 \
-		$(TARGET_DIR)/etc/init.d/S52netopeer2
+	$(INSTALL) -m 755 -D package/netopeer2/S52netopeer2-server \
+		$(TARGET_DIR)/etc/init.d/S52netopeer2-server
 endef
 
 # The host sysrepo used to install the netopeer2 modules will leave
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 5/6] support/testing/tests/package/test_sysrepo.py: add new test
  2024-12-19 15:21 [Buildroot] [PATCH 1/6] package/libyang: bump to version 3.4.2 Heiko Thiery
                   ` (2 preceding siblings ...)
  2024-12-19 15:21 ` [Buildroot] [PATCH 4/6] package/netopeer2: bump to version 2.2.31 Heiko Thiery
@ 2024-12-19 15:21 ` Heiko Thiery
  2024-12-19 15:21 ` [Buildroot] [PATCH 6/6] support/testing/tests/package/test_netopeer2.py: " Heiko Thiery
  2024-12-28 23:00 ` [Buildroot] [PATCH 1/6] package/libyang: bump to version 3.4.2 Thomas Petazzoni via buildroot
  5 siblings, 0 replies; 11+ messages in thread
From: Heiko Thiery @ 2024-12-19 15:21 UTC (permalink / raw)
  To: buildroot; +Cc: Fiona Klute, Heiko Thiery, Jan Kundrát

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
 DEVELOPERS                                    |  1 +
 support/testing/tests/package/test_sysrepo.py | 25 +++++++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 support/testing/tests/package/test_sysrepo.py

diff --git a/DEVELOPERS b/DEVELOPERS
index aedd736772..3534458a96 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1389,6 +1389,7 @@ F:	package/rauc/
 F:	package/sysrepo/
 F:	support/testing/tests/package/sample_python_yamllint.py
 F:	support/testing/tests/package/test_python_yamllint.py
+F:	support/testing/tests/package/test_sysrepo.py
 
 N:	Hervé Codina <herve.codina@bootlin.com>
 F:	package/alchemy/
diff --git a/support/testing/tests/package/test_sysrepo.py b/support/testing/tests/package/test_sysrepo.py
new file mode 100644
index 0000000000..bf0c2a1305
--- /dev/null
+++ b/support/testing/tests/package/test_sysrepo.py
@@ -0,0 +1,25 @@
+import os
+
+import infra.basetest
+
+
+class TestSysrepo(infra.basetest.BRTest):
+    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+        """
+        BR2_TARGET_ROOTFS_CPIO=y
+        BR2_PACKAGE_SYSREPO=y
+        """
+
+    def test_run(self):
+        cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
+        self.emulator.boot(arch="armv5",
+                           kernel="builtin",
+                           options=["-initrd", cpio_file])
+        self.emulator.login()
+
+        self.assertRunOk("sysrepoctl -h")
+        self.assertRunOk("sysrepoctl -l")
+
+        self.assertRunOk("sysrepocfg -h")
+        self.assertRunOk('sysrepocfg -X -d operational -x "/sysrepo-monitoring:sysrepo-state"')
+        self.assertRunOk('sysrepocfg -X -d operational -x "/sysrepo-monitoring:sysrepo-state" -f json')
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 6/6] support/testing/tests/package/test_netopeer2.py: add new test
  2024-12-19 15:21 [Buildroot] [PATCH 1/6] package/libyang: bump to version 3.4.2 Heiko Thiery
                   ` (3 preceding siblings ...)
  2024-12-19 15:21 ` [Buildroot] [PATCH 5/6] support/testing/tests/package/test_sysrepo.py: add new test Heiko Thiery
@ 2024-12-19 15:21 ` Heiko Thiery
  2024-12-28 23:02   ` Thomas Petazzoni
  2024-12-28 23:00 ` [Buildroot] [PATCH 1/6] package/libyang: bump to version 3.4.2 Thomas Petazzoni via buildroot
  5 siblings, 1 reply; 11+ messages in thread
From: Heiko Thiery @ 2024-12-19 15:21 UTC (permalink / raw)
  To: buildroot; +Cc: Fiona Klute, Heiko Thiery, Jan Kundrát

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
 DEVELOPERS                                    |  1 +
 .../testing/tests/package/test_netopeer2.py   | 40 +++++++++++++++++++
 2 files changed, 41 insertions(+)
 create mode 100644 support/testing/tests/package/test_netopeer2.py

diff --git a/DEVELOPERS b/DEVELOPERS
index 3534458a96..373e0e1f7f 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1389,6 +1389,7 @@ F:	package/rauc/
 F:	package/sysrepo/
 F:	support/testing/tests/package/sample_python_yamllint.py
 F:	support/testing/tests/package/test_python_yamllint.py
+F:	support/testing/tests/package/test_netopeer2.py
 F:	support/testing/tests/package/test_sysrepo.py
 
 N:	Hervé Codina <herve.codina@bootlin.com>
diff --git a/support/testing/tests/package/test_netopeer2.py b/support/testing/tests/package/test_netopeer2.py
new file mode 100644
index 0000000000..f179d82504
--- /dev/null
+++ b/support/testing/tests/package/test_netopeer2.py
@@ -0,0 +1,40 @@
+import os
+import time
+
+import infra.basetest
+
+
+class TestNetopeer2(infra.basetest.BRTest):
+    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+        f"""
+        BR2_TARGET_ROOTFS_CPIO=y
+        BR2_PACKAGE_NETOPEER2=y
+        BR2_PACKAGE_NETOPEER2_CLI=y
+        """
+
+    def run_netopeer_cli_cmd(self, cmds):
+        cmd = "netopeer2-cli <<EOF\n"
+        cmd += "\n".join(cmds)
+        cmd += "\nEOF"
+        self.assertRunOk(cmd)
+
+    def test_run(self):
+        cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
+        self.emulator.boot(arch="armv5",
+                           kernel="builtin",
+                           options=["-initrd", cpio_file])
+        self.emulator.login()
+
+        # The daemon takes some time to startup
+        time.sleep(2)
+
+        # Check if the Daemon is running
+        self.assertRunOk("ls /var/run/netopeer2-server.pid")
+        self.assertRunOk("ps aux | grep [n]etopeer2-server")
+
+        # Run CLI
+        help_command = [
+            "help",
+            "quit",
+        ]
+        self.run_netopeer_cli_cmd(help_command)
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH 2/6] package/libnetconf2: bump to version 3.5.1
  2024-12-19 15:21 ` [Buildroot] [PATCH 2/6] package/libnetconf2: bump to version 3.5.1 Heiko Thiery
@ 2024-12-28 22:40   ` Thomas Petazzoni via buildroot
  2024-12-30  9:59     ` Heiko Thiery
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-12-28 22:40 UTC (permalink / raw)
  To: Heiko Thiery; +Cc: buildroot, Fiona Klute, Jan Kundrát

Hello Heiko,

On Thu, 19 Dec 2024 16:21:03 +0100
Heiko Thiery <heiko.thiery@gmail.com> wrote:

> Since version 3.x the options for TLS and SSH are merged to SSH_TLS. Thus
> we also require LIBCURL. The openssl package dependency is now mandatory
> and only selected when libssh-server and libcurl is selected.

This last sentence doesn't match what is done in your code I'm afraid,
so I'm unclear what you're trying to achieve.

> diff --git a/package/libnetconf2/libnetconf2.hash b/package/libnetconf2/libnetconf2.hash
> index 675c76a500..78fc5c8400 100644
> --- a/package/libnetconf2/libnetconf2.hash
> +++ b/package/libnetconf2/libnetconf2.hash
> @@ -1,3 +1,3 @@
>  # Locally calculated
> -sha256  72e9a6461fadbd22f0cf0d23ba68d62b297c8f564f7f2bee069748fb67fc3a24  libnetconf2-2.1.28.tar.gz
> +sha256  0d49e796798015e35a08bfbd53a3dd4004cb9a26d4b1dd1f90940a427d483bbb  libnetconf2-3.5.1.tar.gz
>  sha256  bd962ab457c8a8cb8faaaa36c11484680f3c9a47dbc336507817ae8935384064  LICENSE
> diff --git a/package/libnetconf2/libnetconf2.mk b/package/libnetconf2/libnetconf2.mk
> index 88163926c0..40812cc0f0 100644
> --- a/package/libnetconf2/libnetconf2.mk
> +++ b/package/libnetconf2/libnetconf2.mk
> @@ -4,41 +4,29 @@
>  #
>  ################################################################################
>  
> -LIBNETCONF2_VERSION = 2.1.28
> +LIBNETCONF2_VERSION = 3.5.1
>  LIBNETCONF2_SITE = $(call github,CESNET,libnetconf2,v$(LIBNETCONF2_VERSION))
>  LIBNETCONF2_INSTALL_STAGING = YES
>  LIBNETCONF2_LICENSE = BSD-3-Clause
>  LIBNETCONF2_LICENSE_FILES = LICENSE
> -LIBNETCONF2_DEPENDENCIES = libyang
> +LIBNETCONF2_DEPENDENCIES = libyang libxcrypt openssl

Here you add openssl in your mandatory dependencies, but you don't
select it. This is going to fail badly, as you cannot depend on a
package that isn't enabled in your configuration.

>  HOST_LIBNETCONF2_DEPENDENCIES = host-libyang
>  
>  LIBNETCONF2_CONF_OPTS = \
>  	-DENABLE_TESTS=OFF \
>  	-DENABLE_VALGRIND_TESTS=OFF
>  
> -ifeq ($(BR2_PACKAGE_LIBSSH_SERVER), y)
> -LIBNETCONF2_CONF_OPTS += -DENABLE_SSH=ON
> -LIBNETCONF2_DEPENDENCIES += libssh
> +ifeq ($(BR2_PACKAGE_LIBSSH_SERVER)$(BR2_PACKAGE_LIBOPENSSL)$(BR2_PACKAGE_LIBCURL),yyy)

And here it is extremely weird to have a test for
$(BR2_PACKAGE_LIBOPENSSL). Either it's mandatory for the package, and
therefore there's no point in testing if it's enabled... or it's not
mandatory and openssl shouldn't be unconditionally added to
LIBNETCONF2_DEPENDENCIES above.

Could you clarify this?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH 1/6] package/libyang: bump to version 3.4.2
  2024-12-19 15:21 [Buildroot] [PATCH 1/6] package/libyang: bump to version 3.4.2 Heiko Thiery
                   ` (4 preceding siblings ...)
  2024-12-19 15:21 ` [Buildroot] [PATCH 6/6] support/testing/tests/package/test_netopeer2.py: " Heiko Thiery
@ 2024-12-28 23:00 ` Thomas Petazzoni via buildroot
  5 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-12-28 23:00 UTC (permalink / raw)
  To: Heiko Thiery; +Cc: buildroot, Fiona Klute, Jan Kundrát

Hello Heiko,

On Thu, 19 Dec 2024 16:21:01 +0100
Heiko Thiery <heiko.thiery@gmail.com> wrote:

> The LICENSE hash has to be updated due to copyright year change.
> 
> Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

I wanted to merge this with the new tests, but without the libnetconf2
bump as I reported some issues with it. However, it seems like this
libyang update and the libnetconf2 update need to be done in lockstep,
as the build of libnetconf2 version in Buildroot today with the updated
libyang fails:

/home/thomas/projets/outputs/TestNetopeer2/build/libnetconf2-2.1.28/src/log.c:140:5: error: too many arguments to function 'ly_set_log_clb'
  140 |     ly_set_log_clb(nc_ly_log_clb, 1);
      |     ^~~~~~~~~~~~~~

and some more errors clearly hitting at an API change.

Not much you can do about it, aside for making it clear in the commit
messages.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH 6/6] support/testing/tests/package/test_netopeer2.py: add new test
  2024-12-19 15:21 ` [Buildroot] [PATCH 6/6] support/testing/tests/package/test_netopeer2.py: " Heiko Thiery
@ 2024-12-28 23:02   ` Thomas Petazzoni
  2024-12-30 10:23     ` Heiko Thiery
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2024-12-28 23:02 UTC (permalink / raw)
  To: Heiko Thiery; +Cc: buildroot, Fiona Klute, Jan Kundrát

Hello Heiko,

On Thu, 19 Dec 2024 16:21:11 +0100
Heiko Thiery <heiko.thiery@gmail.com> wrote:

> Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

I wanted to merge this test with the current version of netopeer2 and
related packages in Buildroot, i.e without your version bumps, and the
build fails with:

-- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) 
-- libcurl not found, url capability will not be supported
-- Could NOT find LibSystemd (missing: LIBSYSTEMD_LIBRARY LIBSYSTEMD_INCLUDE_DIR SYSTEMD_UNIT_DIR) 
CMake Warning at CMakeLists.txt:301 (message):
  Disabling netopeer2-server systemd support because libsystemd was not
  found.


-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found LibYANG: /home/thomas/projets/outputs/TestNetopeer2/host/arm-buildroot-linux-gnueabi/sysroot/usr/lib/libyang.so (found suitable version "2.46.3", minimum required is "2.28.0")
-- Found Sysrepo: /home/thomas/projets/outputs/TestNetopeer2/host/arm-buildroot-linux-gnueabi/sysroot/usr/lib/libsysrepo.so (found suitable version "7.23.1", minimum required is "7.12.0")
CMake Error at cli/CMakeLists.txt:49 (message):
  c_rehash Perl OpenSSL script not found!


-- Configuring incomplete, errors occurred!
make[1]: *** [package/pkg-generic.mk:279: /home/thomas/projets/outputs/TestNetopeer2/build/netopeer2-2.1.49/.stamp_configured] Error 1
make: *** [Makefile:23: _all] Error 2

So it looks like there is an existing issue in Buildroot?

> +class TestNetopeer2(infra.basetest.BRTest):
> +    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
> +        f"""

Please drop the "f" here, since you're not using this as an f-formatted
string, flake8 complains when checking this Python script.

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH 2/6] package/libnetconf2: bump to version 3.5.1
  2024-12-28 22:40   ` Thomas Petazzoni via buildroot
@ 2024-12-30  9:59     ` Heiko Thiery
  0 siblings, 0 replies; 11+ messages in thread
From: Heiko Thiery @ 2024-12-30  9:59 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot, Fiona Klute, Jan Kundrát

Hi Thomas,

Am Sa., 28. Dez. 2024 um 23:40 Uhr schrieb Thomas Petazzoni
<thomas.petazzoni@bootlin.com>:
>
> Hello Heiko,
>
> On Thu, 19 Dec 2024 16:21:03 +0100
> Heiko Thiery <heiko.thiery@gmail.com> wrote:
>
> > Since version 3.x the options for TLS and SSH are merged to SSH_TLS. Thus
> > we also require LIBCURL. The openssl package dependency is now mandatory
> > and only selected when libssh-server and libcurl is selected.
>
> This last sentence doesn't match what is done in your code I'm afraid,
> so I'm unclear what you're trying to achieve.

You're right. This is not really clear. This is a commit message that
is a combination I made during the package update. Unfortunately I did
not clearly read it before sending it out. I will cleanup the message.

> > diff --git a/package/libnetconf2/libnetconf2.hash b/package/libnetconf2/libnetconf2.hash
> > index 675c76a500..78fc5c8400 100644
> > --- a/package/libnetconf2/libnetconf2.hash
> > +++ b/package/libnetconf2/libnetconf2.hash
> > @@ -1,3 +1,3 @@
> >  # Locally calculated
> > -sha256  72e9a6461fadbd22f0cf0d23ba68d62b297c8f564f7f2bee069748fb67fc3a24  libnetconf2-2.1.28.tar.gz
> > +sha256  0d49e796798015e35a08bfbd53a3dd4004cb9a26d4b1dd1f90940a427d483bbb  libnetconf2-3.5.1.tar.gz
> >  sha256  bd962ab457c8a8cb8faaaa36c11484680f3c9a47dbc336507817ae8935384064  LICENSE
> > diff --git a/package/libnetconf2/libnetconf2.mk b/package/libnetconf2/libnetconf2.mk
> > index 88163926c0..40812cc0f0 100644
> > --- a/package/libnetconf2/libnetconf2.mk
> > +++ b/package/libnetconf2/libnetconf2.mk
> > @@ -4,41 +4,29 @@
> >  #
> >  ################################################################################
> >
> > -LIBNETCONF2_VERSION = 2.1.28
> > +LIBNETCONF2_VERSION = 3.5.1
> >  LIBNETCONF2_SITE = $(call github,CESNET,libnetconf2,v$(LIBNETCONF2_VERSION))
> >  LIBNETCONF2_INSTALL_STAGING = YES
> >  LIBNETCONF2_LICENSE = BSD-3-Clause
> >  LIBNETCONF2_LICENSE_FILES = LICENSE
> > -LIBNETCONF2_DEPENDENCIES = libyang
> > +LIBNETCONF2_DEPENDENCIES = libyang libxcrypt openssl
>
> Here you add openssl in your mandatory dependencies, but you don't
> select it. This is going to fail badly, as you cannot depend on a
> package that isn't enabled in your configuration.

I will fix that.

> >  HOST_LIBNETCONF2_DEPENDENCIES = host-libyang
> >
> >  LIBNETCONF2_CONF_OPTS = \
> >       -DENABLE_TESTS=OFF \
> >       -DENABLE_VALGRIND_TESTS=OFF
> >
> > -ifeq ($(BR2_PACKAGE_LIBSSH_SERVER), y)
> > -LIBNETCONF2_CONF_OPTS += -DENABLE_SSH=ON
> > -LIBNETCONF2_DEPENDENCIES += libssh
> > +ifeq ($(BR2_PACKAGE_LIBSSH_SERVER)$(BR2_PACKAGE_LIBOPENSSL)$(BR2_PACKAGE_LIBCURL),yyy)
>
> And here it is extremely weird to have a test for
> $(BR2_PACKAGE_LIBOPENSSL). Either it's mandatory for the package, and
> therefore there's no point in testing if it's enabled... or it's not
> mandatory and openssl shouldn't be unconditionally added to
> LIBNETCONF2_DEPENDENCIES above.

I will fix that as well.

Thanks


> Could you clarify this?
>
> Thanks a lot!
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH 6/6] support/testing/tests/package/test_netopeer2.py: add new test
  2024-12-28 23:02   ` Thomas Petazzoni
@ 2024-12-30 10:23     ` Heiko Thiery
  0 siblings, 0 replies; 11+ messages in thread
From: Heiko Thiery @ 2024-12-30 10:23 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot, Fiona Klute, Jan Kundrát

Hi,

Am So., 29. Dez. 2024 um 00:02 Uhr schrieb Thomas Petazzoni
<thomas.petazzoni@bootlin.com>:
>
> Hello Heiko,
>
> On Thu, 19 Dec 2024 16:21:11 +0100
> Heiko Thiery <heiko.thiery@gmail.com> wrote:
>
> > Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
>
> I wanted to merge this test with the current version of netopeer2 and
> related packages in Buildroot, i.e without your version bumps, and the
> build fails with:
>
> -- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)
> -- libcurl not found, url capability will not be supported
> -- Could NOT find LibSystemd (missing: LIBSYSTEMD_LIBRARY LIBSYSTEMD_INCLUDE_DIR SYSTEMD_UNIT_DIR)
> CMake Warning at CMakeLists.txt:301 (message):
>   Disabling netopeer2-server systemd support because libsystemd was not
>   found.
>
>
> -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
> -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
> -- Found Threads: TRUE
> -- Found LibYANG: /home/thomas/projets/outputs/TestNetopeer2/host/arm-buildroot-linux-gnueabi/sysroot/usr/lib/libyang.so (found suitable version "2.46.3", minimum required is "2.28.0")
> -- Found Sysrepo: /home/thomas/projets/outputs/TestNetopeer2/host/arm-buildroot-linux-gnueabi/sysroot/usr/lib/libsysrepo.so (found suitable version "7.23.1", minimum required is "7.12.0")
> CMake Error at cli/CMakeLists.txt:49 (message):
>   c_rehash Perl OpenSSL script not found!
>
>
> -- Configuring incomplete, errors occurred!
> make[1]: *** [package/pkg-generic.mk:279: /home/thomas/projets/outputs/TestNetopeer2/build/netopeer2-2.1.49/.stamp_configured] Error 1
> make: *** [Makefile:23: _all] Error 2
>
> So it looks like there is an existing issue in Buildroot?

I suspect that the config here does not match the old packages. I have
tested the test with the updated ones.

>
> > +class TestNetopeer2(infra.basetest.BRTest):
> > +    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
> > +        f"""
>
> Please drop the "f" here, since you're not using this as an f-formatted
> string, flake8 complains when checking this Python script.

ok

> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-12-30 10:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-19 15:21 [Buildroot] [PATCH 1/6] package/libyang: bump to version 3.4.2 Heiko Thiery
2024-12-19 15:21 ` [Buildroot] [PATCH 2/6] package/libnetconf2: bump to version 3.5.1 Heiko Thiery
2024-12-28 22:40   ` Thomas Petazzoni via buildroot
2024-12-30  9:59     ` Heiko Thiery
2024-12-19 15:21 ` [Buildroot] [PATCH 3/6] package/sysrepo: bump to version 2.11.7 Heiko Thiery
2024-12-19 15:21 ` [Buildroot] [PATCH 4/6] package/netopeer2: bump to version 2.2.31 Heiko Thiery
2024-12-19 15:21 ` [Buildroot] [PATCH 5/6] support/testing/tests/package/test_sysrepo.py: add new test Heiko Thiery
2024-12-19 15:21 ` [Buildroot] [PATCH 6/6] support/testing/tests/package/test_netopeer2.py: " Heiko Thiery
2024-12-28 23:02   ` Thomas Petazzoni
2024-12-30 10:23     ` Heiko Thiery
2024-12-28 23:00 ` [Buildroot] [PATCH 1/6] package/libyang: bump to version 3.4.2 Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.