Skip to contentSkip to conversation

vsftpd: add new package

meta-oe Eric Bénard 6 participants 11 messages Feb 20, 2012 – Feb 22, 2012

lore
Share & tools
lore
#0 lore raw

- imported 2.0.5 from oe-classic
- upgrade to 2.3.5 which is latest stable
- tested on ARMv5 with Angstrom

---
 meta-oe/recipes-connectivity/vsftpd/files/init     |   41 ++++++++
 .../recipes-connectivity/vsftpd/files/vsftpd.conf  |  108 ++++++++++++++++++++
 .../vsftpd/vsftpd-2.3.5/makefile.patch             |   47 +++++++++
 .../vsftpd/vsftpd-2.3.5/nopam.patch                |   12 ++
 .../recipes-connectivity/vsftpd/vsftpd_2.3.5.bb    |   48 +++++++++
 5 files changed, 256 insertions(+), 0 deletions(-)
 create mode 100755 meta-oe/recipes-connectivity/vsftpd/files/init
 create mode 100755 meta-oe/recipes-connectivity/vsftpd/files/vsftpd.conf
 create mode 100644 meta-oe/recipes-connectivity/vsftpd/vsftpd-2.3.5/makefile.patch
 create mode 100644 meta-oe/recipes-connectivity/vsftpd/vsftpd-2.3.5/nopam.patch
 create mode 100644 meta-oe/recipes-connectivity/vsftpd/vsftpd_2.3.5.bb
meta-oe/recipes-connectivity/vsftpd/files/init new file +41 -0
new file mode 100755
index 0000000..d0ec010
@@ -0,0 +1,41 @@
+#!/bin/sh
+DAEMON=/usr/sbin/vsftpd
+NAME=vsftpd
+DESC="FTP Server"
+ARGS=""
+FTPDIR=/var/lib/ftp
+
+test -f $DAEMON || exit 0
+
+set -e
+
+case "$1" in
+    start)
+        echo -n "* starting $DESC: $NAME... "
+        if ! test -d $FTPDIR; then
+            mkdir -p $FTPDIR/in
+            chown ftp $FTPDIR -R
+            chmod a-w $FTPDIR
+            chmod u+w $FTPDIR/in
+        fi
+        start-stop-daemon -S -b -x $DAEMON -- $ARGS
+        echo "done."
+        ;;
+    stop)
+        echo -n "* stopping $DESC: $NAME... "
+        start-stop-daemon -K -x $DAEMON
+        echo "done."
+        ;;
+    restart)
+        echo "* restarting $DESC: $NAME... "
+        $0 stop
+        $0 start
+        echo "done."
+        ;;
+    *)
+        echo "Usage: $0 {start|stop|restart}"
+        exit 1
+        ;;
+esac
+
+exit 0
meta-oe/recipes-connectivity/vsftpd/files/vsftpd.conf new file +108 -0

108 lines not on this page · raw message

meta-oe/recipes-connectivity/vsftpd/vsftpd-2.3.5/makefile.patch new file +47 -0

47 lines not on this page · raw message

meta-oe/recipes-connectivity/vsftpd/vsftpd-2.3.5/nopam.patch new file +12 -0
new file mode 100644
index 0000000..8e0559c
@@ -0,0 +1,12 @@
+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 */
meta-oe/recipes-connectivity/vsftpd/vsftpd_2.3.5.bb new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
1.7.7.6
#1 lore raw

Hello Eric,

Quoted 3 lines · Eric Bénard

- imported 2.0.5 from oe-classic
- upgrade to 2.3.5 which is latest stable
- tested on ARMv5 with Angstrom

I created a recipe for vsftpd, too. Here's my version for your reference. All patches were taken from the Debian or Ubuntu package.

It differs from your recipe in these ways:
- uses openssl
- uses pam if available
- uses xinetd
- allows to set custom default configuration options in bbappends
- only build-tested with OE-core, no runtime tests so far.

Regards,
Andreas

vsftpd/01-builddefs.patch +18 -0
diff -Naur empty/vsftpd/01-builddefs.patch vsftpd/vsftpd/01-builddefs.patch
@@ -0,0 +1,18 @@
+Author: Daniel Jacobowitz <[email protected]>
+Description: Build with tcpwrapper and SSL support.
+
+diff -Naurp vsftpd.orig/builddefs.h vsftpd/builddefs.h
+--- vsftpd.orig/builddefs.h	2009-01-31 00:02:36.000000000 +0000
++++ vsftpd/builddefs.h	2009-01-31 00:26:34.000000000 +0000
+@@ -1,9 +1,9 @@
+ #ifndef VSF_BUILDDEFS_H
+ #define VSF_BUILDDEFS_H
+ 
+-#undef VSF_BUILD_TCPWRAPPERS
++#define VSF_BUILD_TCPWRAPPERS 1
+ #define VSF_BUILD_PAM
+-#undef VSF_BUILD_SSL
++#define VSF_BUILD_SSL
+ 
+ #endif /* VSF_BUILDDEFS_H */
+ 
vsftpd/02-config.patch +120 -0

120 lines not on this page · raw message

vsftpd/03-db-doc.patch +19 -0
diff -Naur empty/vsftpd/03-db-doc.patch vsftpd/vsftpd/03-db-doc.patch
@@ -0,0 +1,19 @@
+Author: shaul Karl <[email protected]>
+Description:
+ A short explanation how to find out the right db version (Closes: #478282).
+
+diff -Naurp vsftpd.orig/EXAMPLE/VIRTUAL_USERS/README vsftpd/EXAMPLE/VIRTUAL_USERS/README
+--- vsftpd.orig/EXAMPLE/VIRTUAL_USERS/README	2009-01-31 00:02:36.000000000 +0000
++++ vsftpd/EXAMPLE/VIRTUAL_USERS/README	2009-01-31 01:38:11.000000000 +0000
+@@ -21,7 +21,10 @@ NOTE: Many systems have multiple version
+ need to use e.g. db3_load for correct operation. This is known to affect
+ some Debian systems. The core issue is that pam_userdb expects its login
+ database to be a specific db version (often db3, whereas db4 may be installed
+-on your system).
++on your system). You might check ahead what specific db version you'll need
++by looking at the dependcies of the pam module. Some methods to do that is to
++run ldd on the pam_userdb.so or look at the dependencies of the package with
++the pam modules.
+ 
+ This will create /etc/vsftpd_login.db. Obviously, you may want to make sure
+ the permissions are restricted:
vsftpd/04-link-local.patch +91 -0

91 lines not on this page · raw message

vsftpd/05-whitespaces.patch +81 -0

81 lines not on this page · raw message

vsftpd/06-greedy.patch +32 -0
diff -Naur empty/vsftpd/06-greedy.patch vsftpd/vsftpd/06-greedy.patch
@@ -0,0 +1,32 @@
+Author: Martin Nagy <[email protected]>
+Description: Fix file listing issue with wildcard (Bugzilla: #392181).
+
+diff -Naurp vsftpd.orig/ls.c vsftpd/ls.c
+--- vsftpd.orig/ls.c	2009-10-02 14:15:18.000000000 +0200
++++ vsftpd/ls.c	2009-10-18 11:48:29.000000000 +0200
+@@ -281,6 +281,25 @@ vsf_filename_passes_filter(const struct 
+       {
+         goto out;
+       }
++      if (!must_match_at_current_pos)
++      {
++        struct mystr scan_fwd = INIT_MYSTR;
++
++        str_mid_to_end(&name_remain_str, &scan_fwd,
++                        indexx + str_getlen(&s_match_needed_str));
++        /* We're allowed to be greedy, test if it match further along
++         * keep advancing indexx while we can still match.
++         */
++        while( (locate_result = str_locate_str(&scan_fwd, &s_match_needed_str)),
++            locate_result.found )
++        {
++          indexx += locate_result.index + str_getlen(&s_match_needed_str);
++          str_mid_to_end(&scan_fwd, &temp_str,
++                         locate_result.index + str_getlen(&s_match_needed_str));
++          str_copy(&scan_fwd, &temp_str);
++        }
++       str_free(&scan_fwd);
++      }
+       /* Chop matched string out of remainder */
+       str_mid_to_end(&name_remain_str, &temp_str,
+                      indexx + str_getlen(&s_match_needed_str));
vsftpd/07-utf8.patch +58 -0

58 lines not on this page · raw message

vsftpd/08-manpage.patch +23 -0
diff -Naur empty/vsftpd/08-manpage.patch vsftpd/vsftpd/08-manpage.patch
@@ -0,0 +1,23 @@
+Author: Daniel Baumann <[email protected]>
+Description: Fixing manpage formating.
+
+diff -Naurp vsftpd.orig/vsftpd.8 vsftpd/vsftpd.8
+--- vsftpd.orig/vsftpd.8	2009-07-17 20:56:23.000000000 +0000
++++ vsftpd/vsftpd.8	2010-04-08 05:18:00.000000000 +0000
+@@ -57,4 +57,3 @@ setting and any identical setting that w
+ .Pa /etc/vsftpd.conf
+ .Sh SEE ALSO
+ .Xr vsftpd.conf 5
+-.end
+diff -Naurp vsftpd.orig/vsftpd.conf.5 vsftpd/vsftpd.conf.5
+--- vsftpd.orig/vsftpd.conf.5	2009-10-19 02:46:30.000000000 +0000
++++ vsftpd/vsftpd.conf.5	2010-04-08 05:18:08.000000000 +0000
+@@ -404,7 +404,7 @@ reuse (which proves that they know the s
+ channel). Although this is a secure default, it may break many FTP clients,
+ so you may want to disable it. For a discussion of the consequences, see
+ http://scarybeastsecurity.blogspot.com/2009/02/vsftpd-210-released.html
+-(Added in v2.1.0).
++ (Added in v2.1.0).
+ 
+ Default: YES
+ .TP
vsftpd/09-s390.patch +15 -0
diff -Naur empty/vsftpd/09-s390.patch vsftpd/vsftpd/09-s390.patch
@@ -0,0 +1,15 @@
+Author: Philipp Kern <[email protected]>
+Description: Fix vsftpd on s390 (Closes: #602726).
+
+diff -Naurp vsftpd.orig/sysdeputil.c vsftpd/sysdeputil.c
+--- vsftpd.orig/sysdeputil.c	2011-09-05 16:03:18.728857644 +0200
++++ vsftpd/sysdeputil.c	2011-09-05 16:05:12.909423834 +0200
+@@ -64,7 +64,7 @@
+ #include <utmpx.h>
+ 
+ /* BEGIN config */
+-#if defined(__linux__)
++#if defined(__linux__) && !defined(__s390__)
+   #include <errno.h>
+   #include <syscall.h>
+   #define VSF_SYSDEP_HAVE_LINUX_CLONE
vsftpd/10-remote-dos.patch +69 -0

69 lines not on this page · raw message

vsftpd/vsftpd.conf +105 -0

105 lines not on this page · raw message

vsftpd/vsftpd.xinetd.in +7 -0
diff -Naur empty/vsftpd/vsftpd.xinetd.in vsftpd/vsftpd/vsftpd.xinetd.in
@@ -0,0 +1,7 @@
+service ftp
+{
+	socket_type = stream
+	user = root
+	server = @SBINDIR@/vsftpd
+	wait = no
+}
vsftpd_2.3.5.bb +95 -0

95 lines not on this page · raw message

#2 lore raw
Quoted 1 line · Andreas Oberritter

+LICENSE = "GPL-2.0-with-OpenSSL-exception"

there might be a different way to represent that

#3 lore raw
Quoted 5 lines · Khem Raj
Quoted 1 line · Andreas Oberritter

+LICENSE = "GPL-2.0-with-OpenSSL-exception"

there might be a different way to represent that

Obviously. And maybe someone will eventually find out which different way there is and why it's preferred over any other way.

Anyway, this was inspired by OE-core's socat recipe, which uses "GPL-2.0+-with-OpenSSL-exception".

Any other useful comments?

Regards,
Andreas

#4 lore raw
In reply to Andreas Oberritter

Hi Andreas,

Quoted 5 lines · Andreas Oberritter
Quoted 3 lines · Eric Bénard

- imported 2.0.5 from oe-classic
- upgrade to 2.3.5 which is latest stable
- tested on ARMv5 with Angstrom

Quoted 7 lines

I created a recipe for vsftpd, too. Here's my version for your reference. All patches were taken from the Debian or Ubuntu package.

It differs from your recipe in these ways:
- uses openssl
- uses pam if available
- uses xinetd

I'm not sure that depending on xinetd is a good point, I've no strong opinion concerning the other points (except I don't need openssl, pam & xinetd in my image in the project where I'm using vsftp).

Quoted 1 line

- allows to set custom default configuration options in bbappends

Isn't that also possible by simply providing a custom vsftpd.conf in the project's layer ?

Eric

Signature · 1 line
http://eukrea.com/en/news/104-2012
#5 lore raw
Quoted 12 lines · Eric Bénard

Hi Andreas,

Quoted 8 lines · Andreas Oberritter
Quoted 3 lines · Eric Bénard

- imported 2.0.5 from oe-classic
- upgrade to 2.3.5 which is latest stable
- tested on ARMv5 with Angstrom

I created a recipe for vsftpd, too. Here's my version for your reference. All patches were taken from the Debian or Ubuntu package.

Quoted 8 lines
Quoted 4 lines

It differs from your recipe in these ways:
- uses openssl
- uses pam if available
- uses xinetd

I'm not sure that depending on xinetd is a good point, I've no strong opinion concerning the other points (except I don't need openssl, pam & xinetd in my image in the project where I'm using vsftp).

I'm not sure either. All of this should probably be made optional.

Quoted 4 lines
Quoted 1 line

- allows to set custom default configuration options in bbappends

Isn't that also possible by simply providing a custom vsftpd.conf in the project's layer ?

Yes, that would be possible, too. The way I implemented just makes it easier to use OE's variables in configuration items and to override only few options like the ftp banner. And to keep an up-to-date configuration example with increasing versions.

Regards,
Andreas

#10 lore raw
In reply to Eric Bénard

Am Montag, den 20.02.2012, 14:51 +0100 schrieb Eric Bénard:

Quoted 3 lines

- imported 2.0.5 from oe-classic
- upgrade to 2.3.5 which is latest stable
- tested on ARMv5 with Angstrom

Please add the version number to the commit summary too.

Quoted 13 lines
---
 meta-oe/recipes-connectivity/vsftpd/files/init     |   41 ++++++++
 .../recipes-connectivity/vsftpd/files/vsftpd.conf  |  108 ++++++++++++++++++++
 .../vsftpd/vsftpd-2.3.5/makefile.patch             |   47 +++++++++
 .../vsftpd/vsftpd-2.3.5/nopam.patch                |   12 ++
 .../recipes-connectivity/vsftpd/vsftpd_2.3.5.bb    |   48 +++++++++
 5 files changed, 256 insertions(+), 0 deletions(-)
 create mode 100755 meta-oe/recipes-connectivity/vsftpd/files/init
 create mode 100755 meta-oe/recipes-connectivity/vsftpd/files/vsftpd.conf
 create mode 100644 meta-oe/recipes-connectivity/vsftpd/vsftpd-2.3.5/makefile.patch
 create mode 100644 meta-oe/recipes-connectivity/vsftpd/vsftpd-2.3.5/nopam.patch
 create mode 100644 meta-oe/recipes-connectivity/vsftpd/vsftpd_2.3.5.bb

[…]

Thanks,

Paul

#6 lore raw
In reply to Andreas Oberritter

Hi Andreas,

Quoted 8 lines · Andreas Oberritter
Quoted 3 lines · Eric Bénard

- imported 2.0.5 from oe-classic
- upgrade to 2.3.5 which is latest stable
- tested on ARMv5 with Angstrom

I created a recipe for vsftpd, too. Here's my version for your reference. All patches were taken from the Debian or Ubuntu package.

Quoted 7 lines

It differs from your recipe in these ways:
- uses openssl
- uses pam if available
- uses xinetd
- allows to set custom default configuration options in bbappends
- only build-tested with OE-core, no runtime tests so far.

your recipe was just pushed (with this email as the commit message ...). I think it would have need a little rework, at least to not depend on xinetd by default and be runtime tested before being pushed.

Eric

Signature · 1 line
http://eukrea.com/en/news/104-2012
#7 lore raw
Quoted 19 lines · Eric Bénard

Hi Andreas,

Quoted 8 lines · Andreas Oberritter
Quoted 3 lines · Eric Bénard

- imported 2.0.5 from oe-classic
- upgrade to 2.3.5 which is latest stable
- tested on ARMv5 with Angstrom

I created a recipe for vsftpd, too. Here's my version for your reference. All patches were taken from the Debian or Ubuntu package.

Quoted 7 lines

It differs from your recipe in these ways:
- uses openssl
- uses pam if available
- uses xinetd
- allows to set custom default configuration options in bbappends
- only build-tested with OE-core, no runtime tests so far.

Quoted 5 lines

your recipe was just pushed (with this email as the commit message ...). I think it would have need a little rework, at least to not depend on xinetd by default and be runtime tested before being pushed.

Eric

And preferably should be committed in meta-oe/recipes-connectivity/vsftpd/ Now is in root of meta-openembedded.
Cheers
Andrea

Quoted 7 lines

--
http://eukrea.com/en/news/104-2012

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#8 lore raw
Quoted 24 lines · Andrea Adami
Quoted 23 lines · Eric Bénard

Hi Andreas,

Quoted 8 lines · Andreas Oberritter
Quoted 3 lines · Eric Bénard

- imported 2.0.5 from oe-classic
- upgrade to 2.3.5 which is latest stable
- tested on ARMv5 with Angstrom

I created a recipe for vsftpd, too. Here's my version for your reference. All patches were taken from the Debian or Ubuntu package.

Quoted 7 lines

It differs from your recipe in these ways:
- uses openssl
- uses pam if available
- uses xinetd
- allows to set custom default configuration options in bbappends
- only build-tested with OE-core, no runtime tests so far.

your recipe was just pushed (with this email as the commit message ...). I think it would have need a little rework, at least to not depend on xinetd by default and be runtime tested before being pushed.

Quoted 6 lines
Quoted 1 line

Eric

And preferably should be committed in meta-oe/recipes-connectivity/vsftpd/ Now is in root of meta-openembedded.
Cheers
Andrea

Yes. That was definitely not meant to be applied as is. Koen, did you by accident pick the wrong patch? Please revert and commit
http://patches.openembedded.org/patch/21437/ instead.

Regards,
Andreas

#9 lore raw

Op 22 feb. 2012, om 11:35 heeft Andreas Oberritter het volgende geschreven:

Quoted 27 lines · Andrea Adami
Quoted 26 lines · Eric Bénard
Quoted 24 lines

Hi Andreas,

Quoted 8 lines · Andreas Oberritter
Quoted 3 lines · Eric Bénard

- imported 2.0.5 from oe-classic
- upgrade to 2.3.5 which is latest stable
- tested on ARMv5 with Angstrom

I created a recipe for vsftpd, too. Here's my version for your reference. All patches were taken from the Debian or Ubuntu package.

Quoted 7 lines

It differs from your recipe in these ways:
- uses openssl
- uses pam if available
- uses xinetd
- allows to set custom default configuration options in bbappends
- only build-tested with OE-core, no runtime tests so far.

your recipe was just pushed (with this email as the commit message ...). I think it would have need a little rework, at least to not depend on xinetd by default and be runtime tested before being pushed.

Eric

Quoted 8 lines
Quoted 4 lines

And preferably should be committed in meta-oe/recipes-connectivity/vsftpd/ Now is in root of meta-openembedded.
Cheers
Andrea

Yes. That was definitely not meant to be applied as is. Koen, did you by accident pick the wrong patch? Please revert and commit
http://patches.openembedded.org/patch/21437/ instead.

Right, I picked the wrong patch, sorry about that. The "was that path intentional?" remark in patchwork suddenly makes sense, I couldn't figure it out while I was reading through the discussion. Anyway, my bad, the 21437 patch is in now.

regards,

Koen