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 <yunmi.ha@samsung.com>
/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