summaryrefslogtreecommitdiff
path: root/net-ftp/tlswrap
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-ftp/tlswrap
reinit the tree, so we can have metadata
Diffstat (limited to 'net-ftp/tlswrap')
-rw-r--r--net-ftp/tlswrap/Manifest10
-rw-r--r--net-ftp/tlswrap/files/fix-Wformat-security-warnings.patch67
-rw-r--r--net-ftp/tlswrap/files/modernize-am_init_automake.patch30
-rw-r--r--net-ftp/tlswrap/files/respect-cflags.patch66
-rw-r--r--net-ftp/tlswrap/files/tlswrap-1.04-libressl.patch16
-rw-r--r--net-ftp/tlswrap/files/tlswrap.init19
-rw-r--r--net-ftp/tlswrap/metadata.xml9
-rw-r--r--net-ftp/tlswrap/tlswrap-1.04-r3.ebuild38
8 files changed, 255 insertions, 0 deletions
diff --git a/net-ftp/tlswrap/Manifest b/net-ftp/tlswrap/Manifest
new file mode 100644
index 000000000000..8dc4ecb476f1
--- /dev/null
+++ b/net-ftp/tlswrap/Manifest
@@ -0,0 +1,10 @@
+AUX fix-Wformat-security-warnings.patch 2478 SHA256 b322f6d5d341a15a229a22562ad334481f4f20af7bd77fe9f59083a89e28185d SHA512 77af5535f8a250baa1e1967bdf31a8f74f2e5222b7c138f140ec245b06a7bcd398e7877f523170fe2cfa2bc026245f66533285bf03008eb317ecc5a0955ee239 WHIRLPOOL 8df88cd90178f27b2fdd8a03caf32b06fd1cd693e8b801b2fba26b74eb0946f636be7c00084c1da84328b29a72728de8ee099faa91d768d47b5de106499117f6
+AUX modernize-am_init_automake.patch 920 SHA256 68cb0a92944597249b9350773973fb01d245830869a20bf6a2a647ea40a1bbc0 SHA512 42056abceb24f7680d0480f2dbe9f87c37c124a5012811681a4826fb1dd3d3cdc883d31e5fb4d202a67bd1f6dc7edc5f8fa2aa828c20ee46c1ab6a05b0e49a17 WHIRLPOOL be8a41e38642c35dcf61187befef742e736904cc6deb998684b1a98c428291fc832237119fd81698ed003402b83754293eb440e510042b83c9d75147ce47dbdb
+AUX respect-cflags.patch 2327 SHA256 f3c865b495925a02a3c5e04ba5fdfcf4b62d9d05ba3873531876f02dc369a743 SHA512 97ff02e1417bbee2cf518f8dfcd6d32535fd610394f499ef4c552aa0741a56fe54a8ab7cedf8a553f337f4a38a221e990c222ff9c019f3037e01bdd3241e92fc WHIRLPOOL 39b8b957bde343395de2b86673cc1d6880b7bb0d4c5eb425dce48cb159e71b7c4eb56bb3ef55739311d6a782a359b340c46cbce5d75ec902a14117ad4c738d80
+AUX tlswrap-1.04-libressl.patch 522 SHA256 6da682d821402487d1a172d5c814299461429efbea5851f1b2fd948d228bf962 SHA512 e9011223a76fe6090478dcb589be81065b71c6363bb35bc02153dedf426c238a275e605a598718b917adaa55778033ed3a689af4d513fb0a3948a39e8c6df77f WHIRLPOOL ab9eeed7abd6fa2e779b7e064fddee55783fe1befc729cc2d096ae615258eaa0c9b95a343e4c223a739f2d577c87a44e5d0fe8cc1bdd19f74e213e11e365a30a
+AUX tlswrap.init 395 SHA256 03603c3d58a9de35433c025701f27a13fe2bcdad6460ed1bebf7106c030ad135 SHA512 6699101e5a628cf91013575e31f85c13a254854814240e7d7bf7006d1bb6f73eab8ecb80fe1d168e952c7c6ffc001495a6a6bc0e591de2e84d40591fccf02fae WHIRLPOOL c3787a62baee33d006b4fa5bfae7822131fe1beb4c335d42c400360e738dccf5b1394290bd426ffb801770b42a0ac3f7d8ad0ce66e9e34f4d91d75bbe4455dad
+DIST tlswrap-1.04.tar.gz 129507 SHA256 d10b8b45276695f5357d3e46212b8708a6baf42c83c5e4f4a263801890ac34b4 SHA512 f6d2a54cd77fef42174726cbe7ddd5109bb8a9c2289ddf22eddb2d240edba4a5de2e857d940ab44298e4c48da142e638d9b91fd971e5f328a36c6a557f4a257a WHIRLPOOL 3b82990176efa14fb8b05aee90a18e54bad3c5dd927a799670780615582d65308cc265318dc8d6e4be3cece3e3eb8795d0e6ab9ad56df7278a31b71e7517b0b0
+EBUILD tlswrap-1.04-r3.ebuild 827 SHA256 32b0b8be79586c3947e5fed07635313402260f42ae22f7062d49e241d1596ee5 SHA512 929d178f567617c0259ae149f7e52a547f7af398a40b7c85d9e63f24949622e44b30b241085e1a8f58db6c5145ea0595a688db04937be29b164e86bedb77b2a5 WHIRLPOOL c905db3f085d18d3db62ff8748c212175f9a2edd3cb93b0d84b78c6c060ab3f59b98cbcd6f6382f9cc4e31c545687fcd2732416fdd8176e15e0ffc972f75a9b2
+MISC ChangeLog 4391 SHA256 3661355afb520e14acf488541ffd0f467cd4cb5d14deeb1f2c05fc14fbb98925 SHA512 9ee20bd7f41f9dbf672152c62129725cfafd584760f96e030cef8033d5be442a0c6a6620853840aeb2a1565e476b6ffd6140d9e24b5c48feabad0ba09cc11c85 WHIRLPOOL ae1f8fa460ef08f960c92fa91338afc67f2b3594200e77285bbdad5fe6e98bb027a7160d9d8555779758db00f1e583dfe6c522e903d4dad96589a43142156800
+MISC ChangeLog-2015 1301 SHA256 a2be5379b95064b0f29d15f2848aa2c24d57c0302070e93aa4e5e3e4f306292c SHA512 c9a560f9f9d79f6b6bca8a6acba480ddf3439fbb78f1de389660825d57a719b20398f7bc2f71cb35299eb93396225ba033dfb6cce2ed282ae47b6015ae53e631 WHIRLPOOL f2d54a098c14d61737034fb9d5fecd491966c6a8fd0e61f47a48dbd6bc3b1e8822a66ad47a82b7064b7afcf6a65a5a396b7e2a9cfd779d0451ca7cca4516019c
+MISC metadata.xml 305 SHA256 6daf7ee66c78d50ad167abf25f8292e78c2f84e31881f8737b954acfa982e212 SHA512 4a622677eeb69709c3ca1f15cadadc536f5478afcbcf673bd0f4247c9f8f099f267343634c61942104989dd428b39082fd05b4d048694c55698a5e30a9530c95 WHIRLPOOL d74966b415b617efa1e0c795eb58ffc4950970ef4f9727bbe63df465168401962df76b23a1a742d6f2ba73439627b34d143b6f94b5323eb63b948a944b1df9f6
diff --git a/net-ftp/tlswrap/files/fix-Wformat-security-warnings.patch b/net-ftp/tlswrap/files/fix-Wformat-security-warnings.patch
new file mode 100644
index 000000000000..e90ffffc4335
--- /dev/null
+++ b/net-ftp/tlswrap/files/fix-Wformat-security-warnings.patch
@@ -0,0 +1,67 @@
+From dbbc4b17b5fdd08b11b0f285cfc99a28be8a89e5 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 11 Aug 2016 13:05:43 -0400
+Subject: [PATCH 3/3] Fix -Wformat-security warnings by adding trivial format
+ strings.
+
+Newer versions of GCC have the option to output warnings for insecure
+(e.g. missing) format string usage. A few places were making calls to
+the printf family of functions, and passing in a string variable
+without a format string. In all cases, the desired format string was
+simply "%s", intended to print the sole argument, and that "%s" has
+been added.
+
+This eliminates the warnings, and allows the build to complete when
+-Werror=format-security is used.
+---
+ misc.c | 4 ++--
+ parse.c | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/misc.c b/misc.c
+index ebaabb2..d9bb150 100644
+--- a/misc.c
++++ b/misc.c
+@@ -164,7 +164,7 @@ int print_to_ud(struct user_data *ud, const char *s) {
+ size_t slen;
+ char str[1024];
+
+- snprintf(str, sizeof(str), s);
++ snprintf(str, sizeof(str), "%s", s);
+
+ slen = strlen(str); /* NOT including null char */
+
+@@ -184,7 +184,7 @@ int print_to_serv(struct user_data *ud, const char *s) {
+ size_t slen;
+ char str[130];
+
+- snprintf(str, sizeof(str), s);
++ snprintf(str, sizeof(str), "%s", s);
+ slen = strlen(str); /* NOT including null char */
+ if ( (&ud->u2s_buf[U2S_SIZE]-ud->u2s_i)<slen) {
+ printf("print_to_ud: can't fit string to buffer\n");
+diff --git a/parse.c b/parse.c
+index 1174202..ac4529f 100644
+--- a/parse.c
++++ b/parse.c
+@@ -345,7 +345,7 @@ parse_serv_buf(struct user_data *ud, int index, char *ucertspath, char *cafile)
+ ud->serv_status = SERV_PBSZ;
+ snprintf(s, sizeof(s), "PROT %c\r\n", ud->prot);
+ if (debug)
+- printf(s);
++ printf("%s", s);
+ print_to_serv(ud,s);
+ } else if ((ud->serv_status == SERV_PBSZ) && (strncasecmp(dst,"200 ",4) == 0) ) {
+ ud->serv_status = SERV_PROT;
+@@ -365,7 +365,7 @@ parse_serv_buf(struct user_data *ud, int index, char *ucertspath, char *cafile)
+ } else if (ud->delay_prot && (ud->serv_status == SERV_PROT) && (strncasecmp(dst,"230 ",4) == 0) ) {
+ snprintf(s, sizeof(s), "PROT %c\r\n", ud->prot);
+ if (debug)
+- printf(s);
++ printf("%s", s);
+ print_to_serv(ud,s);
+ } else if (ud->delay_prot && (ud->serv_status == SERV_PROT) && (strncasecmp(dst,"200 ",4) == 0) ) {
+ write(ud->user_fd, "230 Bypassed login text because the ftpd can't handle PROT before USER.\r\n", 73);
+--
+2.7.3
+
diff --git a/net-ftp/tlswrap/files/modernize-am_init_automake.patch b/net-ftp/tlswrap/files/modernize-am_init_automake.patch
new file mode 100644
index 000000000000..6171e45801ab
--- /dev/null
+++ b/net-ftp/tlswrap/files/modernize-am_init_automake.patch
@@ -0,0 +1,30 @@
+From 4d6541b108ab59e30e7413a5bc62f29bbc1fd2ab Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 11 Aug 2016 13:00:53 -0400
+Subject: [PATCH 2/3] Modernize the AM_INIT_AUTOMAKE invocation.
+
+The existing call to AM_INIT_AUTOMAKE, which passed both the project
+name and its version, had been deprecated. These days, you're supposed
+to pass those things to AC_INIT, and then call AM_INIT_AUTOMAKE with
+no arguments. This commit does that, and fixes the version number in
+the process.
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 575a5ab..fe26bad 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1,6 +1,6 @@
+ dnl Process this file with autoconf to produce a configure script.
+-AC_INIT(tlswrap.c)
+-AM_INIT_AUTOMAKE(tlswrap, 0.8)
++AC_INIT(tlswrap.c, 1.04)
++AM_INIT_AUTOMAKE
+
+ dnl
+ dnl Get cannonical host
+--
+2.7.3
+
diff --git a/net-ftp/tlswrap/files/respect-cflags.patch b/net-ftp/tlswrap/files/respect-cflags.patch
new file mode 100644
index 000000000000..38da48b167e4
--- /dev/null
+++ b/net-ftp/tlswrap/files/respect-cflags.patch
@@ -0,0 +1,66 @@
+From 1a38cd3f931d728fc7a2bcfdf1fa19510a19acde Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 11 Aug 2016 12:53:53 -0400
+Subject: [PATCH 1/3] Rename configure.in to configure.ac and respect the
+ user's CFLAGS.
+
+The name configure.in has been deprecated for a long time, so the
+first order of business was to rename it to configure.ac.
+
+To respect the user's CFLAGS, the most important change was to remove
+the line CFLAGS="-g" which wiped out any pre-existing CFLAGS and
+replaced them all with just "-g". There was also a test for GCC that
+would append a few flags like "-O2" and "-Wall" to the user's CFLAGS
+if the configure script detected GCC. That test was modified to only
+trigger when the user's CFLAGS were unset, and in that case, the (now
+removed) "-g" flag was added back.
+
+The end result of the CFLAGS changes is that a default set of CFLAGS
+will be used for GCC, but only if the user does not have any CFLAGS
+previously set. The default behavior should be completely unchanged
+when CFLAGS="".
+
+Gentoo-Bug: 240898
+---
+ configure.in => configure.ac | 17 ++++-------------
+ 1 file changed, 4 insertions(+), 13 deletions(-)
+ rename configure.in => configure.ac (84%)
+
+diff --git a/configure.in b/configure.ac
+similarity index 84%
+rename from configure.in
+rename to configure.ac
+index dd0ee15..575a5ab 100644
+--- a/configure.in
++++ b/configure.ac
+@@ -6,23 +6,14 @@ dnl
+ dnl Get cannonical host
+ dnl
+
+-CFLAGS="-g"
+-
+ dnl Checks for programs.
+ AC_PROG_CC
+-if test "$GCC" = "yes" && test "$CC" != "icc"; then CFLAGS="$CFLAGS -O2 -Wall -Wmissing-prototypes"; fi
+-# if test -n "$GCC"; then
+-# CFLAGS="$CFLAGS -O2 -Wall -Wmissing-prototypes"
+-# else
+- #case "$host_os" in
+-# *hpux*) CFLAGS="$CFLAGS +O3" ;;
+-# *ultrix* | *osf*) CFLAGS="$CFLAGS -O -Olimit 2000" ;;
+-# *) CFLAGS="$CFLAGS -O" ;;
+-# esac
+-# fi
++if test "$GCC" = "yes" && test "$CC" != "icc" && test -z "$CFLAGS" ; then
++ CFLAGS="-g -O2 -Wall -Wmissing-prototypes";
++fi
+
+ AC_CYGWIN
+-if test "$CYGWIN" = "yes"; then CFLAGS="$CFLAGS -Dsys_errlist=_imp___sys_errlist"; fi
++if test "$CYGWIN" = "yes"; then CFLAGS="$CFLAGS -g -Dsys_errlist=_imp___sys_errlist"; fi
+ checkssldir() { :
+ if test -f "$1/include/openssl/ssl.h"; then
+ # AC_DEFINE(HAVE_OPENSSL)
+--
+2.7.3
+
diff --git a/net-ftp/tlswrap/files/tlswrap-1.04-libressl.patch b/net-ftp/tlswrap/files/tlswrap-1.04-libressl.patch
new file mode 100644
index 000000000000..5c1f1083005f
--- /dev/null
+++ b/net-ftp/tlswrap/files/tlswrap-1.04-libressl.patch
@@ -0,0 +1,16 @@
+diff -Naur a/tls.c b/tls.c
+--- a/tls.c 2006-11-25 19:52:08.000000000 +0100
++++ b/tls.c 2015-11-10 16:16:25.000000000 +0100
+@@ -73,10 +73,12 @@
+ printf("egd_sock is %s\n", egd_sock);
+ #ifdef HAVE_RAND_STATUS
+ if (RAND_status() != 1) {
++#ifndef OPENSSL_NO_EGD
+ if ( RAND_egd(egd_sock) == -1 ) {
+ fprintf(stderr, "egd_sock is %s\n", egd_sock);
+ sys_err("RAND_egd failed\n");
+ }
++#endif
+ if (RAND_status() != 1)
+ sys_err("ssl_init: System without /dev/urandom, PRNG seeding must be done manually.\r\n");
+ }
diff --git a/net-ftp/tlswrap/files/tlswrap.init b/net-ftp/tlswrap/files/tlswrap.init
new file mode 100644
index 000000000000..a454c1692260
--- /dev/null
+++ b/net-ftp/tlswrap/files/tlswrap.init
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting tlswrap"
+ start-stop-daemon --start --exec /usr/bin/tlswrap >/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping tlswrap"
+ start-stop-daemon --stop --exec /usr/sbin/tlswrap
+ eend $?
+}
diff --git a/net-ftp/tlswrap/metadata.xml b/net-ftp/tlswrap/metadata.xml
new file mode 100644
index 000000000000..b960b5a2c17d
--- /dev/null
+++ b/net-ftp/tlswrap/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription lang="en">
+ TLSWRAP is a TLS/SSL FTP wrapper/proxy which allows to use TLS with
+ every FTP client
+ </longdescription>
+</pkgmetadata>
diff --git a/net-ftp/tlswrap/tlswrap-1.04-r3.ebuild b/net-ftp/tlswrap/tlswrap-1.04-r3.ebuild
new file mode 100644
index 000000000000..f560a6c65370
--- /dev/null
+++ b/net-ftp/tlswrap/tlswrap-1.04-r3.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="FTP wrapper which supports TLS with every FTP client"
+HOMEPAGE="http://www.tlswrap.com/"
+SRC_URI="http://www.tlswrap.com/${P}.tar.gz"
+
+# GPL-2 for Gentoo init script
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="libressl"
+
+DEPEND="!libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-libressl.patch"
+ "${FILESDIR}/respect-cflags.patch"
+ "${FILESDIR}/modernize-am_init_automake.patch"
+ "${FILESDIR}/fix-Wformat-security-warnings.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_install() {
+ emake prefix="${D}/usr" install
+ dodoc ChangeLog README
+ newinitd "${FILESDIR}/tlswrap.init" tlswrap
+}