* [meta-virtualization][PATCH 1/2] cloud-init: add dependency on systemd to fix installed-vs-shipped QA issue
@ 2020-11-07 16:24 Martin Jansa
2020-11-07 16:24 ` [meta-virtualization][PATCH 2/2] cloud-init: fix usrmerge QA error: Martin Jansa
2020-11-10 4:03 ` [meta-virtualization][PATCH 1/2] cloud-init: add dependency on systemd to fix installed-vs-shipped QA issue Bruce Ashfield
0 siblings, 2 replies; 3+ messages in thread
From: Martin Jansa @ 2020-11-07 16:24 UTC (permalink / raw)
To: meta-virtualization; +Cc: Martin Jansa
* without systemd in RSS, setup.py will fail to call:
"pkg-config systemd --variable=systemdsystemunitdir"
and then clound-init might fail with:
ERROR: cloud-init-20.3-r0 do_package: QA Issue: cloud-init: Files/directories were installed but not shipped in any package:
/lib/systemd
/lib/systemd/system-generators
/lib/systemd/system
/lib/systemd/system-generators/cloud-init-generator
/lib/systemd/system/cloud-final.service
/lib/systemd/system/cloud-init.service
/lib/systemd/system/cloud-config.target
/lib/systemd/system/cloud-init.target
/lib/systemd/system/cloud-init-local.service
/lib/systemd/system/cloud-config.service
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
cloud-init: 10 installed and not shipped files. [installed-vs-shipped]
when systemd on host or in the systemd fallback uses
different systemdsystemunitdir value than what OE packages with:
FILES_${PN}-systemd += "${systemd_unitdir}/*"
setup.py fallback:
def pkg_config_read(library, var):
fallbacks = {
'systemd': {
'systemdsystemunitdir': '/lib/systemd/system',
'systemdsystemgeneratordir': '/lib/systemd/system-generators',
}
}
..
ubuntu:
meta-virtualization$ pkg-config systemd --variable=systemdsystemunitdir
/lib/systemd/system
OE (with usrmerge in DISTRO_FEATURES):
cloud-init/20.3-r0$ pkg-config systemd --variable=systemdsystemunitdir
/usr/lib/systemd/system
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
recipes-extended/cloud-init/cloud-init_20.3.bb | 3 +++
1 file changed, 3 insertions(+)
diff --git a/recipes-extended/cloud-init/cloud-init_20.3.bb b/recipes-extended/cloud-init/cloud-init_20.3.bb
index 31b4066..53d71a6 100644
--- a/recipes-extended/cloud-init/cloud-init_20.3.bb
+++ b/recipes-extended/cloud-init/cloud-init_20.3.bb
@@ -25,6 +25,9 @@ inherit setuptools3
inherit update-rc.d
inherit systemd
+# setup.py calls "pkg-config systemd --variable=systemdsystemunitdir" and needs to find our systemd
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
+
inherit python3native
PACKAGES += "${PN}-systemd"
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [meta-virtualization][PATCH 2/2] cloud-init: fix usrmerge QA error:
2020-11-07 16:24 [meta-virtualization][PATCH 1/2] cloud-init: add dependency on systemd to fix installed-vs-shipped QA issue Martin Jansa
@ 2020-11-07 16:24 ` Martin Jansa
2020-11-10 4:03 ` [meta-virtualization][PATCH 1/2] cloud-init: add dependency on systemd to fix installed-vs-shipped QA issue Bruce Ashfield
1 sibling, 0 replies; 3+ messages in thread
From: Martin Jansa @ 2020-11-07 16:24 UTC (permalink / raw)
To: meta-virtualization; +Cc: Martin Jansa
* 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
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
...01-setup.py-respect-udevdir-variable.patch | 42 +++++++++++++++++++
.../cloud-init/cloud-init_20.3.bb | 7 ++--
2 files changed, 46 insertions(+), 3 deletions(-)
create mode 100644 recipes-extended/cloud-init/cloud-init/0001-setup.py-respect-udevdir-variable.patch
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
new file mode 100644
index 0000000..94ec98a
--- /dev/null
+++ b/recipes-extended/cloud-init/cloud-init/0001-setup.py-respect-udevdir-variable.patch
@@ -0,0 +1,42 @@
+From d7a6b8f765e9a08a8811331298e76ebd7a0c7076 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+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 <Martin.Jansa@gmail.com>
+---
+ setup.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index cbacf48e..5e137a6d 100755
+--- a/setup.py
++++ b/setup.py
+@@ -142,6 +142,7 @@ INITSYS_ROOTS = {
+ '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'),
+@@ -264,7 +265,7 @@ if not platform.system().endswith('BSD'):
+ (ETC + '/NetworkManager/dispatcher.d/',
+ ['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')])
+ ])
+ # Use a subclass for install that handles
+ # adding on the right init system configuration files
+--
+2.27.0
+
diff --git a/recipes-extended/cloud-init/cloud-init_20.3.bb b/recipes-extended/cloud-init/cloud-init_20.3.bb
index 53d71a6..b9efb31 100644
--- a/recipes-extended/cloud-init/cloud-init_20.3.bb
+++ b/recipes-extended/cloud-init/cloud-init_20.3.bb
@@ -6,9 +6,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=c6dd79b6ec2130a3364f6fa9d6380408"
SRCREV = "1431c8a1bddaabf85e1bbb32bf316a3aef20036e"
SRC_URI = "git://github.com/canonical/cloud-init \
- file://cloud-init-source-local-lsb-functions.patch \
- file://0001-setup.py-check-for-install-anywhere-in-args.patch \
- "
+ 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"
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [meta-virtualization][PATCH 1/2] cloud-init: add dependency on systemd to fix installed-vs-shipped QA issue
2020-11-07 16:24 [meta-virtualization][PATCH 1/2] cloud-init: add dependency on systemd to fix installed-vs-shipped QA issue Martin Jansa
2020-11-07 16:24 ` [meta-virtualization][PATCH 2/2] cloud-init: fix usrmerge QA error: Martin Jansa
@ 2020-11-10 4:03 ` Bruce Ashfield
1 sibling, 0 replies; 3+ messages in thread
From: Bruce Ashfield @ 2020-11-10 4:03 UTC (permalink / raw)
To: Martin Jansa; +Cc: meta-virtualization
Thanks for the fixups .. most appreciated.
These are now merged.
Bruce
In message: [meta-virtualization][PATCH 1/2] cloud-init: add dependency on systemd to fix installed-vs-shipped QA issue
on 07/11/2020 Martin Jansa wrote:
> * without systemd in RSS, setup.py will fail to call:
> "pkg-config systemd --variable=systemdsystemunitdir"
> and then clound-init might fail with:
> ERROR: cloud-init-20.3-r0 do_package: QA Issue: cloud-init: Files/directories were installed but not shipped in any package:
> /lib/systemd
> /lib/systemd/system-generators
> /lib/systemd/system
> /lib/systemd/system-generators/cloud-init-generator
> /lib/systemd/system/cloud-final.service
> /lib/systemd/system/cloud-init.service
> /lib/systemd/system/cloud-config.target
> /lib/systemd/system/cloud-init.target
> /lib/systemd/system/cloud-init-local.service
> /lib/systemd/system/cloud-config.service
> Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
> cloud-init: 10 installed and not shipped files. [installed-vs-shipped]
>
> when systemd on host or in the systemd fallback uses
> different systemdsystemunitdir value than what OE packages with:
> FILES_${PN}-systemd += "${systemd_unitdir}/*"
>
> setup.py fallback:
> def pkg_config_read(library, var):
> fallbacks = {
> 'systemd': {
> 'systemdsystemunitdir': '/lib/systemd/system',
> 'systemdsystemgeneratordir': '/lib/systemd/system-generators',
> }
> }
> ..
>
> ubuntu:
> meta-virtualization$ pkg-config systemd --variable=systemdsystemunitdir
> /lib/systemd/system
>
> OE (with usrmerge in DISTRO_FEATURES):
> cloud-init/20.3-r0$ pkg-config systemd --variable=systemdsystemunitdir
> /usr/lib/systemd/system
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
> recipes-extended/cloud-init/cloud-init_20.3.bb | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/recipes-extended/cloud-init/cloud-init_20.3.bb b/recipes-extended/cloud-init/cloud-init_20.3.bb
> index 31b4066..53d71a6 100644
> --- a/recipes-extended/cloud-init/cloud-init_20.3.bb
> +++ b/recipes-extended/cloud-init/cloud-init_20.3.bb
> @@ -25,6 +25,9 @@ inherit setuptools3
> inherit update-rc.d
> inherit systemd
>
> +# setup.py calls "pkg-config systemd --variable=systemdsystemunitdir" and needs to find our systemd
> +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
> +
> inherit python3native
>
> PACKAGES += "${PN}-systemd"
> --
> 2.27.0
>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-10 4:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-07 16:24 [meta-virtualization][PATCH 1/2] cloud-init: add dependency on systemd to fix installed-vs-shipped QA issue Martin Jansa
2020-11-07 16:24 ` [meta-virtualization][PATCH 2/2] cloud-init: fix usrmerge QA error: Martin Jansa
2020-11-10 4:03 ` [meta-virtualization][PATCH 1/2] cloud-init: add dependency on systemd to fix installed-vs-shipped QA issue Bruce Ashfield
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.