Improve linkage but not using the crappy shell script from vsftpd,

which doesn't work correctly e.g. on Solaris. Make PAM optional,
but since the option is on by default, nothing changes.
Fix compilation on Solaris based on input from Stefan Pfetzing
in PR 33494.
This commit is contained in:
joerg 2006-05-16 21:08:50 +00:00
parent d4ea19b753
commit 0ad6a280a0
5 changed files with 62 additions and 15 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.22 2006/04/23 00:12:41 jlam Exp $
# $NetBSD: Makefile,v 1.23 2006/05/16 21:08:50 joerg Exp $
#
DISTNAME= vsftpd-2.0.4
@ -36,6 +36,12 @@ SUBST_FILES.paths= vsftpd.8 vsftpd.conf.5 vsftpd.conf
SUBST_SED.paths+= -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
SUBST_STAGE.paths= post-patch
MAKE_ENV+= LIBS=${LIBS:M*:Q}
.include "../../mk/bsd.prefs.mk"
LIBS.SunOS= -lsocket -lnsl -lrt -lsendfile
.include "options.mk"
do-install:

View file

@ -1,11 +1,12 @@
$NetBSD: distinfo,v 1.8 2006/01/13 18:12:46 wiz Exp $
$NetBSD: distinfo,v 1.9 2006/05/16 21:08:50 joerg Exp $
SHA1 (vsftpd-2.0.4.tar.gz) = 6ffbcc08a91300664d527b3ac7c515421d5cd764
RMD160 (vsftpd-2.0.4.tar.gz) = e8f07c125c0c3a8f0d457b47fd0062d6431c480b
Size (vsftpd-2.0.4.tar.gz) = 154857 bytes
SHA1 (patch-aa) = 7e42db098d0d2261d5f02b36f7cba4ec6d91c6a0
SHA1 (patch-aa) = 323f694874777747ce525aa9ebb5d740684ec553
SHA1 (patch-ab) = 18431ae27f53270ad4c19b0530e55348397fe143
SHA1 (patch-ac) = 49269d863fd232d1e78cda039ae1a67368acfe1e
SHA1 (patch-ad) = dd22f355216685fe0089addc5b1acf3b11490b06
SHA1 (patch-ae) = 373edb952206871b0b5c3e06fd5b90e25000f284
SHA1 (patch-af) = 895496296cfa867653f05c6f475fd5d69f21811b
SHA1 (patch-ag) = 58bae3e8f9d70031d04642dcc9d9fa2e42743d5e

View file

@ -1,8 +1,8 @@
# $NetBSD: options.mk,v 1.2 2006/01/30 18:07:06 wiz Exp $
# $NetBSD: options.mk,v 1.3 2006/05/16 21:08:50 joerg Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.vsftpd
PKG_SUPPORTED_OPTIONS= inet6 ssl tcpwrappers
PKG_SUGGESTED_OPTIONS= inet6 tcpwrappers
PKG_SUPPORTED_OPTIONS= inet6 pam ssl tcpwrappers
PKG_SUGGESTED_OPTIONS= inet6 pam tcpwrappers
.include "../../mk/bsd.options.mk"
@ -12,6 +12,18 @@ CONFIGURE_ARGS+= --enable-ipv6
BROKEN= Needs ipv6 option enabled.
.endif
.if !empty(PKG_OPTIONS:Mpam)
.include "../../mk/pam.buildlink3.mk"
LIBS+= -L${PAMBASE}
LIBS+= ${COMPILER_RPATH_FLAG}${PAMBASE}
LIBS+= -lpam
.else
SUBST_CLASSES+= pam
SUBST_FILES.pam= builddefs.h
SUBST_SED.pam+= -e 's,define VSF_BUILD_PAM,undef VSF_BUILD_PAM,g'
SUBST_STAGE.pam= pre-configure
.endif
.if !empty(PKG_OPTIONS:Mssl)
.include "../../security/openssl/buildlink3.mk"
SUBST_CLASSES+= ssl
@ -19,6 +31,10 @@ SUBST_FILES.ssl= builddefs.h
SUBST_SED.ssl+= -e 's,undef VSF_BUILD_SSL,define VSF_BUILD_SSL,g'
SUBST_SED.ssl+= -e 's,/usr/share/ssl/certs/vsftpd.pem,${SSLCERTS}/vsftpd.pem,g'
SUBST_STAGE.ssl= pre-configure
LIBS+= -L${BUILDLINK_PREFIX.openssl}
LIBS+= ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.openssl}
LIBS+= -lssl -lcrypto
.endif
.if !empty(PKG_OPTIONS:Mtcpwrappers)
@ -27,4 +43,8 @@ SUBST_CLASSES+= tcpwrappers
SUBST_FILES.tcpwrappers= builddefs.h
SUBST_SED.tcpwrappers+= -e 's,undef VSF_BUILD_TCPWRAPPERS,define VSF_BUILD_TCPWRAPPERS,g'
SUBST_STAGE.tcpwrappers= pre-configure
LIBS+= -L${BUILDLINK_PREFIX.tcp_wrappers}
LIBS+= ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.tcp_wrappers}
LIBS+= -lwrap
.endif

View file

@ -1,16 +1,17 @@
$NetBSD: patch-aa,v 1.3 2003/05/09 23:31:40 salo Exp $
$NetBSD: patch-aa,v 1.4 2006/05/16 21:08:50 joerg Exp $
--- Makefile.orig 2002-10-22 01:15:16.000000000 +0200
+++ Makefile 2003-05-09 23:46:09.000000000 +0200
@@ -1,9 +1,9 @@
--- Makefile.orig 2005-06-29 00:24:03.000000000 +0200
+++ Makefile
@@ -1,12 +1,6 @@
# Makefile for systems with GNU tools
-CC = gcc
+#CC = gcc
INSTALL = install
IFLAGS = -idirafter dummyinc
#CFLAGS = -g
-#CFLAGS = -g
-CFLAGS = -O2 -Wall -W -Wshadow #-pedantic -Werror -Wconversion
+CFLAGS += -O2 -Wall -W -Wshadow #-pedantic -Werror -Wconversion
-
-LIBS = `./vsf_findlibs.sh`
-LINK = -Wl,-s
LIBS = `./vsf_findlibs.sh`
LINK = -Wl,-s
OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \
tunables.o ftpdataio.o secbuf.o ls.o \

View file

@ -0,0 +1,19 @@
$NetBSD: patch-ag,v 1.3 2006/05/16 21:08:51 joerg Exp $
--- sysutil.c.orig 2006-01-09 18:05:18.000000000 +0100
+++ sysutil.c
@@ -2478,7 +2478,14 @@ vsf_sysutil_tzset(void)
tzset();
the_time = time(NULL);
p_tm = localtime(&the_time);
+#if defined (__SVR4) && defined (__sun)
+ if (daylight != 0)
+ s_timezone = altzone;
+ else
+ s_timezone = timezone;
+#else
s_timezone = -p_tm->tm_gmtoff;
+#endif
}
const char*