Bug 1198307

Summary: Cannot build foreman-selinux on RHEL 7.1
Product: Red Hat Satellite Reporter: Jason Montleon <jmontleo>
Component: SELinuxAssignee: Lukas Zapletal <lzap>
Status: CLOSED ERRATA QA Contact: Corey Welton <cwelton>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: bbuckingham, cwelton, mmccune
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-12 05:28:36 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:
Bug Depends On: 1202695    
Bug Blocks:    

Description Jason Montleon 2015-03-03 18:50:16 UTC
Description of problem:
Error is:
+ make NAME=targeted -f /usr/share/selinux/devel/Makefile DISTRO=rhel7
Compiling targeted foreman module
foreman.te:394: Warning: miscfiles_read_certs() has been deprecated, please use miscfiles_read_generic_certs() instead.
/usr/bin/checkmodule:  loading policy configuration from tmp/foreman.tmp
foreman.te":148:ERROR 'unknown type httpd_foreman_script_t' at token ';' on line 4713:
#line 148
	typeattribute httpd_foreman_script_t syslog_client_type;
/usr/bin/checkmodule:  error(s) encountered while parsing configuration
make: *** [tmp/foreman.mod] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.yn94cK (%build)
RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.yn94cK (%build)
Child returncode was: 1
EXCEPTION: Command failed. See logs for output.
 # ['bash', '--login', '-c', 'rpmbuild -bb --target noarch --nodeps builddir/build/SPECS/foreman-selinux.spec']
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/mockbuild/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.6/site-packages/mockbuild/util.py", line 345, in do
    raise mockbuild.exception.Error, ("Command failed. See logs for output.\n # %s" % (command,), child.returncode)
Error: Command failed. See logs for output.
 # ['bash', '--login', '-c', 'rpmbuild -bb --target noarch --nodeps builddir/build/SPECS/foreman-selinux.spec']
LEAVE do --> EXCEPTION RAISED

Version-Release number of selected component (if applicable):
foreman-selinux-1.7.2.9-1.el7sat

foreman-selinux-1.7.2.9-1.el6_6sat built OK.

Comment 2 Lukas Zapletal 2015-03-17 08:53:20 UTC
Regression for RHEL 7.1, reported as https://bugzilla.redhat.com/show_bug.cgi?id=1202695

Comment 3 Lukas Zapletal 2015-03-17 08:58:17 UTC
Ugly workaround is to comment out:

logging_send_syslog_msg(httpd_foreman_script_t)

Because this is unused in the default configuration I think.

Comment 4 Jason Montleon 2015-03-19 19:59:28 UTC
This is breaking anywhere httpd_foreman_script_t is. Can I comment out all 7 lines without breaking the policy?

Comment 6 Jason Montleon 2015-03-20 12:54:53 UTC
This is the new one:
Compiling targeted foreman module
foreman.te:376: Warning: miscfiles_read_certs() has been deprecated, please use miscfiles_read_generic_certs() instead.
/usr/bin/checkmodule:  loading policy configuration from tmp/foreman.tmp
foreman.te":196:ERROR 'unknown type httpd_foreman_script_exec_t' at token ';' on line 5817:
#line 196
	allow passenger_t httpd_foreman_script_exec_t:dir { getattr search open };
/usr/bin/checkmodule:  error(s) encountered while parsing configuration
make: *** [tmp/foreman.mod] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.vcRTxX (%build)
RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.vcRTxX (%build)
Child returncode was: 1
EXCEPTION: Command failed. See logs for output.
 # ['bash', '--login', '-c', 'rpmbuild -bb --target noarch --nodeps builddir/build/SPECS/foreman-selinux.spec']
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/mockbuild/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.6/site-packages/mockbuild/util.py", line 345, in do
    raise mockbuild.exception.Error, ("Command failed. See logs for output.\n # %s" % (command,), child.returncode)
Error: Command failed. See logs for output.
 # ['bash', '--login', '-c', 'rpmbuild -bb --target noarch --nodeps builddir/build/SPECS/foreman-selinux.spec']
LEAVE do --> EXCEPTION RAISED

Comment 10 Mike McCune 2015-03-20 21:46:17 UTC
moving back to MODIFIED as we had to roll this back for :

https://bugzilla.redhat.com/show_bug.cgi?id=1204301

Comment 11 Lukas Zapletal 2015-03-23 08:48:25 UTC
Unfortunately upstream fix was not yet merged and properly tested. There was an issue.

Jason this line should not have been deleted:

manage_files_pattern(passenger_t, foreman_log_t , foreman_log_t)

Comment 13 Mike McCune 2015-03-26 04:09:01 UTC
QE:

I don't think there is anything to test here, more of a dev task.

If you want you can verify that your systems get:

foreman-selinux-1.7.2.13-1

nothing todo beyond that.

Comment 14 Corey Welton 2015-03-26 18:24:45 UTC
Verified in Satellite-6.1.0-RHEL-7-20150324.0

Comment 15 Bryan Kearney 2015-08-11 13:32:41 UTC
This bug is slated to be released with Satellite 6.1.

Comment 16 errata-xmlrpc 2015-08-12 05:28:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:1592