Hi,
As I haven't received any anwer on my post
https://tuleap.net/plugins/forumml/message.php?group_id=101&topic=31733&list=1 , I want to add my two cents so this issue is solved once for all :)
Here is the statement as it appears in the current package:
# In any cases fix the context
/usr/bin/chcon -R root:object_r:httpd_sys_content_t $RPM_BUILD_ROOT//usr/share/tuleap || true
First, the correct* chcon statement is :
/usr/bin/chcon -R -t httpd_sys_content_t /usr/share/tuleap
OR
/usr/bin/chcon -R -h root:object_r:httpd_sys_content_t:s0 /usr/share/tuleap
* I suggest using the first one.
Second, changes being made with chcon don't survive filesystem relabel. So, I would suggest to add :
semanage fcontext -a -t httpd_sys_content_t '/usr/share/tuleap(/.*)?'
The command above adds an entry to /etc/selinux/targeted/contexts/files/file_contexts.local, so the context of the folder is reset correctly when the filesystem is relabeled (for example with the use of 'restorecon').
If you look at /usr/share/tuleap/tools/setup.sh you'll see the /usr/share/tuleap folder is handled with correct chcon statements so this should be the same in tuleap RPMs scriptlet.