Bug 480326

Summary: Spacewalk Proxy packages start services
Product: [Community] Spacewalk Reporter: Jan Pazdziora <jpazdziora>
Component: Proxy ServerAssignee: Miroslav Suchý <msuchy>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: low    
Version: 0.4   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-17 07:09:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 456553    

Description Jan Pazdziora 2009-01-16 14:24:13 UTC
Description of problem:

Spacewalk Proxy packages start services in their %post scripts.

This is against Fedora Packaging guidelines, as stated at

  https://fedoraproject.org/wiki/Packaging/SysVInitScript
  Why don't we....
         *  start the service after installation? 
         Installations can be in changeroots, in an installer
         context, or in other situations where you don't want
         the services started. 

It also means that there is SELinux AVC denial

avc:  denied  { setattr } for  pid=2880 comm="httpd" name="rhn_proxy_broker.log" dev=dm-0 ino=64845 scontext=root:system_r:httpd_t:s0 tcontext=root:object_r:httpd_log_t:s0 tclass=file

reported during configure-proxy.sh, upon package installation.

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

spacewalk-proxy-broker-0.4.5-1.el5
spacewalk-proxy-tools-0.4.5-1.el5
spacewalk-proxy-redirect-0.4.5-1.el5

How reproducible:

Deterministic.

Steps to Reproduce:
1. rpm -q --scripts spacewalk-proxy-broker | grep /sbin/service
2. rpm -q --scripts spacewalk-proxy-tools | grep /sbin/service
3. rpm -q --scripts spacewalk-proxy-redirect | grep /sbin/service
  
Actual results:

# rpm -q --scripts spacewalk-proxy-broker | grep /sbin/service
/sbin/service httpd graceful > /dev/null 2>&1
# rpm -q --scripts spacewalk-proxy-tools | grep /sbin/service
    /sbin/service squid stop
    /sbin/service squid start
    /sbin/service httpd stop
    /sbin/service httpd start
    /sbin/service httpd graceful
# rpm -q --scripts spacewalk-proxy-redirect | grep /sbin/service
/sbin/service httpd graceful > /dev/null 2>&1

Expected results:

No service start not graceful start should be done.

Additional info:

Comment 1 Miroslav Suchý 2009-01-21 10:53:12 UTC
Fixed in f51c6110bc1c7296b3478c3110a30c9dca331e9b

Comment 2 Jesus M. Rodriguez 2009-04-14 14:12:16 UTC
Spacewalk 0.5 released.

Comment 3 Miroslav Suchý 2009-09-17 07:09:12 UTC
Spacewalk 0.5 has been released for long time ago.