Skip to content
Snippets Groups Projects
Verified Commit d7408aa9 authored by David Runge's avatar David Runge :chipmunk:
Browse files

upgpkg: 24.3.1-2

Rebuild to fix an issue with missing dependency on openbsd-netcat and broken systemd units.

Fixes: #3
parent 08e804f7
No related branches found
No related tags found
No related merge requests found
pkgbase = cloud-init
pkgdesc = Cloud instance initialization
pkgver = 24.3.1
pkgrel = 1
pkgrel = 2
url = https://cloud-init.io
arch = any
license = GPL-3.0-only OR Apache-2.0
......@@ -18,6 +18,7 @@ pkgbase = cloud-init
makedepends = python-wheel
depends = bash
depends = dhclient
depends = openbsd-netcat
depends = python
depends = python-configobj
depends = python-jinja
......@@ -38,7 +39,10 @@ pkgbase = cloud-init
backup = etc/cloud/cloud.cfg
backup = etc/cloud/cloud.cfg.d/05_logging.cfg
source = https://github.com/canonical/cloud-init/archive/24.3.1/cloud-init-24.3.1.tar.gz
source = cloud-init-24.3.1-systemd-ordering.patch
sha512sums = 01b798d67328ecd66229568233fb674f45c055ac469adb31a55a909b6b2c8fd1901a833accb66423923b8945210aa4dc6a0d61945787aabe414c01b501b1416d
sha512sums = 83985119e95d7f377353d207b7485b496ba60a724a909899071ee0b09a52ecec22c0353d0e107631336db0018bf86db12d4b951b4f2dcbef208f5a0e6cbd2f78
b2sums = 7e4cb8bd65d34d08b4b4e5ea2370ac952e05b3a210b91a9b29d8e4b633246a9520c2d9259aedfe8edded0d7d761808b86b6b19d98309633c981b2eb0e7cf1f93
b2sums = 5069819bf18f156b35768d3607dba1f3fcd79ef6f0571886734f6472cc2f3fa3db4fc330f32b176501ea7fde34d1ccf15d747a17b4b80ec050a996d106a4afe8
pkgname = cloud-init
......@@ -8,7 +8,7 @@
pkgname=cloud-init
pkgver=24.3.1
pkgrel=1
pkgrel=2
pkgdesc="Cloud instance initialization"
arch=(any)
url="https://cloud-init.io"
......@@ -17,6 +17,7 @@ license=('GPL-3.0-only OR Apache-2.0')
depends=(
bash
dhclient
openbsd-netcat
python
python-configobj
python-jinja
......@@ -58,9 +59,19 @@ backup=(
)
source=(
$_url/archive/$pkgver/$pkgname-$pkgver.tar.gz
$pkgname-24.3.1-systemd-ordering.patch
)
sha512sums=('01b798d67328ecd66229568233fb674f45c055ac469adb31a55a909b6b2c8fd1901a833accb66423923b8945210aa4dc6a0d61945787aabe414c01b501b1416d')
b2sums=('7e4cb8bd65d34d08b4b4e5ea2370ac952e05b3a210b91a9b29d8e4b633246a9520c2d9259aedfe8edded0d7d761808b86b6b19d98309633c981b2eb0e7cf1f93')
sha512sums=('01b798d67328ecd66229568233fb674f45c055ac469adb31a55a909b6b2c8fd1901a833accb66423923b8945210aa4dc6a0d61945787aabe414c01b501b1416d'
'83985119e95d7f377353d207b7485b496ba60a724a909899071ee0b09a52ecec22c0353d0e107631336db0018bf86db12d4b951b4f2dcbef208f5a0e6cbd2f78')
b2sums=('7e4cb8bd65d34d08b4b4e5ea2370ac952e05b3a210b91a9b29d8e4b633246a9520c2d9259aedfe8edded0d7d761808b86b6b19d98309633c981b2eb0e7cf1f93'
'5069819bf18f156b35768d3607dba1f3fcd79ef6f0571886734f6472cc2f3fa3db4fc330f32b176501ea7fde34d1ccf15d747a17b4b80ec050a996d106a4afe8')
prepare() {
# backport of fix for systemd unit ordering issue:
# https://github.com/canonical/cloud-init/issues/5755
# also applies https://github.com/canonical/cloud-init/commit/9cc458c7d88467914a29f2608d0b371e36b563b9
patch -Np1 -d $pkgname-$pkgver -i ../$pkgname-24.3.1-systemd-ordering.patch
}
build() {
cd $pkgname-$pkgver
......
From 9cc458c7d88467914a29f2608d0b371e36b563b9 Mon Sep 17 00:00:00 2001
From: Alberto Contreras <alberto.contreras@canonical.com>
Date: Wed, 4 Sep 2024 16:11:27 +0200
Subject: [PATCH] fix(systemd): add Before=shutdown.target to
cloud-init-main.service.tmpl (#5653)
Fixes lintian warning systemd-service-file-shutdown-problems. See [1,
2].
Remove superflous conditional additions of Conflicts=shutdown.target as
it is unconditionally added for every target.
[1] https://salsa.debian.org/lintian/lintian/-/blob/2.118.0/tags/s/systemd-service-file-shutdown-problems.tag
[2] https://github.com/systemd/systemd/issues/11821
---
systemd/cloud-init-main.service.tmpl | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/systemd/cloud-init-main.service.tmpl b/systemd/cloud-init-main.service.tmpl
index 1ddfd62073e..7a9114bb58b 100644
--- a/systemd/cloud-init-main.service.tmpl
+++ b/systemd/cloud-init-main.service.tmpl
@@ -17,16 +17,15 @@ Requires=dbus.socket
After=dbus.socket
Before=network.service
Before=firewalld.target
-Conflicts=shutdown.target
{% endif %}
{% if variant in ["ubuntu", "unknown", "debian"] %}
Before=sysinit.target
-Conflicts=shutdown.target
{% endif %}
After=systemd-remount-fs.service
Before=sysinit.target
Before=cloud-init-local.service
+Before=shutdown.target
Conflicts=shutdown.target
RequiresMountsFor=/var/lib/cloud
ConditionPathExists=!/etc/cloud/cloud-init.disabled
From 86ee2ef37b55df1eefcd3e4c430fce06cd266d92 Mon Sep 17 00:00:00 2001
From: Brett Holman <brett.holman@canonical.com>
Date: Fri, 11 Oct 2024 20:54:08 -0600
Subject: [PATCH 1/2] fix: fix ordering cycle for distros with default deps
(#5819)
Since After=sysinit.target is a default dependency, a cycle is
introduced when Before=sysinit.target and not DefaultDependencies=no.
Fixes GH-5755
---
systemd/cloud-init-main.service.tmpl | 1 -
1 file changed, 1 deletion(-)
diff --git a/systemd/cloud-init-main.service.tmpl b/systemd/cloud-init-main.service.tmpl
index 7a9114bb58b..01a7c3aee36 100644
--- a/systemd/cloud-init-main.service.tmpl
+++ b/systemd/cloud-init-main.service.tmpl
@@ -23,7 +23,6 @@ Before=sysinit.target
{% endif %}
After=systemd-remount-fs.service
-Before=sysinit.target
Before=cloud-init-local.service
Before=shutdown.target
Conflicts=shutdown.target
From 91deb08947a7c399cff4e6a08bf164334f62e9c0 Mon Sep 17 00:00:00 2001
From: Brett Holman <brett.holman@canonical.com>
Date: Fri, 11 Oct 2024 21:03:18 -0600
Subject: [PATCH 2/2] chore: eliminate redundant ordering dependencies (#5819)
A Before= on a single service doesn't need to exist in both
cloud-init-main.service and cloud-init-local.service, because
cloud-init-local.service and cloud-init-main.service are themselves
ordered. Only one requires it. The same applies for After=.
---
systemd/cloud-init-local.service.tmpl | 5 -----
systemd/cloud-init-main.service.tmpl | 6 ------
2 files changed, 11 deletions(-)
diff --git a/systemd/cloud-init-local.service.tmpl b/systemd/cloud-init-local.service.tmpl
index e682f637a26..3c2c03194c7 100644
--- a/systemd/cloud-init-local.service.tmpl
+++ b/systemd/cloud-init-local.service.tmpl
@@ -7,10 +7,6 @@ DefaultDependencies=no
{% endif %}
Wants=network-pre.target
After=hv_kvp_daemon.service
-{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
-Requires=dbus.socket
-After=dbus.socket
-{% endif %}
Before=NetworkManager.service
{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
Before=network.service
@@ -25,7 +21,6 @@ Conflicts=shutdown.target
Before=sysinit.target
Conflicts=shutdown.target
{% endif %}
-RequiresMountsFor=/var/lib/cloud
ConditionPathExists=!/etc/cloud/cloud-init.disabled
ConditionKernelCommandLine=!cloud-init=disabled
ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled
diff --git a/systemd/cloud-init-main.service.tmpl b/systemd/cloud-init-main.service.tmpl
index 01a7c3aee36..2cabb79b5bf 100644
--- a/systemd/cloud-init-main.service.tmpl
+++ b/systemd/cloud-init-main.service.tmpl
@@ -8,18 +8,12 @@
# https://www.freedesktop.org/software/systemd/man/latest/systemd-remount-fs.service.html
[Unit]
Description=Cloud-init: Single Process
-Wants=network-pre.target
{% if variant in ["almalinux", "cloudlinux", "ubuntu", "unknown", "debian", "rhel"] %}
DefaultDependencies=no
{% endif %}
{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
Requires=dbus.socket
After=dbus.socket
-Before=network.service
-Before=firewalld.target
-{% endif %}
-{% if variant in ["ubuntu", "unknown", "debian"] %}
-Before=sysinit.target
{% endif %}
After=systemd-remount-fs.service
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment