RPM Community Forums

Mailing List Message of <rpm-users>

Re: RPM Stub Package

From: Jeff Johnson <n3npq@mac.com>
Date: Fri 22 Jul 2011 - 16:23:01 CEST
Message-id: <30139DDF-C224-48F2-905E-4598DA5D5CDF@mac.com>

On Jul 22, 2011, at 10:13 AM, Miller, Vincent (Rick) wrote:

> Hi Anders,
> 
> I installed sysutils/file and received an error message indicating that
> file 5.3 supports only version 7 magic files and that the one installed
> was version 8.  Perhaps this is the reason that RPM 5.2.1 did not install
> sysutils/file?
> 

If there is a version involved, then see if there isn't a way to rebuild the
*.mgc files for the distributed rules.

Checking … yes here's the file(1) option:

	-C, --compile Write a magic.mgc output file that contains a pre-parsed version of the magic file or directory.

Unless something is seriously different in modern file(1), one can simply
remove/rename the *.mgc compiled version and the plain text rules file
will be used.

Again, if you have a version mismatch in *.mgc, then there are two
versions of file(1) floating about, one that has zigged, the other zagged,
and that is a distro problem and needs a bug report as Anders suggested.

73 de Jeff

> [root@bsdsandbox2 /usr/ports/sysutils/file]# find /lib |
> /usr/local/lib/rpm/bin/rpmdeps --provides
> error: magic_load(ms, /usr/local/share/file/magic) failed: File 5.3
> supports only version 7 magic files. `/usr/local/share/file/magic.mgc' is
> version 8
> Assertion failed: (mg != NULL), function rpmfcClassify, file rpmfc.c, line
> 1132.
> Abort trap: 6 (core dumped)
> 
> ==
> 
> Vincent (Rick) Miller
> Systems Engineer
> vmiller@Verisign.com
> 
> t: 703-948-4395
> 21345 Ridgetop Cir Dulles, VA 20166
> 
> VerisignInc.com    
> 
> 
> 
> 
> 
> On 7/22/11 7:47 AM, "Anders F Björklund" <afb@rpm5.org> wrote:
> 
>> Miller, Vincent (Rick) wrote:
>> 
>>> I get an error when I attempt to run rpmdeps.  It complains of a
>>> missing magic file (see error below).  I can't say this surprises me,
>>> but I am hoping there is a simple fix, instead of recompiling/installing
>>> from ports with different optionsŠ
>>> 
>>> [root@bsdsandbox2 /home/vmiller]# find /lib |
>>> /usr/local/lib/rpm/bin/rpmdeps --provides
>>> error: magic_load(ms, /usr/local/share/file/magic) failed: could not
>>> find any magic files!
>>> Assertion failed: (mg != NULL), function rpmfcClassify, file rpmfc.c,
>>> line 1132.
>>> Abort trap: 6 (core dumped)
>>> 
>>> I think the magic file it needs is /usr/share/misc/magic
>>> 
>>> Thoughts?
>> 
>> The archivers/rpm5 port was intended to link against sysutils/file,
>> rather than the system version of libmagic that you ended up with...
>> 
>> $ /usr/bin/file --version
>> file-5.03
>> magic file from /usr/share/misc/magic
>> $ /usr/local/bin/file --version
>> file-5.05
>> magic file from /usr/local/share/file/magic
>> 
>> You should file a Problem Report (PR) against the port, or perhaps
>> just install sysutils/file and rebuild. It should match the library:
>> 
>> LIB_DEPENDS=
>> 		magic:${PORTSDIR}/sysutils/file \
>> CONFIGURE_ARGS+=
>> 		--with-path-magic=${LOCALBASE}/share/file/magic
>> 
>> --anders
>> 
>> 
>> ______________________________________________________________________
>> RPM Package Manager                                    http://rpm5.org
>> User Communication List                             rpm-users@rpm5.org
> 
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> User Communication List                             rpm-users@rpm5.org
Received on Fri Jul 22 16:23:24 2011
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.