diff --git a/debian/changelog b/debian/changelog index 2f3acce904a..36ddb65c0af 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,9 @@ cloud-init (24.1.3-0ubuntu1~20.04.4) UNRELEASED; urgency=medium * d/cloud-init.logrotate: add logrotate config for cloud-init * d/cloud-init.templates: enable WSL datasource by default * d/control: remove netifaces + * d/p/drop-unsupported-systemd-condition-environment.patch + - Drop ConditionEnvironment from unit files because systemd 245.4 ignores + those keys and emits warnings at systemctl status * d/p/keep-dhclient-as-priority-client.patch * d/p/revert-551f560d-cloud-config-after-snap-seeding.patch - Retain systemd ordering cloud-config.service After=snapd.seeded.service diff --git a/debian/patches/drop-unsupported-systemd-condition-environment.patch b/debian/patches/drop-unsupported-systemd-condition-environment.patch new file mode 100644 index 00000000000..37831d26bb0 --- /dev/null +++ b/debian/patches/drop-unsupported-systemd-condition-environment.patch @@ -0,0 +1,57 @@ +Description: Drop systemd ignored ConditionEnvironment keys from units on Focal + The systemd ConditionEnvironment config key was introduced in systemd + version 246, yet Ubuntu Focal contains only systemd v. 245.4. This setting + is otherwise ignored by systemd on Focal, but drop the config to avoid + warnings from systemctl status cloud-init. +Origin: backport +Author: Chad Smith +Last-Update: 2024-05-21 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/systemd/cloud-config.service.tmpl ++++ b/systemd/cloud-config.service.tmpl +@@ -6,7 +6,6 @@ + Wants=network-online.target cloud-config.target + ConditionPathExists=!/etc/cloud/cloud-init.disabled + ConditionKernelCommandLine=!cloud-init=disabled +-ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled + + [Service] + Type=oneshot +--- a/systemd/cloud-final.service.tmpl ++++ b/systemd/cloud-final.service.tmpl +@@ -9,7 +9,6 @@ + Wants=network-online.target cloud-config.service + ConditionPathExists=!/etc/cloud/cloud-init.disabled + ConditionKernelCommandLine=!cloud-init=disabled +-ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled + + + [Service] +--- a/systemd/cloud-init-local.service.tmpl ++++ b/systemd/cloud-init-local.service.tmpl +@@ -28,7 +28,6 @@ + RequiresMountsFor=/var/lib/cloud + ConditionPathExists=!/etc/cloud/cloud-init.disabled + ConditionKernelCommandLine=!cloud-init=disabled +-ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled + + [Service] + Type=oneshot +--- a/systemd/cloud-init.service.tmpl ++++ b/systemd/cloud-init.service.tmpl +@@ -41,7 +41,6 @@ + Before=systemd-user-sessions.service + ConditionPathExists=!/etc/cloud/cloud-init.disabled + ConditionKernelCommandLine=!cloud-init=disabled +-ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled + + [Service] + Type=oneshot +--- a/systemd/cloud-init.target ++++ b/systemd/cloud-init.target +@@ -12,4 +12,3 @@ + After=multi-user.target + ConditionPathExists=!/etc/cloud/cloud-init.disabled + ConditionKernelCommandLine=!cloud-init=disabled +-ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled diff --git a/debian/patches/series b/debian/patches/series index 6cf339651d6..3538d41ad08 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -11,3 +11,4 @@ retain-apt-pre-deb822.patch status-retain-recoverable-error-exit-code.patch retain-ec2-default-net-update-events.patch cli-retain-file-argument-as-main-cmd-arg.patch +drop-unsupported-systemd-condition-environment.patch