tftp-hpa: upgrade 5.2 -> 5.3
PATCH 1/1 tftp-hpa: upgrade 5.2 -> 5.3
* Use git instead of tarball in SRC_URI.
* Update configuration options.
* Clean up and refresh local patches.
Signed-off-by Yi Zhao <[email protected]>
---
.../0001-__progname-is-provided-by-libc.patch | 64 -----------------
...Mark-toplevel-definition-as-external.patch | 30 --------
...-Remove-double-inclusion-of-signal.h.patch | 39 -----------
.../add-error-check-for-disk-filled-up.patch | 18 ++---
.../files/fix-writing-emtpy-file.patch | 13 ++--
.../tftp-hpa/files/tftp-0.40-remap.patch | 2 +-
.../tftp-hpa/files/tftp-0.42-tftpboot.patch | 2 +-
.../files/tftp-0.49-chk_retcodes.patch | 2 +-
.../tftp-hpa/files/tftp-hpa-0.39-tzfix.patch | 2 +-
.../tftp-hpa-0.49-fortify-strcpy-crash.patch | 2 +-
.../tftp-hpa/files/tftp-hpa-0.49-stats.patch | 2 +-
.../tftp-hpa/files/tftp-hpa-5.2-pktinfo.patch | 29 --------
...d_arg.patch => tftp-hpa-5.3-cmd_arg.patch} | 35 ++++------
.../tftp-hpa/files/tftp-hpa-5.3-pktinfo.patch | 29 ++++++++
...p-hpa-bug-fix-on-separated-CR-and-LF.patch | 4 +-
.../tftp-hpa/files/tftp-xinetd | 18 -----
.../{tftp-hpa_5.2.bb => tftp-hpa_5.3.bb} | 70 +++++++++----------
17 files changed, 101 insertions(+), 260 deletions(-)
delete mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/0001-__progname-is-provided-by-libc.patch
delete mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/0001-tftp-Mark-toplevel-definition-as-external.patch
delete mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/0001-tftp-Remove-double-inclusion-of-signal.h.patch
delete mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-5.2-pktinfo.patch
rename meta-networking/recipes-daemons/tftp-hpa/files/{tftp-0.49-cmd_arg.patch => tftp-hpa-5.3-cmd_arg.patch} (74%)
create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-5.3-pktinfo.patch
delete mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftp-xinetd
rename meta-networking/recipes-daemons/tftp-hpa/{tftp-hpa_5.2.bb => tftp-hpa_5.3.bb} (58%)meta-networking/recipes-daemons/tftp-hpa/files/0001-__progname-is-provided-by-libc.patch deleted +0 -64
@@ -1,64 +0,0 @@ -From 941038fc05be21202cab7a7a9434097fb55ecbe0 Mon Sep 17 00:00:00 2001 -From: Thorsten Glaser <[email protected]> -Date: Thu, 31 Jul 2014 16:29:41 +0930 -Subject: [PATCH] __progname[] is provided by libc - -Rename local variable to tftpd_progname to avoid a clash with glibc -global symbols and work around Debian bug #519006 (Closes: #564052). - -[ hpa: specifically, double-underscore symbols in C are reserved for - the implementation, i.e. compiler/libc. ] - -Signed-off-by: Ron Lee <[email protected]> -Signed-off-by: H. Peter Anvin <[email protected]> ---- -Upstream-Status: Pending - - tftpd/tftpd.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/tftpd/tftpd.c b/tftpd/tftpd.c -index e247b97..5fec7bf 100644 ---- a/tftpd/tftpd.c -+++ b/tftpd/tftpd.c -@@ -76,7 +76,7 @@ static int ai_fam = AF_INET; - #define TRIES 6 /* Number of attempts to send each packet */ - #define TIMEOUT_LIMIT ((1 << TRIES)-1) - --const char *__progname; -+const char *tftpd_progname; - static int peer; - static unsigned long timeout = TIMEOUT; /* Current timeout value */ - static unsigned long rexmtval = TIMEOUT; /* Basic timeout value */ -@@ -395,9 +395,9 @@ int main(int argc, char **argv) - /* basename() is way too much of a pain from a portability standpoint */ - - p = strrchr(argv[0], '/'); -- __progname = (p && p[1]) ? p + 1 : argv[0]; -+ tftpd_progname = (p && p[1]) ? p + 1 : argv[0]; - -- openlog(__progname, LOG_PID | LOG_NDELAY, LOG_DAEMON); -+ openlog(tftpd_progname, LOG_PID | LOG_NDELAY, LOG_DAEMON); - - srand(time(NULL) ^ getpid()); - -@@ -946,14 +946,14 @@ int main(int argc, char **argv) - syslog daemon gets restarted by the time we get here. */ - if (secure && standalone) { - closelog(); -- openlog(__progname, LOG_PID | LOG_NDELAY, LOG_DAEMON); -+ openlog(tftpd_progname, LOG_PID | LOG_NDELAY, LOG_DAEMON); - } - - #ifdef HAVE_TCPWRAPPERS - /* Verify if this was a legal request for us. This has to be - done before the chroot, while /etc is still accessible. */ - request_init(&wrap_request, -- RQ_DAEMON, __progname, -+ RQ_DAEMON, tftpd_progname, - RQ_FILE, fd, - RQ_CLIENT_SIN, &from, RQ_SERVER_SIN, &myaddr, 0); - sock_methods(&wrap_request); --- -2.14.1 -
meta-networking/recipes-daemons/tftp-hpa/files/0001-tftp-Mark-toplevel-definition-as-external.patch deleted +0 -30
@@ -1,30 +0,0 @@ -From 2a12174a5059e84d4ff6fad8f983a4d0f2127e73 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Wed, 12 Aug 2020 12:17:31 -0700 -Subject: [PATCH] tftp: Mark toplevel definition as external - -Fixes -multiple definition of `toplevel'; tftp.o:/usr/src/debug/tftp-hpa/5.2-r0/tftp-hpa-5.2/tftp/tftp.c:51: first defined here - -Upstream-Status: Pending -Signed-off-by: Khem Raj <[email protected]> ---- - tftp/tftp.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tftp/tftp.c b/tftp/tftp.c -index 9d15022..109848c 100644 ---- a/tftp/tftp.c -+++ b/tftp/tftp.c -@@ -48,7 +48,7 @@ extern int maxtimeout; - #define PKTSIZE SEGSIZE+4 - char ackbuf[PKTSIZE]; - int timeout; --sigjmp_buf toplevel; -+extern sigjmp_buf toplevel; - sigjmp_buf timeoutbuf; - - static void nak(int, const char *); --- -2.28.0 -
meta-networking/recipes-daemons/tftp-hpa/files/0001-tftp-Remove-double-inclusion-of-signal.h.patch deleted +0 -39
@@ -1,39 +0,0 @@ -From e9ed48d91642d384ce07cbb9bec788f07fc6354c Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Tue, 6 Sep 2022 14:51:42 -0700 -Subject: [PATCH] tftp: Remove double inclusion of signal.h - -Undefine __USE_XOPEN2K8 so we can get bsd_signal definition from system -headers - -Upstream-Status: Pending -Signed-off-by: Khem Raj <[email protected]> ---- - config.h | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/config.h b/config.h -index 3ff2915..ae1a14b 100644 ---- a/config.h -+++ b/config.h -@@ -93,7 +93,6 @@ - #endif - - #include <errno.h> --#include <signal.h> - - #ifdef HAVE_SYS_SOCKET_H - #include <sys/socket.h> -@@ -296,6 +295,9 @@ char *xstrdup(const char *); - - #ifndef HAVE_BSD_SIGNAL - void (*bsd_signal(int, void (*)(int))) (int); -+#else -+#undef __USE_XOPEN2K8 -+#include <signal.h> - #endif - #ifndef HAVE_DUP2 - int dup2(int, int); --- -2.37.3 -
meta-networking/recipes-daemons/tftp-hpa/files/add-error-check-for-disk-filled-up.patch +9 -9
@@ -1,19 +1,19 @@ -From bd5773947af5ca80ca546ad5625818fc912bdd60 Mon Sep 17 00:00:00 2001 +From 0b89c5bd9723ebd5207590016a14e5f2c6a0bdc9 Mon Sep 17 00:00:00 2001 From: "Roy.Li" <[email protected]> Date: Thu, 22 Aug 2013 08:56:09 +0800 Subject: [PATCH] tftp-hpa: add error check for disk filled up -Upstream-Status: Pending [Sent to http://www.syslinux.org/archives/2013-August/020765.html] - Add error check when the write-buffer is finally flushed to the file, the caller can detect if the disk filled up (or had an i/o error) and return a NOSAPCE nak to the other side. +Upstream-Status: Pending [Sent to http://www.syslinux.org/archives/2013-August/020765.html] + Signed-off-by: Ming Liu <[email protected]> Signed-off-by: Roy.Li <[email protected]> --- - common/tftpsubs.c | 8 +++++--- - tftpd/tftpd.c | 12 ++++++++++-- + common/tftpsubs.c | 8 +++++--- + tftpd/tftpd.c | 12 ++++++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/common/tftpsubs.c b/common/tftpsubs.c
@@ -47,10 +47,10 @@ index 8c999f6..b4d4ffe 100644 /* When an error has occurred, it is possible that the two sides diff --git a/tftpd/tftpd.c b/tftpd/tftpd.c -index 1873e70..c2adbda 100644 +index 3158c6d..001237b 100644 --- a/tftpd/tftpd.c +++ b/tftpd/tftpd.c -@@ -1681,7 +1681,11 @@ static void tftp_recvfile(const struct formats *pf, struct tftphdr *oap, int oac +@@ -1690,7 +1690,11 @@ static void tftp_recvfile(const struct formats *pf, struct tftphdr *oap, int oac syslog(LOG_WARNING, "tftpd: write(ack): %m"); goto abort; }
@@ -63,7 +63,7 @@ index 1873e70..c2adbda 100644 for (;;) { n = recv_time(peer, dp, PKTSIZE, 0, &r_timeout); if (n < 0) { /* really? */ -@@ -1712,7 +1716,11 @@ static void tftp_recvfile(const struct formats *pf, struct tftphdr *oap, int oac +@@ -1721,7 +1725,11 @@ static void tftp_recvfile(const struct formats *pf, struct tftphdr *oap, int oac goto abort; } } while (size == segsize);
@@ -77,5 +77,5 @@ index 1873e70..c2adbda 100644 ap->th_opcode = htons((u_short) ACK); /* send the "final" ack */ -- -1.7.10.4 +2.34.1
meta-networking/recipes-daemons/tftp-hpa/files/fix-writing-emtpy-file.patch +8 -5
@@ -1,6 +1,7 @@ -[PATCH] fix the empty file writting - -Upstream-Status: Pending +From 1ce974f1cf6afbc528c941a8cdf0817a3fd7c5a7 Mon Sep 17 00:00:00 2001 +From: "Roy.Li" <[email protected]> +Date: Mon, 30 Mar 2026 22:37:22 +0800 +Subject: [PATCH] fix the empty file writting With the feature that checking the disk filled up, the return value of function write_behind was checked and used to detect
@@ -11,13 +12,15 @@ error was miss-raised. make write_behind to return 0 if written file is empty, to fix the this bug. +Upstream-Status: Pending + Signed-off-by: Roy.Li <[email protected]> --- common/tftpsubs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/tftpsubs.c b/common/tftpsubs.c -index b4ea3f2..9f6cafc 100644 +index b4ea3f2..30e749a 100644 --- a/common/tftpsubs.c +++ b/common/tftpsubs.c @@ -198,9 +198,12 @@ int write_behind(FILE * file, int convert)
@@ -35,5 +38,5 @@ index b4ea3f2..9f6cafc 100644 return write(fileno(file), buf, count); -- -1.9.1 +2.34.1
meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.40-remap.patch +1 -1
@@ -1,6 +1,6 @@ Patch originally from Fedora -http://pkgs.fedoraproject.org/cgit/tftp.git/ +https://src.fedoraproject.org/rpms/tftp.git Upstream-Status: Pending
meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.42-tftpboot.patch +1 -1
@@ -1,6 +1,6 @@ Patch originally from Fedora -http://pkgs.fedoraproject.org/cgit/tftp.git/ +https://src.fedoraproject.org/rpms/tftp.git Upstream-Status: Pending
meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-chk_retcodes.patch +1 -1
@@ -1,6 +1,6 @@ Patch originally from Fedora -http://pkgs.fedoraproject.org/cgit/tftp.git/ +https://src.fedoraproject.org/rpms/tftp.git Upstream-Status: Pending
meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.39-tzfix.patch +1 -1
@@ -1,6 +1,6 @@ Patch originally from Fedora -http://pkgs.fedoraproject.org/cgit/tftp.git/ +https://src.fedoraproject.org/rpms/tftp.git Upstream-Status: Pending
meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-fortify-strcpy-crash.patch +1 -1
@@ -1,6 +1,6 @@ Patch originally from Fedora -http://pkgs.fedoraproject.org/cgit/tftp.git/ +https://src.fedoraproject.org/rpms/tftp.git Upstream-Status: Pending
meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-stats.patch +1 -1
@@ -1,6 +1,6 @@ Patch originally from Fedora -http://pkgs.fedoraproject.org/cgit/tftp.git/ +https://src.fedoraproject.org/rpms/tftp.git Upstream-Status: Pending
meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-5.2-pktinfo.patch deleted +0 -29
@@ -1,29 +0,0 @@ -Patch originally from Fedora - -http://pkgs.fedoraproject.org/cgit/tftp.git/ - -Upstream-Status: Pending - -diff -up tftp-hpa-5.2/tftpd/recvfrom.c.test tftp-hpa-5.2/tftpd/recvfrom.c ---- tftp-hpa-5.2/tftpd/recvfrom.c.test 2011-12-11 23:13:52.000000000 +0100 -+++ tftp-hpa-5.2/tftpd/recvfrom.c 2012-01-04 10:05:17.852042256 +0100 -@@ -149,16 +149,16 @@ myrecvfrom(int s, void *buf, int len, un - - /* Try to enable getting the return address */ - #ifdef IP_RECVDSTADDR -- if (from->sa_family == AF_INET) -+ if (from->sa_family == AF_INET || !from->sa_family) - setsockopt(s, IPPROTO_IP, IP_RECVDSTADDR, &on, sizeof(on)); - #endif - #ifdef IP_PKTINFO -- if (from->sa_family == AF_INET) -+ if (from->sa_family == AF_INET || !from->sa_family) - setsockopt(s, IPPROTO_IP, IP_PKTINFO, &on, sizeof(on)); - #endif - #ifdef HAVE_IPV6 - #ifdef IPV6_RECVPKTINFO -- if (from->sa_family == AF_INET6) -+ if (from->sa_family == AF_INET6 || !from->sa_family) - setsockopt(s, IPPROTO_IPV6, IPV6_RECVPKTINFO, &on, sizeof(on)); - #endif - #endif
meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-5.3-cmd_arg.patch renamed from meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-cmd_arg.patch +12 -23
@@ -1,34 +1,23 @@ Patch originally from Fedora -http://pkgs.fedoraproject.org/cgit/tftp.git/ +https://src.fedoraproject.org/rpms/tftp.git Upstream-Status: Pending -diff -up tftp-hpa-0.49/config.h.cmd_arg tftp-hpa-0.49/config.h ---- tftp-hpa-0.49/config.h.cmd_arg 2010-04-19 15:29:10.567331454 +0200 -+++ tftp-hpa-0.49/config.h 2010-04-20 07:33:03.133232772 +0200 -@@ -291,6 +291,7 @@ typedef int socklen_t; +diff -up tftp-hpa-5.3/config.h.cmd_arg tftp-hpa-5.3/config.h +--- tftp-hpa-5.3/config.h.cmd_arg 2024-05-30 00:40:13.000000000 +0200 ++++ tftp-hpa-5.3/config.h 2025-12-26 22:27:30.933202754 +0100 +@@ -277,6 +277,7 @@ typedef int socklen_t; /* Prototypes for libxtra functions */ void *xmalloc(size_t); +void *xrealloc(void *, size_t); char *xstrdup(const char *); - #ifndef HAVE_BSD_SIGNAL -diff -up tftp-hpa-0.49/configure.in.cmd_arg tftp-hpa-0.49/configure.in ---- tftp-hpa-0.49/configure.in.cmd_arg 2008-10-21 00:08:31.000000000 +0200 -+++ tftp-hpa-0.49/configure.in 2010-04-19 11:05:12.387340698 +0200 -@@ -152,6 +152,7 @@ OBJROOT=`pwd` - - XTRA=false - PA_SEARCH_LIBS_AND_ADD(xmalloc, iberty) -+PA_SEARCH_LIBS_AND_ADD(xrealloc, iberty) - PA_SEARCH_LIBS_AND_ADD(xstrdup, iberty) - PA_SEARCH_LIBS_AND_ADD(bsd_signal, bsd, bsdsignal) - PA_SEARCH_LIBS_AND_ADD(getopt_long, getopt, getopt_long) -diff -up tftp-hpa-0.49/lib/xrealloc.c.cmd_arg tftp-hpa-0.49/lib/xrealloc.c ---- tftp-hpa-0.49/lib/xrealloc.c.cmd_arg 2010-04-19 11:05:12.387340698 +0200 -+++ tftp-hpa-0.49/lib/xrealloc.c 2010-04-19 11:05:12.387340698 +0200 + #ifndef HAVE_SIGHANDLER_T +diff -up tftp-hpa-5.3/lib/xrealloc.c.cmd_arg tftp-hpa-5.3/lib/xrealloc.c +--- tftp-hpa-5.3/lib/xrealloc.c.cmd_arg 2025-12-26 22:19:59.751870026 +0100 ++++ tftp-hpa-5.3/lib/xrealloc.c 2025-12-26 22:19:59.751870026 +0100 @@ -0,0 +1,20 @@ +/* + * xrealloc.c
@@ -50,9 +39,9 @@ diff -up tftp-hpa-0.49/lib/xrealloc.c.cmd_arg tftp-hpa-0.49/lib/xrealloc.c + + return p; +} -diff -up tftp-hpa-0.49/tftp/main.c.cmd_arg tftp-hpa-0.49/tftp/main.c ---- tftp-hpa-0.49/tftp/main.c.cmd_arg 2008-10-21 00:08:31.000000000 +0200 -+++ tftp-hpa-0.49/tftp/main.c 2010-04-19 11:05:12.389329337 +0200 +diff -up tftp-hpa-5.3/tftp/main.c.cmd_arg tftp-hpa-5.3/tftp/main.c +--- tftp-hpa-5.3/tftp/main.c.cmd_arg 2024-05-30 00:40:13.000000000 +0200 ++++ tftp-hpa-5.3/tftp/main.c 2025-12-26 22:19:59.752870023 +0100 @@ -89,11 +89,14 @@ int connected; const struct modes *mode; #ifdef WITH_READLINE
meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-5.3-pktinfo.patch new file +29 -0
@@ -0,0 +1,29 @@ +Patch originally from Fedora + +https://src.fedoraproject.org/rpms/tftp.git + +Upstream-Status: Pending + +diff -up tftp-hpa-5.3/tftpd/recvfrom.c.pktinfo tftp-hpa-5.3/tftpd/recvfrom.c +--- tftp-hpa-5.3/tftpd/recvfrom.c.pktinfo 2024-05-30 00:40:13.000000000 +0200 ++++ tftp-hpa-5.3/tftpd/recvfrom.c 2025-12-26 22:30:37.142522362 +0100 +@@ -170,16 +170,16 @@ myrecvfrom(int s, void *buf, int len, un + + /* Try to enable getting the return address */ + #ifdef IP_RECVDSTADDR +- if (from->sa.sa_family == AF_INET) ++ if (from->sa.sa_family == AF_INET || !from->sa.sa_family) + setsockopt(s, IPPROTO_IP, IP_RECVDSTADDR, &on, sizeof(on)); + #endif + #ifdef IP_PKTINFO +- if (from->sa.sa_family == AF_INET) ++ if (from->sa.sa_family == AF_INET || !from->sa.sa_family) + setsockopt(s, IPPROTO_IP, IP_PKTINFO, &on, sizeof(on)); + #endif + #ifdef HAVE_IPV6 + #ifdef IPV6_RECVPKTINFO +- if (from->sa.sa_family == AF_INET6) ++ if (from->sa.sa_family == AF_INET6 || !from->sa.sa_family) + setsockopt(s, IPPROTO_IPV6, IPV6_RECVPKTINFO, &on, sizeof(on)); + #endif + #endif
meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-bug-fix-on-separated-CR-and-LF.patch +2 -2
@@ -1,4 +1,4 @@ -From 6ed1eb8829dee351b54e183bc42c007cb306aaa5 Mon Sep 17 00:00:00 2001 +From 2be04543d790d9ec29fa8522f07f221468ccd033 Mon Sep 17 00:00:00 2001 From: Zhang Xiao <[email protected]> Date: Wed, 11 Jun 2014 14:01:16 +0800 Subject: [PATCH] tftp-hpa: bug fix on separated CR and LF
@@ -34,5 +34,5 @@ index b4d4ffe..b4ea3f2 100644 c = *p++; /* pick up a character */ if (prevchar == '\r') { /* if prev char was cr */ -- -1.8.5.2.233.g932f7e4 +2.34.1
meta-networking/recipes-daemons/tftp-hpa/files/tftp-xinetd deleted +0 -18
@@ -1,18 +0,0 @@ -# default: off -# description: The tftp server serves files using the trivial file transfer \ -# protocol. The tftp protocol is often used to boot diskless \ -# workstations, download configuration files to network-aware printers, \ -# and to start the installation process for some operating systems. -service tftp -{ - socket_type = dgram - protocol = udp - wait = yes - user = root - server = /usr/sbin/in.tftpd-hpa - server_args = -s /var/lib/tftpboot - disable = yes - per_source = 11 - cps = 100 2 - flags = IPv6 -}
meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.3.bb renamed from meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb +35 -35
113 lines not on this page · raw message
Signature · 1 line
2.34.1