WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: SCM Basics  (Read 144599 times)

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: SCM Basics
« Reply #45 on: February 05, 2012, 09:26:55 AM »
Though I was frustrated with audacity crashing on the preferences tab, I had no trouble making a portable transmission-gtk.tcz in which all the functions seem to work, available in the scm source area as transmission-portable.tar.gz, should work when booting 'base norestore' with only X and a WM running.  I will try my hand at a few and if they are as simple then it is not a bad thing to be able to convert tczs to portable scms.  For one thing, the tczs are already built and there is no duplication of effort when a tcz is converted rather than building from scratch.  Though I intend to compile scm's and keep with that concept and not let it get lost to portability, nothing is lost if we are able to make mountable apps out of stuff in the repo. 

Offline V.Krishn

  • Newbie
  • *
  • Posts: 33
Re: SCM Basics
« Reply #46 on: February 05, 2012, 09:38:04 AM »
The initial concept of scm is ok, I guess If I am not mistaken its one step closer to being portable. Only effort is to make tcz repo re-usable.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: SCM Basics
« Reply #47 on: February 05, 2012, 09:44:08 AM »
I remain alert to every news!

Offline V.Krishn

  • Newbie
  • *
  • Posts: 33
Re: SCM Basics
« Reply #48 on: February 07, 2012, 06:49:04 AM »
I am outlining a probable method for 'scm-built' script.
Still wondering if it would work.

To Build - gtk2.scm
++++++++++++++++++++
Roll the dependencies in one, with current method as eg gtk2.scm, but build directly from tcz package.
Example:
1.Its built by mounting tcz in tmp/cairo and coping or rsyncing it into tmp/gtk2.
2.Like wise all dependencies.
3.Special scripts that runs when scm is loaded can be root or in folder /tmp/gtk2/config.
4.Folder /tmp/gtk2/scm.installed if needed.
Resulting folder structure:
 /usr
 /bin
 /etc
 ...
AND not
 /atk
 /cairo
 ...

To Install
+++++++++++
Mounted in /tmp/scm/nnn.gtk2, where nnn is last new number in /tmp/scm folders for scms.
Symlinks done similar to when installing any tcz, except the path is now to /tmp/scm/ and not /tmp/tcloop.

Symlink Method (Install)
+++++++++++++++++++++++++
1. Dynamically create 2 file, 010.gtk2.scm.list, 010.xgtk2.scm.list in /tmp/scm folder
2. If link present in any other <009.x<packages>.scm.list do not make a symlink but APPEND it to 010.xgtk2.scm.list.
3. If not present in the system already, make symlink and append it to 010.gtk2.scm.list.
4. If present APPEND it to 010.xgtk2.scm.list

Symlink Method (Un-Install)
++++++++++++++++++++++++++++
1. Unlink links in 010.gtk2.scm.list that are not present in >010.x<packages>.scm.list and NOT having keyword /tmp/tcloop in the symlink.
2. Remove 010.gtk2.scm.list, 010.xgtk2.scm.list files
3. Unmount gtk2.scm.

Hope I have not left any steps.
« Last Edit: February 07, 2012, 06:51:10 AM by V.Krishn »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: SCM Basics
« Reply #49 on: February 07, 2012, 11:26:11 AM »
V.Krishn -

It sounds like that method is basically like combining tcz's into one extension, thus eliminating having to call on dependencies, and then linking them into the shared system just like the tcz.

One issue with that is that it would cause library file conflicts since various versions of the same library, built perhaps with different options, would be in /usr/local/lib.  And also the main purpose of the scm is to have a clean mount/unmount that does not install/symlink files into the system, therefore not causing any file or library conflicts.   At least not outside of the .desktop and icon files in /usr/local/share that get linked to the system.

####

Bmarkus in the release candidate thread mentioned the existence of dependencies in the scm's in regards to their effect on the self contained format.  Here is my view, that scm's can be as dependent or not dependent on other extensions that the extension maker deems fit.  I first was including gtk2 into each gtk2 app like leafpad, but that does result in about 7mb of ram being occupied when each different scm gtk2 related app is launched.  And also the time of building gtk2 over and over for each app.  Thus the existence of gtk2.scm and gtk3.scm.  And maybe one day qt4.scm.  To me that is a good middle ground to ease the memory requirement of scm's.  And Xorg-7.6-lib is called on as a dep instead of building parts of Xorg into each extension, though those libs could be placed in the scm's lib/ path to not need that dependency. Up to the extension maker as we already host the source for Xorg.

There is a trade off between total self containment and extension size and resource use.  One can even use the gtk2.tcz and it's deps for an scm dependency, but the more dependencies you add the less benefit of being self contained.  But again, it would be up to each extension maker, there is not a hard and fast rule.   Me, I aim for three or less dependencies to keep it simple - Xorg libs, gtk2/gtk3/qt, and perhaps python or similar.  Smaller stuff gets built into the scm.   

I mentioned about making scm's out of tcz's, and I have done that for avidemux, it needs no deps but either OSS or alsa at the user's choice.  It is basically a test concept that could save a bit of work by using tips from portablelinuxapps.org.  The source is already hosted, no having to rebuild.  There are some snags I have run in to, and I don't know how far I will try to go down that path, but it is kind of neat to play with.  I will of course troubleshoot any issues with the converted scm's, and anyone let me know if they have issue with me making a self contained app out of their build.  But for those apps that convert cleanly and work without issue, it is of great help to be able to use them.

Anyway, not to ramble too much, but that is where things are at now.  I think I am taking a sensible road in regards to structure and dependencies, etc, and I am open to any ideas.

Offline V.Krishn

  • Newbie
  • *
  • Posts: 33
Re: SCM Basics
« Reply #50 on: February 07, 2012, 12:02:20 PM »
Current scm method is ok. It is also intended to run apps in its own Sandbox environment,
But I think  it can still be done through tcz. Sandbox apps in tcz would be in /opt or /apps dir and compiled as per.

Symlink Method (Install) & Symlink Method (Un-Install) does take care of loading and unloading. Let me know if some step is left.

My steps does not concern on number of Dependencies. All dependencies can be clubbed in one scm or mix-matched.
During installation the scripts just tries not to do anything with existing symlinks pointing to /tmp/tcloop.
Example:
/usr/lib/<somefile> ---> /tmp/tcloop/<somepackage>/usr/lib/<somefile>
here while making a link "/usr/lib/<somefile>" the scm install script checks if it already exists and is pointing somewhere in /tmp/tcloop. If yes its a base system installation.
« Last Edit: February 07, 2012, 12:03:57 PM by V.Krishn »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11632
Re: SCM Basics
« Reply #51 on: February 07, 2012, 12:32:52 PM »
Hi Jason W
So if I understand correctly, an scm is basically the same as how  Xampp  gets installed, except it
gets mounted as a squashed file system. All links to specific library versions and executables are
relative to the installation location to keep them out of the default path.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: SCM Basics
« Reply #52 on: February 07, 2012, 12:51:26 PM »
Rich,
Yeah, that is exactly the concept, at least in it's purest form.  I did make an Xampp.scm early on, it requires some writable space inside it and to be installed into /opt.  It required a little trickery, but it did work.  I don't have it posted though. 

Offline uggla

  • Sr. Member
  • ****
  • Posts: 438
Re: SCM Basics
« Reply #53 on: February 11, 2012, 09:01:17 PM »
I would prefer if tczs were built exactly like scms but with (many) dependencies.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: SCM Basics
« Reply #54 on: February 12, 2012, 03:46:19 AM »
uggla, do you mean just with a prefix of /apps? What would be the gain?
The only barriers that can stop you are the ones you create yourself.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: SCM Basics
« Reply #55 on: February 12, 2012, 08:33:59 AM »
uggla - if you mean building into /usr/local but also including dependencies in the same extension, that is sort of what we did early on as it was an old habit from another distro.  But then you run into file conflicts, and different library versions in the same place over writing each other, and so on.

Actually, as stated in the release candidate thread, we are no longer allowing tcz's to be dependencies of scm's.  It will get a little tricky for things that, say, need dbus, but Apple includes dbus in their self contained apps from what I understand, so it can be done.  In fact, if not allowing tczs as dependencies, we almost don't need a dep file since something like gtk2.scm or gtk3.scm can just be mentioned in the info file. 

Offline uggla

  • Sr. Member
  • ****
  • Posts: 438
Re: SCM Basics
« Reply #56 on: February 12, 2012, 08:55:33 AM »
uggla, do you mean just with a prefix of /apps? What would be the gain?

If I understand things right, this would make it possible to run different versions of the same library/application at the same time without conflicts. Installed App1 could then use Foolib1.2 while installed App2 uses Foolib2.2.

Offline beerstein

  • Hero Member
  • *****
  • Posts: 530
Re: SCM Basics
« Reply #57 on: February 14, 2012, 07:44:34 AM »
Hi:
Please can somebody help me to understand the SCM:

1. We have our extensions .tcz why do we need another extension genre anyway?

2. I read in the posts that the .scm extensions are more "portable" - what does this mean - is there an example where a portable extension is better than a "non-partable" ?

3. Can we use both extensions in one TCL setup?

4. What happens when we load both extensions from the same application?

5. Will the .tcz extensions disappear sooner or later?

Thank you for your help.
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: SCM Basics
« Reply #58 on: February 14, 2012, 10:37:12 AM »
Please read this thread from the beginning.

Offline Akane

  • Jr. Member
  • **
  • Posts: 71
    • My home server by RaspberryPi
Re: SCM Basics
« Reply #59 on: February 19, 2012, 02:39:18 AM »
Can I use .tcz extensions with .scm extensions?
Sorry for my terrible English.
Country: Japan
Interested in: HPC, low-level programming, embedded system and so on