public inbox for buildroot@busybox.net
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v1 0/2] Add python-libyang and python-sysrepo packages
@ 2026-01-07 17:54 Vincent Jardin via buildroot
  2026-01-07 17:54 ` [Buildroot] [PATCH v1 1/2] package/python-libyang: new package Vincent Jardin via buildroot
  2026-01-07 17:54 ` [Buildroot] [PATCH v1 2/2] package/python-sysrepo: " Vincent Jardin via buildroot
  0 siblings, 2 replies; 11+ messages in thread
From: Vincent Jardin via buildroot @ 2026-01-07 17:54 UTC (permalink / raw)
  To: buildroot; +Cc: vjardin

This series adds Python bindings for libyang and sysrepo:

- python-libyang: Python CFFI bindings for the libyang YANG library,
  providing the 'libyang' Python module used by higher-level tooling.

- python-sysrepo: Python CFFI bindings for the sysrepo YANG datastore,
  providing the 'sysrepo' Python module. This patch also includes a
  fix for sysrepo build on riscv32.

Both packages include proper dependencies on Python3 with uClibc/kernel
headers constraints (Python3 requires kernel headers >= 5.1 on uClibc).

CI build verification:
https://gitlab.com/vjardin/buildroot/-/pipelines/2249634938

Vincent Jardin (2):
  package/python-libyang: new package
  package/python-sysrepo: new package

 DEVELOPERS                                 |  2 ++
 package/Config.in                          |  2 ++
 package/python-libyang/Config.in           | 23 +++++++++++++++++++
 package/python-libyang/python-libyang.hash |  5 +++++
 package/python-libyang/python-libyang.mk   | 21 +++++++++++++++++
 package/python-sysrepo/Config.in           | 26 ++++++++++++++++++++++
 package/python-sysrepo/python-sysrepo.hash |  5 +++++
 package/python-sysrepo/python-sysrepo.mk   | 18 +++++++++++++++
 package/sysrepo/sysrepo.mk                 |  7 ++++++
 9 files changed, 109 insertions(+)

-- 
2.43.0

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

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

* [Buildroot] [PATCH v1 1/2] package/python-libyang: new package
  2026-01-07 17:54 [Buildroot] [PATCH v1 0/2] Add python-libyang and python-sysrepo packages Vincent Jardin via buildroot
@ 2026-01-07 17:54 ` Vincent Jardin via buildroot
  2026-01-07 22:40   ` Thomas Petazzoni via buildroot
  2026-01-07 17:54 ` [Buildroot] [PATCH v1 2/2] package/python-sysrepo: " Vincent Jardin via buildroot
  1 sibling, 1 reply; 11+ messages in thread
From: Vincent Jardin via buildroot @ 2026-01-07 17:54 UTC (permalink / raw)
  To: buildroot; +Cc: vjardin

Python CFFI bindings for the libyang YANG library. This package
provides the 'libyang' Python module used by higher-level tooling
such as python-sysrepo.

Signed-off-by: Vincent Jardin <vjardin@free.fr>
---
 DEVELOPERS                                 |  2 ++
 package/Config.in                          |  2 ++
 package/python-libyang/Config.in           | 23 ++++++++++++++++++++++
 package/python-libyang/python-libyang.hash |  5 +++++
 package/python-libyang/python-libyang.mk   | 21 ++++++++++++++++++++
 5 files changed, 53 insertions(+)
 create mode 100644 package/python-libyang/Config.in
 create mode 100644 package/python-libyang/python-libyang.hash
 create mode 100644 package/python-libyang/python-libyang.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index f982e3123a..5585e8b353 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -3359,6 +3359,8 @@ F:	package/bfscripts/
 F:	package/dpdk/
 F:	package/libecoli/
 F:	package/libyang-cpp/
+F:	package/python-libyang/
+F:	package/python-sysrepo/
 F:	package/sysrepo-cpp/
 
 N:	Vincent Prince <vincent.prince.fr@gmail.com>
diff --git a/package/Config.in b/package/Config.in
index def3db0e50..19d32c16ea 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1205,6 +1205,7 @@ menu "External python modules"
 	source "package/python-libconfig/Config.in"
 	source "package/python-libevdev/Config.in"
 	source "package/python-libusb1/Config.in"
+	source "package/python-libyang/Config.in"
 	source "package/python-lmdb/Config.in"
 	source "package/python-lockfile/Config.in"
 	source "package/python-log-rate-limit/Config.in"
@@ -1434,6 +1435,7 @@ menu "External python modules"
 	source "package/python-stack-data/Config.in"
 	source "package/python-starlette/Config.in"
 	source "package/python-sympy/Config.in"
+	source "package/python-sysrepo/Config.in"
 	source "package/python-systemd/Config.in"
 	source "package/python-tabledata/Config.in"
 	source "package/python-tcolorpy/Config.in"
diff --git a/package/python-libyang/Config.in b/package/python-libyang/Config.in
new file mode 100644
index 0000000000..793bf7e3c5
--- /dev/null
+++ b/package/python-libyang/Config.in
@@ -0,0 +1,23 @@
+config BR2_PACKAGE_PYTHON_LIBYANG
+	bool "python-libyang"
+	depends on BR2_PACKAGE_PYTHON3
+	depends on BR2_PACKAGE_LIBYANG
+	# Python3 doesn't work with uClibc and kernel headers < 5.1
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
+	select BR2_PACKAGE_PYTHON_CFFI
+	help
+	  Python CFFI bindings for the libyang YANG library.
+
+	  This package provides the 'libyang' Python module, used by
+	  higher-level tooling such as python-sysrepo.
+
+	  https://github.com/CESNET/libyang-python
+
+comment "python-libyang needs python3, uClibc needs kernel headers >= 5.1"
+	depends on !BR2_PACKAGE_PYTHON3 || \
+		(BR2_TOOLCHAIN_USES_UCLIBC && !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1)
+
+comment "python-libyang needs libyang"
+	depends on BR2_PACKAGE_PYTHON3
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
+	depends on !BR2_PACKAGE_LIBYANG
diff --git a/package/python-libyang/python-libyang.hash b/package/python-libyang/python-libyang.hash
new file mode 100644
index 0000000000..077d97cdd8
--- /dev/null
+++ b/package/python-libyang/python-libyang.hash
@@ -0,0 +1,5 @@
+# From https://pypi.org/pypi/libyang/3.3.0/json
+sha256  97da2c908a8a3607ac834f2acec224ea53a4b9e9770c13e5598513641decf637  libyang-3.3.0.tar.gz
+
+# Locally computed
+sha256  c8d554f918d32b1467f35829e1cfb753764dd683c6edcecc877a4d7e9f05b2a7  LICENSE
diff --git a/package/python-libyang/python-libyang.mk b/package/python-libyang/python-libyang.mk
new file mode 100644
index 0000000000..2e4d1f3b90
--- /dev/null
+++ b/package/python-libyang/python-libyang.mk
@@ -0,0 +1,21 @@
+################################################################################
+#
+# python-libyang
+#
+################################################################################
+
+PYTHON_LIBYANG_VERSION = 3.3.0
+PYTHON_LIBYANG_SOURCE = libyang-$(PYTHON_LIBYANG_VERSION).tar.gz
+PYTHON_LIBYANG_SITE = https://files.pythonhosted.org/packages/source/l/libyang
+
+PYTHON_LIBYANG_LICENSE = MIT
+PYTHON_LIBYANG_LICENSE_FILES = LICENSE
+
+# pyproject.toml (PEP517)
+PYTHON_LIBYANG_SETUP_TYPE = pep517
+
+PYTHON_LIBYANG_DEPENDENCIES = \
+	libyang \
+	host-python-cffi
+
+$(eval $(python-package))
-- 
2.43.0

_______________________________________________
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 v1 2/2] package/python-sysrepo: new package
  2026-01-07 17:54 [Buildroot] [PATCH v1 0/2] Add python-libyang and python-sysrepo packages Vincent Jardin via buildroot
  2026-01-07 17:54 ` [Buildroot] [PATCH v1 1/2] package/python-libyang: new package Vincent Jardin via buildroot
@ 2026-01-07 17:54 ` Vincent Jardin via buildroot
  2026-01-07 22:45   ` Thomas Petazzoni via buildroot
  1 sibling, 1 reply; 11+ messages in thread
From: Vincent Jardin via buildroot @ 2026-01-07 17:54 UTC (permalink / raw)
  To: buildroot; +Cc: vjardin

Python CFFI bindings for the sysrepo YANG datastore. This package
provides the 'sysrepo' Python module which talks to the C sysrepo
library.

Also fix sysrepo build on riscv32 where glibc doesn't define
SYS_futex (only SYS_futex_time64). Use pthread-based condition
variables instead of futex on this architecture.

Upstream: https://github.com/sysrepo/sysrepo/issues/3346

Signed-off-by: Vincent Jardin <vjardin@free.fr>
---
 package/python-sysrepo/Config.in           | 26 ++++++++++++++++++++++
 package/python-sysrepo/python-sysrepo.hash |  5 +++++
 package/python-sysrepo/python-sysrepo.mk   | 18 +++++++++++++++
 package/sysrepo/sysrepo.mk                 |  7 ++++++
 4 files changed, 56 insertions(+)
 create mode 100644 package/python-sysrepo/Config.in
 create mode 100644 package/python-sysrepo/python-sysrepo.hash
 create mode 100644 package/python-sysrepo/python-sysrepo.mk

diff --git a/package/python-sysrepo/Config.in b/package/python-sysrepo/Config.in
new file mode 100644
index 0000000000..ce6b8611f2
--- /dev/null
+++ b/package/python-sysrepo/Config.in
@@ -0,0 +1,26 @@
+config BR2_PACKAGE_PYTHON_SYSREPO
+	bool "python-sysrepo"
+	depends on BR2_PACKAGE_PYTHON3
+	depends on BR2_PACKAGE_SYSREPO
+	# Python3 doesn't work with uClibc and kernel headers < 5.1
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
+	select BR2_PACKAGE_PYTHON_LIBYANG
+	help
+	  Python CFFI bindings for the sysrepo YANG datastore.
+
+	  This package provides the 'sysrepo' Python module which
+	  talks to the C sysrepo library packaged as
+	  BR2_PACKAGE_SYSREPO.
+
+	  Upstream project name on PyPI is 'sysrepo'.
+
+	  https://github.com/sysrepo/sysrepo-python
+
+comment "python-sysrepo needs python3, uClibc needs kernel headers >= 5.1"
+	depends on !BR2_PACKAGE_PYTHON3 || \
+		(BR2_TOOLCHAIN_USES_UCLIBC && !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1)
+
+comment "python-sysrepo needs sysrepo"
+	depends on BR2_PACKAGE_PYTHON3
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
+	depends on !BR2_PACKAGE_SYSREPO
diff --git a/package/python-sysrepo/python-sysrepo.hash b/package/python-sysrepo/python-sysrepo.hash
new file mode 100644
index 0000000000..4b70cd12da
--- /dev/null
+++ b/package/python-sysrepo/python-sysrepo.hash
@@ -0,0 +1,5 @@
+# From https://pypi.org/pypi/sysrepo/1.7.6/json
+sha256  d257f20ed134c00676ef38ce858a4e16ca573214d9fbf03078383f0ef8d17641  sysrepo-1.7.6.tar.gz
+
+# Locally computed
+sha256  c47e5249d2dff016106bf7395df1d94c7c5d74a36d64b81d96637f1f25dff4da  LICENSE
diff --git a/package/python-sysrepo/python-sysrepo.mk b/package/python-sysrepo/python-sysrepo.mk
new file mode 100644
index 0000000000..5e9e97df25
--- /dev/null
+++ b/package/python-sysrepo/python-sysrepo.mk
@@ -0,0 +1,18 @@
+################################################################################
+#
+# python-sysrepo
+#
+################################################################################
+
+PYTHON_SYSREPO_VERSION = 1.7.6
+PYTHON_SYSREPO_SOURCE = sysrepo-$(PYTHON_SYSREPO_VERSION).tar.gz
+PYTHON_SYSREPO_SITE = https://files.pythonhosted.org/packages/source/s/sysrepo
+PYTHON_SYSREPO_SETUP_TYPE = setuptools
+
+PYTHON_SYSREPO_LICENSE = BSD-3-Clause
+PYTHON_SYSREPO_LICENSE_FILES = LICENSE
+
+PYTHON_SYSREPO_DEPENDENCIES = sysrepo
+PYTHON_SYSREPO_DEPENDENCIES += python-libyang
+
+$(eval $(python-package))
diff --git a/package/sysrepo/sysrepo.mk b/package/sysrepo/sysrepo.mk
index 59dc59a5df..329c0ee7c6 100644
--- a/package/sysrepo/sysrepo.mk
+++ b/package/sysrepo/sysrepo.mk
@@ -26,6 +26,13 @@ ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
 SYSREPO_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic
 endif
 
+# riscv32 glibc doesn't define SYS_futex (only SYS_futex_time64)
+# Use pthread-based condition variables instead of futex
+# https://github.com/sysrepo/sysrepo/issues/3346
+ifeq ($(BR2_RISCV_32),y)
+SYSREPO_CONF_OPTS += -DSR_COND_IMPL=sr_cond_pthread
+endif
+
 define SYSREPO_INSTALL_INIT_SYSV
 	$(INSTALL) -m 755 -D package/sysrepo/S51sysrepo-plugind \
 		$(TARGET_DIR)/etc/init.d/S51sysrepo-plugind
-- 
2.43.0

_______________________________________________
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 v1 1/2] package/python-libyang: new package
  2026-01-07 17:54 ` [Buildroot] [PATCH v1 1/2] package/python-libyang: new package Vincent Jardin via buildroot
@ 2026-01-07 22:40   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-01-07 22:40 UTC (permalink / raw)
  To: Vincent Jardin via buildroot; +Cc: Vincent Jardin

Hello Vincent,

On Wed,  7 Jan 2026 18:54:45 +0100
Vincent Jardin via buildroot <buildroot@buildroot.org> wrote:

> diff --git a/DEVELOPERS b/DEVELOPERS
> index f982e3123a..5585e8b353 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -3359,6 +3359,8 @@ F:	package/bfscripts/
>  F:	package/dpdk/
>  F:	package/libecoli/
>  F:	package/libyang-cpp/
> +F:	package/python-libyang/
> +F:	package/python-sysrepo/

There's a problem in the patch splitting here. This patch should only
add the entry for python-libyang.

>  F:	package/sysrepo-cpp/
>  
>  N:	Vincent Prince <vincent.prince.fr@gmail.com>
> diff --git a/package/Config.in b/package/Config.in
> index def3db0e50..19d32c16ea 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1205,6 +1205,7 @@ menu "External python modules"
>  	source "package/python-libconfig/Config.in"
>  	source "package/python-libevdev/Config.in"
>  	source "package/python-libusb1/Config.in"
> +	source "package/python-libyang/Config.in"
>  	source "package/python-lmdb/Config.in"
>  	source "package/python-lockfile/Config.in"
>  	source "package/python-log-rate-limit/Config.in"
> @@ -1434,6 +1435,7 @@ menu "External python modules"
>  	source "package/python-stack-data/Config.in"
>  	source "package/python-starlette/Config.in"
>  	source "package/python-sympy/Config.in"
> +	source "package/python-sysrepo/Config.in"
>  	source "package/python-systemd/Config.in"
>  	source "package/python-tabledata/Config.in"
>  	source "package/python-tcolorpy/Config.in"

Same comment here.

> diff --git a/package/python-libyang/Config.in b/package/python-libyang/Config.in
> new file mode 100644
> index 0000000000..793bf7e3c5
> --- /dev/null
> +++ b/package/python-libyang/Config.in
> @@ -0,0 +1,23 @@
> +config BR2_PACKAGE_PYTHON_LIBYANG
> +	bool "python-libyang"
> +	depends on BR2_PACKAGE_PYTHON3

Not needed, since all python-*/Config.in are already included inside a
if BR2_PACKAGE_PYTHON3... endif condition.

> +	depends on BR2_PACKAGE_LIBYANG

This should be a "select", and then you replicate the "depends on" from
BR2_PACKAGE_LIBYANG:

        depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libyang
        depends on BR2_TOOLCHAIN_HAS_THREADS # libyang
        depends on !BR2_STATIC_LIBS # libyang

> +	# Python3 doesn't work with uClibc and kernel headers < 5.1
> +	depends on !BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1

This is no longer the case, this issue has been fixed in Buildroot, so
this dependency can be dropped.

> +	select BR2_PACKAGE_PYTHON_CFFI

	select BR2_PACKAGE_PYTHON_CFFI # runtime

> +	help
> +	  Python CFFI bindings for the libyang YANG library.
> +
> +	  This package provides the 'libyang' Python module, used by
> +	  higher-level tooling such as python-sysrepo.
> +
> +	  https://github.com/CESNET/libyang-python
> +
> +comment "python-libyang needs python3, uClibc needs kernel headers >= 5.1"
> +	depends on !BR2_PACKAGE_PYTHON3 || \
> +		(BR2_TOOLCHAIN_USES_UCLIBC && !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1)
> +
> +comment "python-libyang needs libyang"
> +	depends on BR2_PACKAGE_PYTHON3
> +	depends on !BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
> +	depends on !BR2_PACKAGE_LIBYANG

This needs to be updated to cover those dependencies:

        depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libyang
        depends on BR2_TOOLCHAIN_HAS_THREADS # libyang
        depends on !BR2_STATIC_LIBS # libyang

No need to mention the python3 dependency.

Rest looks good to me.

Thanks!

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

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

* Re: [Buildroot] [PATCH v1 2/2] package/python-sysrepo: new package
  2026-01-07 17:54 ` [Buildroot] [PATCH v1 2/2] package/python-sysrepo: " Vincent Jardin via buildroot
@ 2026-01-07 22:45   ` Thomas Petazzoni via buildroot
  2026-01-18 21:31     ` [Buildroot] [PATCH v1 0/1] package/sysrepo: fix build on riscv32 Vincent Jardin via buildroot
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-01-07 22:45 UTC (permalink / raw)
  To: Vincent Jardin via buildroot; +Cc: Vincent Jardin

Hello Vincent,

Thanks for the patch.

On Wed,  7 Jan 2026 18:54:46 +0100
Vincent Jardin via buildroot <buildroot@buildroot.org> wrote:

> Python CFFI bindings for the sysrepo YANG datastore. This package
> provides the 'sysrepo' Python module which talks to the C sysrepo
> library.
> 
> Also fix sysrepo build on riscv32 where glibc doesn't define
> SYS_futex (only SYS_futex_time64). Use pthread-based condition
> variables instead of futex on this architecture.


> 
> Upstream: https://github.com/sysrepo/sysrepo/issues/3346
> 
> Signed-off-by: Vincent Jardin <vjardin@free.fr>
> ---
>  package/python-sysrepo/Config.in           | 26 ++++++++++++++++++++++
>  package/python-sysrepo/python-sysrepo.hash |  5 +++++
>  package/python-sysrepo/python-sysrepo.mk   | 18 +++++++++++++++
>  package/sysrepo/sysrepo.mk                 |  7 ++++++
>  4 files changed, 56 insertions(+)

Missing changes in DEVELOPERS and package/Config.in (because they are
mistakenly in PATCH 1/2).

> diff --git a/package/python-sysrepo/Config.in b/package/python-sysrepo/Config.in
> new file mode 100644
> index 0000000000..ce6b8611f2
> --- /dev/null
> +++ b/package/python-sysrepo/Config.in
> @@ -0,0 +1,26 @@
> +config BR2_PACKAGE_PYTHON_SYSREPO
> +	bool "python-sysrepo"
> +	depends on BR2_PACKAGE_PYTHON3

Not needed.

> +	depends on BR2_PACKAGE_SYSREPO

Should be a "select" + replication of sysrepo "depends on".

> +	# Python3 doesn't work with uClibc and kernel headers < 5.1
> +	depends on !BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1

Not needed.

> +	select BR2_PACKAGE_PYTHON_LIBYANG

select BR2_PACKAGE_PYTHON_LIBYANG # runtime

> +	help
> +	  Python CFFI bindings for the sysrepo YANG datastore.
> +
> +	  This package provides the 'sysrepo' Python module which
> +	  talks to the C sysrepo library packaged as
> +	  BR2_PACKAGE_SYSREPO.
> +
> +	  Upstream project name on PyPI is 'sysrepo'.
> +
> +	  https://github.com/sysrepo/sysrepo-python
> +
> +comment "python-sysrepo needs python3, uClibc needs kernel headers >= 5.1"
> +	depends on !BR2_PACKAGE_PYTHON3 || \
> +		(BR2_TOOLCHAIN_USES_UCLIBC && !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1)

To be updated based on the actual dependencies.

> +comment "python-sysrepo needs sysrepo"
> +	depends on BR2_PACKAGE_PYTHON3
> +	depends on !BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
> +	depends on !BR2_PACKAGE_SYSREPO

Not needed.

> diff --git a/package/python-sysrepo/python-sysrepo.mk b/package/python-sysrepo/python-sysrepo.mk
> new file mode 100644
> index 0000000000..5e9e97df25
> --- /dev/null
> +++ b/package/python-sysrepo/python-sysrepo.mk
> @@ -0,0 +1,18 @@
> +################################################################################
> +#
> +# python-sysrepo
> +#
> +################################################################################
> +
> +PYTHON_SYSREPO_VERSION = 1.7.6
> +PYTHON_SYSREPO_SOURCE = sysrepo-$(PYTHON_SYSREPO_VERSION).tar.gz
> +PYTHON_SYSREPO_SITE = https://files.pythonhosted.org/packages/source/s/sysrepo
> +PYTHON_SYSREPO_SETUP_TYPE = setuptools
> +
> +PYTHON_SYSREPO_LICENSE = BSD-3-Clause
> +PYTHON_SYSREPO_LICENSE_FILES = LICENSE
> +
> +PYTHON_SYSREPO_DEPENDENCIES = sysrepo
> +PYTHON_SYSREPO_DEPENDENCIES += python-libyang

Are you sure python-libyang is a build-time dependency, or is it only a
runtime dependency?

Also, with Python packages, it's always good to have a minimal test
case in support/testing/.

> diff --git a/package/sysrepo/sysrepo.mk b/package/sysrepo/sysrepo.mk
> index 59dc59a5df..329c0ee7c6 100644
> --- a/package/sysrepo/sysrepo.mk
> +++ b/package/sysrepo/sysrepo.mk
> @@ -26,6 +26,13 @@ ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
>  SYSREPO_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic
>  endif
>  
> +# riscv32 glibc doesn't define SYS_futex (only SYS_futex_time64)
> +# Use pthread-based condition variables instead of futex
> +# https://github.com/sysrepo/sysrepo/issues/3346
> +ifeq ($(BR2_RISCV_32),y)
> +SYSREPO_CONF_OPTS += -DSR_COND_IMPL=sr_cond_pthread
> +endif

This is unrelated and should really be in its own patch. I guess it fixes:

  https://autobuild.buildroot.net/results/b0f/b0f30feeddad1a8d51ac87af8b7c56fd9a9b5ff6/build-end.log

Correct?

If yes, then you should indicate in the patch that it fixes a build
issue, have the link to the autobuilder failure, and indicate when the
issue was introduced, so that we can understand if the fix should be
backported to our 2025.02 LTS branch.

Thanks a lot!

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

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

* [Buildroot] [PATCH v1 0/1] package/sysrepo: fix build on riscv32
  2026-01-07 22:45   ` Thomas Petazzoni via buildroot
@ 2026-01-18 21:31     ` Vincent Jardin via buildroot
  2026-01-18 21:31       ` [Buildroot] [PATCH v1 1/1] " Vincent Jardin via buildroot
  2026-01-18 21:51       ` [Buildroot] [PATCH v1 0/1] " Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 11+ messages in thread
From: Vincent Jardin via buildroot @ 2026-01-18 21:31 UTC (permalink / raw)
  To: buildroot; +Cc: thomas.petazzoni, Vincent Jardin

This patch fixes sysrepo build on riscv32, where glibc doesn't define
SYS_futex (only SYS_futex_time64), causing the build to fail.

The fix uses pthread-based condition variables instead of futex on
this architecture by setting -DSR_COND_IMPL=sr_cond_pthread.

This issue affects all sysrepo versions on riscv32 glibc configurations,
including the 2025.02 LTS branch (sysrepo 3.6.11), so this fix should
be backported.

Fixes:
  https://autobuild.buildroot.net/results/b0f/b0f30feeddad1a8d51ac87af8b7c56fd9a9b5ff6/build-end.log

Upstream: https://github.com/sysrepo/sysrepo/issues/3346

CI build verification:
https://gitlab.com/vjardin/buildroot/-/pipelines/2269971852

Vincent Jardin (1):
  package/sysrepo: fix build on riscv32

 package/sysrepo/sysrepo.mk | 7 +++++++
 1 file changed, 7 insertions(+)

--
2.43.0

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

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

* [Buildroot] [PATCH v1 1/1] package/sysrepo: fix build on riscv32
  2026-01-18 21:31     ` [Buildroot] [PATCH v1 0/1] package/sysrepo: fix build on riscv32 Vincent Jardin via buildroot
@ 2026-01-18 21:31       ` Vincent Jardin via buildroot
  2026-01-18 21:51         ` Thomas Petazzoni via buildroot
  2026-02-17 16:00         ` [Buildroot] [PATCH v2 " Vincent Cruz
  2026-01-18 21:51       ` [Buildroot] [PATCH v1 0/1] " Thomas Petazzoni via buildroot
  1 sibling, 2 replies; 11+ messages in thread
From: Vincent Jardin via buildroot @ 2026-01-18 21:31 UTC (permalink / raw)
  To: buildroot; +Cc: thomas.petazzoni, Vincent Jardin

On riscv32, glibc doesn't define SYS_futex (only SYS_futex_time64),
causing the build to fail with:

  error: 'SYS_futex' undeclared

Use pthread-based condition variables instead of futex on this
architecture by setting -DSR_COND_IMPL=sr_cond_pthread.

Fixes:
  https://autobuild.buildroot.net/results/b0f/b0f30feeddad1a8d51ac87af8b7c56fd9a9b5ff6/build-end.log

The issue affects all sysrepo versions on riscv32 glibc configurations.
Since the 2025.02 LTS branch has sysrepo 3.6.11 which also has this
issue, this fix should be backported.

Upstream: https://github.com/sysrepo/sysrepo/issues/3346
Signed-off-by: Vincent Jardin <vjardin@free.fr>
---
 package/sysrepo/sysrepo.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/sysrepo/sysrepo.mk b/package/sysrepo/sysrepo.mk
index 59dc59a5df..329c0ee7c6 100644
--- a/package/sysrepo/sysrepo.mk
+++ b/package/sysrepo/sysrepo.mk
@@ -26,6 +26,13 @@ ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
 SYSREPO_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic
 endif
 
+# riscv32 glibc doesn't define SYS_futex (only SYS_futex_time64)
+# Use pthread-based condition variables instead of futex
+# https://github.com/sysrepo/sysrepo/issues/3346
+ifeq ($(BR2_RISCV_32),y)
+SYSREPO_CONF_OPTS += -DSR_COND_IMPL=sr_cond_pthread
+endif
+
 define SYSREPO_INSTALL_INIT_SYSV
 	$(INSTALL) -m 755 -D package/sysrepo/S51sysrepo-plugind \
 		$(TARGET_DIR)/etc/init.d/S51sysrepo-plugind
-- 
2.43.0

_______________________________________________
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 v1 1/1] package/sysrepo: fix build on riscv32
  2026-01-18 21:31       ` [Buildroot] [PATCH v1 1/1] " Vincent Jardin via buildroot
@ 2026-01-18 21:51         ` Thomas Petazzoni via buildroot
  2026-02-17 16:00         ` [Buildroot] [PATCH v2 " Vincent Cruz
  1 sibling, 0 replies; 11+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-01-18 21:51 UTC (permalink / raw)
  To: Vincent Jardin; +Cc: buildroot

Hello Vincent,

On Sun, Jan 18, 2026 at 10:31:20PM +0100, Vincent Jardin wrote:

> +# riscv32 glibc doesn't define SYS_futex (only SYS_futex_time64)
> +# Use pthread-based condition variables instead of futex
> +# https://github.com/sysrepo/sysrepo/issues/3346
> +ifeq ($(BR2_RISCV_32),y)
> +SYSREPO_CONF_OPTS += -DSR_COND_IMPL=sr_cond_pthread
> +endif

Thanks for the fix. However, since sysrepo is maintained *and* using a
reasonable build system (CMake), the build system should test the
availability of SYS_futex, and only use it if available, without
requiring the user to know about these "gory" details. After all, this
is what CMakeLists.txt tests are made for. Could you cook something
like this, or check with upstream?

Thanks a lot!

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

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

* Re: [Buildroot] [PATCH v1 0/1] package/sysrepo: fix build on riscv32
  2026-01-18 21:31     ` [Buildroot] [PATCH v1 0/1] package/sysrepo: fix build on riscv32 Vincent Jardin via buildroot
  2026-01-18 21:31       ` [Buildroot] [PATCH v1 1/1] " Vincent Jardin via buildroot
@ 2026-01-18 21:51       ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 11+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-01-18 21:51 UTC (permalink / raw)
  To: Vincent Jardin; +Cc: buildroot

Hello Vincent,

On Sun, Jan 18, 2026 at 10:31:19PM +0100, Vincent Jardin wrote:
> This patch fixes sysrepo build on riscv32, where glibc doesn't define
> SYS_futex (only SYS_futex_time64), causing the build to fail.
> 
> The fix uses pthread-based condition variables instead of futex on
> this architecture by setting -DSR_COND_IMPL=sr_cond_pthread.
> 
> This issue affects all sysrepo versions on riscv32 glibc configurations,
> including the 2025.02 LTS branch (sysrepo 3.6.11), so this fix should
> be backported.

Just to save you some time: sending a cover letter for a series
composed of a single patch is not necessary. A cover letter is only
needed when the series grows beyond one patch *and* some introduction
explanation is needed.

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

* [Buildroot] [PATCH v2 1/1] package/sysrepo: fix build on riscv32
  2026-01-18 21:31       ` [Buildroot] [PATCH v1 1/1] " Vincent Jardin via buildroot
  2026-01-18 21:51         ` Thomas Petazzoni via buildroot
@ 2026-02-17 16:00         ` Vincent Cruz
  2026-02-18 12:31           ` mooz
  1 sibling, 1 reply; 11+ messages in thread
From: Vincent Cruz @ 2026-02-17 16:00 UTC (permalink / raw)
  To: buildroot; +Cc: Vincent Cruz, Vincent Jardin

Fixes:
  https://autobuild.buildroot.net/results/b0f/b0f30feeddad1a8d51ac87af8b7c56fd9a9b5ff6/build-end.log

Upstream: https://github.com/sysrepo/sysrepo/commit/a0661b7e6a7b2f784fe3222048066c31187c6f92

Signed-off-by: Vincent Jardin <vjardin@free.fr>
Signed-off-by: Vincent Cruz <mooz@blockos.org>
---
v1 -> v2:
   - Backport upstream patch.

Tested with Buildroot gitlab CI:
  https://gitlab.com/v_cz/buildroot/-/pipelines/2331736795

 ...-sr_cond_futex-only-if-SYS_futex-sys.patch | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 package/sysrepo/0001-cmake-UPDATE-use-sr_cond_futex-only-if-SYS_futex-sys.patch

diff --git a/package/sysrepo/0001-cmake-UPDATE-use-sr_cond_futex-only-if-SYS_futex-sys.patch b/package/sysrepo/0001-cmake-UPDATE-use-sr_cond_futex-only-if-SYS_futex-sys.patch
new file mode 100644
index 0000000000..d1d2eac758
--- /dev/null
+++ b/package/sysrepo/0001-cmake-UPDATE-use-sr_cond_futex-only-if-SYS_futex-sys.patch
@@ -0,0 +1,33 @@
+From 6917e00fb6c99a97dacdae7040e5c4c53752b10f Mon Sep 17 00:00:00 2001
+From: Vincent Cruz <mooz@blockos.org>
+Date: Tue, 17 Feb 2026 14:14:06 +0100
+Subject: [PATCH 1/1] cmake UPDATE use sr_cond_futex only if SYS_futex syscall
+ is available
+
+Some architectures (for ex. riscv32) may not support SYS_futex system
+call, even though linux/futex.h include file is present.
+
+Upstream: https://github.com/sysrepo/sysrepo/commit/a0661b7e6a7b2f784fe3222048066c31187c6f92
+
+Signed-off-by: Vincent Cruz <mooz@blockos.org>
+---
+ CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9b36de44..e1b39c8c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -163,7 +163,8 @@ set(NACM_SRMON_DATA_PERM "600" CACHE STRING "NACM modules ietf-netconf-acm and s
+ # sr_cond implementation
+ if(NOT SR_COND_IMPL)
+     check_include_file("linux/futex.h" HAS_FUTEX)
+-    if(HAS_FUTEX)
++    check_symbol_exists(SYS_futex "sys/syscall.h" HAS_SYS_FUTEX)
++    if(HAS_FUTEX AND HAS_SYS_FUTEX)
+         set(SR_COND_IMPL "sr_cond_futex")
+     else()
+         set(SR_COND_IMPL "sr_cond_pthread")
+-- 
+2.51.0
+
-- 
2.51.0

_______________________________________________
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 v2 1/1] package/sysrepo: fix build on riscv32
  2026-02-17 16:00         ` [Buildroot] [PATCH v2 " Vincent Cruz
@ 2026-02-18 12:31           ` mooz
  0 siblings, 0 replies; 11+ messages in thread
From: mooz @ 2026-02-18 12:31 UTC (permalink / raw)
  To: buildroot; +Cc: Vincent Cruz, Vincent Jardin

Hello,

  I realized that I should have sent this patch as a new one and not as a reply to an existing thread.
I also forgot to include the package developers.

I will re-submit this patch.

Sorry for the inconvenience.
Vincent Cruz

-----Message original-----
De: Vincent <mooz@blockos.org>
à: buildroot <buildroot@buildroot.org>
Cc: Vincent <mooz@blockos.org>; Vincent <vjardin@free.fr>
Envoyé: mardi 17 février 2026 17:03 CET
Sujet : [PATCH v2 1/1] package/sysrepo: fix build on riscv32


Fixes:
  https://autobuild.buildroot.net/results/b0f/b0f30feeddad1a8d51ac87af8b7c56fd9a9b5ff6/build-end.log

Upstream: https://github.com/sysrepo/sysrepo/commit/a0661b7e6a7b2f784fe3222048066c31187c6f92

Signed-off-by: Vincent Jardin <vjardin@free.fr>
Signed-off-by: Vincent Cruz <mooz@blockos.org>
---
v1 -> v2:
   - Backport upstream patch.

Tested with Buildroot gitlab CI:
  https://gitlab.com/v_cz/buildroot/-/pipelines/2331736795

 ...-sr_cond_futex-only-if-SYS_futex-sys.patch | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 package/sysrepo/0001-cmake-UPDATE-use-sr_cond_futex-only-if-SYS_futex-sys.patch

diff --git a/package/sysrepo/0001-cmake-UPDATE-use-sr_cond_futex-only-if-SYS_futex-sys.patch b/package/sysrepo/0001-cmake-UPDATE-use-sr_cond_futex-only-if-SYS_futex-sys.patch
new file mode 100644
index 0000000000..d1d2eac758
--- /dev/null
+++ b/package/sysrepo/0001-cmake-UPDATE-use-sr_cond_futex-only-if-SYS_futex-sys.patch
@@ -0,0 +1,33 @@
+From 6917e00fb6c99a97dacdae7040e5c4c53752b10f Mon Sep 17 00:00:00 2001
+From: Vincent Cruz <mooz@blockos.org>
+Date: Tue, 17 Feb 2026 14:14:06 +0100
+Subject: [PATCH 1/1] cmake UPDATE use sr_cond_futex only if SYS_futex syscall
+ is available
+
+Some architectures (for ex. riscv32) may not support SYS_futex system
+call, even though linux/futex.h include file is present.
+
+Upstream: https://github.com/sysrepo/sysrepo/commit/a0661b7e6a7b2f784fe3222048066c31187c6f92
+
+Signed-off-by: Vincent Cruz <mooz@blockos.org>
+---
+ CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9b36de44..e1b39c8c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -163,7 +163,8 @@ set(NACM_SRMON_DATA_PERM "600" CACHE STRING "NACM modules ietf-netconf-acm and s
+ # sr_cond implementation
+ if(NOT SR_COND_IMPL)
+     check_include_file("linux/futex.h" HAS_FUTEX)
+-    if(HAS_FUTEX)
++    check_symbol_exists(SYS_futex "sys/syscall.h" HAS_SYS_FUTEX)
++    if(HAS_FUTEX AND HAS_SYS_FUTEX)
+         set(SR_COND_IMPL "sr_cond_futex")
+     else()
+         set(SR_COND_IMPL "sr_cond_pthread")
+-- 
+2.51.0
+
-- 
2.51.0

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

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

end of thread, other threads:[~2026-02-18 12:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-07 17:54 [Buildroot] [PATCH v1 0/2] Add python-libyang and python-sysrepo packages Vincent Jardin via buildroot
2026-01-07 17:54 ` [Buildroot] [PATCH v1 1/2] package/python-libyang: new package Vincent Jardin via buildroot
2026-01-07 22:40   ` Thomas Petazzoni via buildroot
2026-01-07 17:54 ` [Buildroot] [PATCH v1 2/2] package/python-sysrepo: " Vincent Jardin via buildroot
2026-01-07 22:45   ` Thomas Petazzoni via buildroot
2026-01-18 21:31     ` [Buildroot] [PATCH v1 0/1] package/sysrepo: fix build on riscv32 Vincent Jardin via buildroot
2026-01-18 21:31       ` [Buildroot] [PATCH v1 1/1] " Vincent Jardin via buildroot
2026-01-18 21:51         ` Thomas Petazzoni via buildroot
2026-02-17 16:00         ` [Buildroot] [PATCH v2 " Vincent Cruz
2026-02-18 12:31           ` mooz
2026-01-18 21:51       ` [Buildroot] [PATCH v1 0/1] " Thomas Petazzoni via buildroot

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