Skip to contentSkip to conversation

package/libyang: bump to version 3.4.2

PATCH Superseded Heiko Thiery 3 participants 11 messages Dec 19, 2024 – Dec 30, 2024

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/6 package/libyang: bump to version 3.4.2

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

---
 package/libyang/libyang.hash | 4 ++--
 package/libyang/libyang.mk   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
package/libyang/libyang.hash +2 -2
index e03278adfd..eb8388166a 100644
@@ -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
package/libyang/libyang.mk +1 -1
index fca0cd63f8..2f095c7e9b 100644
@@ -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
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/6 package/libnetconf2: bump to version 3.5.1

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.

---
 package/libnetconf2/libnetconf2.hash |  2 +-
 package/libnetconf2/libnetconf2.mk   | 26 +++++++-------------------
 2 files changed, 8 insertions(+), 20 deletions(-)
package/libnetconf2/libnetconf2.hash +1 -1
index 675c76a500..78fc5c8400 100644
@@ -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
package/libnetconf2/libnetconf2.mk +7 -19
index 88163926c0..40812cc0f0 100644
@@ -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))
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH 2/6] package/libnetconf2: bump to version 3.5.1

Hello Heiko,

Quoted 3 lines · On Thu, 19 Dec 2024 16:21:03 +0100 Heiko Thiery <[email protected]> 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.

Quoted 15 lines
package/libnetconf2/libnetconf2.hash +1 -1
index 675c76a500..78fc5c8400 100644
@@ -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
package/libnetconf2/libnetconf2.mk +0 -0
index 88163926c0..40812cc0f0 100644
@@ -4,41 +4,29 @@
 #

package/libnetconf2/libnetconf2.mk line 12

Quoted 10 lines
package/libnetconf2/libnetconf2.mk +2 -2
 ################################################################################
 
-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.

package/libnetconf2/libnetconf2.mk line 19

Quoted 10 lines
package/libnetconf2/libnetconf2.mk +1 -3
 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

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

Re: [Buildroot] [PATCH 2/6] package/libnetconf2: bump to version 3.5.1

Hi Thomas,

Am Sa., 28. Dez. 2024 um 23:40 Uhr schrieb Thomas Petazzoni <[email protected]>:

Quoted 6 lines

Hello Heiko,

On Thu, 19 Dec 2024 16:21:03 +0100
Heiko Thiery <[email protected]> wrote:

Quoted 6 lines
Quoted 3 lines

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.

Quoted 17 lines
Quoted 17 lines
package/libnetconf2/libnetconf2.hash +1 -1
index 675c76a500..78fc5c8400 100644
@@ -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
package/libnetconf2/libnetconf2.mk +0 -0
index 88163926c0..40812cc0f0 100644
@@ -4,41 +4,29 @@
 #
 ################################################################################
 
Quoted 12 lines

package/libnetconf2/libnetconf2.mk line 12

Quoted 8 lines
package/libnetconf2/libnetconf2.mk +2 -2
-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.

Quoted 6 lines
Quoted 6 lines
package/libnetconf2/libnetconf2.mk +0 -0
 HOST_LIBNETCONF2_DEPENDENCIES = host-libyang
 
 LIBNETCONF2_CONF_OPTS = \
      -DENABLE_TESTS=OFF \
      -DENABLE_VALGRIND_TESTS=OFF
 
Quoted 10 lines

package/libnetconf2/libnetconf2.mk line 19

Quoted 4 lines
package/libnetconf2/libnetconf2.mk +1 -3
-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

Quoted 9 lines

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
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#4 lore raw

PATCH 3/6 package/sysrepo: bump to version 2.11.7

In reply to Heiko Thiery

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.

---
 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(-)
package/sysrepo/Config.in +21 -0
index b1535bed9f..ff75575952 100644
@@ -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
package/sysrepo/S51sysrepo-plugind +2 -1
index 60ea3ba7a9..4bee6c1705 100644
@@ -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}"
package/sysrepo/sysrepo.hash +1 -1
index 056f70787d..93c336e1a9 100644
@@ -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
package/sysrepo/sysrepo.mk +4 -1
index 7f2570bd7d..c215be0159 100644
@@ -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
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw

PATCH 4/6 package/netopeer2: bump to version 2.2.31

In reply to Heiko Thiery

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.

---
 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%)
package/netopeer2/Config.in +18 -2
index db31a786a1..5adff14ac7 100644
@@ -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
package/netopeer2/S52netopeer2-server renamed from package/netopeer2/S52netopeer2 +1 -1
similarity index 92%
rename from package/netopeer2/S52netopeer2
rename to package/netopeer2/S52netopeer2-server
index cadd6b9feb..3fd993b578 100644
@@ -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=$?
package/netopeer2/netopeer2.hash +1 -1
index 6a278fbbaf..853696ae79 100644
@@ -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
package/netopeer2/netopeer2.mk +9 -3
index 47fcd31acd..125451587a 100644
@@ -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
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#6 lore raw

PATCH 5/6 support/testing/tests/package/test_sysrepo.py: add new test

In reply to Heiko Thiery
---
 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
DEVELOPERS +1 -0
index aedd736772..3534458a96 100644
@@ -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 <[email protected]>
 F:	package/alchemy/
support/testing/tests/package/test_sysrepo.py new file +25 -0
new file mode 100644
index 0000000000..bf0c2a1305
@@ -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')
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#7 lore raw

PATCH 6/6 support/testing/tests/package/test_netopeer2.py: add new test

In reply to Heiko Thiery
---
 DEVELOPERS                                    |  1 +
 .../testing/tests/package/test_netopeer2.py   | 40 +++++++++++++++++++
 2 files changed, 41 insertions(+)
 create mode 100644 support/testing/tests/package/test_netopeer2.py
DEVELOPERS +1 -0
index 3534458a96..373e0e1f7f 100644
@@ -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 <[email protected]>
support/testing/tests/package/test_netopeer2.py new file +40 -0
new file mode 100644
index 0000000000..f179d82504
@@ -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)
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#8 lore raw

Re: [Buildroot] [PATCH 6/6] support/testing/tests/package/test_netopeer2.py: add new test

Hello Heiko,

Quoted 1 line · On Thu, 19 Dec 2024 16:21:11 +0100 Heiko Thiery <[email protected]> wrote:

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?

support/testing/tests/package/test_netopeer2.py line 9

Quoted 3 lines
support/testing/tests/package/test_netopeer2.py new file +3 -0
+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

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#9 lore raw

Re: [Buildroot] [PATCH 6/6] support/testing/tests/package/test_netopeer2.py: add new test

Hi,

Am So., 29. Dez. 2024 um 00:02 Uhr schrieb Thomas Petazzoni <[email protected]>:

Quoted 29 lines

Hello Heiko,

Quoted 1 line · On Thu, 19 Dec 2024 16:21:11 +0100 Heiko Thiery <[email protected]> wrote:

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!

Quoted 5 lines

-- 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.

Quoted 7 lines

support/testing/tests/package/test_netopeer2.py line 9

Quoted 4 lines
support/testing/tests/package/test_netopeer2.py new file +3 -0
+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

Quoted 7 lines

Thanks!

Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#10 lore raw
In reply to Heiko Thiery

Hello Heiko,

Quoted 3 lines · On Thu, 19 Dec 2024 16:21:01 +0100 Heiko Thiery <[email protected]> wrote:

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

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

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot