Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v5 0/9] netopeer2 package update
@ 2025-01-14  7:29 Heiko Thiery
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 1/9] package/libyang: bump to version 3.7.8 Heiko Thiery
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Heiko Thiery @ 2025-01-14  7:29 UTC (permalink / raw)
  To: buildroot; +Cc: Fiona Klute, Heiko Thiery, Jan Kundrát, 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 (9):
  package/libyang: add patch to solve issue with older cmake version
  package/libyang: bump to version 3.4.2
  package/libnetconf2: bump to version 3.5.1
  package/sysrepo: fix shellcheck warnings of init script
  package/sysrepo: bump to version 2.11.7
  package/netopeer2: fix shellcheck warnings
  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

 .checkpackageignore                           |  2 -
 DEVELOPERS                                    |  2 +
 package/libnetconf2/Config.in                 |  1 +
 package/libnetconf2/libnetconf2.hash          |  2 +-
 package/libnetconf2/libnetconf2.mk            | 22 ++++------
 ...UseCompat.cmake-fix-list-REMOVE_ITEM.patch | 34 ++++++++++++++++
 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                | 13 ++++--
 package/sysrepo/Config.in                     | 18 +++++++++
 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 ++++++++++++
 18 files changed, 165 insertions(+), 31 deletions(-)
 create mode 100644 package/libyang/0001-CMCMakeModules-UseCompat.cmake-fix-list-REMOVE_ITEM.patch
 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] 15+ messages in thread

* [Buildroot] [PATCH v5 1/9] package/libyang: bump to version 3.7.8
  2025-01-14  7:29 [Buildroot] [PATCH v5 0/9] netopeer2 package update Heiko Thiery
@ 2025-01-14  7:29 ` Heiko Thiery
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 2/9] package/libnetconf2: bump version to 3.5.5 Heiko Thiery
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Heiko Thiery @ 2025-01-14  7:29 UTC (permalink / raw)
  To: buildroot; +Cc: Fiona Klute, Heiko Thiery, Jan Kundrát, Thomas Petazzoni

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

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

v5:
    - meanwhile project version updated to 3.7.8
    - skip patch that add a libyang patch that is now in mainline

 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..c1110bc238 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  0b75f2afb60c6b94f0f881cd2112663482b81e9800328f95c6ec862b000e59e9  libyang-3.7.8.tar.gz
+sha256  f4fbaa09c8b2faa6a873a38181ff860e2ff90808320f71deb369f03ddfb920da  LICENSE
diff --git a/package/libyang/libyang.mk b/package/libyang/libyang.mk
index fca0cd63f8..0d4a5843b0 100644
--- a/package/libyang/libyang.mk
+++ b/package/libyang/libyang.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBYANG_VERSION = 2.1.148
+LIBYANG_VERSION = 3.7.8
 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] 15+ messages in thread

* [Buildroot] [PATCH v5 2/9] package/libnetconf2: bump version to 3.5.5
  2025-01-14  7:29 [Buildroot] [PATCH v5 0/9] netopeer2 package update Heiko Thiery
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 1/9] package/libyang: bump to version 3.7.8 Heiko Thiery
@ 2025-01-14  7:29 ` Heiko Thiery
  2025-02-03 22:41   ` Thomas Petazzoni via buildroot
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 3/9] package/sysrepo: fix shellcheck warnings of init script Heiko Thiery
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Heiko Thiery @ 2025-01-14  7:29 UTC (permalink / raw)
  To: buildroot; +Cc: Fiona Klute, Heiko Thiery, Jan Kundrát, Thomas Petazzoni

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
v5:
    - meanwhile project version updated to 3.5.5
v4:
    - revert changes that are related to libcrypt dependency check as
      mentioned by Thomas Petazzoni
v3:
    - no changes

v2: (after review comments from Thomas Petazzoni)
    - 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   | 22 +++++++---------------
 3 files changed, 9 insertions(+), 16 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..a0a769a81f 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  1d62654cd6cfb3188f71c561fa4138fef38ea1c60d225599ed7093845ab9286f  libnetconf2-3.5.5.tar.gz
 sha256  bd962ab457c8a8cb8faaaa36c11484680f3c9a47dbc336507817ae8935384064  LICENSE
diff --git a/package/libnetconf2/libnetconf2.mk b/package/libnetconf2/libnetconf2.mk
index 88163926c0..26b9d31dd0 100644
--- a/package/libnetconf2/libnetconf2.mk
+++ b/package/libnetconf2/libnetconf2.mk
@@ -4,30 +4,23 @@
 #
 ################################################################################

-LIBNETCONF2_VERSION = 2.1.28
+LIBNETCONF2_VERSION = 3.5.5
 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 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
+LIBNETCONF2_CONF_OPTS += -DENABLE_SSH_TLS=OFF
 endif

 ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
@@ -37,8 +30,7 @@ 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] 15+ messages in thread

* [Buildroot] [PATCH v5 3/9] package/sysrepo: fix shellcheck warnings of init script
  2025-01-14  7:29 [Buildroot] [PATCH v5 0/9] netopeer2 package update Heiko Thiery
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 1/9] package/libyang: bump to version 3.7.8 Heiko Thiery
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 2/9] package/libnetconf2: bump version to 3.5.5 Heiko Thiery
@ 2025-01-14  7:29 ` Heiko Thiery
  2025-02-03 22:42   ` Thomas Petazzoni via buildroot
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 4/9] package/sysrepo: bump version to 3.3.10 Heiko Thiery
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Heiko Thiery @ 2025-01-14  7:29 UTC (permalink / raw)
  To: buildroot; +Cc: Fiona Klute, Heiko Thiery, Jan Kundrát, Thomas Petazzoni

Remove entry from .checkpackageignore

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

v4:
    - new commit that only contains sysv init shellcheck warning fixes

 .checkpackageignore                | 1 -
 package/sysrepo/S51sysrepo-plugind | 3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.checkpackageignore b/.checkpackageignore
index 0dcca5ebc7..6b6fa4689d 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -1213,7 +1213,6 @@ package/suricata/0001-configure.ac-allow-the-user-to-override-RUST_TARGET.patch
 package/suricata/S99suricata Shellcheck
 package/swupdate/swupdate.sh Shellcheck
 package/sylpheed/0001-harden-link-checker-before-accepting-click.patch lib_patch.Upstream
-package/sysrepo/S51sysrepo-plugind Shellcheck lib_sysv.Indent
 package/sysvinit/0001-Makefile-disable-stack-protector-strong.patch lib_patch.Upstream
 package/tar/0001-lib-getrandom.c-fix-build-with-uclibc-1.0.35.patch lib_patch.Upstream
 package/targetcli-fb/S50target Shellcheck lib_sysv.Variables
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}"
-- 
2.39.2

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

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

* [Buildroot] [PATCH v5 4/9] package/sysrepo: bump version to 3.3.10
  2025-01-14  7:29 [Buildroot] [PATCH v5 0/9] netopeer2 package update Heiko Thiery
                   ` (2 preceding siblings ...)
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 3/9] package/sysrepo: fix shellcheck warnings of init script Heiko Thiery
@ 2025-01-14  7:29 ` Heiko Thiery
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 5/9] package/netopeer2: fix shellcheck warnings Heiko Thiery
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Heiko Thiery @ 2025-01-14  7:29 UTC (permalink / raw)
  To: buildroot; +Cc: Fiona Klute, Heiko Thiery, Jan Kundrát, Thomas Petazzoni

Add new config options to enable/disable binary tools/daemon. By default
this options are enabled to be backward compatible to older package
version.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
v5:
    - meanwhile project version updated to 3.3.10
v4:
    - removed redundant config help information


 package/sysrepo/Config.in    | 18 ++++++++++++++++++
 package/sysrepo/sysrepo.hash |  2 +-
 package/sysrepo/sysrepo.mk   |  5 ++++-
 3 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/package/sysrepo/Config.in b/package/sysrepo/Config.in
index b1535bed9f..fba565df6a 100644
--- a/package/sysrepo/Config.in
+++ b/package/sysrepo/Config.in
@@ -16,6 +16,24 @@ config BR2_PACKAGE_SYSREPO
 
 if BR2_PACKAGE_SYSREPO
 
+config BR2_PACKAGE_SYSREPO_SYSREPOCFG
+	bool "enable sysrepocfg"
+	default y
+	help
+	  Build binary tool sysrepocfg
+
+config BR2_PACKAGE_SYSREPO_SYSREPOCTL
+	bool "enable sysrepoctl"
+	default y
+	help
+	  Build binary tool sysrepoctl
+
+config BR2_PACKAGE_SYSREPO_PLUGIND
+	bool "enable sysrepo-plugind"
+	default y
+	help
+	  Build binary daemon sysrepo-plugind
+
 config BR2_PACKAGE_SYSREPO_EXAMPLES
 	bool "enable examples"
 	help
diff --git a/package/sysrepo/sysrepo.hash b/package/sysrepo/sysrepo.hash
index 056f70787d..6d82692e05 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  9841820d86433bdd73fca38e9bf3d4088c552142e8f5f2d5edd6c5095325210d  sysrepo-3.3.10.tar.gz
 sha256  88f1b7e5c64d2c113e07105aa9c0fb80639b40287565be1c2afd0949df83d826  LICENSE
diff --git a/package/sysrepo/sysrepo.mk b/package/sysrepo/sysrepo.mk
index 7f2570bd7d..f97bfcb6e3 100644
--- a/package/sysrepo/sysrepo.mk
+++ b/package/sysrepo/sysrepo.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-SYSREPO_VERSION = 2.2.150
+SYSREPO_VERSION = 3.3.10
 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] 15+ messages in thread

* [Buildroot] [PATCH v5 5/9] package/netopeer2: fix shellcheck warnings
  2025-01-14  7:29 [Buildroot] [PATCH v5 0/9] netopeer2 package update Heiko Thiery
                   ` (3 preceding siblings ...)
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 4/9] package/sysrepo: bump version to 3.3.10 Heiko Thiery
@ 2025-01-14  7:29 ` Heiko Thiery
  2025-02-03 22:42   ` Thomas Petazzoni via buildroot
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 6/9] package/netopeer2: bump version to 2.2.35 Heiko Thiery
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Heiko Thiery @ 2025-01-14  7:29 UTC (permalink / raw)
  To: buildroot; +Cc: Fiona Klute, Heiko Thiery, Jan Kundrát, Thomas Petazzoni

The init script S52netopeer2 has to be renamed to S52netopeer2-server to
match the daemon name. The step to install the init script now uses the
NETOPEER2_PKGDIR variable to reference the directory instead of
explicitly using the "package/netopeer2/" path.

The init script now is removed from the .checkpackageignore file.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
v4:
    - new commit that only contains sysv init shellcheck warning fixes

 .checkpackageignore                                     | 1 -
 package/netopeer2/{S52netopeer2 => S52netopeer2-server} | 2 +-
 package/netopeer2/netopeer2.mk                          | 4 ++--
 3 files changed, 3 insertions(+), 4 deletions(-)
 rename package/netopeer2/{S52netopeer2 => S52netopeer2-server} (92%)

diff --git a/.checkpackageignore b/.checkpackageignore
index 6b6fa4689d..d2e012d70f 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -896,7 +896,6 @@ package/neard/S53neard Shellcheck lib_sysv.Indent lib_sysv.Variables
 package/neardal/0001-lib-neardal.h-fix-build-with-gcc-10.patch lib_patch.Upstream
 package/netatalk/S50netatalk lib_sysv.EmptyLastLine lib_sysv.Indent lib_sysv.Variables
 package/netcat/0001-signed-bit-counting.patch lib_patch.Sob lib_patch.Upstream
-package/netopeer2/S52netopeer2 Shellcheck lib_sysv.Variables
 package/netperf/0001-src-nettest_omni.c-fix-compilation-with-GCC10.patch lib_patch.Upstream
 package/netplug/0001-makefile-flags.patch lib_patch.Sob lib_patch.Upstream
 package/netplug/0002-add-missing-time-include.patch lib_patch.Upstream
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.mk b/package/netopeer2/netopeer2.mk
index 47fcd31acd..4853e5d176 100644
--- a/package/netopeer2/netopeer2.mk
+++ b/package/netopeer2/netopeer2.mk
@@ -29,8 +29,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 $(NETOPEER2_PKGDIR)/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] 15+ messages in thread

* [Buildroot] [PATCH v5 6/9] package/netopeer2: bump version to 2.2.35
  2025-01-14  7:29 [Buildroot] [PATCH v5 0/9] netopeer2 package update Heiko Thiery
                   ` (4 preceding siblings ...)
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 5/9] package/netopeer2: fix shellcheck warnings Heiko Thiery
@ 2025-01-14  7:29 ` Heiko Thiery
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 7/9] support/testing/tests/package/test_sysrepo.py: add new test Heiko Thiery
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Heiko Thiery @ 2025-01-14  7:29 UTC (permalink / raw)
  To: buildroot; +Cc: Fiona Klute, Heiko Thiery, Jan Kundrát, Thomas Petazzoni

Add select for BR2_PACKAGE_LIBCURL since this is a requirement for
libnetconf2 to add TLS_SSH support. New options to set the ssh
authorized keys format and to enable/disable calling the syrepo setup
script are added.

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

v5:
    - meanwhile project version updated to 2.2.35

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 +++++++++++++++--
 package/netopeer2/netopeer2.hash |  2 +-
 package/netopeer2/netopeer2.mk   |  9 ++++++++-
 3 files changed, 24 insertions(+), 4 deletions(-)

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/netopeer2.hash b/package/netopeer2/netopeer2.hash
index 6a278fbbaf..f6a3741cdf 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  f3e43362b7cfecdec52cb5d1f3cc06c61070857fc304779400ea9f12c6e8c5ae  netopeer2-2.2.35.tar.gz
 sha256  b46f161fbdcf127d3ef22602e15958c3092fe3294f71a2dc8cdf8f6689cba95b  LICENSE
diff --git a/package/netopeer2/netopeer2.mk b/package/netopeer2/netopeer2.mk
index 4853e5d176..6163c169cd 100644
--- a/package/netopeer2/netopeer2.mk
+++ b/package/netopeer2/netopeer2.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-NETOPEER2_VERSION = 2.1.49
+NETOPEER2_VERSION = 2.2.35
 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.
-- 
2.39.2

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

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

* [Buildroot] [PATCH v5 7/9] support/testing/tests/package/test_sysrepo.py: add new test
  2025-01-14  7:29 [Buildroot] [PATCH v5 0/9] netopeer2 package update Heiko Thiery
                   ` (5 preceding siblings ...)
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 6/9] package/netopeer2: bump version to 2.2.35 Heiko Thiery
@ 2025-01-14  7:29 ` Heiko Thiery
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 8/9] support/testing/tests/package/test_netopeer2.py: " Heiko Thiery
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 9/9] package/netopeer2: build host variant only when doing sysrepo setup Heiko Thiery
  8 siblings, 0 replies; 15+ messages in thread
From: Heiko Thiery @ 2025-01-14  7:29 UTC (permalink / raw)
  To: buildroot; +Cc: Fiona Klute, Heiko Thiery, Jan Kundrát, 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] 15+ messages in thread

* [Buildroot] [PATCH v5 8/9] support/testing/tests/package/test_netopeer2.py: add new test
  2025-01-14  7:29 [Buildroot] [PATCH v5 0/9] netopeer2 package update Heiko Thiery
                   ` (6 preceding siblings ...)
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 7/9] support/testing/tests/package/test_sysrepo.py: add new test Heiko Thiery
@ 2025-01-14  7:29 ` Heiko Thiery
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 9/9] package/netopeer2: build host variant only when doing sysrepo setup Heiko Thiery
  8 siblings, 0 replies; 15+ messages in thread
From: Heiko Thiery @ 2025-01-14  7:29 UTC (permalink / raw)
  To: buildroot; +Cc: Fiona Klute, Heiko Thiery, Jan Kundrát, 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] 15+ messages in thread

* [Buildroot] [PATCH v5 9/9] package/netopeer2: build host variant only when doing sysrepo setup
  2025-01-14  7:29 [Buildroot] [PATCH v5 0/9] netopeer2 package update Heiko Thiery
                   ` (7 preceding siblings ...)
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 8/9] support/testing/tests/package/test_netopeer2.py: " Heiko Thiery
@ 2025-01-14  7:29 ` Heiko Thiery
  8 siblings, 0 replies; 15+ messages in thread
From: Heiko Thiery @ 2025-01-14  7:29 UTC (permalink / raw)
  To: buildroot; +Cc: Fiona Klute, Heiko Thiery, Jan Kundrát, Thomas Petazzoni

The host-sysrepo and correspoinding dependencies are only required when
installing sysrepo modules to sysrepo database during build process.

The build time installation can be selected with
BR2_PACKAGE_NETOPEER2_SYSREPO_SETUP and in case this is selected the host
variants are build.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
 package/netopeer2/netopeer2.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/package/netopeer2/netopeer2.mk b/package/netopeer2/netopeer2.mk
index 6163c169cd..6accb8743c 100644
--- a/package/netopeer2/netopeer2.mk
+++ b/package/netopeer2/netopeer2.mk
@@ -9,7 +9,7 @@ NETOPEER2_SITE = $(call github,CESNET,Netopeer2,v$(NETOPEER2_VERSION))
 NETOPEER2_DL_SUBDIR = netopeer2
 NETOPEER2_LICENSE = BSD-3-Clause
 NETOPEER2_LICENSE_FILES = LICENSE
-NETOPEER2_DEPENDENCIES = libnetconf2 libyang sysrepo host-sysrepo
+NETOPEER2_DEPENDENCIES = libnetconf2 libyang sysrepo
 
 ifeq ($(BR2_INIT_SYSTEMD),y)
 NETOPEER2_DEPENDENCIES += systemd
@@ -20,6 +20,11 @@ NETOPEER2_CONF_OPTS = \
 	-DSYSREPO_SETUP=$(if $(BR2_PACKAGE_NETOPEER2_SYSREPO_SETUP),ON,OFF) \
 	-DENABLE_TESTS=OFF
 
+# host-sysrepo is required for installing yang modules during build
+ifeq ($(BR2_PACKAGE_NETOPEER2_SYSREPO_SETUP),y)
+NETOPEER2_DEPENDENCIES += host-sysrepo
+endif
+
 NETOPEER2_SSH_AUTHORIZED_KEYS_FORMAT = $(call qstrip,$(BR2_PACKAGE_NETOPEER2_SSH_AUTHORIZED_KEYS_FORMAT))
 ifneq ($(NETOPEER2_SSH_AUTHORIZED_KEYS_FORMAT),)
 NETOPEER2_CONF_OPTS += \
-- 
2.39.2

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

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

* Re: [Buildroot] [PATCH v5 2/9] package/libnetconf2: bump version to 3.5.5
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 2/9] package/libnetconf2: bump version to 3.5.5 Heiko Thiery
@ 2025-02-03 22:41   ` Thomas Petazzoni via buildroot
  2025-02-05  6:49     ` Heiko Thiery
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-02-03 22:41 UTC (permalink / raw)
  To: Heiko Thiery; +Cc: buildroot, Fiona Klute, Jan Kundrát

Hello Heiko,

On Tue, 14 Jan 2025 08:29:44 +0100
Heiko Thiery <heiko.thiery@gmail.com> wrote:

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

I wanted to finally apply this, but unfortunately it's still not good :/

First of all, your commit log is entirely empty, with zero explanations
about the changes, even though there are non-trivial changes. Previous
iterations had some explanations, but this iteration has none.

> -LIBNETCONF2_VERSION = 2.1.28
> +LIBNETCONF2_VERSION = 3.5.5
>  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 openssl

In fact openssl is NOT a mandatory dependency of libnetconf2. If you
look at the CMakeLists.txt, OpenSSL is only needed when
ENABLE_SSH_TLS=ON (and still, when mbedtls is not available).

Yes, it fails to build without OpenSSL when ENABLE_SSH_TLS=OFF, but
that's a libnetconf2 that should be reported/fixed.

>  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
> +LIBNETCONF2_CONF_OPTS += -DENABLE_SSH_TLS=OFF
>  endif

The proper logic that matches what's in the CMakeLists.txt is more like this:

ifeq ($(BR2_PACKAGE_OPENSSL)$(BR2_PACKAGE_MBEDTLS):$(BR2_PACKAGE_LIBSSH)$(BR2_PACKAGE_LIBCURL),y:yy)
LIBNETCONF2_CONF_OPTS += -DENABLE_SSH_TLS=ON
LIBNETCONF2_DEPENDENCIES += libssh libcurl
ifeq ($(BR2_PACKAGE_MBEDTLS),y)
LIBNETCONF2_DEPENDENCIES += mbedtls
else
LIBNETCONF2_DEPENDENCIES += openssl
endif
else
LIBNETCONF2_CONF_OPTS += -DENABLE_SSH_TLS=OFF
endif

However, as that's tricky, I think we could also accept a sub-option in
libnetconf2/Config.in:

config BR2_PACKAGE_LIBNETCONF2_SSH_TLS
	bool "SSH/TLS support"
	select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_MBEDTLS
	select BR2_PACKAGE_LIBCURL
	select BR2_PACKAGE_LIBSSH


>  ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
> @@ -37,8 +30,7 @@ endif
>  HOST_LIBNETCONF2_CONF_OPTS = \
>  	-DENABLE_TESTS=OFF \
>  	-DENABLE_VALGRIND_TESTS=OFF \
> -	-DENABLE_SSH=OFF \
> -	-DENABLE_TLS=OFF
> +	-DENABLE_TLS_SSH=OFF

This option doesn't exist, did you mean ENABLE_SSH_TLS=OFF ?

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] 15+ messages in thread

* Re: [Buildroot] [PATCH v5 3/9] package/sysrepo: fix shellcheck warnings of init script
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 3/9] package/sysrepo: fix shellcheck warnings of init script Heiko Thiery
@ 2025-02-03 22:42   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-02-03 22:42 UTC (permalink / raw)
  To: Heiko Thiery; +Cc: buildroot, Fiona Klute, Jan Kundrát

On Tue, 14 Jan 2025 08:29:46 +0100
Heiko Thiery <heiko.thiery@gmail.com> wrote:

> Remove entry from .checkpackageignore
> 
> Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
> ---

Applied to master, thanks.

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

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

* Re: [Buildroot] [PATCH v5 5/9] package/netopeer2: fix shellcheck warnings
  2025-01-14  7:29 ` [Buildroot] [PATCH v5 5/9] package/netopeer2: fix shellcheck warnings Heiko Thiery
@ 2025-02-03 22:42   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-02-03 22:42 UTC (permalink / raw)
  To: Heiko Thiery; +Cc: buildroot, Fiona Klute, Jan Kundrát

On Tue, 14 Jan 2025 08:29:50 +0100
Heiko Thiery <heiko.thiery@gmail.com> wrote:

> The init script S52netopeer2 has to be renamed to S52netopeer2-server to
> match the daemon name. The step to install the init script now uses the
> NETOPEER2_PKGDIR variable to reference the directory instead of
> explicitly using the "package/netopeer2/" path.
> 
> The init script now is removed from the .checkpackageignore file.
> 
> Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
> ---
> v4:
>     - new commit that only contains sysv init shellcheck warning fixes

Applied to master, thanks.

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

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

* Re: [Buildroot] [PATCH v5 2/9] package/libnetconf2: bump version to 3.5.5
  2025-02-03 22:41   ` Thomas Petazzoni via buildroot
@ 2025-02-05  6:49     ` Heiko Thiery
  2025-02-05  8:11       ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 15+ messages in thread
From: Heiko Thiery @ 2025-02-05  6:49 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot, Fiona Klute, Jan Kundrát

Hi Thomas,

Am Mo., 3. Feb. 2025 um 23:41 Uhr schrieb Thomas Petazzoni
<thomas.petazzoni@bootlin.com>:
>
> Hello Heiko,
>
> On Tue, 14 Jan 2025 08:29:44 +0100
> Heiko Thiery <heiko.thiery@gmail.com> wrote:
>
> > Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
>
> I wanted to finally apply this, but unfortunately it's still not good :/
>
> First of all, your commit log is entirely empty, with zero explanations
> about the changes, even though there are non-trivial changes. Previous
> iterations had some explanations, but this iteration has none.

Something must have gone wrong when editing the iteration. I will take
care to have the correct/full explanation next time.

> > -LIBNETCONF2_VERSION = 2.1.28
> > +LIBNETCONF2_VERSION = 3.5.5
> >  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 openssl
>
> In fact openssl is NOT a mandatory dependency of libnetconf2. If you
> look at the CMakeLists.txt, OpenSSL is only needed when
> ENABLE_SSH_TLS=ON (and still, when mbedtls is not available).
>
> Yes, it fails to build without OpenSSL when ENABLE_SSH_TLS=OFF, but
> that's a libnetconf2 that should be reported/fixed.

I reported that to upstream libnetconf2. It is already fixed and I
will add the patch to the iteration. When updating next time it should
already be included.

see: https://github.com/CESNET/libnetconf2/commit/1ca2f07fe4f638af4cd30e7b18ee17a8e13919bd

>
> >  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
> > +LIBNETCONF2_CONF_OPTS += -DENABLE_SSH_TLS=OFF
> >  endif
>
> The proper logic that matches what's in the CMakeLists.txt is more like this:
>
> ifeq ($(BR2_PACKAGE_OPENSSL)$(BR2_PACKAGE_MBEDTLS):$(BR2_PACKAGE_LIBSSH)$(BR2_PACKAGE_LIBCURL),y:yy)
> LIBNETCONF2_CONF_OPTS += -DENABLE_SSH_TLS=ON
> LIBNETCONF2_DEPENDENCIES += libssh libcurl
> ifeq ($(BR2_PACKAGE_MBEDTLS),y)
> LIBNETCONF2_DEPENDENCIES += mbedtls
> else
> LIBNETCONF2_DEPENDENCIES += openssl
> endif
> else
> LIBNETCONF2_CONF_OPTS += -DENABLE_SSH_TLS=OFF
> endif

Yes, that makes sense to me.

> However, as that's tricky, I think we could also accept a sub-option in
> libnetconf2/Config.in:
>
> config BR2_PACKAGE_LIBNETCONF2_SSH_TLS
>         bool "SSH/TLS support"
>         select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_MBEDTLS
>         select BR2_PACKAGE_LIBCURL
>         select BR2_PACKAGE_LIBSSH

When using the sub-option then we can use
"ifeq ($(BR2_PACKAGE_LIBNETCONF2_SSH_TLS),y)"
instead of
"ifeq ($(BR2_PACKAGE_OPENSSL)$(BR2_PACKAGE_MBEDTLS):$(BR2_PACKAGE_LIBSSH)$(BR2_PACKAGE_LIBCURL),y:yy)"
for the check in libnetconf2.mk..

>
> >  ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
> > @@ -37,8 +30,7 @@ endif
> >  HOST_LIBNETCONF2_CONF_OPTS = \
> >       -DENABLE_TESTS=OFF \
> >       -DENABLE_VALGRIND_TESTS=OFF \
> > -     -DENABLE_SSH=OFF \
> > -     -DENABLE_TLS=OFF
> > +     -DENABLE_TLS_SSH=OFF
>
> This option doesn't exist, did you mean ENABLE_SSH_TLS=OFF ?

You are right.

> Thanks!

Thanks for the review.

> 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] 15+ messages in thread

* Re: [Buildroot] [PATCH v5 2/9] package/libnetconf2: bump version to 3.5.5
  2025-02-05  6:49     ` Heiko Thiery
@ 2025-02-05  8:11       ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-02-05  8:11 UTC (permalink / raw)
  To: Heiko Thiery; +Cc: buildroot, Fiona Klute, Jan Kundrát

On Wed, 5 Feb 2025 07:49:50 +0100
Heiko Thiery <heiko.thiery@gmail.com> wrote:

> I reported that to upstream libnetconf2. It is already fixed and I
> will add the patch to the iteration. When updating next time it should
> already be included.
> 
> see: https://github.com/CESNET/libnetconf2/commit/1ca2f07fe4f638af4cd30e7b18ee17a8e13919bd

Nice!

> > However, as that's tricky, I think we could also accept a sub-option in
> > libnetconf2/Config.in:
> >
> > config BR2_PACKAGE_LIBNETCONF2_SSH_TLS
> >         bool "SSH/TLS support"
> >         select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_MBEDTLS
> >         select BR2_PACKAGE_LIBCURL
> >         select BR2_PACKAGE_LIBSSH  
> 
> When using the sub-option then we can use
> "ifeq ($(BR2_PACKAGE_LIBNETCONF2_SSH_TLS),y)"
> instead of
> "ifeq ($(BR2_PACKAGE_OPENSSL)$(BR2_PACKAGE_MBEDTLS):$(BR2_PACKAGE_LIBSSH)$(BR2_PACKAGE_LIBCURL),y:yy)"
> for the check in libnetconf2.mk..

Absolutely, yes.

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] 15+ messages in thread

end of thread, other threads:[~2025-02-05  8:11 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-14  7:29 [Buildroot] [PATCH v5 0/9] netopeer2 package update Heiko Thiery
2025-01-14  7:29 ` [Buildroot] [PATCH v5 1/9] package/libyang: bump to version 3.7.8 Heiko Thiery
2025-01-14  7:29 ` [Buildroot] [PATCH v5 2/9] package/libnetconf2: bump version to 3.5.5 Heiko Thiery
2025-02-03 22:41   ` Thomas Petazzoni via buildroot
2025-02-05  6:49     ` Heiko Thiery
2025-02-05  8:11       ` Thomas Petazzoni via buildroot
2025-01-14  7:29 ` [Buildroot] [PATCH v5 3/9] package/sysrepo: fix shellcheck warnings of init script Heiko Thiery
2025-02-03 22:42   ` Thomas Petazzoni via buildroot
2025-01-14  7:29 ` [Buildroot] [PATCH v5 4/9] package/sysrepo: bump version to 3.3.10 Heiko Thiery
2025-01-14  7:29 ` [Buildroot] [PATCH v5 5/9] package/netopeer2: fix shellcheck warnings Heiko Thiery
2025-02-03 22:42   ` Thomas Petazzoni via buildroot
2025-01-14  7:29 ` [Buildroot] [PATCH v5 6/9] package/netopeer2: bump version to 2.2.35 Heiko Thiery
2025-01-14  7:29 ` [Buildroot] [PATCH v5 7/9] support/testing/tests/package/test_sysrepo.py: add new test Heiko Thiery
2025-01-14  7:29 ` [Buildroot] [PATCH v5 8/9] support/testing/tests/package/test_netopeer2.py: " Heiko Thiery
2025-01-14  7:29 ` [Buildroot] [PATCH v5 9/9] package/netopeer2: build host variant only when doing sysrepo setup Heiko Thiery

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