packaging: Add some packages as Requires(post) 39/267239/2 accepted/tizen/unified/20211208.121830 submit/tizen/20211207.220750
authorJaehoon Chung <jh80.chung@samsung.com>
Tue, 30 Nov 2021 06:18:54 +0000 (15:18 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Fri, 3 Dec 2021 04:25:24 +0000 (13:25 +0900)
There is a warning message during creating Image.
Fix the below warning message with this patch.

INFO: Installing: hal-api-common-0.0.1-1.armv7l.rpm
/opt/etc/hal: No such file or directory
/opt/etc/hal: No such file or directory
/var/tmp/rpm-tmp.LHK8m3: line 3: systemd-tmpfiles: command not found
warning: %post(hal-api-common-0.0.1-1.armv7l) scriptlet failed, exit status 127
WARNING: (hal-api-common-0.0.1-1.armv7l.rpm) Post script failed

Change-Id: I1ed933f92f2614ae4ea1c4e1e5d07a932b6a558b
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
packaging/hal-api-common.spec

index c45c497..9889717 100644 (file)
@@ -46,6 +46,10 @@ Requires:    %{name} = %{version}-%{release}
 %package -n %{test_name}
 Summary: tests for hal-api-common
 Requires: hal-api-common = %{version}
+Requires(post): /sbin/ldconfig
+Requires(post): systemd
+Requires(post): security-config
+Requires(postun): /sbin/ldconfig
 
 %description -n %{test_name}
 Haltests for hal-api-common
@@ -87,7 +91,7 @@ install -D -m 0755 %{SOURCE9} %{buildroot}%{_bindir}/hal-rpmdb-checker
 %clean
 rm -rf %{buildroot}
 
-%post
+%post -n %{test_name}
 /sbin/ldconfig
 chsmack -a "System" -t %{hal_rpmdb_checker_path}
 systemd-tmpfiles /usr/lib/tmpfiles.d/hal-rpmdb-checker.conf --create