| Summary: | do_package_write_rpm failed for sysvinit-inittab and update-rc.d on Fedora 15 | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Jiajun Xu <jiajun.xu> |
| Component: | core | Assignee: | Saul Wold <sgw> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Undecided | CC: | jessica.zhang, ke.yu, meta.mr.watcher, meta.watcher, sgw, wenhuax.fan |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | --- | |
BTW, if someone wants to look into the bug, following is the method to access my test machine(actually a virtual machine). ssh to vt-master.sh.intel.com with user/passwd(root/123456) then, ssh to 192.168.1.60 with user/passwd(root/123456) then, ssh to 192.168.122.90 with user/passwd(build/123456) The build environment is under /distro/poky. This fix was suggested from the yocto ML
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
Hi Saul, With this patch, the bug is fixed. |
Tree/Branch: poky/1.1_M3 commit: abdec68876ac7ce1a6d5c223d1757b7e8a14b85f Build Host: Fedora x86_64 With 1.1 M3 RC3 build, sysvinit-inittab and update-rc.d failed at do_package_write_rpm on Fedora 15. They could pass in 1.1 M2 testing. The steps to reproduce the bug: 1. On Fedora 15, get poky tree and checkout the commit as above 2. prepare poky build environment and build core-image-minimal for qemux86 Detailed log: ######## ERROR: Function 'BUILDSPEC' failed (see /distro/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/sysvinit-inittab-2.88dsf-r6/temp/log.do_package_write_rpm.32389 for further information) ERROR: Logfile of failure stored in: /distro/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/sysvinit-inittab-2.88dsf-r6/temp/log.do_package_write_rpm.32389 Log data follows: | NOTE: Creating RPM package for sysvinit-inittab-dbg | NOTE: Creating RPM package for sysvinit-inittab | NOTE: Creating RPM package for sysvinit-inittab | NOTE: Not creating empty RPM package for sysvinit-inittab-doc | NOTE: Creating EMPTY RPM Package for sysvinit-inittab-dev | NOTE: Not creating empty RPM package for sysvinit-inittab-staticdev | NOTE: Not creating empty RPM package for sysvinit-inittab-locale | ERROR: Function 'BUILDSPEC' failed (see /distro/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/sysvinit-inittab-2.88dsf-r6/temp/log.do_package_write_rpm.32389 for further information) | Building target platforms: qemuarm-poky-linux-gnu | Processing files: sysvinit-inittab-2.88dsf-r6.qemuarm | Finding Provides: /distro/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/sysvinit-inittab-2.88dsf-r6/sysvinit-inittab.requires | Finding Requires: /distro/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/sysvinit-inittab-2.88dsf-r6/sysvinit-inittab.requires | /usr/share/misc/magic, 9591: Warning: string extension `H' invalid | 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. | /distro/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/sysvinit-inittab-2.88dsf-r6/temp/run.BUILDSPEC.32389: line 82: 32418 Aborted (core dumped) rpmbuild --nodeps --short-circuit --target qemuarm-poky-linux-gnu --buildroot /distro/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/sysvinit-inittab-2.88dsf-r6/package --define '_topdir /distro/poky/build/tmp/wor NOTE: package sysvinit-inittab-2.88dsf-r6: task do_package_write_rpm: Failed ERROR: Function 'BUILDSPEC' failed (see /distro/poky/build/tmp/work/all-poky-linux/update-rc.d-0.7-r4/temp/log.do_package_write_rpm.32391 for further information) ERROR: Logfile of failure stored in: /distro/poky/build/tmp/work/all-poky-linux/update-rc.d-0.7-r4/temp/log.do_package_write_rpm.32391 Log data follows: | NOTE: Creating RPM package for update-rc.d-dbg | NOTE: Creating RPM package for update-rc.d | NOTE: Creating RPM package for update-rc.d | NOTE: Not creating empty RPM package for update-rc.d-doc | NOTE: Creating EMPTY RPM Package for update-rc.d-dev | NOTE: Not creating empty RPM package for update-rc.d-staticdev | NOTE: Not creating empty RPM package for update-rc.d-locale | ERROR: Function 'BUILDSPEC' failed (see /distro/poky/build/tmp/work/all-poky-linux/update-rc.d-0.7-r4/temp/log.do_package_write_rpm.32391 for further information) | Building target platforms: all-poky-linux-gnu | Processing files: update-rc.d-0.7-r4.all | Finding Provides: /distro/poky/build/tmp/work/all-poky-linux/update-rc.d-0.7-r4/update-rc.d.requires | Finding Requires: /distro/poky/build/tmp/work/all-poky-linux/update-rc.d-0.7-r4/update-rc.d.requires | /usr/share/misc/magic, 9591: Warning: string extension `H' invalid | 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. | /distro/poky/build/tmp/work/all-poky-linux/update-rc.d-0.7-r4/temp/run.BUILDSPEC.32391: line 82: 32411 Aborted (core dumped) rpmbuild --nodeps --short-circuit --target all-poky-linux-gnu --buildroot /distro/poky/build/tmp/work/all-poky-linux/update-rc.d-0.7-r4/package --define '_topdir /distro/poky/build/tmp/work/all-poky-linux/update-rc.d-0.7-r4' --define '_rpmdir /distro/poky/build/tmp/work/all-poky-linux/update-rc.d-0.7-r4/deploy-rpms/all' --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' --define '_use_internal_dependency_generator 0' --define '__find_requires /distro/poky/build/tmp/work/all-poky-linux/update-rc.d-0.7-r4/update-rc.d.requires' --define '__find_provides /distro/poky/build/tmp/work/all-poky-linux/update-rc.d-0.7-r4/update-rc.d.requires' --define '_unpackaged_files_terminate_build 0' --define 'debug_package %{nil}' -bb /distro/poky/build/tmp/work/all-poky-linux/update-rc.d-0.7-r4/update-rc.d.spec NOTE: package update-rc.d-0.7-r4: task do_package_write_rpm: Failed ERROR: Task 1008 (/distro/poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb, do_package_write_rpm) failed with exit code '1' Waiting for 2 active tasks to finish: 0: eglibc-2.13-r10+svnr14157 do_populate_sysroot (pid 32421) 1: bash-4.1-r2 do_patch (pid 32415) ERROR: Task 999 (/distro/poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb, do_package_write_rpm) failed with exit code '1' Waiting for 1 active tasks to finish: 0: eglibc-2.13-r10+svnr14157 do_populate_sysroot (pid 32421) NOTE: package bash-4.1-r2: task do_patch: Succeeded NOTE: package eglibc-2.13-r10+svnr14157: task do_populate_sysroot: Succeeded ERROR: '/distro/poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb' failed ERROR: '/distro/poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb' failed ########