Toggle navigation
EN
EN
DE
ES
FR
IT
UK
Help
Log In
Help
Log In
EN
EN
DE
ES
FR
IT
UK
Home
Messages
Hashtags
Subgroups
×
×
×
Close
Likes
Yocto
Messages
×
Close
Search
Single
Toggle Dropdown
Messages
Topics
Expanded
previous page
#2266
next page
Re: Magic/File problems
jani.uusi-rantala@...
#2266
I was experiencing same issue today with latest Yocto master ca394457c5d7b2cb4544de7ce2d29008ec6173ae (in Fedora R15):
| error: magic_load(ms, /usr/share/misc/magic) failed: File 5.4 supports only version 7 magic files. `/usr/share/misc/magic.mgc' is version 8
| rpmbuild.real: rpmfc.c:1154: rpmfcClassify: Assertion `mg != ((void *)0)' failed.
This seems to be a problem with rpmbuild using the wrong magic file from rpmfcClassify. This kind of simple fix in package_rpm.class appears to work:
Defines _rpmfc_magic_path variable:
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index ddbfc09..3f00857 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -822,6 +822,8 @@ python do_package_rpm () {
targetvendor = bb.data.getVar('TARGET_VENDOR', d, True)
pkgwritedir = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH}', d)
pkgarch = bb.data.expand('${PACKAGE_ARCH}', d)
+ magicfile = bb.data.expand('${STAGING_DIR_NATIVE}/usr/share/misc/magic.mgc', d)
+
bb.mkdirhier(pkgwritedir)
os.chmod(pkgwritedir, 0755)
@@ -834,7 +836,7 @@ python do_package_rpm () {
cmd = cmd + " --define '__find_provides " + outprovides + "'"
cmd = cmd + " --define '_unpackaged_files_terminate_build 0'"
cmd = cmd + " --define 'debug_package %{nil}'"
+ cmd = cmd + " --define '_rpmfc_magic_path " + magicfile + "'"
cmd = cmd + " -bb " + outspecfile
- Jani
More
×
previous page
View All 5 Messages In Topic
next page
previous page
#2266
next page
Join
yocto@lists.yoctoproject.org to automatically receive all group messages.
×
Close
Report Message
Reason
Report to Moderators
I think this message isn't appropriate for our group. The Group moderators are responsible for maintaining their community and can address these issues.
Report to Yocto Project Support
I think this violates the Terms of Service. This includes: harm to minors, violence or threats, harassment or privacy invasion, impersonation or misrepresentation, fraud or phishing.
Note:
Your email address is included with the abuse report.
×
Close
Verify Delete
Are you sure you wish to delete this message from the message archives of yocto@lists.yoctoproject.org?
This cannot be undone.
×
Close
Verify Repost
Are you sure you wish to repost this message?
More Options
More
Home
Hashtags
Subgroups
Terms
Toggle navigation
Terms
©
2023
Groups.io