diff -Nru lua-curl-0.2.1/debian/changelog lua-curl-0.3.0/debian/changelog --- lua-curl-0.2.1/debian/changelog 2009-07-29 23:36:14.000000000 +0100 +++ lua-curl-0.3.0/debian/changelog 2009-07-29 23:36:14.000000000 +0100 @@ -1,3 +1,22 @@ +lua-curl (0.3.0-2~ppa1~intrepid) intrepid; urgency=low + + * PPA Release + + -- Marco Giorgi Wed, 29 Jul 2009 15:12:16 +0100 + +lua-curl (0.3.0-2) unstable; urgency=low + + * upload to unstable + * standards version bumped to 3.8.1, no changes needed + + -- Enrico Tassi Sun, 15 Mar 2009 10:08:46 +0100 + +lua-curl (0.3.0-1) experimental; urgency=low + + * New upstream release + + -- Enrico Tassi Sat, 25 Oct 2008 18:38:54 +0200 + lua-curl (0.2.1-3) unstable; urgency=low * Renamed cdbs deprecated variable diff -Nru /tmp/lDU6kVal3p/lua-curl-0.2.1/debian/control /tmp/LCcyFkzOkm/lua-curl-0.3.0/debian/control --- lua-curl-0.2.1/debian/control 2009-07-29 23:36:14.000000000 +0100 +++ lua-curl-0.3.0/debian/control 2009-07-29 23:36:14.000000000 +0100 @@ -1,16 +1,16 @@ Source: lua-curl Section: interpreters Priority: optional -Maintainer: Enrico Tassi +Maintainer: Marco Giorgi Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5), dpatch, libcurl4-gnutls-dev (>= 7.15.0-2), lua5.1-policy-dev (>= 8) -Standards-Version: 3.7.3 +Standards-Version: 3.8.0 Vcs-Svn: svn://svn.debian.org/pkg-lua/packages/lua-curl Vcs-Browser: http://svn.debian.org/viewsvn/pkg-lua/packages/lua-curl Homepage: http://www.luaforge.net/projects/luacurl Package: liblua5.1-curl0 Architecture: any -Depends: ${shlibs:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends} Description: libcURL bindings for the lua language version 5.1 This package contains the bindings for the cURL library. Currently many different implementations of cURL bindings are available, @@ -20,7 +20,7 @@ Package: liblua5.1-curl-dev Architecture: any Section: libdevel -Depends: liblua5.1-curl0 (= ${binary:Version}) +Depends: liblua5.1-curl0 (= ${binary:Version}), ${misc:Depends} Description: libcURL development files for the lua language version 5.1 This package contains the development files of the libcURL lua5.1 bindings, useful to create a statically linked binary (like a C application or a diff -Nru /tmp/lDU6kVal3p/lua-curl-0.2.1/exclude-dist /tmp/LCcyFkzOkm/lua-curl-0.3.0/exclude-dist --- lua-curl-0.2.1/exclude-dist 2007-02-15 16:08:55.000000000 +0000 +++ lua-curl-0.3.0/exclude-dist 2008-10-25 16:26:26.000000000 +0100 @@ -1 +1,4 @@ .svn +CVS +lua5_1_4_Win32_bin.zip +lua5_1_4_Win32_dll8_lib.zip diff -Nru /tmp/lDU6kVal3p/lua-curl-0.2.1/luabind.c /tmp/LCcyFkzOkm/lua-curl-0.3.0/luabind.c --- lua-curl-0.2.1/luabind.c 2007-02-15 16:08:56.000000000 +0000 +++ lua-curl-0.3.0/luabind.c 2008-10-25 16:26:26.000000000 +0100 @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: luabind.c,v 1.6 2005/06/30 22:06:12 gareuselesinge Exp $ + * $Id: luabind.c,v 1.4 2008/10/25 11:58:03 gareuselesinge Exp $ * This file is part of FreePOPs (http://www.freepops.org) * * This file is distributed under the terms of GNU GPL license or, at your * * option, MIT license . * diff -Nru /tmp/lDU6kVal3p/lua-curl-0.2.1/luabind.h /tmp/LCcyFkzOkm/lua-curl-0.3.0/luabind.h --- lua-curl-0.2.1/luabind.h 2007-02-15 16:08:56.000000000 +0000 +++ lua-curl-0.3.0/luabind.h 2008-10-25 16:26:26.000000000 +0100 @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: luabind.h,v 1.5 2005/06/30 22:06:12 gareuselesinge Exp $ + * $Id: luabind.h,v 1.4 2008/10/25 11:58:03 gareuselesinge Exp $ * This file is part of FreePOPs (http://www.freepops.org) * * This file is distributed under the terms of GNU GPL license or, at your * * option, MIT license. * diff -Nru /tmp/lDU6kVal3p/lua-curl-0.2.1/lua-curl.c /tmp/LCcyFkzOkm/lua-curl-0.3.0/lua-curl.c --- lua-curl-0.2.1/lua-curl.c 2007-02-15 16:08:56.000000000 +0000 +++ lua-curl-0.3.0/lua-curl.c 2008-10-25 16:26:26.000000000 +0100 @@ -9,11 +9,12 @@ - Enrico Tassi status: - - binds from 7.9.5 to 7.11.2 + - binds from 7.9.5 to 7.18.1 changelog: + - revamped to libcurl 7.18.1 - fixed large file support - - added a Makefile based on libtool as suggested in the debin + - added a Makefile based on libtool as suggested in the debian package of lua5.1 - first public release @@ -21,9 +22,16 @@ - WRITE_CB,READ_CB,DEBUG_CB must be identifyed by a unique pointer, but using CURL* + OFFSET may not be the case... think a bit more - CURLINFO ??? + - CURLOPT_COPYPOSTFIELDS + + missing: + - CURLOPT_IOCTLFUNCTION/DATA + - CURLOPT_SOCKOPTFUNCTION/DATA + - CURLOPT_OPENSOCKETFUNCTION/DATA + - CURLOPT_SEEKFUNCTION/DATA ****************************************************************************** - $Id: curl_lua.c,v 1.26 2006/01/13 21:46:54 gareuselesinge Exp $ + $Id: lua-curl.c,v 1.6 2008/10/25 14:38:29 gareuselesinge Exp $ ******************************************************************************/ #include #include @@ -35,6 +43,7 @@ #include #include "luabind.h" +#include "version.h" #if ! defined (LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 #include "compat-5.1.h" @@ -174,6 +183,39 @@ {NULL,0} }; #endif + +/****************************************************************************** + * table created with this script: + * + * cat /usr/include/curl/curl.h | grep -B10 '} curl_ftpauth' | \ + * grep "CURLFTPAUTH_" | \ + * grep -v "LAST.*never use" | \ + * sed "s/^ *CURL//" | sed "s/^\([^,]*\),.*$$/{\"\1\",CURL\1},/" \ + * > curl_ftpauthopt.h + */ +#if CURL_NEWER(7,12,2) +static const struct L_const curl_easy_ftpauth_c [] = { +#include "curl_ftpauthopt.h" + {NULL,0} +}; +#endif + +/****************************************************************************** + * table created with this script: + * + * cat /usr/include/curl/curl.h | grep -B10 '} curl_ftpmethod' | \ + * grep "CURLFTPMETHOD_" | \ + * grep -v "LAST.*never use" | \ + * sed "s/^ *CURL//" | sed "s/^\([^,]*\),.*$$/{\"\1\",CURL\1},/" \ + * > curl_ftpmethods.h + */ +#if CURL_NEWER(7,15,2) +static const struct L_const curl_easy_ftpmethods_c [] = { +#include "curl_ftpmethods.h" + {NULL,0} +}; +#endif + /****************************************************************************** * table created by hand: * @@ -771,6 +813,42 @@ switch(opt) { /* long */ +#if CURL_NEWER(7,18,0) + case CURLOPT_PROXY_TRANSFER_MODE: +#endif +#if CURL_NEWER(7,17,1) + case CURLOPT_POST301: +#endif +#if CURL_NEWER(7,16,4) + case CURLOPT_NEW_FILE_PERMS: + case CURLOPT_NEW_DIRECTORY_PERMS: +#endif +#if CURL_NEWER(7,16,2) + case CURLOPT_HTTP_CONTENT_DECODING: + case CURLOPT_HTTP_TRANSFER_DECODING: + case CURLOPT_TIMEOUT_MS: + case CURLOPT_CONNECTTIMEOUT_MS: +#endif +#if CURL_NEWER(7,16,0) + case CURLOPT_SSL_SESSIONID_CACHE: +#endif +#if CURL_NEWER(7,15,2) + case CURLOPT_FTP_FILEMETHOD: +#endif +#if CURL_NEWER(7,15,2) + case CURLOPT_CONNECT_ONLY: + case CURLOPT_LOCALPORT: + case CURLOPT_LOCALPORTRANGE: +#endif +#if CURL_NEWER(7,15,0) + case CURLOPT_FTP_SKIP_PASV_IP: +#endif +#if CURL_NEWER(7,14,1) + case CURLOPT_IGNORE_CONTENT_LENGTH: +#endif +#if CURL_NEWER(7,12,2) + case CURLOPT_FTPSSLAUTH: +#endif case CURLOPT_SSLENGINE_DEFAULT: case CURLOPT_SSLVERSION: case CURLOPT_SSL_VERIFYPEER: @@ -839,8 +917,12 @@ rc = curl_easy_setopt(c,opt,par); }break; -#if CURL_NEWER(7,11,1) /* curl_off_t */ +#if CURL_NEWER(7,15,5) + case CURLOPT_MAX_SEND_SPEED_LARGE: + case CURLOPT_MAX_RECV_SPEED_LARGE: +#endif +#if CURL_NEWER(7,11,1) case CURLOPT_POSTFIELDSIZE_LARGE: case CURLOPT_RESUME_FROM_LARGE: case CURLOPT_INFILESIZE_LARGE: @@ -856,6 +938,18 @@ L_error(L,"not used, lua returns the error string " "as the second arg if something fails"); }break; +#if CURL_NEWER(7,17,1) + case CURLOPT_SSH_HOST_PUBLIC_KEY_MD5: +#endif +#if CURL_NEWER(7,15,5) + case CURLOPT_FTP_ALTERNATIVE_TO_USER: +#endif +#if CURL_NEWER(7,14,1) + case CURLOPT_COOKIELIST: +#endif +#if CURL_NEWER(7,13,0) + case CURLOPT_FTP_ACCOUNT: +#endif case CURLOPT_SSLCERT: case CURLOPT_SSLCERTTYPE: case CURLOPT_SSLCERTPASSWD: /* alias CURLOPT_SSLKEYPASSWD */ @@ -1331,25 +1425,39 @@ luaL_register(L,NULL,curl_easy_m); luaL_register(L,"curl",curl_f); + + lua_pushliteral(L,LUACURL_VERSION); + lua_setfield(L,-2,"_VERSION"); + lua_pushliteral(L,LUACURL_AUTHOR); + lua_setfield(L,-2,"_AUTHOR"); + lua_pushliteral(L,LUACURL_LICENSE); + lua_setfield(L,-2,"_LICENSE"); + L_openconst(L,curl_easy_c); + L_openconst(L,curl_easy_httpver_c); + L_openconst(L,curl_easy_form_c); + L_openconst(L,curl_easy_closepolicy_c); #if CURL_NEWER(7,9,8) L_openconst(L,curl_easy_netrc_c); #endif +#if CURL_NEWER(7,10,0) + L_openconst(L,curl_easy_proxytype_c); +#endif #if CURL_NEWER(7,10,6) L_openconst(L,curl_easy_auth_c); #endif - L_openconst(L,curl_easy_httpver_c); - L_openconst(L,curl_easy_form_c); -#if CURL_NEWER(7,11,0) - L_openconst(L,curl_easy_ftpssl_c); -#endif - L_openconst(L,curl_easy_closepolicy_c); #if CURL_NEWER(7,10,8) L_openconst(L,curl_easy_ipresolve_c); #endif -#if CURL_NEWER(7,10,0) - L_openconst(L,curl_easy_proxytype_c); +#if CURL_NEWER(7,11,0) + L_openconst(L,curl_easy_ftpssl_c); #endif +#if CURL_NEWER(7,12,2) + L_openconst(L,curl_easy_ftpauth_c); +#endif +#if CURL_NEWER(7,15,2) + L_openconst(L,curl_easy_ftpmethods_c); +#endif return 1; } diff -Nru /tmp/lDU6kVal3p/lua-curl-0.2.1/Makefile /tmp/LCcyFkzOkm/lua-curl-0.3.0/Makefile --- lua-curl-0.2.1/Makefile 2007-02-15 16:08:56.000000000 +0000 +++ lua-curl-0.3.0/Makefile 2008-10-25 16:26:26.000000000 +0100 @@ -9,7 +9,8 @@ LUADOC= luadoc VERSION_INFO=0:0:0 -CONSTANTS:= curlopt.h curl_netrcopt.h curl_form.h curl_authopt.h +CONSTANTS:= curlopt.h curl_netrcopt.h \ + curl_form.h curl_authopt.h curl_ftpauthopt.h curl_ftpmethods.h CURL_CFLAGS:= $(shell curl-config --cflags 2>/dev/null) $(shell getconf LFS_CFLAGS) CURL_LDFLAGS:= $(shell curl-config --libs 2>/dev/null) REALSO:=$(LIBNAME).so.$(subst :,.,$(VERSION_INFO)) @@ -98,8 +99,12 @@ dist: clean DIR=`basename $$PWD`;\ + VERSION=`grep LUACURL_VERSION version.h|cut -d \" -f 2`;\ cd ..;\ - tar -cvzf $$DIR.tar.gz -X $$DIR/exclude-dist $$DIR + cp -r $$DIR lua-curl-$$VERSION; \ + tar -cvzf lua-curl_$$VERSION.orig.tar.gz \ + -X $$DIR/exclude-dist lua-curl-$$VERSION;\ + rm -rf lua-curl-$$VERSION # Constants genereated starting from the cURL headers: @@ -118,6 +123,20 @@ sed "s/#define *CURL/{\"/" | sed "s/ *\/\*.*\*\///" | \ sed "s/ /\",/" | sed "s/$$/},/" > curl_authopt.h +curl_ftpauthopt.h:$(HEADER) + $(H)cat /usr/include/curl/curl.h | grep -B10 '} curl_ftpauth' | \ + grep "CURLFTPAUTH_" | \ + grep -v "LAST.*never use" | \ + sed "s/^ *CURL//" | sed "s/^\([^,]*\),.*$$/{\"\1\",CURL\1},/" \ + > curl_ftpauthopt.h + +curl_ftpmethods.h:$(HEADER) + $(H)cat /usr/include/curl/curl.h | grep -B10 '} curl_ftpmethod' | \ + grep "CURLFTPMETHOD_" | \ + grep -v "LAST.*never use" | \ + sed "s/^ *CURL//" | sed "s/^\([^,]*\),.*$$/{\"\1\",CURL\1},/" \ + > curl_ftpmethods.h + curl_form.h: $(HEADER) $(H)cat $(HEADER) | grep "^ *CFINIT" | grep -v "CFINIT(NOTHING)" | \ sed 's/^ *CFINIT(\([^)]*\)),.*$$/{"FORM_\1",CURLFORM_\1},/' \ @@ -125,56 +144,40 @@ # win32 stuff -.PHONY: win32-gnutls win32-openssl -win32-gnutls: - make clean - make constants HEADER=/usr/i586-mingw32msvc/include/curl/curl.h - mkdir -p win32-gnutls - i586-mingw32msvc-gcc -I . -I /usr/i586-mingw32msvc/include/ \ - -c lua-curl.c -o win32-gnutls/lua-curl.o - i586-mingw32msvc-gcc -I . -I /usr/i586-mingw32msvc/include/ \ - -c luabind.c -o win32-gnutls/luabind.o - i586-mingw32msvc-dlltool -e win32-gnutls/exports.o -l win32-gnutls/lua-curl.lib win32-gnutls/*.o - i586-mingw32msvc-gcc win32-gnutls/*.o -o win32-gnutls/curl.dll -shared \ - -L /usr/i586-mingw32msvc/bin/ \ - -llua5.1 -lcurl - cp /usr/i586-mingw32msvc/bin/lua5.1.exe win32-gnutls - for X in libcurl libgcrypt libgnutls libgpg-error libz; do\ - cp /usr/i586-mingw32msvc/bin/$$X.dll win32-gnutls;\ - done - cp test.lua win32-gnutls - rm win32-gnutls/*.o - i586-mingw32msvc-strip win32-gnutls/*.dll - cp /usr/i586-mingw32msvc/bin/lua5.1.dll win32-gnutls - cp -r win32-gnutls freepops-luacurl-binary-win32-gnutls - zip -r freepops-luacurl-binary-win32-gnutls.zip freepops-luacurl-binary-win32-gnutls - rm -rf freepops-luacurl-binary-win32-gnutls - mv freepops-luacurl-binary-win32-gnutls.zip .. +.PHONY: win32-openssl win32-openssl: make clean make constants HEADER=/usr/i586-mingw32msvc/include/curl/curl.h mkdir -p win32-openssl - i586-mingw32msvc-gcc -I . -I /usr/i586-mingw32msvc/include/ \ + cd win32-openssl; unzip ../lua5_1_4_Win32_dll8_lib.zip + cd win32-openssl; rm *.dll *.lib + cd win32-openssl; unzip ../lua5_1_4_Win32_bin.zip + i586-mingw32msvc-gcc \ + -I win32-openssl/include/ \ + -I . -I /usr/i586-mingw32msvc/include/ \ -c lua-curl.c -o win32-openssl/lua-curl.o - i586-mingw32msvc-gcc -I . -I /usr/i586-mingw32msvc/include/ \ + i586-mingw32msvc-gcc -I . \ + -I win32-openssl/include/ \ + -I /usr/i586-mingw32msvc/include/ \ -c luabind.c -o win32-openssl/luabind.o i586-mingw32msvc-dlltool -e win32-openssl/exports.o -l win32-openssl/lua-curl.lib win32-openssl/*.o - i586-mingw32msvc-gcc win32-openssl/*.o -o win32-openssl/curl.dll -shared \ + i586-mingw32msvc-gcc win32-openssl/*.o \ + -o win32-openssl/curl.dll -shared \ -L /usr/i586-mingw32msvc/bin/ \ - -llua5.1 -lcurl - cp /usr/i586-mingw32msvc/bin/lua5.1.exe win32-openssl - for X in libcurl libz; do\ + win32-openssl/lua5.1.dll \ + -lcurl-4 + for X in libcurl-4 libz; do\ cp /usr/i586-mingw32msvc/bin/$$X.dll win32-openssl;\ done cp test.lua win32-openssl - rm win32-openssl/*.o + rm -rf win32-openssl/*.o win32-openssl/include/ \ + win32-openssl/*.lib win32-openssl/lua51.dll i586-mingw32msvc-strip win32-openssl/*.dll - cp /usr/i586-mingw32msvc/bin/lua5.1.dll win32-openssl - cp -r win32-openssl freepops-luacurl-binary-win32-openssl - zip -r freepops-luacurl-binary-win32-openssl.zip freepops-luacurl-binary-win32-openssl - rm -rf freepops-luacurl-binary-win32-openssl - mv freepops-luacurl-binary-win32-openssl.zip .. + cp -r win32-openssl freepops-lua-curl-binary-win32-openssl + zip -r freepops-lua-curl-binary-win32-openssl.zip freepops-lua-curl-binary-win32-openssl + rm -rf freepops-lua-curl-binary-win32-openssl + mv freepops-lua-curl-binary-win32-openssl.zip .. # eof diff -Nru /tmp/lDU6kVal3p/lua-curl-0.2.1/test-largeput.lua /tmp/LCcyFkzOkm/lua-curl-0.3.0/test-largeput.lua --- lua-curl-0.2.1/test-largeput.lua 1970-01-01 01:00:00.000000000 +0100 +++ lua-curl-0.3.0/test-largeput.lua 2008-10-25 16:26:26.000000000 +0100 @@ -0,0 +1,20 @@ +-- test file that sends a large blob: test for OPT_INFILESIZE_LARGE +require "curl" + +size = 2^32+1 + +c = curl.easy_init() +c:setopt(curl.OPT_PUT,1) +c:setopt(curl.OPT_URL,"http://127.0.0.1:3000") +c:setopt(curl.OPT_READFUNCTION,function(n) return n, string.rep("X",n) end) +c:setopt(curl.OPT_INFILESIZE_LARGE, size) +c:setopt(curl.OPT_VERBOSE,1) + +-- run a black hole +os.execute("nc -l -p 3000 > /dev/null &") +-- wait for nc to bind the socket +os.execute("sleep 3") + +-- go! +print("\nluacurl: performing put of size: " .. size .."\n") +c:perform() diff -Nru /tmp/lDU6kVal3p/lua-curl-0.2.1/version.h /tmp/LCcyFkzOkm/lua-curl-0.3.0/version.h --- lua-curl-0.2.1/version.h 1970-01-01 01:00:00.000000000 +0100 +++ lua-curl-0.3.0/version.h 2008-10-25 16:26:26.000000000 +0100 @@ -0,0 +1,3 @@ +#define LUACURL_VERSION "0.3.0" +#define LUACURL_AUTHOR "Enrico Tassi " +#define LUACURL_LICENSE "Dual: GPL and MIT/X"