Bug 1247039 - Creating selinux-policy manpages is broken
Creating selinux-policy manpages is broken
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: policycoreutils (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity urgent
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks: 815137 1076441
  Show dependency treegraph
 
Reported: 2015-07-27 04:13 EDT by Lukas Vrabec
Modified: 2015-09-04 15:45 EDT (History)
4 users (show)

See Also:
Fixed In Version: 2.4-12.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-04 15:45:22 EDT
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 Lukas Vrabec 2015-07-27 04:13:49 EDT
Description of problem:
Creating selinux-policy manpages is broken. 

Version-Release number of selected component (if applicable):
policycoreutils-2.4-5.fc24.x86_64

How reproducible:
always

Steps to Reproduce:
1. sepolicy manpage -a


Actual results:
Cannot create manpages during selinux-policy package build process

Expected results:
Can create manpages using sepolicy generate

Additional info:
[root@rawhide selinux-policy]# sepolicy manpage -a
Traceback (most recent call last):
  File "/usr/bin/sepolicy", line 644, in <module>
    args.func(args)
  File "/usr/bin/sepolicy", line 320, in manpage
    m = ManPage(domain, path, args.root,args.source_files, args.web)
  File "/usr/lib64/python3.4/site-packages/sepolicy/manpage.py", line 389, in __init__
    self._gen_bools()
  File "/usr/lib64/python3.4/site-packages/sepolicy/manpage.py", line 417, in _gen_bools
    domainbools, bools = get_bools(t)
  File "/usr/lib64/python3.4/site-packages/sepolicy/__init__.py", line 854, in get_bools
    for i in [x['boolean'] for x in [x for x in search([ALLOW],{'source' : setype}) if 'boolean' in x]]:
  File "/usr/lib64/python3.4/site-packages/sepolicy/__init__.py", line 854, in <listcomp>
    for i in [x['boolean'] for x in [x for x in search([ALLOW],{'source' : setype}) if 'boolean' in x]]:
TypeError: expected bytes, str found
Comment 1 Fedora Update System 2015-08-13 12:03:16 EDT
policycoreutils-2.4-9.fc23 has been submitted as an update for Fedora 23.
https://admin.fedoraproject.org/updates/policycoreutils-2.4-9.fc23
Comment 2 Fedora Update System 2015-08-14 22:19:50 EDT
Package policycoreutils-2.4-9.fc23:
* should fix your issue,
* was pushed to the Fedora 23 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing policycoreutils-2.4-9.fc23'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-13499/policycoreutils-2.4-9.fc23
then log in and leave karma (feedback).
Comment 3 Fedora Update System 2015-08-22 12:24:31 EDT
policycoreutils-2.4-10.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update policycoreutils'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-13922
Comment 4 Lukas Vrabec 2015-08-23 13:25:23 EDT
Why is this in ON_QA? 

Petr, 
Do we have any fix?
Comment 5 Lukas Vrabec 2015-08-23 14:11:47 EDT
/builddir/build/BUILDROOT/selinux-policy-3.13.1-142.fc24.x86_64/usr/share/man/man8//zos_remote_selinux.8
Traceback (most recent call last):
  File "/usr/lib64/python3.4/site-packages/sepolicy/manpage.py", line 162, in convert_manpage_to_html
    shell=True)
  File "/usr/lib64/python3.4/subprocess.py", line 620, in check_output
    raise CalledProcessError(retcode, process.args, output=output)
subprocess.CalledProcessError: Command '/usr/bin/groff -man -Thtml /builddir/build/BUILDROOT/selinux-policy-3.13.1-142.fc24.x86_64/usr/share/man/man8//naemon_selinux.8 2>/dev/null' returned non-zero exit status 127

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/sepolicy", line 647, in <module>
    args.func(args)
  File "/usr/bin/sepolicy", line 325, in manpage
    HTMLManPages(manpage_roles, manpage_domains, path, args.os)
  File "/usr/lib64/python3.4/site-packages/sepolicy/manpage.py", line 185, in __init__
    self.__gen_html_manpages()
  File "/usr/lib64/python3.4/site-packages/sepolicy/manpage.py", line 191, in __gen_html_manpages
    self._write_html_manpage()
  File "/usr/lib64/python3.4/site-packages/sepolicy/manpage.py", line 202, in _write_html_manpage
    convert_manpage_to_html((self.new_path+d.split("_selinux")[0]+".html"),self.old_path+d)
  File "/usr/lib64/python3.4/site-packages/sepolicy/manpage.py", line 164, in convert_manpage_to_html
    sys.stderr.write(e.output)
TypeError: must be str, not bytes
error: Bad exit status from /var/tmp/rpm-tmp.doXUhA (%install)
    Macro expanded in comment on line 496: # %verify(not md5 size mtime) %{_sharedstatedir}/selinux/targeted/active/modules/100/permissivedomains

    Macro expanded in comment on line 582: # %verify(not md5 size mtime) %{_sysconfdir}/selinux/minimum/modules/active/modules/permissivedomains.pp

    Bad exit status from /var/tmp/rpm-tmp.doXUhA (%install)


RPM build errors:
Comment 6 Michal Srb 2015-08-24 03:19:04 EDT
(In reply to Lukas Vrabec from comment #4)
> Why is this in ON_QA? 
> 
> Petr, 
> Do we have any fix?

The generation of man pages should be fixed in current release. However, generation of one of the man pages failed from some reason:

Command '/usr/bin/groff -man -Thtml /builddir/build/BUILDROOT/selinux-policy-3.13.1-142.fc24.x86_64/usr/share/man/man8//naemon_selinux.8 2>/dev/null' returned non-zero exit status 127

And another Py3-related bug prevent us from seeing what went wrong. I'll look into it.
Comment 7 Lukas Vrabec 2015-08-24 04:30:07 EDT
Reproducer: 

$ fedpkg clone selinux-policy
$ fedpkg mockbuild

Build ends with error from Comment 5. 

Mockbuild using following packages:

$ ls | grep policycoreutils
policycoreutils-2.4-10.fc24.x86_64.rpm
policycoreutils-devel-2.4-10.fc24.x86_64.rpm
policycoreutils-python3-2.4-10.fc24.x86_64.rpm
policycoreutils-python-utils-2.4-10.fc24.x86_64.rpm
Comment 8 Fedora Update System 2015-08-26 00:32:46 EDT
policycoreutils-2.4-10.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 10 Fedora Update System 2015-09-03 18:43:31 EDT
policycoreutils-2.4-12.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15040
Comment 11 Fedora Update System 2015-09-04 03:33:02 EDT
policycoreutils-2.4-12.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update policycoreutils'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15040
Comment 12 Fedora Update System 2015-09-04 15:45:18 EDT
policycoreutils-2.4-12.fc23 has been pushed to the Fedora 23 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.