WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Packagers watchout for not using mksquashfs "correctly"  (Read 2964 times)

Offline helander

  • Full Member
  • ***
  • Posts: 183
Packagers watchout for not using mksquashfs "correctly"
« 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

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Packagers watchout for not using mksquashfs "correctly"
« Reply #1 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.
« Last Edit: January 09, 2010, 07:30:49 AM by Jason W »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Packagers watchout for not using mksquashfs "correctly"
« Reply #2 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  

Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline SvOlli

  • Full Member
  • ***
  • Posts: 193
  • Linux Developer
Re: Packagers watchout for not using mksquashfs "correctly"
« Reply #3 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.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Packagers watchout for not using mksquashfs "correctly"
« Reply #4 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.