[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rpm-devel
Subject:    Re: what is magic and magic.mgc?
From:       Jeff Johnson <n3npq () mac ! com>
Date:       2008-01-28 20:16:58
Message-ID: 971A640F-0ECF-4287-B685-E7438ACC2D69 () mac ! com
[Download RAW message or body]


On Jan 28, 2008, at 2:57 PM, Peter Kalbus wrote:

> the two files:
>
>   lib/rpm/magic         575804
>   lib/rpm/magic.mgc    1041280
>
> take together 1.5 mbyte.
>
> quite a lot for an embedded system.
>

magic is only used by rpmbuild. drop rpmbuild and both magic files
if bloat removal is your primary goal.

(aside) There are other quite reasonable goals like "performance" and
"reliability" that are important too, particularly wrto sqlite3 <->  
Berkeley DB.
sqlite3 is known slower, has a poorly designed schema, and has far less
usage with rpm than Berkeley DB does. I also expect that -ldb is at
least as small as sqlite when tuned for minimum footprint, not maximum
functionality as rpm does.

Otherwise, edit magic, recompile, choose whether you want raw
magic or compiled magic. rpmbuild can easily live on 1% of the
contents of what is in magic file. Deciding which 1% is the far
harder question that including all of magic avoids.

The rationale for carrying magic within rpm is somewhat obscure.
Since strings from magic end-up in rpm packages, rpm carries
its own magic in order to guarantee reliable results from rpmbuild.
The contents of /etc/magic applied to all possible files using system  
magic
are too unpredictable for rpmbuild.

> when are they used?
> can they be deleted on an embedded system?
>
>

hth

73 de Jeff

______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
Developer Communication List                        rpm-devel@rpm5.org
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic