From 94ef9e877dd9a43d51d558c7fcea284af5f36d21 Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Wed, 4 Feb 2026 18:13:21 +0000 Subject: [PATCH 1/6] curl-downloader --- packages/debian/postinst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/debian/postinst b/packages/debian/postinst index 1f5e38759..78a56abf4 100644 --- a/packages/debian/postinst +++ b/packages/debian/postinst @@ -36,7 +36,7 @@ adu_swupdate_handler_2_file=libmicrosoft_swupdate_2.so adu_example_component_enumerator_file=libcontoso_component_enumerator.so -adu_delivery_optimization_downloader_file=libdeliveryoptimization_content_downloader.so +adu_curl_downloader_file=libcurl_content_downloader.so adu_delta_download_handler_file=libmicrosoft_delta_download_handler.so @@ -230,7 +230,7 @@ register_reference_extensions() { $adu_bin_path -l 2 --extension-type componentEnumerator --register-extension $adu_extensions_sources_dir/$adu_example_component_enumerator_file echo "Register content downloader extension..." - $adu_bin_path -l 2 --extension-type contentDownloader --register-extension $adu_extensions_sources_dir/$adu_delivery_optimization_downloader_file + $adu_bin_path -l 2 --extension-type contentDownloader --register-extension $adu_extensions_sources_dir/$adu_curl_downloader_file echo "Register delta download handler..." $adu_bin_path -l 2 --extension-type downloadHandler --extension-id "microsoft/delta:1" --register-extension $adu_extensions_sources_dir/$adu_delta_download_handler_file From 093eabe0a4d2be9b021e5308e93bcea79bb289f8 Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Wed, 4 Feb 2026 21:26:09 +0000 Subject: [PATCH 2/6] add --- packages/debian/postinst | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/debian/postinst b/packages/debian/postinst index 78a56abf4..e462ddcfd 100644 --- a/packages/debian/postinst +++ b/packages/debian/postinst @@ -37,6 +37,7 @@ adu_swupdate_handler_2_file=libmicrosoft_swupdate_2.so adu_example_component_enumerator_file=libcontoso_component_enumerator.so adu_curl_downloader_file=libcurl_content_downloader.so +adu_delivery_optimization_downloader_file=libdeliveryoptimization_content_downloader.so adu_delta_download_handler_file=libmicrosoft_delta_download_handler.so From c4a62a6916f8ef3a38cf4b0f18a2ceea358cd0e9 Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Wed, 4 Feb 2026 21:39:32 +0000 Subject: [PATCH 3/6] windows --- scripts/install-du.ps1 | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/install-du.ps1 b/scripts/install-du.ps1 index 541aadaff..a92559f5e 100644 --- a/scripts/install-du.ps1 +++ b/scripts/install-du.ps1 @@ -106,16 +106,16 @@ function Register-Components { # contentDownloader # - # curl content downlaoader not used on Windows. + # curl content downlaoader will be used on Windows. # /var/lib/adu/extensions/content_downloader/extension.json - # $curl_content_downloader_file = 'curl_content_downloader.dll' - # & $aduciotagent_path --register-extension "$adu_extensions_sources_dir/$curl_content_downloader_file" --extension-type contentDownloader --log-level 2 + $curl_content_downloader_file = "$adu_extensions_sources_dir/curl_content_downloader.dll" + & $aduciotagent_path --register-extension "$curl_content_downloader_file" --extension-type contentDownloader --log-level 2 # /var/lib/adu/extensions/content_downloader/extension.json - $do_content_downloader_file = "$adu_extensions_sources_dir/deliveryoptimization_content_downloader.dll" - & $aduciotagent_path --register-extension $do_content_downloader_file --extension-type contentDownloader --log-level 2 + # $do_content_downloader_file = "$adu_extensions_sources_dir/deliveryoptimization_content_downloader.dll" + # & $aduciotagent_path --register-extension $do_content_downloader_file --extension-type contentDownloader --log-level 2 if ($LASTEXITCODE -ne 0) { - Show-Error "Registration of '$do_content_downloader_file' failed: $LASTEXITCODE" + Show-Error "Registration of '$curl_content_downloader_file' failed: $LASTEXITCODE" } # @@ -126,40 +126,40 @@ function Register-Components { $microsoft_script_1_handler_file = "$adu_extensions_sources_dir/microsoft_script_1.dll" & $aduciotagent_path --register-extension $microsoft_script_1_handler_file --extension-type updateContentHandler --extension-id 'microsoft/script:1' --log-level 2 if ($LASTEXITCODE -ne 0) { - Show-Error "Registration of '$do_content_downloader_file' failed: $LASTEXITCODE" + Show-Error "Registration of '$microsoft_script_1_handler_file' failed: $LASTEXITCODE" } # /var/lib/adu/extensions/update_content_handlers/microsoft_simulator_1/content_handler.json $microsoft_simulator_1_file = "$adu_extensions_sources_dir/microsoft_simulator_1.dll" & $aduciotagent_path --register-extension $microsoft_simulator_1_file --extension-type updateContentHandler --extension-id 'microsoft/simulator:1' if ($LASTEXITCODE -ne 0) { - Show-Error "Registration of '$do_content_downloader_file' failed: $LASTEXITCODE" + Show-Error "Registration of '$microsoft_simulator_1_file' failed: $LASTEXITCODE" } # /var/lib/adu/extensions/update_content_handlers/microsoft_steps_1/content_handler.json $microsoft_steps_1_file = "$adu_extensions_sources_dir/microsoft_steps_1.dll" & $aduciotagent_path --register-extension $microsoft_steps_1_file --extension-type updateContentHandler --extension-id 'microsoft/steps:1' --log-level 2 if ($LASTEXITCODE -ne 0) { - Show-Error "Registration of '$do_content_downloader_file' failed: $LASTEXITCODE" + Show-Error "Registration of '$microsoft_steps_1_file' failed: $LASTEXITCODE" } & $aduciotagent_path --register-extension $microsoft_steps_1_file --extension-type updateContentHandler --extension-id 'microsoft/update-manifest' --log-level 2 if ($LASTEXITCODE -ne 0) { - Show-Error "Registration of '$do_content_downloader_file' failed: $LASTEXITCODE" + Show-Error "Registration of '$microsoft_steps_1_file' failed: $LASTEXITCODE" } & $aduciotagent_path --register-extension $microsoft_steps_1_file --extension-type updateContentHandler --extension-id 'microsoft/update-manifest:4' --log-level 2 if ($LASTEXITCODE -ne 0) { - Show-Error "Registration of '$do_content_downloader_file' failed: $LASTEXITCODE" + Show-Error "Registration of '$microsoft_steps_1_file' failed: $LASTEXITCODE" } & $aduciotagent_path --register-extension $microsoft_steps_1_file --extension-type updateContentHandler --extension-id 'microsoft/update-manifest:5' --log-level 2 if ($LASTEXITCODE -ne 0) { - Show-Error "Registration of '$do_content_downloader_file' failed: $LASTEXITCODE" + Show-Error "Registration of '$microsoft_steps_1_file' failed: $LASTEXITCODE" } # /var/lib/adu/extensions/update_content_handlers/microsoft_wim_1/content_handler.json $microsoft_wim_1_handler_file = "$adu_extensions_sources_dir/microsoft_wim_1.dll" & $aduciotagent_path --register-extension $microsoft_wim_1_handler_file --extension-type updateContentHandler --extension-id 'microsoft/wim:1' --log-level 2 if ($LASTEXITCODE -ne 0) { - Show-Error "Registration of '$do_content_downloader_file' failed: $LASTEXITCODE" + Show-Error "Registration of '$microsoft_wim_1_handler_file' failed: $LASTEXITCODE" } '' } From 0085a55ad18a7c8c614b02dad1e886fd9b622c4d Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Wed, 4 Feb 2026 21:49:33 +0000 Subject: [PATCH 4/6] update readme --- .../registering-device-update-extensions.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/agent-reference/registering-device-update-extensions.md b/docs/agent-reference/registering-device-update-extensions.md index dfe498f4e..94fbc06a5 100644 --- a/docs/agent-reference/registering-device-update-extensions.md +++ b/docs/agent-reference/registering-device-update-extensions.md @@ -70,7 +70,7 @@ $ cat /var/lib/adu/extensions/update_content_handlers/microsoft_update-manifest_ ```sh - $adu_bin_path -l 2 --extension-type contentDownloader --register-extension $adu_extensions_sources_dir/$adu_delivery_optimization_downloader_file + $adu_bin_path -l 2 --extension-type contentDownloader --register-extension $adu_extensions_sources_dir/$adu_curl_downloader_file ``` ### Contents of resultant extension.json for content downloader @@ -78,10 +78,10 @@ $ cat /var/lib/adu/extensions/update_content_handlers/microsoft_update-manifest_ ```sh cat /var/lib/adu/extensions/content_downloader/extension.json { - "fileName":"/var/lib/adu/extensions/sources/libdeliveryoptimization_content_downloader.so", - "sizeInBytes":254584, + "fileName":"/var/lib/adu/extensions/sources/libcurl_content_downloader.so", + "sizeInBytes":450616, "hashes": { - "sha256":"0amRRIkSZ/im/AoLahg7QZwzZWo837VPEa1zedXl9BA=" + "sha256":"a374b5c6095b3a9a8568c60c895080f89db0d98d534f126ebab31bbfa9bb9815" } } ``` From 15be737a93833c5141b9caad7f225144c0202af8 Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Wed, 4 Feb 2026 22:11:36 +0000 Subject: [PATCH 5/6] sha --- docs/agent-reference/registering-device-update-extensions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/agent-reference/registering-device-update-extensions.md b/docs/agent-reference/registering-device-update-extensions.md index 94fbc06a5..145442e8d 100644 --- a/docs/agent-reference/registering-device-update-extensions.md +++ b/docs/agent-reference/registering-device-update-extensions.md @@ -81,7 +81,7 @@ cat /var/lib/adu/extensions/content_downloader/extension.json "fileName":"/var/lib/adu/extensions/sources/libcurl_content_downloader.so", "sizeInBytes":450616, "hashes": { - "sha256":"a374b5c6095b3a9a8568c60c895080f89db0d98d534f126ebab31bbfa9bb9815" + "sha256":"o3S1xglbOpqFaMYMiVCA+J2w2Y1TTxJuurMbv6m7mBU=" } } ``` From 42853926995e31d3e0767586fe560d128f241d5c Mon Sep 17 00:00:00 2001 From: Nonso Chukwuogor Date: Thu, 5 Feb 2026 20:50:46 +0000 Subject: [PATCH 6/6] purge --- daemon/deviceupdate-agent.service | 4 ++-- daemon/install.sh | 12 ------------ packages/CMakeLists.txt | 3 +-- packages/debian/postinst | 17 +---------------- packages/debian/postrm | 2 +- packages/debian/preinst | 2 +- scripts/build.sh | 2 +- .../content_downloaders/CMakeLists.txt | 1 - 8 files changed, 7 insertions(+), 36 deletions(-) diff --git a/daemon/deviceupdate-agent.service b/daemon/deviceupdate-agent.service index 5bb46bd71..2c35ebce5 100644 --- a/daemon/deviceupdate-agent.service +++ b/daemon/deviceupdate-agent.service @@ -1,7 +1,7 @@ [Unit] Description=Device Update Agent daemon. -After=network-online.target deliveryoptimization-agent.service -Wants=network-online.target deliveryoptimization-agent.service +After=network-online.target +Wants=network-online.target [Service] Type=simple diff --git a/daemon/install.sh b/daemon/install.sh index 406bdff85..920e74239 100755 --- a/daemon/install.sh +++ b/daemon/install.sh @@ -29,13 +29,6 @@ adu_user=adu # access to ADU resources like download sandbox folder. adu_group=adu -# Note: DO user and group are created by deliveryoptimization-agent Debian package, -# which is one of the dependencies declared in deviceupdate-agent control file. -# We are assuming that both DO user and group currently exist at this point. - -# The user that the DO Agent daemon runs as. -do_user='do' - # The sample du-config.json sample_du_config=$( cat << END_OF_JSON @@ -91,11 +84,6 @@ add_adu_user_and_group() { if getent group "syslog" > /dev/null; then usermod -aG "syslog" "$adu_user" fi - - echo "Add the 'do' user to the 'adu' group." # To allow DO to write to ADU download sandbox. - if getent passwd "$do_user" > /dev/null; then - usermod -aG "$adu_group" "$do_user" - fi } register_daemon() { diff --git a/packages/CMakeLists.txt b/packages/CMakeLists.txt index ef5406682..9f39a95c5 100644 --- a/packages/CMakeLists.txt +++ b/packages/CMakeLists.txt @@ -43,8 +43,7 @@ set (CPACK_DEBIAN_PACKAGE_SECTION "admin") # If remove deliveryoptimization-agent from dependencies, preinst script must be updated accordingly. # See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps -set (CPACK_DEBIAN_PACKAGE_DEPENDS "deliveryoptimization-agent (>= 1.0.0), libdeliveryoptimization (>= 1.0.0), curl") -set (CPACK_DEBIAN_PACKAGE_SUGGESTS "deliveryoptimization-plugin-apt") +set (CPACK_DEBIAN_PACKAGE_DEPENDS "curl") # Use dpkg-shlibdeps to generate better package dependency list. set (CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) diff --git a/packages/debian/postinst b/packages/debian/postinst index e462ddcfd..e9447c9d7 100644 --- a/packages/debian/postinst +++ b/packages/debian/postinst @@ -48,7 +48,7 @@ eis_idservice_dir=/etc/aziot/identityd/config.d # ADU Agent daemon needs to run as 'adu' user to be able to perform high-privilege tasks via adu-shell. adu_user=adu -# The adu_group is the group that gives admins and partner users like DO user +# The adu_group is the group that gives admins and partner users # access to ADU resources like sandbox folder. adu_group=adu @@ -293,21 +293,6 @@ case "$1" in register_and_enable_daemon - # Note: DO user and group are created by deliveryoptimization-agent Debian package, - # which is one of the dependencies declared in deviceupdate-agent control file. - # We are assuming that both DO user and group currently exist at this point. - # Add 'do' user to 'adu' group to allow DO to write to ADU download sandbox. - echo "Add the 'do' user to the 'adu' group and 'adu' to the 'do' group" - if getent passwd 'do' > /dev/null; then - usermod -aG 'adu' 'do' - # Note: We must add the 'adu' user to the 'do' group so that we can set the connection_string for DO - usermod -aG 'do' 'adu' - - # Restart deliveryoptimization-agent service to ensure that the new 'do' user's groups take effect. - echo "Restart $ms_doclient_lite_service" - systemctl restart "$ms_doclient_lite_service" - fi - complete_migration_steps # Do not restart the current deviceupdate-agent because we want the update workflow diff --git a/packages/debian/postrm b/packages/debian/postrm index c8932b490..6d7fe53fd 100644 --- a/packages/debian/postrm +++ b/packages/debian/postrm @@ -16,7 +16,7 @@ adu_shell_bin_path=/usr/bin/adu-shell adu_eis_conf_file=adu.toml eis_idservice_dir=/etc/aziot/identityd/config.d -# The adu_group is the group that gives admins and partner users like DO user +# The adu_group is the group that gives admins and partner users # access to ADU resources like sandbox folder. adu_group=adu # adu_user is the user that the ADU Agent daemon will run as. diff --git a/packages/debian/preinst b/packages/debian/preinst index fc9238474..8859d8abe 100644 --- a/packages/debian/preinst +++ b/packages/debian/preinst @@ -17,7 +17,7 @@ set -e # ADU Agent daemon needs to run as 'adu' to be able to perform high-privilege tasks via adu-shell. adu_user=adu -# The adu_group is the group that gives partner users like DO user +# The adu_group is the group that gives partner users # access to ADU resources like download sandbox folder. adu_group=adu diff --git a/scripts/build.sh b/scripts/build.sh index 6b54b21e3..d6fb9261d 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -49,7 +49,7 @@ install_adu=false work_folder=/tmp cmake_dir_path="" cmake_bin="cmake" -rootkeypkg_curl=false +rootkeypkg_curl=true # # Export the compiler settings in case VM is wonky diff --git a/src/extensions/content_downloaders/CMakeLists.txt b/src/extensions/content_downloaders/CMakeLists.txt index d9978f00d..ba59bc97f 100644 --- a/src/extensions/content_downloaders/CMakeLists.txt +++ b/src/extensions/content_downloaders/CMakeLists.txt @@ -1,4 +1,3 @@ cmake_minimum_required (VERSION 3.5) add_subdirectory (curl_downloader) -add_subdirectory (deliveryoptimization_downloader)