From: Yunmi Ha Date: Wed, 11 Aug 2021 07:37:23 +0000 (+0900) Subject: Fix gbs build home creation with incorrect permissions X-Git-Tag: accepted/tizen/unified/20210817.123212^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F57%2F262457%2F1;p=platform%2Fcore%2Fapi%2Fsystem-info.git Fix gbs build home creation with incorrect permissions A gcda file is created when binary system_info_init_db is executed. At this time, the home directory is not created yet, so the home directory is created and the gcda file is created under it. But home directory with wrong permissions due to umask set to 0222 in the binary So, when build with gcov, set the home directory to the correct permissions Change-Id: Id7bac84bbfcd284e55f294ecc41ec826e904616c Signed-off-by: Yunmi Ha --- diff --git a/packaging/capi-system-info.spec b/packaging/capi-system-info.spec index 18f85bb..b2ae0af 100644 --- a/packaging/capi-system-info.spec +++ b/packaging/capi-system-info.spec @@ -111,6 +111,15 @@ install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj /usr/bin/system_info_init_db /sbin/ldconfig +%if 0%{?gcov:1} +# A gcda file is created when binary system_info_init_db is executed. +# At this time, the home directory is not created yet, +# so the home directory is created and the gcda file is created under it. +# But home directory with wrong permissions due to umask set to 0222 in the binary +# So, when build with gcov, set the home directory to the correct permissions +[ -d /home/abuild ] && chmod 755 /home/abuild +%endif + %postun -p /sbin/ldconfig %files