summaryrefslogtreecommitdiff
path: root/openwrt
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2005-05-15 20:39:09 +0000
committerNicolas Thill <nico@openwrt.org>2005-05-15 20:39:09 +0000
commita5e6715d30c38f5bbecd0536e2730a9f822cb71b (patch)
tree014346b1a8a0ae8cdb3a51cdd97df3a7e61bffd6 /openwrt
parentc6e5fd9193d6d28bc16a455d6a1c005a5a771627 (diff)
downloadmtk-20170518-a5e6715d30c38f5bbecd0536e2730a9f822cb71b.zip
mtk-20170518-a5e6715d30c38f5bbecd0536e2730a9f822cb71b.tar.gz
mtk-20170518-a5e6715d30c38f5bbecd0536e2730a9f822cb71b.tar.bz2
Add vsftpd package
SVN-Revision: 913
Diffstat (limited to 'openwrt')
-rw-r--r--openwrt/package/Config.in1
-rw-r--r--openwrt/package/Makefile1
-rw-r--r--openwrt/package/vsftpd/Config.in8
-rw-r--r--openwrt/package/vsftpd/Makefile42
-rw-r--r--openwrt/package/vsftpd/files/vsftpd.conf17
-rw-r--r--openwrt/package/vsftpd/files/vsftpd.init15
-rw-r--r--openwrt/package/vsftpd/ipkg/vsftpd.conffiles1
-rw-r--r--openwrt/package/vsftpd/ipkg/vsftpd.control8
-rw-r--r--openwrt/package/vsftpd/patches/chroot.patch12
-rw-r--r--openwrt/package/vsftpd/patches/destdir.patch48
-rw-r--r--openwrt/package/vsftpd/patches/find-libs.patch14
11 files changed, 167 insertions, 0 deletions
diff --git a/openwrt/package/Config.in b/openwrt/package/Config.in
index 55a536d..5ffa293 100644
--- a/openwrt/package/Config.in
+++ b/openwrt/package/Config.in
@@ -67,6 +67,7 @@ source "package/siproxd/Config.in"
source "package/sipsak/Config.in"
source "package/htpdate/Config.in"
source "package/howl/Config.in"
+source "package/vsftpd/Config.in"
source "package/xinetd/Config.in"
comment "Libraries"
diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile
index b6f5f80..8e8677e 100644
--- a/openwrt/package/Makefile
+++ b/openwrt/package/Makefile
@@ -89,6 +89,7 @@ package-$(BR2_PACKAGE_SIPSAK) += sipsak
package-$(BR2_PACKAGE_HTPDATE) += htpdate
package-$(BR2_PACKAGE_HOWL) += howl
package-$(BR2_PACKAGE_OSIRISD) += osiris
+package-$(BR2_PACKAGE_VSFTPD) += vsftpd
package-$(BR2_PACKAGE_XINETD) += xinetd
DEV_LIBS:=tcp_wrappers glib ncurses openssl pcre popt zlib libnet libpcap mysql postgresql iptables matrixssl lzo gmp fuse portmap libelf uclibc++ speex libpng libgd
diff --git a/openwrt/package/vsftpd/Config.in b/openwrt/package/vsftpd/Config.in
new file mode 100644
index 0000000..5f708f0
--- /dev/null
+++ b/openwrt/package/vsftpd/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_VSFTPD
+ tristate "vsftpd - a fast and secure FTP server"
+ default m if CONFIG_DEVEL
+ help
+ A fast and secure FTP server
+
+ http://vsftpd.beasts.org/
+
diff --git a/openwrt/package/vsftpd/Makefile b/openwrt/package/vsftpd/Makefile
new file mode 100644
index 0000000..a8b32f1
--- /dev/null
+++ b/openwrt/package/vsftpd/Makefile
@@ -0,0 +1,42 @@
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=vsftpd
+PKG_VERSION:=1.2.2
+PKG_RELEASE:=1
+PKG_MD5SUM:=5a38e1c69062e7688fbbdae6d1196de2
+
+PKG_SOURCE_URL:=ftp://vsftpd.beasts.org/users/cevans/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_CAT:=zcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+include $(TOPDIR)/package/rules.mk
+
+$(eval $(call PKG_template,VSFTPD,vsftpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+
+$(PKG_BUILD_DIR)/.configured:
+ touch $(PKG_BUILD_DIR)/.configured
+
+$(PKG_BUILD_DIR)/.built:
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)"
+ mkdir -p $(PKG_INSTALL_DIR)
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ DESTDIR="$(PKG_INSTALL_DIR)" \
+ install
+ touch $(PKG_BUILD_DIR)/.built
+
+$(IPKG_VSFTPD):
+ install -d -m0755 $(IDIR_VSFTPD)/etc
+ install -m0644 ./files/vsftpd.conf $(IDIR_VSFTPD)/etc/vsftpd.conf
+ install -d -m0755 $(IDIR_VSFTPD)/etc/init.d
+ install -m0755 ./files/vsftpd.init $(IDIR_VSFTPD)/etc/init.d/vsftpd
+ install -d -m0755 $(IDIR_VSFTPD)/usr/sbin
+ cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/vsftpd $(IDIR_VSFTPD)/usr/sbin/
+ $(RSTRIP) $(IDIR_VSFTPD)
+ $(IPKG_BUILD) $(IDIR_VSFTPD) $(PACKAGE_DIR)
diff --git a/openwrt/package/vsftpd/files/vsftpd.conf b/openwrt/package/vsftpd/files/vsftpd.conf
new file mode 100644
index 0000000..f3ba34f
--- /dev/null
+++ b/openwrt/package/vsftpd/files/vsftpd.conf
@@ -0,0 +1,17 @@
+background=YES
+listen=YES
+anonymous_enable=NO
+local_enable=YES
+write_enable=YES
+local_umask=022
+check_shell=NO
+#dirmessage_enable=YES
+#ftpd_banner=Welcome to blah FTP service.
+session_support=NO
+#syslog_enable=YES
+#userlist_enable=YES
+#userlist_deny=NO
+#userlist_file=/etc/vsftpd.users
+#xferlog_enable=YES
+#xferlog_file=/var/log/vsftpd.log
+#xferlog_std_format=YES
diff --git a/openwrt/package/vsftpd/files/vsftpd.init b/openwrt/package/vsftpd/files/vsftpd.init
new file mode 100644
index 0000000..4d4f4f2
--- /dev/null
+++ b/openwrt/package/vsftpd/files/vsftpd.init
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+RUN_D=/var/run/vsftpd
+
+case $1 in
+ start)
+ [ -d $RUN_D ] || mkdir -p $RUN_D
+ vsftpd
+ ;;
+ *)
+ echo "usage: $0 (start)"
+ exit 1
+esac
+
+exit $?
diff --git a/openwrt/package/vsftpd/ipkg/vsftpd.conffiles b/openwrt/package/vsftpd/ipkg/vsftpd.conffiles
new file mode 100644
index 0000000..45632cf
--- /dev/null
+++ b/openwrt/package/vsftpd/ipkg/vsftpd.conffiles
@@ -0,0 +1 @@
+/etc/vsftpd.conf
diff --git a/openwrt/package/vsftpd/ipkg/vsftpd.control b/openwrt/package/vsftpd/ipkg/vsftpd.control
new file mode 100644
index 0000000..2c301f5
--- /dev/null
+++ b/openwrt/package/vsftpd/ipkg/vsftpd.control
@@ -0,0 +1,8 @@
+Package: vsftpd
+Priority: optional
+Section: net
+Version: [TBDL]
+Architecture: [TBDL]
+Maintainer: Nico <nthill@free.fr>
+Source: http://nthill.free.fr/openwrt/sources/vsftpd/
+Description: a fast and secure FTP server
diff --git a/openwrt/package/vsftpd/patches/chroot.patch b/openwrt/package/vsftpd/patches/chroot.patch
new file mode 100644
index 0000000..4c25736
--- /dev/null
+++ b/openwrt/package/vsftpd/patches/chroot.patch
@@ -0,0 +1,12 @@
+diff -ruN vsftpd-1.2.2-orig/tunables.c vsftpd-1.2.2-3/tunables.c
+--- vsftpd-1.2.2-orig/tunables.c 2004-04-20 02:25:05.000000000 +0200
++++ vsftpd-1.2.2-3/tunables.c 2005-03-09 21:12:35.000000000 +0100
+@@ -78,7 +78,7 @@
+ unsigned int tunable_max_per_ip = 0;
+ unsigned int tunable_trans_chunk_size = 0;
+
+-const char* tunable_secure_chroot_dir = "/usr/share/empty";
++const char* tunable_secure_chroot_dir = "/var/run/vsftpd";
+ const char* tunable_ftp_username = "ftp";
+ const char* tunable_chown_username = "root";
+ const char* tunable_xferlog_file = "/var/log/xferlog";
diff --git a/openwrt/package/vsftpd/patches/destdir.patch b/openwrt/package/vsftpd/patches/destdir.patch
new file mode 100644
index 0000000..c4fb40f
--- /dev/null
+++ b/openwrt/package/vsftpd/patches/destdir.patch
@@ -0,0 +1,48 @@
+diff -ruN vsftpd-1.2.2-orig/Makefile vsftpd-1.2.2-3/Makefile
+--- vsftpd-1.2.2-orig/Makefile 2003-09-15 13:41:58.000000000 +0200
++++ vsftpd-1.2.2-3/Makefile 2005-03-09 22:23:12.000000000 +0100
+@@ -16,6 +16,8 @@
+ tcpwrap.o ipv6parse.o access.o \
+ sysutil.o sysdeputil.o
+
++DESTDIR =
++
+ .c.o:
+ $(CC) -c $*.c $(CFLAGS) $(IFLAGS)
+
+@@ -23,21 +25,20 @@
+ $(CC) -o vsftpd $(OBJS) $(LINK) $(LIBS)
+
+ install:
+- if [ -x /usr/local/sbin ]; then \
+- $(INSTALL) -m 755 vsftpd /usr/local/sbin/vsftpd; \
+- else \
+- $(INSTALL) -m 755 vsftpd /usr/sbin/vsftpd; fi
+- if [ -x /usr/local/man ]; then \
+- $(INSTALL) -m 644 vsftpd.8 /usr/local/man/man8/vsftpd.8; \
+- $(INSTALL) -m 644 vsftpd.conf.5 /usr/local/man/man5/vsftpd.conf.5; \
+- elif [ -x /usr/share/man ]; then \
+- $(INSTALL) -m 644 vsftpd.8 /usr/share/man/man8/vsftpd.8; \
+- $(INSTALL) -m 644 vsftpd.conf.5 /usr/share/man/man5/vsftpd.conf.5; \
+- else \
+- $(INSTALL) -m 644 vsftpd.8 /usr/man/man8/vsftpd.8; \
+- $(INSTALL) -m 644 vsftpd.conf.5 /usr/man/man5/vsftpd.conf.5; fi
+- if [ -x /etc/xinetd.d ]; then \
+- $(INSTALL) -m 644 xinetd.d/vsftpd /etc/xinetd.d/vsftpd; fi
++ mkdir -p $(DESTDIR)/usr/sbin
++ $(INSTALL) -m 755 vsftpd $(DESTDIR)/usr/sbin/
++ mkdir -p $(DESTDIR)/usr/share/man/man8
++ $(INSTALL) -m 644 vsftpd.8 $(DESTDIR)/usr/share/man/man8/
++ mkdir -p $(DESTDIR)/usr/share/man/man5
++ $(INSTALL) -m 644 vsftpd.conf.5 $(DESTDIR)/usr/share/man/man5/
++ mkdir -p $(DESTDIR)/etc/xinetd.d
++ $(INSTALL) -m 644 xinetd.d/vsftpd $(DESTDIR)/etc/xinetd.d/
++
++uninstall:
++ rm -f $(DESTDIR)/usr/sbin/vsftpd
++ rm -f $(DESTDIR)/usr/share/man/man8/vsftpd.8
++ rm -f $(DESTDIR)/usr/share/man/man5/vsftpd.conf.5
++ rm -f $(DESTDIR)/etc/xinetd.d/vsftpd
+
+ clean:
+ rm -f *.o *.swp vsftpd
diff --git a/openwrt/package/vsftpd/patches/find-libs.patch b/openwrt/package/vsftpd/patches/find-libs.patch
new file mode 100644
index 0000000..ae8e9f7
--- /dev/null
+++ b/openwrt/package/vsftpd/patches/find-libs.patch
@@ -0,0 +1,14 @@
+diff -ruN vsftpd-1.2.2-orig/Makefile vsftpd-1.2.2-3/Makefile
+--- vsftpd-1.2.2-orig/Makefile 2003-09-15 13:41:58.000000000 +0200
++++ vsftpd-1.2.2-3/Makefile 2005-03-09 22:23:12.000000000 +0100
+@@ -5,8 +5,8 @@
+ #CFLAGS = -g
+ CFLAGS = -O2 -Wall -W -Wshadow #-pedantic -Werror -Wconversion
+
+-LIBS = `./vsf_findlibs.sh`
+-LINK = -Wl,-s
++LIBS = -lcrypt -lnsl
++LINK =
+
+ OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \
+ tunables.o ftpdataio.o secbuf.o ls.o \