RPM Community Forums

Mailing List Message of <rpm-users>

Re: RPM Stub Package

From: Jeff Johnson <n3npq@mac.com>
Date: Thu 21 Jul 2011 - 15:55:04 CEST
Message-id: <101328A1-56CA-4CB9-89F1-C2AAA0C364FF@mac.com>

On Jul 21, 2011, at 9:25 AM, Miller, Vincent (Rick) wrote:

> Thanks again, Jeff.
> 
> 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…
> 

Yes: every distro in their insistence of changing /etc/magic to Something Else Instead
has done something different and so RPM breaks repeatedly and is forced to
some painfully complex QA on myriad platforms for no real purpose.

(aside)
RPM used to include file(1) and -lmagic and /usr/lib/rpm/magic* to avoid exactly
this failure mode. But these days "Have it your own way!" and complaints
of Bloat! Bloat! Bloat! have forced file(1) and -lmagic out of rpm. I change
rpm to attempt please the maximum no. of people even when the results
are quite predictable.

Anyways there's a macro to set the path to file magic:

	$ rpm --showrc | grep magic
	-14: _rpmfc_magic_path	/usr/share/misc/magic.mgc

I forget whether rpmdeps reads all of rpm's macros (it certainly
needs very little of the 500+ macrtos that vendors have chosen
to force rpm to carry around). If setting the macro doesn't "fix"
the path to magic, you will need to recompile and specify

	$ ./configure --help | grep magic
	  --with-file=ARG         build with File (magic) library
	  --with-path-magic=ARG   build with RPM magic file path (or macro)
so that the default (when the macro isn't specified) can find the needed
file.

hth

73 de Jeff
Received on Thu Jul 21 15:55:37 2011
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.