FS#34300 - [namcap] False positive on Mach-O universal binary

Attached to Project: Arch Linux
Opened by Alain Kalker (ackalker) - Wednesday, 13 March 2013, 16:25 GMT
Last edited by Jelle van der Waa (jelly) - Friday, 11 August 2023, 15:51 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Rémy Oudompheng (remyoudompheng)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

After building factor-git from AUR:
https://aur.archlinux.org/packages.php?ID=26114
and checking the built package with namcap, I get the error:

factor-git E: Dependency java-environment detected and not included (found class files usr/lib/factor/extra/macho/a2.macho)

The file is indeed a Mach-O universal binary file (named as such and reported as such by `file`).

This is because namcap only checks for the well-known "CAFEBABE" magic but doesn't check whether the file is a Mach-O universal binary, which uses the same magic.
This is very easy to 'fix', (well, eliminate ~99.99% of false positives), see here: http://www.puredarwin.org/developers/universal-binaries , section 'Mach'

Additional info:
* package version(s)
namcap 3.2.4-2
* config and/or log files etc.


Steps to reproduce:
- Build [aur]factor or [aur]factor.git
- Run namcap on the package

Attached: the falsely identified file
   a2.macho (12.6 KiB)
This task depends upon

Closed by  Jelle van der Waa (jelly)
Friday, 11 August 2023, 15:51 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/pacman/namc ap/issues/40
Comment by Alain Kalker (ackalker) - Wednesday, 13 March 2013, 16:52 GMT
These links may be of help with porting this to Python:
http://grok.openkomodo.com/source/xref/openkomodo/trunk/src/python-sitelib/langinfo_binary.py (search for "feedface", note: need to try match for both big-endian and little-endian!)
http://grok.openkomodo.com/source/xref/openkomodo/trunk/src/python-sitelib/langinfo.py (definition of class LangInfo)
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.

Loading...