Click to See Complete Forum and Search --> : Linux Application Registry. What do you think?


Piko
08-12-2005, 08:47 PM
I'm planning on writing a set of applications, and libraries that will allow people to load information about their application into a central XML based registry, and then this registry can be access by other application to know where the application is located, and how to uninstall it, and other informaiton. Adding to the registry can be done threw a library, and executed in C/C++ code, or you can use the command, AddToRegistry <Application Name>, and then add information threw other commands into the application name, or something like that.

The regisrty would most likely be some where in the /etc/ folder, and only root would be able to modify, edit, and remove application from the registry.

Why would all this application information in one spot be useful. You could write an application manager that would load the registry, and it could give you a list of application you installed, and also give you the ability to uninstall. Also the kmenu, or gnome menu, could load this registry, and automaticly make application shortcuts in the menu.

Now this shouldn't replace *.rpm *.deb, it should be used with source code when you do make install, a script installer, or a install binary. I consider things installed threw *.rpms on my SuSE system as system content, and happy with uninstalling them threw yast, but when I build something, then do make install, I really don't feel like keeping track of those makefiles so I can uninstall the app later, and becuase of this, I have no idea how many extra libraries, and applications I've installed threw make installs, and wish I had some way to keep track of them.

I'm going to be making the alpha, then getting a website, and letting the Linux users help me shape, and build this registry system up. By in no means would it be like windows god awful system. It just stores apps names, install paths, sybolic links, and .config folders, so they can be deleted from the home dirs, when the application gets deleted. Though it doesn't have to work that way, I'm going to write the stuff to make the regisrty, modify it, and add to it. Also I'll make an uninstall/tracking application that will use the registry, as an example of what it could be used for.

Now, even if I make it, people have to include it in their makefiles, and installers. So if no one uses it, it will become worthless. So I have a plan to make an app that can take makefiles, and automaticly make the registry values so even if the make files don't use the registry system, you can still get the information for it to work.

I know there are RPMs, and Debs, and all sorts of other methods, but not everyone makes their application too use them. This is to fill in the gap, and maybe later become the middle man for all distros.

Also for those of you worried about uninstaller that will use the registry, I plan on having my application, uninstaller/tracker, have the user approve the things that will be deleted before it does, so if the registry was screwed with, or someone has made a entry that can screw the system up, the user can see it, before my application starts removing stuff.

I would like comments, and if anyone knows of a project that is already trying to do something like this, becuase I don't want to waste time with it, if someone is already working on it.

bwkaz
08-13-2005, 09:32 AM
The Linux filesystem already does this. (Or at least, it can.)

I build everything from tarballs (because I use LFS). But I know exactly which files came from which packages, because I install each package as a separate (non-root) user. Therefore, all installed files are owned by a package-user that corresponds to their package name. So I can find out what package a file came from by doing a simple ls -l on the file, and a find / /var /home -xdev -user package-user-name will give me all files installed by a particular package.

Therefore, I have no need for a "registry" (you might do better calling it a "catalog" or something, btw) which keeps track of "folders" (they're only "folders" in windows -- they're "directories" in most other OSes) and files. The filesystem does it for me. ;)

Yes, this does mean some initial setup (creating the package users, adding them to a special "install" group, chgrp'ing and chmod'ing all directories that packages install to so that group "install" owns them, and they're group writable (and sticky, so that packages can't overwrite each other's files)), and it also means some manual intervention in certain Makefiles (because they try to install programs setuid root, or they try to explicitly set the owner to root), but I believe the benefits outweigh the costs.

maccorin
08-13-2005, 09:40 AM
google checkinstall. It's _not_ a registry, but it solves the problem you care about, and IMHO it does it in a much simpler/better way.

soulestream
08-13-2005, 12:09 PM
Bwkaz, i gotta question. This setup sounds very (very) complicated, but I can see the benefit. Do you install many programs. I could see with base system, but if you were using it as a "desktop" with multimedia apps, net applications, cd burners, etc. wouldnt this get very complex quickly with so many user accounts


soule

bwkaz
08-13-2005, 07:19 PM
Well, I have 179 lines in /etc/passwd, but some of them aren't package users. I have 174 members of the "install" group, so that should mean I have 174 different packages installed.

But I don't use either KDE or GNOME -- either of those would add maybe 15 or 20 users to that list.

After I went through the base LFS book, and the sections of BLFS that pertained to the programs I'd been using, I was pretty much done. I've installed a few programs since then, but not many.

(I'm not sure that I see how it would get more complex with more users. But then, I use the package name as the username, and I think that probably helps a lot.)

Piko
08-13-2005, 07:31 PM
Never mind! Checkinstall is perfect! Although it won't help me with things I've already installed, it will help me with other stuff.

Thanks, now I can get what I need, and not waste time on something someone has already done.

I love this forum. Now back to my game engine!