svn commit: r548682 - in head/ftp/tftp-hpa: . files
Brooks Davis
brooks at FreeBSD.org
Mon Sep 14 20:34:22 UTC 2020
Author: brooks
Date: Mon Sep 14 20:34:21 2020
New Revision: 548682
URL: https://svnweb.freebsd.org/changeset/ports/548682
Log:
Fix build with clang 11/gcc 10.
Add LICENSE. Pet portlint. Reduce REINPLACE_CMD use.
Drop maintainership, I don't this anymore.
Added:
head/ftp/tftp-hpa/files/patch-tftp_tftp.c (contents, props changed)
head/ftp/tftp-hpa/files/patch-tftpd_tftpd.c (contents, props changed)
Modified:
head/ftp/tftp-hpa/Makefile
Modified: head/ftp/tftp-hpa/Makefile
==============================================================================
--- head/ftp/tftp-hpa/Makefile Mon Sep 14 19:59:30 2020 (r548681)
+++ head/ftp/tftp-hpa/Makefile Mon Sep 14 20:34:21 2020 (r548682)
@@ -2,18 +2,21 @@
PORTNAME= tftp-hpa
PORTVERSION= 5.2
+PORTREVISION= 1
CATEGORIES= ftp
MASTER_SITES= KERNEL_ORG/software/network/tftp/tftp-hpa
-MAINTAINER= brooks at FreeBSD.org
+MAINTAINER= ports at FreeBSD.org
COMMENT= Advanced TFTP server
-OPTIONS_DEFINE= DOCS
+LICENSE= BSD4CLAUSE
-GNU_CONFIGURE= yes
USES= gmake tar:xz
+GNU_CONFIGURE= yes
USE_RC_SUBR= tftpd
+OPTIONS_DEFINE= DOCS
+
DESTDIRNAME= INSTALLROOT
PLIST_FILES= bin/tftp \
@@ -30,14 +33,11 @@ post-patch:
${WRKSRC}/MCONFIG.in
@${REINPLACE_CMD} -e 's,SBINDIR,LIBEXECDIR,g' \
${WRKSRC}/tftpd/Makefile
- @${REINPLACE_CMD} -e 's,LOG_DAEMON,LOG_FTP,g' \
- -e 's,openlog(,tzset();openlog(,g' \
- ${WRKSRC}/tftpd/tftpd.c
post-install:
- @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
.for docfile in ${PORTDOCS}
- @${INSTALL_DATA} ${WRKSRC}/${docfile} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/${docfile} ${STAGEDIR}${DOCSDIR}
.endfor
.include <bsd.port.mk>
Added: head/ftp/tftp-hpa/files/patch-tftp_tftp.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/ftp/tftp-hpa/files/patch-tftp_tftp.c Mon Sep 14 20:34:21 2020 (r548682)
@@ -0,0 +1,11 @@
+--- tftp/tftp.c.orig 2011-12-11 22:13:52 UTC
++++ 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 *);
Added: head/ftp/tftp-hpa/files/patch-tftpd_tftpd.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/ftp/tftp-hpa/files/patch-tftpd_tftpd.c Mon Sep 14 20:34:21 2020 (r548682)
@@ -0,0 +1,31 @@
+--- tftpd/tftpd.c.orig 2011-12-11 22:13:52 UTC
++++ 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;
++extern const char *__progname;
+ static int peer;
+ static unsigned long timeout = TIMEOUT; /* Current timeout value */
+ static unsigned long rexmtval = TIMEOUT; /* Basic timeout value */
+@@ -389,7 +389,8 @@ int main(int argc, char **argv)
+ p = strrchr(argv[0], '/');
+ __progname = (p && p[1]) ? p + 1 : argv[0];
+
+- openlog(__progname, LOG_PID | LOG_NDELAY, LOG_DAEMON);
++ tzset();
++ openlog(__progname, LOG_PID | LOG_NDELAY, LOG_FTP);
+
+ srand(time(NULL) ^ getpid());
+
+@@ -938,7 +939,8 @@ 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);
++ tzset();
++ openlog(__progname, LOG_PID | LOG_NDELAY, LOG_FTP);
+ }
+
+ #ifdef HAVE_TCPWRAPPERS
More information about the svn-ports-head
mailing list