* [Buildroot] [PATCH] package/tftpd: bump to version 5.4
@ 2026-08-20 12:35 Nathan Bloch
2026-09-18 20:02 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Nathan Bloch @ 2026-08-20 12:35 UTC (permalink / raw)
To: buildroot; +Cc: nblochn
Switch from a post-5.3 git snapshot back to the release tarball, now
that 5.4 is out.
This also fixes a regression in the snapshot we pin: the autoconf
modernization in fefaa2cc5c2a renamed the msg_control define to
HAVE_STRUCT_MSGHDR_MSG_CONTROL, but tftpd/recvfrom.c kept testing for
HAVE_MSGHDR_MSG_CONTROL, so the recvmsg() code path is compiled out and
the fallback is used instead. That fallback reads the address family
from the 'from' address before recvfrom() has filled it in, so the
first request after each start creates the transfer socket with
AF_UNSPEC, gets EAFNOSUPPORT and exits without answering or logging the
request. Fixed upstream in 5.4 by e701714f7a8c ("autoconf: correct the
new #define names after modernization") and 82223bbf9391 ("tftpd/
recvfrom.c: don't derive local address family before recvfrom()").
Drop TFTPD_AUTORECONF and its m4 include directory: the release tarball
ships a configure script.
Update the license information: 5.4 replaced the per-file license
preambles with SPDX tags and a LICENSES/ directory, so tftpd/tftpd.c no
longer contains any license text. Both binaries are built from a mix of
BSD-4-Clause-UC and BSD-3-Clause files.
Add a patch for the only build failure in 5.4: tftpd/path.h uses bool
without including <stdbool.h>, which requires a C23 compiler.
Fixes: d4a84e61615553ff678d3c3b52ed33f898e9fcc9
Signed-off-by: Nathan Bloch <nblochn@gmail.com>
---
...path.h-add-missing-stdbool.h-include.patch | 39 +++++++++++++++++++
package/tftpd/tftpd.hash | 9 +++--
package/tftpd/tftpd.mk | 13 +++----
3 files changed, 49 insertions(+), 12 deletions(-)
create mode 100644 package/tftpd/0001-tftpd-path.h-add-missing-stdbool.h-include.patch
diff --git a/package/tftpd/0001-tftpd-path.h-add-missing-stdbool.h-include.patch b/package/tftpd/0001-tftpd-path.h-add-missing-stdbool.h-include.patch
new file mode 100644
index 0000000000..5995ecd937
--- /dev/null
+++ b/package/tftpd/0001-tftpd-path.h-add-missing-stdbool.h-include.patch
@@ -0,0 +1,39 @@
+From: Nathan Bloch <nblochn@gmail.com>
+Date: Wed, 20 Aug 2026 12:00:00 +0300
+Subject: [PATCH] tftpd/path.h: add missing <stdbool.h> include
+
+path.h declares parse_path() with a bool parameter, and both of its
+users, path.c and tftpd.c, use bool without including <stdbool.h>
+themselves. That only compiles where bool is a keyword, i.e. C23, so
+the build fails with any compiler defaulting to C17 or older:
+
+ path.h:7:43: error: unknown type name 'bool'
+ path.c:55:33: error: 'true' undeclared (first use in this function)
+ tftpd.c:391:5: error: unknown type name 'bool'
+
+gcc defaults to gnu17 up to and including 14.x, so 5.4 does not build
+with any of them.
+
+Include <stdbool.h> from path.h, the header declaring the bool-taking
+prototype, which both users already include.
+
+Upstream: not submitted yet, upstream master is affected as well.
+
+Signed-off-by: Nathan Bloch <nblochn@gmail.com>
+---
+ tftpd/path.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tftpd/path.h b/tftpd/path.h
+index 93c7269..97aacc3 100644
+--- a/tftpd/path.h
++++ b/tftpd/path.h
+@@ -4,6 +4,8 @@
+ #ifndef TFTPD_PATH_H
+ #define TFTPD_PATH_H 1
+
++#include <stdbool.h>
++
+ const char **parse_path(const char *path, bool strict);
+ char *build_path(const char * const *dirs);
+ unsigned int compare_paths(const char * const *a, const char * const *b);
diff --git a/package/tftpd/tftpd.hash b/package/tftpd/tftpd.hash
index 5a4e87f689..4a7d6ae5ab 100644
--- a/package/tftpd/tftpd.hash
+++ b/package/tftpd/tftpd.hash
@@ -1,5 +1,6 @@
-# Locally calculated
-sha256 452b2d630f884d80a7c4c324aa8248470224048ffb9473e3490460658b8ebea4 tftpd-2c86ff58dcc003107b47f2d35aa0fdc4a3fd95e1-git4.tar.gz
+# From https://www.kernel.org/pub/software/network/tftp/tftp-hpa/sha256sums.asc
+sha256 abef8b32fa5951bf18e0cbe07e0f0f1b25580cc24d2f9513123be5f840402c87 tftp-hpa-5.4.tar.xz
-# Hash for license file
-sha256 9c46847a03d4cf290616a173d526b9bbdfcaf6846cbc01f361989b4e61f2d72e tftpd/tftpd.c
+# Locally calculated
+sha256 fc8ce700cb385e975d94ca14f0ad25b4ec2591558d15e96fc428cc63dcbfc956 LICENSES/BSD-4-Clause-UC.txt
+sha256 2c8f649586dee0d7a063bcbe46b7606c27111b29c7655a6b89797858c8eac2ed LICENSES/BSD-3-Clause.txt
diff --git a/package/tftpd/tftpd.mk b/package/tftpd/tftpd.mk
index 73ac7006a4..e8bc6c994a 100644
--- a/package/tftpd/tftpd.mk
+++ b/package/tftpd/tftpd.mk
@@ -4,18 +4,15 @@
#
################################################################################
-TFTPD_VERSION = 2c86ff58dcc003107b47f2d35aa0fdc4a3fd95e1
-TFTPD_SITE = https://git.kernel.org/pub/scm/network/tftp/tftp-hpa.git
-TFTPD_SITE_METHOD = git
+TFTPD_VERSION = 5.4
+TFTPD_SOURCE = tftp-hpa-$(TFTPD_VERSION).tar.xz
+TFTPD_SITE = $(BR2_KERNEL_MIRROR)/software/network/tftp/tftp-hpa
TFTPD_CONF_OPTS = --disable-tcpwrappers
-TFTPD_LICENSE = BSD-4-Clause
-TFTPD_LICENSE_FILES = tftpd/tftpd.c
+TFTPD_LICENSE = BSD-4-Clause-UC, BSD-3-Clause
+TFTPD_LICENSE_FILES = LICENSES/BSD-4-Clause-UC.txt LICENSES/BSD-3-Clause.txt
TFTPD_CPE_ID_VENDOR = tftpd-hpa_project
TFTPD_CPE_ID_PRODUCT = tftpd-hpa
TFTPD_SELINUX_MODULES = tftp
-# From git
-TFTPD_AUTORECONF = YES
-TFTPD_AUTORECONF_OPTS = --include=$(@D)/autoconf/m4
define TFTPD_INSTALL_TARGET_CMDS
$(INSTALL) -D $(@D)/tftp/tftp $(TARGET_DIR)/usr/bin/tftp
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [Buildroot] [PATCH] package/tftpd: bump to version 5.4
2026-08-20 12:35 [Buildroot] [PATCH] package/tftpd: bump to version 5.4 Nathan Bloch
@ 2026-09-18 20:02 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-09-18 20:02 UTC (permalink / raw)
To: Nathan Bloch; +Cc: buildroot
Hello,
Thanks for the patch.
On Thu, Aug 20, 2026 at 03:35:00PM +0300, Nathan Bloch wrote:
> Switch from a post-5.3 git snapshot back to the release tarball, now
> that 5.4 is out.
>
> This also fixes a regression in the snapshot we pin: the autoconf
> modernization in fefaa2cc5c2a renamed the msg_control define to
> HAVE_STRUCT_MSGHDR_MSG_CONTROL, but tftpd/recvfrom.c kept testing for
> HAVE_MSGHDR_MSG_CONTROL, so the recvmsg() code path is compiled out and
> the fallback is used instead. That fallback reads the address family
> from the 'from' address before recvfrom() has filled it in, so the
> first request after each start creates the transfer socket with
> AF_UNSPEC, gets EAFNOSUPPORT and exits without answering or logging the
> request. Fixed upstream in 5.4 by e701714f7a8c ("autoconf: correct the
> new #define names after modernization") and 82223bbf9391 ("tftpd/
> recvfrom.c: don't derive local address family before recvfrom()").
>
> Drop TFTPD_AUTORECONF and its m4 include directory: the release tarball
> ships a configure script.
>
> Update the license information: 5.4 replaced the per-file license
> preambles with SPDX tags and a LICENSES/ directory, so tftpd/tftpd.c no
> longer contains any license text. Both binaries are built from a mix of
> BSD-4-Clause-UC and BSD-3-Clause files.
>
> Add a patch for the only build failure in 5.4: tftpd/path.h uses bool
> without including <stdbool.h>, which requires a C23 compiler.
>
> Fixes: d4a84e61615553ff678d3c3b52ed33f898e9fcc9
When you say it fixes this commit, is it because of the regression
you're mentioning in the commit log?
Minor: when providing a fixes tag referring to a commit, also put the
commit title:
Fixes: <hash> ("<title>")
because here I was wondering whether
d4a84e61615553ff678d3c3b52ed33f898e9fcc9 was a Buildroot commit
reference or an autobuilder failure reference.
> diff --git a/package/tftpd/0001-tftpd-path.h-add-missing-stdbool.h-include.patch b/package/tftpd/0001-tftpd-path.h-add-missing-stdbool.h-include.patch
> new file mode 100644
> index 0000000000..5995ecd937
> --- /dev/null
> +++ b/package/tftpd/0001-tftpd-path.h-add-missing-stdbool.h-include.patch
> @@ -0,0 +1,39 @@
> +From: Nathan Bloch <nblochn@gmail.com>
> +Date: Wed, 20 Aug 2026 12:00:00 +0300
> +Subject: [PATCH] tftpd/path.h: add missing <stdbool.h> include
> +
> +path.h declares parse_path() with a bool parameter, and both of its
> +users, path.c and tftpd.c, use bool without including <stdbool.h>
> +themselves. That only compiles where bool is a keyword, i.e. C23, so
> +the build fails with any compiler defaulting to C17 or older:
> +
> + path.h:7:43: error: unknown type name 'bool'
> + path.c:55:33: error: 'true' undeclared (first use in this function)
> + tftpd.c:391:5: error: unknown type name 'bool'
> +
> +gcc defaults to gnu17 up to and including 14.x, so 5.4 does not build
> +with any of them.
> +
> +Include <stdbool.h> from path.h, the header declaring the bool-taking
> +prototype, which both users already include.
> +
> +Upstream: not submitted yet, upstream master is affected as well.
Patches should be submitted upstream first. Turns out that I guess
this issue was fixed upstream by commit
8694c57ac439db5e776ecac6ca92333dd0bf3285, which took a different
approach than your patch.
Also, not your fault but since your patch, upstream has released 6.0
and 6.1 (but that's not why I didn't apply your patch, it's really
because the patch had not been submitted upstream).
Could you spin a v2?
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] 2+ messages in thread
end of thread, other threads:[~2026-09-18 20:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-20 12:35 [Buildroot] [PATCH] package/tftpd: bump to version 5.4 Nathan Bloch
2026-09-18 20:02 ` 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