* [Buildroot] [PATCH 1/3] Config.in: timeout earlier when connecting to download servers
2025-02-03 9:34 [Buildroot] [PATCH 0/3] package/sigrok: update and udev rules (branch yem/sigrok) Yann E. MORIN
@ 2025-02-03 9:34 ` Yann E. MORIN
2025-02-04 10:56 ` Peter Korsgaard
2025-02-03 9:34 ` [Buildroot] [PATCH 2/3] package/libserialport: update to 0.1.2 Yann E. MORIN
2025-02-03 9:34 ` [Buildroot] [PATCH 3/3] package/libsigrok: install udev rules Yann E. MORIN
2 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2025-02-03 9:34 UTC (permalink / raw)
To: buildroot; +Cc: Yann E. MORIN
Some sites have broken DNS entries where some A or AAAA records point
to a nonexistent machine. This causes a long delay (~135sec here) before
a fallback to another IP is attempted. This is the case for example for
sigrok.org, which IPv6 entry is not reachable (at least from the few
locations I have access to, while other IPv6 servers are reachable).
Add a relatively small timeout on connect for the few download backends
where we can easily drive that setting:
- for curl and wget, that timeout only applies when establishing the
TCP connection, i.e. the three-way handshake;
- for scp and sftp, that timeout also include the ssh handshake;
- for svn, it is not explicit what the timeout is about, but the
documentation states "Timeout for HTTP requests in seconds".
In modern times, we expect that we can indeed establish those handshakes
in less than 10s; anything taking longer is in practice an unreachable
site...
For other download mechanism (bzr, cvs, git, hg), as well as
post-processing helpers (cargo, go), it does not seem possible to set
such a timeout.
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
Config.in | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Config.in b/Config.in
index c0c1a6079d..a543091d4f 100644
--- a/Config.in
+++ b/Config.in
@@ -114,15 +114,15 @@ menu "Commands"
config BR2_CURL
string "Curl command"
- default "curl -q --ftp-pasv --retry 3"
+ default "curl -q --ftp-pasv --retry 3 --connect-timeout 10"
config BR2_WGET
string "Wget command"
- default "wget -nd -t 3"
+ default "wget -nd -t 3 --connect-timeout=10"
config BR2_SVN
string "Subversion (svn) command"
- default "svn --non-interactive"
+ default "svn --non-interactive --config-option servers:global:http-timeout=10"
config BR2_BZR
string "Bazaar (bzr) command"
@@ -142,11 +142,11 @@ config BR2_LOCALFILES
config BR2_SCP
string "Secure copy (scp) command"
- default "scp"
+ default "scp -o ConnectTimeout=10"
config BR2_SFTP
string "Secure file transfer (sftp) command"
- default "sftp"
+ default "sftp -o ConnectTimeout=10"
config BR2_HG
string "Mercurial (hg) command"
--
2.47.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 0/3] package/sigrok: update and udev rules (branch yem/sigrok)
@ 2025-02-03 9:34 Yann E. MORIN
2025-02-03 9:34 ` [Buildroot] [PATCH 1/3] Config.in: timeout earlier when connecting to download servers Yann E. MORIN
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Yann E. MORIN @ 2025-02-03 9:34 UTC (permalink / raw)
To: buildroot; +Cc: Paul Cercueil, Yann E . MORIN
Hello All!
This small series bumps the libserialport package, and installs the
libsigrok udev rules to allow non-root users to upload firmware blobs
to the devices.
Ths sigrok.org server has both AAAA and A records, but there is nothing
behind the IPv6, which causes huge delays when downloading file from
there. This is addressed in the first patch.
Regards,
Yann E. MORIN.
----------------------------------------------------------------
Yann E. MORIN (3):
Config.in: timeout earlier when connecting to download servers
package/libserialport: update to 0.1.2
package/libsigrok: install udev rules
.checkpackageignore | 1 -
Config.in | 10 ++++-----
package/libserialport/0001-uclinux-detection.patch | 26 ----------------------
package/libserialport/libserialport.hash | 2 +-
package/libserialport/libserialport.mk | 3 +--
package/libsigrok/libsigrok.mk | 16 +++++++++++++
6 files changed, 23 insertions(+), 35 deletions(-)
delete mode 100644 package/libserialport/0001-uclinux-detection.patch
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 2/3] package/libserialport: update to 0.1.2
2025-02-03 9:34 [Buildroot] [PATCH 0/3] package/sigrok: update and udev rules (branch yem/sigrok) Yann E. MORIN
2025-02-03 9:34 ` [Buildroot] [PATCH 1/3] Config.in: timeout earlier when connecting to download servers Yann E. MORIN
@ 2025-02-03 9:34 ` Yann E. MORIN
2025-02-04 9:46 ` Peter Korsgaard
2025-02-03 9:34 ` [Buildroot] [PATCH 3/3] package/libsigrok: install udev rules Yann E. MORIN
2 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2025-02-03 9:34 UTC (permalink / raw)
To: buildroot; +Cc: Yann E. MORIN, Paul Cercueil
Drop the patch, that has been upstreamed as b2359c5c994c (libserialport:
Fix Linux files not compiled in with a toolchain for ucLinux).
Accordingly, drop the now superfluous autoreconf.
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Paul Cercueil <paul@crapouillou.net>
---
.checkpackageignore | 1 -
.../0001-uclinux-detection.patch | 26 -------------------
package/libserialport/libserialport.hash | 2 +-
package/libserialport/libserialport.mk | 3 +--
4 files changed, 2 insertions(+), 30 deletions(-)
delete mode 100644 package/libserialport/0001-uclinux-detection.patch
diff --git a/.checkpackageignore b/.checkpackageignore
index 65d017116e..b8529e36fa 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -711,7 +711,6 @@ package/libselinux/0001-Do-not-use-PYCEXT-and-rely-on-the-installed-file-nam.pat
package/libsepol/0001-support-static-only.patch lib_patch.Upstream
package/libserial/0001-SerialPort.cpp-fix-build-when-size_t-is-an-unsigned-.patch lib_patch.Upstream
package/libserial/0002-SerialPort.cpp-don-t-use-high-baudrates-when-not-ava.patch lib_patch.Upstream
-package/libserialport/0001-uclinux-detection.patch lib_patch.Upstream
package/libshdata/0001-backend-Add-missing-include-files.patch lib_patch.Upstream
package/libshdata/0002-examples-stress_test-Fix-build-with-musl-libc.patch lib_patch.Upstream
package/libsidplay2/0001-sidplay2-libs-2.1.1.patch lib_patch.Upstream
diff --git a/package/libserialport/0001-uclinux-detection.patch b/package/libserialport/0001-uclinux-detection.patch
deleted file mode 100644
index 7d7199c1f0..0000000000
--- a/package/libserialport/0001-uclinux-detection.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From faab9aa5879fab93556b7a3a6f24070eeb3cbf15 Mon Sep 17 00:00:00 2001
-From: Paul Cercueil <paul.cercueil@analog.com>
-Date: Mon, 29 Aug 2016 11:11:01 +0200
-Subject: [PATCH] Fix Linux files not compiled in with a toolchain for ucLinux
-
-Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index f6b66e8..de6f5b9 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -74,7 +74,7 @@ AC_DEFINE_UNQUOTED([SP_LIB_VERSION_REVISION], [$SP_LIB_VERSION_REVISION], [.])
- AC_DEFINE_UNQUOTED([SP_LIB_VERSION_AGE], [$SP_LIB_VERSION_AGE], [.])
- AC_DEFINE_UNQUOTED([SP_LIB_VERSION_STRING], ["$SP_LIB_VERSION"], [.])
-
--AM_CONDITIONAL([LINUX], [test -z "${host_os##linux*}"])
-+AM_CONDITIONAL([LINUX], [test -z "${host_os##linux*}" || test -z "${host_os##uclinux*}"])
- AM_CONDITIONAL([WIN32], [test -z "${host_os##mingw*}" || test -z "${host_os##cygwin*}"])
- AM_CONDITIONAL([MACOSX], [test -z "${host_os##darwin*}"])
- AM_CONDITIONAL([FREEBSD], [test -z "${host_os##freebsd*}"])
---
-2.8.1
-
diff --git a/package/libserialport/libserialport.hash b/package/libserialport/libserialport.hash
index 39f0c8f1f0..5bf7823d63 100644
--- a/package/libserialport/libserialport.hash
+++ b/package/libserialport/libserialport.hash
@@ -1,3 +1,3 @@
# Locally computed
-sha256 4a2af9d9c3ff488e92fb75b4ba38b35bcf9b8a66df04773eba2a7bbf1fa7529d libserialport-0.1.1.tar.gz
+sha256 5deb92b5ca72c0347b07b786848350deca2dcfd975ce613b8e0e1d947a4b4ca9 libserialport-0.1.2.tar.gz
sha256 da7eabb7bafdf7d3ae5e9f223aa5bdc1eece45ac569dc21b3b037520b4464768 COPYING
diff --git a/package/libserialport/libserialport.mk b/package/libserialport/libserialport.mk
index 84d7a5315b..f3331db074 100644
--- a/package/libserialport/libserialport.mk
+++ b/package/libserialport/libserialport.mk
@@ -4,12 +4,11 @@
#
################################################################################
-LIBSERIALPORT_VERSION = 0.1.1
+LIBSERIALPORT_VERSION = 0.1.2
LIBSERIALPORT_SITE = http://sigrok.org/download/source/libserialport
LIBSERIALPORT_LICENSE = LGPL-3.0+
LIBSERIALPORT_LICENSE_FILES = COPYING
LIBSERIALPORT_INSTALL_STAGING = YES
LIBSERIALPORT_DEPENDENCIES = host-pkgconf
-LIBSERIALPORT_AUTORECONF = YES
$(eval $(autotools-package))
--
2.47.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 3/3] package/libsigrok: install udev rules
2025-02-03 9:34 [Buildroot] [PATCH 0/3] package/sigrok: update and udev rules (branch yem/sigrok) Yann E. MORIN
2025-02-03 9:34 ` [Buildroot] [PATCH 1/3] Config.in: timeout earlier when connecting to download servers Yann E. MORIN
2025-02-03 9:34 ` [Buildroot] [PATCH 2/3] package/libserialport: update to 0.1.2 Yann E. MORIN
@ 2025-02-03 9:34 ` Yann E. MORIN
2025-02-04 9:46 ` Peter Korsgaard
2 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2025-02-03 9:34 UTC (permalink / raw)
To: buildroot; +Cc: Yann E. MORIN
Some devices that libsigrok can talk to, need a firmware to be uploaded.
libsigrok comes with a set of rules to allow non-root users to upload
those firmware blobs.
Depending on how the system is configured, different set of rules are
needed [0] (yes, it's documented on the fx2lafw page, not on the
libsigrok one [1]). Basically:
- 60-libsigrok.rules is always used;
- 61-libsigrok-uaccess.rules is used when systemd-logind is used;
- 61-libsigrok-plugdev.rules is used when systemd-logind is not used.
For systems without udev, it is the responsibility of the user to
implement proper access management if they need non-root to upload
firmware files.
[0] https://sigrok.org/wiki/Fx2lafw#Install_the_udev_rules_file
[1] https://sigrok.org/wiki/Libsigrok
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
package/libsigrok/libsigrok.mk | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/package/libsigrok/libsigrok.mk b/package/libsigrok/libsigrok.mk
index 639ee4dc25..22524dd4f6 100644
--- a/package/libsigrok/libsigrok.mk
+++ b/package/libsigrok/libsigrok.mk
@@ -65,4 +65,20 @@ else
LIBSIGROK_CONF_OPTS += --disable-cxx
endif
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
+LIBSIGROK_UDEV_RULES = \
+ 60-libsigrok.rules \
+ $(if $(BR2_PACKAGE_SYSTEMD_LOGIND), \
+ 61-libsigrok-uaccess.rules, \
+ 61-libsigrok-plugdev.rules \
+ )
+define LIBSIGROK_INSTALL_UDEV_RULES
+ $(foreach rule, $(LIBSIGROK_UDEV_RULES), \
+ $(INSTALL) -D -m 0644 $(@D)/contrib/$(rule) \
+ $(TARGET_DIR)/usr/lib/udev/rules.d/$(rule)$(sep) \
+ )
+endef
+LIBSIGROK_POST_INSTALL_TARGET_HOOKS += LIBSIGROK_INSTALL_UDEV_RULES
+endif
+
$(eval $(autotools-package))
--
2.47.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 2/3] package/libserialport: update to 0.1.2
2025-02-03 9:34 ` [Buildroot] [PATCH 2/3] package/libserialport: update to 0.1.2 Yann E. MORIN
@ 2025-02-04 9:46 ` Peter Korsgaard
0 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2025-02-04 9:46 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: buildroot, Paul Cercueil
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> Drop the patch, that has been upstreamed as b2359c5c994c (libserialport:
> Fix Linux files not compiled in with a toolchain for ucLinux).
> Accordingly, drop the now superfluous autoreconf.
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Paul Cercueil <paul@crapouillou.net>
Committed, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 3/3] package/libsigrok: install udev rules
2025-02-03 9:34 ` [Buildroot] [PATCH 3/3] package/libsigrok: install udev rules Yann E. MORIN
@ 2025-02-04 9:46 ` Peter Korsgaard
0 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2025-02-04 9:46 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: buildroot
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> Some devices that libsigrok can talk to, need a firmware to be uploaded.
> libsigrok comes with a set of rules to allow non-root users to upload
> those firmware blobs.
> Depending on how the system is configured, different set of rules are
> needed [0] (yes, it's documented on the fx2lafw page, not on the
> libsigrok one [1]). Basically:
> - 60-libsigrok.rules is always used;
> - 61-libsigrok-uaccess.rules is used when systemd-logind is used;
> - 61-libsigrok-plugdev.rules is used when systemd-logind is not used.
> For systems without udev, it is the responsibility of the user to
> implement proper access management if they need non-root to upload
> firmware files.
> [0] https://sigrok.org/wiki/Fx2lafw#Install_the_udev_rules_file
> [1] https://sigrok.org/wiki/Libsigrok
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Committed, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 1/3] Config.in: timeout earlier when connecting to download servers
2025-02-03 9:34 ` [Buildroot] [PATCH 1/3] Config.in: timeout earlier when connecting to download servers Yann E. MORIN
@ 2025-02-04 10:56 ` Peter Korsgaard
2025-02-04 20:08 ` Yann E. MORIN
0 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2025-02-04 10:56 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: buildroot
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> Some sites have broken DNS entries where some A or AAAA records point
> to a nonexistent machine. This causes a long delay (~135sec here) before
> a fallback to another IP is attempted. This is the case for example for
> sigrok.org, which IPv6 entry is not reachable (at least from the few
> locations I have access to, while other IPv6 servers are reachable).
> Add a relatively small timeout on connect for the few download backends
> where we can easily drive that setting:
> - for curl and wget, that timeout only applies when establishing the
> TCP connection, i.e. the three-way handshake;
> - for scp and sftp, that timeout also include the ssh handshake;
> - for svn, it is not explicit what the timeout is about, but the
> documentation states "Timeout for HTTP requests in seconds".
> In modern times, we expect that we can indeed establish those handshakes
> in less than 10s; anything taking longer is in practice an unreachable
> site...
> For other download mechanism (bzr, cvs, git, hg), as well as
> post-processing helpers (cargo, go), it does not seem possible to set
> such a timeout.
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> ---
> Config.in | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
> diff --git a/Config.in b/Config.in
> index c0c1a6079d..a543091d4f 100644
> --- a/Config.in
> +++ b/Config.in
> @@ -114,15 +114,15 @@ menu "Commands"
> config BR2_CURL
> string "Curl command"
> - default "curl -q --ftp-pasv --retry 3"
> + default "curl -q --ftp-pasv --retry 3 --connect-timeout 10"
It doesn't seem to be strictly needed for curl as it seems to use the
happy eyeballs algorithm, but OK:
time curl -v http://sigrok.org
* Trying [2a05:bec0:20:c01::8c96:bda6]:80...
* Trying 134.255.237.124:80...
* Connected to sigrok.org (134.255.237.124) port 80 (#0)
> GET / HTTP/1.1
> Host: sigrok.org
> User-Agent: curl/7.88.1
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Date: Tue, 04 Feb 2025 10:56:28 GMT
< Server: Apache/2.4.56
< X-Content-Type-Options: nosniff
< Vary: Accept-Encoding,Cookie
< Expires: Tue, 04 Feb 2025 10:56:28 GMT
< Cache-Control: private, must-revalidate, max-age=0
< Last-Modified: Tue, 04 Feb 2025 10:56:28 GMT
< Location: https://sigrok.org/wiki/Main_Page
< X-Request-Id: e50b7132460e1a6484be9312
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=utf-8
<
* Connection #0 to host sigrok.org left intact
real 0m0.249s
user 0m0.007s
sys 0m0.011s
Committed, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 1/3] Config.in: timeout earlier when connecting to download servers
2025-02-04 10:56 ` Peter Korsgaard
@ 2025-02-04 20:08 ` Yann E. MORIN
0 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2025-02-04 20:08 UTC (permalink / raw)
To: Peter Korsgaard; +Cc: buildroot
Peter, All,
On 2025-02-04 11:56 +0100, Peter Korsgaard spake thusly:
> >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> > Add a relatively small timeout on connect for the few download backends
> > where we can easily drive that setting:
[--SNIP--]
> It doesn't seem to be strictly needed for curl as it seems to use the
> happy eyeballs algorithm, but OK:
Sure, but the happy eyeballs algorithm does not help when the whole site
is down, where we want to quickly switch over to s.b.o.
Thanks for applying!
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-02-04 20:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-03 9:34 [Buildroot] [PATCH 0/3] package/sigrok: update and udev rules (branch yem/sigrok) Yann E. MORIN
2025-02-03 9:34 ` [Buildroot] [PATCH 1/3] Config.in: timeout earlier when connecting to download servers Yann E. MORIN
2025-02-04 10:56 ` Peter Korsgaard
2025-02-04 20:08 ` Yann E. MORIN
2025-02-03 9:34 ` [Buildroot] [PATCH 2/3] package/libserialport: update to 0.1.2 Yann E. MORIN
2025-02-04 9:46 ` Peter Korsgaard
2025-02-03 9:34 ` [Buildroot] [PATCH 3/3] package/libsigrok: install udev rules Yann E. MORIN
2025-02-04 9:46 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox