Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 207722 - rpmbuild in app-arch/rpm is missing its "magic files" when file use-flag is enabled
Summary: rpmbuild in app-arch/rpm is missing its "magic files" when file use-flag is e...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Ioannis Aslanidis (RETIRED)
URL:
Whiteboard:
Keywords:
: 292511 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-01-27 18:26 UTC by Tais P. Hansen
Modified: 2010-04-15 10:28 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tais P. Hansen 2008-01-27 18:26:19 UTC
Using rpmbuild to create rpms from spec-files fails the error below when the file use-flag is enabled.

error: magic_load(ms, /usr/lib64/rpm/magic) failed: could not find any magic files!

The error disappears when using rpmbuild without the file use-flag.
Comment 1 Daniel Franke 2009-09-29 23:11:05 UTC
Having the stable packages app-arch/4.4.6-r6 and sys-apps/file-5.03 installed, I get:

error: magic_load(ms, "/usr/lib/rpm/magic") failed: could not find any magic files!

The magic-related links in /usr/lib/rpm to /usr/share/misc/file are dead as the 'file'-directory does not exist.

After upgrade to app-arch/rpm-5.1.6, packaging RPMs still doesn't work - but it fails with another (later?) error, at least.
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2009-11-14 16:15:00 UTC
*** Bug 292511 has been marked as a duplicate of this bug. ***
Comment 3 Olivier DOLE 2010-01-25 13:35:12 UTC
I have the same problem with app-arch/rpm-4.4.6-r6.
A temporary fix on my side was to fix a broken symlink manually:
cd /usr/lib/rpm
ln -sf /usr/share/misc/magic.mgc
The solution in the ebuild for "app-arch/rpm-4.4.6-r6" would be to replace in src_install() function:
dosym /usr/share/misc/file/${magic_file} /usr/lib/rpm/${magic_file}
by
dosym /usr/share/misc/${magic_file} /usr/lib/rpm/${magic_file}
Comment 4 C W Rose 2010-02-05 10:41:58 UTC
Emerging the (obsolete) file-4.23 package installs all
the expected magic files under /usr/share/misc/files.
(The current file-5.03 doesn't.)
Comment 5 Ioannis Aslanidis (RETIRED) gentoo-dev 2010-04-15 09:51:35 UTC
This does not seem to depend on the version of rpm. I reproduce the problem with app-arch/rpm-4.4.6 as well.

unknown, 0: Warning: using regular magic file `/usr/lib/rpm/magic'
error: magic_load(ms, "/usr/lib/rpm/magic") failed: could not find any magic files!
Comment 6 Ioannis Aslanidis (RETIRED) gentoo-dev 2010-04-15 10:28:48 UTC
Fixed in app-arch/rpm-4.4.6-r7.

With respect to the other versions, do symlinks even get created or should they been added to the ebuilds? Can anyone with the package already installed check?