Bug 1858

Summary: Rootfs creation broken when using package_deb as primary PACKAGE_CLASSES with non Debian-OS build system
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Joshua Lock - Disabled <josh>
Component: meta-yoctoAssignee: Paul Eggleton <bluelightning>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: jessica.zhang, poky.bs.watcher, poky.watcher, richard.purdie, scott.a.garman, sgw
Version: 1.2   
Target Milestone: 1.2.1   
Hardware: x86   
OS: Multiple   
URL: [1.2]
Whiteboard: (P2)(1.2) Fix posted and queued in denzil-next
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Bug Depends on:    
Bug Blocks: 1881    
Attachments:
Description Flags
log.do_rootfs containing dpkg errors none

Description Joshua Lock - Disabled 2011-12-21 22:03:12 UTC
The apt-native package no longer correctly installs the apt.conf.sample file which means apt isn't configured to work correctly.
Comment 1 Joshua Lock - Disabled 2011-12-21 22:04:14 UTC
I've created a patch to correctly install the apt.conf.sample for use by apt-native, there are outstanding issues with rootfs creation still.

I'm working through these.
Comment 2 Joshua Lock - Disabled 2011-12-22 10:46:34 UTC
The package_deb rootfs construction works fine on an Ubuntu 11.10 test machine, but suffers all sorts of failures on a Fedora 16 system. Work is ongoing.
Comment 3 Paul Eggleton 2012-04-13 14:27:22 UTC
Fix merged to master in revision 91a77020eb175000847e493ec30196aba9fb11f2.
Comment 4 Joshua Lock - Disabled 2012-04-18 02:07:10 UTC
Created attachment 487 [details]
log.do_rootfs containing dpkg errors

This is still broken for me on Fedora 16 x86_64, see the attached log.
Comment 5 Paul Eggleton 2012-04-18 07:12:52 UTC
From the above log:
package architecture (i386) does not match system ()

Seems there were multiple problems here; for whatever reason I did not get this on the older Fedora system I was testing on.
Comment 6 Paul Eggleton 2012-04-23 09:15:42 UTC
The above warning is not significant; it appears on a working system as well.

The heart of the problem is that zlib is failing to decompress the data.tar.gz archive within the deb; however it doesn't seem to be a problem with the way either zlib or dpkg-deb are built - I copied both of these over from a known working system and they still failed. Nor does it appear to be a problem with the construction of the deb - a deb copied from the "broken" system works fine on a known working system, and additionally I was able to extract the deb by hand (using ar and tar/gunzip) without trouble on the "broken" system.
Comment 7 Paul Eggleton 2012-04-24 14:30:43 UTC
I tracked this down to an issue where fflush() was being used on an input stream, the behaviour of which is not defined by POSIX and seems to have changed in a recent version of glibc. Luckily once identified it was just a matter of backporting a fix from upstream. I've sent a patch for this which is in the denzil-next branch already:

http://lists.linuxtogo.org/pipermail/openembedded-core/2012-April/021442.html

I suspect we should update dpkg to 1.6.x soon but that's something for 1.3.