Bug 1364114 - [abrt] setroubleshoot-server: gettext.py:76:c2py:ValueError: plural forms expression could be dangerous
Summary: [abrt] setroubleshoot-server: gettext.py:76:c2py:ValueError: plural forms exp...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: 25
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vit Mojzis
QA Contact: Fedora Extras Quality Assurance
Vit Mojzis
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:2fbb3f4e14083e4fca40553cee1...
: 1383978 1385563 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-04 13:52 UTC by Nerijus Baliūnas
Modified: 2016-12-03 10:56 UTC (History)
6 users (show)

Fixed In Version: policycoreutils-2.5-15.fc24
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-03 10:56:58 UTC


Attachments (Terms of Use)
File: backtrace (1.79 KB, text/plain)
2016-08-04 13:52 UTC, Nerijus Baliūnas
no flags Details
File: environ (1.52 KB, text/plain)
2016-08-04 13:52 UTC, Nerijus Baliūnas
no flags Details

Description Nerijus Baliūnas 2016-08-04 13:52:32 UTC
Version-Release number of selected component:
setroubleshoot-server-3.3.10-1.fc24

Additional info:
reporter:       libreport-2.7.2
cmdline:        /usr/bin/python3 -Es /usr/bin/sealert -b
executable:     /usr/bin/sealert
kernel:         4.6.3-300.fc24.x86_64
pkg_fingerprint: 73BD E983 81B4 6521
pkg_vendor:     Fedora Project
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
gettext.py:76:c2py:ValueError: plural forms expression could be dangerous

Traceback (most recent call last):
  File "/usr/lib64/python3.5/site-packages/sepolicy/__init__.py", line 21, in <module>
    codeset='utf-8')
TypeError: install() got an unexpected keyword argument 'unicode'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/sealert", line 56, in <module>
    from setroubleshoot.util import get_identity, load_plugins, log_init, log_debug
  File "/usr/lib/python3.5/site-packages/setroubleshoot/util.py", line 324, in <module>
    from sepolicy import get_all_file_types
  File "/usr/lib64/python3.5/site-packages/sepolicy/__init__.py", line 25, in <module>
    codeset='utf-8')
  File "/usr/lib64/python3.5/gettext.py", line 441, in install
    t = translation(domain, localedir, fallback=True, codeset=codeset)
  File "/usr/lib64/python3.5/gettext.py", line 426, in translation
    t = _translations.setdefault(key, class_(fp))
  File "/usr/lib64/python3.5/gettext.py", line 162, in __init__
    self._parse(fp)
  File "/usr/lib64/python3.5/gettext.py", line 297, in _parse
    self.plural = c2py(plural)
  File "/usr/lib64/python3.5/gettext.py", line 76, in c2py
    raise ValueError('plural forms expression could be dangerous')
ValueError: plural forms expression could be dangerous

Local variables in innermost frame:
plural: '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 or n%100>=20) ? 1 : 2)'
tokens: <generator object _tokenize at 0x7f3559823938>
tokenize: <module 'tokenize' from '/usr/lib64/python3.5/tokenize.py'>
danger: [TokenInfo(type=1 (NAME), string='or', start=(1, 49), end=(1, 51), line='(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 or n%100>=20) ? 1 : 2)')]
token: <module 'token' from '/usr/lib64/python3.5/token.py'>

Comment 1 Nerijus Baliūnas 2016-08-04 13:52:42 UTC
Created attachment 1187518 [details]
File: backtrace

Comment 2 Nerijus Baliūnas 2016-08-04 13:52:44 UTC
Created attachment 1187519 [details]
File: environ

Comment 3 Vit Mojzis 2016-08-05 09:04:35 UTC
There is a typo in policycoreutils/po/lt.po on line 18 (and possibly in other .po files)

"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 or n%100>=20) 

should be ("or" is considered to be an identifier by gettext):

"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20)

Comment 4 Vit Mojzis 2016-10-17 09:39:58 UTC
*** Bug 1383978 has been marked as a duplicate of this bug. ***

Comment 5 Nerijus Baliūnas 2016-10-17 09:44:53 UTC
I can't use setroubleshooter gui until this is fixed.

Comment 6 Nerijus Baliūnas 2016-10-17 09:56:42 UTC
Both lt.po and lt_LT.po in policycoreutils-2.5.tar.gz have correct form:
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n"
"%100<10 || n%100>=20) ? 1 : 2);\n"

Comment 7 Nerijus Baliūnas 2016-10-17 10:12:20 UTC
Mistake is in policycoreutils-fedora.patch.

Comment 8 Vit Mojzis 2016-10-17 15:38:59 UTC
Please try if the issue is fixed by this scratch build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=16107469

Comment 9 Vit Mojzis 2016-10-17 15:56:07 UTC
*** Bug 1385563 has been marked as a duplicate of this bug. ***

Comment 10 Nerijus Baliūnas 2016-10-17 16:37:46 UTC
Yes, it is fixed.

Comment 11 Nerijus Baliūnas 2016-11-03 22:45:11 UTC
When the update is going to be released?

Comment 12 Mike Chanslor 2016-11-17 15:31:37 UTC
I'm having this problem too. Has the update been released?

Comment 13 Fedora Update System 2016-11-22 16:52:58 UTC
libselinux-2.5-13.fc25 policycoreutils-2.5-18.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-17b60ec8d1

Comment 14 Fedora Update System 2016-11-22 22:53:32 UTC
secilc-2.5-6.fc24 checkpolicy-2.5-8.fc24 policycoreutils-2.5-15.fc24 libsemanage-2.5-6.fc24 libselinux-2.5-12.fc24 libsepol-2.5-10.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e780970d04

Comment 15 Fedora Update System 2016-11-23 23:07:34 UTC
libselinux-2.5-13.fc25, policycoreutils-2.5-18.fc25 has been pushed to the Fedora 25 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-2016-17b60ec8d1

Comment 16 Fedora Update System 2016-11-25 09:38:40 UTC
checkpolicy-2.5-8.fc24, libselinux-2.5-12.fc24, libsemanage-2.5-6.fc24, libsepol-2.5-10.fc24, policycoreutils-2.5-15.fc24, secilc-2.5-6.fc24 has been pushed to the Fedora 24 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-2016-e780970d04

Comment 17 Fedora Update System 2016-11-30 05:28:41 UTC
libselinux-2.5-13.fc25, policycoreutils-2.5-18.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2016-12-03 10:56:58 UTC
checkpolicy-2.5-8.fc24, libselinux-2.5-12.fc24, libsemanage-2.5-6.fc24, libsepol-2.5-10.fc24, policycoreutils-2.5-15.fc24, secilc-2.5-6.fc24 has been pushed to the Fedora 24 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.