Skip to content

Commit 7523535

Browse files
committed
Fix aesmd booting error after RPM upgrade.
According to the spec [1], the scriptlet %post of a new package executes before %preun of the old package. This will cause the startup.sh of the new package to be executed first, and then the cleanup.sh of the old package to be executed when sgx-aesm-service is upgraded, and the user aesmd will be deleted, which leading aesmd booting error. Replace %post with %posttrans to make sure the prerequisites for service aesmd are met. [1]. https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/ Signed-off-by: yuguorui <yuguorui@pku.edu.cn>
1 parent fdb3b8b commit 7523535

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

linux/installer/rpm/sgx-aesm-service/sgx-aesm-service.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ sed -i 's#^/etc/aesmd.conf#%config &#' %{_specdir}/list-%{name}
6767

6868
%files -f %{_specdir}/list-%{name}
6969

70-
%post
70+
%posttrans
7171
if [ -x %{_install_path}/startup.sh ]; then %{_install_path}/startup.sh; fi
7272

7373
%preun

0 commit comments

Comments
 (0)