Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 0/6] netopeer2 package update
@ 2024-12-30 11:37 Heiko Thiery
  2024-12-30 11:37 ` [Buildroot] [PATCH v3 1/6] package/libyang: bump to version 3.4.2 Heiko Thiery
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Heiko Thiery @ 2024-12-30 11:37 UTC (permalink / raw)
  To: buildroot; +Cc: Jan Kundrát, Heiko Thiery, Fiona Klute, Thomas Petazzoni

This series contains the netopeer2 package update with the corresponding
dependencies: libyang, libnetconf2, sysrepo.

This series must be applied together due to API breaking changes.

Also minimal tests for sysrepo and netopeer2 are included in the series.

Heiko Thiery (6):
  package/libyang: bump to version 3.4.2
  package/libnetconf2: bump to version 3.5.1
  package/sysrepo: bump to version 2.11.7
  package/netopeer2: bump to version 2.2.31
  support/testing/tests/package/test_sysrepo.py: add new test
  support/testing/tests/package/test_netopeer2.py: add new test

 DEVELOPERS                                    |  2 +
 package/libnetconf2/Config.in                 |  1 +
 package/libnetconf2/libnetconf2.hash          |  2 +-
 package/libnetconf2/libnetconf2.mk            | 26 ++++--------
 package/libyang/libyang.hash                  |  4 +-
 package/libyang/libyang.mk                    |  2 +-
 package/netopeer2/Config.in                   | 17 +++++++-
 .../{S52netopeer2 => S52netopeer2-server}     |  2 +-
 package/netopeer2/netopeer2.hash              |  2 +-
 package/netopeer2/netopeer2.mk                | 12 ++++--
 package/sysrepo/Config.in                     | 21 ++++++++++
 package/sysrepo/S51sysrepo-plugind            |  3 +-
 package/sysrepo/sysrepo.hash                  |  2 +-
 package/sysrepo/sysrepo.mk                    |  5 ++-
 .../testing/tests/package/test_netopeer2.py   | 40 +++++++++++++++++++
 support/testing/tests/package/test_sysrepo.py | 25 ++++++++++++
 16 files changed, 133 insertions(+), 33 deletions(-)
 rename package/netopeer2/{S52netopeer2 => S52netopeer2-server} (92%)
 create mode 100644 support/testing/tests/package/test_netopeer2.py
 create mode 100644 support/testing/tests/package/test_sysrepo.py

-- 
2.39.2

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

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

* [Buildroot] [PATCH v3 1/6] package/libyang: bump to version 3.4.2
  2024-12-30 11:37 [Buildroot] [PATCH v3 0/6] netopeer2 package update Heiko Thiery
@ 2024-12-30 11:37 ` Heiko Thiery
  2024-12-30 21:20   ` Thomas Petazzoni via buildroot
  2024-12-30 11:37 ` [Buildroot] [PATCH v3 2/6] package/libnetconf2: bump to version 3.5.1 Heiko Thiery
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Heiko Thiery @ 2024-12-30 11:37 UTC (permalink / raw)
  To: buildroot; +Cc: Jan Kundrát, Heiko Thiery, Fiona Klute, Thomas Petazzoni

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 v3 2/6] package/libnetconf2: bump to version 3.5.1
  2024-12-30 11:37 [Buildroot] [PATCH v3 0/6] netopeer2 package update Heiko Thiery
  2024-12-30 11:37 ` [Buildroot] [PATCH v3 1/6] package/libyang: bump to version 3.4.2 Heiko Thiery
@ 2024-12-30 11:37 ` Heiko Thiery
  2024-12-30 21:22   ` Thomas Petazzoni
  2024-12-30 11:37 ` [Buildroot] [PATCH v3 3/6] package/sysrepo: bump to version 2.11.7 Heiko Thiery
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Heiko Thiery @ 2024-12-30 11:37 UTC (permalink / raw)
  To: buildroot; +Cc: Jan Kundrát, Heiko Thiery, Fiona Klute, Thomas Petazzoni

Since version 3.x the cmake configuration options for ENABLE_TLS and
ENABLE_SSH are refactored. Therefore the options are replaced by
ENABLE_SSH_TLS. In addition, the dependency on openssl is now necessary.

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

v2: (after review comments from Thomas Pettazoni)
    - reworded the commit message
    - added selection of openssol package in Config.in
    - fixed inconsistency in dependency to openssl

 package/libnetconf2/Config.in        |  1 +
 package/libnetconf2/libnetconf2.hash |  2 +-
 package/libnetconf2/libnetconf2.mk   | 26 +++++++-------------------
 3 files changed, 9 insertions(+), 20 deletions(-)

diff --git a/package/libnetconf2/Config.in b/package/libnetconf2/Config.in
index 1763243120..8f8677db62 100644
--- a/package/libnetconf2/Config.in
+++ b/package/libnetconf2/Config.in
@@ -6,6 +6,7 @@ config BR2_PACKAGE_LIBNETCONF2
 	depends on BR2_USE_MMU
 	select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC
 	select BR2_PACKAGE_LIBYANG
+	select BR2_PACKAGE_OPENSSL
 	help
 	  libnetconf2 is a NETCONF library in C intended for building
 	  NETCONF clients and servers.
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..85e4c2fbfd 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_LIBCURL),yy)
+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 v3 3/6] package/sysrepo: bump to version 2.11.7
  2024-12-30 11:37 [Buildroot] [PATCH v3 0/6] netopeer2 package update Heiko Thiery
  2024-12-30 11:37 ` [Buildroot] [PATCH v3 1/6] package/libyang: bump to version 3.4.2 Heiko Thiery
  2024-12-30 11:37 ` [Buildroot] [PATCH v3 2/6] package/libnetconf2: bump to version 3.5.1 Heiko Thiery
@ 2024-12-30 11:37 ` Heiko Thiery
  2024-12-30 21:35   ` Thomas Petazzoni
  2024-12-30 11:37 ` [Buildroot] [PATCH v3 4/6] package/netopeer2: bump to version 2.2.31 Heiko Thiery
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Heiko Thiery @ 2024-12-30 11:37 UTC (permalink / raw)
  To: buildroot; +Cc: Jan Kundrát, Heiko Thiery, Fiona Klute, Thomas Petazzoni

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 v3 4/6] package/netopeer2: bump to version 2.2.31
  2024-12-30 11:37 [Buildroot] [PATCH v3 0/6] netopeer2 package update Heiko Thiery
                   ` (2 preceding siblings ...)
  2024-12-30 11:37 ` [Buildroot] [PATCH v3 3/6] package/sysrepo: bump to version 2.11.7 Heiko Thiery
@ 2024-12-30 11:37 ` Heiko Thiery
  2024-12-30 11:37 ` [Buildroot] [PATCH v3 5/6] support/testing/tests/package/test_sysrepo.py: add new test Heiko Thiery
  2024-12-30 11:37 ` [Buildroot] [PATCH v3 6/6] support/testing/tests/package/test_netopeer2.py: " Heiko Thiery
  5 siblings, 0 replies; 11+ messages in thread
From: Heiko Thiery @ 2024-12-30 11:37 UTC (permalink / raw)
  To: buildroot; +Cc: Jan Kundrát, Heiko Thiery, Fiona Klute, Thomas Petazzoni

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

v3: (after review comments from Thomas Pettazoni)
    - remove 'select BR2_PACKAGE_OPENSSL' since it is now required by
      libnetconf2 unconditionally
    - fix typo in help text for BR2_PACKAGE_NETOPEER2_SSH_AUTHORIZED_KEYS_FORMAT
    - change SSH_AUTHORIZED_KEYS_FORMAT setting

 package/netopeer2/Config.in                     | 17 +++++++++++++++--
 .../{S52netopeer2 => S52netopeer2-server}       |  2 +-
 package/netopeer2/netopeer2.hash                |  2 +-
 package/netopeer2/netopeer2.mk                  | 13 ++++++++++---
 4 files changed, 27 insertions(+), 7 deletions(-)
 rename package/netopeer2/{S52netopeer2 => S52netopeer2-server} (92%)

diff --git a/package/netopeer2/Config.in b/package/netopeer2/Config.in
index db31a786a1..dc7bd647eb 100644
--- a/package/netopeer2/Config.in
+++ b/package/netopeer2/Config.in
@@ -14,9 +14,9 @@ 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_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 +33,17 @@ config BR2_PACKAGE_NETOPEER2_CLI
 	help
 	  Enable netopeer2 CLI.
 
+config BR2_PACKAGE_NETOPEER2_SSH_AUTHORIZED_KEYS_FORMAT
+	string "ssh authorized keys format"
+	help
+	  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 required sysrepo 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..5edb59efdb 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,15 @@ 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
 
+NETOPEER2_SSH_AUTHORIZED_KEYS_FORMAT = $(call qstrip,$(BR2_PACKAGE_NETOPEER2_SSH_AUTHORIZED_KEYS_FORMAT))
+ifneq ($(NETOPEER2_SSH_AUTHORIZED_KEYS_FORMAT),)
+NETOPEER2_CONF_OPTS += \
+	-DSSH_AUTHORIZED_KEYS_FORMAT="$(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 +36,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 v3 5/6] support/testing/tests/package/test_sysrepo.py: add new test
  2024-12-30 11:37 [Buildroot] [PATCH v3 0/6] netopeer2 package update Heiko Thiery
                   ` (3 preceding siblings ...)
  2024-12-30 11:37 ` [Buildroot] [PATCH v3 4/6] package/netopeer2: bump to version 2.2.31 Heiko Thiery
@ 2024-12-30 11:37 ` Heiko Thiery
  2024-12-30 11:37 ` [Buildroot] [PATCH v3 6/6] support/testing/tests/package/test_netopeer2.py: " Heiko Thiery
  5 siblings, 0 replies; 11+ messages in thread
From: Heiko Thiery @ 2024-12-30 11:37 UTC (permalink / raw)
  To: buildroot; +Cc: Jan Kundrát, Heiko Thiery, Fiona Klute, Thomas Petazzoni

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 v3 6/6] support/testing/tests/package/test_netopeer2.py: add new test
  2024-12-30 11:37 [Buildroot] [PATCH v3 0/6] netopeer2 package update Heiko Thiery
                   ` (4 preceding siblings ...)
  2024-12-30 11:37 ` [Buildroot] [PATCH v3 5/6] support/testing/tests/package/test_sysrepo.py: add new test Heiko Thiery
@ 2024-12-30 11:37 ` Heiko Thiery
  5 siblings, 0 replies; 11+ messages in thread
From: Heiko Thiery @ 2024-12-30 11:37 UTC (permalink / raw)
  To: buildroot; +Cc: Jan Kundrát, Heiko Thiery, Fiona Klute, Thomas Petazzoni

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..cbcaba049e
--- /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 + \
+        """
+        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 v3 1/6] package/libyang: bump to version 3.4.2
  2024-12-30 11:37 ` [Buildroot] [PATCH v3 1/6] package/libyang: bump to version 3.4.2 Heiko Thiery
@ 2024-12-30 21:20   ` Thomas Petazzoni via buildroot
  2025-01-04 13:38     ` Heiko Thiery
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-12-30 21:20 UTC (permalink / raw)
  To: Heiko Thiery; +Cc: buildroot, Jan Kundrát, Fiona Klute

Hello Heiko,

On Mon, 30 Dec 2024 12:37:07 +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 apply, but I'm afraid there's still some more work, as this
doesn't build:

-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Configuring incomplete, errors occurred!
See also "/home/thomas/projets/buildroot/output/build/libyang-3.4.2/buildroot-build/CMakeFiles/CMakeOutput.log".
See also "/home/thomas/projets/buildroot/output/build/libyang-3.4.2/buildroot-build/CMakeFiles/CMakeError.log".
make: *** [package/pkg-generic.mk:279: /home/thomas/projets/buildroot/output/build/libyang-3.4.2/.stamp_configured] Error 1

You can reproduce yourself by building inside the minimal Docker
container:

$ ./utils/docker-run make

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 v3 2/6] package/libnetconf2: bump to version 3.5.1
  2024-12-30 11:37 ` [Buildroot] [PATCH v3 2/6] package/libnetconf2: bump to version 3.5.1 Heiko Thiery
@ 2024-12-30 21:22   ` Thomas Petazzoni
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2024-12-30 21:22 UTC (permalink / raw)
  To: Heiko Thiery; +Cc: buildroot, Jan Kundrát, Fiona Klute

Hello Heiko,

On Mon, 30 Dec 2024 12:37:09 +0100
Heiko Thiery <heiko.thiery@gmail.com> wrote:

> -LIBNETCONF2_DEPENDENCIES = libyang
> +LIBNETCONF2_DEPENDENCIES = libyang libxcrypt openssl

The addition of libxcrypt here is not mentioned in the commit log and
is actually incorrect. Indeed your Config.in file has:

        select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC

So only glibc configurations select libxcrypt, so you cannot
unconditionally add libxcrypt to your dependencies.

You need to keep this:

ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
LIBNETCONF2_DEPENDENCIES += libxcrypt
endif

which was already there.

You could have spotted this issue by doing a uClibc or musl build for
example. ./utils/test-pkg can be of great help to figure out this kind
of problem.

Best regards,

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 v3 3/6] package/sysrepo: bump to version 2.11.7
  2024-12-30 11:37 ` [Buildroot] [PATCH v3 3/6] package/sysrepo: bump to version 2.11.7 Heiko Thiery
@ 2024-12-30 21:35   ` Thomas Petazzoni
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2024-12-30 21:35 UTC (permalink / raw)
  To: Heiko Thiery; +Cc: buildroot, Jan Kundrát, Fiona Klute

Hello Heiko,

Minor comment below, but since a v4 is anyway needed.

On Mon, 30 Dec 2024 12:37:11 +0100
Heiko Thiery <heiko.thiery@gmail.com> wrote:

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

A pedantic person would have said those shellcheck warning fixes should
have been made in a separate patch. Also if you fix shellcheck
warnings, isn't an update of .checkpackageignore needed, i.e remove:

package/sysrepo/S51sysrepo-plugind Shellcheck lib_sysv.Indent

 ?

> 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

These two lines of help text are quite redundant with each other... and
with the prompt of the option.

> +config BR2_PACKAGE_SYSREPO_SYSREPOCTL
> +	bool "enable sysrepoctl"
> +	default y
> +	help
> +	  Enable sysrepoctl.
> +	  Build binary tool sysrepoctl

Same.

> +config BR2_PACKAGE_SYSREPO_PLUGIND
> +	bool "enable sysrepo-plugind"
> +	default y
> +	help
> +	  Enable sysrepo-plugind.
> +	  Build binary daemon sysrepo-plugind

Same.

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 v3 1/6] package/libyang: bump to version 3.4.2
  2024-12-30 21:20   ` Thomas Petazzoni via buildroot
@ 2025-01-04 13:38     ` Heiko Thiery
  0 siblings, 0 replies; 11+ messages in thread
From: Heiko Thiery @ 2025-01-04 13:38 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot, Jan Kundrát, Fiona Klute

Hi Thomas,

Am Mo., 30. Dez. 2024 um 22:20 Uhr schrieb Thomas Petazzoni
<thomas.petazzoni@bootlin.com>:
>
> Hello Heiko,
>
> On Mon, 30 Dec 2024 12:37:07 +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 apply, but I'm afraid there's still some more work, as this
> doesn't build:
>
> -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
> -- Configuring incomplete, errors occurred!
> See also "/home/thomas/projets/buildroot/output/build/libyang-3.4.2/buildroot-build/CMakeFiles/CMakeOutput.log".
> See also "/home/thomas/projets/buildroot/output/build/libyang-3.4.2/buildroot-build/CMakeFiles/CMakeError.log".
> make: *** [package/pkg-generic.mk:279: /home/thomas/projets/buildroot/output/build/libyang-3.4.2/.stamp_configured] Error 1
>

There seems to be an issue with strnstr running build in docker while
it works when running build direct on my host:

error: ‘strnstr’ undeclared (first use in this function); did you mean ‘strstr’?
    8 |   return ((int*)(&strnstr))[argc];
      |                   ^~~~~~~
      |                   strstr

There is a cmake module that checks for that function.

I will try to figure it out.


> You can reproduce yourself by building inside the minimal Docker
> container:
>
> $ ./utils/docker-run make
>
> 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:[~2025-01-04 13:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-30 11:37 [Buildroot] [PATCH v3 0/6] netopeer2 package update Heiko Thiery
2024-12-30 11:37 ` [Buildroot] [PATCH v3 1/6] package/libyang: bump to version 3.4.2 Heiko Thiery
2024-12-30 21:20   ` Thomas Petazzoni via buildroot
2025-01-04 13:38     ` Heiko Thiery
2024-12-30 11:37 ` [Buildroot] [PATCH v3 2/6] package/libnetconf2: bump to version 3.5.1 Heiko Thiery
2024-12-30 21:22   ` Thomas Petazzoni
2024-12-30 11:37 ` [Buildroot] [PATCH v3 3/6] package/sysrepo: bump to version 2.11.7 Heiko Thiery
2024-12-30 21:35   ` Thomas Petazzoni
2024-12-30 11:37 ` [Buildroot] [PATCH v3 4/6] package/netopeer2: bump to version 2.2.31 Heiko Thiery
2024-12-30 11:37 ` [Buildroot] [PATCH v3 5/6] support/testing/tests/package/test_sysrepo.py: add new test Heiko Thiery
2024-12-30 11:37 ` [Buildroot] [PATCH v3 6/6] support/testing/tests/package/test_netopeer2.py: " Heiko Thiery

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox