WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to group tcz's into a group tcz?  (Read 4714 times)

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
How to group tcz's into a group tcz?
« on: September 18, 2009, 08:49:45 PM »
What is the easiest way to combine tcz extensions together into an application group tcz?
big pc man

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: How to group tcz's into a group tcz?
« Reply #1 on: September 18, 2009, 09:18:15 PM »
What is the easiest way to combine tcz extensions together into an application group tcz?
You mean like compiletc.tcz?

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: How to group tcz's into a group tcz?
« Reply #2 on: September 18, 2009, 10:35:36 PM »
At the present time, not all tcz extensions are in the squashfs format (it is a little different if they are in different formats.) In the future, they should all be in squashfs format.

To make a new extension, you need the squashfs-tools-4.0 extension installed.

This is how you can do it for those in the squashfs format.

mkdir -p /tmp/mnt-ext/dir2mount

Copy the extension to mnt-ext.

cd /tmp/mnt-ext
mount -o loop extension dir2mount

You can now copy and paste the contents of the extension from dir2mount to a new directory.
You can mount others in the same way and also copy and paste their contents, combining them.

In this example, the new extension will be made in /home/new-ext

mkdir -p /home/new-ext

Paste the contents from the original extensions to new-ext.

cd /home
mksquashfs new-ext/ nameofnewextension


Be aware, combining certain extensions, and using them this way, may cause malfunctions. Most should work OK. It would be helpful if anyone doing this, shares what they learn in this forum.

If you use these combined extensions, removing the original, and install additional programs, you may install dependencies which are already in the combined extensions. You will need to check them manually and delete them.
« Last Edit: September 18, 2009, 11:22:08 PM by Guy »
Many people see what is. Some people see what can be, and make a difference.

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: How to group tcz's into a group tcz?
« Reply #3 on: September 18, 2009, 11:18:15 PM »
At the present time, not all tcz extensions are in the squashfs fomat.

Most of those which aren't are available as tce extensions.

You can extract them using

tar xzf extension

You can combine them into a tcz extension using the method above.
Many people see what is. Some people see what can be, and make a difference.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: How to group tcz's into a group tcz?
« Reply #4 on: September 19, 2009, 06:08:59 AM »
When combining extensions already available in the repository place the file in /usr/tce.install indicating that they are installed, otherwise appbrowser will install them in case of dependency.

Also, make sure that such a combined extension is loaded prior other extensions. As they are loaded in alphabetic order, the easist way to use prefixes in the names like 000, 0001, ...

Another impact the upgrade tools. Of cource you have to upgrade the combined package yourself when a component is upgraded and upgrade tools will not work.
« Last Edit: September 19, 2009, 06:47:40 AM by bmarkus »
Béla
Ham Radio callsign: HA5DI

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

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: How to group tcz's into a group tcz?
« Reply #5 on: September 19, 2009, 11:25:06 AM »
When combining extensions already available in the repository place the file in /usr/tce.install indicating that they are installed, otherwise appbrowser will install them in case of dependency.
Do you mean create tcz emty files with names representing all the extensions in the group?

edit: I see this is more complicated than I thought. See http://forum.tinycorelinux.net/index.php?topic=3072.msg15760#msg15760

« Last Edit: September 19, 2009, 11:52:01 AM by bigpcman »
big pc man

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: How to group tcz's into a group tcz?
« Reply #6 on: September 19, 2009, 02:00:54 PM »
I just did an experiment to test the theory.

I combined the iptables and firewall extensions into one tcz extension.

I also combined xfe and its dependencies into one tcz extension.

In the short time since I did this, all appears to be working properly.


I used Rox to combine files, as it gives the option to merge files.
Many people see what is. Some people see what can be, and make a difference.

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: How to group tcz's into a group tcz?
« Reply #7 on: September 19, 2009, 03:14:39 PM »
I just did an experiment to test the theory.

I combined the iptables and firewall extensions into one tcz extension.

I also combined xfe and its dependencies into one tcz extension.

In the short time since I did this, all appears to be working properly.


I used Rox to combine files, as it gives the option to merge files.
I presume none of those tcz extensions had script files?

edit: But good idea guy!
« Last Edit: September 19, 2009, 03:45:18 PM by bigpcman »
big pc man

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: How to group tcz's into a group tcz?
« Reply #8 on: September 19, 2009, 03:15:57 PM »
I'm not sure if this is what you're asking, but a group of extensions could be loaded from say "load.lst" dropped into the tce directory with a "load.sh" script.  "load.sh" could be expanded so it runs with "load.sh mygroup", for example, for different lists.  

Code: [Select]
#!/bin/ash

TCEDIR="$(cat /opt/.tce_dir)"

cd $TCEDIR
FILES="$(cat load.lst)"

for I in $FILES
 do
    tce-load -i -w ${I}
 done
 exit 0
« Last Edit: September 19, 2009, 03:23:08 PM by jpeters »

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: How to group tcz's into a group tcz?
« Reply #9 on: September 19, 2009, 03:43:45 PM »
I'm not sure if this is what you're asking, but a group of extensions could be loaded from say "load.lst" dropped into the tce directory with a "load.sh" script.  "load.sh" could be expanded so it runs with "load.sh mygroup", for example, for different lists. 

Code: [Select]
#!/bin/ash

TCEDIR="$(cat /opt/.tce_dir)"

cd $TCEDIR
FILES="$(cat load.lst)"

for I in $FILES
 do
    tce-load -i -w ${I}
 done
 exit 0
Clever idea but I was trying to combine files as "guy" did. But I think tcz's with script files will trip this up.
big pc man

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: How to group tcz's into a group tcz?
« Reply #10 on: September 19, 2009, 10:56:07 PM »
All I did was combine the extensions.

I named them m-iptables.tcz and m-xfe.tcz. (This makes them easy to find when I upgrade to a newer version. I also have mybackground.tcz, myprinter.tcz, etc.)

I copied them to the tce folder, removed all of the extensions they are replacing, and rebooted the computer.

I did not do anything else.

With certain other extension it may not be this simple. With these it is.
Many people see what is. Some people see what can be, and make a difference.

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: How to group tcz's into a group tcz?
« Reply #11 on: September 20, 2009, 06:08:56 AM »
If you want to install another program after you have combined extensions into a larger one, and removed the originals, and the new program has dependencies in your combined extension.

Download the .dep file and edit it, deleting any dependencies which are not needed. Paste it to the tce folder.

When the appbrowser finds it, it won't download it, as it is already there. It will only download the dependencies in your edited list.


Another option is to create empty files in the tce directory, with the names of any extensions you have removed. If you use this method, you will get error messages during startup, so it is not ideal, but it works.
Many people see what is. Some people see what can be, and make a difference.