8b01f44bf61c5cceb83b2ff4f2c0070a9ab946d7 |
|
21-Jul-2016 |
Alex Deymo <deymo@google.com> |
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. (cherry picked from commit 14c0da88a93aa7b1aa71d5e7e923b537f0d419f3) Change-Id: I6195fc0a8ceedfc7fd1a92bdd0acc55ace2c1232
/system/update_engine/common/http_fetcher_unittest.cc
|
6e3ffe73d27de744ef494292c003b5ba907799df |
|
27-May-2016 |
Alex Deymo <deymo@google.com> |
Fetch local files asynchronously. This patch implements a new fetcher that only handles local files. While libcurl supports file:// urls, the stream can't be suspended when accessing local files. This new FileFetcher is based on the brillo::FileStream class which properly handles the asynchronous reads from regular files. Bug: 28866512 TEST=Added unittest. Deployed an update from a file:// URL. (cherry picked from commit 2c131bbf81d8c02ade163b939c96e44aa93765e9) Change-Id: I9949a0f214de992c2fd86c1d73aca1c1792f0de0
/system/update_engine/common/http_fetcher_unittest.cc
|
db13980bb42e544e3d19ef2b33ca02791abe2f6c |
|
08-Mar-2016 |
Alex Deymo <deymo@google.com> |
Merge "Parse and use extra HTTP headers when downloading the payload." into nyc-dev
|
6f10c5f7c550b1bd6df1d9a04b5e75e03f943639 |
|
04-Mar-2016 |
Alex Deymo <deymo@google.com> |
Parse and use extra HTTP headers when downloading the payload. Android OTA backend requires to pass an Authorization HTTP header in order to download some payload. This patch allows to specify such header when initiating a payload download from Android. Bug: 27047110 TEST=Added unittests to check the headers sent. (cherry picked from commit fdd6dec9c4be2fbd667cf874c4cc6f4ffecaeef9) Change-Id: I59d38d79a7b7a8975d105c611c692522b6c33707
/system/update_engine/common/http_fetcher_unittest.cc
|
f28585764e91b7c25a7c2856ff645c8bb22d64a9 |
|
25-Feb-2016 |
Alex Deymo <deymo@google.com> |
Implement suspend, resume and cancel the download. The DownloadAction can now be suspended and resumed, using the existing libcurl hooks to pause the download. For canceling an ongoing update, this patch leverages the existing StopProcessing method previously used in unittest only with a slight change: Stopping the ActionProcessor also removes all the pending actions. The LibcurlHttpFetcher Pause/Unpause methods where improved to support (not crash) if paused in circumstances where there isn't a current connection, like when waiting for the proxy resolver and when trying to reconnect. Finally, the value of ongoing_update_ is now properly set in the UpdateAttempter. Bug: 27047026 TEST=Tested suspending, resuming and canceling the update on a device. TEST=Added unittest for the Pause/Unpause logic. Change-Id: I0df1e1a8cf70a3b736bc9cd4899d37813f381b94
/system/update_engine/common/http_fetcher_unittest.cc
|
5fe0c4ede81b82ae3425ddbbb698eceef14cbc78 |
|
17-Feb-2016 |
Alex Deymo <deymo@google.com> |
Fix unittest build in x86_64. Some size_t values (generally resulting from X.size() calls) were compared to off_t values (such as utils::FileSize()) which resulted in a compile error on x86_64 targets. This patch fixes those issues with explicit casts in the unittests since the range of the expected values is small enough. Bug: 26955860 TEST=`mma` on edison-eng and brilloemulator_x86_64-eng. Change-Id: I2d09d356e1b97ab6527b17596fe20d425da6d519
/system/update_engine/common/http_fetcher_unittest.cc
|
80f70ff45f8ea9a679c0c3ed0dc143dd2fe2b63e |
|
11-Feb-2016 |
Alex Deymo <deymo@google.com> |
Build unittests in Brillo. Many unittests do not pass for simple reasons that will be addressed later. This CL includes all the changes to make the unittests build. In particular, the generated DBus mocks, required to build several unittests are now included here. The dbus-constants.h files were moved to the system_api repo, so they can be removed from here. The unittest build is only enabled for Brillo targets, since non-Brillo targets don't even build DBus. Bug: 26955860 TEST=`mmma` on edison-eng (and aosp_arm-eng). Change-Id: Ib38241f0a6eb99b1d60d72db6bcfd125d38e3fad
/system/update_engine/common/http_fetcher_unittest.cc
|
706a5abae125b8f5ba58a9b7e1e51570bbaa2089 |
|
23-Nov-2015 |
Alex Deymo <deymo@google.com> |
Remove SystemState dependency from HttpFetcher and InstallPlan. The SystemState class is an aggregation of all the update_engine singletons, making it easy to handle cross-dependencies between these singletons. Nevertheless, since we split the code into a smaller libpayload_consumer library we need to remove the global dependencies on the SystemState class from this library and specialize those dependencies to the actual required class. Bug: 25773375 TEST=FEATURES=test emerge-link update_engine; mma Change-Id: I8800157c969db6a8d168f33ac2c6aad4f34fa236
/system/update_engine/common/http_fetcher_unittest.cc
|
c1c17b4ed6a3896b6343e737fd89682fa0c8436b |
|
23-Nov-2015 |
Alex Deymo <deymo@google.com> |
Report Enum metrics from CertificateChecker. The certificate checker was reporting a "user action" whenever an update check HTTPS connection or HTTPS payload download had an invalid HTTPS certificate or a valid one that was changed since the last connection to the same server. This patch sends an Enum metric for every HTTPS connection to check for and update or download the payload with one of the three options: an invalid certificate, a valid one already seen or a valid but different certificate. This patch also moves these metrics to the metrics.{h,cc} module, where all the other metrics are reported, using an observer pattern in the CertificateChecker, needed to remove the dependency on the metrics library from the libpayload_consumer. Bug: 25818567 TEST=FEATURES=test emerge-link update_engine; mma; Change-Id: Ia1b6eb799e13b439b520ba14549d8973e18bcbfa
/system/update_engine/common/http_fetcher_unittest.cc
|
39910dcd1d68987ccee7c3031dc269233a8490bb |
|
10-Nov-2015 |
Alex Deymo <deymo@google.com> |
Split payload application code into a subdirectory. This patch splits from the main libupdate_engine code the part that is strictly used to download and apply a payload into a new static library, moving the code to subdirectories. The new library is divided in two subdirectories: common/ and payload_consumer/, and should not depend on other update_engine files outside those two subdirectories. The main difference between those two is that the common/ tools are more generic and not tied to the payload consumer process, but otherwise they are both compiled together. There are still dependencies from the new libpayload_consumer library into the main directory files and DBus generated files. Those will be addressed in follow up CLs. Bug: 25197634 Test: FEATURES=test emerge-link update_engine; `mm` on Brillo. Change-Id: Id8d0204ea573627e6e26ca9ea17b9592ca95bc23
/system/update_engine/common/http_fetcher_unittest.cc
|