diff --git a/.curl.metadata b/.curl.metadata
new file mode 100644
index 0000000..bb1ea73
--- /dev/null
+++ b/.curl.metadata
@@ -0,0 +1 @@
+28f2ffe1a4eb5b8d0fb95db1b2ef6ba04e2572fe SOURCES/curl-7.29.0.tar.lzma
diff --git a/README.md b/README.md
deleted file mode 100644
index 0e7897f..0000000
--- a/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-The master branch has no content
- 
-Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6
- 
-If you find this file in a distro specific branch, it means that no content has been checked in yet
diff --git a/SOURCES/0001-curl-7.29.0-da3fc1ee.patch b/SOURCES/0001-curl-7.29.0-da3fc1ee.patch
new file mode 100644
index 0000000..bebcb95
--- /dev/null
+++ b/SOURCES/0001-curl-7.29.0-da3fc1ee.patch
@@ -0,0 +1,321 @@
+From 48b69def52771149ed19189284b8c6d1ba667ef7 Mon Sep 17 00:00:00 2001
+From: Linus Nielsen Feltzing <linus@haxx.se>
+Date: Sun, 10 Feb 2013 22:57:58 +0100
+Subject: [PATCH] Fix NULL pointer reference when closing an unused multi handle.
+
+[upstream commit da3fc1ee91de656a30f3a12de394bcba55119872]
+
+Signed-off-by: Kamil Dudka <kdudka@redhat.com>
+---
+ lib/multi.c                |    8 +++--
+ tests/data/Makefile.am     |    2 +-
+ tests/data/Makefile.in     |    2 +-
+ tests/data/test1508        |   31 +++++++++++++++++
+ tests/libtest/Makefile.in  |   79 ++++++++++++++++++++++++++++++++++++++++++--
+ tests/libtest/Makefile.inc |    6 +++-
+ tests/libtest/lib1508.c    |   49 +++++++++++++++++++++++++++
+ 7 files changed, 168 insertions(+), 9 deletions(-)
+ create mode 100644 tests/data/test1508
+ create mode 100644 tests/libtest/lib1508.c
+
+diff --git a/lib/multi.c b/lib/multi.c
+index fa0afb9..706df23 100644
+--- a/lib/multi.c
++++ b/lib/multi.c
+@@ -1773,10 +1773,12 @@ CURLMcode curl_multi_cleanup(CURLM *multi_handle)
+     /* Close all the connections in the connection cache */
+     close_all_connections(multi);
+ 
+-    multi->closure_handle->dns.hostcache = multi->hostcache;
+-    Curl_hostcache_clean(multi->closure_handle);
++    if(multi->closure_handle) {
++      multi->closure_handle->dns.hostcache = multi->hostcache;
++      Curl_hostcache_clean(multi->closure_handle);
+ 
+-    Curl_close(multi->closure_handle);
++      Curl_close(multi->closure_handle);
++    }
+     multi->closure_handle = NULL;
+ 
+     Curl_hash_destroy(multi->sockhash);
+diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
+index d82534d..9f569a3 100644
+--- a/tests/data/Makefile.am
++++ b/tests/data/Makefile.am
+@@ -93,7 +93,7 @@ test1379 test1380 test1381 test1382 test1383 test1384 test1385 test1386 \
+ test1387 test1388 test1389 test1390 test1391 test1392 test1393 \
+ test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \
+ test1408 test1409 test1410 test1411 test1412 test1413 \
+-test1500 test1501 test1502 test1503 test1504 test1505 test1506 \
++test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1508 \
+ test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \
+ test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \
+ test2016 test2017 test2018 test2019 test2020 test2021 test2022 \
+diff --git a/tests/data/Makefile.in b/tests/data/Makefile.in
+index df52421..d5b0918 100644
+--- a/tests/data/Makefile.in
++++ b/tests/data/Makefile.in
+@@ -357,7 +357,7 @@ test1379 test1380 test1381 test1382 test1383 test1384 test1385 test1386 \
+ test1387 test1388 test1389 test1390 test1391 test1392 test1393 \
+ test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \
+ test1408 test1409 test1410 test1411 test1412 test1413 \
+-test1500 test1501 test1502 test1503 test1504 test1505 test1506 \
++test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1508 \
+ test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \
+ test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \
+ test2016 test2017 test2018 test2019 test2020 test2021 test2022 \
+diff --git a/tests/data/test1508 b/tests/data/test1508
+new file mode 100644
+index 0000000..f8607e5
+--- /dev/null
++++ b/tests/data/test1508
+@@ -0,0 +1,31 @@
++<testcase>
++<info>
++<keywords>
++HTTP
++multi
++</keywords>
++</info>
++
++# Client-side
++<client>
++<server>
++none
++</server>
++<tool>
++lib1508
++</tool>
++ <name>
++Close a multi handle without using it
++ </name>
++ <command>
++http://%HOSTIP:%HTTPPORT/path/1508
++</command>
++</client>
++
++# Verify data after the test has been "shot"
++<verify>
++<file name="log/stdout1508" mode="text">
++We are done
++</file>
++</verify>
++</testcase>
+diff --git a/tests/libtest/Makefile.in b/tests/libtest/Makefile.in
+index 406b457..7683c09 100644
+--- a/tests/libtest/Makefile.in
++++ b/tests/libtest/Makefile.in
+@@ -85,7 +85,7 @@ noinst_PROGRAMS = chkhostname$(EXEEXT) libauthretry$(EXEEXT) \
+ 	lib591$(EXEEXT) lib597$(EXEEXT) lib598$(EXEEXT) \
+ 	lib599$(EXEEXT) lib1500$(EXEEXT) lib1501$(EXEEXT) \
+ 	lib1502$(EXEEXT) lib1503$(EXEEXT) lib1504$(EXEEXT) \
+-	lib1505$(EXEEXT) lib1506$(EXEEXT)
++	lib1505$(EXEEXT) lib1506$(EXEEXT) lib1508$(EXEEXT)
+ subdir = tests/libtest
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
+@@ -173,6 +173,13 @@ am_lib1506_OBJECTS = lib1506-lib1506.$(OBJEXT) $(am__objects_18) \
+ 	$(am__objects_19) $(am__objects_20)
+ lib1506_OBJECTS = $(am_lib1506_OBJECTS)
+ lib1506_DEPENDENCIES = $(am__DEPENDENCIES_1)
++am__objects_151 = lib1508-first.$(OBJEXT)
++am__objects_152 = lib1508-testutil.$(OBJEXT)
++am__objects_153 = lib1508-warnless.$(OBJEXT)
++am_lib1508_OBJECTS = lib1508-lib1508.$(OBJEXT) $(am__objects_151) \
++	$(am__objects_152) $(am__objects_153)
++lib1508_OBJECTS = $(am_lib1508_OBJECTS)
++lib1508_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ am__objects_21 = lib500-first.$(OBJEXT)
+ am__objects_22 = lib500-testutil.$(OBJEXT)
+ am__objects_23 = lib500-testtrace.$(OBJEXT)
+@@ -632,7 +639,7 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \
+ 	$(lib1500_SOURCES) $(lib1501_SOURCES) $(lib1502_SOURCES) \
+ 	$(lib1503_SOURCES) $(lib1504_SOURCES) $(lib1505_SOURCES) \
+-	$(lib1506_SOURCES) $(lib500_SOURCES) $(lib501_SOURCES) \
++	$(lib1506_SOURCES) $(lib1508_SOURCES) $(lib500_SOURCES) $(lib501_SOURCES) \
+ 	$(lib502_SOURCES) $(lib503_SOURCES) $(lib504_SOURCES) \
+ 	$(lib505_SOURCES) $(lib506_SOURCES) $(lib507_SOURCES) \
+ 	$(lib508_SOURCES) $(lib510_SOURCES) $(lib511_SOURCES) \
+@@ -662,7 +669,7 @@ SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \
+ DIST_SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \
+ 	$(lib1500_SOURCES) $(lib1501_SOURCES) $(lib1502_SOURCES) \
+ 	$(lib1503_SOURCES) $(lib1504_SOURCES) $(lib1505_SOURCES) \
+-	$(lib1506_SOURCES) $(lib500_SOURCES) $(lib501_SOURCES) \
++	$(lib1506_SOURCES) $(lib1508_SOURCES) $(lib500_SOURCES) $(lib501_SOURCES)  \
+ 	$(lib502_SOURCES) $(lib503_SOURCES) $(lib504_SOURCES) \
+ 	$(lib505_SOURCES) $(lib506_SOURCES) $(lib507_SOURCES) \
+ 	$(lib508_SOURCES) $(lib510_SOURCES) $(lib511_SOURCES) \
+@@ -1155,6 +1162,9 @@ lib1505_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1505
+ lib1506_SOURCES = lib1506.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+ lib1506_LDADD = $(TESTUTIL_LIBS)
+ lib1506_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1506
++lib1508_SOURCES = lib1508.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
++lib1508_LDADD = $(TESTUTIL_LIBS)
++lib1508_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1508
+ @BUILD_LIBHOSTNAME_FALSE@noinst_LTLIBRARIES = 
+ 
+ # Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES,
+@@ -1253,6 +1263,9 @@ lib1505$(EXEEXT): $(lib1505_OBJECTS) $(lib1505_DEPENDENCIES) $(EXTRA_lib1505_DEP
+ lib1506$(EXEEXT): $(lib1506_OBJECTS) $(lib1506_DEPENDENCIES) $(EXTRA_lib1506_DEPENDENCIES) 
+ 	@rm -f lib1506$(EXEEXT)
+ 	$(LINK) $(lib1506_OBJECTS) $(lib1506_LDADD) $(LIBS)
++lib1508$(EXEEXT): $(lib1508_OBJECTS) $(lib1508_DEPENDENCIES) $(EXTRA_lib1508_DEPENDENCIES) 
++	@rm -f lib1508$(EXEEXT)
++	$(LINK) $(lib1508_OBJECTS) $(lib1508_LDADD) $(LIBS)
+ lib500$(EXEEXT): $(lib500_OBJECTS) $(lib500_DEPENDENCIES) $(EXTRA_lib500_DEPENDENCIES) 
+ 	@rm -f lib500$(EXEEXT)
+ 	$(LINK) $(lib500_OBJECTS) $(lib500_LDADD) $(LIBS)
+@@ -1520,6 +1533,10 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1506-lib1506.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1506-testutil.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1506-warnless.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1508-first.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1508-lib1508.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1508-testutil.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1508-warnless.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib500-first.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib500-lib500.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib500-testtrace.Po@am__quote@
+@@ -2163,6 +2180,62 @@ lib1506-warnless.obj: ../../lib/warnless.c
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1506-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+ 
++lib1508-lib1508.o: lib1508.c
++@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1508-lib1508.o -MD -MP -MF $(DEPDIR)/lib1508-lib1508.Tpo -c -o lib1508-lib1508.o `test -f 'lib1508.c' || echo '$(srcdir)/'`lib1508.c
++@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/lib1508-lib1508.Tpo $(DEPDIR)/lib1508-lib1508.Po
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib1508.c' object='lib1508-lib1508.o' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1508-lib1508.o `test -f 'lib1508.c' || echo '$(srcdir)/'`lib1508.c
++
++lib1508-lib1508.obj: lib1508.c
++@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1508-lib1508.obj -MD -MP -MF $(DEPDIR)/lib1508-lib1508.Tpo -c -o lib1508-lib1508.obj `if test -f 'lib1508.c'; then $(CYGPATH_W) 'lib1508.c'; else $(CYGPATH_W) '$(srcdir)/lib1508.c'; fi`
++@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/lib1508-lib1508.Tpo $(DEPDIR)/lib1508-lib1508.Po
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib1508.c' object='lib1508-lib1508.obj' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1508-lib1508.obj `if test -f 'lib1508.c'; then $(CYGPATH_W) 'lib1508.c'; else $(CYGPATH_W) '$(srcdir)/lib1508.c'; fi`
++
++lib1508-first.o: first.c
++@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1508-first.o -MD -MP -MF $(DEPDIR)/lib1508-first.Tpo -c -o lib1508-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
++@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/lib1508-first.Tpo $(DEPDIR)/lib1508-first.Po
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='first.c' object='lib1508-first.o' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1508-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
++
++lib1508-first.obj: first.c
++@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1508-first.obj -MD -MP -MF $(DEPDIR)/lib1508-first.Tpo -c -o lib1508-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
++@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/lib1508-first.Tpo $(DEPDIR)/lib1508-first.Po
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='first.c' object='lib1508-first.obj' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1508-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
++
++lib1508-testutil.o: testutil.c
++@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1508-testutil.o -MD -MP -MF $(DEPDIR)/lib1508-testutil.Tpo -c -o lib1508-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
++@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/lib1508-testutil.Tpo $(DEPDIR)/lib1508-testutil.Po
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='testutil.c' object='lib1508-testutil.o' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1508-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
++
++lib1508-testutil.obj: testutil.c
++@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1508-testutil.obj -MD -MP -MF $(DEPDIR)/lib1508-testutil.Tpo -c -o lib1508-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
++@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/lib1508-testutil.Tpo $(DEPDIR)/lib1508-testutil.Po
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='testutil.c' object='lib1508-testutil.obj' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1508-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
++
++lib1508-warnless.o: ../../lib/warnless.c
++@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1508-warnless.o -MD -MP -MF $(DEPDIR)/lib1508-warnless.Tpo -c -o lib1508-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
++@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/lib1508-warnless.Tpo $(DEPDIR)/lib1508-warnless.Po
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../../lib/warnless.c' object='lib1508-warnless.o' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1508-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
++
++lib1508-warnless.obj: ../../lib/warnless.c
++@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1508-warnless.obj -MD -MP -MF $(DEPDIR)/lib1508-warnless.Tpo -c -o lib1508-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
++@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/lib1508-warnless.Tpo $(DEPDIR)/lib1508-warnless.Po
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../../lib/warnless.c' object='lib1508-warnless.obj' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1508-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
++
+ lib500-lib500.o: lib500.c
+ @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib500-lib500.o -MD -MP -MF $(DEPDIR)/lib500-lib500.Tpo -c -o lib500-lib500.o `test -f 'lib500.c' || echo '$(srcdir)/'`lib500.c
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/lib500-lib500.Tpo $(DEPDIR)/lib500-lib500.Po
+diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc
+index 82c265d..8bf2be4 100644
+--- a/tests/libtest/Makefile.inc
++++ b/tests/libtest/Makefile.inc
+@@ -23,7 +23,7 @@ noinst_PROGRAMS = chkhostname libauthretry libntlmconnect \
+                 lib582 lib583        lib585 lib586 lib587               \
+   lib590 lib591                                    lib597 lib598 lib599 \
+   \
+-  lib1500 lib1501 lib1502 lib1503 lib1504 lib1505 lib1506
++  lib1500 lib1501 lib1502 lib1503 lib1504 lib1505 lib1506 lib1508
+ 
+ chkhostname_SOURCES = chkhostname.c ../../lib/curl_gethostname.c
+ chkhostname_LDADD = @CURL_NETWORK_LIBS@
+@@ -312,3 +312,7 @@ lib1505_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1505
+ lib1506_SOURCES = lib1506.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+ lib1506_LDADD = $(TESTUTIL_LIBS)
+ lib1506_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1506
++
++lib1508_SOURCES = lib1508.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
++lib1508_LDADD = $(TESTUTIL_LIBS)
++lib1508_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1508
+diff --git a/tests/libtest/lib1508.c b/tests/libtest/lib1508.c
+new file mode 100644
+index 0000000..72f26d1
+--- /dev/null
++++ b/tests/libtest/lib1508.c
+@@ -0,0 +1,49 @@
++/***************************************************************************
++ *                                  _   _ ____  _
++ *  Project                     ___| | | |  _ \| |
++ *                             / __| | | | |_) | |
++ *                            | (__| |_| |  _ <| |___
++ *                             \___|\___/|_| \_\_____|
++ *
++ * Copyright (C) 2013, Linus Nielsen Feltzing <linus@haxx.se>
++ *
++ * This software is licensed as described in the file COPYING, which
++ * you should have received as part of this distribution. The terms
++ * are also available at http://curl.haxx.se/docs/copyright.html.
++ *
++ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
++ * copies of the Software, and permit persons to whom the Software is
++ * furnished to do so, under the terms of the COPYING file.
++ *
++ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
++ * KIND, either express or implied.
++ *
++ ***************************************************************************/
++#include "test.h"
++
++#include "testutil.h"
++#include "warnless.h"
++#include "memdebug.h"
++
++int test(char *URL)
++{
++  int res = 0;
++  CURLM *m = NULL;
++
++  (void)URL;
++
++  global_init(CURL_GLOBAL_ALL);
++
++  multi_init(m);
++
++test_cleanup:
++
++  /* proper cleanup sequence - type PB */
++
++  curl_multi_cleanup(m);
++  curl_global_cleanup();
++
++  printf("We are done\n");
++
++  return res;
++}
+-- 
+1.7.1
+
diff --git a/SOURCES/0002-curl-7.29.0-9d0af301.patch b/SOURCES/0002-curl-7.29.0-9d0af301.patch
new file mode 100644
index 0000000..0b9f7aa
--- /dev/null
+++ b/SOURCES/0002-curl-7.29.0-9d0af301.patch
@@ -0,0 +1,47 @@
+From 8d25353ae1661ce50fe564e733f3ef45004f4bdf Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Tue, 5 Mar 2013 17:51:01 +0100
+Subject: [PATCH] nss: fix misplaced code enabling non-blocking socket mode
+
+The option needs to be set on the SSL socket.  Setting it on the model
+takes no effect.  Note that the non-blocking mode is still not enabled
+for the handshake because the code is not yet ready for that.
+
+[upstream commit 9d0af3018c5db25f5adda216dbcad6056b4a3107]
+---
+ lib/nss.c |   12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/lib/nss.c b/lib/nss.c
+index 8a2cb09..a2c5c63 100644
+--- a/lib/nss.c
++++ b/lib/nss.c
+@@ -1237,12 +1237,6 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
+     goto error;
+   model = SSL_ImportFD(NULL, model);
+ 
+-  /* make the socket nonblocking */
+-  sock_opt.option = PR_SockOpt_Nonblocking;
+-  sock_opt.value.non_blocking = PR_TRUE;
+-  if(PR_SetSocketOption(model, &sock_opt) != PR_SUCCESS)
+-    goto error;
+-
+   if(SSL_OptionSet(model, SSL_SECURITY, PR_TRUE) != SECSuccess)
+     goto error;
+   if(SSL_OptionSet(model, SSL_HANDSHAKE_AS_SERVER, PR_FALSE) != SECSuccess)
+@@ -1415,6 +1409,12 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
+     goto error;
+   }
+ 
++  /* switch the SSL socket into non-blocking mode */
++  sock_opt.option = PR_SockOpt_Nonblocking;
++  sock_opt.value.non_blocking = PR_TRUE;
++  if(PR_SetSocketOption(connssl->handle, &sock_opt) != PR_SUCCESS)
++    goto error;
++
+   connssl->state = ssl_connection_complete;
+   conn->recv[sockindex] = nss_recv;
+   conn->send[sockindex] = nss_send;
+-- 
+1.7.1
+
diff --git a/SOURCES/0003-curl-7.29.0-491e026c.patch b/SOURCES/0003-curl-7.29.0-491e026c.patch
new file mode 100644
index 0000000..c136e34
--- /dev/null
+++ b/SOURCES/0003-curl-7.29.0-491e026c.patch
@@ -0,0 +1,39 @@
+From a2e6eadf6a72f7587eb9bc1ad52383e4c5507b12 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Mon, 11 Mar 2013 16:57:25 +0100
+Subject: [PATCH 1/2] easy: do not ignore poll() failures other than EINTR
+
+[upstream commit 491e026ccda0e60975fa6e2e9cf3ccca37e18f7b]
+---
+ lib/easy.c |   12 ++++++++++--
+ 1 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/lib/easy.c b/lib/easy.c
+index c27deff..2e747bb 100644
+--- a/lib/easy.c
++++ b/lib/easy.c
+@@ -441,11 +441,19 @@ CURLcode curl_easy_perform(CURL *easy)
+ 
+   while(!done && !mcode) {
+     int still_running;
++    int ret;
+ 
+-    mcode = curl_multi_wait(multi, NULL, 0, 1000, NULL);
++    mcode = curl_multi_wait(multi, NULL, 0, 1000, &ret);
++
++    if(mcode == CURLM_OK) {
++      if(ret == -1) {
++        /* poll() failed not on EINTR, indicate a network problem */
++        code = CURLE_RECV_ERROR;
++        break;
++      }
+ 
+-    if(mcode == CURLM_OK)
+       mcode = curl_multi_perform(multi, &still_running);
++    }
+ 
+     /* only read 'still_running' if curl_multi_perform() return OK */
+     if((mcode == CURLM_OK) && !still_running) {
+-- 
+1.7.1
+
diff --git a/SOURCES/0004-curl-7.29.0-57ccdfa8.patch b/SOURCES/0004-curl-7.29.0-57ccdfa8.patch
new file mode 100644
index 0000000..1448d64
--- /dev/null
+++ b/SOURCES/0004-curl-7.29.0-57ccdfa8.patch
@@ -0,0 +1,143 @@
+From 37a515d9933a3160a8a868d5a697a42b28f6d792 Mon Sep 17 00:00:00 2001
+From: Zdenek Pavlas <zpavlas@redhat.com>
+Date: Mon, 11 Mar 2013 14:57:07 +0100
+Subject: [PATCH 2/2] curl_global_init: accept the CURL_GLOBAL_ACK_EINTR flag
+
+The flag can be used in pycurl-based applications where using the multi
+interface would not be acceptable because of the performance lost caused
+by implementing the select() loop in python.
+
+Bug: http://curl.haxx.se/bug/view.cgi?id=1168
+Downstream Bug: https://bugzilla.redhat.com/919127
+
+[upstream commit 57ccdfa8d2bb6275388223f4676cd623ebd01697]
+---
+ docs/libcurl/curl_global_init.3  |    4 ++++
+ docs/libcurl/symbols-in-versions |    1 +
+ include/curl/curl.h              |    1 +
+ lib/easy.c                       |    2 ++
+ lib/select.c                     |   17 ++---------------
+ lib/select.h                     |    6 ++++++
+ 6 files changed, 16 insertions(+), 15 deletions(-)
+
+diff --git a/docs/libcurl/curl_global_init.3 b/docs/libcurl/curl_global_init.3
+index d91e1bd..6a08383 100644
+--- a/docs/libcurl/curl_global_init.3
++++ b/docs/libcurl/curl_global_init.3
+@@ -70,6 +70,10 @@ Initialise nothing extra. This sets no bit.
+ .B CURL_GLOBAL_DEFAULT
+ A sensible default. It will init both SSL and Win32. Right now, this equals
+ the functionality of the \fBCURL_GLOBAL_ALL\fP mask.
++.TP
++.B CURL_GLOBAL_ACK_EINTR
++When this flag is set, curl will acknowledge EINTR condition when connecting
++or when waiting for data.  Otherwise, curl waits until full timeout elapses.
+ .SH RETURN VALUE
+ If this function returns non-zero, something went wrong and you cannot use the
+ other curl functions.
+diff --git a/docs/libcurl/symbols-in-versions b/docs/libcurl/symbols-in-versions
+index 1de1ace..37b5e27 100644
+--- a/docs/libcurl/symbols-in-versions
++++ b/docs/libcurl/symbols-in-versions
+@@ -614,6 +614,7 @@ CURL_GLOBAL_DEFAULT             7.8
+ CURL_GLOBAL_NOTHING             7.8
+ CURL_GLOBAL_SSL                 7.8
+ CURL_GLOBAL_WIN32               7.8.1
++CURL_GLOBAL_ACK_EINTR           7.30.0
+ CURL_HTTP_VERSION_1_0           7.9.1
+ CURL_HTTP_VERSION_1_1           7.9.1
+ CURL_HTTP_VERSION_NONE          7.9.1
+diff --git a/include/curl/curl.h b/include/curl/curl.h
+index 5b39a24..80e4cf5 100644
+--- a/include/curl/curl.h
++++ b/include/curl/curl.h
+@@ -2023,6 +2023,7 @@ typedef enum {
+ #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32)
+ #define CURL_GLOBAL_NOTHING 0
+ #define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL
++#define CURL_GLOBAL_ACK_EINTR (1<<2)
+ 
+ 
+ /*****************************************************************************
+diff --git a/lib/easy.c b/lib/easy.c
+index 2e747bb..2739598 100644
+--- a/lib/easy.c
++++ b/lib/easy.c
+@@ -262,6 +262,8 @@ CURLcode curl_global_init(long flags)
+   }
+ #endif
+ 
++  Curl_ack_eintr = flags & CURL_GLOBAL_ACK_EINTR;
++
+   init_flags  = flags;
+ 
+   /* Preset pseudo-random number sequence. */
+diff --git a/lib/select.c b/lib/select.c
+index d13e122..db7fb6d 100644
+--- a/lib/select.c
++++ b/lib/select.c
+@@ -50,11 +50,8 @@
+ 
+ #define elapsed_ms  (int)curlx_tvdiff(curlx_tvnow(), initial_tv)
+ 
+-#ifdef CURL_ACKNOWLEDGE_EINTR
+-#define error_not_EINTR (1)
+-#else
+-#define error_not_EINTR (error != EINTR)
+-#endif
++int Curl_ack_eintr = 0;
++#define error_not_EINTR (Curl_ack_eintr || error != EINTR)
+ 
+ /*
+  * Internal function used for waiting a specific amount of ms
+@@ -67,10 +64,6 @@
+  * Timeout resolution, accuracy, as well as maximum supported
+  * value is system dependent, neither factor is a citical issue
+  * for the intended use of this function in the library.
+- * On non-DOS and non-Winsock platforms, when compiled with
+- * CURL_ACKNOWLEDGE_EINTR defined, EINTR condition is honored
+- * and function might exit early without awaiting full timeout,
+- * otherwise EINTR will be ignored and full timeout will elapse.
+  *
+  * Return values:
+  *   -1 = system call error, invalid timeout value, or interrupted
+@@ -133,9 +126,6 @@ int Curl_wait_ms(int timeout_ms)
+  * A negative timeout value makes this function wait indefinitely,
+  * unles no valid file descriptor is given, when this happens the
+  * negative timeout is ignored and the function times out immediately.
+- * When compiled with CURL_ACKNOWLEDGE_EINTR defined, EINTR condition
+- * is honored and function might exit early without awaiting timeout,
+- * otherwise EINTR will be ignored.
+  *
+  * Return values:
+  *   -1 = system call error or fd >= FD_SETSIZE
+@@ -351,9 +341,6 @@ int Curl_socket_check(curl_socket_t readfd0, /* two sockets to read from */
+  * A negative timeout value makes this function wait indefinitely,
+  * unles no valid file descriptor is given, when this happens the
+  * negative timeout is ignored and the function times out immediately.
+- * When compiled with CURL_ACKNOWLEDGE_EINTR defined, EINTR condition
+- * is honored and function might exit early without awaiting timeout,
+- * otherwise EINTR will be ignored.
+  *
+  * Return values:
+  *   -1 = system call error or fd >= FD_SETSIZE
+diff --git a/lib/select.h b/lib/select.h
+index 00789bb..c00afe1 100644
+--- a/lib/select.h
++++ b/lib/select.h
+@@ -81,6 +81,12 @@ int Curl_socket_check(curl_socket_t readfd, curl_socket_t readfd2,
+ 
+ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms);
+ 
++/* On non-DOS and non-Winsock platforms, when Curl_ack_eintr is set,
++ * EINTR condition is honored and function might exit early without
++ * awaiting full timeout.  Otherwise EINTR will be ignored and full
++ * timeout will elapse. */
++extern int Curl_ack_eintr;
++
+ int Curl_wait_ms(int timeout_ms);
+ 
+ #ifdef TPF
+-- 
+1.7.1
+
diff --git a/SOURCES/0005-curl-7.29.0-2eb8dcf2.patch b/SOURCES/0005-curl-7.29.0-2eb8dcf2.patch
new file mode 100644
index 0000000..d0fbbce
--- /dev/null
+++ b/SOURCES/0005-curl-7.29.0-2eb8dcf2.patch
@@ -0,0 +1,295 @@
+From 0b7dd36575821bd6e4e86f7b51ac001e69abddf9 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Fri, 12 Apr 2013 15:53:39 +0200
+Subject: [PATCH 1/3] test1216: test tailmatching cookie domains
+
+This test is an attempt to repeat the problem YAMADA Yasuharu reported
+at http://curl.haxx.se/mail/lib-2013-04/0108.html
+
+Conflicts:
+
+	tests/data/Makefile.am
+
+Signed-off-by: Kamil Dudka <kdudka@redhat.com>
+---
+ tests/data/Makefile.am |    2 +-
+ tests/data/Makefile.in |    2 +-
+ tests/data/test1216    |   62 ++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 64 insertions(+), 2 deletions(-)
+ create mode 100644 tests/data/test1216
+
+diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
+index 9f569a3..d714e5d 100644
+--- a/tests/data/Makefile.am
++++ b/tests/data/Makefile.am
+@@ -77,7 +77,7 @@ test1110 test1111 test1112 test1113 test1114 test1115 test1116 test1117	\
+ test1118 test1119 test1120 test1121 test1122 test1123 test1124 test1125	\
+ test1126 test1127 test1128 test1129 test1130 test1131 test1132 test1133 \
+ test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
+-test1208 test1209 test1210 test1211 \
++test1208 test1209 test1210 test1211 test1216 \
+ test1220 test1221 test1222 test1223 \
+ test1300 test1301 test1302 test1303 test1304 test1305	\
+ test1306 test1307 test1308 test1309 test1310 test1311 test1312 test1313 \
+diff --git a/tests/data/Makefile.in b/tests/data/Makefile.in
+index d5b0918..a070266 100644
+--- a/tests/data/Makefile.in
++++ b/tests/data/Makefile.in
+@@ -341,7 +341,7 @@ test1110 test1111 test1112 test1113 test1114 test1115 test1116 test1117	\
+ test1118 test1119 test1120 test1121 test1122 test1123 test1124 test1125	\
+ test1126 test1127 test1128 test1129 test1130 test1131 test1132 test1133 \
+ test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
+-test1208 test1209 test1210 test1211 \
++test1208 test1209 test1210 test1211 test1216 \
+ test1220 test1221 test1222 test1223 \
+ test1300 test1301 test1302 test1303 test1304 test1305	\
+ test1306 test1307 test1308 test1309 test1310 test1311 test1312 test1313 \
+diff --git a/tests/data/test1216 b/tests/data/test1216
+new file mode 100644
+index 0000000..e63fe92
+--- /dev/null
++++ b/tests/data/test1216
+@@ -0,0 +1,62 @@
++<testcase>
++<info>
++<keywords>
++HTTP
++HTTP GET
++HTTP proxy
++cookies
++</keywords>
++</info>
++
++# Server-side
++<reply>
++<data>
++HTTP/1.1 200 OK
++Server: Microsoft-IIS/4.0
++Date: Tue, 25 Sep 2001 19:37:44 GMT
++Content-Type: text/html
++Connection: close
++Content-Length: 21
++
++This server says moo
++</data>
++</reply>
++
++# Client-side
++<client>
++<server>
++http
++</server>
++ <name>
++HTTP cookie domains tailmatching the host name
++ </name>
++ <command>
++http://example.fake/c/1216 http://bexample.fake/c/1216 -b log/injar1216 -x %HOSTIP:%HTTPPORT
++</command>
++<file name="log/injar1216">
++example.fake	FALSE	/a	FALSE	2139150993	mooo	indeed
++example.fake	FALSE	/b	FALSE	0		moo1	indeed
++example.fake	FALSE	/c	FALSE	2139150993	moo2	indeed
++</file>
++</client>
++
++# Verify data after the test has been "shot"
++<verify>
++<strip>
++^User-Agent:.*
++</strip>
++<protocol>
++GET http://example.fake/c/1216 HTTP/1.1
++Host: example.fake
++Accept: */*
++Proxy-Connection: Keep-Alive
++Cookie: moo2=indeed
++
++GET http://bexample.fake/c/1216 HTTP/1.1
++Host: bexample.fake
++Accept: */*
++Proxy-Connection: Keep-Alive
++
++</protocol>
++</verify>
++</testcase>
+-- 
+1.7.1
+
+
+From 6c5a78d0407788b1092bbc8a19b68b01ccb75f8a Mon Sep 17 00:00:00 2001
+From: YAMADA Yasuharu <yasuharu.yamada@access-company.com>
+Date: Thu, 11 Apr 2013 00:17:15 +0200
+Subject: [PATCH 2/3] cookie: fix tailmatching to prevent cross-domain leakage
+
+Cookies set for 'example.com' could accidentaly also be sent by libcurl
+to the 'bexample.com' (ie with a prefix to the first domain name).
+
+This is a security vulnerabilty, CVE-2013-1944.
+
+Bug: http://curl.haxx.se/docs/adv_20130412.html
+
+Signed-off-by: Kamil Dudka <kdudka@redhat.com>
+---
+ lib/cookie.c |   24 +++++++++++++++++++-----
+ 1 files changed, 19 insertions(+), 5 deletions(-)
+
+diff --git a/lib/cookie.c b/lib/cookie.c
+index 18b9155..d4fd78a 100644
+--- a/lib/cookie.c
++++ b/lib/cookie.c
+@@ -118,15 +118,29 @@ static void freecookie(struct Cookie *co)
+   free(co);
+ }
+ 
+-static bool tailmatch(const char *little, const char *bigone)
++static bool tailmatch(const char *cooke_domain, const char *hostname)
+ {
+-  size_t littlelen = strlen(little);
+-  size_t biglen = strlen(bigone);
++  size_t cookie_domain_len = strlen(cooke_domain);
++  size_t hostname_len = strlen(hostname);
+ 
+-  if(littlelen > biglen)
++  if(hostname_len < cookie_domain_len)
+     return FALSE;
+ 
+-  return Curl_raw_equal(little, bigone+biglen-littlelen) ? TRUE : FALSE;
++  if(!Curl_raw_equal(cooke_domain, hostname+hostname_len-cookie_domain_len))
++    return FALSE;
++
++  /* A lead char of cookie_domain is not '.'.
++     RFC6265 4.1.2.3. The Domain Attribute says:
++       For example, if the value of the Domain attribute is
++       "example.com", the user agent will include the cookie in the Cookie
++       header when making HTTP requests to example.com, www.example.com, and
++       www.corp.example.com.
++   */
++  if(hostname_len == cookie_domain_len)
++    return TRUE;
++  if('.' == *(hostname + hostname_len - cookie_domain_len - 1))
++    return TRUE;
++  return FALSE;
+ }
+ 
+ /*
+-- 
+1.7.1
+
+
+From 6284e78c9421911a24349621c5b63684823d12f7 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Fri, 12 Apr 2013 15:55:57 +0200
+Subject: [PATCH 3/3] test1218: another cookie tailmatch test
+
+These tests verify commit 3604fde3d3c9b0d, the fix for the "cookie
+domain tailmatch" vulnerability. See
+http://curl.haxx.se/docs/adv_20130412.html
+
+Conflicts:
+
+	tests/data/Makefile.am
+
+Signed-off-by: Kamil Dudka <kdudka@redhat.com>
+---
+ tests/data/Makefile.am |    2 +-
+ tests/data/Makefile.in |    2 +-
+ tests/data/test1218    |   61 ++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 63 insertions(+), 2 deletions(-)
+ create mode 100644 tests/data/test1218
+
+diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
+index d714e5d..3e8dae0 100644
+--- a/tests/data/Makefile.am
++++ b/tests/data/Makefile.am
+@@ -77,7 +77,7 @@ test1110 test1111 test1112 test1113 test1114 test1115 test1116 test1117	\
+ test1118 test1119 test1120 test1121 test1122 test1123 test1124 test1125	\
+ test1126 test1127 test1128 test1129 test1130 test1131 test1132 test1133 \
+ test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
+-test1208 test1209 test1210 test1211 test1216 \
++test1208 test1209 test1210 test1211 test1216 test1218 \
+ test1220 test1221 test1222 test1223 \
+ test1300 test1301 test1302 test1303 test1304 test1305	\
+ test1306 test1307 test1308 test1309 test1310 test1311 test1312 test1313 \
+diff --git a/tests/data/Makefile.in b/tests/data/Makefile.in
+index a070266..71c9422 100644
+--- a/tests/data/Makefile.in
++++ b/tests/data/Makefile.in
+@@ -341,7 +341,7 @@ test1110 test1111 test1112 test1113 test1114 test1115 test1116 test1117	\
+ test1118 test1119 test1120 test1121 test1122 test1123 test1124 test1125	\
+ test1126 test1127 test1128 test1129 test1130 test1131 test1132 test1133 \
+ test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
+-test1208 test1209 test1210 test1211 test1216 \
++test1208 test1209 test1210 test1211 test1216 test1218 \
+ test1220 test1221 test1222 test1223 \
+ test1300 test1301 test1302 test1303 test1304 test1305	\
+ test1306 test1307 test1308 test1309 test1310 test1311 test1312 test1313 \
+diff --git a/tests/data/test1218 b/tests/data/test1218
+new file mode 100644
+index 0000000..7d86547
+--- /dev/null
++++ b/tests/data/test1218
+@@ -0,0 +1,61 @@
++<testcase>
++<info>
++<keywords>
++HTTP
++HTTP GET
++HTTP proxy
++cookies
++</keywords>
++</info>
++
++# This test is very similar to 1216, only that it sets the cookies from the
++# first site instead of reading from a file
++<reply>
++<data>
++HTTP/1.1 200 OK
++Date: Tue, 25 Sep 2001 19:37:44 GMT
++Set-Cookie: domain=.example.fake; bug=fixed;
++Content-Length: 21
++
++This server says moo
++</data>
++</reply>
++
++# Client-side
++<client>
++<server>
++http
++</server>
++ <name>
++HTTP cookies and domains with same prefix
++ </name>
++ <command>
++http://example.fake/c/1218 http://example.fake/c/1218 http://bexample.fake/c/1218 -b nonexisting -x %HOSTIP:%HTTPPORT
++</command>
++</client>
++
++# Verify data after the test has been "shot"
++<verify>
++<strip>
++^User-Agent:.*
++</strip>
++<protocol>
++GET http://example.fake/c/1218 HTTP/1.1
++Host: example.fake
++Accept: */*
++Proxy-Connection: Keep-Alive
++
++GET http://example.fake/c/1218 HTTP/1.1
++Host: example.fake
++Accept: */*
++Proxy-Connection: Keep-Alive
++Cookie: bug=fixed
++
++GET http://bexample.fake/c/1218 HTTP/1.1
++Host: bexample.fake
++Accept: */*
++Proxy-Connection: Keep-Alive
++
++</protocol>
++</verify>
++</testcase>
+-- 
+1.7.1
+
diff --git a/SOURCES/0006-curl-7.29.0-25e577b3.patch b/SOURCES/0006-curl-7.29.0-25e577b3.patch
new file mode 100644
index 0000000..2b6a786
--- /dev/null
+++ b/SOURCES/0006-curl-7.29.0-25e577b3.patch
@@ -0,0 +1,86 @@
+From 74d01a8e4d48eedc526cffaf6a6bc782b139e068 Mon Sep 17 00:00:00 2001
+From: Kim Vandry <vandry@users.sf.net>
+Date: Mon, 18 Feb 2013 21:36:34 +0100
+Subject: [PATCH 1/2] Curl_resolver_is_resolved: show proper host name on failed resolve
+
+[upstream commit 25e577b33d00afb6630cf2cac98d6baa319e9aef]
+
+Signed-off-by: Kamil Dudka <kdudka@redhat.com>
+---
+ lib/asyn-thread.c |   35 ++++++++++++++++++++---------------
+ 1 files changed, 20 insertions(+), 15 deletions(-)
+
+diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c
+index 7a8294d..c392b21 100644
+--- a/lib/asyn-thread.c
++++ b/lib/asyn-thread.c
+@@ -430,8 +430,19 @@ static const char *gai_strerror(int ecode)
+  * error
+  */
+ 
+-static void resolver_error(struct connectdata *conn, const char *host_or_proxy)
++static CURLcode resolver_error(struct connectdata *conn)
+ {
++  const char *host_or_proxy;
++  CURLcode rc;
++  if(conn->bits.httpproxy) {
++    host_or_proxy = "proxy";
++    rc = CURLE_COULDNT_RESOLVE_PROXY;
++  }
++  else {
++    host_or_proxy = "host";
++    rc = CURLE_COULDNT_RESOLVE_HOST;
++  }
++
+   failf(conn->data, "Could not resolve %s: %s; %s", host_or_proxy,
+         conn->async.hostname,
+ #ifdef HAVE_GAI_STRERROR
+@@ -442,6 +453,7 @@ static void resolver_error(struct connectdata *conn, const char *host_or_proxy)
+         Curl_strerror(conn, conn->async.status)
+ #endif
+     );
++  return rc;
+ }
+ 
+ /*
+@@ -473,17 +485,9 @@ CURLcode Curl_resolver_wait_resolv(struct connectdata *conn,
+   if(entry)
+     *entry = conn->async.dns;
+ 
+-  if(!conn->async.dns) {
+-    /* a name was not resolved */
+-    if(conn->bits.httpproxy) {
+-      resolver_error(conn, "proxy");
+-      rc = CURLE_COULDNT_RESOLVE_PROXY;
+-    }
+-    else {
+-      resolver_error(conn, "host");
+-      rc = CURLE_COULDNT_RESOLVE_HOST;
+-    }
+-  }
++  if(!conn->async.dns)
++    /* a name was not resolved, report error */
++    rc = resolver_error(conn);
+ 
+   destroy_async_data(&conn->async);
+ 
+@@ -518,12 +522,13 @@ CURLcode Curl_resolver_is_resolved(struct connectdata *conn,
+ 
+   if(done) {
+     getaddrinfo_complete(conn);
+-    destroy_async_data(&conn->async);
+ 
+     if(!conn->async.dns) {
+-      resolver_error(conn, "host");
+-      return CURLE_COULDNT_RESOLVE_HOST;
++      CURLcode rc = resolver_error(conn);
++      destroy_async_data(&conn->async);
++      return rc;
+     }
++    destroy_async_data(&conn->async);
+     *entry = conn->async.dns;
+   }
+   else {
+-- 
+1.7.1
+
diff --git a/SOURCES/0007-curl-7.29.0-b37b5233.patch b/SOURCES/0007-curl-7.29.0-b37b5233.patch
new file mode 100644
index 0000000..0f6a0c1
--- /dev/null
+++ b/SOURCES/0007-curl-7.29.0-b37b5233.patch
@@ -0,0 +1,35 @@
+From fd5664bc7322ebffb8d5532d17a743ace8a5449e Mon Sep 17 00:00:00 2001
+From: Zdenek Pavlas <zpavlas@redhat.com>
+Date: Fri, 26 Apr 2013 14:56:38 +0200
+Subject: [PATCH 2/2] url: initialize speed-check data for file:// protocol
+
+... in order to prevent an artificial timeout event based on stale
+speed-check data from a previous network transfer.  This commit fixes
+a regression caused by 9dd85bced56f6951107f69e581c872c1e7e3e58e.
+
+Bug: https://bugzilla.redhat.com/906031
+
+[upstream commit b37b5233cab96b5b1f2ab7f6e0b9c3df77320bba]
+
+Signed-off-by: Kamil Dudka <kdudka@redhat.com>
+---
+ lib/url.c |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/lib/url.c b/lib/url.c
+index 918ce58..b269027 100644
+--- a/lib/url.c
++++ b/lib/url.c
+@@ -4895,6 +4895,9 @@ static CURLcode create_conn(struct SessionHandle *data,
+                           -1, NULL); /* no upload */
+     }
+ 
++    /* since we skip do_init() */
++    Curl_speedinit(data);
++
+     return result;
+   }
+ #endif
+-- 
+1.7.1
+
diff --git a/SOURCES/0008-curl-7.29.0-192c4f78.patch b/SOURCES/0008-curl-7.29.0-192c4f78.patch
new file mode 100644
index 0000000..299f386
--- /dev/null
+++ b/SOURCES/0008-curl-7.29.0-192c4f78.patch
@@ -0,0 +1,43 @@
+From 25089c2c69028f0549facf93f7bdbf7344277f09 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel@haxx.se>
+Date: Sun, 19 May 2013 23:24:29 +0200
+Subject: [PATCH] Curl_urldecode: no peeking beyond end of input buffer
+
+Security problem: CVE-2013-2174
+
+If a program would give a string like "%FF" to curl_easy_unescape() but
+ask for it to decode only the first byte, it would still parse and
+decode the full hex sequence. The function then not only read beyond the
+allowed buffer but it would also deduct the *unsigned* counter variable
+for how many more bytes there's left to read in the buffer by two,
+making the counter wrap. Continuing this, the function would go on
+reading beyond the buffer and soon writing beyond the allocated target
+buffer...
+
+Bug: http://curl.haxx.se/docs/adv_20130622.html
+Reported-by: Timo Sirainen
+
+[upstream commit 192c4f788d48f82c03e9cef40013f34370e90737]
+
+Signed-off-by: Kamil Dudka <kdudka@redhat.com>
+---
+ lib/escape.c |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/lib/escape.c b/lib/escape.c
+index 6a26cf8..a567edb 100644
+--- a/lib/escape.c
++++ b/lib/escape.c
+@@ -159,7 +159,8 @@ CURLcode Curl_urldecode(struct SessionHandle *data,
+ 
+   while(--alloc > 0) {
+     in = *string;
+-    if(('%' == in) && ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
++    if(('%' == in) && (alloc > 2) &&
++       ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
+       /* this is two hexadecimal digits following a '%' */
+       char hexstr[3];
+       char *ptr;
+-- 
+1.7.1
+
diff --git a/SOURCES/0009-curl-7.29.0-3a0e931f.patch b/SOURCES/0009-curl-7.29.0-3a0e931f.patch
new file mode 100644
index 0000000..0849d9d
--- /dev/null
+++ b/SOURCES/0009-curl-7.29.0-3a0e931f.patch
@@ -0,0 +1,101 @@
+From b49d54103a4f011998195263de850642fa21f705 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Tue, 9 Jul 2013 14:59:01 +0200
+Subject: [PATCH 1/3] curl.1: document the --time-cond option in the man page
+
+[upstream commit 3a0e931fc715a80004958794a96b12cf90503f99]
+---
+ docs/curl.1 |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/docs/curl.1 b/docs/curl.1
+index 1aeeb46..4b12c3f 100644
+--- a/docs/curl.1
++++ b/docs/curl.1
+@@ -1407,6 +1407,9 @@ default 512 bytes will be used.
+ If this option is used several times, the last one will be used.
+ 
+ (Added in 7.20.0)
++.IP " -z, --time-cond TIME"
++Transfer based on a time condition.  TIME may to be preceded by -, +, or =.
++See the corresponding sections 14.24, 14.28, and 14.29 of RFC 2068.
+ .IP "--tlsauthtype <authtype>"
+ Set TLS authentication type. Currently, the only supported option is "SRP",
+ for TLS-SRP (RFC 5054). If \fI--tlsuser\fP and \fI--tlspassword\fP are
+-- 
+1.7.1
+
+
+From fdc89d82464d90560aa5da857374906338472ed6 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Tue, 9 Jul 2013 14:59:01 +0200
+Subject: [PATCH 2/3] curl.1: document the --post303 option in the man page
+
+[upstream commit 39e85d99feede7cc573902e8ab6b3dd759022d9c]
+---
+ docs/curl.1 |    7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+diff --git a/docs/curl.1 b/docs/curl.1
+index 4b12c3f..5dd6579 100644
+--- a/docs/curl.1
++++ b/docs/curl.1
+@@ -1038,6 +1038,13 @@ ubiquitous in web browsers, so curl does the conversion by default to maintain
+ consistency. However, a server may require a POST to remain a POST after such
+ a redirection. This option is meaningful only when using \fI-L, --location\fP
+ (Added in 7.19.1)
++.IP "--post303"
++(HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert POST requests
++into GET requests when following a 303 redirection. The non-RFC behaviour is
++ubiquitous in web browsers, so curl does the conversion by default to maintain
++consistency. However, a server may require a POST to remain a POST after such
++a redirection. This option is meaningful only when using \fI-L, --location\fP
++(Added in 7.26.0)
+ .IP "--proto <protocols>"
+ Tells curl to use the listed protocols for its initial retrieval. Protocols
+ are evaluated left to right, are comma separated, and are each a protocol
+-- 
+1.7.1
+
+
+From 31102c7190a0a009cf0c06b23f98880cb43d4f55 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Tue, 9 Jul 2013 15:45:36 +0200
+Subject: [PATCH 3/3] Revert "curl.1: document the --time-cond option in the man page"
+
+This reverts commit 3a0e931fc715a80004958794a96b12cf90503f99 because
+the documentation of --time-cond was duplicated by mistake.
+
+Reported by: Dave Reisner
+
+[upstream commit 45339625bc85b29225a2035a57eceda43206dd1e]
+---
+ docs/curl.1 |    5 +----
+ 1 files changed, 1 insertions(+), 4 deletions(-)
+
+diff --git a/docs/curl.1 b/docs/curl.1
+index 5dd6579..b350865 100644
+--- a/docs/curl.1
++++ b/docs/curl.1
+@@ -1414,9 +1414,6 @@ default 512 bytes will be used.
+ If this option is used several times, the last one will be used.
+ 
+ (Added in 7.20.0)
+-.IP " -z, --time-cond TIME"
+-Transfer based on a time condition.  TIME may to be preceded by -, +, or =.
+-See the corresponding sections 14.24, 14.28, and 14.29 of RFC 2068.
+ .IP "--tlsauthtype <authtype>"
+ Set TLS authentication type. Currently, the only supported option is "SRP",
+ for TLS-SRP (RFC 5054). If \fI--tlsuser\fP and \fI--tlspassword\fP are
+@@ -1699,7 +1696,7 @@ speed-time seconds it gets aborted. speed-time is set with \fI-y\fP and is 30
+ if not set.
+ 
+ If this option is used several times, the last one will be used.
+-.IP "-z/--time-cond <date expression>|<file>"
++.IP "-z, --time-cond <date expression>|<file>"
+ (HTTP/FTP) Request a file that has been modified later than the given time and
+ date, or one that has been modified before that time. The <date expression>
+ can be all sorts of date strings or if it doesn't match any internal ones, it
+-- 
+1.7.1
+
diff --git a/SOURCES/0010-curl-7.29.0-7cc00d9a.patch b/SOURCES/0010-curl-7.29.0-7cc00d9a.patch
new file mode 100644
index 0000000..fb44274
--- /dev/null
+++ b/SOURCES/0010-curl-7.29.0-7cc00d9a.patch
@@ -0,0 +1,395 @@
+From 3f411052825386a95d039435eb139a63859c3c73 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel@haxx.se>
+Date: Mon, 5 Aug 2013 23:49:53 +0200
+Subject: [PATCH] FTP: when EPSV gets a 229 but fails to connect, retry with PASV
+
+This is a regression as this logic used to work. It isn't clear when it
+broke, but I'm assuming in 7.28.0 when we went all-multi internally.
+
+This likely never worked with the multi interface. As the failed
+connection is detected once the multi state has reached DO_MORE, the
+Curl_do_more() function was now expanded somewhat so that the
+ftp_do_more() function can request to go "back" to the previous state
+when it makes another attempt - using PASV.
+
+Added test case 1233 to verify this fix. It has the little issue that it
+assumes no service is listening/accepting connections on port 1...
+
+Reported-by: byte_bucket in the #curl IRC channel
+
+[upstream commit 7cc00d9a832c42a330888aa5c11a2abad1bd5ac0]
+
+Signed-off-by: Kamil Dudka <kdudka@redhat.com>
+---
+ lib/ftp.c              |   64 ++++++++++++++++++++++++++++-------------------
+ lib/multi.c            |   11 ++++++--
+ lib/url.c              |   10 ++++---
+ lib/url.h              |    4 +-
+ lib/urldata.h          |    2 +-
+ tests/data/Makefile.am |    2 +-
+ tests/data/test1233    |   46 ++++++++++++++++++++++++++++++++++
+ 7 files changed, 102 insertions(+), 37 deletions(-)
+ create mode 100644 tests/data/test1233
+
+diff --git a/lib/ftp.c b/lib/ftp.c
+index 469b887..4501116 100644
+--- a/lib/ftp.c
++++ b/lib/ftp.c
+@@ -136,7 +136,7 @@ static CURLcode ftp_done(struct connectdata *conn,
+                          CURLcode, bool premature);
+ static CURLcode ftp_connect(struct connectdata *conn, bool *done);
+ static CURLcode ftp_disconnect(struct connectdata *conn, bool dead_connection);
+-static CURLcode ftp_do_more(struct connectdata *conn, bool *completed);
++static CURLcode ftp_do_more(struct connectdata *conn, int *completed);
+ static CURLcode ftp_multi_statemach(struct connectdata *conn, bool *done);
+ static int ftp_getsock(struct connectdata *conn, curl_socket_t *socks,
+                        int numsocks);
+@@ -1794,15 +1794,15 @@ static CURLcode ftp_state_quote(struct connectdata *conn,
+ static CURLcode ftp_epsv_disable(struct connectdata *conn)
+ {
+   CURLcode result = CURLE_OK;
+-  infof(conn->data, "got positive EPSV response, but can't connect. "
+-        "Disabling EPSV\n");
++  infof(conn->data, "Failed EPSV attempt. Disabling EPSV\n");
+   /* disable it for next transfer */
+   conn->bits.ftp_use_epsv = FALSE;
+   conn->data->state.errorbuf = FALSE; /* allow error message to get
+                                          rewritten */
+   PPSENDF(&conn->proto.ftpc.pp, "PASV", NULL);
+   conn->proto.ftpc.count1++;
+-  /* remain in the FTP_PASV state */
++  /* remain in/go to the FTP_PASV state */
++  state(conn, FTP_PASV);
+   return result;
+ }
+ 
+@@ -1931,15 +1931,7 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
+   }
+   else if(ftpc->count1 == 0) {
+     /* EPSV failed, move on to PASV */
+-
+-    /* disable it for next transfer */
+-    conn->bits.ftp_use_epsv = FALSE;
+-    infof(data, "disabling EPSV usage\n");
+-
+-    PPSENDF(&ftpc->pp, "PASV", NULL);
+-    ftpc->count1++;
+-    /* remain in the FTP_PASV state */
+-    return result;
++    return ftp_epsv_disable(conn);
+   }
+   else {
+     failf(data, "Bad PASV/EPSV response: %03d", ftpcode);
+@@ -2018,14 +2010,17 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
+   case CURLPROXY_SOCKS5_HOSTNAME:
+     result = Curl_SOCKS5(conn->proxyuser, conn->proxypasswd, newhost, newport,
+                          SECONDARYSOCKET, conn);
++    connected = TRUE;
+     break;
+   case CURLPROXY_SOCKS4:
+     result = Curl_SOCKS4(conn->proxyuser, newhost, newport,
+                          SECONDARYSOCKET, conn, FALSE);
++    connected = TRUE;
+     break;
+   case CURLPROXY_SOCKS4A:
+     result = Curl_SOCKS4(conn->proxyuser, newhost, newport,
+                          SECONDARYSOCKET, conn, TRUE);
++    connected = TRUE;
+     break;
+   case CURLPROXY_HTTP:
+   case CURLPROXY_HTTP_1_0:
+@@ -2077,8 +2072,7 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
+     }
+   }
+ 
+-  conn->bits.tcpconnect[SECONDARYSOCKET] = TRUE;
+-
++  conn->bits.tcpconnect[SECONDARYSOCKET] = connected;
+   conn->bits.do_more = TRUE;
+   state(conn, FTP_STOP); /* this phase is completed */
+ 
+@@ -3664,20 +3658,23 @@ static CURLcode ftp_range(struct connectdata *conn)
+  *
+  * This function shall be called when the second FTP (data) connection is
+  * connected.
++ *
++ * 'complete' can return 0 for incomplete, 1 for done and -1 for go back
++ * (which basically is only for when PASV is being sent to retry a failed
++ * EPSV).
+  */
+ 
+-static CURLcode ftp_do_more(struct connectdata *conn, bool *complete)
++static CURLcode ftp_do_more(struct connectdata *conn, int *completep)
+ {
+   struct SessionHandle *data=conn->data;
+   struct ftp_conn *ftpc = &conn->proto.ftpc;
+   CURLcode result = CURLE_OK;
+   bool connected = FALSE;
++  bool complete = FALSE;
+ 
+   /* the ftp struct is inited in ftp_connect() */
+   struct FTP *ftp = data->state.proto.ftp;
+ 
+-  *complete = FALSE;
+-
+   /* if the second connection isn't done yet, wait for it */
+   if(!conn->bits.tcpconnect[SECONDARYSOCKET]) {
+     if(conn->tunnel_state[SECONDARYSOCKET] == TUNNEL_CONNECT) {
+@@ -3694,14 +3691,22 @@ static CURLcode ftp_do_more(struct connectdata *conn, bool *complete)
+     if(connected) {
+       DEBUGF(infof(data, "DO-MORE connected phase starts\n"));
+     }
+-    else
++    else {
++      if(result && (ftpc->count1 == 0)) {
++        *completep = -1; /* go back to DOING please */
++        /* this is a EPSV connect failing, try PASV instead */
++        return ftp_epsv_disable(conn);
++      }
+       return result;
++    }
+   }
+ 
+   if(ftpc->state) {
+     /* already in a state so skip the intial commands.
+        They are only done to kickstart the do_more state */
+-    result = ftp_multi_statemach(conn, complete);
++    result = ftp_multi_statemach(conn, &complete);
++
++    *completep = (int)complete;
+ 
+     /* if we got an error or if we don't wait for a data connection return
+        immediately */
+@@ -3712,7 +3717,7 @@ static CURLcode ftp_do_more(struct connectdata *conn, bool *complete)
+       /* if we reach the end of the FTP state machine here, *complete will be
+          TRUE but so is ftpc->wait_data_conn, which says we need to wait for
+          the data connection and therefore we're not actually complete */
+-      *complete = FALSE;
++      *completep = 0;
+   }
+ 
+   if(ftp->transfer <= FTPTRANSFER_INFO) {
+@@ -3735,6 +3740,9 @@ static CURLcode ftp_do_more(struct connectdata *conn, bool *complete)
+ 
+         if(result)
+           return result;
++
++        *completep = 1; /* this state is now complete when the server has
++                           connected back to us */
+       }
+     }
+     else if(data->set.upload) {
+@@ -3742,7 +3750,8 @@ static CURLcode ftp_do_more(struct connectdata *conn, bool *complete)
+       if(result)
+         return result;
+ 
+-      result = ftp_multi_statemach(conn, complete);
++      result = ftp_multi_statemach(conn, &complete);
++      *completep = (int)complete;
+     }
+     else {
+       /* download */
+@@ -3770,7 +3779,8 @@ static CURLcode ftp_do_more(struct connectdata *conn, bool *complete)
+           return result;
+       }
+ 
+-      result = ftp_multi_statemach(conn, complete);
++      result = ftp_multi_statemach(conn, &complete);
++      *completep = (int)complete;
+     }
+     return result;
+   }
+@@ -3782,7 +3792,7 @@ static CURLcode ftp_do_more(struct connectdata *conn, bool *complete)
+ 
+   if(!ftpc->wait_data_conn) {
+     /* no waiting for the data connection so this is now complete */
+-    *complete = TRUE;
++    *completep = 1;
+     DEBUGF(infof(data, "DO-MORE phase ends with %d\n", (int)result));
+   }
+ 
+@@ -3825,7 +3835,9 @@ CURLcode ftp_perform(struct connectdata *conn,
+   /* run the state-machine */
+   result = ftp_multi_statemach(conn, dophase_done);
+ 
+-  *connected = conn->bits.tcpconnect[FIRSTSOCKET];
++  *connected = conn->bits.tcpconnect[SECONDARYSOCKET];
++
++  infof(conn->data, "ftp_perform ends with SECONDARY: %d\n", *connected);
+ 
+   if(*dophase_done)
+     DEBUGF(infof(conn->data, "DO phase is complete1\n"));
+@@ -4445,7 +4457,7 @@ static CURLcode ftp_dophase_done(struct connectdata *conn,
+   struct ftp_conn *ftpc = &conn->proto.ftpc;
+ 
+   if(connected) {
+-    bool completed;
++    int completed;
+     CURLcode result = ftp_do_more(conn, &completed);
+ 
+     if(result) {
+diff --git a/lib/multi.c b/lib/multi.c
+index 706df23..9a8e68e 100644
+--- a/lib/multi.c
++++ b/lib/multi.c
+@@ -906,6 +906,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
+   struct SingleRequest *k;
+   struct SessionHandle *data;
+   long timeout_ms;
++  int control;
+ 
+   if(!GOOD_EASY_HANDLE(easy->easy_handle))
+     return CURLM_BAD_EASY_HANDLE;
+@@ -1323,13 +1324,17 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
+       /*
+        * When we are connected, DO MORE and then go DO_DONE
+        */
+-      easy->result = Curl_do_more(easy->easy_conn, &dophase_done);
++      easy->result = Curl_do_more(easy->easy_conn, &control);
+ 
+       /* No need to remove this handle from the send pipeline here since that
+          is done in Curl_done() */
+       if(CURLE_OK == easy->result) {
+-        if(dophase_done) {
+-          multistate(easy, CURLM_STATE_DO_DONE);
++        if(control) {
++          /* if positive, advance to DO_DONE
++             if negative, go back to DOING */
++          multistate(easy, control==1?
++                     CURLM_STATE_DO_DONE:
++                     CURLM_STATE_DOING);
+           result = CURLM_CALL_MULTI_PERFORM;
+         }
+         else
+diff --git a/lib/url.c b/lib/url.c
+index b269027..52f7e27 100644
+--- a/lib/url.c
++++ b/lib/url.c
+@@ -5394,18 +5394,20 @@ CURLcode Curl_do(struct connectdata **connp, bool *done)
+  *
+  * TODO: A future libcurl should be able to work away this state.
+  *
++ * 'complete' can return 0 for incomplete, 1 for done and -1 for go back to
++ * DOING state there's more work to do!
+  */
+ 
+-CURLcode Curl_do_more(struct connectdata *conn, bool *completed)
++CURLcode Curl_do_more(struct connectdata *conn, int *complete)
+ {
+   CURLcode result=CURLE_OK;
+ 
+-  *completed = FALSE;
++  *complete = 0;
+ 
+   if(conn->handler->do_more)
+-    result = conn->handler->do_more(conn, completed);
++    result = conn->handler->do_more(conn, complete);
+ 
+-  if(!result && *completed)
++  if(!result && (*complete == 1))
+     /* do_complete must be called after the protocol-specific DO function */
+     do_complete(conn);
+ 
+diff --git a/lib/url.h b/lib/url.h
+index a026e90..c0d9c38 100644
+--- a/lib/url.h
++++ b/lib/url.h
+@@ -7,7 +7,7 @@
+  *                            | (__| |_| |  _ <| |___
+  *                             \___|\___/|_| \_\_____|
+  *
+- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
++ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+  *
+  * This software is licensed as described in the file COPYING, which
+  * you should have received as part of this distribution. The terms
+@@ -37,7 +37,7 @@ CURLcode Curl_close(struct SessionHandle *data); /* opposite of curl_open() */
+ CURLcode Curl_connect(struct SessionHandle *, struct connectdata **,
+                       bool *async, bool *protocol_connect);
+ CURLcode Curl_do(struct connectdata **, bool *done);
+-CURLcode Curl_do_more(struct connectdata *, bool *completed);
++CURLcode Curl_do_more(struct connectdata *, int *completed);
+ CURLcode Curl_done(struct connectdata **, CURLcode, bool premature);
+ CURLcode Curl_disconnect(struct connectdata *, bool dead_connection);
+ CURLcode Curl_protocol_connect(struct connectdata *conn, bool *done);
+diff --git a/lib/urldata.h b/lib/urldata.h
+index 7a275da..2be467b 100644
+--- a/lib/urldata.h
++++ b/lib/urldata.h
+@@ -550,7 +550,7 @@ struct Curl_async {
+ /* These function pointer types are here only to allow easier typecasting
+    within the source when we need to cast between data pointers (such as NULL)
+    and function pointers. */
+-typedef CURLcode (*Curl_do_more_func)(struct connectdata *, bool *);
++typedef CURLcode (*Curl_do_more_func)(struct connectdata *, int *);
+ typedef CURLcode (*Curl_done_func)(struct connectdata *, CURLcode, bool);
+ 
+ 
+diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
+index 3e8dae0..3f6a047 100644
+--- a/tests/data/Makefile.am
++++ b/tests/data/Makefile.am
+@@ -78,7 +78,7 @@ test1118 test1119 test1120 test1121 test1122 test1123 test1124 test1125	\
+ test1126 test1127 test1128 test1129 test1130 test1131 test1132 test1133 \
+ test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
+ test1208 test1209 test1210 test1211 test1216 test1218 \
+-test1220 test1221 test1222 test1223 \
++test1220 test1221 test1222 test1223 test1233 \
+ test1300 test1301 test1302 test1303 test1304 test1305	\
+ test1306 test1307 test1308 test1309 test1310 test1311 test1312 test1313 \
+ test1314 test1315 test1316 test1317 test1318 test1319 test1320 test1321 \
+diff --git a/tests/data/test1233 b/tests/data/test1233
+new file mode 100644
+index 0000000..caf0527
+--- /dev/null
++++ b/tests/data/test1233
+@@ -0,0 +1,46 @@
++<testcase>
++<info>
++<keywords>
++FTP
++</keywords>
++</info>
++
++# Server-side
++<reply>
++<servercmd>
++# Assuming there's nothing listening on port 1
++REPLY EPSV 229 Entering Passiv Mode (|||1|)
++</servercmd>
++<data>
++here are some bytes
++</data>
++</reply>
++
++# Client-side
++<client>
++<server>
++ftp
++</server>
++ <name>
++FTP failing to connect to EPSV port, switching to PASV
++ </name>
++ <command>
++ftp://%HOSTIP:%FTPPORT/1233
++</command>
++</client>
++
++# Verify data after the test has been "shot"
++<verify>
++<protocol>
++USER anonymous
++PASS ftp@example.com
++PWD
++EPSV
++PASV
++TYPE I
++SIZE 1233
++RETR 1233
++QUIT
++</protocol>
++</verify>
++</testcase>
+-- 
+1.7.1
+
diff --git a/SOURCES/0011-curl-7.29.0-0feeab78.patch b/SOURCES/0011-curl-7.29.0-0feeab78.patch
new file mode 100644
index 0000000..bd6b8b3
--- /dev/null
+++ b/SOURCES/0011-curl-7.29.0-0feeab78.patch
@@ -0,0 +1,74 @@
+From d3036f34cce421990e8268ee4bbfc0d9f5ceb054 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel@haxx.se>
+Date: Thu, 13 Jun 2013 19:27:12 +0200
+Subject: [PATCH] curl_easy_perform: avoid busy-looping
+
+When curl_multi_wait() finds no file descriptor to wait for, it returns
+instantly and this must be handled gracefully within curl_easy_perform()
+or cause a busy-loop. Starting now, repeated fast returns without any
+file descriptors is detected and a gradually increasing sleep will be
+used (up to a max of 1000 milliseconds) before continuing the loop.
+
+Bug: http://curl.haxx.se/bug/view.cgi?id=1238
+Reported-by: Miguel Angel
+
+[upstream commit 0feeab7802dd2a6465d22d153d8d36b2cca99b96]
+
+Signed-off-by: Kamil Dudka <kdudka@redhat.com>
+---
+ lib/easy.c |   25 +++++++++++++++++++++++++
+ 1 files changed, 25 insertions(+), 0 deletions(-)
+
+diff --git a/lib/easy.c b/lib/easy.c
+index 2739598..a7051dd 100644
+--- a/lib/easy.c
++++ b/lib/easy.c
+@@ -410,6 +410,9 @@ CURLcode curl_easy_perform(CURL *easy)
+   bool done = FALSE;
+   int rc;
+   struct SessionHandle *data = easy;
++  int without_fds = 0;  /* count number of consecutive returns from
++                           curl_multi_wait() without any filedescriptors */
++  struct timeval before;
+ 
+   if(!easy)
+     return CURLE_BAD_FUNCTION_ARGUMENT;
+@@ -445,6 +448,7 @@ CURLcode curl_easy_perform(CURL *easy)
+     int still_running;
+     int ret;
+ 
++    before = curlx_tvnow();
+     mcode = curl_multi_wait(multi, NULL, 0, 1000, &ret);
+ 
+     if(mcode == CURLM_OK) {
+@@ -453,6 +457,27 @@ CURLcode curl_easy_perform(CURL *easy)
+         code = CURLE_RECV_ERROR;
+         break;
+       }
++      else if(ret == 0) {
++        struct timeval after = curlx_tvnow();
++        /* If it returns without any filedescriptor instantly, we need to
++           avoid busy-looping during periods where it has nothing particular
++           to wait for */
++        if(curlx_tvdiff(after, before) <= 10) {
++          without_fds++;
++          if(without_fds > 2) {
++            int sleep_ms = without_fds * 50;
++            if(sleep_ms > 1000)
++              sleep_ms = 1000;
++            Curl_wait_ms(sleep_ms);
++          }
++        }
++        else
++          /* it wasn't "instant", restart counter */
++          without_fds = 0;
++      }
++      else
++        /* got file descriptor, restart counter */
++        without_fds = 0;
+ 
+       mcode = curl_multi_perform(multi, &still_running);
+     }
+-- 
+1.7.1
+
diff --git a/SOURCES/0012-curl-7.29.0-c639d725.patch b/SOURCES/0012-curl-7.29.0-c639d725.patch
new file mode 100644
index 0000000..16d1eac
--- /dev/null
+++ b/SOURCES/0012-curl-7.29.0-c639d725.patch
@@ -0,0 +1,519 @@
+From 9b675516d5fb09a455d1f7b7aa98e253361bedf3 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel@haxx.se>
+Date: Fri, 8 Feb 2013 13:48:56 +0100
+Subject: [PATCH 1/2] DONE: consider callback-aborted transfers premature
+
+This bug report properly identified that when doing SMTP and aborting
+the transfer with a callback, it must be considered aborted prematurely
+by the code to avoid QUIT etc to be attempted as that would cause a
+hang.
+
+The new test case 1507 verifies this behavior.
+
+Reported by: Patricia Muscalu
+Bug: http://curl.haxx.se/bug/view.cgi?id=1184
+
+[upstream commit 72688317adcedb9508fd2189e6c6d3945e06a004]
+
+Signed-off-by: Kamil Dudka <kdudka@redhat.com>
+---
+ lib/url.c                  |    7 ++
+ tests/data/Makefile.am     |    3 +-
+ tests/data/Makefile.in     |    3 +-
+ tests/data/test1507        |   51 +++++++++++++
+ tests/libtest/Makefile.in  |   82 +++++++++++++++++++++-
+ tests/libtest/Makefile.inc |    6 ++-
+ tests/libtest/lib1507.c    |  167 ++++++++++++++++++++++++++++++++++++++++++++
+ 7 files changed, 313 insertions(+), 6 deletions(-)
+ create mode 100644 tests/data/test1507
+ create mode 100644 tests/libtest/lib1507.c
+
+diff --git a/lib/url.c b/lib/url.c
+index 52f7e27..a6375a2 100644
+--- a/lib/url.c
++++ b/lib/url.c
+@@ -5222,6 +5222,13 @@ CURLcode Curl_done(struct connectdata **connp,
+     conn->dns_entry = NULL;
+   }
+ 
++  if(status == CURLE_ABORTED_BY_CALLBACK)
++    /* When we're aborted due to a callback return code it basically have to
++       be counted as premature as there is trouble ahead if we don't. We have
++       many callbacks and protocols work differently, we could potentially do
++       this more fine-grained in the future. */
++    premature = TRUE;
++
+   /* this calls the protocol-specific function pointer previously set */
+   if(conn->handler->done)
+     result = conn->handler->done(conn, status, premature);
+diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
+index 3f6a047..805955c 100644
+--- a/tests/data/Makefile.am
++++ b/tests/data/Makefile.am
+@@ -93,7 +93,8 @@ test1379 test1380 test1381 test1382 test1383 test1384 test1385 test1386 \
+ test1387 test1388 test1389 test1390 test1391 test1392 test1393 \
+ test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \
+ test1408 test1409 test1410 test1411 test1412 test1413 \
+-test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1508 \
++test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \
++test1508 \
+ test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \
+ test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \
+ test2016 test2017 test2018 test2019 test2020 test2021 test2022 \
+diff --git a/tests/data/Makefile.in b/tests/data/Makefile.in
+index 71c9422..1e6d679 100644
+--- a/tests/data/Makefile.in
++++ b/tests/data/Makefile.in
+@@ -357,7 +357,8 @@ test1379 test1380 test1381 test1382 test1383 test1384 test1385 test1386 \
+ test1387 test1388 test1389 test1390 test1391 test1392 test1393 \
+ test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \
+ test1408 test1409 test1410 test1411 test1412 test1413 \
+-test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1508 \
++test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \
++test1508 \
+ test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \
+ test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \
+ test2016 test2017 test2018 test2019 test2020 test2021 test2022 \
+diff --git a/tests/data/test1507 b/tests/data/test1507
+new file mode 100644
+index 0000000..b66e71d
+--- /dev/null
++++ b/tests/data/test1507
+@@ -0,0 +1,51 @@
++<testcase>
++<info>
++<keywords>
++SMTP
++multi
++</keywords>
++</info>
++
++#
++# Server-side
++<reply>
++</reply>
++
++#
++# Client-side
++<client>
++<server>
++smtp
++</server>
++<tool>
++lib1507
++</tool>
++
++# based on bug report #1184
++ <name>
++SMTP with multi interface and CURLE_ABORTED_BY_CALLBACK
++ </name>
++<stdin>
++From: different
++To: another
++
++body
++</stdin>
++ <command>
++smtp://%HOSTIP:%SMTPPORT/user
++</command>
++</client>
++
++#
++# Verify data after the test has been "shot"
++<verify>
++<protocol>
++EHLO user
++MAIL FROM:<1507-realuser@example.com>
++RCPT TO:<1507-recipient@example.com>
++DATA
++</protocol>
++<upload>
++</upload>
++</verify>
++</testcase>
+diff --git a/tests/libtest/Makefile.in b/tests/libtest/Makefile.in
+index 7683c09..e6826c0 100644
+--- a/tests/libtest/Makefile.in
++++ b/tests/libtest/Makefile.in
+@@ -85,7 +85,8 @@ noinst_PROGRAMS = chkhostname$(EXEEXT) libauthretry$(EXEEXT) \
+ 	lib591$(EXEEXT) lib597$(EXEEXT) lib598$(EXEEXT) \
+ 	lib599$(EXEEXT) lib1500$(EXEEXT) lib1501$(EXEEXT) \
+ 	lib1502$(EXEEXT) lib1503$(EXEEXT) lib1504$(EXEEXT) \
+-	lib1505$(EXEEXT) lib1506$(EXEEXT) lib1508$(EXEEXT)
++	lib1505$(EXEEXT) lib1506$(EXEEXT) lib1507$(EXEEXT) \
++	lib1508$(EXEEXT)
+ subdir = tests/libtest
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
+@@ -173,6 +174,13 @@ am_lib1506_OBJECTS = lib1506-lib1506.$(OBJEXT) $(am__objects_18) \
+ 	$(am__objects_19) $(am__objects_20)
+ lib1506_OBJECTS = $(am_lib1506_OBJECTS)
+ lib1506_DEPENDENCIES = $(am__DEPENDENCIES_1)
++am__objects_154 = lib1507-first.$(OBJEXT)
++am__objects_155 = lib1507-testutil.$(OBJEXT)
++am__objects_156 = lib1507-warnless.$(OBJEXT)
++am_lib1507_OBJECTS = lib1507-lib1507.$(OBJEXT) $(am__objects_154) \
++	$(am__objects_155) $(am__objects_156)
++lib1507_OBJECTS = $(am_lib1507_OBJECTS)
++lib1507_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ am__objects_151 = lib1508-first.$(OBJEXT)
+ am__objects_152 = lib1508-testutil.$(OBJEXT)
+ am__objects_153 = lib1508-warnless.$(OBJEXT)
+@@ -639,7 +647,8 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \
+ 	$(lib1500_SOURCES) $(lib1501_SOURCES) $(lib1502_SOURCES) \
+ 	$(lib1503_SOURCES) $(lib1504_SOURCES) $(lib1505_SOURCES) \
+-	$(lib1506_SOURCES) $(lib1508_SOURCES) $(lib500_SOURCES) $(lib501_SOURCES) \
++	$(lib1506_SOURCES) $(lib1507_SOURCES) $(lib1508_SOURCES) \
++	$(lib500_SOURCES) $(lib501_SOURCES) \
+ 	$(lib502_SOURCES) $(lib503_SOURCES) $(lib504_SOURCES) \
+ 	$(lib505_SOURCES) $(lib506_SOURCES) $(lib507_SOURCES) \
+ 	$(lib508_SOURCES) $(lib510_SOURCES) $(lib511_SOURCES) \
+@@ -669,7 +678,8 @@ SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \
+ DIST_SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \
+ 	$(lib1500_SOURCES) $(lib1501_SOURCES) $(lib1502_SOURCES) \
+ 	$(lib1503_SOURCES) $(lib1504_SOURCES) $(lib1505_SOURCES) \
+-	$(lib1506_SOURCES) $(lib1508_SOURCES) $(lib500_SOURCES) $(lib501_SOURCES)  \
++	$(lib1506_SOURCES) $(lib1507_SOURCES) $(lib1508_SOURCES) \
++	$(lib500_SOURCES) $(lib501_SOURCES)  \
+ 	$(lib502_SOURCES) $(lib503_SOURCES) $(lib504_SOURCES) \
+ 	$(lib505_SOURCES) $(lib506_SOURCES) $(lib507_SOURCES) \
+ 	$(lib508_SOURCES) $(lib510_SOURCES) $(lib511_SOURCES) \
+@@ -1162,6 +1172,9 @@ lib1505_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1505
+ lib1506_SOURCES = lib1506.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+ lib1506_LDADD = $(TESTUTIL_LIBS)
+ lib1506_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1506
++lib1507_SOURCES = lib1507.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
++lib1507_LDADD = $(TESTUTIL_LIBS)
++lib1507_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1507
+ lib1508_SOURCES = lib1508.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+ lib1508_LDADD = $(TESTUTIL_LIBS)
+ lib1508_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1508
+@@ -1263,6 +1276,9 @@ lib1505$(EXEEXT): $(lib1505_OBJECTS) $(lib1505_DEPENDENCIES) $(EXTRA_lib1505_DEP
+ lib1506$(EXEEXT): $(lib1506_OBJECTS) $(lib1506_DEPENDENCIES) $(EXTRA_lib1506_DEPENDENCIES) 
+ 	@rm -f lib1506$(EXEEXT)
+ 	$(LINK) $(lib1506_OBJECTS) $(lib1506_LDADD) $(LIBS)
++lib1507$(EXEEXT): $(lib1507_OBJECTS) $(lib1507_DEPENDENCIES) $(EXTRA_lib1507_DEPENDENCIES) 
++	@rm -f lib1507$(EXEEXT)
++	$(LINK) $(lib1507_OBJECTS) $(lib1507_LDADD) $(LIBS)
+ lib1508$(EXEEXT): $(lib1508_OBJECTS) $(lib1508_DEPENDENCIES) $(EXTRA_lib1508_DEPENDENCIES) 
+ 	@rm -f lib1508$(EXEEXT)
+ 	$(LINK) $(lib1508_OBJECTS) $(lib1508_LDADD) $(LIBS)
+@@ -1533,6 +1549,10 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1506-lib1506.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1506-testutil.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1506-warnless.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1507-first.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1507-lib1507.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1507-testutil.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1507-warnless.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1508-first.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1508-lib1508.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1508-testutil.Po@am__quote@
+@@ -2180,6 +2200,62 @@ lib1506-warnless.obj: ../../lib/warnless.c
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1506-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+ 
++lib1507-lib1507.o: lib1507.c
++@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1507-lib1507.o -MD -MP -MF $(DEPDIR)/lib1507-lib1507.Tpo -c -o lib1507-lib1507.o `test -f 'lib1507.c' || echo '$(srcdir)/'`lib1507.c
++@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/lib1507-lib1507.Tpo $(DEPDIR)/lib1507-lib1507.Po
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib1507.c' object='lib1507-lib1507.o' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1507-lib1507.o `test -f 'lib1507.c' || echo '$(srcdir)/'`lib1507.c
++
++lib1507-lib1507.obj: lib1507.c
++@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1507-lib1507.obj -MD -MP -MF $(DEPDIR)/lib1507-lib1507.Tpo -c -o lib1507-lib1507.obj `if test -f 'lib1507.c'; then $(CYGPATH_W) 'lib1507.c'; else $(CYGPATH_W) '$(srcdir)/lib1507.c'; fi`
++@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/lib1507-lib1507.Tpo $(DEPDIR)/lib1507-lib1507.Po
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib1507.c' object='lib1507-lib1507.obj' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1507-lib1507.obj `if test -f 'lib1507.c'; then $(CYGPATH_W) 'lib1507.c'; else $(CYGPATH_W) '$(srcdir)/lib1507.c'; fi`
++
++lib1507-first.o: first.c
++@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1507-first.o -MD -MP -MF $(DEPDIR)/lib1507-first.Tpo -c -o lib1507-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
++@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/lib1507-first.Tpo $(DEPDIR)/lib1507-first.Po
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='first.c' object='lib1507-first.o' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1507-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
++
++lib1507-first.obj: first.c
++@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1507-first.obj -MD -MP -MF $(DEPDIR)/lib1507-first.Tpo -c -o lib1507-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
++@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/lib1507-first.Tpo $(DEPDIR)/lib1507-first.Po
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='first.c' object='lib1507-first.obj' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1507-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
++
++lib1507-testutil.o: testutil.c
++@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1507-testutil.o -MD -MP -MF $(DEPDIR)/lib1507-testutil.Tpo -c -o lib1507-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
++@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/lib1507-testutil.Tpo $(DEPDIR)/lib1507-testutil.Po
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='testutil.c' object='lib1507-testutil.o' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1507-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
++
++lib1507-testutil.obj: testutil.c
++@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1507-testutil.obj -MD -MP -MF $(DEPDIR)/lib1507-testutil.Tpo -c -o lib1507-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
++@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/lib1507-testutil.Tpo $(DEPDIR)/lib1507-testutil.Po
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='testutil.c' object='lib1507-testutil.obj' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1507-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
++
++lib1507-warnless.o: ../../lib/warnless.c
++@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1507-warnless.o -MD -MP -MF $(DEPDIR)/lib1507-warnless.Tpo -c -o lib1507-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
++@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/lib1507-warnless.Tpo $(DEPDIR)/lib1507-warnless.Po
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../../lib/warnless.c' object='lib1507-warnless.o' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1507-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
++
++lib1507-warnless.obj: ../../lib/warnless.c
++@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1507-warnless.obj -MD -MP -MF $(DEPDIR)/lib1507-warnless.Tpo -c -o lib1507-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
++@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/lib1507-warnless.Tpo $(DEPDIR)/lib1507-warnless.Po
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../../lib/warnless.c' object='lib1507-warnless.obj' libtool=no @AMDEPBACKSLASH@
++@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1507-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
++
+ lib1508-lib1508.o: lib1508.c
+ @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1508-lib1508.o -MD -MP -MF $(DEPDIR)/lib1508-lib1508.Tpo -c -o lib1508-lib1508.o `test -f 'lib1508.c' || echo '$(srcdir)/'`lib1508.c
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/lib1508-lib1508.Tpo $(DEPDIR)/lib1508-lib1508.Po
+diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc
+index 8bf2be4..5e377d3 100644
+--- a/tests/libtest/Makefile.inc
++++ b/tests/libtest/Makefile.inc
+@@ -23,7 +23,7 @@ noinst_PROGRAMS = chkhostname libauthretry libntlmconnect \
+                 lib582 lib583        lib585 lib586 lib587               \
+   lib590 lib591                                    lib597 lib598 lib599 \
+   \
+-  lib1500 lib1501 lib1502 lib1503 lib1504 lib1505 lib1506 lib1508
++  lib1500 lib1501 lib1502 lib1503 lib1504 lib1505 lib1506 lib1507 lib1508
+ 
+ chkhostname_SOURCES = chkhostname.c ../../lib/curl_gethostname.c
+ chkhostname_LDADD = @CURL_NETWORK_LIBS@
+@@ -313,6 +313,10 @@ lib1506_SOURCES = lib1506.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+ lib1506_LDADD = $(TESTUTIL_LIBS)
+ lib1506_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1506
+ 
++lib1507_SOURCES = lib1507.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
++lib1507_LDADD = $(TESTUTIL_LIBS)
++lib1507_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1507
++
+ lib1508_SOURCES = lib1508.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+ lib1508_LDADD = $(TESTUTIL_LIBS)
+ lib1508_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1508
+diff --git a/tests/libtest/lib1507.c b/tests/libtest/lib1507.c
+new file mode 100644
+index 0000000..7c4e6ed
+--- /dev/null
++++ b/tests/libtest/lib1507.c
+@@ -0,0 +1,167 @@
++/***************************************************************************
++ *                                  _   _ ____  _
++ *  Project                     ___| | | |  _ \| |
++ *                             / __| | | | |_) | |
++ *                            | (__| |_| |  _ <| |___
++ *                             \___|\___/|_| \_\_____|
++ *
++ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
++ *
++ * This software is licensed as described in the file COPYING, which
++ * you should have received as part of this distribution. The terms
++ * are also available at http://curl.haxx.se/docs/copyright.html.
++ *
++ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
++ * copies of the Software, and permit persons to whom the Software is
++ * furnished to do so, under the terms of the COPYING file.
++ *
++ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
++ * KIND, either express or implied.
++ *
++ ***************************************************************************/
++#include "test.h"
++
++#include "testutil.h"
++#include "warnless.h"
++#include "memdebug.h"
++
++/*
++ * This is the list of basic details you need to tweak to get things right.
++ */
++#define USERNAME "user@example.com"
++#define PASSWORD "123qwerty"
++#define RECIPIENT "<1507-recipient@example.com>"
++#define MAILFROM "<1507-realuser@example.com>"
++
++#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
++
++static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
++{
++  (void)ptr;
++  (void)size;
++  (void)nmemb;
++  (void)userp;
++  return CURL_READFUNC_ABORT;
++}
++
++static struct timeval tvnow(void)
++{
++  /*
++  ** time() returns the value of time in seconds since the Epoch.
++  */
++  struct timeval now;
++  now.tv_sec = (long)time(NULL);
++  now.tv_usec = 0;
++  return now;
++}
++
++static long tvdiff(struct timeval newer, struct timeval older)
++{
++  return (newer.tv_sec-older.tv_sec)*1000+
++    (newer.tv_usec-older.tv_usec)/1000;
++}
++
++int test(char *URL)
++{
++   CURL *curl;
++   CURLM *mcurl;
++   int still_running = 1;
++   struct timeval mp_start;
++   struct curl_slist* rcpt_list = NULL;
++
++   curl_global_init(CURL_GLOBAL_DEFAULT);
++
++   curl = curl_easy_init();
++   if(!curl)
++     return 1;
++
++   mcurl = curl_multi_init();
++   if(!mcurl)
++     return 2;
++
++   rcpt_list = curl_slist_append(rcpt_list, RECIPIENT);
++   /* more addresses can be added here
++      rcpt_list = curl_slist_append(rcpt_list, "<others@example.com>");
++   */
++
++   curl_easy_setopt(curl, CURLOPT_URL, URL);
++#if 0
++   curl_easy_setopt(curl, CURLOPT_USERNAME, USERNAME);
++   curl_easy_setopt(curl, CURLOPT_PASSWORD, PASSWORD);
++#endif
++   curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
++   curl_easy_setopt(curl, CURLOPT_MAIL_FROM, MAILFROM);
++   curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, rcpt_list);
++   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
++   curl_multi_add_handle(mcurl, curl);
++
++   mp_start = tvnow();
++
++  /* we start some action by calling perform right away */
++  curl_multi_perform(mcurl, &still_running);
++
++  while(still_running) {
++    struct timeval timeout;
++    int rc; /* select() return code */
++
++    fd_set fdread;
++    fd_set fdwrite;
++    fd_set fdexcep;
++    int maxfd = -1;
++
++    long curl_timeo = -1;
++
++    FD_ZERO(&fdread);
++    FD_ZERO(&fdwrite);
++    FD_ZERO(&fdexcep);
++
++    /* set a suitable timeout to play around with */
++    timeout.tv_sec = 1;
++    timeout.tv_usec = 0;
++
++    curl_multi_timeout(mcurl, &curl_timeo);
++    if(curl_timeo >= 0) {
++      timeout.tv_sec = curl_timeo / 1000;
++      if(timeout.tv_sec > 1)
++        timeout.tv_sec = 1;
++      else
++        timeout.tv_usec = (curl_timeo % 1000) * 1000;
++    }
++
++    /* get file descriptors from the transfers */
++    curl_multi_fdset(mcurl, &fdread, &fdwrite, &fdexcep, &maxfd);
++
++    /* In a real-world program you OF COURSE check the return code of the
++       function calls.  On success, the value of maxfd is guaranteed to be
++       greater or equal than -1.  We call select(maxfd + 1, ...), specially in
++       case of (maxfd == -1), we call select(0, ...), which is basically equal
++       to sleep. */
++
++    rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
++
++    if (tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) {
++      fprintf(stderr, "ABORTING TEST, since it seems "
++              "that it would have run forever.\n");
++      break;
++    }
++
++    switch(rc) {
++    case -1:
++      /* select error */
++      break;
++    case 0: /* timeout */
++    default: /* action */
++      curl_multi_perform(mcurl, &still_running);
++      break;
++    }
++  }
++
++  curl_slist_free_all(rcpt_list);
++  curl_multi_remove_handle(mcurl, curl);
++  curl_multi_cleanup(mcurl);
++  curl_easy_cleanup(curl);
++  curl_global_cleanup();
++  return 0;
++}
++
++
+-- 
+1.7.1
+
+
+From 55004df420d1e520d84fded41a4d16f36acee119 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Mon, 9 Sep 2013 13:10:53 +0200
+Subject: [PATCH 2/2] url: handle abortion by read/write callbacks, too
+
+Otherwise, the FTP protocol would unnecessarily hang 60 seconds if
+aborted in the CURLOPT_HEADERFUNCTION callback.
+
+Reported by: Tomas Mlcoch
+Bug: https://bugzilla.redhat.com/1005686
+
+[upstream commit c639d725a37c91fb49bb3a689cb2596fad3a0645]
+---
+ lib/url.c |    8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+diff --git a/lib/url.c b/lib/url.c
+index a6375a2..bddbd91 100644
+--- a/lib/url.c
++++ b/lib/url.c
+@@ -5222,12 +5222,18 @@ CURLcode Curl_done(struct connectdata **connp,
+     conn->dns_entry = NULL;
+   }
+ 
+-  if(status == CURLE_ABORTED_BY_CALLBACK)
++  switch(status) {
++  case CURLE_ABORTED_BY_CALLBACK:
++  case CURLE_READ_ERROR:
++  case CURLE_WRITE_ERROR:
+     /* When we're aborted due to a callback return code it basically have to
+        be counted as premature as there is trouble ahead if we don't. We have
+        many callbacks and protocols work differently, we could potentially do
+        this more fine-grained in the future. */
+     premature = TRUE;
++  default:
++    break;
++  }
+ 
+   /* this calls the protocol-specific function pointer previously set */
+   if(conn->handler->done)
+-- 
+1.7.1
+
diff --git a/SOURCES/0101-curl-7.29.0-multilib.patch b/SOURCES/0101-curl-7.29.0-multilib.patch
new file mode 100644
index 0000000..38aa86c
--- /dev/null
+++ b/SOURCES/0101-curl-7.29.0-multilib.patch
@@ -0,0 +1,72 @@
+ curl-config.in     |   16 +++-------------
+ docs/curl-config.1 |    4 +++-
+ libcurl.pc.in      |    1 +
+ 3 files changed, 7 insertions(+), 14 deletions(-)
+
+diff --git a/curl-config.in b/curl-config.in
+index 150004d..95d0759 100644
+--- a/curl-config.in
++++ b/curl-config.in
+@@ -75,7 +75,7 @@ while test $# -gt 0; do
+ 	;;
+ 
+     --cc)
+-	echo "@CC@"
++	echo "gcc"
+ 	;;
+ 
+     --prefix)
+@@ -142,24 +142,14 @@ while test $# -gt 0; do
+        	;;
+ 
+     --libs)
+-	if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
+-	   CURLLIBDIR="-L@libdir@ "
+-	else
+-	   CURLLIBDIR=""
+-	fi
+-	if test "X@REQUIRE_LIB_DEPS@" = "Xyes"; then
+-	  echo ${CURLLIBDIR}-lcurl @LIBCURL_LIBS@
+-	else
+-	  echo ${CURLLIBDIR}-lcurl
+-	fi
++	pkg-config libcurl --libs
+ 	;;
+ 
+     --static-libs)
+-	echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@
+ 	;;
+ 
+     --configure)
+-      echo @CONFIGURE_OPTIONS@
++      pkg-config libcurl --variable=configure_options | sed 's/^"//;s/"$//'
+     ;;
+ 
+     *)
+diff --git a/docs/curl-config.1 b/docs/curl-config.1
+index c4f4e2b..3e0ea60 100644
+--- a/docs/curl-config.1
++++ b/docs/curl-config.1
+@@ -65,7 +65,9 @@ be listed using uppercase and are separa
+ one, or several protocols in the list. (Added in 7.13.0)
+ .IP "--static-libs"
+ Shows the complete set of libs and other linker options you will need in order
+-to link your application with libcurl statically. (Added in 7.17.1)
++to link your application with libcurl statically. Note that Fedora/RHEL libcurl
++packages do not provide any static libraries, thus cannot be linked statically.
++(Added in 7.17.1)
+ .IP "--version"
+ Outputs version information about the installed libcurl.
+ .IP "--vernum"
+diff --git a/libcurl.pc.in b/libcurl.pc.in
+index 2ba9c39..f8f8b00 100644
+--- a/libcurl.pc.in
++++ b/libcurl.pc.in
+@@ -29,6 +29,7 @@ libdir=@libdir@
+ includedir=@includedir@
+ supported_protocols="@SUPPORT_PROTOCOLS@"
+ supported_features="@SUPPORT_FEATURES@"
++configure_options=@CONFIGURE_OPTIONS@
+ 
+ Name: libcurl
+ URL: http://curl.haxx.se/
diff --git a/SOURCES/0102-curl-7.29.0-debug.patch b/SOURCES/0102-curl-7.29.0-debug.patch
new file mode 100644
index 0000000..7f70530
--- /dev/null
+++ b/SOURCES/0102-curl-7.29.0-debug.patch
@@ -0,0 +1,65 @@
+From 6710648c2b270c9ce68a7d9f1bba1222c7be8b58 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Wed, 31 Oct 2012 11:38:30 +0100
+Subject: [PATCH] prevent configure script from discarding -g in CFLAGS (#496778)
+
+---
+ configure            |   13 +++----------
+ m4/curl-compilers.m4 |   13 +++----------
+ 2 files changed, 6 insertions(+), 20 deletions(-)
+
+diff --git a/configure b/configure
+index 8f079a3..53b4774 100755
+--- a/configure
++++ b/configure
+@@ -15759,18 +15759,11 @@ $as_echo "yes" >&6; }
+     gccvhi=`echo $gccver | cut -d . -f1`
+     gccvlo=`echo $gccver | cut -d . -f2`
+     compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
+-    flags_dbg_all="-g -g0 -g1 -g2 -g3"
+-    flags_dbg_all="$flags_dbg_all -ggdb"
+-    flags_dbg_all="$flags_dbg_all -gstabs"
+-    flags_dbg_all="$flags_dbg_all -gstabs+"
+-    flags_dbg_all="$flags_dbg_all -gcoff"
+-    flags_dbg_all="$flags_dbg_all -gxcoff"
+-    flags_dbg_all="$flags_dbg_all -gdwarf-2"
+-    flags_dbg_all="$flags_dbg_all -gvms"
++    flags_dbg_all=""
+     flags_dbg_yes="-g"
+     flags_dbg_off=""
+-    flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
+-    flags_opt_yes="-O2"
++    flags_opt_all=""
++    flags_opt_yes=""
+     flags_opt_off="-O0"
+ 
+       if test -z "$SED"; then
+diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4
+index 0cbba7a..9175b5b 100644
+--- a/m4/curl-compilers.m4
++++ b/m4/curl-compilers.m4
+@@ -148,18 +148,11 @@ AC_DEFUN([CURL_CHECK_COMPILER_GNU_C], [
+     gccvhi=`echo $gccver | cut -d . -f1`
+     gccvlo=`echo $gccver | cut -d . -f2`
+     compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
+-    flags_dbg_all="-g -g0 -g1 -g2 -g3"
+-    flags_dbg_all="$flags_dbg_all -ggdb"
+-    flags_dbg_all="$flags_dbg_all -gstabs"
+-    flags_dbg_all="$flags_dbg_all -gstabs+"
+-    flags_dbg_all="$flags_dbg_all -gcoff"
+-    flags_dbg_all="$flags_dbg_all -gxcoff"
+-    flags_dbg_all="$flags_dbg_all -gdwarf-2"
+-    flags_dbg_all="$flags_dbg_all -gvms"
++    flags_dbg_all=""
+     flags_dbg_yes="-g"
+     flags_dbg_off=""
+-    flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
+-    flags_opt_yes="-O2"
++    flags_opt_all=""
++    flags_opt_yes=""
+     flags_opt_off="-O0"
+     CURL_CHECK_DEF([_WIN32], [], [silent])
+   else
+-- 
+1.7.1
+
diff --git a/SOURCES/0104-curl-7.19.7-localhost6.patch b/SOURCES/0104-curl-7.19.7-localhost6.patch
new file mode 100644
index 0000000..4f664d3
--- /dev/null
+++ b/SOURCES/0104-curl-7.19.7-localhost6.patch
@@ -0,0 +1,51 @@
+diff --git a/tests/data/test1083 b/tests/data/test1083
+index e441278..b0958b6 100644
+--- a/tests/data/test1083
++++ b/tests/data/test1083
+@@ -33,13 +33,13 @@ ipv6
+ http-ipv6
+ </server>
+  <name>
+-HTTP-IPv6 GET with ip6-localhost --interface
++HTTP-IPv6 GET with localhost6 --interface
+  </name>
+  <command>
+--g "http://%HOST6IP:%HTTP6PORT/1083" --interface ip6-localhost
++-g "http://%HOST6IP:%HTTP6PORT/1083" --interface localhost6
+ </command>
+ <precheck>
+-perl -e "if ('%CLIENT6IP' ne '[::1]') {print 'Test requires default test server host address';} else {exec './server/resolve --ipv6 ip6-localhost'; print 'Cannot run precheck resolve';}"
++perl -e "if ('%CLIENT6IP' ne '[::1]') {print 'Test requires default test server host address';} else {exec './server/resolve --ipv6 localhost6'; print 'Cannot run precheck resolve';}"
+ </precheck>
+ </client>
+ 
+diff --git a/tests/data/test241 b/tests/data/test241
+index 46eae1f..4e1632c 100644
+--- a/tests/data/test241
++++ b/tests/data/test241
+@@ -30,13 +30,13 @@ ipv6
+ http-ipv6
+ </server>
+  <name>
+-HTTP-IPv6 GET (using ip6-localhost)
++HTTP-IPv6 GET (using localhost6)
+  </name>
+  <command>
+--g "http://ip6-localhost:%HTTP6PORT/241"
++-g "http://localhost6:%HTTP6PORT/241"
+ </command>
+ <precheck>
+-./server/resolve --ipv6 ip6-localhost
++./server/resolve --ipv6 localhost6
+ </precheck>
+ </client>
+ 
+@@ -48,7 +48,7 @@ HTTP-IPv6 GET (using ip6-localhost)
+ </strip>
+ <protocol>
+ GET /241 HTTP/1.1
+-Host: ip6-localhost:%HTTP6PORT
++Host: localhost6:%HTTP6PORT
+ Accept: */*
+ 
+ </protocol>
diff --git a/SOURCES/0105-curl-7.32.0-scp-upload.patch b/SOURCES/0105-curl-7.32.0-scp-upload.patch
new file mode 100644
index 0000000..73c8aee
--- /dev/null
+++ b/SOURCES/0105-curl-7.32.0-scp-upload.patch
@@ -0,0 +1,42 @@
+From 2e973be50f75d0a85dcb995f7823f00b1fc85c2f Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Mon, 7 Oct 2013 16:07:50 +0200
+Subject: [PATCH] ssh: improve the logic for detecting blocking direction
+
+This fixes a regression introduced by commit 0feeab78 limiting the speed
+of SCP upload to 16384 B/s on a fast connection (such as localhost).
+
+http://thread.gmane.org/gmane.comp.web.curl.library/40551/focus=40561
+---
+ lib/ssh.c |    8 +++++---
+ 1 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/lib/ssh.c b/lib/ssh.c
+index 422357b..93c65c3 100644
+--- a/lib/ssh.c
++++ b/lib/ssh.c
+@@ -2287,6 +2287,10 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
+         sshc->actualcode = result;
+       }
+       else {
++        /* store this original bitmask setup to use later on if we can't
++           figure out a "real" bitmask */
++        sshc->orig_waitfor = data->req.keepon;
++
+         /* we want to use the _sending_ function even when the socket turns
+            out readable as the underlying libssh2 scp send function will deal
+            with both accordingly */
+@@ -2603,9 +2607,7 @@ static void ssh_block2waitfor(struct connectdata *conn, bool block)
+ {
+   struct ssh_conn *sshc = &conn->proto.sshc;
+   int dir;
+-  if(!block)
+-    conn->waitfor = 0;
+-  else if((dir = libssh2_session_block_directions(sshc->ssh_session))) {
++  if(block && (dir = libssh2_session_block_directions(sshc->ssh_session))) {
+     /* translate the libssh2 define bits into our own bit defines */
+     conn->waitfor = ((dir&LIBSSH2_SESSION_BLOCK_INBOUND)?KEEP_RECV:0) |
+       ((dir&LIBSSH2_SESSION_BLOCK_OUTBOUND)?KEEP_SEND:0);
+-- 
+1.7.1
+
diff --git a/SOURCES/0106-curl-7.21.0-libssh2-valgrind.patch b/SOURCES/0106-curl-7.21.0-libssh2-valgrind.patch
new file mode 100644
index 0000000..2b8cb38
--- /dev/null
+++ b/SOURCES/0106-curl-7.21.0-libssh2-valgrind.patch
@@ -0,0 +1,31 @@
+ tests/data/test604 |    3 +++
+ tests/data/test623 |    4 +++-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+diff --git a/tests/data/test604 b/tests/data/test604
+index af0259f..2bcf7d1 100644
+--- a/tests/data/test604
++++ b/tests/data/test604
+@@ -26,5 +26,8 @@ SFTP retrieval of nonexistent file
+ <errorcode>
+ 78
+ </errorcode>
++<valgrind>
++disable
++</valgrind>
+ </verify>
+ </testcase>
+diff --git a/tests/data/test623 b/tests/data/test623
+index 19e505b..38a41d2 100644
+--- a/tests/data/test623
++++ b/tests/data/test623
+@@ -36,6 +36,8 @@ for ssh upload test
+ <errorcode>
+ 79
+ </errorcode>
+-
++<valgrind>
++disable
++</valgrind>
+ </verify>
+ </testcase>
diff --git a/SOURCES/0107-curl-7.21.4-libidn-valgrind.patch b/SOURCES/0107-curl-7.21.4-libidn-valgrind.patch
new file mode 100644
index 0000000..719b3a6
--- /dev/null
+++ b/SOURCES/0107-curl-7.21.4-libidn-valgrind.patch
@@ -0,0 +1,26 @@
+From d6c42a5bf66d4d458b20836573d6989e53f7d423 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Fri, 18 Feb 2011 17:49:59 +0100
+Subject: [PATCH] curl: work around valgrind bug (RHBZ#678518)
+
+https://bugs.kde.org/show_bug.cgi?id=264936
+---
+ tests/data/test165 |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/tests/data/test165 b/tests/data/test165
+index ddfe1e9..b2cbc4f 100644
+--- a/tests/data/test165
++++ b/tests/data/test165
+@@ -54,5 +54,8 @@ Accept: */*
+ Proxy-Connection: Keep-Alive
+ 
+ </protocol>
++<valgrind>
++disable
++</valgrind>
+ </verify>
+ </testcase>
+-- 
+1.7.4
+
diff --git a/SOURCES/0108-curl-7.29.0-utf8.patch b/SOURCES/0108-curl-7.29.0-utf8.patch
new file mode 100644
index 0000000..4829d1f
--- /dev/null
+++ b/SOURCES/0108-curl-7.29.0-utf8.patch
@@ -0,0 +1,39 @@
+From c6246783cf347652f70d95c0562dd411747e9d53 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Wed, 31 Oct 2012 11:40:30 +0100
+Subject: [PATCH] Fix character encoding of docs
+
+..., which are of mixed encoding originally so a simple iconv can't
+fix them.
+---
+ CHANGES |    2 +-
+ README  |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CHANGES b/CHANGES
+index 4568408..5fc1652 100644
+--- a/CHANGES
++++ b/CHANGES
+@@ -1910,7 +1910,7 @@ Daniel Stenberg (12 Nov 2012)
+ 
+ - [Gabriel Sjoberg brought this change]
+ 
+-  Digst: Add microseconds into nounce calculation
++  Digest: Add microseconds into nounce calculation
+   
+   When using only 1 second precision, curl doesn't create new cnonce
+   values quickly enough for all uses.
+diff --git a/README b/README
+index 2ffacc3..cfd6760 100644
+--- a/README
++++ b/README
+@@ -45,5 +45,5 @@ GIT
+ NOTICE
+ 
+   Curl contains pieces of source code that is Copyright (c) 1998, 1999
+-  Kungliga Tekniska H�gskolan. This notice is included here to comply with the
++  Kungliga Tekniska Högskolan. This notice is included here to comply with the
+   distribution terms.
+-- 
+1.7.1
+
diff --git a/SOURCES/curlbuild.h b/SOURCES/curlbuild.h
new file mode 100644
index 0000000..b488626
--- /dev/null
+++ b/SOURCES/curlbuild.h
@@ -0,0 +1,9 @@
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+#include "curlbuild-32.h"
+#elif __WORDSIZE == 64
+#include "curlbuild-64.h"
+#else
+#error "Unknown word size"
+#endif
diff --git a/SPECS/curl.spec b/SPECS/curl.spec
new file mode 100644
index 0000000..968364d
--- /dev/null
+++ b/SPECS/curl.spec
@@ -0,0 +1,1189 @@
+Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
+Name: curl
+Version: 7.29.0
+Release: 12%{?dist}
+License: MIT
+Group: Applications/Internet
+Source: http://curl.haxx.se/download/%{name}-%{version}.tar.lzma
+Source2: curlbuild.h
+
+# fix a SIGSEGV when closing an unused multi handle (#914411)
+Patch1: 0001-curl-7.29.0-da3fc1ee.patch
+
+# switch SSL socket into non-blocking mode after handshake
+Patch2: 0002-curl-7.29.0-9d0af301.patch
+
+# do not ignore poll() failures other than EINTR
+Patch3: 0003-curl-7.29.0-491e026c.patch
+
+# curl_global_init() now accepts the CURL_GLOBAL_ACK_EINTR flag
+Patch4: 0004-curl-7.29.0-57ccdfa8.patch
+
+# fix cookie tailmatching to prevent cross-domain leakage (CVE-2013-1944)
+Patch5: 0005-curl-7.29.0-2eb8dcf2.patch
+
+# show proper host name on failed resolve (#957173)
+Patch6: 0006-curl-7.29.0-25e577b3.patch
+
+# prevent an artificial timeout event due to stale speed-check data (#906031)
+Patch7: 0007-curl-7.29.0-b37b5233.patch
+
+# fix heap-based buffer overflow in curl_easy_unescape() (CVE-2013-2174)
+Patch8: 0008-curl-7.29.0-192c4f78.patch
+
+# mention all option listed in 'curl --help' in curl.1 man page
+Patch9: 0009-curl-7.29.0-3a0e931f.patch
+
+# FTP: when EPSV gets a 229 but fails to connect, retry with PASV (#1002815)
+Patch10: 0010-curl-7.29.0-7cc00d9a.patch
+
+# avoid a busy-loop in curl_easy_perform() 
+Patch11: 0011-curl-7.29.0-0feeab78.patch
+
+# avoid delay if FTP is aborted in CURLOPT_HEADERFUNCTION callback (#1005686)
+Patch12: 0012-curl-7.29.0-c639d725.patch
+
+# patch making libcurl multilib ready
+Patch101: 0101-curl-7.29.0-multilib.patch
+
+# prevent configure script from discarding -g in CFLAGS (#496778)
+Patch102: 0102-curl-7.29.0-debug.patch
+
+# use localhost6 instead of ip6-localhost in the curl test-suite
+Patch104: 0104-curl-7.19.7-localhost6.patch
+
+# disable valgrind for certain test-cases (libssh2 problem)
+Patch106: 0106-curl-7.21.0-libssh2-valgrind.patch
+
+# http://thread.gmane.org/gmane.comp.web.curl.library/40551/focus=40561
+Patch105: 0105-curl-7.32.0-scp-upload.patch
+
+# work around valgrind bug (#678518)
+Patch107: 0107-curl-7.21.4-libidn-valgrind.patch
+
+# Fix character encoding of docs, which are of mixed encoding originally so
+# a simple iconv can't fix them
+Patch108: 0108-curl-7.29.0-utf8.patch
+
+Provides: webclient
+URL: http://curl.haxx.se/
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
+BuildRequires: groff
+BuildRequires: krb5-devel
+BuildRequires: libidn-devel
+BuildRequires: libssh2-devel
+BuildRequires: nss-devel
+BuildRequires: openldap-devel
+BuildRequires: openssh-clients
+BuildRequires: openssh-server
+BuildRequires: pkgconfig
+BuildRequires: stunnel
+BuildRequires: zlib-devel
+
+# require valgrind to boost test coverage on i386 and x86_64
+%ifarch %{ix86} x86_64
+BuildRequires: valgrind
+%endif
+
+Requires: libcurl = %{version}-%{release}
+
+# require at least the version of libssh2 that we were built against,
+# to ensure that we have the necessary symbols available (#525002, #642796)
+%global libssh2_version %(pkg-config --modversion libssh2 2>/dev/null || echo 0)
+
+%description
+curl is a command line tool for transferring data with URL syntax, supporting
+FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP,
+SMTP, POP3 and RTSP.  curl supports SSL certificates, HTTP POST, HTTP PUT, FTP
+uploading, HTTP form based upload, proxies, cookies, user+password
+authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer
+resume, proxy tunneling and a busload of other useful tricks. 
+
+%package -n libcurl
+Summary: A library for getting files from web servers
+Group: Development/Libraries
+Requires: libssh2%{?_isa} >= %{libssh2_version}
+
+%description -n libcurl
+libcurl is a free and easy-to-use client-side URL transfer library, supporting
+FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP,
+SMTP, POP3 and RTSP. libcurl supports SSL certificates, HTTP POST, HTTP PUT,
+FTP uploading, HTTP form based upload, proxies, cookies, user+password
+authentication (Basic, Digest, NTLM, Negotiate, Kerberos4), file transfer
+resume, http proxy tunneling and more.
+
+%package -n libcurl-devel
+Summary: Files needed for building applications with libcurl
+Group: Development/Libraries
+Requires: libcurl = %{version}-%{release}
+
+# From Fedora 14, %%{_datadir}/aclocal is included in the filesystem package
+%if 0%{?fedora} < 14
+Requires: %{_datadir}/aclocal
+%endif
+
+# From Fedora 11, RHEL-6, pkgconfig dependency is auto-detected
+%if 0%{?fedora} < 11 && 0%{?rhel} < 6
+Requires: pkgconfig
+%endif
+
+Provides: curl-devel = %{version}-%{release}
+Obsoletes: curl-devel < %{version}-%{release}
+
+%description -n libcurl-devel
+The libcurl-devel package includes header files and libraries necessary for
+developing programs which use the libcurl library. It contains the API
+documentation of the library, too.
+
+%prep
+%setup -q
+
+# upstream patches
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+
+# patches not yet upstream
+%patch105 -p1
+
+# Fedora patches
+%patch101 -p1
+%patch102 -p1
+%patch104 -p1
+%patch106 -p1
+%patch107 -p1
+%patch108 -p1
+
+# replace hard wired port numbers in the test suite
+cd tests/data/
+sed -i s/899\\\([0-9]\\\)/%{?__isa_bits}9\\1/ test*
+cd -
+
+# disable test 1112 (#565305)
+printf "1112\n" >> tests/data/DISABLED
+
+# disable test 1319 on ppc64 (server times out)
+%ifarch ppc64
+echo "1319" >> tests/data/DISABLED
+%endif
+
+%build
+[ -x /usr/kerberos/bin/krb5-config ] && KRB5_PREFIX="=/usr/kerberos"
+%configure --disable-static \
+    --enable-hidden-symbols \
+    --enable-ipv6 \
+    --enable-ldaps \
+    --enable-manual \
+    --enable-threaded-resolver \
+    --with-ca-bundle=%{_sysconfdir}/pki/tls/certs/ca-bundle.crt \
+    --with-gssapi${KRB5_PREFIX} \
+    --with-libidn \
+    --with-libssh2 \
+    --without-ssl --with-nss
+#    --enable-debug
+# use ^^^ to turn off optimizations, etc.
+
+# Remove bogus rpath
+sed -i \
+    -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
+    -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
+
+make %{?_smp_mflags}
+
+%check
+LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
+export LD_LIBRARY_PATH
+
+# uncomment to use the non-stripped library in tests
+# LD_PRELOAD=`find -name \*.so`
+# LD_PRELOAD=`readlink -f $LD_PRELOAD`
+
+cd tests
+make %{?_smp_mflags}
+
+# use different port range for 32bit and 64bit build, thus make it possible
+# to run both in parallel on the same machine
+./runtests.pl -a -b%{?__isa_bits}90 -p -v
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" install
+
+rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
+
+install -d $RPM_BUILD_ROOT%{_datadir}/aclocal
+install -m 644 docs/libcurl/libcurl.m4 $RPM_BUILD_ROOT%{_datadir}/aclocal
+
+# drop man page for a script we do not distribute
+rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/mk-ca-bundle.1
+
+# Make libcurl-devel multilib-ready (bug #488922)
+%if 0%{?__isa_bits} == 64
+%define _curlbuild_h curlbuild-64.h
+%else
+%define _curlbuild_h curlbuild-32.h
+%endif
+mv $RPM_BUILD_ROOT%{_includedir}/curl/curlbuild.h \
+   $RPM_BUILD_ROOT%{_includedir}/curl/%{_curlbuild_h}
+
+install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/curl/curlbuild.h
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -n libcurl -p /sbin/ldconfig
+
+%postun -n libcurl -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
+%doc CHANGES README* COPYING
+%doc docs/BUGS docs/FAQ docs/FEATURES
+%doc docs/MANUAL docs/RESOURCES
+%doc docs/TheArtOfHttpScripting docs/TODO
+%{_bindir}/curl
+%{_mandir}/man1/curl.1*
+
+%files -n libcurl
+%defattr(-,root,root,-)
+%{_libdir}/libcurl.so.*
+
+%files -n libcurl-devel
+%defattr(-,root,root,-)
+%doc docs/examples/*.c docs/examples/Makefile.example docs/INTERNALS
+%doc docs/CONTRIBUTE docs/libcurl/ABI
+%{_bindir}/curl-config*
+%{_includedir}/curl
+%{_libdir}/*.so
+%{_libdir}/pkgconfig/*.pc
+%{_mandir}/man1/curl-config.1*
+%{_mandir}/man3/*
+%{_datadir}/aclocal/libcurl.m4
+
+%changelog
+* Fri Oct 11 2013 Kamil Dudka <kdudka@redhat.com> 7.29.0-12
+- do not limit the speed of SCP upload on a fast connection (#1014928)
+
+* Mon Sep 09 2013 Kamil Dudka <kdudka@redhat.com> 7.29.0-11
+- avoid delay if FTP is aborted in CURLOPT_HEADERFUNCTION callback (#1005686)
+
+* Wed Sep 04 2013 Kamil Dudka <kdudka@redaht.com> 7.29.0-10
+- avoid a busy-loop in curl_easy_perform() 
+
+* Fri Aug 30 2013 Kamil Dudka <kdudka@redaht.com> 7.29.0-9
+- FTP: when EPSV gets a 229 but fails to connect, retry with PASV (#1002815)
+
+* Tue Jul 09 2013 Kamil Dudka <kdudka@redaht.com> 7.29.0-8
+- mention all option listed in 'curl --help' in curl.1 man page
+
+* Sat Jun 22 2013 Kamil Dudka <kdudka@redhat.com> 7.29.0-7
+- fix heap-based buffer overflow in curl_easy_unescape() (CVE-2013-2174)
+
+* Fri Apr 26 2013 Kamil Dudka <kdudka@redhat.com> 7.29.0-6
+- prevent an artificial timeout event due to stale speed-check data (#906031)
+- show proper host name on failed resolve (#957173)
+
+* Fri Apr 12 2013 Kamil Dudka <kdudka@redhat.com> 7.29.0-5
+- fix cookie tailmatching to prevent cross-domain leakage (CVE-2013-1944)
+
+* Tue Mar 12 2013 Kamil Dudka <kdudka@redhat.com> 7.29.0-4
+- do not ignore poll() failures other than EINTR (#919127)
+- curl_global_init() now accepts the CURL_GLOBAL_ACK_EINTR flag (#919127)
+
+* Wed Mar 06 2013 Kamil Dudka <kdudka@redhat.com> 7.29.0-3
+- switch SSL socket into non-blocking mode after handshake (#960765)
+- drop the hide_selinux.c hack no longer needed in %%check
+
+* Fri Feb 22 2013 Kamil Dudka <kdudka@redhat.com> 7.29.0-2
+- fix a SIGSEGV when closing an unused multi handle (#914411)
+
+* Wed Feb 06 2013 Kamil Dudka <kdudka@redhat.com> 7.29.0-1
+- new upstream release (fixes CVE-2013-0249)
+
+* Tue Jan 15 2013 Kamil Dudka <kdudka@redhat.com> 7.28.1-3
+- require valgrind for build only on i386 and x86_64 (#886891)
+
+* Tue Jan 15 2013 Kamil Dudka <kdudka@redhat.com> 7.28.1-2
+- prevent NSS from crashing on client auth hook failure
+- clear session cache if a client cert from file is used
+- fix error messages for CURLE_SSL_{CACERT,CRL}_BADFILE
+
+* Tue Nov 20 2012 Kamil Dudka <kdudka@redhat.com> 7.28.1-1
+- new upstream release
+
+* Wed Oct 31 2012 Kamil Dudka <kdudka@redhat.com> 7.28.0-1
+- new upstream release
+
+* Mon Oct 01 2012 Kamil Dudka <kdudka@redhat.com> 7.27.0-3
+- use the upstream facility to disable problematic tests
+- do not crash if MD5 fingerprint is not provided by libssh2
+
+* Wed Aug 01 2012 Kamil Dudka <kdudka@redhat.com> 7.27.0-2
+- eliminate unnecessary inotify events on upload via file protocol (#844385)
+
+* Sat Jul 28 2012 Kamil Dudka <kdudka@redhat.com> 7.27.0-1
+- new upstream release
+
+* Mon Jul 23 2012 Kamil Dudka <kdudka@redhat.com> 7.26.0-6
+- print reason phrase from HTTP status line on error (#676596)
+
+* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.26.0-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Sat Jun 09 2012 Kamil Dudka <kdudka@redhat.com> 7.26.0-4
+- fix duplicated SSL handshake with multi interface and proxy (#788526)
+
+* Wed May 30 2012 Karsten Hopp <karsten@redhat.com> 7.26.0-3
+- disable test 1319 on ppc64, server times out
+
+* Mon May 28 2012 Kamil Dudka <kdudka@redhat.com> 7.26.0-2
+- use human-readable error messages provided by NSS (upstream commit 72f4b534)
+
+* Fri May 25 2012 Kamil Dudka <kdudka@redhat.com> 7.26.0-1
+- new upstream release
+
+* Wed Apr 25 2012 Karsten Hopp <karsten@redhat.com> 7.25.0-3
+- valgrind on ppc64 works fine, disable ppc32 only
+
+* Wed Apr 25 2012 Karsten Hopp <karsten@redhat.com> 7.25.0-3
+- drop BR valgrind on PPC(64) until bugzilla #810992 gets fixed
+
+* Fri Apr 13 2012 Kamil Dudka <kdudka@redhat.com> 7.25.0-2
+- use NSS_InitContext() to initialize NSS if available (#738456)
+- provide human-readable names for NSS errors (upstream commit a60edcc6)
+
+* Fri Mar 23 2012 Paul Howarth <paul@city-fan.org> 7.25.0-1
+- new upstream release (#806264)
+- fix character encoding of docs with a patch rather than just iconv
+- update debug and multilib patches
+- don't use macros for commands
+- reduce size of %%prep output for readability
+
+* Tue Jan 24 2012 Kamil Dudka <kdudka@redhat.com> 7.24.0-1
+- new upstream release (fixes CVE-2012-0036)
+
+* Thu Jan 05 2012 Paul Howarth <paul@city-fan.org> 7.23.0-6
+- rebuild for gcc 4.7
+
+* Mon Jan 02 2012 Kamil Dudka <kdudka@redhat.com> 7.23.0-5
+- upstream patch that allows to run FTPS tests with nss-3.13 (#760060)
+
+* Tue Dec 27 2011 Kamil Dudka <kdudka@redhat.com> 7.23.0-4
+- allow to run FTPS tests with nss-3.13 (#760060)
+
+* Sun Dec 25 2011 Kamil Dudka <kdudka@redhat.com> 7.23.0-3
+- avoid unnecessary timeout event when waiting for 100-continue (#767490)
+
+* Mon Nov 21 2011 Kamil Dudka <kdudka@redhat.com> 7.23.0-2
+- curl -JO now uses -O name if no C-D header comes (upstream commit c532604)
+
+* Wed Nov 16 2011 Kamil Dudka <kdudka@redhat.com> 7.23.0-1
+- new upstream release (#754391)
+
+* Mon Sep 19 2011 Kamil Dudka <kdudka@redhat.com> 7.22.0-2
+- nss: select client certificates by DER (#733657)
+
+* Tue Sep 13 2011 Kamil Dudka <kdudka@redhat.com> 7.22.0-1
+- new upstream release
+- curl-config now provides dummy --static-libs option (#733956)
+
+* Sun Aug 21 2011 Paul Howarth <paul@city-fan.org> 7.21.7-4
+- actually fix SIGSEGV of curl -O -J given more than one URL (#723075)
+
+* Mon Aug 15 2011 Kamil Dudka <kdudka@redhat.com> 7.21.7-3
+- fix SIGSEGV of curl -O -J given more than one URL (#723075)
+- introduce the --delegation option of curl (#730444)
+- initialize NSS with no database if the selected database is broken (#728562)
+
+* Wed Aug 03 2011 Kamil Dudka <kdudka@redhat.com> 7.21.7-2
+- add a new option CURLOPT_GSSAPI_DELEGATION (#719939)
+
+* Thu Jun 23 2011 Kamil Dudka <kdudka@redhat.com> 7.21.7-1
+- new upstream release (fixes CVE-2011-2192)
+
+* Wed Jun 08 2011 Kamil Dudka <kdudka@redhat.com> 7.21.6-2
+- avoid an invalid timeout event on a reused handle (#679709)
+
+* Sat Apr 23 2011 Paul Howarth <paul@city-fan.org> 7.21.6-1
+- new upstream release
+
+* Mon Apr 18 2011 Kamil Dudka <kdudka@redhat.com> 7.21.5-2
+- fix the output of curl-config --version (upstream commit 82ecc85)
+
+* Mon Apr 18 2011 Kamil Dudka <kdudka@redhat.com> 7.21.5-1
+- new upstream release
+
+* Sat Apr 16 2011 Peter Robinson <pbrobinson@gmail.com> 7.21.4-4
+- no valgrind on ARMv5 arches
+
+* Sat Mar 05 2011 Dennis Gilmore <dennis@ausil.us> 7.21.4-3
+- no valgrind on sparc arches
+
+* Tue Feb 22 2011 Kamil Dudka <kdudka@redhat.com> 7.21.4-2
+- do not ignore failure of SSL handshake (upstream commit 7aa2d10)
+
+* Fri Feb 18 2011 Kamil Dudka <kdudka@redhat.com> 7.21.4-1
+- new upstream release
+- avoid memory leak on SSL connection failure (upstream commit a40f58d)
+- work around valgrind bug (#678518)
+
+* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.21.3-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Wed Jan 12 2011 Kamil Dudka <kdudka@redhat.com> 7.21.3-2
+- build libcurl with --enable-hidden-symbols
+
+* Thu Dec 16 2010 Paul Howarth <paul@city-fan.org> 7.21.3-1
+- update to 7.21.3:
+  - added --noconfigure switch to testcurl.pl
+  - added --xattr option
+  - added CURLOPT_RESOLVE and --resolve
+  - added CURLAUTH_ONLY
+  - added version-check.pl to the examples dir
+  - check for libcurl features for some command line options
+  - Curl_setopt: disallow CURLOPT_USE_SSL without SSL support
+  - http_chunks: remove debug output
+  - URL-parsing: consider ? a divider
+  - SSH: avoid using the libssh2_ prefix
+  - SSH: use libssh2_session_handshake() to work on win64
+  - ftp: prevent server from hanging on closed data connection when stopping
+    a transfer before the end of the full transfer (ranges)
+  - LDAP: detect non-binary attributes properly
+  - ftp: treat server's response 421 as CURLE_OPERATION_TIMEDOUT
+  - gnutls->handshake: improved timeout handling
+  - security: pass the right parameter to init
+  - krb5: use GSS_ERROR to check for error
+  - TFTP: resend the correct data
+  - configure: fix autoconf 2.68 warning: no AC_LANG_SOURCE call detected
+  - GnuTLS: now detects socket errors on Windows
+  - symbols-in-versions: updated en masse
+  - added a couple of examples that were missing from the tarball
+  - Curl_send/recv_plain: return errno on failure
+  - Curl_wait_for_resolv (for c-ares): correct timeout
+  - ossl_connect_common: detect connection re-use
+  - configure: prevent link errors with --librtmp
+  - openldap: use remote port in URL passed to ldap_init_fd()
+  - url: provide dead_connection flag in Curl_handler::disconnect
+  - lots of compiler warning fixes
+  - ssh: fix a download resume point calculation
+  - fix getinfo CURLINFO_LOCAL* for reused connections
+  - multi: the returned running handles counter could turn negative
+  - multi: only ever consider pipelining for connections doing HTTP(S)
+- drop upstream patches now in tarball
+- update bz650255 and disable-test1112 patches to apply against new codebase
+- add workaround for false-positive glibc-detected buffer overflow in tftpd
+  test server with FORTIFY_SOURCE (similar to #515361)
+
+* Fri Nov 12 2010 Kamil Dudka <kdudka@redhat.com> 7.21.2-5
+- do not send QUIT to a dead FTP control connection (#650255)
+- pull back glibc's implementation of str[n]casecmp(), #626470 appears fixed
+
+* Tue Nov 09 2010 Kamil Dudka <kdudka@redhat.com> 7.21.2-4
+- prevent FTP client from hanging on unrecognized ABOR response (#649347)
+- return more appropriate error code in case FTP server session idle
+  timeout has exceeded (#650255)
+
+* Fri Oct 29 2010 Kamil Dudka <kdudka@redhat.com> 7.21.2-3
+- prevent FTP server from hanging on closed data connection (#643656)
+
+* Thu Oct 14 2010 Paul Howarth <paul@city-fan.org> 7.21.2-2
+- enforce versioned libssh2 dependency for libcurl (#642796)
+
+* Wed Oct 13 2010 Kamil Dudka <kdudka@redhat.com> 7.21.2-1
+- new upstream release, drop applied patches
+- make 0102-curl-7.21.2-debug.patch less intrusive
+
+* Wed Sep 29 2010 jkeating - 7.21.1-6
+- Rebuilt for gcc bug 634757
+
+* Sat Sep 11 2010 Kamil Dudka <kdudka@redhat.com> 7.21.1-5
+- make it possible to run SCP/SFTP tests on x86_64 (#632914)
+
+* Tue Sep 07 2010 Kamil Dudka <kdudka@redhat.com> 7.21.1-4
+- work around glibc/valgrind problem on x86_64 (#631449)
+
+* Tue Aug 24 2010 Paul Howarth <paul@city-fan.org> 7.21.1-3
+- fix up patches so there's no need to run autotools in the rpm build
+- drop buildreq automake
+- drop dependency on automake for devel package from F-14, where
+  %%{_datadir}/aclocal is included in the filesystem package
+- drop dependency on pkgconfig for devel package from F-11, where
+  pkgconfig dependencies are auto-generated
+
+* Mon Aug 23 2010 Kamil Dudka <kdudka@redhat.com> 7.21.1-2
+- re-enable test575 on s390(x), already fixed (upstream commit d63bdba)
+- modify system headers to work around gcc bug (#617757)
+- curl -T now ignores file size of special files (#622520)
+- fix kerberos proxy authentication for https (#625676)
+- work around glibc/valgrind problem on x86_64 (#626470)
+
+* Thu Aug 12 2010 Kamil Dudka <kdudka@redhat.com> 7.21.1-1
+- new upstream release
+
+* Mon Jul 12 2010 Dan Horák <dan[at]danny.cz> 7.21.0-3
+- disable test 575 on s390(x)
+
+* Mon Jun 28 2010 Kamil Dudka <kdudka@redhat.com> 7.21.0-2
+- add support for NTLM authentication (#603783)
+
+* Wed Jun 16 2010 Kamil Dudka <kdudka@redhat.com> 7.21.0-1
+- new upstream release, drop applied patches
+- update of %%description
+- disable valgrind for certain test-cases (libssh2 problem)
+
+* Tue May 25 2010 Kamil Dudka <kdudka@redhat.com> 7.20.1-6
+- fix -J/--remote-header-name to strip CR-LF (upstream patch)
+
+* Wed Apr 28 2010 Kamil Dudka <kdudka@redhat.com> 7.20.1-5
+- CRL support now works again (#581926)
+- make it possible to start a testing OpenSSH server when building with SELinux
+  in the enforcing mode (#521087)
+
+* Sat Apr 24 2010 Kamil Dudka <kdudka@redhat.com> 7.20.1-4
+- upstream patch preventing failure of test536 with threaded DNS resolver
+- upstream patch preventing SSL handshake timeout underflow
+
+* Thu Apr 22 2010 Paul Howarth <paul@city-fan.org> 7.20.1-3
+- replace Rawhide s390-sleep patch with a more targeted patch adding a
+  delay after tests 513 and 514 rather than after all tests
+
+* Wed Apr 21 2010 Kamil Dudka <kdudka@redhat.com> 7.20.1-2
+- experimentally enabled threaded DNS lookup
+- make curl-config multilib ready again (#584107)
+
+* Mon Apr 19 2010 Kamil Dudka <kdudka@redhat.com> 7.20.1-1
+- new upstream release
+
+* Tue Mar 23 2010 Kamil Dudka <kdudka@redhat.com> 7.20.0-4
+- add missing quote in libcurl.m4 (#576252)
+
+* Fri Mar 19 2010 Kamil Dudka <kdudka@redhat.com> 7.20.0-3
+- throw CURLE_SSL_CERTPROBLEM in case peer rejects a certificate (#565972)
+- valgrind temporarily disabled (#574889)
+- kerberos installation prefix has been changed
+
+* Wed Feb 24 2010 Kamil Dudka <kdudka@redhat.com> 7.20.0-2
+- exclude test1112 from the test suite (#565305)
+
+* Thu Feb 11 2010 Kamil Dudka <kdudka@redhat.com> 7.20.0-1
+- new upstream release - added support for IMAP(S), POP3(S), SMTP(S) and RTSP
+- dropped patches applied upstream
+- dropped curl-7.16.0-privlibs.patch no longer useful
+- a new patch forcing -lrt when linking the curl tool and test-cases
+
+* Fri Jan 29 2010 Kamil Dudka <kdudka@redhat.com> 7.19.7-11
+- upstream patch adding a new option -J/--remote-header-name
+- dropped temporary workaround for #545779
+
+* Thu Jan 14 2010 Chris Weyl <cweyl@alumni.drew.edu> 7.19.7-10
+- bump for libssh2 rebuild
+
+* Sun Dec 20 2009 Kamil Dudka <kdudka@redhat.com> 7.19.7-9
+- temporary workaround for #548269
+  (restored behavior of 7.19.7-4)
+
+* Wed Dec 09 2009 Kamil Dudka <kdudka@redhat.com> 7.19.7-8
+- replace hard wired port numbers in the test suite
+
+* Wed Dec 09 2009 Kamil Dudka <kdudka@redhat.com> 7.19.7-7
+- use different port numbers for 32bit and 64bit builds
+- temporary workaround for #545779
+
+* Tue Dec 08 2009 Kamil Dudka <kdudka@redhat.com> 7.19.7-6
+- make it possible to run test241
+- re-enable SCP/SFTP tests (#539444)
+
+* Sat Dec 05 2009 Kamil Dudka <kdudka@redhat.com> 7.19.7-5
+- avoid use of uninitialized value in lib/nss.c
+- suppress failure of test513 on s390
+
+* Tue Dec 01 2009 Kamil Dudka <kdudka@redhat.com> 7.19.7-4
+- do not require valgrind on s390 and s390x
+- temporarily disabled SCP/SFTP test-suite (#539444)
+
+* Thu Nov 12 2009 Kamil Dudka <kdudka@redhat.com> 7.19.7-3
+- fix crash on doubly closed NSPR descriptor, patch contributed
+  by Kevin Baughman (#534176)
+- new version of patch for broken TLS servers (#525496, #527771)
+
+* Wed Nov 04 2009 Kamil Dudka <kdudka@redhat.com> 7.19.7-2
+- increased release number (CVS problem)
+
+* Wed Nov 04 2009 Kamil Dudka <kdudka@redhat.com> 7.19.7-1
+- new upstream release, dropped applied patches
+- workaround for broken TLS servers (#525496, #527771)
+
+* Wed Oct 14 2009 Kamil Dudka <kdudka@redhat.com> 7.19.6-13
+- fix timeout issues and gcc warnings within lib/nss.c
+
+* Tue Oct 06 2009 Kamil Dudka <kdudka@redhat.com> 7.19.6-12
+- upstream patch for NSS support written by Guenter Knauf
+
+* Wed Sep 30 2009 Kamil Dudka <kdudka@redhat.com> 7.19.6-11
+- build libcurl with c-ares support (#514771)
+
+* Sun Sep 27 2009 Kamil Dudka <kdudka@redhat.com> 7.19.6-10
+- require libssh2>=1.2 properly (#525002)
+
+* Sat Sep 26 2009 Kamil Dudka <kdudka@redhat.com> 7.19.6-9
+- let curl test-suite use valgrind
+- require libssh2>=1.2 (#525002)
+
+* Mon Sep 21 2009 Chris Weyl <cweyl@alumni.drew.edu> - 7.19.6-8
+- rebuild for libssh2 1.2
+
+* Thu Sep 17 2009 Kamil Dudka <kdudka@redhat.com> 7.19.6-7
+- make curl test-suite more verbose
+
+* Wed Sep 16 2009 Kamil Dudka <kdudka@redhat.com> 7.19.6-6
+- update polling patch to the latest upstream version
+
+* Thu Sep 03 2009 Kamil Dudka <kdudka@redhat.com> 7.19.6-5
+- cover ssh and stunnel support by the test-suite
+
+* Wed Sep 02 2009 Kamil Dudka <kdudka@redhat.com> 7.19.6-4
+- use pkg-config to find nss and libssh2 if possible
+- better patch (not only) for SCP/SFTP polling
+- improve error message for not matching common name (#516056)
+
+* Fri Aug 21 2009 Kamil Dudka <kdudka@redhat.com> 7.19.6-3
+- avoid tight loop during a sftp upload
+- http://permalink.gmane.org/gmane.comp.web.curl.library/24744
+
+* Tue Aug 18 2009 Kamil Dudka <kdudka@redhat.com> 7.19.6-2
+- let curl package depend on the same version of libcurl
+
+* Fri Aug 14 2009 Kamil Dudka <kdudka@redhat.com> 7.19.6-1
+- new upstream release, dropped applied patches
+- changed NSS code to not ignore the value of ssl.verifyhost and produce more
+  verbose error messages (#516056)
+
+* Wed Aug 12 2009 Ville Skyttä <ville.skytta@iki.fi> - 7.19.5-10
+- Use lzma compressed upstream tarball.
+
+* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.19.5-9
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Wed Jul 22 2009 Kamil Dudka <kdudka@redhat.com> 7.19.5-8
+- do not pre-login to all PKCS11 slots, it causes problems with HW tokens
+- try to select client certificate automatically when not specified, thanks
+  to Claes Jakobsson
+
+* Fri Jul 10 2009 Kamil Dudka <kdudka@redhat.com> 7.19.5-7
+- fix SIGSEGV when using NSS client certificates, thanks to Claes Jakobsson
+
+* Sun Jul 05 2009 Kamil Dudka <kdudka@redhat.com> 7.19.5-6
+- force test suite to use the just built libcurl, thanks to Paul Howarth
+
+* Thu Jul 02 2009 Kamil Dudka <kdudka@redhat.com> 7.19.5-5
+- run test suite after build
+- enable built-in manual
+
+* Wed Jun 24 2009 Kamil Dudka <kdudka@redhat.com> 7.19.5-4
+- fix bug introduced by the last build (#504857)
+
+* Wed Jun 24 2009 Kamil Dudka <kdudka@redhat.com> 7.19.5-3
+- exclude curlbuild.h content from spec (#504857)
+
+* Wed Jun 10 2009 Kamil Dudka <kdudka@redhat.com> 7.19.5-2
+- avoid unguarded comparison in the spec file, thanks to R P Herrold (#504857)
+
+* Tue May 19 2009 Kamil Dudka <kdudka@redhat.com> 7.19.5-1
+- update to 7.19.5, dropped applied patches
+
+* Mon May 11 2009 Kamil Dudka <kdudka@redhat.com> 7.19.4-11
+- fix infinite loop while loading a private key, thanks to Michael Cronenworth
+  (#453612)
+
+* Mon Apr 27 2009 Kamil Dudka <kdudka@redhat.com> 7.19.4-10
+- fix curl/nss memory leaks while using client certificate (#453612, accepted
+  by upstream)
+
+* Wed Apr 22 2009 Kamil Dudka <kdudka@redhat.com> 7.19.4-9
+- add missing BuildRequire for autoconf
+
+* Wed Apr 22 2009 Kamil Dudka <kdudka@redhat.com> 7.19.4-8
+- fix configure.ac to not discard -g in CFLAGS (#496778)
+
+* Tue Apr 21 2009 Debarshi Ray <rishi@fedoraproject.org> 7.19.4-7
+- Fixed configure to respect the environment's CFLAGS and CPPFLAGS settings.
+
+* Tue Apr 14 2009 Kamil Dudka <kdudka@redhat.com> 7.19.4-6
+- upstream patch fixing memory leak in lib/nss.c (#453612)
+- remove redundant dependency of libcurl-devel on libssh2-devel
+
+* Wed Mar 18 2009 Kamil Dudka <kdudka@redhat.com> 7.19.4-5
+- enable 6 additional crypto algorithms by default (#436781,
+  accepted by upstream)
+
+* Thu Mar 12 2009 Kamil Dudka <kdudka@redhat.com> 7.19.4-4
+- fix memory leak in src/main.c (accepted by upstream)
+- avoid using %%ifarch
+
+* Wed Mar 11 2009 Kamil Dudka <kdudka@redhat.com> 7.19.4-3
+- make libcurl-devel multilib-ready (bug #488922)
+
+* Fri Mar 06 2009 Jindrich Novy <jnovy@redhat.com> 7.19.4-2
+- drop .easy-leak patch, causes problems in pycurl (#488791)
+- fix libcurl-devel dependencies (#488895)
+
+* Tue Mar 03 2009 Jindrich Novy <jnovy@redhat.com> 7.19.4-1
+- update to 7.19.4 (fixes CVE-2009-0037)
+- fix leak in curl_easy* functions, thanks to Kamil Dudka
+- drop nss-fix patch, applied upstream
+
+* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.19.3-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Tue Feb 17 2009 Kamil Dudka <kdudka@redhat.com> 7.19.3-1
+- update to 7.19.3, dropped applied nss patches
+- add patch fixing 7.19.3 curl/nss bugs
+
+* Mon Dec 15 2008 Jindrich Novy <jnovy@redhat.com> 7.18.2-9
+- rebuild for f10/rawhide cvs tag clashes
+
+* Sat Dec 06 2008 Jindrich Novy <jnovy@redhat.com> 7.18.2-8
+- use improved NSS patch, thanks to Rob Crittenden (#472489)
+
+* Tue Sep 09 2008 Jindrich Novy <jnovy@redhat.com> 7.18.2-7
+- update the thread safety patch, thanks to Rob Crittenden (#462217)
+
+* Wed Sep 03 2008 Warren Togami <wtogami@redhat.com> 7.18.2-6
+- add thread safety to libcurl NSS cleanup() functions (#459297)
+
+* Fri Aug 22 2008 Tom "spot" Callaway <tcallawa@redhat.com> 7.18.2-5
+- undo mini libcurl.so.3
+
+* Mon Aug 11 2008 Tom "spot" Callaway <tcallawa@redhat.com> 7.18.2-4
+- make miniature library for libcurl.so.3
+
+* Fri Jul  4 2008 Jindrich Novy <jnovy@redhat.com> 7.18.2-3
+- enable support for libssh2 (#453958)
+
+* Wed Jun 18 2008 Jindrich Novy <jnovy@redhat.com> 7.18.2-2
+- fix curl_multi_perform() over a proxy (#450140), thanks to
+  Rob Crittenden
+
+* Wed Jun  4 2008 Jindrich Novy <jnovy@redhat.com> 7.18.2-1
+- update to 7.18.2
+
+* Wed May  7 2008 Jindrich Novy <jnovy@redhat.com> 7.18.1-2
+- spec cleanup, thanks to Paul Howarth (#225671)
+  - drop BR: libtool
+  - convert CHANGES and README to UTF-8
+  - _GNU_SOURCE in CFLAGS is no more needed
+  - remove bogus rpath
+
+* Mon Mar 31 2008 Jindrich Novy <jnovy@redhat.com> 7.18.1-1
+- update to curl 7.18.1 (fixes #397911)
+- add ABI docs for libcurl
+- remove --static-libs from curl-config
+- drop curl-config patch, obsoleted by @SSL_ENABLED@ autoconf
+  substitution (#432667)
+
+* Fri Feb 15 2008 Jindrich Novy <jnovy@redhat.com> 7.18.0-2
+- define _GNU_SOURCE so that NI_MAXHOST gets defined from glibc
+
+* Mon Jan 28 2008 Jindrich Novy <jnovy@redhat.com> 7.18.0-1
+- update to curl-7.18.0
+- drop sslgen patch -> applied upstream
+- fix typo in description
+
+* Tue Jan 22 2008 Jindrich Novy <jnovy@redhat.com> 7.17.1-6
+- fix curl-devel obsoletes so that we don't break F8->F9 upgrade
+  path (#429612)
+
+* Tue Jan  8 2008 Jindrich Novy <jnovy@redhat.com> 7.17.1-5
+- do not attempt to close a bad socket (#427966),
+  thanks to Caolan McNamara
+
+* Tue Dec  4 2007 Jindrich Novy <jnovy@redhat.com> 7.17.1-4
+- rebuild because of the openldap soname bump
+- remove old nsspem patch
+
+* Fri Nov 30 2007 Jindrich Novy <jnovy@redhat.com> 7.17.1-3
+- drop useless ldap library detection since curl doesn't
+  dlopen()s it but links to it -> BR: openldap-devel
+- enable LDAPS support (#225671), thanks to Paul Howarth
+- BR: krb5-devel to reenable GSSAPI support
+- simplify build process
+- update description
+
+* Wed Nov 21 2007 Jindrich Novy <jnovy@redhat.com> 7.17.1-2
+- update description to contain complete supported servers list (#393861)
+
+* Sat Nov 17 2007 Jindrich Novy <jnovy@redhat.com> 7.17.1-1
+- update to curl 7.17.1
+- include patch to enable SSL usage in NSS when a socket is opened
+  nonblocking, thanks to Rob Crittenden (rcritten@redhat.com)
+
+* Wed Oct 24 2007 Jindrich Novy <jnovy@redhat.com> 7.16.4-10
+- correctly provide/obsolete curl-devel (#130251)
+
+* Wed Oct 24 2007 Jindrich Novy <jnovy@redhat.com> 7.16.4-9
+- create libcurl and libcurl-devel subpackages (#130251)
+
+* Thu Oct 11 2007 Jindrich Novy <jnovy@redhat.com> 7.16.4-8
+- list features correctly when curl is compiled against NSS (#316191)
+
+* Mon Sep 17 2007 Jindrich Novy <jnovy@redhat.com> 7.16.4-7
+- add zlib-devel BR to enable gzip compressed transfers in curl (#292211)
+
+* Mon Sep 10 2007 Jindrich Novy <jnovy@redhat.com> 7.16.4-6
+- provide webclient (#225671)
+
+* Thu Sep  6 2007 Jindrich Novy <jnovy@redhat.com> 7.16.4-5
+- add support for the NSS PKCS#11 pem reader so the command-line is the
+  same for both OpenSSL and NSS by Rob Crittenden (rcritten@redhat.com)
+- switch to NSS again
+
+* Mon Sep  3 2007 Jindrich Novy <jnovy@redhat.com> 7.16.4-4
+- revert back to use OpenSSL (#266021)
+
+* Mon Aug 27 2007 Jindrich Novy <jnovy@redhat.com> 7.16.4-3
+- don't use openssl, use nss instead
+
+* Fri Aug 10 2007 Jindrich Novy <jnovy@redhat.com> 7.16.4-2
+- fix anonymous ftp login (#251570), thanks to David Cantrell
+
+* Wed Jul 11 2007 Jindrich Novy <jnovy@redhat.com> 7.16.4-1
+- update to 7.16.4
+
+* Mon Jun 25 2007 Jindrich Novy <jnovy@redhat.com> 7.16.3-1
+- update to 7.16.3
+- drop .print patch, applied upstream
+- next series of merge review fixes by Paul Howarth
+- remove aclocal stuff, no more needed
+- simplify makefile arguments
+- don't reference standard library paths in libcurl.pc
+- include docs/CONTRIBUTE
+
+* Mon Jun 18 2007 Jindrich Novy <jnovy@redhat.com> 7.16.2-5
+- don't print like crazy (#236981), backported from upstream CVS
+
+* Fri Jun 15 2007 Jindrich Novy <jnovy@redhat.com> 7.16.2-4
+- another series of review fixes (#225671),
+  thanks to Paul Howarth
+- check version of ldap library automatically
+- don't use %%makeinstall and preserve timestamps
+- drop useless patches
+
+* Fri May 11 2007 Jindrich Novy <jnovy@redhat.com> 7.16.2-3
+- add automake BR to curl-devel to fix aclocal dir. ownership,
+  thanks to Patrice Dumas
+
+* Thu May 10 2007 Jindrich Novy <jnovy@redhat.com> 7.16.2-2
+- package libcurl.m4 in curl-devel (#239664), thanks to Quy Tonthat
+
+* Wed Apr 11 2007 Jindrich Novy <jnovy@redhat.com> 7.16.2-1
+- update to 7.16.2
+
+* Mon Feb 19 2007 Jindrich Novy <jnovy@redhat.com> 7.16.1-3
+- don't create/ship static libraries (#225671)
+
+* Mon Feb  5 2007 Jindrich Novy <jnovy@redhat.com> 7.16.1-2
+- merge review related spec fixes (#225671)
+
+* Mon Jan 29 2007 Jindrich Novy <jnovy@redhat.com> 7.16.1-1
+- update to 7.16.1
+
+* Tue Jan 16 2007 Jindrich Novy <jnovy@redhat.com> 7.16.0-5
+- don't package generated makefiles for docs/examples to avoid
+  multilib conflicts
+
+* Mon Dec 18 2006 Jindrich Novy <jnovy@redhat.com> 7.16.0-4
+- convert spec to UTF-8
+- don't delete BuildRoot in %%prep phase
+- rpmlint fixes
+
+* Thu Nov 16 2006 Jindrich Novy <jnovy@redhat.com> -7.16.0-3
+- prevent curl from dlopen()ing missing ldap libraries so that
+  ldap:// requests work (#215928)
+
+* Tue Oct 31 2006 Jindrich Novy <jnovy@redhat.com> - 7.16.0-2
+- fix BuildRoot
+- add Requires: pkgconfig for curl-devel
+- move LDFLAGS and LIBS to Libs.private in libcurl.pc.in (#213278)
+
+* Mon Oct 30 2006 Jindrich Novy <jnovy@redhat.com> - 7.16.0-1
+- update to curl-7.16.0
+
+* Thu Aug 24 2006 Jindrich Novy <jnovy@redhat.com> - 7.15.5-1.fc6
+- update to curl-7.15.5
+- use %%{?dist}
+
+* Fri Jun 30 2006 Ivana Varekova <varekova@redhat.com> - 7.15.4-1
+- update to 7.15.4
+
+* Mon Mar 20 2006 Ivana Varekova <varekova@redhat.com> - 7.15.3-1
+- fix multilib problem using pkg-config
+- update to 7.15.3
+
+* Thu Feb 23 2006 Ivana Varekova <varekova@redhat.com> - 7.15.1-2
+- fix multilib problem - #181290 - 
+  curl-devel.i386 not installable together with curl-devel.x86-64
+
+* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 7.15.1-1.2.1
+- bump again for double-long bug on ppc(64)
+
+* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 7.15.1-1.2
+- rebuilt for new gcc4.1 snapshot and glibc changes
+
+* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
+- rebuilt
+
+* Thu Dec  8 2005 Ivana Varekova <varekova@redhat.com> 7.15.1-1
+- update to 7.15.1 (bug 175191)
+
+* Wed Nov 30 2005 Ivana Varekova <varekova@redhat.com> 7.15.0-3
+- fix curl-config bug 174556 - missing vernum value
+
+* Wed Nov  9 2005 Ivana Varekova <varekova@redhat.com> 7.15.0-2
+- rebuilt
+
+* Tue Oct 18 2005 Ivana Varekova <varekova@redhat.com> 7.15.0-1
+- update to 7.15.0
+
+* Thu Oct 13 2005 Ivana Varekova <varekova@redhat.com> 7.14.1-1
+- update to 7.14.1
+
+* Thu Jun 16 2005 Ivana Varekova <varekova@redhat.com> 7.14.0-1
+- rebuild new version 
+
+* Tue May 03 2005 Ivana Varekova <varekova@redhat.com> 7.13.1-3
+- fix bug 150768 - curl-7.12.3-2 breaks basic authentication
+  used Daniel Stenberg patch 
+
+* Mon Apr 25 2005 Joe Orton <jorton@redhat.com> 7.13.1-2
+- update to use ca-bundle in /etc/pki
+- mark License as MIT not MPL
+
+* Wed Mar  9 2005 Ivana Varekova <varekova@redhat.com> 7.13.1-1
+- rebuilt (7.13.1)
+
+* Tue Mar  1 2005 Tomas Mraz <tmraz@redhat.com> 7.13.0-2
+- rebuild with openssl-0.9.7e
+
+* Sun Feb 13 2005 Florian La Roche <laroche@redhat.com>
+- 7.13.0
+
+* Wed Feb  9 2005 Joe Orton <jorton@redhat.com> 7.12.3-3
+- don't pass /usr to --with-libidn to remove "-L/usr/lib" from
+  'curl-config --libs' output on x86_64.
+
+* Fri Jan 28 2005 Adrian Havill <havill@redhat.com> 7.12.3-1
+- Upgrade to 7.12.3, which uses poll() for FDSETSIZE limit (#134794)
+- require libidn-devel for devel subpkg (#141341)
+- remove proftpd kludge; included upstream
+
+* Wed Oct 06 2004 Adrian Havill <havill@redhat.com> 7.12.1-1
+- upgrade to 7.12.1
+- enable GSSAPI auth (#129353)
+- enable I18N domain names (#134595)
+- workaround for broken ProFTPD SSL auth (#134133). Thanks to
+  Aleksandar Milivojevic
+
+* Wed Sep 29 2004 Adrian Havill <havill@redhat.com> 7.12.0-4
+- move new docs position so defattr gets applied
+
+* Mon Sep 27 2004 Warren Togami <wtogami@redhat.com> 7.12.0-3
+- remove INSTALL, move libcurl docs to -devel
+
+* Mon Jul 26 2004 Jindrich Novy <jnovy@redhat.com>
+- updated to 7.12.0
+- updated nousr patch
+
+* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
+- rebuilt
+
+* Wed Apr 07 2004 Adrian Havill <havill@redhat.com> 7.11.1-1
+- upgraded; updated nousr patch
+- added COPYING (#115956)
+- 
+
+* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
+- rebuilt
+
+* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
+- rebuilt
+
+* Sat Jan 31 2004 Florian La Roche <Florian.LaRoche@redhat.de>
+- update to 7.10.8
+- remove patch2, already upstream
+
+* Wed Oct 15 2003 Adrian Havill <havill@redhat.com> 7.10.6-7
+- aclocal before libtoolize
+- move OpenLDAP license so it's present as a doc file, present in
+  both the source and binary as per conditions
+
+* Mon Oct 13 2003 Adrian Havill <havill@redhat.com> 7.10.6-6
+- add OpenLDAP copyright notice for usage of code, add OpenLDAP
+  license for this code
+
+* Tue Oct 07 2003 Adrian Havill <havill@redhat.com> 7.10.6-5
+- match serverAltName certs with SSL (#106168)
+
+* Tue Sep 16 2003 Adrian Havill <havill@redhat.com> 7.10.6-4.1
+- bump n-v-r for RHEL
+
+* Tue Sep 16 2003 Adrian Havill <havill@redhat.com> 7.10.6-4
+- restore ca cert bundle (#104400)
+- require openssl, we want to use its ca-cert bundle
+
+* Sun Sep  7 2003 Joe Orton <jorton@redhat.com> 7.10.6-3
+- rebuild
+
+* Fri Sep  5 2003 Joe Orton <jorton@redhat.com> 7.10.6-2.2
+- fix to include libcurl.so
+
+* Mon Aug 25 2003 Adrian Havill <havill@redhat.com> 7.10.6-2.1
+- bump n-v-r for RHEL
+
+* Mon Aug 25 2003 Adrian Havill <havill@redhat.com> 7.10.6-2
+- devel subpkg needs openssl-devel as a Require (#102963)
+
+* Mon Jul 28 2003 Adrian Havill <havill@redhat.com> 7.10.6-1
+- bumped version
+
+* Tue Jul 01 2003 Adrian Havill <havill@redhat.com> 7.10.5-1
+- bumped version
+
+* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
+- rebuilt
+
+* Sat Apr 12 2003 Florian La Roche <Florian.LaRoche@redhat.de>
+- update to 7.10.4
+- adapt nousr patch
+
+* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
+- rebuilt
+
+* Tue Jan 21 2003 Joe Orton <jorton@redhat.com> 7.9.8-4
+- don't add -L/usr/lib to 'curl-config --libs' output
+
+* Tue Jan  7 2003 Nalin Dahyabhai <nalin@redhat.com> 7.9.8-3
+- rebuild
+
+* Wed Nov  6 2002 Joe Orton <jorton@redhat.com> 7.9.8-2
+- fix `curl-config --libs` output for libdir!=/usr/lib
+- remove docs/LIBCURL from docs list; remove unpackaged libcurl.la
+- libtoolize and reconf
+
+* Mon Jul 22 2002 Trond Eivind Glomsrød <teg@redhat.com> 7.9.8-1
+- 7.9.8 (# 69473)
+
+* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
+- automated rebuild
+
+* Sun May 26 2002 Tim Powers <timp@redhat.com>
+- automated rebuild
+
+* Thu May 16 2002 Trond Eivind Glomsrød <teg@redhat.com> 7.9.7-1
+- 7.9.7
+
+* Wed Apr 24 2002 Trond Eivind Glomsrød <teg@redhat.com> 7.9.6-1
+- 7.9.6
+
+* Thu Mar 21 2002 Trond Eivind Glomsrød <teg@redhat.com> 7.9.5-2
+- Stop the curl-config script from printing -I/usr/include 
+  and -L/usr/lib (#59497)
+
+* Fri Mar  8 2002 Trond Eivind Glomsrød <teg@redhat.com> 7.9.5-1
+- 7.9.5
+
+* Tue Feb 26 2002 Trond Eivind Glomsrød <teg@redhat.com> 7.9.3-2
+- Rebuild
+
+* Wed Jan 23 2002 Nalin Dahyabhai <nalin@redhat.com> 7.9.3-1
+- update to 7.9.3
+
+* Wed Jan 09 2002 Tim Powers <timp@redhat.com> 7.9.2-2
+- automated rebuild
+
+* Wed Jan  9 2002 Trond Eivind Glomsrød <teg@redhat.com> 7.9.2-1
+- 7.9.2
+
+* Fri Aug 17 2001 Nalin Dahyabhai <nalin@redhat.com>
+- include curl-config in curl-devel
+- update to 7.8 to fix memory leak and strlcat() symbol pollution from libcurl
+
+* Wed Jul 18 2001 Crutcher Dunnavant <crutcher@redhat.com>
+- added openssl-devel build req
+
+* Mon May 21 2001 Tim Powers <timp@redhat.com>
+- built for the distro
+
+* Tue Apr 24 2001 Jeff Johnson <jbj@redhat.com>
+- upgrade to curl-7.7.2.
+- enable IPv6.
+
+* Fri Mar  2 2001 Tim Powers <timp@redhat.com>
+- rebuilt against openssl-0.9.6-1
+
+* Thu Jan  4 2001 Tim Powers <timp@redhat.com>
+- fixed mising ldconfigs
+- updated to 7.5.2, bug fixes
+
+* Mon Dec 11 2000 Tim Powers <timp@redhat.com>
+- updated to 7.5.1
+
+* Mon Nov  6 2000 Tim Powers <timp@redhat.com>
+- update to 7.4.1 to fix bug #20337, problems with curl -c
+- not using patch anymore, it's included in the new source. Keeping
+  for reference
+
+* Fri Oct 20 2000 Nalin Dahyabhai <nalin@redhat.com>
+- fix bogus req in -devel package
+
+* Fri Oct 20 2000 Tim Powers <timp@redhat.com> 
+- devel package needed defattr so that root owns the files
+
+* Mon Oct 16 2000 Nalin Dahyabhai <nalin@redhat.com>
+- update to 7.3
+- apply vsprintf/vsnprintf patch from Colin Phipps via Debian
+
+* Mon Aug 21 2000 Nalin Dahyabhai <nalin@redhat.com>
+- enable SSL support
+- fix packager tag
+- move buildroot to %%{_tmppath}
+
+* Tue Aug 1 2000 Tim Powers <timp@redhat.com>
+- fixed vendor tag for bug #15028
+
+* Mon Jul 24 2000 Prospector <prospector@redhat.com>
+- rebuilt
+
+* Tue Jul 11 2000 Tim Powers <timp@redhat.com>
+- workaround alpha build problems with optimizations
+
+* Mon Jul 10 2000 Tim Powers <timp@redhat.com>
+- rebuilt
+
+* Mon Jun 5 2000 Tim Powers <timp@redhat.com>
+- put man pages in correct place
+- use %%makeinstall
+
+* Mon Apr 24 2000 Tim Powers <timp@redhat.com>
+- updated to 6.5.2
+
+* Wed Nov 3 1999 Tim Powers <timp@redhat.com>
+- updated sources to 6.2
+- gzip man page
+
+* Mon Aug 30 1999 Tim Powers <timp@redhat.com>
+- changed group
+
+* Thu Aug 26 1999 Tim Powers <timp@redhat.com>
+- changelog started
+- general cleanups, changed prefix to /usr, added manpage to files section
+- including in Powertools