- Debugger: Getting mixed signals
- 'Packaging Infrastructure' Contract Weekly Report #4
- Haiku monthly activity report - 06/2015
- 'Packaging Infrastructure' Contract Weekly Report #3
- 'Packaging Infrastructure' Contract Weekly Report #2
- GCI 2014 winners trip report (mentor side)
- TeX Live and LyX; Changes to the boot code
- 'Packaging Infrastructure' Contract Weekly Report #1
- Beginning of 'Packaging Infrastructure' Contract
- Haiku monthly activity report - 05/2015
Package Management - Present and (hopefully near) Future
One month has passed (too fast), so it's time to summarize the developments
in the fields of package management for Haiku.
Where we are now
Implementation has been started, the following is a list of more or less
working elements of the package kit and accompanying tools:
- infrastructure classes for translating package management requests into individual jobs and execution support for those jobs
- request- and job-classes for managing package repositories (adding, updating, removing)
- classes maintaining and representing package-specific information (package-provides & -requires, package-versions, ...)
- pkgman - a (console-)binary implementing package management on top of the package kit
- support for parsing ".PackageInfo" configuration files during package creation, a .PackageInfo file looks like this:
name = mytool version = 0.9.8i-1 architecture = x86 summary = "mytool is cool" description = "the mytool package is a very nice package" packager = "me" vendor = "my company" copyrights = [ "(C) 2010, My Company PLC" ] licenses = [ "GPL v2", MIT ] provides = [ lib:libmytool = 0.8.5, cmd:mytool ] requires = [ haiku >= r1, libssl == 0.9.8 ]
Filesystem structure
Following is the current version of the filesystem structure as it would be with package management active:
+-boot
|
+-apps -> [symlink to /boot/common/pkg-tree/apps]
|
+-common
| |
| +-cache
| |
| +-packages [dropping a package here will activate it system-wide,
| | | most packages' contents will appear in
| | | /boot/common/pkg-tree, but specially marked system
| | | packages will appear in /boot/system]
| | |
| | +-history [contains info required for rolling back in time, used
| | | by package manager]
| | |
| | +-jailed [dropping a package here will make its contents appear
| | in a package-specific folder under pkg-tree (a 'jail'),
| | from where only packages that were marked as depending
| | on this one specifically will be able to access it]
| |
| +-pkg-tree [mountpoint of system package-fs, contents of the
| | | packages in /boot/common/packages appear here, the
| | | folders follow "Haiku filesystem hierarchy" (to be
| | | defined, an example given below)]
| | |
| | +-add-ons
| | |
| | +-apps
| | |
| | +-bin
| | |
| | +-boot
| | |
| | +-data [+ what used to be in 'share']
| | |
| | +-documentation
| | |
| | +-include
| | |
| | +-lib
| |
| +-settings [+ what used to be in 'etc']
| | |
| | +-backup [room for setting backups - used by package manager
| | to backup settings during an upgrade]
| |
| +-var
|
+-home
| |
| +-config
| | |
| | +-packages [dropping a package here will activate it for user]
| | | |
| | | +-history [contains info required for rolling back in time]
| | | |
| | | +-jailed [dropping a package here will activate it jailed for
| | | user]
| | |
| | +-pkg-tree [mountpoint of user package-fs, contents of the
| | | | packages in /boot/home/packages appear here]
| | | |
| | | +- ...
| | |
| | |
| | +-settings
| | |
| | +-backup [room for setting backups ...]
| |
| +-mail
| |
| +-people
|
+-system [any system-packages found in /boot/common/packages
| will appear here - those contain either a complete
| "system" or small, sequential "system-fix" updates]
|
+-develop [moved here from /boot/develop (except for the 'tools'
| folder), as it depends on the current system - the
| tools subfolder (gcc & binutils) will be spread out
| over /boot/common/pkg-tree]
|
+-optional [moved here from /boot/optional, as the contents depend
on the system]
In contrast to the last one presented in my blog, there no more is a separate "ports" tree, ported packages will just be treated as haiku-native packages (the line between these two classifications is too hard to draw). As a result, ports would have to follow some set of Haiku policies, defining where any package may (and may not!) put files. There will be a tool that will check any package against these policies and only packages complying with them will be made part of the official Haiku repositories.
Bits and Pieces
Package "Jailing"
One concept for dealing with ABI incompatibilities is to allow packages to be "jailed": a jailed package will not be activated in the usual manner, but its contents will appear completely separate somewhere in a folder specific to that package. Jailed packages will not take part in package management at all, i.e. the will usually be other (newer) versions of jailed packaged installed on the system.
Now if an update of a (supposedly compatible) library package is found to break one or more applications, the package manager can be asked to jail the last working version of that library package. Additionally, an attribute would have to be added to broken application(s) referring to the jailed version of the library. Upon activation of the application package(s), the package-fs would create links in a package-local 'lib' folder to the jailed library.
What's left to do?
A lot ;-), I'm afraid [in planned implementation order]:
- the 'package' tool parses .PackageInfo, but doesn't actually write any of these package attributes to the package file yet (I plan to to work on that later today)
- the repository format needs to be defined and implemented. It's pretty clear that the repository format will follow the example set by Ingo's hpkg format, i.e. it will contain package-attributes in a very compact format that's fast to read.
- tools for setting up a package building environment need to be created, which will basically setup a chroot environment containing just the packages required for building a specific target package, enter the chroot, build the software and package it.
- Haiku's package policies (rules about where files of specific types have to go) need to be defined and a tool needs to be implemented that checks hpkg files against those policies.
- supporting tools for creating a package repository from a set of packages (and uploading that repository to some server) need to be implemented
- the package-fs needs to support an ioctl that returns information (package attributes) about the currently active packages - this is required by the package kit's solver when it needs to compute the required actions for any package action request.
- the package kit's solver needs to be implemented, which basically means collecting package attributes from active packages and all repositories and passing them to libsatsolver (the same solver library that's used by openSUSE's zypper).
- the package kit (and pkgman) needs to gain more requests and jobs, implementing addition, update and removal of packages
- the bootloader needs support for package-fs, in order to be able to actually find the system (as that's contained in packages, too)
- a caching mechanism should be added to the package-fs, such that it doesn't need to parse all the hpkg files individually, but instead can store its state and restore it after a reboot (unless the state of packages has been altered, of course).
- support for package jailing needs to be implemented in the package kit
- [ probably some more stuff I forgot ]
- finally, when the package kit itself is working as intended, a graphical package management tool would be cool
That's it for now - I'll try to continue working on this stuff during the next weeks ...
- zooey's blog
- Login or register to post comments

Comments
Re: Best package management ever, only in Haiku!
If people want to threaten to never use Haiku again thats fine, as I see such statements as nothing more then an attempt to resist something they don't understand. So continue using Windows and enjoy.
The package manager is not the issue. the mess that the filesystem and packagefilesystem is proposing is.
Think of the filesystem organization is as your living room or office space. Programs are like furniture, artwork, and entertainment systems. Now one tries to add a new piece of furniture that will help keep him organized - the package manager. This is great one thinks until he finds that the floor needs to be re-enforced just to hold it and the furniture and artwork he has all need to be moved around just to add this one piece.
A package manager should just be another program that one may use or chose to ignore. It should not require the whole filesystem to be re-arranged and add a packagefilesystem (single point of failure similar to Windows' registry). This can be done without messing up the living room.
By the way, I do not use Windows unless I must. Haiku is my primary OS and Ubuntu Linux is my second. I have used package management and prefer the Haiku way as it is much easier to fix when things go wrong.
Rationale, and reasons not to worry
The package-fs is meant to deal with contemporary amounts of software. People may think they have a few things installed, a handfull of apps, but it isn't true. Look at the -real- file count of a Windows, MacOS X or Linux filesystem. When you have 100+ packages a system with 100.000+ files (of which a handful are yours), not uncommon, you can't have manual placement, manual updates and removal. We will approach those amounts. The package filesystem is an attempt to solve that problem. I hope it will scale up, but with a small footprint.
The package-fs doesn't remove a user's freedoms, and it doesn't remove the developer's responsibility to package their software well. A managed solution, however, helps developers immensely, since they're at the forefront of software development, with huge amounts of files, frameworks and tools and what not. Helping them cope with this likely translates into happy, productive developers, which in turn benefits the users, who get more/better apps.
The package-fs makes few changes to the overall folder structure of Haiku. It's just a filesystem, and not a complex one. No reason to be considered fragile. It doesn't act on its own. It can be seen as a passive component.
Packages are pretty normal archive files, not so unlike zip or tar files, but optimized for use with the package-fs. A package could list dependencies, or it could be fully self-contained.
The package -manager- is the active component, an application that you run. One that translates user requests for addition/removal of software into addition/removal of packages, in a safe way, aware of package dependencies. The manager interacts with the package-fs, but is otherwise completely separate from it.
About user freedom. Manual installation (like zip files) will still be possible. Just not in the folders kept by the package-fs, unless you first convert the zip to a package-fs package. It will likely be possible to disable the package manager and use the package-fs manually, if you feel like it being the "human package manager".
If the package-fs doesn't live up to its promise (in any of the forms it could be used), a Linux style package manager is probably next to try.
No package content policy is enforced by the package filesystem, the manager or the format. (These are just means of storage, presentation and administration. Filesystems don't care what content they carry.) A wide spectrum of content is theoretically possible, from fully self-contained bundles to single files in their own packages (which of course would be absurd). Not on the spectrum, but related, is the use of BFS attributes for administrative purposes. This is all content policy. Which must be agreed upon eventually and documented. Developers adhere to policy and repositories overlook policy compliance. The dev tools we provide must of course work towards compliance.
So the question to bundle or not to bundle is still somewhat open. The important thing is to get started, and see how well it works.
Re: Best package management ever, only in Haiku!
I don't see how this will make things simpler and cleaner than extracting the app to a folder and running it. With the proposed approach the apps' files will be scattered over the whole file-system and a bunch of extra, confusing directories are added. How will we move our apps? Reading some log file and figuring out where every single file resides? How will we remove them? The same way? Right, we need some extra software to hide the mess. Then let's hope nobody will notice. Great.
Re: Best package management ever, only in Haiku!
I don't see how this will make things simpler and cleaner than extracting the app to a folder and running it. With the proposed approach the apps' files will be scattered over the whole file-system and a bunch of extra, confusing directories are added.
Sorry to be so blunt, but that's just bullshit. If you would have bothered to actually read and try to understand what has been said about Haiku's package management, you would know that no files are being "scattered over the whole file-system", on the contrary in fact, as avoiding that is precisely the point.
How will we move our apps?
Just move the package file anywhere you like on your disk. You can still start the application by double-clicking the package file. This package will not be seen by the package manager, so it should be self-contained.
Reading some log file and figuring out where every single file resides?
Where does that idea come from? No need to invent some crap just for sake of aggravation.
How will we remove them?
By moving the app's package file to Trash.
The same way? Right, we need some extra software to hide the mess. Then let's hope nobody will notice. Great.
No, I'm afraid great is just the extent of your confusion and ignorance.
People, please do me the favour and actually try to understand how this is supposed to work before complaining. Without that, you are not helping anyone.
Re: Best package management ever, only in Haiku!
Sorry to be so blunt, but that's just bullshit. If you would have bothered to actually read and try to understand what has been said about Haiku's package management, you would know that no files are being "scattered over the whole file-system", on the contrary in fact, as avoiding that is precisely the point.
So what is the /boot/common/pkg-tree/lib/ directory for? What do you mean by "Now if an update of a (supposedly compatible) library package is found to break one or more applications, the package manager can be asked to jail the last working version of that library package. Additionally, an attribute would have to be added to broken application(s) referring to the jailed version of the library. Upon activation of the application package(s), the package-fs would create links in a package-local 'lib' folder to the jailed library." then? Why would a library break a self-contained app? The library is supposed to be part of the package, and if not then it is not self-contained at all.
Just move the package file anywhere you like on your disk. You can still start the application by double-clicking the package file. This package will not be seen by the package manager, so it should be self-contained.
The problem is that it is not self-contained at all. You don't just have to move the app, but also its dependencies that reside in other directories.
Where does that idea come from? No need to invent some crap just for sake of aggravation.
How do you know exactly which files you need then?
No, I'm afraid great is just the extent of your confusion and ignorance.
People, please do me the favour and actually try to understand how this is supposed to work before complaining. Without that, you are not helping anyone.
Please do me a favour and tell me what is wrong about my statements next time instead of just calling me ignorant.
Re: Best package management ever, only in Haiku!
So what is the /boot/common/pkg-tree/lib/ directory for?
That directory is actually part of the package-fs, i.e. it will contain all the libs from all the mounted packages. Every 'pkg-tree' folder is the mount-point of a package-fs, which means that it will contain a read-only tree of all the files contained in the packages mounted by that respective package-fs. It's going to look as if you unzipped all the packages into that folder, but its contents are a live representation of the mounted packages, so if you remove a package file from the respective 'package' folder, the files contained in that package will disappear from underneath 'pkg-tree' immediately.
What do you mean by "Now if an update of a (supposedly compatible) library package is found to break one or more applications, the package manager can be asked to jail the last working version of that library package. Additionally, an attribute would have to be added to broken application(s) referring to the jailed version of the library. Upon activation of the application package(s), the package-fs would create links in a package-local 'lib' folder to the jailed library." then? Why would a library break a self-contained app? The library is supposed to be part of the package, and if not then it is not self-contained at all.
My paragraph wasn't referring to self-contained apps at all. The problem with incompatible libraries indeed doesn't exist for self-contained apps. But self-contained apps do have the problem that they do not benefit from security updates for any library that they use. So the decision of whether or not to distribute an application self-contained or not is not an easy one to make. As result, we don't want to force that decision on the application developer, we just want to offer support for both ways to distribute applications.
The problematic situation I described in your quote is when a non-self-contained application depends on a library, and that library has been updated in an incompatible way, causing the application to no longer load. In that case (and only in that case) it would make sense to jail the old version of that library (in effect keeping two versions of that library on your disk), in order to get that application working again. Hopefully, this situation will never actually occur, but we can't really be sure about that, as compatibility of library versions is really beyound our control.
Just move the package file anywhere you like on your disk. You can still start the application by double-clicking the package file. This package will not be seen by the package manager, so it should be self-contained.
The problem is that it is not self-contained at all. You don't just have to move the app, but also its dependencies that reside in other directories.
You simply drag the application out of the 'package' folder. If you removed a package that's required by other packages, the system will tell you. If removing an application leaves packages behind that have only been installed in order to satisfy requirements of that application, the package manager can clean them up (but will probably not ask immediately, as I suppose that'd be rather annoying).
Please do me a favour and tell me what is wrong about my statements next time instead of just calling me ignorant.
There you go ;-)
I called you ignorant because you obviously didn't understand some aspects of how Haiku's package management is meant to work, but instead of asking for explanation, you started complaining about things that are simply not the case.
Re: Best package management ever, only in Haiku!
Please explain how the Psackag-fs works. Is it a file that contains a filesystem, or is it just another way of looking at files that are on the bfs. If it is the former than there is a problem. If it is the latter, then a better explanation is in order to allay the fears of what appears like a linux style mess.
Re: Best package management ever, only in Haiku!
Package-fs is basically a way to mount a folder containing packages (*.hpkg-files, somewhat similar to a zip file) to another folder, such that the contents of all the individual package-files appear as if they were unpacked to the target folder. Since this mapping is live, you can drag'n'drop packages to/from the source folder and the target folder will change accordingly (i.e. files will appear or vanish there).
In contrast to how package management works in Linux (and anywhere else, really), this means that no files are ever spread all over the filesystem - the package contents are only being unpacked virtually. This means that package updates are much easier to do and can pretty much be an atomic operation (i.e. they work completely or they don't change anything).
Even system updates can be done this way, with a safe route for going back to the last system state, should there ever be any problems with the new system.
Simplified
(reply to bbjimy "Please explain how the Psackag-fs works.")
Simplified example: You drop packages in /boot/packages, where they stay, as they are. The packagefs monitors this folder and presents the contents of those packages in another folder, say, /boot/package-contents (called pkg-tree by Oliver). Anything below /boot/package-contents/... would depend on what's -in- the packages, with relative paths.
The package format is not a filesystem format but an archive format, like tar or zip.
Packagefs is a special purpose filesystem. You can't format anything as "packagefs" because it doesn't exist in that form. The Haiku packagefs component doesn't mount a device, partition or file like a "normal" disk-oriented filesystem would. Instead it mounts *a folder* with a collection of packages and then presents the contents of those packages as *another folder* as if the packages were merged. As if they were zip files unzipped in the same spot, all on top of each other. Except its an illusion. There's no copying of data from the package backing store to the folder where their content is presented.
Compare it to a network filesystem which mounts a resource on a remote host and presents it locally. The remote resources doesn't necessarily have to be "real", just as long as it is dependable.
http://en.wikipedia.org/wiki/Filesystem
Re: Simplified
I'm starting to slowly warm up to this.
I still think the apps folder should be left alone. There are too many BeOS apps that install themselves in the /boot/apps folder. this will cause problems using Haiku with these older applications. Not all the devs will re-package their software to use the package manager. These will not be able to install if apps is a symlink to a read-only filesystem.
Re: Simplified
The quick and dirty fix in such a situation is to replace the symlink with a folder. Not difficult but of course also not ideal, since a person with only a general understanding of Haiku would not know for sure that this is safe and doesn't break anything somehow.
Another way to look at it is that old apps that need updating are found by users, and can be brought to developer attention, to be updated and repackaged.
A technical solution would be to make the packag-fs writable in some way, but I think that is probably overengineering things and making it needlessly complicated.
Re: Simplified
Right, /boot/apps as a symlink indeed is problematic for old apps. So either we try to repackage all of them (possible, but a lot of work) or we could leave /boot/apps as a folder and have the package-fs create appropriate links in that folder (e.g. /boot/apps/WebPositive -> /boot/common/pkg-tree/apps/WebPositive/WebPositive) whenever a package is mounted. This is possible since every package is expected to declare the apps & binaries it provides.
The only problem I see with that approach is that the automatic link creation could confuse users, esp. in the case when they decide to not need one of these links and delete them, only to find it back there when the package-fs is mounted next time. But that's kind of a minor issue, I guess (and even that could be worked around).
Re: Simplified
How about just re-naming the symlink to something like "Packaged apps" and placing the symlink in /boot/apps. This makes one more folder level to find the apps, but it is simple and descriptive.
Re: Simplified
I suggest to write a tool that converts an application into package-fs format and let the system use that tool every time 'someone' copies an application in /boot/apps. Instead of copying the files, automagically convert them and activate the new package so that the app appears in /boot/apps.
Re: Best package management ever, only in Haiku!
The problematic situation I described in your quote is when a non-self-contained application depends on a library, and that library has been updated in an incompatible way, causing the application to no longer load. In that case (and only in that case) it would make sense to jail the old version of that library (in effect keeping two versions of that library on your disk), in order to get that application working again. Hopefully, this situation will never actually occur, but we can't really be sure about that, as compatibility of library versions is really beyound our control.
How will you know beforehand which apps will be incompatible with a certain library update? Do you intend to make Haiku have a central repository where every Haiku app must be uploaded, and then recompile them all the time?
You simply drag the application out of the 'package' folder. If you removed a package that's required by other packages, the system will tell you. If removing an application leaves packages behind that have only been installed in order to satisfy requirements of that application, the package manager can clean them up (but will probably not ask immediately, as I suppose that'd be rather annoying).
So if you move the app, all of its dependencies will be moved as well? Or do you expect everyone to reinstall those if the app is moved to another install?
Re: Best package management ever, only in Haiku!
How will you know beforehand which apps will be incompatible with a certain library update? Do you intend to make Haiku have a central repository where every Haiku app must be uploaded, and then recompile them all the time?
You don't know beforehand, if we'd know beforehand, we could simply refrain from publishing the broken library package. Instead, someone (a user of the app) will find out the hard way (by noticing that the app no longer loads or works). When that information reaches the packager of the library causing the problem, he can provide a new package that solves the issue. Alternatively, the packager of the application could rebuild the app with the new library version and publish that package, too.
But until one of these things happen, telling the package manager to jail the last working version of that library would enable anybody experiencing the problem to still use the application until the incompatibility has been solved.
There will be some kind of central repository, but it will only contain the packages published by project Haiku itself, not any external packages (at least not all of them). It is expected that application developers and/or websites like Haikuware will publish their own repositories, too.
So if you move the app, all of its dependencies will be moved as well? Or do you expect everyone to reinstall those if the app is moved to another install?
No, if you move an application out of a 'package' folder manually (i.e. without using the package manager application), everything else will stay in place. It's just that whenever you invoke the package manager afterwards, it would tell you that there are unneeded packages and ask you if those should be removed. If you don't ever use the package manager, you'll never know.
What happens when you move the application to another install really depends on how you do that. If you literally move the application onto a different BFS volume (with a second Haiku installation) using Tracker, nothing special will happen, i.e. the application's package now sits on the target volume. Nothing much can happen, since the package-fs folders of that volume will not be mounted. Basically, you're on your own, so if the application isn't self-contained, you'll probably experience problems when booting that Haiku install later and trying to start that app.
But in general, whenever you drop a package into a 'packages' folder of the boot volume, the system will check for any missing dependencies, tell you about them and ask you whether or not those should be installed. However, if you move applications around just like that (i.e. not into a 'packages' folder), Haiku will not even notice, i.e. you will not get any support if the application has dependencies. This is just like it has been on BeOS (and still is currently): no package management at all, you have to resolve dependencies manually.
Personally, I'd recommend to use the package manager for everything that has dependencies. Only self-contained applications should be downloaded and "installed" (moved wherever you like). However, if you are so inclined, you can try to move other packages around and handle dependency problems manually - nothing is going to stop you. It's just that the package manager is meant to make your life easier, by shielding you from dependency problems as good as possible.
Re: Best package management ever, only in Haiku!
You don't know beforehand, if we'd know beforehand, we could simply refrain from publishing the broken library package. Instead, someone (a user of the app) will find out the hard way (by noticing that the app no longer loads or works). When that information reaches the packager of the library causing the problem, he can provide a new package that solves the issue. Alternatively, the packager of the application could rebuild the app with the new library version and publish that package, too.
But until one of these things happen, telling the package manager to jail the last working version of that library would enable anybody experiencing the problem to still use the application until the incompatibility has been solved.
If we shall have a package manager I would this thing to be automatic that is:
The "PM application broken my application thing" is too Linuish for me...
There will be some kind of central repository, but it will only contain the packages published by project Haiku itself, not any external packages (at least not all of them). It is expected that application developers and/or websites like Haikuware will publish their own repositories, too.
I understand the order thing but too Linuish this too, fake to be a normal user that uses PM (as in the end will be the only way to install application in Haiku, sadly) to search an application that is not in the Haiku repository (and I imagine PM will be configured whit this only by default)... you search desperately the web and found:
... in the end you find Haikuware site that says to add this line:
http://haikuware.com/application-repository445789?67=&/3456ABUBU00?-P
at your PM configuration (and I hope you not ask me to edit a file by hand!).
And the user asks himself it was not more simple to let me download the application as is for Win e MAC? I've found a deb for Debian, too :-)
Why I've to add this line by hand?
If PM shall be (and shall at this point...) I have to find all applications Haiku has, the normal user have not to mess with horrible scenery: he'll format! So maybe ugly but shall be only a huge repository in my opinion...
What happens when you move the application to another install really depends on how you do that. If you literally move the application onto a different BFS volume (with a second Haiku installation) using Tracker, nothing special will happen, i.e. the application's package now sits on the target volume. Nothing much can happen, since the package-fs folders of that volume will not be mounted. Basically, you're on your own, so if the application isn't self-contained, you'll probably experience problems when booting that Haiku install later and trying to start that app.
In a ideal world I expect it work as nothing happens hpkg should all dependencies info in it, right? So if application's dependencies are not satisfied, on first run instead of the app PM starts and try to solve all dependencies then application is mounted in pkg-tree, eventually settings are created in user folder and so on, and application starts!
In the and is so important for the app to be in the packages folder?
In this way if I find the application is s/it I drop directly in the trash... if I like I can decide for a question of order to "install" it, that is copy on the packages folder.
Re: Best package management ever, only in Haiku!
If we shall have a package manager
There's no if, we will (whether you like it or not).
I would this thing to be automatic that is:
The "PM application broken my application thing" is too Linuish for me...
This could indeed be implemented, but it will only work for activated packages (the ones "installed" in a 'packages' folder). The package manager doesn't know anything about non-activated packages, so it can't check them for incompatibilities.
I understand the order thing but too Linuish this too, fake to be a normal user that uses PM (as in the end will be the only way to install application in Haiku, sadly)
That's simply not true: you can download self-contained applications from anywhere you want.
to search an application that is not in the Haiku repository (and I imagine PM will be configured whit this only by default)...
That's right, it will be configured to know about Haiku's own repository(ies) by default.
you search desperately the web and found:
Well, if the application has been ported to Haiku, I'm sure you can download it from somewhere. If not, there's really nothing one can do.
... in the end you find Haikuware site that says to add this line:
http://haikuware.com/application-repository445789?67=&/3456ABUBU00?-P
at your PM configuration (and I hope you not ask me to edit a file by hand!).
(Ignoring all your superfluous sarcasm here) No need to edit a file, you just download the repo (gasp!). Double-clicking it could bring up a dialog that asks you if you'd want to activate this repository (system-wide or just for yourself). Decide and you're done.
And the user asks himself it was not more simple to let me download the application as is for Win e MAC? I've found a deb for Debian, too :-)
Why I've to add this line by hand?
Don't ask me, you brought that up in the first place.
If PM shall be (and shall at this point...) I have to find all applications Haiku has, the normal user have not to mess with horrible scenery: he'll format! So maybe ugly but shall be only a huge repository in my opinion...
Right, and how would you organise such a repository? Who would decide which packages get in there and which don't (quality assurance, ...). For Haiku's own repository, that's done by making sure that our own packages comply with our own packaging policy, but we can't force that policy upon every application developer out there. Maybe some website will take the role of BeBits and manage to actually be the one-stop-shop for all Haiku-software, but that's hard to say now, really. And for sure we can't enforce that.
In a ideal world I expect it work as nothing happens hpkg should all dependencies info in it, right? So if application's dependencies are not satisfied, on first run instead of the app PM starts and try to solve all dependencies then application is mounted in pkg-tree, eventually settings are created in user folder and so on, and application starts!
Yes, that could be implemented indeed. Still no guarantee that it actually works, though, depending on whether or not all the dependencies are actually found in the known package repositories.
In the and is so important for the app to be in the packages folder?
In this way if I find the application is s/it I drop directly in the trash... if I like I can decide for a question of order to "install" it, that is copy on the packages folder.
Exactly, that's what I'd expect to be the usual process of checking out an application: download, start, decide, trash or activate (or just keep).
Re: Best package management ever, only in Haiku!
If we shall have a package manager
There's no if, we will (whether you like it or not).
I would this thing to be automatic that is:
The "PM application broken my application thing" is too Linuish for me...
This could indeed be implemented, but it will only work for activated packages (the ones "installed" in a 'packages' folder). The package manager doesn't know anything about non-activated packages, so it can't check them for incompatibilities.
Well as I said after if all apps are released in HPKG format PM should know of its existence on first run application declares is dependencies and eventually PM resolves them so it knows of existence of all applications!
I think this will be a great feature (maybe a little difficult to implement in a automatic way) but that will solve the biggest package manager problem: dependecy hell!
I understand the order thing but too Linuish this too, fake to be a normal user that uses PM (as in the end will be the only way to install application in Haiku, sadly)
That's simply not true: you can download self-contained applications from anywhere you want.
It depends if the developer want to do this maybe it prefer to always use the PM (maybe he is too lazy)? So the user goes on the developer site and not found the application for Haiku, PM not find it as it is not in the default repository: normal user is lost!
to search an application that is not in the Haiku repository (and I imagine PM will be configured whit this only by default)...
That's right, it will be configured to know about Haiku's own repository(ies) by default.
OK, as I supposed!
you search desperately the web and found:
Well, if the application has been ported to Haiku, I'm sure you can download it from somewhere. If not, there's really nothing one can do.
Suppose it is ported but the developer had not released the hpkg in its site, he relies totally in PM!
... in the end you find Haikuware site that says to add this line:
http://haikuware.com/application-repository445789?67=&/3456ABUBU00?-P
at your PM configuration (and I hope you not ask me to edit a file by hand!).
(Ignoring all your superfluous sarcasm here) No need to edit a file, you just download the repo (gasp!). Double-clicking it could bring up a dialog that asks you if you'd want to activate this repository (system-wide or just for yourself). Decide and you're done.
Yes let's say it was a trap :-)... it will be done in an automatic way, let me add another point if I download the package from haikuware (or from a mirror) it should ask on installation/first run to add haikuware as repository so I have updates of the new installed application and I've all the Haikuware's apps added to PM.
And the user asks himself it was not more simple to let me download the application as is for Win e MAC? I've found a deb for Debian, too :-)
Why I've to add this line by hand?
Don't ask me, you brought that up in the first place.
OK... but this pattern is a classic on the Linux world when you want install an app and it is not in the default repo(and as they are practically empty it is 99% of the times sadly), shall not "work" in this way for Haiku, we want a simple OS, right?
If PM shall be (and shall at this point...) I have to find all applications Haiku has, the normal user have not to mess with horrible scenery: he'll format! So maybe ugly but shall be only a huge repository in my opinion...
Right, and how would you organise such a repository? Who would decide which packages get in there and which don't (quality assurance, ...). For Haiku's own repository, that's done by making sure that our own packages comply with our own packaging policy, but we can't force that policy upon every application developer out there.
Maybe I'm not understanding well but the "packaging policy" cannot by enforced by the Packager Application? For the quality assurance well I suppose someone will be testing all application before they are added... I know will be very difficult but from the user perspective will be great! If an application exists is in the PM, if not it is here, simply there it not exists!
I can think will be right to have 2 repositories: "Haiku" and
"Haiku-testing" in which put application in beta stage for those that are "betatesters in the animus" ;-)
But more is CHAOS!
[quote=fano wrote:
Maybe some website will take the role of BeBits and manage to actually be the one-stop-shop for all Haiku-software, but that's hard to say now, really. And for sure we can't enforce that.
I can suppose it will be Haikuware :-)
In a ideal world I expect it work as nothing happens hpkg should all dependencies info in it, right? So if application's dependencies are not satisfied, on first run instead of the app PM starts and try to solve all dependencies then application is mounted in pkg-tree, eventually settings are created in user folder and so on, and application starts!
Yes, that could be implemented indeed. Still no guarantee that it actually works, though, depending on whether or not all the dependencies are actually found in the known package repositories.
But if application needs a repo it should declare so! And for this PM will find all needed dependecies...
In the and is so important for the app to be in the packages folder?
In this way if I find the application is s/it I drop directly in the trash... if I like I can decide for a question of order to "install" it, that is copy on the packages folder.
Exactly, that's what I'd expect to be the usual process of checking out an application: download, start, decide, trash or activate (or just keep).
OK so we right with me, I download and put wherever I want, start it to test it (and to test it, it should starts!) and then I've 3 choices:
Re: Best package management ever, only in Haiku!
Well as I said after if all apps are released in HPKG format PM should know of its existence on first run application declares is dependencies and eventually PM resolves them so it knows of existence of all applications!
If you keep the HPKG file out of the packages folder you can use the (self-contained) application without the package manager ever knowing about it.
It depends if the developer want to do this maybe it prefer to always use the PM (maybe he is too lazy)? So the user goes on the developer site and not found the application for Haiku, PM not find it as it is not in the default repository: normal user is lost!
You mean keep the application in a non-default repository and not make the package (or at least the repository) available for download from the developer site?
Since the developer only needs one version of the package for the repository and for the website it would be a bit like trying to keep the application a secret from users. In the case of open-source software, the package will certainly be downloadable from Sourceforge, Github, Berlios.de or such.
you search desperately the web and found:
Well, if the application has been ported to Haiku, I'm sure you can download it from somewhere. If not, there's really nothing one can do.
Suppose it is ported but the developer had not released the hpkg in its site, he relies totally in PM!
Well as zooey suggested, the developer should at least provide the repository for download.
Yes let's say it was a trap :-)... it will be done in an automatic way, let me add another point if I download the package from haikuware (or from a mirror) it should ask on installation/first run to add haikuware as repository so I have updates of the new installed application and I've all the Haikuware's apps added to PM.
And the user asks himself it was not more simple to let me download the application as is for Win e MAC? I've found a deb for Debian, too :-)
In your hypothetical scenario that is obviously the developer's intention that you install the repository before the app, not much you can do about it I think.
If PM shall be (and shall at this point...) I have to find all applications Haiku has, the normal user have not to mess with horrible scenery: he'll format! So maybe ugly but shall be only a huge repository in my opinion...
Right, and how would you organise such a repository? Who would decide which packages get in there and which don't (quality assurance, ...). For Haiku's own repository, that's done by making sure that our own packages comply with our own packaging policy, but we can't force that policy upon every application developer out there.
Maybe I'm not understanding well but the "packaging policy" cannot by enforced by the Packager Application? For the quality assurance well I suppose someone will be testing all application before they are added... I know will be very difficult but from the user perspective will be great! If an application exists is in the PM, if not it is here, simply there it not exists!
I can think will be right to have 2 repositories: "Haiku" and
"Haiku-testing" in which put application in beta stage for those that are "betatesters in the animus" ;-)
But more is CHAOS!
Totally agree with you here. I wish there would be a single repository, maybe two (Haiku-OS + Haikuware?)
In the and is so important for the app to be in the packages folder?
In this way if I find the application is s/it I drop directly in the trash... if I like I can decide for a question of order to "install" it, that is copy on the packages folder.
Exactly, that's what I'd expect to be the usual process of checking out an application: download, start, decide, trash or activate (or just keep).
OK so we right with me, I download and put wherever I want, start it to test it (and to test it, it should starts!) and then I've 3 choices:
Apart from the dependencies, that looks about right.
Re: Best package management ever, only in Haiku!
Very few of an app's files will be scattered. Common shared libraries, mostly. File scatter happened in BeOS and it happens in Haiku too. Install python, perl, apache, etc, and look at the filesystem. They don't live selfcontained. But the idea of the package-fs is to at least *store* them selfcontained.
Addition and removal will be dead simple. Either go into the folder that holds the collection of package files and delete the package you want to remove (or inspect its contents, to figure it out) or use the GUI front-end, the package manager.
In Windows and in e.g. Ubuntu, you don't move apps. MacOS X bundles solves this, but it has drawbacks too.
The package-fs doesn't remove the possibility to store and run apps anywhere. It would be possible to construct a "bundle-maker" which could suck in the dependencies from other packages, and produce a zip files for standalone use.
Another approach would be to accept that one can't move apps, and instead install a subset of favorite apps not in the shared location (/boot/common/) but in the one's own account (home folder).
Additionally, symlinking of specifically "pkg-tree/apps" offers you a view of -just- the apps, with other folders (man, lib, bin, and so on) hidden. This isn't some complicated software, or some cold-fusion force-field to hide Haiku's dirty secrets. Just a symlink pointing at a folder, with apps.
Re: Best package management ever, only in Haiku!
Thank You kirilla, for the explanation of how it will work.
If we had a real example it would be even better.
But what happens if 2 app packages have 2 different "private" libs (with the same name) and decide to put them on the lib folder, what should happen when the second package is being installed, and how it should be resolved?
Regards,
Pedro Eloy
Re: Best package management ever, only in Haiku!
In Windows and in e.g. Ubuntu, you don't move apps. MacOS X bundles solves this, but it has drawbacks too.
While the "official" way prevents you from moving an app, like 90% of the apps I use in Windows are self-contained. I keep them in a separate partition actually, so whatever happens to the OS they will still be there. I "installed" them by extracting them to their own folders.
Another approach would be to accept that one can't move apps, and instead install a subset of favorite apps not in the shared location (/boot/common/) but in the one's own account (home folder).
If you only have the choice of moving them to another folder in the same partition, the point is kind of lost.
Re: Best package management ever, only in Haiku!
While the "official" way prevents you from moving an app, like 90% of the apps I use in Windows are self-contained. I keep them in a separate partition actually, so whatever happens to the OS they will still be there. I "installed" them by extracting them to their own folders.
Hm, last time I checked, most Windows applications still came with an installer. You can of course install the application to any place on your disk, but have you ever tried actually moving a Windows application around after it had been installed? Most of them actually have links to their installation folder in the registry, so chances are the application will fail badly.
I know that there are "unzip-only", "mobile" applications which can be moved around, but those are not the rule (as of yet). It'd be interesting to check if invoking a "mobile" Windows application via file-type (i.e. double-click on a supported document) actually works after the application has been moved to some other folder.
If you only have the choice of moving them to another folder in the same partition, the point is kind of lost.
Please note that this is not what kirilla has said: he did point out that self-contained applications can be moved around freely. Just when wanting to use the features of package management, applications can only live in the 'packages' folders actually being maintained by the package manager. It's your choice, really.
Re: Best package management ever, only in Haiku!
Hm, last time I checked, most Windows applications still came with an installer. You can of course install the application to any place on your disk, but have you ever tried actually moving a Windows application around after it had been installed? Most of them actually have links to their installation folder in the registry, so chances are the application will fail badly.
I know that there are "unzip-only", "mobile" applications which can be moved around, but those are not the rule (as of yet). It'd be interesting to check if invoking a "mobile" Windows application via file-type (i.e. double-click on a supported document) actually works after the application has been moved to some other folder.
Please note that this is not what kirilla has said: he did point out that self-contained applications can be moved around freely. Just when wanting to use the features of package management, applications can only live in the 'packages' folders actually being maintained by the package manager. It's your choice, really.
windows works from the paradigm that most users have a PC with a single Hard Drive.
Re: Best package management ever, only in Haiku!
How much of the BeFS "database" features could actually be used to implement a Package Manager functionality? (E.g. storing version and dependency info directly in the file system)?
While a package manager is very useful once you are used to it, I must say that I liked the "installation-less" method of the traditional BeOS where you simply download the application to the apps directory and are good to go. Deleting the same. I like the "portable app"/one-click install paradigm and think that even for those app managed by the Package Manager, this should be the default... i.e. even if I install a program using the PM, when I delete it (move it to Trash), that program should be "uninstalled" on the Package Manager as well.
Another point mentioned earlier was that settings should be preserved when deleting an app. I feel that the default action should be to clean the system of all files connected with an app when I delete that app. It could rather ask me if I want to keep my settings and only keep them when I say so. (Maybe this could be a basic OS setting for people who prefer it the other way round)?
Another proposal for the application management: Have a structure Like this
/boot/apps/[PackageName]/bin
" " " " " " " " " " |______/lib
" " " " " " " " " " |______/shared
" " " " " " " " " " |______/data
" " " " " " " " " " |______/config (optionally in the home directory if there is multiuser options)
/boot/apps/shared/[symlinks to all the shared libs] in all [PackageName]/shared directories
If there is more than one shared library with the same name, link to the one with the highest
version. If a certain app breaks while using the /boot/apps/shared/[symlinks] library, mark it to use its local version (../[PackageName]/shared) of the shared library.
The /boot/apps/[PackageName] directory can be hidden with the original Package File (self-extracting archive) changing to a symlink to the (hidden) /boot/apps/[PackageName]/bin/[Executable] file. On deletion of the (symlink) Package File, the whole directory gets deleted.
Also, during the first-time extraction, when a shared library with the same version already exists, you can simply not extract that specific library. When deleting an app, it would once again be nice if the file system could keep count of how many applications share a specific shared library and move a shared file to the /boot/apps/shared/ directory instead of deleting it when it is linked as the highest version and other apps still share it.
Of course, this doesn't preclude a Package Manager. But I think that it is one of BeOS/Haiku's strengths that the applications can be kept so separate from the OS and can so easily be added and removed. I can also see the use of some kind of repository (like apt for .deb based systems) with a description of the different applications and the possiblity of installing whole groups of applications instead of a single app at a time. But the speed of BeOS has also made it easy for me to try out a program (simply download it to the right directory) and remove it (simply drag to Trash) if I want, much quicker than any other OS I have worked with and I would not like to loose that ability.
Re: Best package management ever, only in Haiku!
"More recently, the R1 features poll shows how individual Haiku developers (listed by nicknames) feel about package management. User votes are shown by the chart. 59% of users seem to think it's a must-have. "
USERS or DEVELOPERS?? there's a huge difference. This OS was not originally inspired as an OS for developers. It was inspired to be an OS for users.
Re: Package Management - Present and (hopefully near) Future
I think this is a massive shame.
It's taking the Linux road of creating a conceptually complex, highly-technical and user-unfriendly solution to solve a shared-library issue that simply isn't a real problem for end-users anymore. Standalone bundles are a better solution for the vast majority of users.
In addition, this will ensure Haiku gets "open-source" ports rather than native software, intertwined dependencies with the bloat that comes with it, and will make it extremely difficult for commercial software to compete. The end result is that Haiku will attract a few "free software" zealots from Linux, but ensures that Haiku will never enter the mainstream.
I really thought Haiku was different.
P.S. It's very telling that the terms used are "repositories", "packages" and "package managers" rather than "installing", "uninstalling" and "updating". That shows how fundamentally wrong-headed this discussion is: people aren't thinking about end-users, they're thinking about Linux.
Can you really imagine the people who developed Mac OS X, iOS, Windows, Windows Phone, Android, WebOS or even BeOS doing that? Do you think they would have said "a graphical package management tool would be cool" as a complete afterthought rather than working out the end-user experience first and then working backwards to make it happen?
Re: Package Management - Present and (hopefully near) Future
I think this is a massive shame.
It's taking the Linux road of creating a conceptually complex, highly-technical and user-unfriendly solution to solve a shared-library issue that simply isn't a real problem for end-users anymore. Standalone bundles are a better solution for the vast majority of users.
In addition, this will ensure Haiku gets "open-source" ports rather than native software, intertwined dependencies with the bloat that comes with it, and will make it extremely difficult for commercial software to compete. The end result is that Haiku will attract a few "free software" zealots from Linux, but ensures that Haiku will never enter the mainstream.
I really thought Haiku was different.
P.S. It's very telling that the terms used are "repositories", "packages" and "package managers" rather than "installing", "uninstalling" and "updating". That shows how fundamentally wrong-headed this discussion is: people aren't thinking about end-users, they're thinking about Linux.
Can you really imagine the people who developed Mac OS X, iOS, Windows, Windows Phone, Android, WebOS or even BeOS doing that? Do you think they would have said "a graphical package management tool would be cool" as a complete afterthought rather than working out the end-user experience first and then working backwards to make it happen?
in all fairness I and many other have been very critical of this whole enterprise into package management "likely unfairly". Part of the issue is the fact that most of the first applications comming for haiku will be linux ports "ugh". beyond that hopefully people will pick up on the nice stable API and use it.
Unfortunately commercial companies like say adobe won't take notice until there is a decent userbase. So you can't be to concerned with them, at that they will likely want more API features then haiku offers so having a way to fix the frameworks and depndancys ahead of time is how it has to be.
some of this comes back to the fat vrs thin distrobution strategy.
I am of the opinion that BOTH should be offered.
Thin for users who want to really customize apps/libs etc.
Fat for regular joes who just want to install and get to work.
I did look over alot of the code commitd so far and the design. to me this design looks far better then linux. The real issue becomes in trying to keep developers from being uber lazy when using outside frameworks and non haiku standard API's. The problem is how to stop this from happening. I have mentioned a few times now that Haiku needs some kind of certification system. I don't know if the haiku devs have time but a third party like haikuware/bebit etc should. It would require however having the haikuware devs trust the endorsement and the application of the haiku testing badge to a third party.
that said I really think they need to start a blueprint for a app store. apple is making a killing on its app store. a few pennies here and there per app but those do add up.
So try not to be to hard on the guys, they actually are trying to save us all some trouble with the likelyhood of ports being the forseabl future.
It'll be ok.
BTW Haiku si different. It usually seems to do everything better then its competitors where it does the same thing.
give it some time. It looks like this is actually going to work fairly well.
Re: Package Management - Present and (hopefully near) Future
Well, if you'd have taken enough care to actually read up on how this has been designed, you would have noticed that self-contained apps are part of the solution (but not the whole answer).
By now, I'm really fed up with people dumping whatever personal grudge they have with package management into this blog and expect to be listened to. I won't even start arguing with you about the fact that free software has enabled us to get where we are currently, since the vocabulary you are using clearly indicates that you're in a predetermined state of mind on that topic.
Quite a lot of people have complained here that we didn't take the perspective of an end-user into account when designing Haiku's package management system. This is completely wrong, because we came up with this design after several discussions about the different aspects of software installation (management). As a result, the main aim of this design is to actually be able to support both, simple (behind-the-scenes)activation of self-contained apps and effective handling of software dependency trees. Of course, what most people really mean when they talk about "the end-user" is just their own bloody self. Not much different with Haiku's developers, actually: in the end, Haiku is the result of all their combined efforts to create a system that they would like to use. There may be the odd "how'd grandma like that?" flashing in our minds, but basically, we design a system that we'd like to use ourselves.
Finally, the graphical package management tool wasn't an afterthought at all, the package kit has been designed in such a way as to facilitate development of different applications offering it's features to the user (using whatever interface they like). Since it usually takes less time to develop a console-based app, I started to work on pkgman myself. In the end, it's obvious that we'll need a graphical package manager, but we can (and should) do that once the underlying system has been proven to work as we want it to.
Re: Package Management - Present and (hopefully near) Future
Thanks for your hard work on this Zooey, I don't see why keep trying to defend yourself against those who are more interested in hating Linux than liking Haiku though. How many times have you explained that a package manager doesn't prevent the 'fat' bundles these guys so desperately want? They can go to Haikuware and download programs and solve any dependancies manually just like they can now. Nothing has changed in that regard, it's just that they can't accept anything that has any connection to Linux. If you had done the exact same thing and called it a 'App Store' instead of a package manager then guys like thatguy, halo etc would have been squeling with joy all the way through this blog. It's sad but remember that they are obviously not the majority (which the voting aptly showed), and like you said, keep on making the os that YOU DEVS want to use, if you guys try to appease the crazies with political software agendas then you will burn out/loose the passion.
Re: Package Management - Present and (hopefully near) Future
Hi Rox & Zooey
While I also appreciate all the hard work so far (and I am actually a Linux fan, I just think Haiku has the potential to be even better!), I also gave an alternative directory structure that can be used by both "fat" bundles and the package manager. I like the fact that it should be possible to run Linux apps on Haiku, it is just for the details of where the library files should be stored that I gave an alternative (and to my mind cleaner) design.
Also, I don't want a situation where the user have to manually solve dependencies. Rather, what my suggestion would entail is that the work of the Package Manager should be "hidden" from thoses users that only "install" and delete single packages. Indeed there should be no "installation" from their perspective; simply putting the Package file in the /boot/apps folder should take care of everything (but a hidden "package manager" would take care of where the binaries and library files are unzipped to).
The greatest advantage of Package Manager IMHO, is the ability to install and uninstall multiple packages without having to worry about dependencies. Secondly, you have the ability to search through (a local) package list for specific applications instead having to search the Internet.
Regards
Chavoux
Re: Package Management - Present and (hopefully near) Future
The concept you outlined (with all apps being contained in a folder of their own) is pretty much limited to apps, though. What would you do in order to install a new translator, for instance?
In general, I doubt that the idea of shying away from mixing package-contents together into some kind of shared folder structure makes much sense. During my research, I've seen systems that try to achieve that, but none of those really convinced me, as they basically introduced a considerable amount of symlinks that replace the central structure. Symlinks can go stale, however, so the package manager would have to constantly manage all those symlinks whenever something changes. The problem here is that the border between folders which are being meddled with by the package manager and the ones who are only maintained by the user becomes vague. As I'd prefer to have as clear-cut a differentiation between system- and user-managed folders, I went with a couple of package-mount folders. The separation isn't completely clean, since the settings folder and maybe /boot/apps will be meddled with by both system and user, but that's bearable, I suppose.
On top of that, package-fs wouldn't have to change anything in installed packages, which I consider an advantage over your suggestion (where every package using a specific library would need to be changed whenever that library has been upgraded).
Re: Package Management - Present and (hopefully near) Future
Hi Zooey
Things like translators etc. should be part of the "system" and go where-ever you put the rest of your system files (/bin ?) Possibly to be only managed by the Package Manager (no direct user copy and paste of files).
Do I understand you correctly that user packages will then always be "fat" including all the libraries they need and only the Package Manager apps will share their libraries? How will you handle the situation where users delete programs from the /boot/apps directory?
The way I envisioned it would indeed "blur the lines" since everything happening in the /boot/apps folder would be managed by the Package Manager. The only difference will be the user interaction. Drag and drop a package in the /boot.apps directory to "install" it or use the official "Package Manager" to install it. Uninstall either way (delete/drag to trash) or "Uninstall" in the Package Manager will have the exact same effect, but simply feel different from the user experience.
I don't see every package using a library changed whenever the library change. Every package will still link to the "default" library file in /boot/apps/shared . Only if the application fails with the upgraded default library will it be flagged to use its own (older) library in /boot/apps/[PackageName]/shared.
Please don't see my comments as criticisms... I just gave it as possible suggestions for an alternative. If you find something (or nothing) useful, then good! Since I don't have the time to be involved in helping to write Haiku, it is the best I can do currently. I do appreciate that you have done much research already and will the one that needs to implement whatever course of action you decide on.
All the best!
Chavoux
Re: Package Management - Present and (hopefully near) Future
"The concept you outlined (with all apps being contained in a folder of their own) is pretty much limited to apps, though. What would you do in order to install a new translator, for instance?"
by dropping a self contained, single object file into the folder called "translators." end of story. no libraries. no dependencies. period. if it's not in the API, don't use it. if it can't be added to the system in this manner, it doesn't belong.
Re: Package Management - Present and (hopefully near) Future
How many times must I explain that having two different ways of doing things doesn't mean you get the advantages of both?
Straw man argument. It just so happens that the way Linux package managers work is terrible and Haiku is copying Linux rather than choosing the sane method (i.e. standalone bundles). That's why the problems with Linux keep cropping up.
Straw man argument. 'App Stores' don't generally do dependency resolution.
The voting was ambiguous. By "package manager", they could have easily meant "a way to install and update Haiku and applications", not an actual a package manager with dependency resolution.
Obviously, lots of people want a way to install and update Haiku and applications.
Poisoning the well ("the crazies with political software agendas"). If they're creating an OS solely for Haiku developers, they should spell that out at the top of the page and mention it whenever they solicit donations (for example "the design decisions of this OS are made mainly with the Haiku developers in mind").
Re: Package Management - Present and (hopefully near) Future
Bullshit, thats exactly what it means in this case. What you don't like is that you assume most people will choose to use the package manager, when you want to force people to use fat bundles which is what you prefer.
According to you, not according to the Haiku devs, and not according to me nor to the majority of those who voted. But hey, if you don't like it then it must be terrible and everyone else is just wrong. But I guess that goes along with your 'Haiku gets "open source ports" rather than native software' comment, as it shows how detached from reality you really are. Haiku needs EVERY app it can get at the moment and in the foreseeable future. How many native apps versus ported apps are there on Haikuware? 1:5? 1:10? 1:20? How many downloads are for ported apps versus native apps? You complain that making it easy to port open source apps will prevent Haiku from getting commercial software, I mean seriously? What commercial software?
Lol! Who would have known that when they wrote package manager they actually meant package manager, you really are grasping for straws.
Have they ever implied that the project is developed in the direction of the 'community's' wishes? The community vote that was made earlier was one that was aimed at the devs and then extended to the 'community' on a whim. The devs themselves voted for a package manager in Haiku (and believe me, they KNOW what a package manager is).
It should be obvious to everyone at this stage that the Haiku devs are developing the desktop OS THEY WANT TO USE, not what you, I, or certain other community members want it to be. If we don't like what they are doing we don't have to donate.
Re: Package Management - Present and (hopefully near) Future
Well, if you'd have taken enough care to actually read up on how this has been designed, you would have noticed that self-contained apps are part of the solution (but not the whole answer).
By now, I'm really fed up with people dumping whatever personal grudge they have with package management into this blog and expect to be listened to. I won't even start arguing with you about the fact that free software has enabled us to get where we are currently, since the vocabulary you are using clearly indicates that you're in a predetermined state of mind on that topic.
Quite a lot of people have complained here that we didn't take the perspective of an end-user into account when designing Haiku's package management system. This is completely wrong, because we came up with this design after several discussions about the different aspects of software installation (management). As a result, the main aim of this design is to actually be able to support both, simple (behind-the-scenes)activation of self-contained apps and effective handling of software dependency trees. Of course, what most people really mean when they talk about "the end-user" is just their own bloody self. Not much different with Haiku's developers, actually: in the end, Haiku is the result of all their combined efforts to create a system that they would like to use. There may be the odd "how'd grandma like that?" flashing in our minds, but basically, we design a system that we'd like to use ourselves.
Finally, the graphical package management tool wasn't an afterthought at all, the package kit has been designed in such a way as to facilitate development of different applications offering it's features to the user (using whatever interface they like). Since it usually takes less time to develop a console-based app, I started to work on pkgman myself. In the end, it's obvious that we'll need a graphical package manager, but we can (and should) do that once the underlying system has been proven to work as we want it to.
Wow, thats a little snappy. Especially when I was on your side of the fence.
Thats fine, likely I had it comming.
I didn't clarify either, when regarding fat/thin I was talking about the base os itself not the applications.Alot of issues can be resolved by offer a DVD format ISO preloaded with nearly everything.
take care.
Re: Package Management - Present and (hopefully near) Future
thatguy: I wasn't replying to you, but to halo. Sorry if the comment indentation didn't make this clear (there seem to be some issues with the indentation, as some comments in this tree look like they've moved into wrong places).
Re: Package Management - Present and (hopefully near) Future
thatguy: I wasn't replying to you, but to halo. Sorry if the comment indentation didn't make this clear (there seem to be some issues with the indentation, as some comments in this tree look like they've moved into wrong places).
Its ok, I've been a bit passionate and short on the matter. It's all good.
BTW aside from the package manager, what can be done to keep the application creators honest ?
Re: Package Management - Present and (hopefully near) Future
I understand how it is designed, stop being condescending and assuming that the person you're talking to is a clueless idiot who doesn't understand anything because he vehemently disagrees with you.
If you include two options of installation and provide both, you don't get the advantages of both. What will happen in practice is that users will get confused and everyone will end up using the same workflow to install software, and that users won't understand what software is a standalone bundle and what requires dependencies, losing almost all the advantages of bundles (i.e. natural one-click install, one-click uninstall, being able to copy software to another OS unchanged, no application needed other than tracker).
If a "package manager" is included, believe me when I say that it will end up being the only installation method actually used. Look at every other OS: on Windows, almost all software uses an installer, despite the option of standalone executables. On Linux, a package manager is almost always used despite fat binaries being an option. On Android, Google Marketplace is almost always used instead of manual installation of APKs.
Android is a particularly apt example, since it has no dependency resolution at all, despite being on a platform with extremely limited RAM and disk space, and being based on the Linux kernel. I can't imagine any Android users thinking "Gee, what this platform needs is dependency resolution".
I admit that I have a predetermined state of mind on the topic of dependency resolution, and that is that dependency resolution is awful and should be abandoned as a legacy of the 20th century. Apple doesn't do it, Google doesn't do it, and the only reason Linux distributions and Windows have it is because they're stuck with the legacy of decades worth of backwards compatibility and short-sighted decisions.
I genuinely do think any proposal to introduce dependency resolution in any OS in the 21st century is mad, barmy, bonkers, and I'm going to keep saying so. The advantages are small, and the problems is brings are huge. It's an absolutely crazy decision. If you're sick of reading it, stop reading it.
I also admit I have a predetermined opinion when it comes to software. My predetermined opinion is that I don't give a damn about ideology, what I care about is good software. I have no time for zealotry. I'm typing this in Firefox in Windows with an Android phone in my pocket, and there's a damn good reason why I'm not typing this in Konqueror in KDE (or whatever the hell they're calling it these days) with a Windows Mobile phone in my pocket. I want Haiku to have good, fast, native software, but I don't want Haiku to have crap ports of iffy software using Qt and GTK+ until the end of days.
Incidentally, when I talk about the "end-user", I am not really talking about myself. I'm content installing via a package manager, an installer, a bundle, or running from tape or microdrive. I'm thinking about everyone else who doesn't give a damn about "open source" or doesn't care about obscure OSes. I'm thinking about the users that BeOS was aimed at, whose legacy I thought Haiku was trying to inherit. Would Be have created a "package manager"? I sincerely doubt it.
If Haiku isn't actually for real end-users but rather just thinking about the developers, then it really should be prominently stated in any future fund-raising drives so that people don't get the wrong idea that any decisions are going to be sensible for anyone else. Wouldn't want them to get the wrong idea, would you?
Finally, what attracted me to Haiku was the idea of an pragmatic OS. An open source OS that wasn't entrenched in ideology, that freely embraced whatever was good. An OS that was free to embrace good ideas because it wasn't permanently stuck to decades of backwards compatibility. An OS that cared about the user experience and wasn't just a way of making it as easy as possible for the developers to set up their development environment. An OS that wasn't a bloated mess of poorly interacting components that don't work together but are rather having an emphasis on being integrated and native. I was guess I wrong about that.
Re: Package Management - Present and (hopefully near) Future
What do you think that repeating what you want over and over again is going to get you? Do you think I give a toss about the opinion of someone who has basically called me "mad", "barmy" and "bonkers"?
If you really care about Haiku, I suggest to calm down, stop talking and start doing.
Re: Package Management - Present and (hopefully near) Future
Thanks, Oliver for your fantastic work. It's amazing to watch the system coming so rapidly to life by following the commit messages!
I hope you don't take some of the comments here too much to heart. I fear that this kind of backlash may dissuade developers to propose contracts in the future. Doing contract work does put one into the spotlight and apparently, one is compelled to engage into discussions of seemigly the same arguments over and over again.
Please take heart that there should be dozens of people appreciating your project for every one voicing their contempt here.
I, for one, welcome our new packagey overlords...
Being able to simply install any app, from small Haiku-native tool to massive monster Linux port, by simply dropping a package into a folder and removing it equally easy, sounds brilliant. Add an easy update service and everything's shiny!
And to those that are pushing the old canard of those selfish devs that don't know or care about the end-users needs: I think the Haiku devs have a pretty good track record of doing the sensible thing when it comes to usability for end-users.
Regards,
Humdinger
Re: Package Management - Present and (hopefully near) Future
I don't understand why you need a jail.
All libraries should be installed with a full version name. then you can have a current version symlink, like libopenssl.so => libopenssl-1.0.0, and if an app needs to use an alternate version, put a symlink of libopenssl.so => libopenssl-0.9.8 in the app's own lib folder.
If there are no symlinks to an older version of a library, then you don't need it any more.
Basically, isn't that the crux of why we even need a package manager?
Re: Package Management - Present and (hopefully near) Future
Adding a symlink to a package's lib folder is possible, but not straightforward, as the package-fs itself is read-only. So in order to do it, you need to unarchive the package, add the symlink and then rearchive the package again.
The main problem, however, is: how do you find out if there's a symlink pointing to an older version of library? You need to search the whole disk, which is very slow (and you would have to do that for all the installed libraries).
Jailing would solve both issues: adding the "jailed" attribute to the old library version package will avoid the need for searching for links pointing to it, as long as the package carries this attribute, it will stay (i.e. the package manager will not touch it). By adding an attribute to the package that needs to use the older, jailed version of the library, we avoid having to change the package contents. Additionally, since this package now refers (via the attribute) to the jailed library, the package manager has a chance to determine swiftly whether or not any jailed package is still needed.
Deleting packages, deleting dependencies
Been following this for a while, and first reactions to a 'package manager' aside, the implementation looks a nice compromise. One thing that confuses me slightly about the package-fs however is this:
As I understand it the package-fs (package-tree) is effectively an amalgamation of installed packages into a filesystem tree, allowing sharing of libs. So that suggests that if I install app-A which comes bundled with (say) Qt, and then later install app-B which depends on Qt, it should function fine - i.e. the dependencies are met.
The question is, what happens if I then subsequently delete app-A (and so lose Qt libs). Will that break app-B? Require dependency resolution via a repository? Or are libs locked if used by another app (and if so, how do you delete app A).
Thanks for all your hard work, nice to see it coming together.
Re: Deleting packages, deleting dependencies
There's nothing magical going on here concerning the sharing of libs. Apps only share libraries that are installed as packages of their own right.
So, since in the scenario you've described app-A comes bundled with Qt, app-B wouldn't see that version of Qt (as it would be local to app-A). So in order to work in the first place, app-B would require the installation of Qt by the package manager. Since it requires Qt, app-B hopefully has declared this dependency in its package attributes, so the package manager will take care of it automatically.
Re: Deleting packages, deleting dependencies
There's nothing magical going on here concerning the sharing of libs. Apps only share libraries that are installed as packages of their own right.
So, since in the scenario you've described app-A comes bundled with Qt, app-B wouldn't see that version of Qt (as it would be local to app-A). So in order to work in the first place, app-B would require the installation of Qt by the package manager. Since it requires Qt, app-B hopefully has declared this dependency in its package attributes, so the package manager will take care of it automatically.
I am a bit confused here ?
So what happens if I remove APP a ? or APP b ? does each app gets its own copy of QT or does the package manager maintain QT and link to app A and app B ?
Re: Deleting packages, deleting dependencies
So what happens if I remove APP a ? or APP b ? does each app gets its own copy of QT or does the package manager maintain QT and link to app A and app B ?
If you open a Terminal and type 'env' you see this:
LIBRARY_PATH=%A/lib:/boot/home/config/lib:/boot/common/lib:/boot/system/lib
This tells the runtime_loader which locations to check for libraries to link with an executable, when you run it. The executable has references to libraries embedded in itself. Pretty standard. This is how Haiku works currently, and it remains the same, with or without package management.
The %A is short for the path of the app's folder. (at load-time) This is from Haiku revision 39648. I'm guessing a current revision also includes /boot/common/pkg-tree/lib.
A can be deinstalled separately. Removing B would also remove C, and would not affect A in any way.
The package manager would likely refuse to remove A, as long as B is present, unless the package manager allows the user to force removal of A and it can find a pkg C to satisfy B.
See scenario 3 below.
The smart thing would be for both A and B to state a dependency on pkg C, (or rather on the specific thing that pkg C provides).
Let's look at a few constructed scenarios:
******* Scenario 1 *********************************
Package A:
./Firefox/Firefox (the app)
./Firefox/lib/libmozilla.so
Package B:
./Rippoff/Rippoff
./Rippoff/lib/libmozilla.so
No problem. Both selfcontained. Apps find their private library via the part of LIBRARY_PATH that says "%A/lib"
******* Scenario 2 *********************************
Package A:
./Firefox/Firefox
Package B:
./Rippoff/Rippoff
Package C:
./lib/libmozilla.so
No problem. A and B depend on C. Package manager keeps C as long its needed. Package manager will install C if needed (by either A or B) and missing. Apps find their library via the part of LIBRARY_PATH that says "/boot/common/pkg-tree/lib"
******* Scenario 3 *********************************
Package A:
./Firefox/Firefox
./lib/libmozilla.so
Package B:
./Rippoff/Rippoff
(dependency on libmozilla)
A would install and work, but is badly formed. Policy should discourage this, and it should be refused distribution by a serious repo. (Unless there's some very good reason for it!) The package manager could screen for this and warn or reject it. (The proper thing for the developer to do would be to either break out libmozilla into its own package, if one does not already exist, or move the lib into the app's own lib folder.)
***********************************************************
I believe a dependency system can be designed in more than one way - e.g. dumb package-to-package dependencies or open dependencies (specific but promiscuos, "I don't care where it comes from as long as its green and spherical") - and I'm guessing that the nature of the system (and of the packaging policy which developers hopefully adhere to) could spell success or failure for the end result, the overall user experience. Would be interesting to learn more.
Re: Deleting packages, deleting dependencies
[ ... ]
******* Scenario 3 *********************************
Package A:
./Firefox/Firefox
./lib/libmozilla.so
Package B:
./Rippoff/Rippoff
(dependency on libmozilla)
A would install and work, but is badly formed. Policy should discourage this, and it should be refused distribution by a serious repo. (Unless there's some very good reason for it!) The package manager could screen for this and warn or reject it. (The proper thing for the developer to do would be to either break out libmozilla into its own package, if one does not already exist, or move the lib into the app's own lib folder.)
I completely agree, package A isn't well-formed and should be discouraged by our packaging policy.
I believe a dependency system can be designed in more than one way - e.g. dumb package-to-package dependencies or open dependencies (specific but promiscuos, "I don't care where it comes from as long as its green and spherical") - and I'm guessing that the nature of the system (and of the packaging policy which developers hopefully adhere to) could spell success or failure for the end result, the overall user experience. Would be interesting to learn more.
Haiku's package kit already implements open, typed dependencies, where each package can 'provide' things like 'lib:libmozilla.so', 'app:FireFox' and/or 'cmd:sed' and other packages declare requirements on these (sometimes abstract) entities. One advantage of open dependencies is that they do not require re-packaging of all dependent packages whenever a package changes name or gets split. Furthermore, the explicit declaration of apps, libraries and commands provided by each package facilitates doing certain searches in the package manager (e.g. which package provides the 'sed' command?), so those declarations are not only useful when resolving packages.
Except for provides/requires, additional relational declarations are supported, too. For instance the 'supplements' declaration of let's say the 'perl-libsqlite' package can instruct the package manager to suggest this package for installation, when the user requests the installation of 'sqlite' and 'perl' is already installed.