diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2023-08-14 13:21:40 +0200 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2023-08-15 18:47:38 +0000 |
commit | 926d714972edc85f47ad771d0bfe9565d7e57e74 (patch) | |
tree | ac0213896c3b2c2a6a445adb789298a31fe6aba7 /recipes-extended | |
parent | 0f1601d98f2c926a109b7beb7df21a5dfe6188d9 (diff) | |
download | meta-virtualization-926d714972edc85f47ad771d0bfe9565d7e57e74.tar.gz |
cloud-init: fix usrmerge QA issue
* backport a fix from 23.2 version (notice that the recipe claims to be:
v23.2.2+git, but the commit in master-next which updated PV only changed
the branch name, not the SRCREV, so it's still 23.1 and missing this fix
cloud-init/v23.2.2+git/git $ git describe --tags
23.1-53-g57752970e
* fixes:
ERROR: cloud-init-v23.2.2+git-r0 do_package_qa: QA Issue: cloud-init package is not obeying usrmerge distro feature. /lib should be relocated to /usr. [usrmerge]
caused by udev rules:
$ find cloud-init/v23.2.2+git/image/lib/
cloud-init/v23.2.2+git/image/lib/
cloud-init/v23.2.2+git/image/lib/udev
cloud-init/v23.2.2+git/image/lib/udev/rules.d
cloud-init/v23.2.2+git/image/lib/udev/rules.d/66-azure-ephemeral.rules
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-extended')
-rw-r--r-- | recipes-extended/cloud-init/cloud-init/0002-setup.py-use-pkg-config-for-udev-rules-path-2137.patch | 50 | ||||
-rw-r--r-- | recipes-extended/cloud-init/cloud-init_git.bb | 1 |
2 files changed, 51 insertions, 0 deletions
diff --git a/recipes-extended/cloud-init/cloud-init/0002-setup.py-use-pkg-config-for-udev-rules-path-2137.patch b/recipes-extended/cloud-init/cloud-init/0002-setup.py-use-pkg-config-for-udev-rules-path-2137.patch new file mode 100644 index 00000000..9f3760c4 --- /dev/null +++ b/recipes-extended/cloud-init/cloud-init/0002-setup.py-use-pkg-config-for-udev-rules-path-2137.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | From 57752970ebea017820343aadf11b65c537bef336 Mon Sep 17 00:00:00 2001 | ||
2 | From: dankm <dan.mcgregor@usask.ca> | ||
3 | Date: Fri, 28 Apr 2023 15:10:34 -0600 | ||
4 | Subject: [PATCH] setup.py: use pkg-config for udev/rules path (#2137) | ||
5 | |||
6 | Distributions other than RHEL also use /usr/lib/udev for the rules | ||
7 | path. Instead of hardcoding the udev rules path for RedHat, check | ||
8 | pkg-config for the proper location. | ||
9 | |||
10 | Upstream-Status: Backport [23.2 https://github.com/canonical/cloud-init/commit/5abf5f5f2cf93c57ac74220251d2a2acce5f7099] | ||
11 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
12 | --- | ||
13 | setup.py | 14 ++++++++------ | ||
14 | 1 file changed, 8 insertions(+), 6 deletions(-) | ||
15 | |||
16 | diff --git a/setup.py b/setup.py | ||
17 | index a6dbc5c23..66e618d3a 100644 | ||
18 | --- a/setup.py | ||
19 | +++ b/setup.py | ||
20 | @@ -46,7 +46,10 @@ def pkg_config_read(library, var): | ||
21 | "systemdsystemconfdir": "/etc/systemd/system", | ||
22 | "systemdsystemunitdir": "/lib/systemd/system", | ||
23 | "systemdsystemgeneratordir": "/lib/systemd/system-generators", | ||
24 | - } | ||
25 | + }, | ||
26 | + "udev": { | ||
27 | + "udevdir": "/lib/udev", | ||
28 | + }, | ||
29 | } | ||
30 | cmd = ["pkg-config", "--variable=%s" % var, library] | ||
31 | try: | ||
32 | @@ -309,14 +312,13 @@ data_files = [ | ||
33 | ), | ||
34 | ] | ||
35 | if not platform.system().endswith("BSD"): | ||
36 | - | ||
37 | - RULES_PATH = LIB | ||
38 | - if os.path.isfile("/etc/redhat-release"): | ||
39 | - RULES_PATH = "/usr/lib" | ||
40 | + RULES_PATH = pkg_config_read("udev", "udevdir") | ||
41 | + if not in_virtualenv(): | ||
42 | + RULES_PATH = "/" + RULES_PATH | ||
43 | |||
44 | data_files.extend( | ||
45 | [ | ||
46 | - (RULES_PATH + "/udev/rules.d", [f for f in glob("udev/*.rules")]), | ||
47 | + (RULES_PATH + "/rules.d", [f for f in glob("udev/*.rules")]), | ||
48 | ( | ||
49 | ETC + "/systemd/system/sshd-keygen@.service.d/", | ||
50 | ["systemd/disable-sshd-keygen-if-cloud-init-active.conf"], | ||
diff --git a/recipes-extended/cloud-init/cloud-init_git.bb b/recipes-extended/cloud-init/cloud-init_git.bb index a35f50a4..e01bdad2 100644 --- a/recipes-extended/cloud-init/cloud-init_git.bb +++ b/recipes-extended/cloud-init/cloud-init_git.bb | |||
@@ -11,6 +11,7 @@ SRCREV = "e02c4607923af64311c70ae9a06d6794355e9a61" | |||
11 | SRC_URI = "git://github.com/canonical/cloud-init;branch=23.2.x;protocol=https \ | 11 | SRC_URI = "git://github.com/canonical/cloud-init;branch=23.2.x;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 \ | 13 | file://0001-setup.py-check-for-install-anywhere-in-args.patch \ |
14 | file://0002-setup.py-use-pkg-config-for-udev-rules-path-2137.patch \ | ||
14 | " | 15 | " |
15 | 16 | ||
16 | PV = "v23.2.2+git${SRCPV}" | 17 | PV = "v23.2.2+git${SRCPV}" |