From: Nathan Bloch <nblochn@gmail.com>
To: buildroot@buildroot.org
Cc: nblochn@gmail.com
Subject: [Buildroot] [PATCH] package/tftpd: bump to version 5.4
Date: Thu, 20 Aug 2026 15:35:00 +0300 [thread overview]
Message-ID: <20260820123500.362698-1-nblochn@gmail.com> (raw)
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
reply other threads:[~2026-08-20 12:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260820123500.362698-1-nblochn@gmail.com \
--to=nblochn@gmail.com \
--cc=buildroot@buildroot.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.