Bug 1479431 - Postinstall scriptlist of nagios-selinux uses wrong page for module.
Summary: Postinstall scriptlist of nagios-selinux uses wrong page for module.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: nagios
Version: epel7
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Stephen John Smoogen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-08 14:36 UTC by Mike Willis
Modified: 2018-04-12 17:46 UTC (History)
12 users (show)

Fixed In Version: nagios-4.3.4-5.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-12 17:46:54 UTC


Attachments (Terms of Use)

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.


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