Bug 969002 - [EWS-2.0.1-ER2] Error in postinstall scriptlet for tomcat6 and tomcat7 rpm
[EWS-2.0.1-ER2] Error in postinstall scriptlet for tomcat6 and tomcat7 rpm
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Web Server 2
Classification: JBoss
Component: tomcat6, tomcat7 (Show other bugs)
2.0.1
Unspecified Unspecified
unspecified Severity urgent
: ---
: 2.0.1
Assigned To: David Knox
Libor Fuka
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-30 08:47 EDT by Michal Haško
Modified: 2015-11-01 19:18 EST (History)
7 users (show)

See Also:
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 07:58:43 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michal Haško 2013-05-30 08:47:43 EDT
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 03:54:09 EDT
Confirmed with Jean-Frederic, this one is fixed.
Comment 2 Michal Haško 2013-06-06 09:22:04 EDT
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

Note You need to log in before you can comment on or make changes to this bug.