summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2004-08-27 01:22:08 +0000
committermbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2004-08-27 01:22:08 +0000
commit68b12f212b82b4d680ffef260ff3f419ae2fdc1b (patch)
tree1c025bce548db91b30e78ce2578ff00d48035444
parentf0c8400658ac5b039bb48dbb74b02f75d52b9723 (diff)
nico's buildroot-20040827-vsftpd.patch.txt
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@150 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--obsolete-buildroot/Makefile2
-rw-r--r--obsolete-buildroot/make/vsftpd.mk71
-rw-r--r--obsolete-buildroot/sources/openwrt/ipkg/vsftpd/CONTROL/conffiles1
-rw-r--r--obsolete-buildroot/sources/openwrt/ipkg/vsftpd/CONTROL/control8
-rw-r--r--obsolete-buildroot/sources/openwrt/ipkg/vsftpd/root/etc/init.d/vsftpd19
-rw-r--r--obsolete-buildroot/sources/openwrt/ipkg/vsftpd/root/etc/vsftpd.conf17
-rw-r--r--obsolete-buildroot/sources/openwrt/patches/vsftpd/vsftpd-1.2.2-openwrt.patch26
7 files changed, 143 insertions, 1 deletions
diff --git a/obsolete-buildroot/Makefile b/obsolete-buildroot/Makefile
index 71cabcb4e..f557d80ca 100644
--- a/obsolete-buildroot/Makefile
+++ b/obsolete-buildroot/Makefile
@@ -97,7 +97,7 @@ INSTALL_LIBGCJ:=false
#############################################################
TARGETS:=host-sed openwrt-code.bin
-PACKAGES:=oidentd iproute2 kmod-sched wshaper zlib openssl openssh pppoecd dropbear chillispot dhcp-fwd ip6tables kmod-ipt6 kmod-ipv6 kmod-nfs kmod-ppp-async kmod-ppp-mppe-mppc ppp pppoecd pptp-server kmod-tun fprobe libpcap libpthread pptp-client
+PACKAGES:=oidentd iproute2 kmod-sched wshaper zlib openssl openssh pppoecd dropbear chillispot dhcp-fwd ip6tables kmod-ipt6 kmod-ipv6 kmod-nfs kmod-ppp-async kmod-ppp-mppe-mppc ppp pppoecd pptp-server kmod-tun fprobe libpcap libpthread pptp-client vsftpd
#############################################################
#
diff --git a/obsolete-buildroot/make/vsftpd.mk b/obsolete-buildroot/make/vsftpd.mk
new file mode 100644
index 000000000..2fa4d1aca
--- /dev/null
+++ b/obsolete-buildroot/make/vsftpd.mk
@@ -0,0 +1,71 @@
+# vsftpd
+
+VSFTPD_VERSION:=1.2.2
+VSFTPD_RELEASE:=1
+
+VSFTPD_SOURCE:=vsftpd-$(VSFTPD_VERSION).tar.gz
+VSFTPD_SITE:=ftp://vsftpd.beasts.org/users/cevans/
+VSFTPD_DIR:=$(BUILD_DIR)/vsftpd-$(VSFTPD_VERSION)
+VSFTPD_CAT:=zcat
+
+VSFTPD_PATCH_DIR := $(SOURCE_DIR)/openwrt/patches/vsftpd
+
+VSFTPD_BUILD_DIR := $(BUILD_DIR)/vsftpd_$(VSFTPD_VERSION)-$(VSFTPD_RELEASE)
+VSFTPD_IPK_DIR := $(OPENWRT_IPK_DIR)/vsftpd
+VSFTPD_IPK := $(VSFTPD_BUILD_DIR)_$(ARCH).ipk
+
+
+$(DL_DIR)/$(VSFTPD_SOURCE):
+ $(WGET) -P $(DL_DIR) $(VSFTPD_SITE)/$(VSFTPD_SOURCE)
+
+
+$(VSFTPD_DIR)/.stamp-unpacked: $(DL_DIR)/$(VSFTPD_SOURCE)
+ $(VSFTPD_CAT) $(DL_DIR)/$(VSFTPD_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+
+ touch $(VSFTPD_DIR)/.stamp-unpacked
+
+
+$(VSFTPD_DIR)/.stamp-patched: $(VSFTPD_DIR)/.stamp-unpacked
+ $(SOURCE_DIR)/patch-kernel.sh $(VSFTPD_DIR) $(VSFTPD_PATCH_DIR)
+
+ touch $(VSFTPD_DIR)/.stamp-patched
+
+
+$(VSFTPD_DIR)/.stamp-built: $(VSFTPD_DIR)/.stamp-patched
+ cd $(VSFTPD_DIR) ; \
+ $(MAKE) \
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+
+ touch $(VSFTPD_DIR)/.stamp-built
+
+
+$(VSFTPD_BUILD_DIR): $(VSFTPD_DIR)/.stamp-built
+ mkdir -p $(VSFTPD_BUILD_DIR)
+
+ install -m0755 -d $(VSFTPD_BUILD_DIR)/usr/sbin
+ install -m0755 $(VSFTPD_DIR)/vsftpd $(VSFTPD_BUILD_DIR)/usr/sbin/
+
+ install -m0755 -d $(VSFTPD_BUILD_DIR)/etc
+ install -m0644 $(VSFTPD_IPK_DIR)/root/etc/vsftpd.conf $(VSFTPD_BUILD_DIR)/etc/
+ install -m0755 -d $(VSFTPD_BUILD_DIR)/etc/init.d
+ install -m0755 $(VSFTPD_IPK_DIR)/root/etc/init.d/vsftpd $(VSFTPD_BUILD_DIR)/etc/init.d/
+
+ $(STRIP) $(VSFTPD_BUILD_DIR)/usr/sbin/*
+
+
+$(VSFTPD_IPK): $(VSFTPD_BUILD_DIR)
+ cp -a $(VSFTPD_IPK_DIR)/CONTROL $(VSFTPD_BUILD_DIR)/
+ perl -pi -e "s/^Vers.*:.*$$/Version: $(VSFTPD_VERSION)-$(VSFTPD_RELEASE)/" $(VSFTPD_BUILD_DIR)/CONTROL/control
+ perl -pi -e "s/^Arch.*:.*$$/Architecture: $(ARCH)/" $(VSFTPD_BUILD_DIR)/CONTROL/control
+ cd $(BUILD_DIR); $(IPKG_BUILD) $(VSFTPD_BUILD_DIR)
+
+
+vsftpd-source: $(DL_DIR)/$(VSFTPD_SOURCE)
+
+vsftpd-ipk: ipkg-utils $(VSFTPD_IPK)
+
+vsftpd-clean:
+ rm -rf $(VSFTPD_DIR)
+ rm -rf $(VSFTPD_BUILD_DIR)
+ rm -rf $(VSFTPD_IPK)
diff --git a/obsolete-buildroot/sources/openwrt/ipkg/vsftpd/CONTROL/conffiles b/obsolete-buildroot/sources/openwrt/ipkg/vsftpd/CONTROL/conffiles
new file mode 100644
index 000000000..45632cf31
--- /dev/null
+++ b/obsolete-buildroot/sources/openwrt/ipkg/vsftpd/CONTROL/conffiles
@@ -0,0 +1 @@
+/etc/vsftpd.conf
diff --git a/obsolete-buildroot/sources/openwrt/ipkg/vsftpd/CONTROL/control b/obsolete-buildroot/sources/openwrt/ipkg/vsftpd/CONTROL/control
new file mode 100644
index 000000000..28b8ced61
--- /dev/null
+++ b/obsolete-buildroot/sources/openwrt/ipkg/vsftpd/CONTROL/control
@@ -0,0 +1,8 @@
+Package: vsftpd
+Priority: optional
+Section: net
+Version: TBDL
+Architecture: TBDL
+Maintainer: Nico <nthill@free.fr>
+Source: http://openwrt.org/cgi-bin/viewcvs.cgi/buildroot/
+Description: a fast and secure FTP server
diff --git a/obsolete-buildroot/sources/openwrt/ipkg/vsftpd/root/etc/init.d/vsftpd b/obsolete-buildroot/sources/openwrt/ipkg/vsftpd/root/etc/init.d/vsftpd
new file mode 100644
index 000000000..0152e4ec8
--- /dev/null
+++ b/obsolete-buildroot/sources/openwrt/ipkg/vsftpd/root/etc/init.d/vsftpd
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+case $1 in
+ start)
+ [ -d /var/run/vsftpd ] || mkdir -p /var/run/vsftpd
+ /usr/sbin/vsftpd
+ ;;
+ stop)
+ pid=$(pidof vsftpd)
+ x=$$ # exclude our pid since we have the same name
+ pid=$(echo $pid | sed -e "s/$x//")
+ [ -n "$pid" ] && kill -TERM $pid
+ ;;
+ *)
+ echo "usage: $0 (start|stop)"
+ exit 1
+esac
+
+exit $?
diff --git a/obsolete-buildroot/sources/openwrt/ipkg/vsftpd/root/etc/vsftpd.conf b/obsolete-buildroot/sources/openwrt/ipkg/vsftpd/root/etc/vsftpd.conf
new file mode 100644
index 000000000..f3ba34f50
--- /dev/null
+++ b/obsolete-buildroot/sources/openwrt/ipkg/vsftpd/root/etc/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/obsolete-buildroot/sources/openwrt/patches/vsftpd/vsftpd-1.2.2-openwrt.patch b/obsolete-buildroot/sources/openwrt/patches/vsftpd/vsftpd-1.2.2-openwrt.patch
new file mode 100644
index 000000000..b458f4147
--- /dev/null
+++ b/obsolete-buildroot/sources/openwrt/patches/vsftpd/vsftpd-1.2.2-openwrt.patch
@@ -0,0 +1,26 @@
+diff -ruN vsftpd-1.2.2-old/Makefile vsftpd-1.2.2-new/Makefile
+--- vsftpd-1.2.2-old/Makefile 2003-09-15 13:41:58.000000000 +0200
++++ vsftpd-1.2.2-new/Makefile 2004-05-25 00:25:37.000000000 +0200
+@@ -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 \
+diff -ruN vsftpd-1.2.2-old/tunables.c vsftpd-1.2.2-new/tunables.c
+--- vsftpd-1.2.2-old/tunables.c 2004-04-20 02:25:05.000000000 +0200
++++ vsftpd-1.2.2-new/tunables.c 2004-05-25 00:07:19.000000000 +0200
+@@ -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";