Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: helander on January 09, 2010, 07:07:17 AM

Title: Packagers watchout for not using mksquashfs "correctly"
Post by: helander on January 09, 2010, 07:07:17 AM
When creating a tcz with mksquashfs you should make sure that you delete any existing package with the same name in the directory where you create the new one. In case not mksquashfs will append your new data to the existing archive, but it will place it under a different path, e.g. things to be put under /usr will be placed under /usr_1 etc. This means that the archive will contain both the old and the new data, the size of the archive will not be doubled since must of the data in the two trees are identical and the compression takes care of representing identical data just once. However since the newest data will be located under /usr_1 this is not the data that will be available once the package is installed, but the oldest tree in the archive (the /usr tree) will be the data used in the running system.

I noticed this on the most recently submitted qt-4 packages, so they ought to be rebuilt.

Kind Regards

Lars
Title: Re: Packagers watchout for not using mksquashfs "correctly"
Post by: Jason W on January 09, 2010, 07:17:01 AM
When using mksquashfs in scripts, I would advise using the "-noappend" option to prevent this.

Code: [Select]
mksquashfs dir/ extension.tcz -noappend

EDIT: In fact, instead of the audit script only creating .list files if they don't exist, I will create the list files every time and check for the presense of a "*_1" directory to catch this in the event that it happens.
Title: Re: Packagers watchout for not using mksquashfs "correctly"
Post by: bmarkus on January 09, 2010, 08:29:25 AM
Another solution I'm using my build scripts:

Quote
###################################################
# Create base extension in temp dir              
###################################################

cd $TMPDIR
cd ..
mksquashfs $TMPDIR $EXTNAM.tcz
cd $TMPDIR
find usr -not -type d > $EXTNAM.list
mv ../$EXTNAM.tcz .

# Create md5 file

md5sum $EXTNAM.tcz > $EXTNAM.tcz$.md5.txt

# Cleanup temp directory

rm -r -f usr  

Title: Re: Packagers watchout for not using mksquashfs "correctly"
Post by: SvOlli on January 09, 2010, 09:01:41 AM
tcbuild has been updated to fix this one. Anyone using it should run a "git pull". Thanks for the hint. New qt-4.5 is building right now.
Title: Re: Packagers watchout for not using mksquashfs "correctly"
Post by: Jason W on January 09, 2010, 09:25:38 PM
The fixed qt packages are uploaded.  No need to reannounce all 9 of them but they are fixed.