diff options
author | Mike Frysinger <vapier@gentoo.org> | 2014-03-31 04:27:28 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2014-03-31 04:27:28 +0000 |
commit | 6a5a51e348062004a0a75118e7c107562468f614 (patch) | |
tree | 537304e4b14dc6b2c8e519181ea6d8e864a467a6 /net-libs/ftplib | |
parent | Version bump. (diff) | |
download | historical-6a5a51e348062004a0a75118e7c107562468f614.tar.gz historical-6a5a51e348062004a0a75118e7c107562468f614.tar.bz2 historical-6a5a51e348062004a0a75118e7c107562468f614.zip |
Fix crash in FtpClose and other issues. Convert to multilib-minimal.
Package-Manager: portage-2.2.10/cvs/Linux x86_64
Manifest-Sign-Key: 0xD2E96200
Diffstat (limited to 'net-libs/ftplib')
-rw-r--r-- | net-libs/ftplib/ChangeLog | 8 | ||||
-rw-r--r-- | net-libs/ftplib/Manifest | 30 | ||||
-rw-r--r-- | net-libs/ftplib/files/ftplib-4.0-crash.patch | 116 | ||||
-rw-r--r-- | net-libs/ftplib/ftplib-4.0-r1.ebuild | 46 |
4 files changed, 185 insertions, 15 deletions
diff --git a/net-libs/ftplib/ChangeLog b/net-libs/ftplib/ChangeLog index b026c3c09672..cc55f493a085 100644 --- a/net-libs/ftplib/ChangeLog +++ b/net-libs/ftplib/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-libs/ftplib # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-libs/ftplib/ChangeLog,v 1.3 2014/03/23 06:54:44 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-libs/ftplib/ChangeLog,v 1.4 2014/03/31 04:27:25 vapier Exp $ + +*ftplib-4.0-r1 (31 Mar 2014) + + 31 Mar 2014; Mike Frysinger <vapier@gentoo.org> +files/ftplib-4.0-crash.patch, + +ftplib-4.0-r1.ebuild: + Fix crash in FtpClose and other issues. Convert to multilib-minimal. 23 Mar 2014; Mike Frysinger <vapier@gentoo.org> ftplib-4.0.ebuild: Update LICENSE to match source changes. diff --git a/net-libs/ftplib/Manifest b/net-libs/ftplib/Manifest index efabe6b7df12..ced2ada34865 100644 --- a/net-libs/ftplib/Manifest +++ b/net-libs/ftplib/Manifest @@ -1,27 +1,29 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 +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 1208 SHA256 f37fff7b8e7af3296a65191fb37a3606292adce6d58cb3d13002cc34610981e5 SHA512 8d97bf5873fdbdb6fb5e23018003e1435334f2bde05b0c26a07b1257113b610766579b600381604361a4b44187029161160dd96cbed5fe560acddb0b795e137e WHIRLPOOL 92db63f2960f29702596c5620378dbb1a42ccb34a2bde5984bcbaf60f07ac4ebfff5443e8458f54188401e3711bb37c23df4c1308e63778c229a022ff9df02a4 +EBUILD ftplib-4.0-r1.ebuild 1127 SHA256 95a969fb63330806eedfa60c3a2073a5e9f0d0d7dff9fe1208b1730949809f7e SHA512 3da7d1d74cd476079f05ec99453c45899c655e6ab597f0e489a4aab212626e1d7311f6170ffe160e4a7548cf5f50eb7329957c23af9d3c69859a65744c5c1c47 WHIRLPOOL f1d5af6796a53378177da85482820435f6b02415642f21ad7f6a5c0487676f872c0ffcb072a47fd70d5004c69c6f56720f62d20851950bc069cdd08a1df69fc7 EBUILD ftplib-4.0.ebuild 971 SHA256 2eddf56156f0717a6acf0e411957581714ba819c94b8ddc8b90aff763e335e1f SHA512 d1d57e301dc2d17927b352966d2d556900983624503930b90f2c6c7f0b48adcf737331048341db2a48c6595c945cf72a39649f7fbac7bd5de8d1d2a475b2bf8e WHIRLPOOL 5094e974dca743ee8a9c9e636d1f78c38298e35ca34803bede101e8c65f0d3313f229994ca1a6572b76895a7330ab2f94bcb7b2dc44cb2d9c5eed793c155cf49 -MISC ChangeLog 552 SHA256 94c88f2019c7db33998404d54a0ba4beb6f756c18c0ba1e578941f8dfb98808b SHA512 3ca0b96ffbfe4274b998bc2301c0e39e8b0a025dc5778e9d1a0959fa0a67c4cdf8f3fc300f157c44cc2d4a0e7796dfdaeac5de9a463a1209dd2be3c64ca3ca79 WHIRLPOOL eb0a66f42041d15b0004788785ddf3be1652ccdd656f04669501974e421ee7ae56830f6a67773c6c8b33e175b05dd53a3a9839280b0eb130aad739e59bc6a8b3 +MISC ChangeLog 761 SHA256 2392951563923072adcb4081ed5299e8d3e54d8a57ea48f3623e7f7b3212f564 SHA512 4af471f57fa058d1d9eaf5c6cb01761abc579fc28b20036f650a64ab4a36befa82e59c108e807acd760071e79413df232ebbefc352573b55bfca44b9ba21e3a3 WHIRLPOOL a5f4bf98189353014f2c87ac3ebf6ba42848e9e00fe9a52c8126ca476f16ec821f35ef0f8064d5c92e0885e941563dc39f67adacfee52037d85e14eb2e895932 MISC metadata.xml 233 SHA256 2e54b419554b54671e04a167f2fa56d52d8f0b509157ba98695c01d860b3196a SHA512 89b49780f54132f4768196e82bc7c534157728f4ec8db2a2ce9c2748859d136a7622d5239848010ab72aea19ebfb0eea3d8563737b5b888a09f56134e3424c87 WHIRLPOOL 86f0c2c9825ec94c962485b82d678e412401eb73e74d030cdc4308e015880b0a0e77bf5ea671f0920d5e9e91b5c732c13bdb5903fbb6d0485dfad9026d554e6c -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) -iQIcBAEBCAAGBQJTLoU8AAoJEPGu1DbS6WIAIxMP/j6RC4Lf0eE5pFZLmpwRrJG7 -jrDTlZnGzDOw6fjEC6YdOp8iP+v17oHK1LbVkNYTUHBKTfMStPiV/QJ80HccYRgJ -iNiy31y7yLXNXpnTR3aTOHyTtaOU4rl8OfTHztIjMt9lls+BNpz7DXwplHxQVbeJ -y7LN1emsMa7QDHiixKv/u1aErm+V5dpS8AUlqnCuG4SW8FVx0GD2fQyMGcTj3fa1 -vjmYbCiBtDENahtEzcbXe1Me3g6st+srNui84OIKiumoA0cHPY1mVgahkjku4oLu -/J8TmLPN+jr40OnfqhkvV1xBIFMjA856liFkNSyACouJPwc4W2yEQlMilFVOV6la -cqlJSoOMXNqA7hi8KC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vK -----END PGP SIGNATURE----- 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-4.0-r1.ebuild b/net-libs/ftplib/ftplib-4.0-r1.ebuild new file mode 100644 index 000000000000..72df2d373b66 --- /dev/null +++ b/net-libs/ftplib/ftplib-4.0-r1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-libs/ftplib/ftplib-4.0-r1.ebuild,v 1.1 2014/03/31 04:27:25 vapier Exp $ + +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/* +} |