Patchwork libcurl: re-enable on non-MMU platforms

login
register
mail settings
Submitter Thomas Petazzoni
Date Feb. 14, 2013, 1:50 p.m.
Message ID <1360849818-30031-1-git-send-email-thomas.petazzoni@free-electrons.com>
Download mbox | patch
Permalink /patch/220446/
State Accepted
Commit e32c29a09849b71cb20c964880b9be671132b7b5
Headers show

Comments

Thomas Petazzoni - Feb. 14, 2013, 1:50 p.m.
In 9229b82d6326ea425a258b91a9f0157ef6b223b7 ('libcurl: needs MMU'),
the libcurl package was disabled on non-MMU systems, due to the usage
of the fork() function in the library.

However, a deeper inspection reveals that fork() is only used in the
implementation of NTLM, an obscure, undocumented, Microsoft specific
authentication method that apparently isn't common anymore. See
http://curl.haxx.se/docs/manpage.html#--ntlm.

Therefore, this commit re-enables libcurl on non-MMU systems by
explicitly disabling the NTLM support. If someone ever needs NTLM
support in Buildroot's libcurl package, it will always be time to add
a libcurl sub-option to enable it.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/libcurl/Config.in  |    1 -
 package/libcurl/libcurl.mk |    8 +++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)
Peter Korsgaard - Feb. 17, 2013, 10:02 p.m.
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> In 9229b82d6326ea425a258b91a9f0157ef6b223b7 ('libcurl: needs MMU'),
 Thomas> the libcurl package was disabled on non-MMU systems, due to the usage
 Thomas> of the fork() function in the library.

 Thomas> However, a deeper inspection reveals that fork() is only used in the
 Thomas> implementation of NTLM, an obscure, undocumented, Microsoft specific
 Thomas> authentication method that apparently isn't common anymore. See
 Thomas> http://curl.haxx.se/docs/manpage.html#--ntlm.

Yeah, tell me about it - I know of a certain company using it :/

Committed, thanks.

Patch

diff --git a/package/libcurl/Config.in b/package/libcurl/Config.in
index 10ee0e4..1d6d08e 100644
--- a/package/libcurl/Config.in
+++ b/package/libcurl/Config.in
@@ -1,6 +1,5 @@ 
 config BR2_PACKAGE_LIBCURL
 	bool "libcurl"
-	depends on BR2_USE_MMU # Uses fork()
 	help
 	  cURL is a tool for getting files from FTP, HTTP, Gopher, Telnet,
 	  and Dict servers, using any of the supported protocols.
diff --git a/package/libcurl/libcurl.mk b/package/libcurl/libcurl.mk
index 38ca854..a631953 100644
--- a/package/libcurl/libcurl.mk
+++ b/package/libcurl/libcurl.mk
@@ -10,7 +10,13 @@  LIBCURL_SITE = http://curl.haxx.se/download
 LIBCURL_LICENSE = ICS
 LIBCURL_LICENSE_FILES = COPYING
 LIBCURL_INSTALL_STAGING = YES
-LIBCURL_CONF_OPT = --disable-verbose --disable-manual --enable-hidden-symbols
+
+# We disable NTLM support because it uses fork(), which doesn't work
+# on non-MMU platforms. Moreover, this authentication method is
+# probably almost never used. See
+# http://curl.haxx.se/docs/manpage.html#--ntlm.
+LIBCURL_CONF_OPT = --disable-verbose --disable-manual \
+	--enable-hidden-symbols --disable-ntlm-wb
 LIBCURL_CONFIG_SCRIPTS = curl-config
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)