diff options
author | MCApollo <34170230+MCApollo@users.noreply.github.com> | 2019-04-20 20:49:46 -0500 |
---|---|---|
committer | MCApollo <34170230+MCApollo@users.noreply.github.com> | 2019-04-23 20:18:47 -0500 |
commit | 12335518ab39608d58370c85ff9f5384ad2aa5f7 (patch) | |
tree | 352d81f2a2de3f1252af732080ec0fde38c13b4d /homebrew/vsftpd | |
parent | a2b26ad12d4fa12f0273645caf4be6d0b8b71e7c (diff) |
Ported in the homebrew-marauder for a hacky update/import system.
TODO: Maybe add a license & fix up messy code.
Diffstat (limited to 'homebrew/vsftpd')
-rw-r--r-- | homebrew/vsftpd/.beer | 70 | ||||
-rw-r--r-- | homebrew/vsftpd/.make.sh-auto | 9 | ||||
-rw-r--r-- | homebrew/vsftpd/_metadata/description | 1 | ||||
-rw-r--r-- | homebrew/vsftpd/_metadata/homepage | 1 | ||||
-rw-r--r-- | homebrew/vsftpd/_metadata/name | 1 | ||||
-rw-r--r-- | homebrew/vsftpd/_metadata/version | 1 | ||||
-rwxr-xr-x | homebrew/vsftpd/download.sh | 1 | ||||
-rwxr-xr-x | homebrew/vsftpd/patches.sh | 44 |
8 files changed, 128 insertions, 0 deletions
diff --git a/homebrew/vsftpd/.beer b/homebrew/vsftpd/.beer new file mode 100644 index 000000000..a2194f478 --- /dev/null +++ b/homebrew/vsftpd/.beer @@ -0,0 +1,70 @@ +{ + "name": "Vsftpd", + "description": "Secure FTP server for UNIX", + "url": "https://security.appspot.com/downloads/vsftpd-3.0.3.tar.gz", + "mirror": "https://fossies.org/linux/misc/vsftpd-3.0.3.tar.gz", + "homepage": "https://security.appspot.com/vsftpd.html", + "depends": [], + "resource": [], + "conflicts": [], + "patches": [ + { + "url": null, + "data": [ + "diff --git a/sysdeputil.c b/sysdeputil.c\n", + "index 9dc8a5e..66dbe30 100644\n", + "--- a/sysdeputil.c\n", + "+++ b/sysdeputil.c\n", + "@@ -64,6 +64,10 @@\n", + " #include <utmpx.h>\n", + " \n", + " /* BEGIN config */\n", + "+#if defined(__APPLE__)\n", + "+ #undef VSF_SYSDEP_HAVE_UTMPX\n", + "+#endif\n", + "+\n", + " #if defined(__linux__)\n", + " #include <errno.h>\n", + " #include <syscall.h>\n", + "diff --git a/vsf_findlibs.sh b/vsf_findlibs.sh\n", + "index b988be6..68d4a34 100755\n", + "--- a/vsf_findlibs.sh\n", + "+++ b/vsf_findlibs.sh\n", + "@@ -20,6 +20,8 @@ if find_func pam_start sysdeputil.o; then\n", + " locate_library /usr/lib/libpam.sl && echo \"-lpam\";\n", + " # AIX ends shared libraries with .a\n", + " locate_library /usr/lib/libpam.a && echo \"-lpam\";\n", + "+ # Mac OS X / Darwin shared libraries with .dylib\n", + "+ locate_library /usr/lib/libpam.dylib && echo \"-lpam\";\n", + " else\n", + " locate_library /lib/libcrypt.so && echo \"-lcrypt\";\n", + " locate_library /usr/lib/libcrypt.so && echo \"-lcrypt\";\n", + "diff --git a/Makefile b/Makefile\n", + "index c63ed1b..556519e 100644\n", + "--- a/Makefile\n", + "+++ b/Makefile\n", + "@@ -10,7 +10,7 @@ CFLAGS\t=\t-O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 \\\n", + "\n", + " LIBS\t=\t`./vsf_findlibs.sh`\n", + " LINK\t=\t-Wl,-s\n", + "-LDFLAGS\t=\t-fPIE -pie -Wl,-z,relro -Wl,-z,now\n", + "+LDFLAGS\t=\t-fPIE -pie\n", + "\n", + " OBJS\t=\tmain.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \\\n", + "\t\ttunables.o ftpdataio.o secbuf.o ls.o \\\n" + ] + } + ], + "install": [ + "inreplace \"defs.h\", \"/etc/vsftpd.conf\", \"#{etc}/vsftpd.conf\"", + "inreplace \"tunables.c\", \"/etc\", etc", + "inreplace \"tunables.c\", \"/var\", var", + "system \"make\"", + "sbin.install \"vsftpd\"", + "etc.install \"vsftpd.conf\"", + "man5.install \"vsftpd.conf.5\"", + "man8.install \"vsftpd.8\"" + ], + "version": "3.0.3", + "file": "vsftpd.rb" +}
\ No newline at end of file diff --git a/homebrew/vsftpd/.make.sh-auto b/homebrew/vsftpd/.make.sh-auto new file mode 100644 index 000000000..aa4186d1b --- /dev/null +++ b/homebrew/vsftpd/.make.sh-auto @@ -0,0 +1,9 @@ +pkg:setup +inreplace "defs.h", "/etc/vsftpd.conf", "#{etc}/vsftpd.conf" +inreplace "tunables.c", "/etc", etc +inreplace "tunables.c", "/var", var +make +sbin.install "vsftpd" +etc.install "vsftpd.conf" +man5.install "vsftpd.conf.5" +man8.install "vsftpd.8" diff --git a/homebrew/vsftpd/_metadata/description b/homebrew/vsftpd/_metadata/description new file mode 100644 index 000000000..1e73a355f --- /dev/null +++ b/homebrew/vsftpd/_metadata/description @@ -0,0 +1 @@ +Secure FTP server for UNIX diff --git a/homebrew/vsftpd/_metadata/homepage b/homebrew/vsftpd/_metadata/homepage new file mode 100644 index 000000000..2164c4a71 --- /dev/null +++ b/homebrew/vsftpd/_metadata/homepage @@ -0,0 +1 @@ +https://security.appspot.com/vsftpd.html diff --git a/homebrew/vsftpd/_metadata/name b/homebrew/vsftpd/_metadata/name new file mode 100644 index 000000000..d280f19bc --- /dev/null +++ b/homebrew/vsftpd/_metadata/name @@ -0,0 +1 @@ +Vsftpd diff --git a/homebrew/vsftpd/_metadata/version b/homebrew/vsftpd/_metadata/version new file mode 100644 index 000000000..75a22a26a --- /dev/null +++ b/homebrew/vsftpd/_metadata/version @@ -0,0 +1 @@ +3.0.3 diff --git a/homebrew/vsftpd/download.sh b/homebrew/vsftpd/download.sh new file mode 100755 index 000000000..6bd4f896f --- /dev/null +++ b/homebrew/vsftpd/download.sh @@ -0,0 +1 @@ +wget https://security.appspot.com/downloads/vsftpd-3.0.3.tar.gz || wget https://fossies.org/linux/misc/vsftpd-3.0.3.tar.gz
\ No newline at end of file diff --git a/homebrew/vsftpd/patches.sh b/homebrew/vsftpd/patches.sh new file mode 100755 index 000000000..39bd6f2db --- /dev/null +++ b/homebrew/vsftpd/patches.sh @@ -0,0 +1,44 @@ +echo 'Creating brew-patch.diff' +cat << EOF >> brew-patch.diff +diff --git a/sysdeputil.c b/sysdeputil.c +index 9dc8a5e..66dbe30 100644 +--- a/sysdeputil.c ++++ b/sysdeputil.c +@@ -64,6 +64,10 @@ + #include <utmpx.h> + + /* BEGIN config */ ++#if defined(__APPLE__) ++ #undef VSF_SYSDEP_HAVE_UTMPX ++#endif ++ + #if defined(__linux__) + #include <errno.h> + #include <syscall.h> +diff --git a/vsf_findlibs.sh b/vsf_findlibs.sh +index b988be6..68d4a34 100755 +--- a/vsf_findlibs.sh ++++ b/vsf_findlibs.sh +@@ -20,6 +20,8 @@ if find_func pam_start sysdeputil.o; then + locate_library /usr/lib/libpam.sl && echo "-lpam"; + # AIX ends shared libraries with .a + locate_library /usr/lib/libpam.a && echo "-lpam"; ++ # Mac OS X / Darwin shared libraries with .dylib ++ locate_library /usr/lib/libpam.dylib && echo "-lpam"; + else + locate_library /lib/libcrypt.so && echo "-lcrypt"; + locate_library /usr/lib/libcrypt.so && echo "-lcrypt"; +diff --git a/Makefile b/Makefile +index c63ed1b..556519e 100644 +--- a/Makefile ++++ b/Makefile +@@ -10,7 +10,7 @@ CFLAGS = -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 \ + + LIBS = `./vsf_findlibs.sh` + LINK = -Wl,-s +-LDFLAGS = -fPIE -pie -Wl,-z,relro -Wl,-z,now ++LDFLAGS = -fPIE -pie + + OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \ + tunables.o ftpdataio.o secbuf.o ls.o \ +EOF |