From 2fab4b8902320d0323e3a59ea72e743f24eb36c9 Mon Sep 17 00:00:00 2001 From: Joe Slater Date: Mon, 15 Sep 2014 16:43:51 -0700 Subject: vftpd: update to version 3.0.2 No changes other than source checksum. Signed-off-by: Joe Slater Signed-off-by: Martin Jansa Signed-off-by: Joe MacDonald --- .../vsftpd/vsftpd-3.0.0/makefile-destdir.patch | 44 ---------- .../vsftpd/vsftpd-3.0.0/makefile-libs.patch | 21 ----- .../vsftpd/vsftpd-3.0.0/makefile-strip.patch | 17 ---- .../vsftpd-3.0.0/nopam-with-tcp_wrappers.patch | 17 ---- .../vsftpd/vsftpd-3.0.0/nopam.patch | 16 ---- .../vsftpd-3.0.0/vsftpd-tcp_wrappers-support.patch | 25 ------ .../vsftpd/vsftpd-3.0.2/makefile-destdir.patch | 44 ++++++++++ .../vsftpd/vsftpd-3.0.2/makefile-libs.patch | 21 +++++ .../vsftpd/vsftpd-3.0.2/makefile-strip.patch | 17 ++++ .../vsftpd-3.0.2/nopam-with-tcp_wrappers.patch | 17 ++++ .../vsftpd/vsftpd-3.0.2/nopam.patch | 16 ++++ .../vsftpd-3.0.2/vsftpd-tcp_wrappers-support.patch | 25 ++++++ .../recipes-daemons/vsftpd/vsftpd_3.0.0.bb | 98 --------------------- .../recipes-daemons/vsftpd/vsftpd_3.0.2.bb | 99 ++++++++++++++++++++++ 14 files changed, 239 insertions(+), 238 deletions(-) delete mode 100644 meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/makefile-destdir.patch delete mode 100644 meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/makefile-libs.patch delete mode 100644 meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/makefile-strip.patch delete mode 100644 meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/nopam-with-tcp_wrappers.patch delete mode 100644 meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/nopam.patch delete mode 100644 meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/vsftpd-tcp_wrappers-support.patch create mode 100644 meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/makefile-destdir.patch create mode 100644 meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/makefile-libs.patch create mode 100644 meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/makefile-strip.patch create mode 100644 meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/nopam-with-tcp_wrappers.patch create mode 100644 meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/nopam.patch create mode 100644 meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/vsftpd-tcp_wrappers-support.patch delete mode 100644 meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb create mode 100644 meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.2.bb diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/makefile-destdir.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/makefile-destdir.patch deleted file mode 100644 index 1980d09fd4..0000000000 --- a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/makefile-destdir.patch +++ /dev/null @@ -1,44 +0,0 @@ -Use DESTDIR within install to allow installing under a prefix - -Upstream-Status: Pending - -Signed-off-by: Paul Eggleton - -diff --git a/Makefile b/Makefile ---- a/Makefile -+++ b/Makefile -@@ -24,21 +24,21 @@ - $(CC) -o vsftpd $(OBJS) $(LINK) $(LIBS) - - install: -- if [ -x /usr/local/sbin ]; then \ -- $(INSTALL) -m 755 vsftpd /usr/local/sbin/vsftpd; \ -+ if [ -x ${DESTDIR}/usr/local/sbin ]; then \ -+ $(INSTALL) -m 755 vsftpd ${DESTDIR}/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; \ -+ $(INSTALL) -m 755 vsftpd ${DESTDIR}/usr/sbin/vsftpd; fi -+ if [ -x ${DESTDIR}/usr/local/man ]; then \ -+ $(INSTALL) -m 644 vsftpd.8 ${DESTDIR}/usr/local/man/man8/vsftpd.8; \ -+ $(INSTALL) -m 644 vsftpd.conf.5 ${DESTDIR}/usr/local/man/man5/vsftpd.conf.5; \ -+ elif [ -x ${DESTDIR}/usr/share/man ]; then \ -+ $(INSTALL) -m 644 vsftpd.8 ${DESTDIR}/usr/share/man/man8/vsftpd.8; \ -+ $(INSTALL) -m 644 vsftpd.conf.5 ${DESTDIR}/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 -+ $(INSTALL) -m 644 vsftpd.8 ${DESTDIR}/usr/man/man8/vsftpd.8; \ -+ $(INSTALL) -m 644 vsftpd.conf.5 ${DESTDIR}/usr/man/man5/vsftpd.conf.5; fi -+ if [ -x ${DESTDIR}/etc/xinetd.d ]; then \ -+ $(INSTALL) -m 644 xinetd.d/vsftpd ${DESTDIR}/etc/xinetd.d/vsftpd; fi - - clean: - rm -f *.o *.swp vsftpd diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/makefile-libs.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/makefile-libs.patch deleted file mode 100644 index 9a10f722f4..0000000000 --- a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/makefile-libs.patch +++ /dev/null @@ -1,21 +0,0 @@ -Hardcode LIBS instead of using a script to determine available libs - -We want to avoid this dynamic detection so we have a deterministic -build. - -Upstream-Status: Inappropriate [config] - -Signed-off-by: Paul Eggleton - -diff --git a/Makefile b/Makefile ---- a/Makefile -+++ b/Makefile -@@ -5,7 +5,7 @@ - #CFLAGS = -g - CFLAGS = -O2 -Wall -W -Wshadow #-pedantic -Werror -Wconversion - --LIBS = `./vsf_findlibs.sh` -+LIBS = -lssl -lcrypto -lnsl -lresolv - LINK = -Wl,-s - - OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \ diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/makefile-strip.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/makefile-strip.patch deleted file mode 100644 index fd3160037f..0000000000 --- a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/makefile-strip.patch +++ /dev/null @@ -1,17 +0,0 @@ -Disable stripping at link time - -Upstream-Status: Inappropriate [config] - -Signed-off-by: Paul Eggleton - -diff --git a/Makefile b/Makefile ---- a/Makefile -+++ b/Makefile -@@ -9,7 +9,6 @@ CFLAGS = -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 \ - #-pedantic -Wconversion - - LIBS = -lssl -lcrypto -lnsl -lresolv --LINK = -Wl,-s - LDFLAGS = -fPIE -pie -Wl,-z,relro -Wl,-z,now - - OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \ diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/nopam-with-tcp_wrappers.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/nopam-with-tcp_wrappers.patch deleted file mode 100644 index fdcf3a02b6..0000000000 --- a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/nopam-with-tcp_wrappers.patch +++ /dev/null @@ -1,17 +0,0 @@ -Disable PAM - -Upstream-Status: Inappropriate [config] - -Signed-off-by: Roy.Li -diff -ur vsftpd-2.0.1_org/builddefs.h vsftpd-2.0.1_patch/builddefs.h ---- vsftpd-2.0.1_org/builddefs.h 2004-07-02 16:36:59.000000000 +0200 -+++ vsftpd-2.0.1_patch/builddefs.h 2004-07-21 09:34:49.044900488 +0200 -@@ -2,7 +2,7 @@ - #define VSF_BUILDDEFS_H - - #define VSF_BUILD_TCPWRAPPERS --#define VSF_BUILD_PAM -+#undef VSF_BUILD_PAM - #undef VSF_BUILD_SSL - - #endif /* VSF_BUILDDEFS_H */ diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/nopam.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/nopam.patch deleted file mode 100644 index cf0d68e272..0000000000 --- a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/nopam.patch +++ /dev/null @@ -1,16 +0,0 @@ -Disable PAM - -Upstream-Status: Inappropriate [config] - -diff -ur vsftpd-2.0.1_org/builddefs.h vsftpd-2.0.1_patch/builddefs.h ---- vsftpd-2.0.1_org/builddefs.h 2004-07-02 16:36:59.000000000 +0200 -+++ vsftpd-2.0.1_patch/builddefs.h 2004-07-21 09:34:49.044900488 +0200 -@@ -2,7 +2,7 @@ - #define VSF_BUILDDEFS_H - - #undef VSF_BUILD_TCPWRAPPERS --#define VSF_BUILD_PAM -+#undef VSF_BUILD_PAM - #undef VSF_BUILD_SSL - - #endif /* VSF_BUILDDEFS_H */ diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/vsftpd-tcp_wrappers-support.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/vsftpd-tcp_wrappers-support.patch deleted file mode 100644 index 69745b3a10..0000000000 --- a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.0/vsftpd-tcp_wrappers-support.patch +++ /dev/null @@ -1,25 +0,0 @@ -Enable tcp_wrapper. - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Roy.Li ---- - builddefs.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/builddefs.h b/builddefs.h -index e908352..0106d1a 100644 ---- a/builddefs.h -+++ b/builddefs.h -@@ -1,7 +1,7 @@ - #ifndef VSF_BUILDDEFS_H - #define VSF_BUILDDEFS_H - --#undef VSF_BUILD_TCPWRAPPERS -+#define VSF_BUILD_TCPWRAPPERS - #define VSF_BUILD_PAM - #undef VSF_BUILD_SSL - --- -1.7.1 - diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/makefile-destdir.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/makefile-destdir.patch new file mode 100644 index 0000000000..1980d09fd4 --- /dev/null +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/makefile-destdir.patch @@ -0,0 +1,44 @@ +Use DESTDIR within install to allow installing under a prefix + +Upstream-Status: Pending + +Signed-off-by: Paul Eggleton + +diff --git a/Makefile b/Makefile +--- a/Makefile ++++ b/Makefile +@@ -24,21 +24,21 @@ + $(CC) -o vsftpd $(OBJS) $(LINK) $(LIBS) + + install: +- if [ -x /usr/local/sbin ]; then \ +- $(INSTALL) -m 755 vsftpd /usr/local/sbin/vsftpd; \ ++ if [ -x ${DESTDIR}/usr/local/sbin ]; then \ ++ $(INSTALL) -m 755 vsftpd ${DESTDIR}/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; \ ++ $(INSTALL) -m 755 vsftpd ${DESTDIR}/usr/sbin/vsftpd; fi ++ if [ -x ${DESTDIR}/usr/local/man ]; then \ ++ $(INSTALL) -m 644 vsftpd.8 ${DESTDIR}/usr/local/man/man8/vsftpd.8; \ ++ $(INSTALL) -m 644 vsftpd.conf.5 ${DESTDIR}/usr/local/man/man5/vsftpd.conf.5; \ ++ elif [ -x ${DESTDIR}/usr/share/man ]; then \ ++ $(INSTALL) -m 644 vsftpd.8 ${DESTDIR}/usr/share/man/man8/vsftpd.8; \ ++ $(INSTALL) -m 644 vsftpd.conf.5 ${DESTDIR}/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 ++ $(INSTALL) -m 644 vsftpd.8 ${DESTDIR}/usr/man/man8/vsftpd.8; \ ++ $(INSTALL) -m 644 vsftpd.conf.5 ${DESTDIR}/usr/man/man5/vsftpd.conf.5; fi ++ if [ -x ${DESTDIR}/etc/xinetd.d ]; then \ ++ $(INSTALL) -m 644 xinetd.d/vsftpd ${DESTDIR}/etc/xinetd.d/vsftpd; fi + + clean: + rm -f *.o *.swp vsftpd diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/makefile-libs.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/makefile-libs.patch new file mode 100644 index 0000000000..9a10f722f4 --- /dev/null +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/makefile-libs.patch @@ -0,0 +1,21 @@ +Hardcode LIBS instead of using a script to determine available libs + +We want to avoid this dynamic detection so we have a deterministic +build. + +Upstream-Status: Inappropriate [config] + +Signed-off-by: Paul Eggleton + +diff --git a/Makefile b/Makefile +--- a/Makefile ++++ b/Makefile +@@ -5,7 +5,7 @@ + #CFLAGS = -g + CFLAGS = -O2 -Wall -W -Wshadow #-pedantic -Werror -Wconversion + +-LIBS = `./vsf_findlibs.sh` ++LIBS = -lssl -lcrypto -lnsl -lresolv + LINK = -Wl,-s + + OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \ diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/makefile-strip.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/makefile-strip.patch new file mode 100644 index 0000000000..fd3160037f --- /dev/null +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/makefile-strip.patch @@ -0,0 +1,17 @@ +Disable stripping at link time + +Upstream-Status: Inappropriate [config] + +Signed-off-by: Paul Eggleton + +diff --git a/Makefile b/Makefile +--- a/Makefile ++++ b/Makefile +@@ -9,7 +9,6 @@ CFLAGS = -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 \ + #-pedantic -Wconversion + + LIBS = -lssl -lcrypto -lnsl -lresolv +-LINK = -Wl,-s + LDFLAGS = -fPIE -pie -Wl,-z,relro -Wl,-z,now + + OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \ diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/nopam-with-tcp_wrappers.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/nopam-with-tcp_wrappers.patch new file mode 100644 index 0000000000..fdcf3a02b6 --- /dev/null +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/nopam-with-tcp_wrappers.patch @@ -0,0 +1,17 @@ +Disable PAM + +Upstream-Status: Inappropriate [config] + +Signed-off-by: Roy.Li +diff -ur vsftpd-2.0.1_org/builddefs.h vsftpd-2.0.1_patch/builddefs.h +--- vsftpd-2.0.1_org/builddefs.h 2004-07-02 16:36:59.000000000 +0200 ++++ vsftpd-2.0.1_patch/builddefs.h 2004-07-21 09:34:49.044900488 +0200 +@@ -2,7 +2,7 @@ + #define VSF_BUILDDEFS_H + + #define VSF_BUILD_TCPWRAPPERS +-#define VSF_BUILD_PAM ++#undef VSF_BUILD_PAM + #undef VSF_BUILD_SSL + + #endif /* VSF_BUILDDEFS_H */ diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/nopam.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/nopam.patch new file mode 100644 index 0000000000..cf0d68e272 --- /dev/null +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/nopam.patch @@ -0,0 +1,16 @@ +Disable PAM + +Upstream-Status: Inappropriate [config] + +diff -ur vsftpd-2.0.1_org/builddefs.h vsftpd-2.0.1_patch/builddefs.h +--- vsftpd-2.0.1_org/builddefs.h 2004-07-02 16:36:59.000000000 +0200 ++++ vsftpd-2.0.1_patch/builddefs.h 2004-07-21 09:34:49.044900488 +0200 +@@ -2,7 +2,7 @@ + #define VSF_BUILDDEFS_H + + #undef VSF_BUILD_TCPWRAPPERS +-#define VSF_BUILD_PAM ++#undef VSF_BUILD_PAM + #undef VSF_BUILD_SSL + + #endif /* VSF_BUILDDEFS_H */ diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/vsftpd-tcp_wrappers-support.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/vsftpd-tcp_wrappers-support.patch new file mode 100644 index 0000000000..69745b3a10 --- /dev/null +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.2/vsftpd-tcp_wrappers-support.patch @@ -0,0 +1,25 @@ +Enable tcp_wrapper. + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Roy.Li +--- + builddefs.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/builddefs.h b/builddefs.h +index e908352..0106d1a 100644 +--- a/builddefs.h ++++ b/builddefs.h +@@ -1,7 +1,7 @@ + #ifndef VSF_BUILDDEFS_H + #define VSF_BUILDDEFS_H + +-#undef VSF_BUILD_TCPWRAPPERS ++#define VSF_BUILD_TCPWRAPPERS + #define VSF_BUILD_PAM + #undef VSF_BUILD_SSL + +-- +1.7.1 + diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb deleted file mode 100644 index 5df8211569..0000000000 --- a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb +++ /dev/null @@ -1,98 +0,0 @@ -SUMMARY = "Very Secure FTP server" -HOMEPAGE = "https://security.appspot.com/vsftpd.html" -SECTION = "network" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=a6067ad950b28336613aed9dd47b1271" - -DEPENDS = "libcap openssl" - -SRC_URI = "https://security.appspot.com/downloads/vsftpd-${PV}.tar.gz \ - file://makefile-destdir.patch \ - file://makefile-libs.patch \ - file://makefile-strip.patch \ - file://init \ - file://vsftpd.conf \ - file://vsftpd.user_list \ - file://vsftpd.ftpusers \ - file://change-secure_chroot_dir.patch \ - file://volatiles.99_vsftpd \ -" - -LIC_FILES_CHKSUM = "file://COPYING;md5=a6067ad950b28336613aed9dd47b1271 \ - file://COPYRIGHT;md5=04251b2eb0f298dae376d92454f6f72e \ - file://LICENSE;md5=654df2042d44b8cac8a5654fc5be63eb" -SRC_URI[md5sum] = "ad9fa952558c2c5b0426ccaccff0f972" -SRC_URI[sha256sum] = "ef70205dcd0c7f03b008b9578fb44c0cbe31e66daab8cfafb9904747c17fc2a8" - -PACKAGECONFIG ??= "tcp-wrappers" -PACKAGECONFIG[tcp-wrappers] = ",,tcp-wrappers" -SRC_URI +="${@base_contains('PACKAGECONFIG', 'tcp-wrappers', 'file://vsftpd-tcp_wrappers-support.patch', '', d)}" - -DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" -RDEPENDS_${PN} += "${@base_contains('DISTRO_FEATURES', 'pam', 'pam-plugin-listfile', '', d)}" -PAMLIB = "${@base_contains('DISTRO_FEATURES', 'pam', '-L${STAGING_BASELIBDIR} -lpam', '', d)}" -NOPAM_SRC ="${@base_contains('PACKAGECONFIG', 'tcp-wrappers', 'file://nopam-with-tcp_wrappers.patch', 'file://nopam.patch', d)}" -SRC_URI += "${@base_contains('DISTRO_FEATURES', 'pam', '', '${NOPAM_SRC}', d)}" - -inherit update-rc.d useradd - -CONFFILES_${PN} = "${sysconfdir}/vsftpd.conf" -LDFLAGS_append =" -lcrypt -lcap" - -do_configure() { - # Fix hardcoded /usr, /etc, /var mess. - cat tunables.c|sed s:\"/usr:\"${prefix}:g|sed s:\"/var:\"${localstatedir}:g \ - |sed s:\"/etc:\"${sysconfdir}:g > tunables.c.new - mv tunables.c.new tunables.c -} - -do_compile() { - oe_runmake "LIBS=-L${STAGING_LIBDIR} -lcrypt -lcap ${PAMLIB} -lwrap" -} - -do_install() { - install -d ${D}${sbindir} - install -d ${D}${mandir}/man8 - install -d ${D}${mandir}/man5 - oe_runmake 'DESTDIR=${D}' install - install -d ${D}${sysconfdir} - install -m 600 ${WORKDIR}/vsftpd.conf ${D}${sysconfdir}/vsftpd.conf - install -d ${D}${sysconfdir}/init.d/ - install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/vsftpd - install -d ${D}/${sysconfdir}/default/volatiles - install -m 644 ${WORKDIR}/volatiles.99_vsftpd ${D}/${sysconfdir}/default/volatiles/99_vsftpd - - install -m 600 ${WORKDIR}/vsftpd.ftpusers ${D}${sysconfdir}/ - install -m 600 ${WORKDIR}/vsftpd.user_list ${D}${sysconfdir}/ - if ! test -z "${PAMLIB}" ; then - install -d ${D}${sysconfdir}/pam.d/ - cp ${S}/RedHat/vsftpd.pam ${D}${sysconfdir}/pam.d/vsftpd - sed -i "s:/lib/security:${base_libdir}/security:" ${D}${sysconfdir}/pam.d/vsftpd - sed -i "s:ftpusers:vsftpd.ftpusers:" ${D}${sysconfdir}/pam.d/vsftpd - fi - if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/tmpfiles.d - echo "d /var/run/vsftpd/empty 0755 root root -" \ - > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf - fi -} - -INITSCRIPT_PACKAGES = "${PN}" -INITSCRIPT_NAME_${PN} = "vsftpd" -INITSCRIPT_PARAMS_${PN} = "defaults 80" - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM_${PN} = "--system --home-dir /var/lib/ftp --no-create-home -g ftp \ - --shell /bin/false ftp " -GROUPADD_PARAM_${PN} = "-r ftp" - -pkg_postinst_${PN}() { - if [ -n "$D" ]; then - exit 0 - fi - if type systemd-tmpfiles >/dev/null; then - systemd-tmpfiles --create - elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then - ${sysconfdir}/init.d/populate-volatile.sh update - fi -} diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.2.bb b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.2.bb new file mode 100644 index 0000000000..a1c4ff4ad4 --- /dev/null +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.2.bb @@ -0,0 +1,99 @@ +SUMMARY = "Very Secure FTP server" +HOMEPAGE = "https://security.appspot.com/vsftpd.html" +SECTION = "network" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=a6067ad950b28336613aed9dd47b1271" + +DEPENDS = "libcap openssl" + +SRC_URI = "https://security.appspot.com/downloads/vsftpd-${PV}.tar.gz \ + file://makefile-destdir.patch \ + file://makefile-libs.patch \ + file://makefile-strip.patch \ + file://init \ + file://vsftpd.conf \ + file://vsftpd.user_list \ + file://vsftpd.ftpusers \ + file://change-secure_chroot_dir.patch \ + file://volatiles.99_vsftpd \ +" + +LIC_FILES_CHKSUM = "file://COPYING;md5=a6067ad950b28336613aed9dd47b1271 \ + file://COPYRIGHT;md5=04251b2eb0f298dae376d92454f6f72e \ + file://LICENSE;md5=654df2042d44b8cac8a5654fc5be63eb" +SRC_URI[md5sum] = "8b00c749719089401315bd3c44dddbb2" +SRC_URI[sha256sum] = "be46f0e2c5528fe021fafc8dab1ecfea0c1f183063a06977f8537fcd0b195e56" + + +PACKAGECONFIG ??= "tcp-wrappers" +PACKAGECONFIG[tcp-wrappers] = ",,tcp-wrappers" +SRC_URI +="${@base_contains('PACKAGECONFIG', 'tcp-wrappers', 'file://vsftpd-tcp_wrappers-support.patch', '', d)}" + +DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" +RDEPENDS_${PN} += "${@base_contains('DISTRO_FEATURES', 'pam', 'pam-plugin-listfile', '', d)}" +PAMLIB = "${@base_contains('DISTRO_FEATURES', 'pam', '-L${STAGING_BASELIBDIR} -lpam', '', d)}" +NOPAM_SRC ="${@base_contains('PACKAGECONFIG', 'tcp-wrappers', 'file://nopam-with-tcp_wrappers.patch', 'file://nopam.patch', d)}" +SRC_URI += "${@base_contains('DISTRO_FEATURES', 'pam', '', '${NOPAM_SRC}', d)}" + +inherit update-rc.d useradd + +CONFFILES_${PN} = "${sysconfdir}/vsftpd.conf" +LDFLAGS_append =" -lcrypt -lcap" + +do_configure() { + # Fix hardcoded /usr, /etc, /var mess. + cat tunables.c|sed s:\"/usr:\"${prefix}:g|sed s:\"/var:\"${localstatedir}:g \ + |sed s:\"/etc:\"${sysconfdir}:g > tunables.c.new + mv tunables.c.new tunables.c +} + +do_compile() { + oe_runmake "LIBS=-L${STAGING_LIBDIR} -lcrypt -lcap ${PAMLIB} -lwrap" +} + +do_install() { + install -d ${D}${sbindir} + install -d ${D}${mandir}/man8 + install -d ${D}${mandir}/man5 + oe_runmake 'DESTDIR=${D}' install + install -d ${D}${sysconfdir} + install -m 600 ${WORKDIR}/vsftpd.conf ${D}${sysconfdir}/vsftpd.conf + install -d ${D}${sysconfdir}/init.d/ + install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/vsftpd + install -d ${D}/${sysconfdir}/default/volatiles + install -m 644 ${WORKDIR}/volatiles.99_vsftpd ${D}/${sysconfdir}/default/volatiles/99_vsftpd + + install -m 600 ${WORKDIR}/vsftpd.ftpusers ${D}${sysconfdir}/ + install -m 600 ${WORKDIR}/vsftpd.user_list ${D}${sysconfdir}/ + if ! test -z "${PAMLIB}" ; then + install -d ${D}${sysconfdir}/pam.d/ + cp ${S}/RedHat/vsftpd.pam ${D}${sysconfdir}/pam.d/vsftpd + sed -i "s:/lib/security:${base_libdir}/security:" ${D}${sysconfdir}/pam.d/vsftpd + sed -i "s:ftpusers:vsftpd.ftpusers:" ${D}${sysconfdir}/pam.d/vsftpd + fi + if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/tmpfiles.d + echo "d /var/run/vsftpd/empty 0755 root root -" \ + > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf + fi +} + +INITSCRIPT_PACKAGES = "${PN}" +INITSCRIPT_NAME_${PN} = "vsftpd" +INITSCRIPT_PARAMS_${PN} = "defaults 80" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = "--system --home-dir /var/lib/ftp --no-create-home -g ftp \ + --shell /bin/false ftp " +GROUPADD_PARAM_${PN} = "-r ftp" + +pkg_postinst_${PN}() { + if [ -n "$D" ]; then + exit 0 + fi + if type systemd-tmpfiles >/dev/null; then + systemd-tmpfiles --create + elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then + ${sysconfdir}/init.d/populate-volatile.sh update + fi +} -- cgit v1.2.3-54-g00ecf