Bug 1479431

Summary: Postinstall scriptlist of nagios-selinux uses wrong page for module.
Product: [Fedora] Fedora EPEL Reporter: Mike Willis <mike.willis>
Component: nagiosAssignee: Stephen John Smoogen <smooge>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel7CC: affix, athmanem, b.heden, jose.p.oliveira.oss, lemenkov, linux, ondrejj, shawn.starr, smooge, smooge, s, swilkerson
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: nagios-4.3.4-5.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-12 17:46:54 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 Mike Willis 2017-08-08 14:36:40 UTC
Description of problem:

When installing nagios-selinux the nagios_epel module is not loaded.

Version-Release number of selected component (if applicable):

nagios-selinux-4.3.2-8.el7.x86_64.rpm


Steps to Reproduce:
1. rpm -ivh nagios-selinux-4.3.2-8.el7.x86_64.rpm
2.
3.

Actual results:

nagios_epel module is not loaded.

[root@konan:production: ~]# semodule -l | grep nagios_epel
[root@konan:production: ~]# 



Expected results:

nagios_epel module is loaded. Or at least there's a message displayed indicating that it failed to load.


Additional info:

Path used to load the module in the postinstall-scriptlet is different to where the module is installed.


if [ "$1" -le "1" ]; then # Fist install
   semodule -i /usr/share/selinux/packages/nagios_epel.pp 2>/dev/null || :
   fixfiles -R nagios restore || :
   
systemctl daemon-reload >/dev/null 2>&1 || : 
if [ $1 -ge 1 ] ; then 
        # Package upgrade, not uninstall 
        systemctl try-restart nagios.service >/dev/null 2>&1 || : 
fi 

fi


[root@konan:production: ~]# rpm -ql nagios-selinux | grep nagios_epel
/usr/share/selinux/packages/nagios/nagios_epel.pp
[root@konan:production: ~]# 

It is not evident that the postinstall-script fails to load the module because errors are sent to /dev/null, which is unhelpful.

Also the postinstall scriptlet seems to have a logic flaw. How will "systemctl try-restart nagios.service" ever get called? The check for $1 being greater than 1 is inside the check for $1 being less than 1.

Comment 1 Fedora Update System 2017-11-20 23:49:15 UTC
nagios-4.3.4-5.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-e64eeb6ece

Comment 2 Fedora Update System 2017-11-21 19:32:50 UTC
nagios-4.3.4-5.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-e64eeb6ece

Comment 3 Fedora Update System 2018-04-12 17:46:54 UTC
nagios-4.3.4-5.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.