Quoted from the website: "Hachoir is a library written in Python which allows to see and edit a binary file (or any binary stream) field per field. A field is the most basic information: a number, a string of characters, a flag (yes/no), etc. Only supported formats can be opened, it's not a magic tool. It can be used to extract some informations (eg. metadata), edit some fields of a file without original program, or convert a file from a format to another." It also comes with 4 useful console frontends: * hachoir-metadata: extract meta-datas from a file ; * hachoir-urwid: interactive file explorer using urwid (ncurses) ; * hachoir-console: display the content of a file into the console ; * hachoir-grep: search a string in a file or list all strings. The ebuild i will attach uses distutils.eclass. Only non-standard stuffs are: - copy of various test files in ${S}, so that they are not downloaded at "make test" time (for users of FEATURES=test) - building/installation of some HTML doc (it uses rst2html.py)
Created attachment 94704 [details] dev-python/hachoir/hachoir-0.5.0.ebuild
Created attachment 94712 [details, diff] dev-python/hachoir/files/hachoir-0.5.0-amd64.patch Fix for a 64 bits issue.
Created attachment 94713 [details] dev-python/hachoir/hachoir-0.5.0.ebuild Includes the above patch.
hachoir 0.5.1 is out : http://cheeseshop.python.org/pypi/hachoir :)
Created attachment 94725 [details] dev-python/hachoir/hachoir-0.5.1.ebuild Bump to 0.5.1: * Fix hachoir.bits for 64-bit CPU * Fix parsing of fragmented files in the FAT parser
ACCEPT_KEYWORDS="~amd64" emerge hachoir Calculating dependencies... done! >>> Emerging (1 of 1) dev-python/hachoir-0.5.1 to / >>> checking ebuild checksums ;-) >>> checking auxfile checksums ;-) >>> checking miscfile checksums ;-) >>> checking hachoir-0.5.1.tar.gz ;-) >>> Unpacking source... >>> Unpacking hachoir-0.5.1.tar.gz to /var/tmp/portage/hachoir-0.5.1/work >>> Source unpacked. >>> Compiling source in /var/tmp/portage/hachoir-0.5.1/work/hachoir-0.5.1 ... Error: You need setuptools Python package! It's very easy to install it, you type (as root on Linux): python ez_setup.py (hachoir has it's copy) Last version can be found at: http://peak.telecommunity.com/dist/ez_setup.py !!! ERROR: dev-python/hachoir-0.5.1 failed. Call stack: ebuild.sh, line 1539: Called dyn_compile ebuild.sh, line 939: Called src_compile hachoir-0.5.1.ebuild, line 53: Called distutils_src_compile distutils.eclass, line 38: Called die
Created attachment 94786 [details] dev-python/hachoir/hachoir-0.5.1.ebuild > >>> Compiling source in /var/tmp/portage/hachoir-0.5.1/work/hachoir-0.5.1 ... > Error: You need setuptools Python package! Whoops, right, thanks. Added to DEPEND.
Created attachment 94958 [details] dev-python/hachoir/hachoir-0.5.2.ebuild Bump to 0.5.2. The setup.py script now depends on setuptools only for the "test" command, so i've made the DEPEND optionnal.
Hachoir-0.6.0 has been released a few days ago, with numerous improvements (it is now able to add/edit/delete fields, it supports piped input, etc.). Starting with this version, the project is split in several packages: - hachoir (the core modules) - hachoir-parser (the collection of parsers) - hachoir-metadata, hachoir-urwid, hachoir-console, hachoir-grep, etc. (the various hachoir-based frontends and utilities) I will attach updated ebuilds for "dev-python/hachoir" and "dev-python/hachoir-parser" to this bug report. The one for "hachoir" is pretty simple. Only non-standard stuffs for a distutils ebuild are: - use of "make doc" to convert doc to HTML - a customized src_test() function because a full "make test" would have introduced a dep on setuptools The one for "hachoir-parser" is a bit more noisy, because of its test phase: - it requires "hachoir-metadata", but hachoir-metadata also depends on hachoir-parser and thus can't be in DEPEND (would introduce circular dep). The ebuild will unpack a local copy instead. - it also requires some sys.path forging so that hachoir-metadata can be imported. - finally, it requires numerous test cases files, hence the big SRC_URI. Also note that, compared to the 0.5.x ebuilds, i have completly dropped the "setuptools" dependency, since it is not required for installation, and no more required for the tests the ebuilds will run. If the package is installed tho, the module will still be automatically used by the setup.py files, and user will get some additional egg-info files installed. I'm not exactly found of this kind of automagic behavior in ebuilds, but i don't think it hurts in this particular case, so i've not tried to disable it. I will also open new bugs for "hachoir-metadata" and "hachoir-urwid" (this ones are probably for "app-misc"), which will depend on this report. As for the other tools, they are not really advanced-enough yet, so i won't submit their ebuild for now.
Created attachment 100961 [details] dev-python/hachoir/hachoir-0.6.0.ebuild
Created attachment 100962 [details] dev-python/hachoir-parser/hachoir-parser-0.6.0.ebuild
Hachoir core and parser 0.6.1 have been released. For both packages, bumping the 0.6.0 ebuilds is enough. Hachoir-parser-0.6.1 fixes a bug in the EXIF metadata parser (SubFile import was missing). Hachoir-0.6.1 brings the following changes: * Fix GenericString length attribute: wasn't initialized for UTF-* strings * Fix and improve FakeArray (created with fieldset.array("name")) * Add text_handler optional argument to Bits and RawBits * On name duplicate error (a field was same name already exists), add "[]" to its name instead and display an error raising an exception * Add class documentation to all types (PaddingBits, Float32, ...) * Fix reversed() code and __all__ constant in hachoir.compatiblity * Add available_types variable to hachoir.field (used by hachoir-wx)
The URL for downloading hachoir-parser testcases has changed. I will attach a 0.6.1 ebuild with the new one.
Created attachment 101717 [details] dev-python/hachoir-parser/hachoir-parser-0.6.1.ebuild
Created attachment 116296 [details] dev-python/hachoir-core/hachoir-core-0.9.0.ebuild dev-python/hachoir-core is the new name of dev-python/hachoir It's really basic (no src_test(), no doc...) but it's working :)
Created attachment 116297 [details] dev-python/hachoir-parser/hachoir-parser-0.10.0.ebuild Version 0.10.0 of hachoir-parser, using version 0.9.0 of hachoir-core. Same thing than hachoir-core : there is no src_test()
Created attachment 124761 [details] hachoir overlay after 1.0 release Here is a snapshot of my hachoir overlay after the 1.0 release of hachoir (release dates : from 28 June to 12 July, see http://hachoir.org/wiki#News ). The detail of versions and dependencies is listed at http://hachoir.org/wiki/Install/source . Now there is many apps included (hachoir-subfile, hachoir-metadata, hachoir-urwid and hachoir-wx), and a new library (hachoir-regex). I don't want to create as many entries in the bugzilla. So here are the "changelog" : - new library "hachoir-regex" (1.0.2), a "regular expression (regex) manipulation library" (no dependency) - new app "hachoir-wx" (0.1.2), a wxwidgets GUI for hachoir (depends on wxpython 2.6, hachoir-core and hachoir-parser) - new version of other libraries and apps : * hachoir-core-1.0.1 * hachoir-parser-1.0 * hachoir-metadata-1.0.1 * hachoir-subfile-0.5.2 * hachoir-urwid-1.0.1
In cvs now Thanks