diff --git a/Makefile.am b/Makefile.am index f86ffbcae..7bfe6ab8c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -139,8 +139,8 @@ WINBUILD_DIST = winbuild/BUILD.WINDOWS.txt winbuild/gen_resp_file.bat \ winbuild/MakefileBuild.vc winbuild/Makefile.vc \ winbuild/Makefile.msvc.names -EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \ - RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework scripts/zsh.pl \ +EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist gnurl-config.in \ + RELEASE-NOTES buildconf libgnurl.pc.in MacOSX-Framework scripts/zsh.pl \ $(CMAKE_DIST) $(VC_DIST) $(WINBUILD_DIST) lib/libcurl.vers.in \ buildconf.bat @@ -150,13 +150,13 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ) \ $(VC11_LIBVCXPROJ) $(VC11_SRCVCXPROJ) $(VC12_LIBVCXPROJ) $(VC12_SRCVCXPROJ) \ $(VC14_LIBVCXPROJ) $(VC14_SRCVCXPROJ) -bin_SCRIPTS = curl-config +bin_SCRIPTS = gnurl-config SUBDIRS = lib src include DIST_SUBDIRS = $(SUBDIRS) tests packages docs scripts pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libcurl.pc +pkgconfig_DATA = libgnurl.pc # List of files required to generate VC IDE .dsp, .vcproj and .vcxproj files include lib/Makefile.inc diff --git a/README b/README index f0b3b9393..6a63bd4b7 100644 --- a/README +++ b/README @@ -1,3 +1,134 @@ +libgnurl is a fork of libcurl with the following major changes: + +Compilation requirements: +* libgnurl must be compiled so that it supports only HTTP and HTTPS + (remove Gopher, SSH, IMAP, etc.) +* libgnurl must be compiled so that it supports only GnuTLS + (remove CaySSL, QsoSSL, GSKit, etc.) +* removed support for NTLM, GSSAPI, SPNEGO, LDAP, metalink, HTTP2 + +Changes to the code: +* renamed the library binary from 'libcurl' to 'lignurl' +* adjustments to the testsuite, deleted tests/data/test1139 + +Usage notes: +* exported symbols were NOT renamed, so they still all have the + curl prefix; you should be able to start using libgnurl simply + by changing -lcurl to -lgnurl. + +Note that the compilation requirements were not hard-coded, but +are rather socially enforced: if you compile libgnurl, please +use the following options to configure: + +./configure --enable-ipv6 --with-gnutls --without-libssh2 \ +--without-libmetalink --without-winidn --without-librtmp \ +--without-nghttp2 --without-nss --without-cyassl \ +--without-polarssl --without-ssl --without-winssl \ +--without-darwinssl --disable-sspi --disable-ntlm-wb --disable-ldap \ +--disable-rtsp --disable-dict --disable-telnet --disable-tftp \ +--disable-pop3 --disable-imap --disable-smtp --disable-gopher \ +--disable-file --disable-ftp --disable-smb + +Naturally, you're free to specify additional options, such as +"--prefix". The result should have support only for HTTP, HTTPS (via +GnuTLS), IDN, zlib and TLS-SRP. + + + +Motivation: + +cURL supports a bunch of crypto backends. GNUnet requires the use of +GnuTLS, but other variants are used by some distributions. Supporting +other crypto backends would again expose us to a wider array of +security issues, may create licensing issues and most importantly +introduce new bugs as some crypto backends are known to introduce +subtle runtime issues. While it is possible to have two versions of +libcurl installed on the same system, this is error-prone, especially +as if we are linked against the wrong version, the bugs that arise +might be rather subtle. + +For GNUnet, we also need a particularly modern version of +GnuTLS. Thus, it would anyway be necessary to recompile cURL for +GNUnet. But what happens if one links cURL against this version of +GnuTLS? Well, first one would install GnuTLS by hand in the +system. Then, we build cURL. cURL will build against it just fine, but +the linker will eventually complain bitterly. The reason is that cURL +also links against a bunch of other system libraries (gssapi, ldap, +ssh2, rtmp, krb5, sasl2, see discussion on obscure protocols above), +which --- as they are part of the distribution --- were linked against +an older version of GnuTLS. As a result, the same binary would be +linked against two different versions of GnuTLS. That is typically a +recipe for disaster. Thus, in order to avoid updating a dozen system +libraries (and having two versions of those installed), it is +necessary to disable all of those cURL features that GNUnet does not +use, and there are many of those. For GNUnet, the more obscure +protocols supported by cURL are close to dead code --- mostly +harmless, but not useful. However, as some application may use one of +those features, distributions are typically forced to enable all of +those features, and thus including security issues that might arise +from that code. + +So to use a modern version of GnuTLS, a sane approach is to disable +all of the "optional" features of cURL that drag in system libraries +that link against the older GnuTLS. That works, except that one should +then NEVER install that version of libcurl in say /usr or /usr/local, +as that may break other parts of the system that might depend on these +features that we just disabled. Libtool versioning doesn't help here, +as it is not intended to deal with libraries that have optional +features. Naturally, installing cURL somewhere else is also +problematic, as we now need to be really careful that the linker will +link GNUnet against the right version. Note that none of this can +really be trivially fixed by the cURL developers. Rename to Fix + +At this point, developers that don't want to rebuild an entire +distribution from scratch get grumpy. Grumpy developers do silly +things, like forking code to fix it. I called the fork gnurl (to be +pronounced with a grumpy voice and an emphasis on the R) as it is bits +of cURL, a bit more GNUish, for GnuNet, and gnurl can be pronounced to +indicate the grumpy origins. + +How does forking fix it? Easy. First, we can get rid of all of the +compatibility issues --- if you use libgnurl, you state that you don't +need anything but HTTP/HTTPS. Those applications that need more, +should stick with the original cURL. Those that do not, can choose to +move to something simpler. As the library gets a new name, we do not +have to worry about tons of packages breaking as soon as one rebuilds +it. So renaming itself and saying that "libgnurl = libcurl with only +HTTP/HTTPS support and GnuTLS" fixes 99% of the problems that darkened +my mood. Note that this pretty much CANNOT be done without a fork, as +renaming is an essential part of the fix. Now, there might be creative +solutions to achieve the same thing within the standard cURL build +system, but I'm not happy to wait for a decade for Daniel to review +the patches. The changes libgnurl makes to curl are miniscule and can +easily be applied again and again whenever libcurl makes a new +release. + + +Summary: + +I want to note that the main motiviations for this fork are technical +The goal of the cURL project is clearly to support many crypto +backends and many protocols. That is a worthy goal, and I wish them +luck with it. The goal for libgnurl is to support only HTTP and HTTPS +(and only HTTP 1.x) with a single crypto backend (GnuTLS) to ensure a +small footprint and uniform experience for developers regardless of +how libcurl was compiled. + + +Using libgnurl: + +Projects that use cURL only for HTTP/HTTPS and that would work with +GnuTLS should be able to switch to libgnurl by changing "-lcurl" to +"-lgnurl". That's it. No changes to the source code should be +required. Continue to read the cURL documentation --- as libgnurl +strives for bug-for-bug compatibility with the HTTP/HTTPS/GnuTLS +subset of cURL. However, we're happy to add new features relating to +this core subset and might be easier to convince than the cURL +developers. ;-) + +Now, on to the cURL documentation... + + _ _ ____ _ ___| | | | _ \| | / __| | | | |_) | | diff --git a/configure.ac b/configure.ac index 91028458f..9c4ac70b9 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) dnl We don't know the version number "statically" so we use a dash here -AC_INIT([curl], [-], [a suitable curl mailing list: https://curl.haxx.se/mail/]) +AC_INIT([gnurl], [-], [a suitable curl mailing list: https://curl.haxx.se/mail/]) XC_OVR_ZZ50 XC_OVR_ZZ60 @@ -1327,14 +1327,7 @@ if test x"$want_gss" = xyes; then esac else LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR" - case $host in - *-hp-hpux*) - LIBS="-lgss $LIBS" - ;; - *) - LIBS="-lgssapi $LIBS" - ;; - esac + LIBS="-lgssapi $LIBS" fi else CPPFLAGS="$save_CPPFLAGS" @@ -3855,8 +3848,8 @@ AC_CONFIG_FILES([Makefile \ packages/AIX/Makefile \ packages/AIX/RPM/Makefile \ packages/AIX/RPM/curl.spec \ - curl-config \ - libcurl.pc + gnurl-config \ + libgnurl.pc ]) AC_OUTPUT diff --git a/docs/Makefile.am b/docs/Makefile.am index a1e64b6ad..3ba0121eb 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -22,10 +22,10 @@ AUTOMAKE_OPTIONS = foreign no-dependencies -man_MANS = curl.1 curl-config.1 +man_MANS = gnurl.1 gnurl-config.1 noinst_man_MANS = mk-ca-bundle.1 -GENHTMLPAGES = curl.html curl-config.html mk-ca-bundle.html -PDFPAGES = curl.pdf curl-config.pdf mk-ca-bundle.pdf +GENHTMLPAGES = gnurl.html gnurl-config.html mk-ca-bundle.html +PDFPAGES = gnurl.pdf gnurl-config.pdf mk-ca-bundle.pdf HTMLPAGES = $(GENHTMLPAGES) index.html diff --git a/docs/examples/Makefile.am b/docs/examples/Makefile.am index 7a56f345c..ec5f9a6f1 100644 --- a/docs/examples/Makefile.am +++ b/docs/examples/Makefile.am @@ -52,9 +52,9 @@ LIBS = $(BLANK_AT_MAKETIME) # Dependencies if USE_EXPLICIT_LIB_DEPS -LDADD = $(LIBDIR)/libcurl.la @LIBCURL_LIBS@ +LDADD = $(LIBDIR)/libgnurl.la @LIBCURL_LIBS@ else -LDADD = $(LIBDIR)/libcurl.la +LDADD = $(LIBDIR)/libgnurl.la endif # Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines diff --git a/docs/curl-config.1 b/docs/gnurl-config.1 similarity index 100% rename from docs/curl-config.1 rename to docs/gnurl-config.1 diff --git a/docs/curl.1 b/docs/gnurl.1 similarity index 100% rename from docs/curl.1 rename to docs/gnurl.1 diff --git a/curl-config.in b/gnurl-config.in similarity index 80% rename from curl-config.in rename to gnurl-config.in index af484b445..07bcefbf6 100644 --- a/curl-config.in +++ b/gnurl-config.in @@ -24,27 +24,27 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ includedir=@includedir@ -cppflag_curl_staticlib=@CPPFLAG_CURL_STATICLIB@ +cppflag_gnurl_staticlib=@CPPFLAG_GNURL_STATICLIB@ usage() { cat <&2 + echo "gnurl was built with static libraries disabled" >&2 exit 1 fi ;; diff --git a/guix-gnurl.scm b/guix-gnurl.scm new file mode 100644 index 000000000..029320d09 --- /dev/null +++ b/guix-gnurl.scm @@ -0,0 +1,98 @@ +;;; /*************************************************************************** +;;; * +;;; * +;;; * Copyright (C) 2016, ng0 . +;;; * +;;; * This file is an appendum to gnurl. The author isn't clear about +;;; * licensing, so in case there are problems, contact them. +;;; * +;;; * 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 https://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. +;;; * +;;; ***************************************************************************/ + + +(use-modules + (ice-9 popen) + (ice-9 match) + (ice-9 rdelim) + (guix packages) + (guix build-system gnu) + (guix gexp) + ((guix build utils) #:select (with-directory-excursion)) + (gnu packages) + (gnu packages base) + (gnu packages autotools) + (gnu packages gnunet)) + +(define %source-dir (dirname (current-filename))) + +;; Taken from https://gitlab.com/dustyweb/pubstrate/blob/master/guix.scm +(define git-file? + (let* ((pipe (with-directory-excursion %source-dir + (open-pipe* OPEN_READ "git" "ls-files"))) + (files (let loop ((lines '())) + (match (read-line pipe) + ((? eof-object?) + (reverse lines)) + (line + (loop (cons line lines)))))) + (status (close-pipe pipe))) + (lambda (file stat) + (match (stat:type stat) + ('directory #t) + ((or 'regular 'symlink) + (any (cut string-suffix? <> file) files)) + (_ #f))))) + +(define-public gnurl-git + (package + (inherit gnurl) + (name "gnurl-git") + (version (string-append "7.52.0-" "dev")) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + ,@(package-native-inputs gnurl))) + (source + (local-file %source-dir + #:recursive? #t)) + ;;#:select? git-file?)) + (arguments + `(#:configure-flags '("--enable-ipv6" "--with-gnutls" "--without-libssh2" + "--without-libmetalink" "--without-winidn" + "--without-librtmp" "--without-nghttp2" + "--without-nss" "--without-cyassl" + "--without-polarssl" "--without-ssl" + "--without-winssl" "--without-darwinssl" + "--disable-sspi" "--disable-ntlm-wb" + "--disable-ldap" "--disable-rtsp" "--disable-dict" + "--disable-telnet" "--disable-tftp" "--disable-pop3" + "--disable-imap" "--disable-smtp" "--disable-gopher" + "--disable-file" "--disable-ftp" "--disable-smb") + #:test-target "test" + #:parallel-tests? #f + #:phases + ;; We have to patch runtests.pl in tests/ directory + (modify-phases %standard-phases + (add-before 'configure 'autoconf + (lambda _ + (zero? (system* "./buildconf")))) + (replace 'check + (lambda _ + (substitute* "tests/runtests.pl" + (("/bin/sh") (which "sh"))) + (delete-file "tests/data/test1026") + (zero? (system* "make" "-C" "tests" "test")) + ))))))) + +gnurl-git diff --git a/lib/Makefile.am b/lib/Makefile.am index 12aaf6147..a1f8f8f00 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -25,14 +25,14 @@ CMAKE_DIST = CMakeLists.txt curl_config.h.cmake EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 config-win32.h \ config-win32ce.h config-riscos.h config-mac.h curl_config.h.in \ - makefile.dj config-dos.h libcurl.plist libcurl.rc config-amigaos.h \ + makefile.dj config-dos.h libgnurl.plist libcurl.rc config-amigaos.h \ makefile.amiga Makefile.netware nwlib.c nwos.c config-win32ce.h \ config-os400.h setup-os400.h config-symbian.h Makefile.Watcom \ config-tpf.h mk-ca-bundle.pl mk-ca-bundle.vbs $(CMAKE_DIST) \ firefox-db2pem.sh config-vxworks.h Makefile.vxworks checksrc.pl \ objnames-test08.sh objnames-test10.sh objnames.inc -lib_LTLIBRARIES = libcurl.la +lib_LTLIBRARIES = libgnurl.la if BUILD_UNITTESTS noinst_LTLIBRARIES = libcurlu.la @@ -102,38 +102,38 @@ AM_CPPFLAGS += -DBUILDING_LIBCURL AM_LDFLAGS = AM_CFLAGS = -libcurl_la_CPPFLAGS_EXTRA = -libcurl_la_LDFLAGS_EXTRA = -libcurl_la_CFLAGS_EXTRA = +libgnurl_la_CPPFLAGS_EXTRA = +libgnurl_la_LDFLAGS_EXTRA = +libgnurl_la_CFLAGS_EXTRA = if CURL_LT_SHLIB_USE_VERSION_INFO -libcurl_la_LDFLAGS_EXTRA += $(VERSIONINFO) +libgnurl_la_LDFLAGS_EXTRA += $(VERSIONINFO) endif if CURL_LT_SHLIB_USE_NO_UNDEFINED -libcurl_la_LDFLAGS_EXTRA += -no-undefined +libgnurl_la_LDFLAGS_EXTRA += -no-undefined endif if CURL_LT_SHLIB_USE_MIMPURE_TEXT -libcurl_la_LDFLAGS_EXTRA += -mimpure-text +libgnurl_la_LDFLAGS_EXTRA += -mimpure-text endif if CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS -libcurl_la_LDFLAGS_EXTRA += -Wl,--version-script=libcurl.vers +libgnurl_la_LDFLAGS_EXTRA += -Wl,--version-script=libcurl.vers endif if USE_CPPFLAG_CURL_STATICLIB -libcurl_la_CPPFLAGS_EXTRA += -DCURL_STATICLIB +libgnurl_la_CPPFLAGS_EXTRA += -DCURL_STATICLIB endif if DOING_CURL_SYMBOL_HIDING -libcurl_la_CPPFLAGS_EXTRA += -DCURL_HIDDEN_SYMBOLS -libcurl_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING) +libgnurl_la_CPPFLAGS_EXTRA += -DCURL_HIDDEN_SYMBOLS +libgnurl_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING) endif -libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcurl_la_CPPFLAGS_EXTRA) -libcurl_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_la_LDFLAGS_EXTRA) $(LDFLAGS) $(LIBCURL_LIBS) -libcurl_la_CFLAGS = $(AM_CFLAGS) $(libcurl_la_CFLAGS_EXTRA) +libgnurl_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcurl_la_CPPFLAGS_EXTRA) +libgnurl_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_la_LDFLAGS_EXTRA) $(LDFLAGS) $(LIBCURL_LIBS) +libgnurl_la_CFLAGS = $(AM_CFLAGS) $(libcurl_la_CFLAGS_EXTRA) libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_STATICLIB -DUNITTESTS libcurlu_la_LDFLAGS = $(AM_LDFLAGS) -static $(LIBCURL_LIBS) @@ -142,7 +142,7 @@ libcurlu_la_CFLAGS = $(AM_CFLAGS) # Makefile.inc provides the CSOURCES and HHEADERS defines include Makefile.inc -libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS) +libgnurl_la_SOURCES = $(CSOURCES) $(HHEADERS) libcurlu_la_SOURCES = $(CSOURCES) $(HHEADERS) checksrc: diff --git a/lib/libcurl.plist b/lib/libgnurl.plist similarity index 88% rename from lib/libcurl.plist rename to lib/libgnurl.plist index 622f66cfb..33c2fdefa 100644 --- a/lib/libcurl.plist +++ b/lib/libgnurl.plist @@ -9,7 +9,7 @@ English CFBundleExecutable - curl + gnurl CFBundleIdentifier se.haxx.curl.libcurl @@ -18,7 +18,7 @@ 7.12.3 CFBundleName - libcurl + libgnurl CFBundlePackageType FMWK @@ -30,6 +30,6 @@ libcurl 7.12.3 CFBundleGetInfoString - libcurl.plist 7.12.3 + libgnurl.plist 7.12.3 diff --git a/libcurl.pc.in b/libgnurl.pc.in similarity index 88% rename from libcurl.pc.in rename to libgnurl.pc.in index feea1cd91..ec56fffcf 100644 --- a/libcurl.pc.in +++ b/libgnurl.pc.in @@ -30,10 +30,10 @@ includedir=@includedir@ supported_protocols="@SUPPORT_PROTOCOLS@" supported_features="@SUPPORT_FEATURES@" -Name: libcurl -URL: https://curl.haxx.se/ -Description: Library to transfer files with ftp, http, etc. -Version: @CURLVERSION@ -Libs: -L${libdir} -lcurl -Libs.private: @LIBCURL_LIBS@ +Name: libgnurl +URL: http://curl.haxx.se/ +Description: Library to transfer files with http or https +Version: @GNURLVERSION@ +Libs: -L${libdir} -lgnurl +Libs.private: @LIBGNURL_LIBS@ Cflags: -I${includedir} @CPPFLAG_CURL_STATICLIB@ diff --git a/maketgz b/maketgz index 8d117e688..226b3f2b1 100755 --- a/maketgz +++ b/maketgz @@ -98,9 +98,13 @@ for ver in vc7 vc8 vc9 vc10 vc11 vc12 vc14; do mv lib/Makefile.$ver lib/Makefile.$ver.dist done +# Replace version number in plist file: +PLIST=lib/libgnurl.plist +sed "s/7\.12\.3/$libversion/g" $PLIST > $PLIST.dist + echo "curl version $curlversion" -echo "libcurl version $libversion" -echo "libcurl numerical $numeric" +echo "libgnurl version $libversion" +echo "libgnurl numerical $numeric" echo "datestamp $datestamp" findprog() @@ -154,7 +158,7 @@ git log --pretty=fuller --no-color --date=short --decorate=full -1000 | ./script # echo "make dist" -targz="curl-$version.tar.gz" +targz="gnurl-$version.tar.gz" make -sj dist VERSION=$version ############################################################################ @@ -162,7 +166,7 @@ make -sj dist VERSION=$version # Now make a bz2 archive from the tar.gz original # -bzip2="curl-$version.tar.bz2" +bzip2="gnurl-$version.tar.bz2" echo "Generating $bzip2" gzip -dc $targz | bzip2 --best > $bzip2 @@ -171,7 +175,7 @@ gzip -dc $targz | bzip2 --best > $bzip2 # Now make an lzma archive from the tar.gz original # -lzma="curl-$version.tar.lzma" +lzma="gnurl-$version.tar.lzma" echo "Generating $lzma" gzip -dc $targz | lzma --best - > $lzma @@ -191,7 +195,7 @@ makezip () rm -rf $tempdir } -zip="curl-$version.zip" +zip="gnurl-$version.zip" echo "Generating $zip" tempdir=".builddir" makezip diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 32dc1b9e2..33c01535d 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -31,7 +31,7 @@ if CROSSCOMPILING @echo "NOTICE: we can't generate zsh completion when cross-compiling!" else # if not cross-compiling: @if ! test -x "$(PERL)"; then echo "No perl: can't install zsh.pl"; exit 0; fi - $(PERL) $(srcdir)/zsh.pl $(top_builddir)/src/curl$(EXEEXT) > $@ + $(PERL) $(srcdir)/zsh.pl $(top_builddir)/src/gnurl$(EXEEXT) > $@ endif install-data-local: diff --git a/src/Makefile.Watcom b/src/Makefile.Watcom index 25cd3bf88..67e542d7a 100644 --- a/src/Makefile.Watcom +++ b/src/Makefile.Watcom @@ -47,7 +47,7 @@ !ifdef %libname LIBNAME = $(%libname) !else -LIBNAME = libcurl +LIBNAME = libgnurl !endif TARGETS = curl.exe diff --git a/src/Makefile.am b/src/Makefile.am index 878bbfef5..d964ae1ed 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -45,7 +45,7 @@ AM_CPPFLAGS = -I$(top_builddir)/include/curl \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src -bin_PROGRAMS = curl +bin_PROGRAMS = gnurl if USE_CPPFLAG_CURL_STATICLIB AM_CPPFLAGS += -DCURL_STATICLIB @@ -54,7 +54,7 @@ endif include Makefile.inc # CURL_FILES comes from Makefile.inc -curl_SOURCES = $(CURL_FILES) +gnurl_SOURCES = $(CURL_FILES) # This might hold -Werror CFLAGS += @CURL_CFLAG_EXTRAS@ @@ -63,14 +63,14 @@ CFLAGS += @CURL_CFLAG_EXTRAS@ LIBS = $(BLANK_AT_MAKETIME) if USE_EXPLICIT_LIB_DEPS -curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @LIBCURL_LIBS@ +gnurl_LDADD = $(top_builddir)/lib/libgnurl.la @LIBMETALINK_LIBS@ @LIBCURL_LIBS@ else -curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @NSS_LIBS@ @SSL_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@ +gnurl_LDADD = $(top_builddir)/lib/libgnurl.la @LIBMETALINK_LIBS@ @NSS_LIBS@ @SSL_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@ endif -curl_LDFLAGS = @LIBMETALINK_LDFLAGS@ -curl_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS) -curl_DEPENDENCIES = $(top_builddir)/lib/libcurl.la +gnurl_LDFLAGS = @LIBMETALINK_LDFLAGS@ +gnurl_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS) +gnurl_DEPENDENCIES = $(top_builddir)/lib/libgnurl.la # if unit tests are enabled, build a static library to link them with if BUILD_UNITTESTS @@ -79,7 +79,7 @@ libcurltool_la_CPPFLAGS = $(LIBMETALINK_CPPFLAGS) $(AM_CPPFLAGS) \ -DCURL_STATICLIB -DUNITTESTS libcurltool_la_CFLAGS = libcurltool_la_LDFLAGS = -static $(LINKFLAGS) -libcurltool_la_SOURCES = $(curl_SOURCES) +libcurltool_la_SOURCES = $(gnurl_SOURCES) endif BUILT_SOURCES = tool_hugehelp.c @@ -93,7 +93,7 @@ EXTRA_DIST = mkhelp.pl makefile.dj Makefile.vc6 Makefile.b32 \ macos/src/curl_GUSIConfig.cpp macos/src/macos_main.cpp makefile.amiga \ curl.rc Makefile.netware Makefile.inc Makefile.Watcom CMakeLists.txt -MANPAGE=$(top_srcdir)/docs/curl.1 +MANPAGE=$(top_srcdir)/docs/gnurl.1 README=$(top_srcdir)/docs/MANUAL MKHELP=$(top_srcdir)/src/mkhelp.pl HUGE=tool_hugehelp.c diff --git a/src/Makefile.b32 b/src/Makefile.b32 index a60b3db74..6bcdcd700 100644 --- a/src/Makefile.b32 +++ b/src/Makefile.b32 @@ -72,9 +72,9 @@ LINKLIB = $(BCCDIR)\lib\cw32mt.lib $(BCCDIR)\lib\ws2_32.lib DEFINES = -DNDEBUG -DWIN32 !ifdef DYNAMIC -LIBCURL_LIB = ..\lib\libcurl_imp.lib +LIBCURL_LIB = ..\lib\libgnurl_imp.lib !else -LIBCURL_LIB = ..\lib\libcurl.lib +LIBCURL_LIB = ..\lib\libgnurl.lib DEFINES = $(DEFINES) -DCURL_STATICLIB !endif diff --git a/src/Makefile.m32 b/src/Makefile.m32 index 40852e573..0c98135bb 100644 --- a/src/Makefile.m32 +++ b/src/Makefile.m32 @@ -208,11 +208,11 @@ endif INCLUDES = -I. -I../include -I../lib ifdef DYN - curl_DEPENDENCIES = $(PROOT)/lib/libcurldll.a $(PROOT)/lib/libcurl.dll - curl_LDADD = -L$(PROOT)/lib -lcurldll + curl_DEPENDENCIES = $(PROOT)/lib/libgnurldll.a $(PROOT)/lib/libgnurl.dll + curl_LDADD = -L$(PROOT)/lib -lgnurldll else - curl_DEPENDENCIES = $(PROOT)/lib/libcurl.a - curl_LDADD = -L$(PROOT)/lib -lcurl + curl_DEPENDENCIES = $(PROOT)/lib/libgnurl.a + curl_LDADD = -L$(PROOT)/lib -lgnurl CFLAGS += -DCURL_STATICLIB LDFLAGS += -static endif diff --git a/src/Makefile.netware b/src/Makefile.netware index a927da592..b4d0d6901 100644 --- a/src/Makefile.netware +++ b/src/Makefile.netware @@ -265,13 +265,13 @@ ENABLE_IPV6 = 1 endif ifdef LINK_STATIC - LDLIBS = $(CURL_LIB)/libcurl.$(LIBEXT) + LDLIBS = $(CURL_LIB)/libgnurl.$(LIBEXT) ifdef WITH_ARES LDLIBS += $(LIBCARES_PATH)/libcares.$(LIBEXT) endif else - MODULES = libcurl.nlm - IMPORTS = @$(CURL_LIB)/libcurl.imp + MODULES = libgnurl.nlm + IMPORTS = @$(CURL_LIB)/libgnurl.imp endif ifdef WITH_SSH2 # INCLUDES += -I$(LIBSSH2_PATH)/include diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc index deabaacc5..2f3ea5c7d 100644 --- a/tests/data/Makefile.inc +++ b/tests/data/Makefile.inc @@ -119,7 +119,7 @@ test1104 test1105 test1106 test1107 test1108 test1109 test1110 test1111 \ test1112 test1113 test1114 test1115 test1116 test1117 test1118 test1119 \ test1120 test1121 test1122 test1123 test1124 test1125 test1126 test1127 \ test1128 test1129 test1130 test1131 test1132 test1133 test1134 test1135 \ -test1136 test1137 test1138 test1139 test1140 test1141 test1142 test1143 \ +test1136 test1137 test1138 test1140 test1141 test1142 test1143 \ test1144 \ test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \ test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \ diff --git a/tests/data/test1013 b/tests/data/test1013 index 9a1e6d4e3..244dcf599 100644 --- a/tests/data/test1013 +++ b/tests/data/test1013 @@ -23,7 +23,7 @@ Compare curl --version with curl-config --protocols --version -%SRCDIR/libtest/test1013.pl ../curl-config log/stdout1013 protocols +%SRCDIR/libtest/test1013.pl ../gnurl-config log/stdout1013 protocols diff --git a/tests/data/test1014 b/tests/data/test1014 index 5116aad7c..e00defa81 100644 --- a/tests/data/test1014 +++ b/tests/data/test1014 @@ -23,7 +23,7 @@ Compare curl --version with curl-config --features --version -%SRCDIR/libtest/test1013.pl ../curl-config log/stdout1014 features +%SRCDIR/libtest/test1013.pl ../gnurl-config log/stdout1014 features diff --git a/tests/data/test1022 b/tests/data/test1022 index 6a8b01258..ecd83a332 100644 --- a/tests/data/test1022 +++ b/tests/data/test1022 @@ -23,7 +23,7 @@ Compare curl --version with curl-config --version --version -%SRCDIR/libtest/test1022.pl ../curl-config log/stdout1022 version +%SRCDIR/libtest/test1022.pl ../gnurl-config log/stdout1022 version diff --git a/tests/data/test1023 b/tests/data/test1023 index 9c916a085..5f4d756ae 100644 --- a/tests/data/test1023 +++ b/tests/data/test1023 @@ -23,7 +23,7 @@ Compare curl --version with curl-config --vernum --version -%SRCDIR/libtest/test1022.pl ../curl-config log/stdout1023 vernum +%SRCDIR/libtest/test1022.pl ../gnurl-config log/stdout1023 vernum diff --git a/tests/data/test1139 b/tests/data/test1139 deleted file mode 100644 index 30f730c2e..000000000 --- a/tests/data/test1139 +++ /dev/null @@ -1,26 +0,0 @@ - - - -source analysis -symbols-in-versions -documentation - - - -# -# Client-side - - -none - - - -Verify that all libcurl options have man pages - - - -%SRCDIR/manpage-scan.pl %SRCDIR/.. - - - - diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am index 826b3d4f5..be375aa56 100644 --- a/tests/libtest/Makefile.am +++ b/tests/libtest/Makefile.am @@ -59,16 +59,16 @@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ LIBS = $(BLANK_AT_MAKETIME) if USE_EXPLICIT_LIB_DEPS -SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@ -TESTUTIL_LIBS = $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@ +SUPPORTFILES_LIBS = $(top_builddir)/lib/libgnurl.la @LIBCURL_LIBS@ +TESTUTIL_LIBS = $(top_builddir)/lib/libgnurl.la @LIBCURL_LIBS@ else -SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl.la @CURL_NETWORK_LIBS@ @NSS_LIBS@ -TESTUTIL_LIBS = $(top_builddir)/lib/libcurl.la @CURL_NETWORK_AND_TIME_LIBS@ @NSS_LIBS@ +SUPPORTFILES_LIBS = $(top_builddir)/lib/libgnurl.la @CURL_NETWORK_LIBS@ @NSS_LIBS@ +TESTUTIL_LIBS = $(top_builddir)/lib/libgnurl.la @CURL_NETWORK_AND_TIME_LIBS@ @NSS_LIBS@ endif # Dependencies (may need to be overriden) LDADD = $(SUPPORTFILES_LIBS) -DEPENDENCIES = $(top_builddir)/lib/libcurl.la +DEPENDENCIES = $(top_builddir)/lib/libgnurl.la # Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES, # noinst_PROGRAMS, lib*_SOURCES, and lib*_CFLAGS) diff --git a/tests/libtest/test1022.pl b/tests/libtest/test1022.pl index 377808c73..df088c314 100755 --- a/tests/libtest/test1022.pl +++ b/tests/libtest/test1022.pl @@ -12,6 +12,8 @@ my $what=$ARGV[2]; open(CURL, "$ARGV[1]") || die "Can't open curl --version list in $ARGV[1]\n"; $_ = ; chomp; +# Leave the version to contain libcurl here as we use the ../src/curl binary and +# it is producting "libcurl" string /libcurl\/([\.\d]+((-DEV)|(-\d+))?)/; my $version = $1; close CURL; @@ -24,7 +26,7 @@ $_ = ; chomp; my $filever=$_; if ( $what eq "version" ) { - if($filever =~ /^libcurl ([\.\d]+((-DEV)|(-\d+))?)$/) { + if($filever =~ /^libgnurl ([\.\d]+((-DEV)|(-\d+))?)$/) { $curlconfigversion = $1; } else { diff --git a/tests/runtests.pl b/tests/runtests.pl index cd6840c52..b59e1f748 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -147,7 +147,7 @@ my $HTTPUNIXPATH; # HTTP server Unix domain socket path my $HTTP2PORT; # HTTP/2 server port my $srcdir = $ENV{'srcdir'} || '.'; -my $CURL="../src/curl".exe_ext(); # what curl executable to run on the tests +my $CURL="../src/gnurl".exe_ext(); # what curl executable to run on the tests my $VCURL=$CURL; # what curl binary to use to verify the servers with # VCURL is handy to set to the system one when the one you # just built hangs or crashes and thus prevent verification @@ -163,7 +163,7 @@ my $PROXYIN="$LOGDIR/proxy.input"; # what curl sent the proxy my $CURLLOG="$LOGDIR/curl.log"; # all command lines run my $FTPDCMD="$LOGDIR/ftpserver.cmd"; # copy ftp server instructions here my $SERVERLOGS_LOCK="$LOGDIR/serverlogs.lock"; # server logs advisor read lock -my $CURLCONFIG="../curl-config"; # curl-config from current build +my $CURLCONFIG="../gnurl-config"; # curl-config from current build # Normally, all test cases should be run, but at times it is handy to # simply run a particular one: diff --git a/tests/unit/Makefile.inc b/tests/unit/Makefile.inc index e7db96f50..cd586367f 100644 --- a/tests/unit/Makefile.inc +++ b/tests/unit/Makefile.inc @@ -41,7 +41,7 @@ unit1330_CPPFLAGS = $(AM_CPPFLAGS) unit1394_SOURCES = unit1394.c $(UNITFILES) unit1394_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS) -unit1394_LDADD = @LIBMETALINK_LIBS@ $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@ +unit1394_LDADD = @LIBMETALINK_LIBS@ $(top_builddir)/lib/libgnurl.la @LIBCURL_LIBS@ unit1394_LDFLAGS = @LIBMETALINK_LDFLAGS@ $(top_builddir)/src/libcurltool.la unit1394_LIBS =