[maemo-users] [maemo-users] Packages, Plan9; Re: Re: Bricked a third time

From: Danny Milosavljevic danny_milo at yahoo.com
Date: Tue Feb 13 20:26:09 EET 2007

On Tue, 13 Feb 2007 16:00:58 +0100, Aniello Del Sorbo wrote:
> I mean, if my apps need to be called as "helloworld" and it looks at a 
> conf file called "helloword.conf", why I have to copy the executable in 
> /usr/bin and the conf file in /etc while I can just copy it to 
> /usr/local/bin (owned or writable by 'user) and the conf file in 
> /usr/local/etc  ? (just to give an example) and add /usr/local/bin to 
> the path?

Sigh. This is hard learning for us GNU/Linux people and I don't see the possibility of someone unilaterally fixing the problem (or most people even acknowledging that there is one).

Some tried: http://cr.yp.to/slashpackage.html

If that challenge were ever to be met, there would need to be a FHS-like entity saying "you do this or else you don't get to be compliant". 
But the pain needs to get a lot worse first.

btw: Plan9 does union mounts (don't hold me on the actual commands, this is from memory):

bind /n/package1/bin/ /bin/
bind /n/package2/bin/ /bin/
bind /n/package3/bin/ /bin/


In the end, /bin/ is a directory "containing" (logically) all nodes contained in /n/package1/bin/ , all of /n/package2/bin/ and all of /n/package3/bin/ .
You can even bind another directory and let it hide stuff underneath.
(Writes go to the "last" directory physically)

These bindings are per-process (which implies per-user) (inheritable to children), so every process could have another view of the system.

This ensures nice segregation of packages so they don't step on each other's toes (they still can, by naming their executables the same - although just do "/n/package1/bin/foo" then) and does away with the dreaded "/usr" / "/var" / "${HOME}/config" special case stuff:
Because one can bind a read-write overlay on a read-only directory, configuration can be stored right where it belongs, too (and be per process or user or mixed, nevertheless).

Note there is no $PATH. If you want it to be globally executable, bind it into /bin/ . Otherwise call using full path (don't worry, there are no strange parts in the path, so it's not bad)

Doesn't seem to have caught on much.

> When the apps is build for Maemo you just need to pass 
> --prefix=/usr/local to the ./configure command and the app should know 
> where to look for the conf file.

Back in the days, when everything was better and the world was perfect and it rained bread, we called that prefix "/opt/<package-name>/". Seems to have fallen out of favour lately since almost every GNU/Linux reverted to let's-mess-everything-into-usr-lib style.

Note that a package which didn't support "--prefix" (and DESTDIR) wouldn't even build on a modern distribution like Gentoo Linux, so source packages not accepting "--prefix" probably don't have much exposure.

The real problem, of course, is, that people try to install whatever binary package they can get, from any of the 350 debian distributions and expect it to work.

> I don't see why it should limit somehow the exensibility of the device.

Well, some things need root. Init scripts, kernel modules, messing with ifconfig, creating special files...


More information about the maemo-users mailing list