From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Vincent Jardin via buildroot <buildroot@buildroot.org>
Cc: Vincent Jardin <vjardin@free.fr>
Subject: Re: [Buildroot] [PATCH v1 2/2] package/python-sysrepo: new package
Date: Wed, 7 Jan 2026 23:45:05 +0100 [thread overview]
Message-ID: <20260107234505.0810d964@windsurf> (raw)
In-Reply-To: <20260107175446.2470125-3-vjardin@free.fr>
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
next prev parent reply other threads:[~2026-01-07 22:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260107234505.0810d964@windsurf \
--to=buildroot@buildroot.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=vjardin@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox