From: Youngjae Cho Date: Wed, 3 Jan 2024 04:14:45 +0000 (+0900) Subject: systemd-hal-cc-generator: Add hal compatibility checker X-Git-Tag: accepted/tizen/unified/20240116.155507~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F60%2F303660%2F9;p=platform%2Fhal%2Fapi%2Fcommon.git systemd-hal-cc-generator: Add hal compatibility checker In early booting state, the hal-compatibility-checker operates aided by systemd-generator. It checks compatibility manifested by hal-api and abi-version of hal-backend. Once it successfully checks and stores result, those next following bootings won't do this again but just reuse the result. Change-Id: Id9a50a921f8e0d21de292d1aab81e490973cb2d1 Signed-off-by: Youngjae Cho --- diff --git a/packaging/hal-api-common.spec b/packaging/hal-api-common.spec index 73f8e89..d0430b0 100644 --- a/packaging/hal-api-common.spec +++ b/packaging/hal-api-common.spec @@ -13,12 +13,13 @@ Source0: %{name}-%{version}.tar.gz Source1: %{name}.manifest Source2: libhal-api.conf Source3: systemd-hal-firmware-generator -Source4: macros.hal-api -Source5: haltest.target -Source6: reboot-haltest -Source7: reboot-normal -Source8: hal-rpmdb-checker.service -Source9: hal-rpmdb-checker +Source4: systemd-hal-cc-generator +Source5: macros.hal-api +Source6: haltest.target +Source7: reboot-haltest +Source8: reboot-normal +Source9: hal-rpmdb-checker.service +Source10: hal-rpmdb-checker Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig @@ -79,12 +80,13 @@ mkdir -p %{buildroot}/hal mkdir -p %{buildroot}%{hal_rpmdb_checker_path} install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/ld.so.conf.d/libhal-api.conf install -D -m 0755 %{SOURCE3} %{buildroot}%{_systemdgeneratordir}/systemd-hal-firmware-generator -install -D -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/rpm/macros.hal-api -install -D -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}/haltest.target -install -D -m 0755 %{SOURCE6} %{buildroot}%{_bindir}/reboot-haltest -install -D -m 0755 %{SOURCE7} %{buildroot}%{_bindir}/reboot-normal -install -D -m 0644 %{SOURCE8} %{buildroot}%{_unitdir}/hal-rpmdb-checker.service -install -D -m 0755 %{SOURCE9} %{buildroot}%{_bindir}/hal-rpmdb-checker +install -D -m 0755 %{SOURCE4} %{buildroot}%{_systemdgeneratordir}/systemd-hal-cc-generator +install -D -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/rpm/macros.hal-api +install -D -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/haltest.target +install -D -m 0755 %{SOURCE7} %{buildroot}%{_bindir}/reboot-haltest +install -D -m 0755 %{SOURCE8} %{buildroot}%{_bindir}/reboot-normal +install -D -m 0644 %{SOURCE9} %{buildroot}%{_unitdir}/hal-rpmdb-checker.service +install -D -m 0755 %{SOURCE10} %{buildroot}%{_bindir}/hal-rpmdb-checker %install_service sysinit.target.wants hal-rpmdb-checker.service @@ -110,6 +112,7 @@ systemd-tmpfiles /usr/lib/tmpfiles.d/hal-rpmdb-checker.conf --create %{_bindir}/hal-compatibility-checker %{_sysconfdir}/ld.so.conf.d/libhal-api.conf %{_systemdgeneratordir}/systemd-hal-firmware-generator +%{_systemdgeneratordir}/systemd-hal-cc-generator %files -n %{devel_name} %defattr(-,root,root,-) diff --git a/packaging/systemd-hal-cc-generator b/packaging/systemd-hal-cc-generator new file mode 100644 index 0000000..1f4da53 --- /dev/null +++ b/packaging/systemd-hal-cc-generator @@ -0,0 +1,5 @@ +#!/bin/sh + +PATH=:/bin:/usr/bin:/sbin:/usr/bin + +hal-compatibility-checker --skip-if-result-exist --redirect-all=/dev/kmsg