systemd-hal-cc-generator: Add hal compatibility checker 60/303660/9
authorYoungjae Cho <y0.cho@samsung.com>
Wed, 3 Jan 2024 04:14:45 +0000 (13:14 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Mon, 15 Jan 2024 09:04:08 +0000 (18:04 +0900)
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 <y0.cho@samsung.com>
packaging/hal-api-common.spec
packaging/systemd-hal-cc-generator [new file with mode: 0644]

index 73f8e89..d0430b0 100644 (file)
@@ -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 (file)
index 0000000..1f4da53
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+PATH=:/bin:/usr/bin:/sbin:/usr/bin
+
+hal-compatibility-checker --skip-if-result-exist --redirect-all=/dev/kmsg