Dependency handling and activating modules

Post here if you are a new Porteus member and you're looking for some help.
paldepind
Ronin
Ronin
Posts: 3
Joined: 03 Aug 2011, 12:19
Location: Denmark

Dependency handling and activating modules

Post#1 by paldepind » 03 Aug 2011, 12:45

The documentation for Porteus is great. But I couldn't find the answers to the following questions. I hope you'll take the time to answer them.

How does module activating work? Is the squashfs union mounted at root? Or something else? Is it different than in Tiny Core Linux?

What happens if a user activates a module that requires other modules to run (it has dependencies)? Are they automatically activated too?

Porteus is based on Slackware. But they don't share package manager or package format as far as I can see. Then what is the similarities? What is the Slackware heritage in Porteus?

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Dependency handling and activating modules

Post#2 by Ahau » 03 Aug 2011, 14:21

Welcome, paldepind!

Module activation works by mounting the module on a loop-back device and adding it as a new branch in aufs (so, yes, it is union mounted at root). For more specific details (if you are inclined) you can read the 'activate' script in /opt/porteus-scripts. I'm not familiar with how Tiny Core Linux works...

If a user simply activates a module with the 'activate' script (or, double clicking on the module from a GUI file manager), then dependencies are not automatically activated (unless they are included as a part of the module). The user would need to manually find and activate any dependency modules in this case. However, the PPM tool (Porteus Package Manager) automates the downloading and activation of dependencies; so, if you use PPM to activate a module (that was also downloaded with PPM), then the dependencies will be activated as well.

Which Slackware package manager are you referring to? As far as I know, there is not an official package manager for Slackware (but, I'm not Slack expert). Porteus includes the slackyd package manager, and the vast majority of Porteus packages come from slackware (they are in .txz format, and merged into base modules or user modules). The startup scripts (once you've completed the linux-live stage) are also based on Slackware. The current version of PPM is also capable of downloading .txz's from the Slackware repo and converting them into Porteus modules, and it sounds like the next version will even allow creating Porteus modules out of sbopkg packages.
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Dependency handling and activating modules

Post#3 by fanthom » 03 Aug 2011, 14:33

welcome on board paldepind :)

How does module activating work? Is the squashfs union mounted at root?
first a directory (module name) is created in /mnt/live/memory/images/ folder. then xzm is mounted with simple 'mount -o loop module.xzm directory' command. the last step is to insert directory as a read-only aufs branch into root "/" :

Code: Select all

mount -n -o remount,add:1:$2=rr aufs $1
# $1 = union absolute path (starting with /)
# $2 = path to data directory
Is it different than in Tiny Core Linux?
excuse my ignorance but i dont know how Tiny Core Linux works :oops:

What happens if a user activates a module that requires other modules to run (it has dependencies)? Are they automatically activated too?
original idea of modules is to provide a 'bundles' (all libs included in the xzm) so no extra deps would be required. Porteus is moving away from assumption as it carries troubles in case of doing updates (all libraries would have to be updated in every bundle separately) and huge module size.
our 32bit maintainer - brokenman is working on 'Porteus Package Manager' which in next version supposed to look after dependency handling during activation and deactivation.

What is the Slackware heritage in Porteus?
Porteus in reality is a "live" version of Slackware. majority of packages comes from official Slackware repo - check /var/log/packages for details. we are using original (but modified) SysVinit scripts, pkg-tools, etc. Porteus also comes from Slax so you will find here live tools and libs developed by Tomas Matejicek as well.

If you have another questions - feel free to ask.

EDIT:\\
damn! Ahau was faster :)
Please add [Solved] to your thread title if the solution was found.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Dependency handling and activating modules

Post#4 by Ahau » 03 Aug 2011, 14:37

I might have been faster, but you were more correct and thorough :P
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Dependency handling and activating modules

Post#5 by francois » 03 Aug 2011, 16:13

Welcome on Porteus forum Paldepind :)

For more information on slackyd package managere and porteus:
http://porteus.org/forum/viewtopic.php?f=48&t=142

If you want to install slapt-get or gslapt on porteus:
http://porteus.org/forum/viewtopic.php?f=53&t=115

For sbopkg package manager and porteus:
http://porteus.org/forum/viewtopic.php?f=53&t=680

There has been a lot of thinking on the Porteus forum about package management:
http://porteus.org/forum/viewtopic.php?f=53&t=516
Prendre son temps, profiter de celui qui passe.

paldepind
Ronin
Ronin
Posts: 3
Joined: 03 Aug 2011, 12:19
Location: Denmark

Re: Dependency handling and activating modules

Post#6 by paldepind » 03 Aug 2011, 21:05

Thanks a lot for the warm welcome and the helpful answers! :D
Ahau wrote:Welcome, paldepind!
For more specific details (if you are inclined) you can read the 'activate' script in /opt/porteus-scripts.
Nice! I've been looking for it.
Ahau wrote:Which Slackware package manager are you referring to? As far as I know, there is not an official package manager for Slackware (but, I'm not Slack expert).
You're right. I didn't know that.

I'm surprised you don't know about Tiny Core Linux. As far as i can figure out the TCL way of doing things is very similar to Porteus. Tiny Core does not get 'installed' in the same way as Porteus doesn't. On boot it loads itself completely into RAM. Extensions (corresponding to modules) can either be loaded on boot or on demand like in Porteus.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Dependency handling and activating modules

Post#7 by Ahau » 03 Aug 2011, 22:14

you're welcome :)

I know about TinyCore, I've looked into it a little, but I have never installed it or looked 'under the hood'.
Please take a look at our online documentation, here. Suggestions are welcome!

Post Reply