Bug 594083
Summary: | file cannot recognize a python script | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Milos Malik <mmalik> | ||||||
Component: | file | Assignee: | Jan Kaluža <jkaluza> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Milos Malik <mmalik> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 6.0 | CC: | ovasik | ||||||
Target Milestone: | rc | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | file-5.04-6.el6 | Doc Type: | Bug Fix | ||||||
Doc Text: |
Prior to this update, the file utility could be unable to recognize Python scripts correctly. This update improves the file type recognition, and Python scripts are now identified as expected.
|
Story Points: | --- | ||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2011-02-09 12:30:05 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: | |||||||||
Attachments: |
|
Description
Milos Malik
2010-05-20 14:21:17 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux major release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Major release. This request is not yet committed for inclusion. The same issue but another package: # rpm -q file file-5.04-4.el6.i686 # rpm -q setroubleshoot-plugins setroubleshoot-plugins-2.1.51-1.el6.noarch # rpm -ql setroubleshoot-plugins | grep '\.py$' | xargs file /usr/share/setroubleshoot/plugins/__init__.py: ASCII text /usr/share/setroubleshoot/plugins/allow_cvs_read_shadow.py: HTML document text /usr/share/setroubleshoot/plugins/allow_daemons_dump_core.py: ASCII Pascal program text /usr/share/setroubleshoot/plugins/allow_execheap.py: HTML document text /usr/share/setroubleshoot/plugins/allow_execmod.py: HTML document text /usr/share/setroubleshoot/plugins/allow_execstack.py: HTML document text /usr/share/setroubleshoot/plugins/allow_ftpd_anon_write.py: ASCII Pascal program text /usr/share/setroubleshoot/plugins/allow_ftpd_full_access.py: ASCII Pascal program text /usr/share/setroubleshoot/plugins/allow_ftpd_use_cifs.py: HTML document text /usr/share/setroubleshoot/plugins/allow_ftpd_use_nfs.py: ASCII Pascal program text /usr/share/setroubleshoot/plugins/allow_httpd_anon_write.py: ASCII Pascal program text /usr/share/setroubleshoot/plugins/allow_httpd_sys_script_anon_write.py: ASCII Pascal program text /usr/share/setroubleshoot/plugins/allow_java_execstack.py: HTML document text /usr/share/setroubleshoot/plugins/allow_kerberos.py: ASCII Pascal program text /usr/share/setroubleshoot/plugins/allow_mount_anyfile.py: ASCII Pascal program text /usr/share/setroubleshoot/plugins/allow_mplayer_execstack.py: HTML document text /usr/share/setroubleshoot/plugins/allow_nfsd_anon_write.py: ASCII Pascal program text /usr/share/setroubleshoot/plugins/allow_postfix_local_write_mail_spool.py: ASCII Pascal program text /usr/share/setroubleshoot/plugins/allow_rsync_anon_write.py: ASCII Pascal program text /usr/share/setroubleshoot/plugins/allow_saslauthd_read_shadow.py: ASCII Pascal program text /usr/share/setroubleshoot/plugins/allow_smbd_anon_write.py: ASCII Pascal program text /usr/share/setroubleshoot/plugins/allow_ypbind.py: ASCII Pascal program text /usr/share/setroubleshoot/plugins/allow_zebra_write_config.py: ASCII Pascal program text /usr/share/setroubleshoot/plugins/automount_exec_config.py: ASCII Pascal program text /usr/share/setroubleshoot/plugins/bind_ports.py: ASCII Pascal program text /usr/share/setroubleshoot/plugins/catchall.py: HTML document text /usr/share/setroubleshoot/plugins/catchall_boolean.py: ASCII Pascal program text ... Another reproducer: # rpm -q file file-5.04-4.el6.i686 # rpm -q m2crypto m2crypto-0.20.2-5.el6.i686 # rpm -ql m2crypto | grep \.py$ | xargs file | grep -v python | tr -s ' ' /usr/share/doc/m2crypto-0.20.2/demo/Zope/ZServer/HTTPS_Server.py: ASCII English text /usr/share/doc/m2crypto-0.20.2/demo/Zope/ZServer/__init__.py: ASCII English text /usr/share/doc/m2crypto-0.20.2/demo/Zope/z2s.py: ASCII English text /usr/share/doc/m2crypto-0.20.2/demo/medusa/asynchat.py: ASCII English text /usr/share/doc/m2crypto-0.20.2/demo/medusa/asyncore.py: ASCII English text /usr/share/doc/m2crypto-0.20.2/demo/medusa/auth_handler.py: ASCII Java program text /usr/share/doc/m2crypto-0.20.2/demo/medusa/counter.py: ASCII C++ program text /usr/share/doc/m2crypto-0.20.2/demo/medusa/default_handler.py: ASCII Java program text /usr/share/doc/m2crypto-0.20.2/demo/medusa/filesys.py: ASCII C++ program text /usr/share/doc/m2crypto-0.20.2/demo/medusa/ftp_server.py: ASCII English text /usr/share/doc/m2crypto-0.20.2/demo/medusa/http_date.py: ASCII Java program text /usr/share/doc/m2crypto-0.20.2/demo/medusa/logger.py: ASCII Java program text /usr/share/doc/m2crypto-0.20.2/demo/medusa/m_syslog.py: ASCII English text /usr/share/doc/m2crypto-0.20.2/demo/medusa/medusa_gif.py: ASCII English text, with very long lines /usr/share/doc/m2crypto-0.20.2/demo/medusa/mime_type_table.py: ASCII text /usr/share/doc/m2crypto-0.20.2/demo/medusa/poison_handler.py: HTML document text /usr/share/doc/m2crypto-0.20.2/demo/medusa/producers.py: ASCII Java program text /usr/share/doc/m2crypto-0.20.2/demo/medusa/put_handler.py: ASCII Java program text /usr/share/doc/m2crypto-0.20.2/demo/medusa/redirecting_handler.py: ASCII Java program text /usr/share/doc/m2crypto-0.20.2/demo/medusa/status_handler.py: HTML document text /usr/share/doc/m2crypto-0.20.2/demo/medusa/virtual_handler.py: ASCII Java program text /usr/share/doc/m2crypto-0.20.2/demo/medusa/xmlrpc_handler.py: ASCII Java program text /usr/share/doc/m2crypto-0.20.2/demo/medusa054/counter.py: ASCII C++ program text /usr/share/doc/m2crypto-0.20.2/demo/medusa054/default_handler.py: ASCII Java program text /usr/share/doc/m2crypto-0.20.2/demo/medusa054/filesys.py: ASCII C++ program text /usr/share/doc/m2crypto-0.20.2/demo/medusa054/ftp_server.py: ASCII English text /usr/share/doc/m2crypto-0.20.2/demo/medusa054/http_date.py: ASCII Java program text /usr/share/doc/m2crypto-0.20.2/demo/medusa054/logger.py: ASCII Java program text /usr/share/doc/m2crypto-0.20.2/demo/medusa054/m_syslog.py: ASCII English text /usr/share/doc/m2crypto-0.20.2/demo/medusa054/medusa_gif.py: ASCII English text, with very long lines /usr/share/doc/m2crypto-0.20.2/demo/medusa054/poison_handler.py: HTML document text /usr/share/doc/m2crypto-0.20.2/demo/medusa054/producers.py: ASCII English text /usr/share/doc/m2crypto-0.20.2/demo/medusa054/status_handler.py: HTML document text /usr/share/doc/m2crypto-0.20.2/demo/medusa054/xmlrpc_handler.py: ASCII Java program text /usr/share/doc/m2crypto-0.20.2/demo/pkcs7/test.py: ASCII Java program text /usr/share/doc/m2crypto-0.20.2/demo/ssl/http_cli_20.py: ASCII Java program text /usr/share/doc/m2crypto-0.20.2/demo/tinderbox/build_lib.py: ASCII English text /usr/share/doc/m2crypto-0.20.2/demo/tinderbox/killableprocess.py: ASCII English text /usr/share/doc/m2crypto-0.20.2/demo/tinderbox/winprocess.py: ASCII English text /usr/share/doc/m2crypto-0.20.2/demo/x509/proxylib.py: ASCII English text /usr/share/doc/m2crypto-0.20.2/tests/fips.py: ASCII text Created attachment 452058 [details]
file patch
Adds "string/t" directive, so "string" can be used also for text-based formats like Python. This patch is already accepted by upstream.
Created attachment 452059 [details]
updated python, diff magic file
Adds new magic patterns for Python and unified diff, which improves Python recognition, but it will never be 100%.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Prior to this update, the file utility could be unable to recognize Python scripts correctly. This update improves the file type recognition, and Python scripts are now identified as expected. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0204.html |