From: Ron <ron at debian.org> Hi, I've just taken over maintaining the packages for this in Debian, and we've been carrying a couple of patches for a while now that really should have been forwarded since they're clearly not distro specific. I added a third one to that yesterday to fix another autoconf build 'race' seen when doing parallel builds. Cheers, Ron Daniel Baumann (1): Update manpage to match source code for --map-file Ron Lee (1): Make configure an order-only prerequisite of aconfig.h.in Thorsten Glaser (1): __progname[] is provided by libc Makefile | 8 ++++++-- tftpd/tftpd.8.in | 6 +++--- tftpd/tftpd.c | 10 +++++----- 3 files changed, 14 insertions(+), 10 deletions(-) -- 2.0.0
From: Thorsten Glaser <tg at mirbsd.de> Rename local variable to tftpd_progname to avoid a clash with glibc global symbols and work around Debian bug #519006 (Closes: #564052). Signed-off-by: Ron Lee <ron at debian.org> --- tftpd/tftpd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tftpd/tftpd.c b/tftpd/tftpd.c index 88d2812..91f5ae1 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 */ @@ -387,9 +387,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()); @@ -938,14 +938,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.0.0
Ron Lee
2014-Jul-31 06:59 UTC
[syslinux] [PATCH 2/3] Update manpage to match source code for --map-file
From: Daniel Baumann <mail at daniel-baumann.ch> Closes: #606267 in the Debian BTS Reported-By: Jim Paris <jim at jtan.com> Signed-off-by: Ron Lee <ron at debian.org> --- tftpd/tftpd.8.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tftpd/tftpd.8.in b/tftpd/tftpd.8.in index b500d27..71a712d 100644 --- a/tftpd/tftpd.8.in +++ b/tftpd/tftpd.8.in @@ -155,7 +155,7 @@ or .B utimeout option is negotiated. The default is 1000000 (1 second.) .TP -\fB\-\-mapfile\fP \fIremap-file\fP, \fB\-m\fP \fIremap-file\fP +\fB\-\-map-file\fP \fIremap-file\fP, \fB\-m\fP \fIremap-file\fP Specify the use of filename remapping. The .I remap-file is a file containing the remapping rules. See the section on filename @@ -238,7 +238,7 @@ option, but crash with an error if they actually get the option accepted by the server. .SH "FILENAME REMAPPING" The -.B \-\-mapfile +.B \-\-map-file option specifies a file which contains filename remapping rules. Each non-comment line (comments begin with hash marks, .BR # ) @@ -398,7 +398,7 @@ flag is used to set up a chroot() environment for the server to run in once a connection has been set up. .PP Finally, the filename remapping -.RB ( \-\-mapfile +.RB ( \-\-map-file flag) support can be used to provide a limited amount of additional access control. .SH "CONFORMING TO" -- 2.0.0
Ron Lee
2014-Jul-31 06:59 UTC
[syslinux] [PATCH 3/3] Make configure an order-only prerequisite of aconfig.h.in
From: Ron <ron at debian.org> On filesystems with subsecond resolution, like ext4, we can't trust the timestamp of aconfig.h.in since autoheader leaves it truncated to second resolution (apparently touch -r and cp -p can do this at the very least) while configure has full subsecond resolution, so it can look newer even when it was cleanly created first, leading to the build system looping trying to recreate all of that again ... So in the initial stage of a clean build we can get something like this: $ make spotless $ make autoconf rm -rf MCONFIG configure config.log aconfig.h *.cache autoconf rm -f aconfig.h.in aconfig.h autoheader $ stat configure aconfig.h.in File: ?configure? Device: 807h/2055d Inode: 9443466 Links: 1 Access: 2014-07-31 03:27:27.599293442 +0930 Modify: 2014-07-31 03:27:27.711290270 +0930 Change: 2014-07-31 03:27:27.711290270 +0930 File: ?aconfig.h.in? Device: 807h/2055d Inode: 9443467 Links: 1 Access: 2014-07-31 03:27:27.000000000 +0930 Modify: 2014-07-31 03:27:27.000000000 +0930 Change: 2014-07-31 03:27:27.903284841 +0930 And with a parallel build, that can then leave 'make all' racing to remove and recreate aconfig.h (and possibly more things), while it begins to build the first targets. Which then fail horribly like we see here: https://buildd.debian.org/status/fetch.php?pkg=tftp-hpa&arch=i386&ver=5.2%2B20140608-1&stamp=1406736363 Possibly we also need to move the actual build job into the rule for the 'all' target, so that the build system update prerequisites are guaranteed to be completed before it runs (as opposed to running in parallel with them), but this change might be enough for now. Signed-off-by: Ron Lee <ron at debian.org> --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9ff12d8..75a2042 100644 --- a/Makefile +++ b/Makefile @@ -58,8 +58,12 @@ aconfig.h: MCONFIG # Adding "configure" to the dependencies serializes this with running # autoconf, because there are apparently race conditions between -# autoconf and autoheader. -aconfig.h.in: configure.in configure aclocal.m4 +# autoconf and autoheader. And worse than that, even when autoconf +# cleanly returns first, autoheader will truncate the timestamp of +# aconfig.h.in to second resolution, so on a filesystem with subsecond +# resolution it can appear older than configure (which isn't truncated). +# So make it an order-only prerequisite to avoid looping regenerating it. +aconfig.h.in: configure.in aclocal.m4 | configure rm -f aconfig.h.in aconfig.h autoheader -- 2.0.0
H. Peter Anvin
2014-Jul-31 13:58 UTC
[syslinux] [PATCH 3/3] Make configure an order-only prerequisite of aconfig.h.in
On 07/30/2014 11:59 PM, Ron Lee wrote:> From: Ron <ron at debian.org> > > On filesystems with subsecond resolution, like ext4, we can't trust the > timestamp of aconfig.h.in since autoheader leaves it truncated to second > resolution (apparently touch -r and cp -p can do this at the very least) > while configure has full subsecond resolution, so it can look newer even > when it was cleanly created first, leading to the build system looping > trying to recreate all of that again ... >This sounds like coreutils bugs. -hpa
Debian converts hyphens to minus-signs by default <https://lintian.debian.org/tags/hyphen-used-as-minus-sign.html>. If this is manually disabled for testing, some dashes are still wrong. Convert those remaining hyphens to minus-signs by escaping them. diff --git a/tftpd/tftpd.8.in b/tftpd/tftpd.8.in index 71a712d..fcf492c 100644 --- a/tftpd/tftpd.8.in +++ b/tftpd/tftpd.8.in @@ -155,7 +155,7 @@ or .B utimeout option is negotiated. The default is 1000000 (1 second.) .TP -\fB\-\-map-file\fP \fIremap-file\fP, \fB\-m\fP \fIremap-file\fP +\fB\-\-map\-file\fP \fIremap-file\fP, \fB\-m\fP \fIremap-file\fP Specify the use of filename remapping. The .I remap-file is a file containing the remapping rules. See the section on filename @@ -184,7 +184,7 @@ MTU on your network minus 32 bytes (20 bytes for IP, 8 for UDP, and 4 for TFTP; less if you use IP options on your network.) For example, on a standard Ethernet (MTU 1500) a value of 1468 is reasonable. .TP -\fB\-\-port-range\fP \fIport:port\fP, \fB\-R\fP \fIport:port\fP +\fB\-\-port\-range\fP \fIport:port\fP, \fB\-R\fP \fIport:port\fP Force the server port number (the Transaction ID) to be in the specified range of port numbers. .TP @@ -238,7 +238,7 @@ option, but crash with an error if they actually get the option accepted by the server. .SH "FILENAME REMAPPING" The -.B \-\-map-file +.B \-\-map\-file option specifies a file which contains filename remapping rules. Each non-comment line (comments begin with hash marks, .BR # ) @@ -398,7 +398,7 @@ flag is used to set up a chroot() environment for the server to run in once a connection has been set up. .PP Finally, the filename remapping -.RB ( \-\-map-file +.RB ( \-\-map\-file flag) support can be used to provide a limited amount of additional access control. .SH "CONFORMING TO" -- 1.9.1