[haiku-development] Re: software organization/installation

On Sun, Feb 15, 2009 at 21:14, Brecht Machiels <brecht@xxxxxxxxxxx> wrote:

> Hello,
>
> With Haiku heading towards a first alpha release, I think it might be time
> to discuss how software for Haiku should be:
> a) installed; an installer application (or not?)
> b) organized; where are files stored
>
> I would like to start a discussion so that there is a clear concept before
> alpha 1 is released.
>
> I'll start with point a.
> I think most of us agree that package management systems such as used by
> Linux distributions are not the way to go? The alternative is that the user
> downloads the software (binaries) from a web page.


+1


> Reading some old discussions on software installers, I noticed that there
> are two groups of people when talking about software distribution:
> * Some people prefer to have an installer that is similar to the
> SoftwareValet installer.
> * Others prefer to manually copy files over to their system.
>
> The second option is hassle-free as long as the software package is
> self-contained. For POSIX-style software, this will not be the case, as it
> typically contains files in several standard directories (lib, man, include,
> ...).
>
> IIRC, Haiku's replacement for the SoftwareValet packages are to be file
> archives (tar.bz2 for example) that include, next to the actual application
> files, an installation recipe of some kind. This kind of package format
> could also be installed manually by those who prefer to do so. For this
> reason, I would opt for an installation recipe that is in plain ASCII (or
> UTF) and is easy to read and interpret by a human.


Keep bc in mind. Would be a pity if a user can't install a software just
because the Haiku Software Valet is not able to open it. For having created
close to a hundred ones, i pretty like the BeOS .pkg way, even if the non
standardized application menu folder tree is a nightmare (like you say
below)

Personally, I do not like to spend time organizing my application menu. I
> would like Haiku to know a standard set of software categories: games,
> graphics, internet, ... . The installer package could specify which category
> the software belongs in.


I've always been a big fan of application menu subfolders: audio, games,
graphics, internet, developpement, videos, system, Office. More or less,
everything a final user need can match those subfolders ... if he likes
subfolders ;) I was glad Yellowtab had this to Zeta !
Another problem here is localisation. My subfolders are the following:
Accessoires, Audio, Developpement, Images, Internet, Office, Système,
Vidéos. Yes, because i'm french. So having symlinks in the .pkg files in a
"videos" files would have the result of two folders: "Videos" and "Vidéos".
All systems have this problem: Windows creates a new folder with the
application name (ex: /Mozilla Firefox/Firefox) that i have to move to
/Internet, MacOSX ask me to manually drop down the icon in the app folder
and then drag n' drop it into the Dock manually, ... Seems like a tuff
question ! :)
Perhaps a mix with your attributes "category" idea and a LiveQueries on
applications in the /apps folder could do the job btw ...

Refering to Zeta, their .ZIP manager that propose to install automatiquely
or open as a ZIP file was a pretty good and reliable one to me.


> Having Haiku check (automatically) for updates of software might be an
> interesting feature. Some software on other platforms already have a 'check
> for new version' feature. I think it would be nice to agree on a standard
> for this so that Haiku can check for updates to all installed software. This
> can be done in cooperation with a BeBits-like site or simply using
> individual software homepages.


I think about this question 2 years ago and the only reliable solution that
cames to me was a centralised application delivrery website like bebits,
that provides a webservice your system asks (when PPPoE is active) to get
the latest version available for each software you have. Based on the Bebits
architecturs, that could be a couple of hours task to do.
But then, a huge problem remains: how your system knows which softwares you
have, since you can easily copy paste one from anywhere... the only solution
that cames to me is that ALL softwares available for Haiku SOULD be
available from this centralised software delivrery website, following a
small releasing guideline: name, version, small release note, .pkg file to
install.
Then the update process would only be a wget on the .pkg file per update,
with an auto launch when the download is finish. This could be a pretty
flexible solution since .pkg includes scripts if needed.
This process could easily handle system updates.

An uninstaller is not necessary for software that is fully contained in one
> directory. Not all software falls into this category, therefor I think an
> uninstaller should be provided. One could make use of BeFS file attributes
> to flag a file as being part of a certain software package in order to
> easily uninstall software. I assume this was already the case on BeOS?
>

In the schema i describe previously, an unistaller program would be neat,
for your system to know which software has to be deleted from updates
detection. BTW, aren't users used to have / feels it cleaner to unistall a
software instead of just drop a binary to the trash ? That's only my 0,02€
here

Should we implement support for flagging dependencies between software
> packages? I think this would be a very nice feature to have, but it might
> not be worth the trouble. In theory it should be possible to have an
> installer check dependencies and optionally fill them in automatically. I'm
> not sure if it is feasible in practice, though.
>

No idea ... but is dependencies could be huge problem in Haiku like it is in
Linux ? Cause it never seems me so.

Next, the organization of software.
> A clean way to organize software is to contain each application in its own
> directory. This is not how POSIX software is typically organized however (I
> don't know whether POSIX specifies the bin/lib/share structure though). Its
> possible to contain such an application in one directory however (--prefix).
> This is not so simple for shared libraries though (read on).
>
> I would like to avoid the "DLL hell" that plagues Linux systems. For this,
> Haiku should be able to have multiple versions of one library installed at
> the same time. An application should be able to find the version it
> requires. I see two options:
> * all libraries in one folder, version number in the library filename (also
> for the headers)
>  * complicates the building process alot?
> * each library in it's own directory (including bin, lib, include and share
> directories)
>  * change LD_LIBRARY_PATH for each application
>  * for building, we need to set CFLAGS and LDFLAGS depending on which
> version is required
>  * this would keep also libraries contained in one directory (yay)
>
> Some interesting proposals concerning the installation side of this:
> http://www.freelists.org/post/haiku/on-SoftwareValet-for-OBOS,55


Aren't needed libraries are store in a /lib folder with each app actually ?
Seems me so ... if not, why not ? Having duplicate libraries for 5 or 6
softwares would make something like what ... 50 mb ? 100 mb ? Even the
cheapest laptops now have 120 Gb harddrives ... updating those for each
would then be a simple software update.

<http://www.freelists.org/post/haiku/on-SoftwareValet-for-OBOS,55>
>  Adrian Panasiuk pointed me to Nix (http://www.linux.com/feature/155922).
> It might be a good source of ideas.
>
> Kind regards,
> Brecht
>
>

Other related posts: