cross-distribution wrapper library?

Karol Pietrzak (RIT Student) kap4020 at rit.edu
Fri Jul 8 17:30:21 EEST 2005


Hello everyone.

I have an idea, but I know ideas are a dime-a-dozen without an implementation so I want to throw an idea out there and see whether it sticks with anybody.

freedesktop.org has produced many successful specs and software, some oriented for both users (e.g., XDG spec) and others for developers (pkgconfig).

In short, I think what Linux needs is library which wraps incompatible functionality with a single library with a very stable API and a liberal license.  Querying what CD/DVD drives are available, where to install (and initialize) fonts, where to install documentation, and how to start init scripts are all incompatible across distributions, even different versions of different distributions.  I propose a library which hides this difference through a single API.

+ IDEAS

Following the Autopackage project [2] gave me the idea of a cross-distribution library which hides some of the incompatibilities between current distributions.  For broadest acceptance, it would be licensed under the BSD, zlib, or similar license.

The big, overall reason is to create a software abstraction layer (i.e., SAL) for all Linux distributions, so no matter the underlying tools to perform a certain function, it will done.

Examples:
1. documentation location
Fedora Core and most distributions have their documentation in /usr/share/doc/PACKAGE_NAME.  SuSE has it in /usr/share/doc/packages/PACKAGE_NAME.
2. starting a service
How do you start services?  /etc/init.d/INIT_SCRIPT_NAME start ?  rcINIT_SCRIPT_NAME start?  service INIT_SCRIPT_NAME start?
It varies on the distribution, and so "complicated" RPMs rarely work between distributions even if the glibc and gcc versions match.
3. font location
The issue comes up of where to install user fonts, and how to "enable" them. /usr/share/fonts/local/, /usr/share/fonts/, /usr/X11R6/lib/X11/fonts/truetype, are almost all valid locations.
4. CD-ROM/DVD drive
Some distributions mount their devices under /media.  Others under /mnt.  And even then there's no guarantee of what the directory will be for the mounted device.

Many other incompatibilities exist between distributions.  Some of them, like the location of the CD-ROM/DVD drive, will help drive Linux desktop applications, while some may not (at least directly).

+ VISION

Many applications would benefit from such a library.  For example, an Apache GUI would have a "Start on boot" checkbox which would call the "configureService()" function in my library.  The "configureService()" function would run chkconfig, or insserv, or whatever in order to add the Apache service to start the Apache server on boot.  Or, for just the user, it would install it locally for just the current user under $XDG_CONFIG_HOME/autostart/ via "installServiceLocal()" or whatever.  Software like this is very much lacking, IMO, in the Linux world.

Game developers would be able to get a list of all the available CD/DVD drives by calling "getAllCDDrives()" and, for example, ask the user to put CD number four into their Plextor drive (versus telling the user to mount it under /mnt/cdrom).  In Unreal Tournament 2003/2004, for example, one has to manually set an environment variable to tell the installer where to search for the location[3].  And even this doesn't work with automount/submount distributions.

And, finally, RPMs and other packages that do anything with init scripts will finally work across different distributions.

This kind of library would help freedesktop.org's goal of "interoperability and shared technology for X Window System desktops", even if indirectly, and it would certain act as a "a base platform for desktop software on Linux and UNIX" [1].

I apologize ahead of time if this isn't the appropriate venue for this kind of discussion, and I thank anyone willing to reply.

[1] http://freedesktop.org/wiki/
[2] http://www.autopackage.org/
[3] http://www.idoru.org/unreal.html
    http://forums.suselinuxsupport.de/lofiversion/index.php/t5857.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/xdg/attachments/20050708/6c42559d/attachment.htm 


More information about the xdg mailing list