summaryrefslogtreecommitdiff
path: root/net-libs/ftplib
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-libs/ftplib
reinit the tree, so we can have metadata
Diffstat (limited to 'net-libs/ftplib')
-rw-r--r--net-libs/ftplib/Manifest10
-rw-r--r--net-libs/ftplib/files/ftplib-4.0-crash.patch116
-rw-r--r--net-libs/ftplib/ftplib-3.1.1.ebuild43
-rw-r--r--net-libs/ftplib/ftplib-4.0-r1.ebuild45
-rw-r--r--net-libs/ftplib/ftplib-4.0.ebuild36
-rw-r--r--net-libs/ftplib/metadata.xml7
6 files changed, 257 insertions, 0 deletions
diff --git a/net-libs/ftplib/Manifest b/net-libs/ftplib/Manifest
new file mode 100644
index 000000000000..395784bf484c
--- /dev/null
+++ b/net-libs/ftplib/Manifest
@@ -0,0 +1,10 @@
+AUX ftplib-4.0-crash.patch 3277 SHA256 220c4908630f74f3a78f636718aa0fdb99a0f14c3702f8673b35e9a08753363c SHA512 9030a24aec67cc7a857bcb8b22aec66a8175ef3ce2bc6a82444301b06a2a51c7e9c3d439684189aab046c7f61aeb8405370d224ee63c357698a34f0421c5768e WHIRLPOOL 812226805ef77ed631339ea66d8b28fbddbc5d2443a6e8389d7290417af884639687c72098c1fa96958d123c3d26d9d46f6d40529a76dd9878a17527026a55a4
+DIST ftplib-4.0.tar.gz 66680 SHA256 a9fabf1fdb2d6cc3713fd5413724ecc266f438a53a24595619080db9e51426a1 SHA512 ff39c243a6acbb67a8d2779f34b59f69f45d578ea3976c14aee1abcc56bf16cbbc6518ba96a4ccf34f6dd469eef388043caf066858b8df24bebfab7ab30a1c62 WHIRLPOOL 710035aa579611790d1991c0f48628c808a703f410db4d2f545b099449e3c3d3a76897d01ae1c50f47485f4b7b76492f1e2ac52445a4cc9264c41208f84500db
+DIST ftplib_3.1-1-9.debian.tar.gz 8560 SHA256 92aa7dc894cc144d3f92c7a5e60f1ea57c78eef2f93e4449242ad03aaef50644 SHA512 c87fb17bca4616d85f064f718161071b35a0e3f1c84ce8f13b4cd9f9b75f5115a4c518680d77af240196f0b2ee5eff520e0d4a0b87c797554c1ee8caa4962e07 WHIRLPOOL 6545603c973516a9fb180da3f39b741eb84e9cb2b383e4eff4ff75c55271c2e73d2547b790f841135688b5a7ec4fc1a6f95c8ff1745bea10c4ff2a73ecac0b62
+DIST ftplib_3.1-1.orig.tar.gz 90724 SHA256 64161ea4aeb1a1314eb821584521f97a1cac18b01e77722687666a1835a0b76d SHA512 5a0116ce1526f77532ced94c00bc1199378da1e1707c86637c83c6e9a27fef3a290bfefb7fc537946219587625b39560399cf136b83878a7829a2f3bee5f926f WHIRLPOOL 21df0807a5d3fa506cc6c10c7116f268b08cbab2af187aa6cc96c3b63fb0e1cc1b61ef32d1bb6c4f99d9122adc579a75d97095ae530abb112cd6fe38c472be19
+EBUILD ftplib-3.1.1.ebuild 1095 SHA256 bc03bd0c07a94f755f0923e082b0ce0739f98df3dbe4f938750b1f7e4f51875f SHA512 f7556af1e04bc9e668b4997e2981561fd922a1c624bcf8df51b2ef30ffa6acff08209151460f68b5d0751d1c7ab2c169570d7040fb39d21ff0da2d450f8a938b WHIRLPOOL 4921420a17df37818fb9d2698fccc076c1d7160d5c838d93b3ee7ac54d3600b15d00fa475b1dd5a0d52f79bb22e5cfc5f016074b02cf2c3707b165ca9378d3c0
+EBUILD ftplib-4.0-r1.ebuild 1016 SHA256 224f4c2fc3a4c9ce4286ced6af61bb640ba03fa916242660dc580283c147e02d SHA512 f5d86f2761d039891b94eb163c4700a3ec55d14155cc848cec69df02d20b4063576b786f53aafb582eb604f4d33b67154a7f934be575885e328efbd61e6d3aa8 WHIRLPOOL 21b799d094028e52ca254bfb764ec8b7e2283381dfe476bb6f9cb99211b99eff3d2785f5896e287d34e777f036e49e5233ff76e839d0694ca538e45afcc3a4e7
+EBUILD ftplib-4.0.ebuild 863 SHA256 644cb1e09798f40922465de287d73da69da333178f7a0e42e6acc32bcd941f5b SHA512 5d3a79f831504f72d66045bcfc7f159590525ace2d3d745cbe32394318dfc88f9b3905ffe5a98a778b185796782b29aee4e660654a17b99e2bdbfe334fcf0c4f WHIRLPOOL df3d5102b11ff0fc47f57803945ba6530402ca69ab8047929a2321ad441723279cc96d5e5ed30a818d3d35ea94af0b47fab451d9d0760aaaef368827ce019074
+MISC ChangeLog 2555 SHA256 9cb4bbe6fa114ad2f2add3c59a60dda3a5f3cc715665934b4c8a6c048c982aaa SHA512 24511a09837cb19daf5ae3e12756871d13f6df0047ff6f145bb9a3c7e111bca9a1ac6069c74a84731f5868691cd59a699caf5c550a360391f703de228160460a WHIRLPOOL 23dd95485567db7508358a4721042c2e282a7eeee413af9a91cb6beda2c7e90d52106d32c8ff73cb0a68bf28fb02a1c3de07da2b852ce009b5e4bab581a15cc5
+MISC ChangeLog-2015 761 SHA256 2392951563923072adcb4081ed5299e8d3e54d8a57ea48f3623e7f7b3212f564 SHA512 4af471f57fa058d1d9eaf5c6cb01761abc579fc28b20036f650a64ab4a36befa82e59c108e807acd760071e79413df232ebbefc352573b55bfca44b9ba21e3a3 WHIRLPOOL a5f4bf98189353014f2c87ac3ebf6ba42848e9e00fe9a52c8126ca476f16ec821f35ef0f8064d5c92e0885e941563dc39f67adacfee52037d85e14eb2e895932
+MISC metadata.xml 227 SHA256 01fa256b46c60492ca90de4799686bcfdc89c3d2657c020fb5a6035deee6af24 SHA512 d39fc0676c06bf09884fa817e0d5dc386a536d5626a9c2cf34ddb8b7e29d612ecb2c617214788ffe729c5118c632c119e03ce6d38f17114c48c090c82a2ec2e5 WHIRLPOOL 9420098faad521e4aa31e2458613159422d2548449cdaf06be90bdbcd53435f73e8a9e343718368a0beadb058abae8803ffa1425ef62859f1b605c2e0d8344e7
diff --git a/net-libs/ftplib/files/ftplib-4.0-crash.patch b/net-libs/ftplib/files/ftplib-4.0-crash.patch
new file mode 100644
index 000000000000..c984e2d81b19
--- /dev/null
+++ b/net-libs/ftplib/files/ftplib-4.0-crash.patch
@@ -0,0 +1,116 @@
+include sys/select.h for the select() prototype on unix systems.
+
+fix warning about using chars as subscripts in arrays. on many systems, isdigit
+turns into an index of an array, so the pnum char needs to be casted to an int.
+the spec says these funcs take an int, not a char.
+
+fix warnings about the rv return value being uninitialized in FtpAcceptConnection.
+
+fix a crasher in FtpClose where it derefs the ctrl pointer before checking
+if it's NULL.
+
+fix the FtpQuit API to return 0/1 as it's documented so the caller can detect.
+
+patch by Mike Frysinger <vapier@gentoo.org>
+
+--- a/src/ftplib.c
++++ b/src/ftplib.c
+@@ -31,6 +32,7 @@
+ #if defined(__unix__)
+ #include <sys/time.h>
+ #include <sys/types.h>
++#include <sys/select.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <netdb.h>
+@@ -453,7 +456,7 @@ GLOBALDEF int FtpConnect(const char *hos
+ pnum = "ftp";
+ else
+ *pnum++ = '\0';
+- if (isdigit(*pnum))
++ if (isdigit((int)*pnum))
+ sin.sin_port = htons(atoi(pnum));
+ else
+ {
+@@ -841,7 +862,7 @@ static int FtpAcceptConnection(netbuf *n
+ int i;
+ struct timeval tv;
+ fd_set mask;
+- int rv;
++ int rv = 0;
+
+ FD_ZERO(&mask);
+ FD_SET(nControl->handle, &mask);
+@@ -858,14 +879,12 @@ static int FtpAcceptConnection(netbuf *n
+ sizeof(nControl->response));
+ net_close(nData->handle);
+ nData->handle = 0;
+- rv = 0;
+ }
+ else if (i == 0)
+ {
+ strcpy(nControl->response, "timed out waiting for connection");
+ net_close(nData->handle);
+ nData->handle = 0;
+- rv = 0;
+ }
+ else
+ {
+@@ -885,7 +904,6 @@ static int FtpAcceptConnection(netbuf *n
+ strncpy(nControl->response, strerror(i),
+ sizeof(nControl->response));
+ nData->handle = 0;
+- rv = 0;
+ }
+ }
+ else if (FD_ISSET(nControl->handle, &mask))
+@@ -893,7 +911,6 @@ static int FtpAcceptConnection(netbuf *n
+ net_close(nData->handle);
+ nData->handle = 0;
+ readresp('2', nControl);
+- rv = 0;
+ }
+ }
+ return rv;
+@@ -1054,10 +1054,11 @@ GLOBALDEF int FtpClose(netbuf *nData)
+ net_close(nData->handle);
+ ctrl = nData->ctrl;
+ free(nData);
+- ctrl->data = NULL;
+- if (ctrl && ctrl->response[0] != '4' && ctrl->response[0] != 5)
++ if (ctrl)
+ {
+- return(readresp('2', ctrl));
++ ctrl->data = NULL;
++ if (ctrl->response[0] != '4' && ctrl->response[0] != 5)
++ return readresp('2', ctrl);
+ }
+ return 1;
+ case FTPLIB_CONTROL:
+@@ -1442,12 +1443,13 @@ GLOBALDEF int FtpDelete(const char *fnm, netbuf *nControl)
+ *
+ * return 1 if successful, 0 otherwise
+ */
+-GLOBALDEF void FtpQuit(netbuf *nControl)
++GLOBALDEF int FtpQuit(netbuf *nControl)
+ {
+ if (nControl->dir != FTPLIB_CONTROL)
+- return;
++ return 0;
+ FtpSendCmd("QUIT",'2',nControl);
+ net_close(nControl->handle);
+ free(nControl->buf);
+ free(nControl);
++ return 1;
+ }
+--- a/src/ftplib.h
++++ b/src/ftplib.h
+@@ -111,7 +111,7 @@ GLOBALREF int FtpPut(const char *input, const char *path, char mode,
+ netbuf *nControl);
+ GLOBALREF int FtpRename(const char *src, const char *dst, netbuf *nControl);
+ GLOBALREF int FtpDelete(const char *fnm, netbuf *nControl);
+-GLOBALREF void FtpQuit(netbuf *nControl);
++GLOBALREF int FtpQuit(netbuf *nControl);
+
+ #ifdef __cplusplus
+ };
diff --git a/net-libs/ftplib/ftplib-3.1.1.ebuild b/net-libs/ftplib/ftplib-3.1.1.ebuild
new file mode 100644
index 000000000000..dc54756b3b4e
--- /dev/null
+++ b/net-libs/ftplib/ftplib-3.1.1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit eutils multilib toolchain-funcs versionator
+
+DEB_REV=9
+MY_PV=$(replace_version_separator 2 -)
+
+DESCRIPTION="A set of routines that implement the FTP protocol"
+HOMEPAGE="http://nbpfaus.net/~pfau/ftplib/"
+DEB_URI="mirror://debian/pool/main/f/${PN}"
+SRC_URI="${DEB_URI}/${PN}_${MY_PV}.orig.tar.gz
+ ${DEB_URI}/${PN}_${MY_PV}-${DEB_REV}.debian.tar.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+src_prepare() {
+ epatch "${WORKDIR}"/debian/patches/{check-getservbyname-failure,fix-ascii-read-without-eol}
+
+ sed -i \
+ -e '/shared/s:$(CC):$(CC) $(LDFLAGS):' \
+ -e 's:/usr/local:$(DESTDIR)/usr:' \
+ -e '/^LDFLAGS/s:=:+=:' \
+ -e "s:/lib:/$(get_libdir):" \
+ linux/Makefile || die
+}
+
+src_compile() {
+ tc-export CC
+ emake -C linux DEBUG="${CFLAGS}"
+}
+
+src_install() {
+ dodir /usr/bin /usr/include /usr/$(get_libdir)
+ emake -C linux DESTDIR="${D}" install
+ dodoc additional_rfcs CHANGES ftplib.lsm NOTES README* RFC959.txt TODO
+}
diff --git a/net-libs/ftplib/ftplib-4.0-r1.ebuild b/net-libs/ftplib/ftplib-4.0-r1.ebuild
new file mode 100644
index 000000000000..9d3e7f9c5192
--- /dev/null
+++ b/net-libs/ftplib/ftplib-4.0-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit multilib multilib-minimal toolchain-funcs eutils
+
+DESCRIPTION="A set of routines that implement the FTP protocol"
+HOMEPAGE="http://nbpfaus.net/~pfau/ftplib/"
+SRC_URI="http://nbpfaus.net/~pfau/ftplib/${P}.tar.gz"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_prepare() {
+ sed -i \
+ -e '/shared/s:$(CC):$(CC) $(LDFLAGS):' \
+ -e 's:/usr/local:$(DESTDIR)/usr:' \
+ -e '/^LDFLAGS/s:=:+=:' \
+ -e "s:/lib:/$(get_libdir):" \
+ -e '/ar -rcs/s:ar:$(AR):' \
+ src/Makefile || die
+ epatch "${FILESDIR}"/${PN}-4.0-crash.patch
+
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ emake -C src \
+ DEBUG="${CFLAGS} ${CPPFLAGS}" \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)"
+}
+
+multilib_src_install() {
+ dodir /usr/bin /usr/include /usr/$(get_libdir)
+ emake -C src DESTDIR="${ED}" install
+}
+
+multilib_src_install_all() {
+ dodoc additional_rfcs CHANGES README* RFC959.txt
+ dohtml html/*
+}
diff --git a/net-libs/ftplib/ftplib-4.0.ebuild b/net-libs/ftplib/ftplib-4.0.ebuild
new file mode 100644
index 000000000000..11dcd2fe2bd0
--- /dev/null
+++ b/net-libs/ftplib/ftplib-4.0.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit eutils multilib toolchain-funcs versionator
+
+DESCRIPTION="A set of routines that implement the FTP protocol"
+HOMEPAGE="http://nbpfaus.net/~pfau/ftplib/"
+SRC_URI="http://nbpfaus.net/~pfau/ftplib/${P}.tar.gz"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_prepare() {
+ sed -i \
+ -e '/shared/s:$(CC):$(CC) $(LDFLAGS):' \
+ -e 's:/usr/local:$(DESTDIR)/usr:' \
+ -e '/^LDFLAGS/s:=:+=:' \
+ -e "s:/lib:/$(get_libdir):" \
+ -e '/ar -rcs/s:ar:$(AR):' \
+ src/Makefile || die
+}
+
+src_compile() {
+ tc-export AR CC
+ emake -C src DEBUG="${CFLAGS} ${CPPFLAGS}"
+}
+
+src_install() {
+ dodir /usr/bin /usr/include /usr/$(get_libdir)
+ emake -C src DESTDIR="${ED}" install
+ dodoc additional_rfcs CHANGES README* RFC959.txt
+ dohtml html/*
+}
diff --git a/net-libs/ftplib/metadata.xml b/net-libs/ftplib/metadata.xml
new file mode 100644
index 000000000000..106575f01e53
--- /dev/null
+++ b/net-libs/ftplib/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>