From: Chanwoo Choi Date: Wed, 10 Jul 2024 02:18:43 +0000 (+0900) Subject: packaging: Add data migration script to remove /opt/etc/hal/.hal-backend-compatibility X-Git-Tag: accepted/tizen/unified/20240711.163723^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ce1ff8f4c9d2a2da819bbb221582cb16b72ff1b;p=platform%2Fhal%2Fapi%2Fcommon.git packaging: Add data migration script to remove /opt/etc/hal/.hal-backend-compatibility Remove /opt/etc/hal/.hal-backend-compatibility for data migration of OS Upgarde to remove the invalid result of hal backend compatibility. /opt/etc/hal/.hal-backend-compatibility should be created on first booting by comparing the supported HAL interface version in HAL manifest with hal-backend version. Change-Id: Id6980ced56f7f8c2fee0f7b178e6534ad168b1cb Signed-off-by: Chanwoo Choi --- diff --git a/packaging/500.hal-api-common.sh b/packaging/500.hal-api-common.sh new file mode 100644 index 0000000..ef15dec --- /dev/null +++ b/packaging/500.hal-api-common.sh @@ -0,0 +1,6 @@ +#!/bin/sh +PATH=/bin:/usr/bin:/sbin:/usr/sbin + +if [ -e "/opt/etc/hal/.hal-backend-compatibility" ]; then + rm -f /opt/etc/hal/.hal-backend-compatibility +fi diff --git a/packaging/hal-api-common.spec b/packaging/hal-api-common.spec index 9d8d790..d49acc2 100644 --- a/packaging/hal-api-common.spec +++ b/packaging/hal-api-common.spec @@ -18,6 +18,7 @@ Source5: macros.hal-api Source6: haltest.target Source7: reboot-haltest Source8: reboot-normal +Source9: 500.%{name}.sh Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig @@ -77,6 +78,7 @@ 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 0755 %{SOURCE9} %{buildroot}%{_datadir}/upgrade/scripts/500.%{name}.sh %clean rm -rf %{buildroot} @@ -99,6 +101,7 @@ rm -rf %{buildroot} %{_sysconfdir}/ld.so.conf.d/libhal-api.conf %{_systemdgeneratordir}/systemd-hal-firmware-generator %{_systemdgeneratordir}/systemd-hal-compatibility-checker-generator +%{_datadir}/upgrade/scripts/500.%{name}.sh %files -n %{devel_name} %defattr(-,root,root,-)