ftp/tnftpd: update to 20200704

Includes fix for clang11 -fno-common issue
While here, pet linters.

PR:	248831
Submitted by:	cejkar@fit.vutbr.cz (maintainer)
MFH:	2020Q3 (build fix, fno-common)
This commit is contained in:
Fernando Apesteguía 2020-09-02 06:40:06 +00:00
parent 884765d9fd
commit 114a831ecb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=547332
8 changed files with 39 additions and 51 deletions

View File

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= tnftpd
PORTVERSION= 20130325
PORTVERSION= 20200704
CATEGORIES= ftp
MASTER_SITES= ftp://ftp.netbsd.org/pub/NetBSD/misc/tnftp/
@ -12,15 +12,18 @@ COMMENT= Enhanced FTP server from NetBSD
USES= autoreconf libtool
GNU_CONFIGURE= yes
CFLAGS+= -DSUPPORT_UTMPX
CFLAGS+= -DSUPPORT_UTMPX -fcommon
SUB_FILES= pkg-message
PLIST_FILES= libexec/tnftpd \
man/man5/ftpd.conf.5.gz man/man5/ftpusers.5.gz man/man8/tnftpd.8.gz
PORTDOCS= ChangeLog NEWS README THANKS COPYING
man/man5/ftpd.conf.5.gz \
man/man5/ftpusers.5.gz \
man/man8/tnftpd.8.gz
PORTDOCS= COPYING ChangeLog NEWS README THANKS
PORTEXAMPLES= ftpd.conf ftpusers
OPTIONS_DEFINE= DOCS EXAMPLES
SUB_FILES= pkg-message
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/tnftpd ${STAGEDIR}${PREFIX}/libexec

View File

@ -1,2 +1,3 @@
SHA256 (tnftpd-20130325.tar.gz) = 331006f0bcee593af3f4faaaf1de8db825e2aa60449be1c961916b37d562e147
SIZE (tnftpd-20130325.tar.gz) = 518350
TIMESTAMP = 1597924555
SHA256 (tnftpd-20200704.tar.gz) = 92de915e1b4b7e4bd403daac5d89ce67fa73e49e8dda18e230fa86ee98e26ab7
SIZE (tnftpd-20200704.tar.gz) = 529105

View File

@ -1,13 +0,0 @@
Fix compilation error.
--- configure.ac.orig 2013-03-25 04:52:48.000000000 +0100
+++ configure.ac 2013-03-25 17:03:53.000000000 +0100
@@ -22,6 +22,8 @@
AM_INIT_AUTOMAKE([-Wall -Werror foreign nostdinc silent-rules])
AM_MAINTAINER_MODE()
+AM_PROG_AR()
+
LT_PREREQ([2.4])
LT_INIT()

View File

@ -1,25 +1,23 @@
FreeBSD does have support for utmp/utmpx, so include relevant files into
a build.
--- src/Makefile.am.orig 2010-01-04 06:46:29.000000000 +0100
+++ src/Makefile.am 2010-01-04 06:46:29.000000000 +0100
@@ -7,7 +7,9 @@
conf.c \
--- src/Makefile.am.orig 2019-01-29 12:51:38 UTC
+++ src/Makefile.am
@@ -8,7 +8,9 @@ tnftpd_SOURCES = \
ftpd.c \
ftpcmd.y \
pfilter.c \
- popen.c
+ popen.c \
+ logutmp.c \
+ logwtmp.c
AM_CPPFLAGS = \
-DHAVE_TNFTPD_H=1 \
@@ -45,8 +47,6 @@
noinst_HEADERS = \
extern.h \
@@ -51,6 +53,4 @@ seddotin = \
EXTRA_DIST = \
ftpd.conf.manin \
ftpusers.manin \
- logutmp.c \
- logwtmp.c \
pathnames.h \
tnftpd.manin \
version.h
tnftpd.manin

View File

@ -1,9 +1,9 @@
Rewrite utmpx support.
--- src/ftpd.c.orig 2009-11-07 04:26:48.000000000 +0100
+++ src/ftpd.c 2009-11-07 04:26:48.000000000 +0100
@@ -504,9 +504,6 @@
confdir = _DEFAULT_CONFDIR;
--- src/ftpd.c.orig 2020-07-04 04:02:07 UTC
+++ src/ftpd.c
@@ -514,9 +514,6 @@ main(int argc, char *argv[])
pfilter_open();
if (dowtmp) {
-#ifdef SUPPORT_UTMPX
@ -12,7 +12,7 @@ Rewrite utmpx support.
#ifdef SUPPORT_UTMP
ftpd_initwtmp();
#endif
@@ -1320,23 +1317,18 @@
@@ -1336,23 +1333,18 @@ login_utmp(const char *line, const char *name, const c
(void)gettimeofday(&tv, NULL);
#endif
#ifdef SUPPORT_UTMPX
@ -41,7 +41,7 @@ Rewrite utmpx support.
#endif
#ifdef SUPPORT_UTMP
if (doutmp) {
@@ -1356,17 +1348,23 @@
@@ -1372,17 +1364,23 @@ static void
logout_utmp(void)
{
#ifdef SUPPORT_UTMPX

View File

@ -1,9 +1,9 @@
FreeBSD does not have header file util.h, fortunately it is not needed.
Add header file time.h for time(). Rewrite utmpx support.
--- src/logutmp.c.orig 2008-09-21 16:44:01.000000000 +0200
+++ src/logutmp.c 2008-09-21 16:44:01.000000000 +0200
@@ -71,13 +71,15 @@
--- src/logutmp.c.orig 2013-03-21 01:02:40 UTC
+++ src/logutmp.c
@@ -71,13 +71,15 @@ __RCSID(" NetBSD: logutmp.c,v 1.12 2011/09/16 16:13:17
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -20,7 +20,7 @@ Add header file time.h for time(). Rewrite utmpx support.
#endif /* !defined(HAVE_TNFTPD_H) */
@@ -161,7 +163,7 @@
@@ -161,7 +163,7 @@ ftpd_logout(const char *line)
}
#endif /* SUPPORT_UTMP */

View File

@ -3,9 +3,9 @@ header files sys/socket.h and netdb.h for getaddrinfo() and getnameinfo().
If host name is longer than UT_HOSTSIZE (16 characters), log numeric
address to utmp. Rewrite utmpx support.
--- src/logwtmp.c.orig 2008-09-21 16:44:01.000000000 +0200
+++ src/logwtmp.c 2008-09-21 16:44:01.000000000 +0200
@@ -46,11 +46,13 @@
--- src/logwtmp.c.orig 2019-01-29 12:14:57 UTC
+++ src/logwtmp.c
@@ -46,11 +46,13 @@ __RCSID(" NetBSD: logwtmp.c,v 1.27 2015/08/09 20:34:24
#include <sys/types.h>
#include <sys/param.h>
@ -19,7 +19,7 @@ address to utmp. Rewrite utmpx support.
#include <signal.h>
#include <stdio.h>
#include <string.h>
@@ -63,7 +65,6 @@
@@ -63,7 +65,6 @@ __RCSID(" NetBSD: logwtmp.c,v 1.27 2015/08/09 20:34:24
#ifdef SUPPORT_UTMPX
#include <utmpx.h>
#endif
@ -27,7 +27,7 @@ address to utmp. Rewrite utmpx support.
#ifdef KERBEROS5
#include <krb5/krb5.h>
@@ -95,6 +96,26 @@
@@ -95,6 +96,26 @@ ftpd_logwtmp(const char *line, const char *name, const
struct utmp ut;
struct stat buf;
@ -54,7 +54,7 @@ address to utmp. Rewrite utmpx support.
if (fd < 0)
return;
if (fstat(fd, &buf) == 0) {
@@ -109,7 +130,7 @@
@@ -109,7 +130,7 @@ ftpd_logwtmp(const char *line, const char *name, const
}
#endif

View File

@ -1,8 +1,8 @@
FreeBSD does not have LOGIN_NAME_MAX, but it has MAXLOGNAME instead,
so use it as much as possible. Rewrite utmpx support.
--- tnftpd.h.orig 2009-11-07 10:59:09.000000000 +0100
+++ tnftpd.h 2009-11-07 10:59:09.000000000 +0100
--- tnftpd.h.orig 2019-01-29 13:06:14 UTC
+++ tnftpd.h
@@ -119,6 +119,8 @@
#endif
#if defined(HAVE_UTMP_H)
@ -12,7 +12,7 @@ so use it as much as possible. Rewrite utmpx support.
#endif
#if defined(HAVE_POLL)
@@ -561,8 +563,12 @@
@@ -565,7 +567,11 @@ int usleep(unsigned int);
#define TM_YEAR_BASE 1900
#if !defined(LOGIN_NAME_MAX)
@ -20,8 +20,7 @@ so use it as much as possible. Rewrite utmpx support.
+# define LOGIN_NAME_MAX MAXLOGNAME
+#else
# define LOGIN_NAME_MAX (9)
#endif
+#endif
#endif
#if !defined(_POSIX_LOGIN_NAME_MAX)
# define _POSIX_LOGIN_NAME_MAX LOGIN_NAME_MAX