From 52f28997a6466b38ae9a2c00e3db98242081d8c4 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 25 Jul 2009 17:45:39 +0200 Subject: [PATCH] cURL: install ca-bundle.crt, too Signed-off-by: Johannes Schindelin --- ...Eat-own-dog-food-use-cURL-to-download-CAs.patch | 52 ++++++++++++++++++++++ src/curl/patches/0002-Add-a-.gitignore-file.patch | 38 ++++++++++++++++ src/curl/release.sh | 6 +++ 3 files changed, 96 insertions(+) create mode 100644 src/curl/patches/0001-Eat-own-dog-food-use-cURL-to-download-CAs.patch create mode 100644 src/curl/patches/0002-Add-a-.gitignore-file.patch diff --git a/src/curl/patches/0001-Eat-own-dog-food-use-cURL-to-download-CAs.patch b/src/curl/patches/0001-Eat-own-dog-food-use-cURL-to-download-CAs.patch new file mode 100644 index 00000000..4c4ce01a --- /dev/null +++ b/src/curl/patches/0001-Eat-own-dog-food-use-cURL-to-download-CAs.patch @@ -0,0 +1,52 @@ +From d3c9aec4f963fb70e5d30f4498b76925d3c5b194 Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Sat, 25 Jul 2009 17:36:51 +0200 +Subject: [PATCH] Eat own dog food: use cURL to download CAs + +Signed-off-by: Johannes Schindelin +--- + lib/mk-ca-bundle.pl | 14 +------------- + 1 files changed, 1 insertions(+), 13 deletions(-) + +diff --git a/lib/mk-ca-bundle.pl b/lib/mk-ca-bundle.pl +index c964efe..83fc5ef 100644 +--- a/lib/mk-ca-bundle.pl ++++ b/lib/mk-ca-bundle.pl +@@ -33,7 +33,6 @@ + # + use Getopt::Std; + use MIME::Base64; +-use LWP::UserAgent; + use strict; + use vars qw($opt_b $opt_h $opt_i $opt_l $opt_n $opt_q $opt_t $opt_u $opt_v); + +@@ -52,8 +51,6 @@ if ($opt_i) { + print "Operating System Name : $^O\n"; + print "Getopt::Std.pm Version : ${Getopt::Std::VERSION}\n"; + print "MIME::Base64.pm Version : ${MIME::Base64::VERSION}\n"; +- print "LWP::UserAgent.pm Version : ${LWP::UserAgent::VERSION}\n"; +- print "LWP.pm Version : ${LWP::VERSION}\n"; + print ("=" x 78 . "\n"); + } + +@@ -78,16 +75,7 @@ $txt =~ s/\?.*//; + + if (!$opt_n || !-e $txt) { + print "Downloading '$txt' ...\n" if (!$opt_q); +- my $ua = new LWP::UserAgent(agent => "$0/$version"); +- my $req = new HTTP::Request('GET', $url); +- my $res = $ua->request($req); +- if ($res->is_success) { +- open(TXT,">$txt") or die "Couldn't open $txt: $!"; +- print TXT $res->content . "\n"; +- close(TXT) or die "Couldn't close $txt: $!"; +- } else { +- die $res->status_line; +- } ++ `curl $url > $txt`; + } + + if ($opt_b && -e $crt) { +-- +1.6.3.2.1299.gee46c + diff --git a/src/curl/patches/0002-Add-a-.gitignore-file.patch b/src/curl/patches/0002-Add-a-.gitignore-file.patch new file mode 100644 index 00000000..b995becd --- /dev/null +++ b/src/curl/patches/0002-Add-a-.gitignore-file.patch @@ -0,0 +1,38 @@ +From 95898bfa20d9e10bcdf789d869652770714d2351 Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Sat, 25 Jul 2009 17:44:54 +0200 +Subject: [PATCH] Add a .gitignore file + +Signed-off-by: Johannes Schindelin +--- + .gitignore | 18 ++++++++++++++++++ + 1 files changed, 18 insertions(+), 0 deletions(-) + create mode 100644 .gitignore + +diff --git a/.gitignore b/.gitignore +new file mode 100644 +index 0000000..42de541 +--- /dev/null ++++ b/.gitignore +@@ -0,0 +1,18 @@ ++*.o ++*.lo ++*.la ++*.spec ++*.list ++*.pc ++/lib/ca-bundle.crt ++/lib/config.h ++/libtool ++/src/config.h ++/src/curl.exe ++stamp-h* ++Makefile ++.deps ++.libs ++/config.log ++/config.status ++/curl-config +-- +1.6.3.2.1299.gee46c + diff --git a/src/curl/release.sh b/src/curl/release.sh index f108560c..fbdf6604 100644 --- a/src/curl/release.sh +++ b/src/curl/release.sh @@ -25,10 +25,16 @@ test -d $DIR || { ) } || die "Could not check out cURL" +test $(cd $DIR && git rev-list HEAD | wc -l) -gt 1 || +(cd $DIR && git am ../patches/*) || +die "Could not apply patches" + (cd $DIR && ./configure --prefix=/mingw --with-ssl=/mingw && make && index=$(/share/msysGit/pre-install.sh) && make install && +make ca-bundle && +cp lib/ca-bundle.crt /mingw/bin/curl-ca-bundle.crt && /share/msysGit/post-install.sh $index "Install $FILE" ) || die "Could not install $FILE" -- 2.11.4.GIT