@@ -12,15 +12,13 @@ UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+\.\d+\.[0-8]?\d)$"
DEPENDS = "libtraceevent"
DEPENDS:append:libc-musl = " argp-standalone"
LDFLAGS:append:libc-musl = " -largp"
-RDEPENDS:${PN} = "python3-core python3-crypt python3-datetime python3-io python3-json \
- python3-logging python3-netclient python3-sqlalchemy"
inherit meson pkgconfig update-rc.d systemd
EXTRA_OEMESON = "-Denable-arch=auto"
PACKAGECONFIG ??= "sqlite3 mce aer extlog devlink diskerror"
-PACKAGECONFIG[sqlite3] = "-Dsqlite3=enabled,-Dsqlite3=disabled,sqlite3,python3-sqlite3"
+PACKAGECONFIG[sqlite3] = "-Dsqlite3=enabled,-Dsqlite3=disabled,sqlite3"
PACKAGECONFIG[mysql] = "-Dmysql=enabled,-Dmysql=disabled,mariadb"
PACKAGECONFIG[postgresql] = "-Dpostgresql=enabled,-Dpostgresql=disabled,postgresql"
PACKAGECONFIG[mce] = "-Dmce=enabled,-Dmce=disabled"
@@ -59,8 +57,24 @@ do_install:append() {
install -m 755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/rasdaemon
}
+# ras-mc-ctl is a Python script, keep it out of the daemon package so that
+# rasdaemon can be installed without Python
+PACKAGE_BEFORE_PN = "ras-mc-ctl"
+
+FILES:ras-mc-ctl = "${sbindir}/ras-mc-ctl \
+ ${datadir}/${BPN} \
+ ${datadir}/bash-completion \
+ ${datadir}/zsh \
+ ${sysconfdir}/ras/dimm_labels.d \
+ ${systemd_system_unitdir}/ras-mc-ctl.service"
+
+RDEPENDS:ras-mc-ctl = "${PN} python3-core python3-crypt python3-datetime python3-io \
+ python3-json python3-logging python3-netclient python3-sqlalchemy \
+ ${@bb.utils.contains('PACKAGECONFIG', 'sqlite3', 'python3-sqlite3', '', d)}"
+
+RRECOMMENDS:${PN} = "ras-mc-ctl"
+
FILES:${PN} += "${datadir} \
- ${PYTHON_SITEPACKAGES_DIR} \
${systemd_system_unitdir}"
SYSTEMD_SERVICE:${PN} = "rasdaemon.service"
ras-mc-ctl is a Python script which needs SQLAlchemy, while the daemon does not need Python. Split it out with its modules, unit, completions and DIMM labels, so that rasdaemon can be installed without Python. rasdaemon recommends ras-mc-ctl to keep the default content unchanged. Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com> --- ras-mc-ctl is a Python script which needs SQLAlchemy, while the daemon does not need Python. Split it out with its modules, unit, completions and DIMM labels, so that rasdaemon can be installed without Python. rasdaemon recommends ras-mc-ctl to keep the default content unchanged. --- .../recipes-support/rasdaemon/rasdaemon_1.0.1.bb | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) --- base-commit: 914fca8c896edcde152e8a77661840130bbcc517 change-id: 20261203-b4-rasdaemon-ras-mc-ctl-1a3b35538d93 Best regards, -- Thomas Perrot <thomas.perrot@bootlin.com>