app-emulation/cloud-init: Apply common patches to all variants.
This CL is moving certain patches to apply to all COS variants. This can
help in reducing the conditional cases while applying patches.
BUG=b/198334852
TEST=presubmit
RELEASE_NOTE=None
Change-Id: I3ac57d629ace5c4d58f6b17cd4ecb81da4d1f192
Reviewed-on: https://cos-review.googlesource.com/c/cos/overlays/board-overlays/+/22118
Reviewed-by: Roy Yang <royyang@google.com>
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
diff --git a/project-lakitu/app-emulation/cloud-init/cloud-init-21.2-r2.ebuild b/project-lakitu/app-emulation/cloud-init/cloud-init-21.2-r3.ebuild
similarity index 100%
rename from project-lakitu/app-emulation/cloud-init/cloud-init-21.2-r2.ebuild
rename to project-lakitu/app-emulation/cloud-init/cloud-init-21.2-r3.ebuild
diff --git a/project-lakitu/app-emulation/cloud-init/cloud-init-21.2.ebuild b/project-lakitu/app-emulation/cloud-init/cloud-init-21.2.ebuild
index f83b4bc..444ee03 100644
--- a/project-lakitu/app-emulation/cloud-init/cloud-init-21.2.ebuild
+++ b/project-lakitu/app-emulation/cloud-init/cloud-init-21.2.ebuild
@@ -19,7 +19,7 @@
LICENSE="GPL-3"
SLOT="0"
-IUSE="test configure_network platform_azure"
+IUSE="test configure_network"
RESTRICT="!test? ( test )"
CDEPEND="
@@ -73,21 +73,21 @@
# Enable NTP for COS in cloud-init
"${FILESDIR}/21.2-enable-ntp-for-cos.patch"
+ # Remove dhclient dependency from /tmp.
+ "${FILESDIR}/cloud-init-azure-remove-dhclient.patch"
)
python_prepare_all() {
- # remove network dependencies when not configuring network
+ # remove network dependencies when not configuring network.
+ # The below patches are resulting in different cloud-init-local.service
+ # and cloud-init.service that is installed by cloud-init. It doesn't
+ # result in any change in the cloud-init binary built.
if ! use configure_network; then
PATCHES+=("${FILESDIR}/${PV}-cloud-init-remove-sshd-and-network-service-dependencies.patch")
else
PATCHES+=("${FILESDIR}/${PV}-remove-sshd-dependency.patch")
fi
- # Remove dhclient dependency on cloud-init
- if use platform_azure; then
- PATCHES+=("${FILESDIR}"/cloud-init-azure-remove-dhclient.patch)
- fi
-
# Fix location of documentation installation
sed -i "s:USR + '/share/doc/cloud-init:USR + '/share/doc/${PF}:" setup.py || die
sed -i 's/version=get_version(),/version=9999,/g' setup.py || die