Bug 969002

Summary: [EWS-2.0.1-ER2] Error in postinstall scriptlet for tomcat6 and tomcat7 rpm
Product: [JBoss] JBoss Enterprise Web Server 2 Reporter: Michal Haško <mhasko>
Component: tomcat6, tomcat7Assignee: David Knox <dknox>
Status: CLOSED CURRENTRELEASE QA Contact: Libor Fuka <lfuka>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 2.0.1CC: jclere, jdoyle, mhusnain, myarboro, pslavice, rsvoboda, weli
Target Milestone: ---   
Target Release: 2.0.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
The tomcat6 and tomcat7 postinstall scripts included in JBoss Enterprise Web Server do not work as expected. This is because the SEModule is expected to be in the <filename class="directory">/usr/bin/semodule</filename> directory, which does not exist. SEModule is available at <filename class="directory">/usr/sbin/semodule</filename> instead, which is the correct location. Additionally, the provided module installation path (<filename class="directory">%/selinux/packages/tomcat...</filename>) is incorrect. A fix is added for tomcat6 and tomcat7 in JBoss Enterprise Web Server 2.0.1. This fix ensures that the expected path for SEModule is correct and that the installation path is correct. As a result, the module now works as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-03 12:58:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Haško 2013-05-30 12:47:43 UTC
Description of the problem:
There are 2 problems in tomcat6 and tomcat7 postinstall scriptlets:
 - semodule is called as /usr/bin/semodule which doesn't exist (instead of /usr/sbin/semodule)
 - there is wrong path for module installation (%/selinux/packages/tomcat...)


Version-Release number of selected component (if applicable):
RHEL5:
# rpm -q tomcat6 tomcat7
tomcat6-6.0.35-13_patch_07.ep6.el5
tomcat7-7.0.30-6_patch_03.ep6.el5
RHEL6:
# rpm -q tomcat6 tomcat7
tomcat6-6.0.35-33_patch_07.ep6.el6.noarch
tomcat7-7.0.30-7_patch_03.ep6.el6.noarch


Steps to Reproduce:
# rpm -q --scripts tomcat6 tomcat7 | grep 'semodule -i'


Actual results:
RHEL5:
/usr/sbin/semodule -i %/selinux/packages/tomcat6/tomcat6.pp 2>/dev/null ||:
/usr/sbin/semodule -i /etc/tomcat7/selinux/packages/tomcat7/tomcat7.pp 2>/dev/null ||:
RHEL6:
/usr/sbin/semodule -i %/selinux/packages/tomcat6/tomcat6.pp 2>/dev/null ||:
/usr/bin/semodule -i %/selinux/packages/tomcat7/tomcat7.pp 2>/dev/null ||:


Expected results:
RHEL5:
/usr/sbin/semodule -i /etc/tomcat6/selinux/packages/tomcat6/tomcat6.pp 2>/dev/null ||:
/usr/sbin/semodule -i /etc/tomcat7/selinux/packages/tomcat7/tomcat7.pp 2>/dev/null ||:
RHEL6:
/usr/sbin/semodule -i /etc/tomcat6/selinux/packages/tomcat6/tomcat6.pp 2>/dev/null ||:
/usr/sbin/semodule -i /etc/tomcat6/selinux/packages/tomcat7/tomcat7.pp 2>/dev/null ||:

Comment 1 Weinan Li 2013-06-05 07:54:09 UTC
Confirmed with Jean-Frederic, this one is fixed.

Comment 2 Michal Haško 2013-06-06 13:22:04 UTC
VERIFIED on:
tomcat6-6.0.37-3_patch_01.ep6.el6
tomcat6-6.0.37-3_patch_01.ep6.el5
tomcat7-7.0.40-1_patch_01.ep6.el6
tomcat7-7.0.40-2_patch_01.ep6.el5