Remove libcurl support from update_engine_sideload.
While sideloading an update from recovery we don't need nor want to
download payload from HTTP(S) URLs, only local file:// are supported.
This patch moves libcurl_http_fetcher and certificate_checker files out
of libpayload_consumer dropping the libcurl and libssl dependencies from
it and the update_engine_sideload.
Bug: 27178350
TEST=build UE for Brillo and Android. Unittests still pass and
update_engine_sideload doesn't link to libcurl.
Change-Id: Iffefdb094654f7277dc825c041fe55aac9ee8756
diff --git a/Android.mk b/Android.mk
index bf84547..10335e4 100644
--- a/Android.mk
+++ b/Android.mk
@@ -146,14 +146,11 @@
$(ue_update_metadata_protos_exported_static_libraries)
ue_libpayload_consumer_exported_shared_libraries := \
libcrypto \
- libcurl-host \
- libssl \
$(ue_update_metadata_protos_exported_shared_libraries)
ue_libpayload_consumer_src_files := \
common/action_processor.cc \
common/boot_control_stub.cc \
- common/certificate_checker.cc \
common/clock.cc \
common/constants.cc \
common/cpu_limiter.cc \
@@ -163,7 +160,6 @@
common/http_common.cc \
common/http_fetcher.cc \
common/hwid_override.cc \
- common/libcurl_http_fetcher.cc \
common/multi_range_http_fetcher.cc \
common/platform_constants_android.cc \
common/prefs.cc \
@@ -250,7 +246,9 @@
libexpat \
libbrillo-policy \
libhardware \
+ libcurl \
libcutils \
+ libssl \
$(ue_libpayload_consumer_exported_shared_libraries) \
$(ue_update_metadata_protos_exported_shared_libraries)
ifeq ($(local_use_dbus),1)
@@ -304,11 +302,13 @@
$(ue_update_metadata_protos_exported_shared_libraries)
LOCAL_SRC_FILES := \
boot_control_android.cc \
+ certificate_checker.cc \
common_service.cc \
connection_utils.cc \
daemon.cc \
hardware_android.cc \
image_properties_android.cc \
+ libcurl_http_fetcher.cc \
metrics.cc \
metrics_utils.cc \
omaha_request_action.cc \
@@ -388,7 +388,9 @@
libbinderwrapper \
libbrillo-binder \
libcutils \
+ libcurl \
libhardware \
+ libssl \
libutils
include $(CLEAR_VARS)
@@ -417,9 +419,11 @@
binder_bindings/android/os/IUpdateEngineCallback.aidl \
binder_service_android.cc \
boot_control_android.cc \
+ certificate_checker.cc \
daemon.cc \
daemon_state_android.cc \
hardware_android.cc \
+ libcurl_http_fetcher.cc \
network_selector_android.cc \
proxy_resolver.cc \
update_attempter_android.cc \
@@ -486,7 +490,9 @@
bspatch
LOCAL_CPP_EXTENSION := .cc
LOCAL_CLANG := true
-LOCAL_CFLAGS := $(ue_common_cflags)
+LOCAL_CFLAGS := \
+ $(ue_common_cflags) \
+ -D_UE_SIDELOAD
LOCAL_CPPFLAGS := $(ue_common_cppflags)
LOCAL_LDFLAGS := $(ue_common_ldflags)
LOCAL_C_INCLUDES := \
@@ -938,10 +944,10 @@
$(ue_common_shared_libraries) \
$(ue_libpayload_generator_exported_shared_libraries:-host=)
LOCAL_SRC_FILES := \
+ certificate_checker_unittest.cc \
common/action_pipe_unittest.cc \
common/action_processor_unittest.cc \
common/action_unittest.cc \
- common/certificate_checker_unittest.cc \
common/cpu_limiter_unittest.cc \
common/fake_prefs.cc \
common/file_fetcher_unittest.cc \