From 22c27835464fd2b93955df33257bc451534e01e5 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Wed, 5 Apr 2023 22:58:52 -0400 Subject: cloud-init: update to 23.1 Signed-off-by: Bruce Ashfield --- ...tup.py-check-for-install-anywhere-in-args.patch | 6 +- .../0001-setup.py-respect-udevdir-variable.patch | 39 ------------ recipes-extended/cloud-init/cloud-init_21.4.bb | 72 ---------------------- recipes-extended/cloud-init/cloud-init_23.1.bb | 71 +++++++++++++++++++++ 4 files changed, 74 insertions(+), 114 deletions(-) delete mode 100644 recipes-extended/cloud-init/cloud-init/0001-setup.py-respect-udevdir-variable.patch delete mode 100644 recipes-extended/cloud-init/cloud-init_21.4.bb create mode 100644 recipes-extended/cloud-init/cloud-init_23.1.bb (limited to 'recipes-extended/cloud-init') 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 index c56f7b1d..cc2914c9 100644 --- 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 @@ -22,11 +22,11 @@ Index: git/setup.py =================================================================== --- git.orig/setup.py +++ git/setup.py -@@ -87,7 +87,7 @@ +@@ -98,7 +98,7 @@ + that files are different outside of the debian directory.""" - # older versions of tox use bdist (xenial), and then install from there. # newer versions just use install. -- if not (sys.argv[1] == "install" or sys.argv[1].startswith("bdist*")): +- if not (sys.argv[1] == "install"): + if not ('install' in sys.argv or sys.argv[1].startswith('bdist*')): return template diff --git a/recipes-extended/cloud-init/cloud-init/0001-setup.py-respect-udevdir-variable.patch b/recipes-extended/cloud-init/cloud-init/0001-setup.py-respect-udevdir-variable.patch deleted file mode 100644 index 96c6766e..00000000 --- a/recipes-extended/cloud-init/cloud-init/0001-setup.py-respect-udevdir-variable.patch +++ /dev/null @@ -1,39 +0,0 @@ -From d7a6b8f765e9a08a8811331298e76ebd7a0c7076 Mon Sep 17 00:00:00 2001 -From: Martin Jansa -Date: Sat, 7 Nov 2020 15:55:23 +0000 -Subject: [PATCH] setup.py respect udevdir variable - -* with usrmerge cloud-init triggers QA error: - ERROR: cloud-init-20.3-r0 do_package_qa: QA Issue: cloud-init package is not obeying usrmerge distro feature. /lib should be relocated to /usr. [usrmerge] - ERROR: cloud-init-20.3-r0 do_package_qa: QA run found fatal errors. Please consider fixing them. - because of: - /lib/udev/rules.d/66-azure-ephemeral.rules - -Upstream-Status: [Pending] - -Signed-off-by: Martin Jansa ---- - setup.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -Index: git/setup.py -=================================================================== ---- git.orig/setup.py -+++ git/setup.py -@@ -159,6 +159,7 @@ - "sysvinit_deb": "etc/init.d", - "sysvinit_openrc": "etc/init.d", - "sysvinit_suse": "etc/init.d", -+ 'udevdir': pkg_config_read('udev', 'udevdir'), - "systemd": pkg_config_read("systemd", "systemdsystemunitdir"), - "systemd.generators": pkg_config_read( - "systemd", "systemdsystemgeneratordir" -@@ -307,7 +308,7 @@ - ["tools/hook-network-manager"], - ), - (ETC + "/dhcp/dhclient-exit-hooks.d/", ["tools/hook-dhclient"]), -- (LIB + "/udev/rules.d", [f for f in glob("udev/*.rules")]), -+ ('udevdir' + "/rules.d", [f for f in glob("udev/*.rules")]), - ( - ETC + "/systemd/system/sshd-keygen@.service.d/", - ["systemd/disable-sshd-keygen-if-cloud-init-active.conf"], diff --git a/recipes-extended/cloud-init/cloud-init_21.4.bb b/recipes-extended/cloud-init/cloud-init_21.4.bb deleted file mode 100644 index e5f5b79e..00000000 --- a/recipes-extended/cloud-init/cloud-init_21.4.bb +++ /dev/null @@ -1,72 +0,0 @@ -DESCRIPTION = "Init scripts for use on cloud images" -HOMEPAGE = "https://github.com/canonical/cloud-init" -SECTION = "devel/python" -LICENSE = "GPL-3.0-only | Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c6dd79b6ec2130a3364f6fa9d6380408 \ - file://LICENSE-GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ - file://LICENSE-Apache2.0;md5=3b83ef96387f14655fc854ddc3c6bd57 \ -" - -SRCREV = "a97fd062f7dbd4b824fd006edd08927ef9dbf24a" -SRC_URI = "git://github.com/canonical/cloud-init;branch=main;protocol=https \ - file://cloud-init-source-local-lsb-functions.patch \ - file://0001-setup.py-check-for-install-anywhere-in-args.patch \ - file://0001-setup.py-respect-udevdir-variable.patch \ -" - -S = "${WORKDIR}/git" - -DISTUTILS_INSTALL_ARGS:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '--init-system=sysvinit_deb', '', d)}" -DISTUTILS_INSTALL_ARGS:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--init-system=systemd', '', d)}" - -do_install:append() { - ln -s ${libdir}/${BPN}/uncloud-init ${D}${sysconfdir}/cloud/uncloud-init - ln -s ${libdir}/${BPN}/write-ssh-key-fingerprints ${D}${sysconfdir}/cloud/write-ssh-key-fingerprints - if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then - install -m 755 -d ${D}${sysconfdir}/init.d/ - install -m 755 ${S}/sysvinit/redhat/* ${D}${sysconfdir}/init.d/ - fi - -} - -inherit pkgconfig -inherit setuptools3_legacy -inherit update-rc.d -inherit systemd - -# setup.py calls "pkg-config systemd --variable=systemdsystemunitdir" and needs to find our dev manager -DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" -DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'udev', '', d)}" - -inherit python3native - -PACKAGES += "${PN}-systemd" - -FILES:${PN} += "${sysconfdir}/* \ - ${datadir}/* \ - ${nonarch_libdir}/${BPN}/*" - -FILES:${PN}-systemd += "${systemd_unitdir}/*" -RDEPENDS:${PN}-systemd += " ${PN}" - -INITSCRIPT_PACKAGES = "${PN}" -INITSCRIPT_NAME:${BPN} = "cloud-init" - -DEPENDS += "python3-pyyaml-native \ - python3-requests-native \ - python3-jinja2-native \ - " - -RDEPENDS:${PN} = "python3 \ - python3-jinja2 \ - python3-configobj \ - python3-requests \ - python3-jsonpatch \ - python3-jsonschema \ - python3-pyyaml \ - python3-oauthlib \ - python3-netifaces \ - python3-charset-normalizer \ - bash \ - " - diff --git a/recipes-extended/cloud-init/cloud-init_23.1.bb b/recipes-extended/cloud-init/cloud-init_23.1.bb new file mode 100644 index 00000000..ea9c2730 --- /dev/null +++ b/recipes-extended/cloud-init/cloud-init_23.1.bb @@ -0,0 +1,71 @@ +DESCRIPTION = "Init scripts for use on cloud images" +HOMEPAGE = "https://github.com/canonical/cloud-init" +SECTION = "devel/python" +LICENSE = "GPL-3.0-only | Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c6dd79b6ec2130a3364f6fa9d6380408 \ + file://LICENSE-GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ + file://LICENSE-Apache2.0;md5=3b83ef96387f14655fc854ddc3c6bd57 \ +" + +SRCREV = "e02c4607923af64311c70ae9a06d6794355e9a61" +SRC_URI = "git://github.com/canonical/cloud-init;branch=main;protocol=https \ + file://cloud-init-source-local-lsb-functions.patch \ + file://0001-setup.py-check-for-install-anywhere-in-args.patch \ +" + +S = "${WORKDIR}/git" + +DISTUTILS_INSTALL_ARGS:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '--init-system=sysvinit_deb', '', d)}" +DISTUTILS_INSTALL_ARGS:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--init-system=systemd', '', d)}" + +do_install:append() { + ln -s ${libdir}/${BPN}/uncloud-init ${D}${sysconfdir}/cloud/uncloud-init + ln -s ${libdir}/${BPN}/write-ssh-key-fingerprints ${D}${sysconfdir}/cloud/write-ssh-key-fingerprints + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -m 755 -d ${D}${sysconfdir}/init.d/ + install -m 755 ${S}/sysvinit/redhat/* ${D}${sysconfdir}/init.d/ + fi + +} + +inherit pkgconfig +inherit setuptools3_legacy +inherit update-rc.d +inherit systemd + +# setup.py calls "pkg-config systemd --variable=systemdsystemunitdir" and needs to find our dev manager +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'udev', '', d)}" + +inherit python3native + +PACKAGES += "${PN}-systemd" + +FILES:${PN} += "${sysconfdir}/* \ + ${datadir}/* \ + ${nonarch_libdir}/${BPN}/*" + +FILES:${PN}-systemd += "${systemd_unitdir}/*" +RDEPENDS:${PN}-systemd += " ${PN}" + +INITSCRIPT_PACKAGES = "${PN}" +INITSCRIPT_NAME:${BPN} = "cloud-init" + +DEPENDS += "python3-pyyaml-native \ + python3-requests-native \ + python3-jinja2-native \ + " + +RDEPENDS:${PN} = "python3 \ + python3-jinja2 \ + python3-configobj \ + python3-requests \ + python3-jsonpatch \ + python3-jsonschema \ + python3-pyyaml \ + python3-oauthlib \ + python3-netifaces \ + python3-charset-normalizer \ + bash \ + " + -- cgit v1.2.3-54-g00ecf