WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Undersanding mksquashfs and *.tcz  (Read 4910 times)

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Undersanding mksquashfs and *.tcz
« on: March 05, 2011, 10:44:50 AM »
I'm trying to understand why if I create a tree structure in a directory and "mksquashfs directory package.tcz" when I go to install this package with AppBrowser-->Local---package.tcz all files become symlink to /tmp/tcloop/package/tree directory structure/ containing real file (or hardlink if I'm not mistaken).
 ??? could you tell me where am I wrong?

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Undersanding mksquashfs and *.tcz
« Reply #1 on: March 05, 2011, 10:59:13 AM »
You are not wrong, that is the intended structure.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Undersanding mksquashfs and *.tcz
« Reply #2 on: March 05, 2011, 11:01:40 AM »
In other words, by default, if the extension is on your hard drive, it is mounted to /tmp/tcloop/appname, and then those files are symlinked to the system.  That way minimal RAM is used rather then just copying the files to the main filesystem that exists in RAM.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: Undersanding mksquashfs and *.tcz
« Reply #3 on: March 05, 2011, 12:12:20 PM »
ok but this way I have problems when I can not understand the entity, time ago with xampp, I have not solved, but someone helped me with apache-mod and i skip over.
today I tried to create a package of data that I need only occasionally and should not be backup, and again I have the same problem (dokuwiki file for plugin testing), symlink dont work fine.
I realized that if I use a program ondemand (epdfview for example) this does not appear in /tmp/tcloop/appname similarly programs started in "onboot.

How could I get the same result with the packages created by me?

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Undersanding mksquashfs and *.tcz
« Reply #4 on: March 05, 2011, 01:11:13 PM »
I would recommend using the copy2fs.lst, listing your extension in it so it would get extracted to the filesystem rather than symlinked.  There are other ways of achieving the same result, but that would be the simplest and recommended one.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: Undersanding mksquashfs and *.tcz
« Reply #5 on: March 05, 2011, 02:14:03 PM »
Oh, great! i already use flag copy2fs.flg but for testing i change the dir in /opt/.tce_dir and this prevented the copy on the filesystem.
I did a first test by creating a folder in /home/tc/tce with copy2fs.flg and mypackage.tcz (but i forgot to put in ./optional), update consequently .tce_dir, but with AppBrowser-Local file is again symlink.
Secondly i copy this package in my /mnt/sdb1/tce/optional and create ondemand link with appsaudit, consequently to reboot and load, package was copied in fs and it is good to be used.
Ok, my problem was solved, but I'd still have a curiosity, it is possible that a package correctly created (and not with my limited knowledge), can not work without copy2fs.flg or copy2fs.lst??

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Undersanding mksquashfs and *.tcz
« Reply #6 on: March 05, 2011, 05:08:48 PM »
Sometimes only certain files in packages need to exist as real files in the system.  Like the firefox-bin file for Firefox, or the python executable for python.  Usually those files are copied over by the startup script. 

Files existing as symlinks normally work for most all packages.  One can also include files that need to exist as real files in a tarball that can be extracted by the startup script.  That is a lesser preferred method than using the startup script to copy files over, but it is another way.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: Undersanding mksquashfs and *.tcz
« Reply #7 on: March 06, 2011, 02:59:38 PM »
OK, this is an interesting thing to know, thanks Jason.
p.s. one of these days I have to try your script to convert deb package