summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-extended/cloud-init/cloud-init/0001-setup.py-check-for-install-anywhere-in-args.patch33
-rw-r--r--recipes-extended/cloud-init/cloud-init_git.bb12
2 files changed, 6 insertions, 39 deletions
diff --git a/recipes-extended/cloud-init/cloud-init/0001-setup.py-check-for-install-anywhere-in-args.patch b/recipes-extended/cloud-init/cloud-init/0001-setup.py-check-for-install-anywhere-in-args.patch
deleted file mode 100644
index e5b214fe..00000000
--- a/recipes-extended/cloud-init/cloud-init/0001-setup.py-check-for-install-anywhere-in-args.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From 5c96379a4727c07fb5222208525013ec8b878184 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Wed, 4 Nov 2020 21:15:50 -0500
4Subject: [PATCH] setup.py: check for 'install' anywhere in args
5
6The python3distutils bbclass calls setup.py in a different way then
7cloud-init expects .. the 'install' is not argument 1, but is in fact
8after a 'build' and some other options.
9
10So rather than checking for install to be argv[1], we check for it
11anywhere in the arguments are trigger the template replacement to
12happen.
13
14Upstream-Status: Inappropriate [embedded specific]
15
16Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
17---
18 setup.py | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21Index: git/setup.py
22===================================================================
23--- git.orig/setup.py
24+++ git/setup.py
25@@ -60,7 +60,7 @@
26 that files are different outside of the debian directory."""
27
28 # newer versions just use install.
29- if "install" not in sys.argv:
30+ if not ('install' in sys.argv or sys.argv[1].startswith('bdist*')):
31 return template
32
33 tmpl_ext = ".tmpl"
diff --git a/recipes-extended/cloud-init/cloud-init_git.bb b/recipes-extended/cloud-init/cloud-init_git.bb
index f6d175e5..68337c9b 100644
--- a/recipes-extended/cloud-init/cloud-init_git.bb
+++ b/recipes-extended/cloud-init/cloud-init_git.bb
@@ -7,13 +7,12 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=c6dd79b6ec2130a3364f6fa9d6380408 \
7 file://LICENSE-Apache2.0;md5=3b83ef96387f14655fc854ddc3c6bd57 \ 7 file://LICENSE-Apache2.0;md5=3b83ef96387f14655fc854ddc3c6bd57 \
8" 8"
9 9
10SRCREV = "ea53a592be3df61059bd80fc0e32dff94a037906" 10SRCREV = "b04c475f3147fd849bac6b3d41e1302b222c8406"
11SRC_URI = "git://github.com/canonical/cloud-init;branch=25.1.x;protocol=https \ 11SRC_URI = "git://github.com/canonical/cloud-init;branch=main;protocol=https \
12 file://cloud-init-source-local-lsb-functions.patch \ 12 file://cloud-init-source-local-lsb-functions.patch \
13 file://0001-setup.py-check-for-install-anywhere-in-args.patch \
14" 13"
15 14
16PV = "v25.1.4+git" 15PV = "v25.2.0+git"
17 16
18DISTUTILS_INSTALL_ARGS:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '--init-system=sysvinit_deb', '', d)}" 17DISTUTILS_INSTALL_ARGS:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '--init-system=sysvinit_deb', '', d)}"
19DISTUTILS_INSTALL_ARGS:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--init-system=systemd', '', d)}" 18DISTUTILS_INSTALL_ARGS:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--init-system=systemd', '', d)}"
@@ -29,9 +28,10 @@ do_install:append() {
29} 28}
30 29
31inherit pkgconfig 30inherit pkgconfig
32inherit setuptools3_legacy
33inherit update-rc.d 31inherit update-rc.d
34inherit systemd 32inherit systemd
33inherit python_setuptools_build_meta
34inherit meson
35 35
36# setup.py calls "pkg-config systemd --variable=systemdsystemunitdir" and needs to find our dev manager 36# setup.py calls "pkg-config systemd --variable=systemdsystemunitdir" and needs to find our dev manager
37DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" 37DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"