- 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 for Haiku
"Make everything as simple as possible, but not simpler."
Starting my month of paid Haiku-work today, I was quite astonished to see the many emotional comments that have been added to the announcement. Clearly, the topic seems to be one of heavy likes and dislikes ...
Having read all those comments and most of the discussions we had earlier (on the wiki and on the mailing lists), I felt the need to start my blog with the quote given above - as, for me, that pretty much summarizes what there is to say about package management ...
Package Management - what is it?
Basically, package management is the means to tame and control that flee circus of all the different software components that make up your running system. Without any package management, each computer user would have to maintain those software components yourself, which after some time pretty much unavoidably leads to a more or less inconsistent (if not completely borked) system. In order to circumvent this, most OSes these days incorporate some kind of package management. Most Linux distributions come with pretty elaborate package managers, the BSDs have their ports tree, which is just another (albeit a bit simpler) way of managing packages. OSX pretends to do without package management only to rely on fink (plus others) to provide support for managing packages through the backdoor. With all those modern mobile OSes managing their software through a 'market' application, that pretty much leaves Windows as the lonely OS without package management (unless you consider Windows updates just that). But even on windows, many applications have chosen to implement an update service all by themselves, in effect providing a (rather crude) form of package management.
The parts of a package management system
Here's a list of the components that usually make up a package management system:
PACKAGE BUILD RECIPE (examples: .bep, control, .spec)
One or more files containing info about a specific package that describe how to to create a binary package from the sources. A recipe contains info about the dependencies the software has and which files (programs, libraries, data files) should be put where during installation.
PACKAGE BUILDER (examples: apt-build, haikuporter, rpmbuild)
A program used for building a specific package from its source, carefully following the actions defined in the recipe in order to convert the sources into a binary package.
PACKAGE FILE (examples: .deb, .ebuild, .hpkg, .pkg.tar.xz, .rpm)
A file type and data format that contains all the files and meta information that make up a specific binary software package.
PACKAGE ACTIVATOR (examples: dpkg, rpm, pkg_add, Haiku's package-fs)
A program that can activate/deactivate one or more packages (activation may involve actual installation of files, but not necessarily so). Keeps track of which packages have been activated.
REPOSITORY
A place where to store info about the available packages, usually along with the packages themselves, too.
PACKAGE MANAGER (examples: apt, emerge, pacman, smart, yum, zypper)
The heart of it all - a program which reads one or more given repositories (usually over network) and can be asked to download and activate available packages. It will automatically resolve any dependencies those packages may have on other packages. Additionally, the package manager can update packages and even complete systems.
These days, it is common to only ever communicate with the package management system through the GUI of the package manager - all the other components need not be visible to a user at all (depending on the involvement the user wants to have with system administration and/or development).
So why do some people hate package management that much?
Honestly, I don't really know - I'm using package management nearly on a daily basis (e.g. during my administrative work on the Haiku infrastructure). Without a package management system helping me out, many of my everyday tasks would be much more complicated and error-prone.
I reckon most of the agitation around package management stems from the fact that package management is a complicated matter. One can try hard to hide this fact, but in the end, it will always show through that some hard work has to be done behind the scenes (usually by the people packaging the software). People wish it were simpler and complain loudly, pointing at solutions that most of the time just hide the problems instead of solving them.
Of course, several earlier implementations of package management were really a PITA, I remember having to hunt for RPMs on the net that were dependencies of some other program I just wanted to try out. Doing that once can be frustrating already, but having to do it repeatedly made me want to wipe the dust of my C64 ...
But today, package management usually is unobtrusive and just works. However, I am still seing problems here and there, which I would like to avoid on Haiku, of course.
Requirements for each component
In order to get a baseline for my research work on the existing implementations, I thought it'd be a good idea to start with a list of requirements for all the individual components. I am then going to look at each implementation and determine just how well it fits Haiku's needs.
I am pretty sure I am going to miss a few requirements here, so please comment if you think anything is missing!
PACKAGE BUILD RECIPE
- preferably contains info about from where to download the sources from
- specifies which patches to apply
- contains several basic attributes of the software (name, version, description, homepage, supported target platforms, ...)
- specifies the build options and build script
- specifies the dependencies of this software for several stages/scopes (build, install, test, ...)
- specifies the set of resolvables that the resulting package provides (which may depend on the build options given)
- supports giving different info for some target platforms (x86-gcc2 vs. ppc)
- contains info about the licenses applicable to the software
-
PACKAGE BUILDER
- uses a recipe to create a binary package for a given target platform
- sets up a chroot()-like environment for each build, containing only the software's build-dependencies
- enters the chroot()-env for the build in order to reduce the risk of the build process "picking up" installed software, which would create unintended (and untracked!) dependencies.
- must support signing the resulting package with a given GPG-key
- nice-to-have: support a mode for automatically invoking the test suite of the software and checking the result with expectations
- nice-to-have: provides a helper program to convert any buildable software into a package file (by means of a trivial recipe or without any recipe whatsoever) - the resulting "faked" package can then be activated and will take part in dependency resolution
PACKAGE FILE
- a single file containing all the info required for installing (i.e. activating the software contained in) the package
- must support signatures with one or more GPG-keys
- contains hashes for all files contained in the package in order to be able to validate installed files againts the original package contents
- should be perfectly tailored for the requirements of the package activator, i.e. the activator dictates the format, not the builder
PACKAGE ACTIVATOR
- show list of installed packages
- install/update packags
- remove/purge packages (remove keeps config files, purge deletes those, too)
- verify packages against status quo
- activate packages system-wide or per-user
- nice-to-have: support installation of multiple versions of a package on the same level (system or user) - this probably needs to be supported by the individual packages in order to work
- nice-to-have: automatically make backups of config files before package update
- nice-to-have: show list of config files for a package (and allow to backup/restore/purge them)
REPOSITORY DETAILS
- has name, description and URL
- a repository must provide concise info about the packages it contains and their dependencies
- provides a (GPG-)key used for signing all the packages in the repo
- should preferably be accessible by a web-browser
- there may be a correlated website, which offers additional services on top of the technical requirements, e.g. screenshots, reviews, user comments, etc.
PACKAGE MANAGER DETAILS
- maintains (add, list, remove) a set of prioritised repositories (including user-defined repos)
- show list of files contained in package
- show the package owning a specific file
- show all attributes (origin, version, release, resolvables, dependencies) of all packages
- supports all actions of the package activator, with additional dependency resolving
- supports activation of local packages (that were created locally or downloaded by some other means) with full dependency resolution
- always computes all required actions and shows them to user before applying them
- can search for packages with given attributes (name, resolvables)
- can verify validity of whole dependency tree and offer actions to solve any problems
- automatic update interval for repository information can be configured and switched off
- supports listing and getting rid of dependency-only packages (which were being activated only as dependencies of some other package)
- supports system updates (nice-to-have: actively, by offering to switch to a new release)
- nice-to-have: supports limiting actions to a specific repository
- nice-to-have: supports packet "pinning", i.e. specifying restrictions for specific packages with respect to their origin, release or version
Which implementations to look at?
I have currently planned to look at the following package managers (and their associated repository format[s]) in detail:
- apt (with dpkg and rpm backends)
- pacman
- smart (support for many package formats)
- yum (supports rpm only, AFAICS)
- zypper (supports rpm only, AFAICS)
Additionally, I'll inspect at least these package formats and package activators:
- dpkg/deb
- hpkg/package-FS
- rpm
Finally, I will spend some time with the different package build infrastructures, especially the ones used by Debian (apt-build), openSUSE (rpmbuild) and Arch Linux (pacman).
The special focus during these investigations will be on how easily each of those tools could be adjusted to work on/for Haiku - after all, many of these tools have been designed for a specific Linux distribution, which Haiku simply isn't (and doesn't want to be). On the other hand, I really hope that at least one of the package managers proves to cater for most of our needs, as writing one from scratch would be a *lot* of work.
Please do not hesitate to send your ideas my way ...
- zooey's blog
- Login or register to post comments

Comments
Re: Package Management for Haiku
@jido
What difference does it make if it's one repository or many? You'd still be able to access them all through a single, consistent interface.
I get the feeling you don't know what a repository is. Think of it as a download location. I might want to look through all the apps from location A, B and C, or I might want to only rely on location A for all my apps. The point is, it's up to you.
Or using a store analogy, imagine you could sell iPhone apps direct to customers (i.e. Apple don't get a cut) but still using the App Store interface. This would be possible if Apple allowed 3rd party repos (which of course they never will, though Cydia/Rock offer a way around that). The point is, with Haiku, you can choose how many download sites you want to use, it's up to the user to decide.
Make it so that app developers / maintainers do not just put their app in the one repository they feel like promoting, and apps are not duplicated between repositories in various versions. Then I have no objection.
By the way do you have an objection to my suggestion to use indirection to satisfy users such as yourself: instead of the location of a repository, enter the location of a list of repositories. The advantage from my point of view is that we have a standard location for software and no repository management is pushed onto normal users (such as myself)
Re: Package Management for Haiku
@jido
I see why you want a single repository now. How about this for a solution; all Haiku releases ship with all official repositories enabled by default. Power users can still enable extra repositories. If application writers are targeting mainstream users they're going to put apps in the official repos (to ensure widest possible audience for their apps), with 3rd party repos for more specialist/niche or unstable apps (may want to separate alpha quality software from repositories that less adventurous users are going to see, for example).
I say official 'repositories' rather than 'repository' as it's important to have some level of redundancy, to avoid problems should one of the repository servers go down. In other words, need to have back up repositories just in case one server breaks temporarily.
It's really not that hard adding additional repositories, no harder than saving a bookmark in a web browser, perhaps adding additional repos can be presented in a way that's more friendly to a less experienced user. Any suggestions on how this can be done? Is it seeing an unfamiliar URL that puts people off adding a repo?
Re: Package Management for Haiku
Maybe adding a repository could be a single click affair. Maybe a single version of each package could be presented to the user (latest stable or latest period, defined on a package level by the user)
I would prefer the single URL approach though.
Re: Package Management for Haiku
@Moopark
Have you actually used a package manager? It makes it really easy to find apps, install them, update them and remove them. They make keeping your system up to date easier, compared to static app bundles. If you'd still prefer app bundles, fine, but don't force your inefficiencies on me.
Yes, I have used a package manager -- every time I need to update something on one of our Ubuntu servers. I also wrote a package manager that I'll avoid disclosing because, well, I like the freedom of anonymity.
Package managers are necessary ("efficient") when you have an anemic base system with very sparse libraries, tons of interdepent 3rd party libraries that applications rely on, and software that splats tons of files and configuration all over your drive.
In other words, UNIX. It shouldn't be shocking that UNIX package managers were written for UNIX software, and my reply to your "don't force your inefficiencies on me" statement would be to turn it around: don't force the inefficient mess that is UNIX software on me! Once you start going down the packaging route, it grows like a monster. Provide a third party optional package manager, but making it part of the base system will consign Haiku to the same disaster that is Linux desktop software distribution.
Ask yourself this: you're a software application company and you want to distribute your software to users, according to your own release schedule, and without worrying about wether the OS will change out from under you and break your app. From that perspective, compare the Mac model to the Liux model.
@Moopark
Like I said in earlier posts, I'm in favour of user choice, and the solution I outlined allows supporting both traditional package management and app bundles, depending on what the user prefers. If people stopped and read what I said they'd understand we can all have what we want..
To support the Mac model, the OS vendor has to take very specific steps (outlined in my first post). If thase are done, the package management system for third party software will be entirely unnecessary unless you're just trying to port over Linux software.
Re: Package Management for Haiku
@Moopark
Ask yourself this: you're a software application company and you want to distribute your software to users, according to your own release schedule, and without worrying about wether the OS will change out from under you and break your app. From that perspective, compare the Mac model to the Liux model.
If a newer version of an OS breaks compatibility with an application, then the distribution model does not matter, in other words an app bundle will be just as broken as an app installed through a package manager. Generally such breakages are more likely to occur at a major point release of an OS, as API and ABI usually stay consistent with minor releases (though bugs can occur any time of course).
Re: Package Management for Haiku
@Moopark
Ask yourself this: you're a software application company and you want to distribute your software to users, according to your own release schedule, and without worrying about wether the OS will change out from under you and break your app. From that perspective, compare the Mac model to the Liux model.
If a newer version of an OS breaks compatibility with an application, then the distribution model does not matter, in other words an app bundle will be just as broken as an app installed through a package manager. Generally such breakages are more likely to occur at a major point release of an OS, as API and ABI usually stay consistent with minor releases (though bugs can occur any time of course).
Yes, the distribution model does matter, because package managers are used to ensure that every piece of the system is upgraded in lock-step to work around ABI breaking updates to core OS libraries.
This also means that every piece of software -must- be rebuilt and updated in lockstep. The few vendors that provide binary commercial applications for Linux ship with their own embedded libraries for a reason.
The point here that you're clearly missing is that maintaining a consistent ABI/API across releases and providing a broad, well-supported set of application libraries solves the root of the problem, making a package manager for applications an unnecessary complexity..
Package managers solve the UNIX software distribution problem. If you're not distributing UNIX software there's no problem to solve. This is how Apple got installation to be as simple as "drag and drop".
Re: Package Management for Haiku
@Moopark
You're missing the point. The method of delivery has nothing to do with whether an app works on a newer version of an operating system or not.
Let me explain by using examples of Windows and OSX. Technically speaking, Windows Vista and Windows 7 are fairly similar, as are OSX Leopard and OSX Snow Leopard. When both Windows 7 and OSX Snow Leopard were released, there were applications that worked on the previous version of the OS that didn't work on the newer version. It had nothing to do with the way the apps were installed, a new version of an operating system has it's own quirks, and sometimes those quirks cause apps to stop working. Application developers then update their apps to support the new system.
Also, whilst system libraries are updated so they sync with each other, in most cases it's possible to keep legacy versions of libraries available for compatibility reasons, even if the main system does not use them they are still accessible for apps. I already explained this, but basically you set attributes for applications that include required version numbers for the app. Package manager is aware of these requirements, and therefore keeps required legacy versions around, for the apps that need it. Simple.
What's your next complaint?
Re: Package Management for Haiku
@Moopark
You're missing the point. The method of delivery has nothing to do with whether an app works on a newer version of an operating system or not.
Let me explain by using examples of Windows and OSX. Technically speaking, Windows Vista and Windows 7 are fairly similar, as are OSX Leopard and OSX Snow Leopard. When both Windows 7 and OSX Snow Leopard were released, there were applications that worked on the previous version of the OS that didn't work on the newer version. It had nothing to do with the way the apps were installed, a new version of an operating system has it's own quirks, and sometimes those quirks cause apps to stop working. Application developers then update their apps to support the new system.
The 'quirks' were either Apple's bugs to fix or applications that (knowingly) used unsupported APIs. The vast, vast, vast majority of applications continued to work just fine. I still run applications that were written for 10.1.
Also, whilst system libraries are updated so they sync with each other, in most cases it's possible to keep legacy versions of libraries available for compatibility reasons, even if the main system does not use them they are still accessible for apps. I already explained this, but basically you set attributes for applications that include required version numbers for the app. Package manager is aware of these requirements, and therefore keeps required legacy versions around, for the apps that need it. Simple.
What's your next complaint?
Sounds anything but simple, given that interdependencies between libraries means that you'll wind up maintaining entirely duplicate trees of library dependencies that will need to be resolved for each application, plugins, application-supplied libraries, etc.
Sounds like a nightmare of complexity, actually. Wouldn't it be saner to just borrow an idea that Apple has proved works?
Re: Package Management for Haiku
The 'quirks' were either Apple's bugs to fix or applications that (knowingly) used unsupported APIs. The vast, vast, vast majority of applications continued to work just fine. I still run applications that were written for 10.1.
It doesn't matter if they were Apple's bugs to fix, that's exactly my point, OS updates can break applications, end of. Your beloved app bundles were unable to prevent this breakage. Mistakes happen, apps stop working, then they get fixed, it's not hard to understand. With a stable API and ABI breakages happen less frequently, and this level of stability is what Haiku is working towards.
Sounds anything but simple, given that interdependencies between libraries means that you'll wind up maintaining entirely duplicate trees of library dependencies that will need to be resolved for each application, plugins, application-supplied libraries, etc.
It's only seems like a nightmare of complexity because you can't grasp it. It's really simple. If an app needs a specific library to function the system keeps it.
It's funny that you bring up 'maintaining entirely duplicate trees of library dependencies that will need to be resolved for each application' since those duplicate trees of dependencies are supposedly a strength when you refer to app bundles, the difference with what I proposed is where the libraries are stored on the system. Plus, when apps are updated to use newer libraries, the now obsolete libraries can be removed seamlessly.
Sounds like a nightmare of complexity, actually. Wouldn't it be saner to just borrow an idea that Apple has proved works?
Why imitate when you can innovate? I'd expect an Apple fan like yourself to understand that. I believe everyone benefits from Tanka because it gives people the chance to organise their system how they want. For novice users they don't even need to know that choice is there, but for power users and developers that choice is very much welcome.
Bundles alone are too limiting for me, though I respect some users like them, I've outlined a system that supports app bundles because I appreciate not everyone has the same tastes as me. Can you appreciate some users like package managers?
Re: Package Management for Haiku
It's funny that you bring up 'maintaining entirely duplicate trees of library dependencies that will need to be resolved for each application' since those duplicate trees of dependencies are supposedly a strength when you refer to app bundles, the difference with what I proposed is where the libraries are stored on the system.
You still don't get it. Mac applications don't require any significant number of duplicate libraries included with the bundles because Apple provides a comprehensive set of complete libraries that maintain ABI/API stability. This means that most Mac applications can and do just use Apple's libraries, and there's not much duplication (if any) between them.
Why imitate when you can innovate? I'd expect an Apple fan like yourself to understand that. I believe everyone benefits from Tanka because it gives people the chance to organise their system how they want. For novice users they don't even need to know that choice is there, but for power users and developers that choice is very much welcome.
Why is an overly complex solution for a problem specific to Linux considered a "welcome choice" for "power users and developers"? Mac OS X has package management systems for dealing with messy UNIX software (see: MacPorts), but they're 3rd-party and not generally used to distribute native Mac software -- and that's the way it should be.
Bundles alone are too limiting for me, though I respect some users like them, I've outlined a system that supports app bundles because I appreciate not everyone has the same tastes as me. Can you appreciate some users like package managers?
No. Package managers solve the UNIX software packaging problem, and I can appreciate them on the server, and there only as a means of working around the distribution mess of UNIX software. They're the wrong solution for a desktop OS, and trying to force them onto a desktop OS is stupid.
Re: Package Management for Haiku
No. Package managers solve the UNIX software packaging problem, and I can appreciate them on the server, and there only as a means of working around the distribution mess of UNIX software. They're the wrong solution for a desktop OS, and trying to force them onto a desktop OS is stupid.
You prepared to call Jobs stupid then?
http://www.networkworld.com/community/node/70405
Technically OS X is a UNIX derivative I suppose, but I doubt that's why it's being implemented. In my opinion it's being implemented because it makes it easier for users to get the apps they need, and to give developers a more prominent platform to sell from. The first point is important here, average users are more comfortable with a package manager-like* experience now and seem to like the convenience. As long as the UI is friendly enough then a package manager has no reason to be limited to UNIX servers; package management solves UNIX software problems, but that doesn't mean it can't be a convenient tool on other systems too.
Why is an overly complex solution for a problem specific to Linux considered a "welcome choice" for "power users and developers"? Mac OS X has package management systems for dealing with messy UNIX software (see: MacPorts), but they're 3rd-party and not generally used to distribute native Mac software -- and that's the way it should be.
How is storing a few attributes and having a shared library handling application functions complex? App bundles require a shared library to work too, so the use of attributes is what Tanka adds over app bundles. Most users won't even see those attributes, they're hidden in normal computer usage.
You don't seem to be prepared to address what's being discussed, I'm not proposing a traditional package manager form, I'm proposing something better. It's better because it offers users more choice and fits in with the way you want to run your computer, rather than forcing a user to use a single solution. Why do you oppose choice if it's not interrupting how you use your system?
*It's possible for an app store to be implemented differently to a traditional package manager from a technical point of view, but give them both identical user interfaces and the average user won't be able to tell the difference; both are just an app that helps them get other apps.
Re: Package Management for Haiku
You sound like someone who actually knows Linux ;)
Re: Package Management for Haiku
I've never installed software on a Mac, but from what I heard here, the solution to use App Bundles is much simpler and quicker to implement and maintain than a traditional linux package manager, and is also used sucessfuly on a ecosystem that is considered one of more user friendliest.
So if we can have a very good and simple solution why choose a complicated one?
Re: Package Management for Haiku
True, using bundles makes it simpler, removes complexity and avoids the risk of applications breaking (not working) with newer libraries. That's the big positive. Bundles resolve dependency issues easily requiring no additional work by anyone else.
The negatives are (briefly stated in a previous post):
1) bigger download size - libraries are part of the download bundle increasing package size
2) more disk space use - you now have redundancy - same libraries in different folders taking up disk space
3) more memory use - each application will load its own set of libraries and not share them
4) no security or bug fixes in older libraries - makes your system even less secure which provides people more ways to attack your system. You'll also miss out on any performance or stability fixes.
The alternative is to link to newer libraries but applications would have to be well tested to be sure they work (job for packagers/testers). If break, they could then just link to older libraries for that application. Downside, can take lots of time and work to properly test for breakage.
Usually, recompiling (to link with newer libraries) will get the application to work right and in other cases small code changes + recompiling will fix any library issues but normally left to developer. ie: developer responsible for updating their programs to work with newer libraries. If open-source, a packager or 3rd party developers/porters could do these fixes also.
Of course, some people may not care about the negatives above and consider them reasonable trade-offs where others will not be happy because bundles promote an inefficient method. Today, most people have big drives, lots of RAM, and fast internet connections so maybe going with bloated packages (bundles) might be worth it to have less work and ensure applications just work. Both ways can work with different pros and cons to strongly consider.
I really hate inefficiency but I also love simplicity which is what you get with bundles so very hard choice to make!
Re: Package Management for Haiku
I agree in part with several of your points regarding the negatives of bundles but I think those are very overrated:
1)bigger download size
Download size is not very important in most cases, and the vast majority of applications the size of the dependent libs is not that large. In some rare cases Applications can be made dependent on other (large) Bundles being installed (consider System Bundles like Java, QT, .Net ).
2)more disk space use
This is surely irrelevant with the current disk sizes vs application size
3)more memory use
This is not very important because of todays availability of memory, because with a desktop OS you wont usually have many diferent applications open simultaneous ( that use the same libs). This issue is imo only relevant when you have a very low memory footprint and have several "simultaneous" applications that rely on the same (big) framework/toolkit version, but that can be resolved using System Bundles (QT,Java,.Net).
4) no security or bug fixes in older libraries
If those libraries are not Haiku core libraries, then ensuring bug fixes and security should be a job for the developers and not to the package manager. Besides that having bundles doesn't invalidate the possibility of having an automated mechanism to update the software through an AppStore or something like microsoftupdate.
Like I said the majority of bundles should be self-contained and only dependend externally of haiku core libs.
In the special cases that several applications dependend on some toolkit or framework, it is up to to the developer choose what he thinks is best:
-bundle up everything together (app+toolkit)
-make a single bundle with the app and the toolkit, and when installing just check if a compatible toolkit is available, if not install the toolkit that is already included in the bundle.
-make a single bundle with just the app, and when installing check if a compatible toolkit is available, if not call the packagemanager/appstore to start the download of the required toolkit.
To make it work we "just" need to have a simple API to find if a bundle is installed and which version is it. It is then up to each application to check that information.
I also think that a traditional package manager is not very developer not user friendly because to the developer it can cause all kinds of problems with their applications that are unpredictable and difficult to reproduce and you have to figure out what has been installed that cause the problem. Just remember that even small bug fixes can cause havoc in applications because those can rely on undefined or wrong behaviour of the libs.
To the user it is a potential problem, because "behind the door" something can be installed that breaks an application (imagine that several days later you discover that a given application stopped working because you installed another software previously).
When something goes wrong it is very difficult to the average user to solve it.
With bundles if something goes wrong you just have to uninstall and install again the application and it should work.
Re: Package Management for Haiku
I'll give a small example to show their negative effect below.
#1
Qt 4.8 minimal is 27 MB zipped and 67 MB unzipped but includes all the Qt libraries. To be fair we will use one third of these which would be bundled with applications. So, say 9 MB zipped & 22 MB unzipped just for standard Qt libraries.
With developer created bundles:
Say you're going to install 20 Qt applications. That'd be 20 x 9 MB zipped = 180 MB just for library downloads + 20 x 22 MB = 440 MB to install these libraries.
Now, say that all 20 of these Qt applications use the same version of the Qt libraries. So, you could have installed these libraries just once but now you've installed them 20 times on your computer.
What if you want to install 50 or 100 Qt applications? Or many other applications with identical bundled libraries? What happens then? What if you live a country with strict download limits? What then? What if you want to run a 1 GB VM (Haiku uses 500 MB). You've probably maxed out that 1 GB virtual machine because I haven't included application sizes. Doesn't that seem wasteful and illogical to you?
Of course, a package maintainer could re-bundle these applications but wouldn't see the trend until after getting a few of these packages submitted to them. Meaning too late for the early packages that came bundled before.
#2 I really like the concept of system bundles to reduce download & disk space issues but developers choose which (POSIX) libraries to link against. You can't force them to use library versions you tell them to. So, you will still get mix-matched library versions but maybe to much lesser degree. (ie: Qt bundle) Hard to say.
If you can get developers to adopt this then it'd work very well - reduce package size, install once for system-wide use and even be shared among applications at runtime. You'd have to make sure developers use versions provided and not different ones.
#3 For me, download size does not matter but for others it may. You have to think how it affects everyone.
Countries in Europe, Africa or South America may have lower download limits. You're right about memory use.
Disk space is another story. The more applications you get, the more disk space you will waste with duplicated libraries which could add up very quickly.
#4 Some minor changes to libraries between versions could have no effect on the application at all. So, you could essentially share the same newer library but instead you install different copies for each application to use to stay on the safe side.
#5 Also, bundling libraries with applications means you have to get the latest version for all of those applications to ensure you get security and bug fixes. How do you feel about updating 100 applications? That can amount to lots of work if you have lots of applications and keep your system busy for awhile - re-downloading many packages (hundreds of megabytes) and installing these newer application bundles. Rather than just updating a few system wide installed libraries + newer versions of the applications.
I agree that bundles remove any dependency related issues or crashes but I'm not sure yet if the price is worth it. Then again, the traditional method is more complex to maintain and prone to breaking applications. So, really tough call. I am both for efficiency and simplicity but you can only get one or the other depending which library dependency system you choose.
Anyways, I am going to wait for Oliver's research to be completed so that he can share the information he's collected.
Re: Package Management for Haiku
Not to sound obnoxious, but rather than rebundling they could just use the system libraries - which is what makes Haiku a small attractive system to start with. Encouraging developers to use third party libraries is the wrong thing to do, sacrificing speed efficiency and space to gain a few existing applications that may or may not work well on Haiku anyway.
Using the 'App Store' model, the most sucessful example is the Apple one - which bans the use of private api's and requires all libraries to be either system libraries - or included in the app bundle. This makes it a bad example for saying that 'package managers work'.
All apps should be built with Native API's. If a developer wants to take a shortcut and use a third party library, they should pay for that saving by maintaining and shipping the library themself as part of the applications lifecycle.
I don't have a problem with an 'App Store' or 'Package Repository' but all Apps should be self contained, and able to run on a bare system. Whether that is via system libraries or bundled libraries is entirely up to the developer.
Re: Package Management for Haiku
+1
Linux is often called à developer-centric OS for a reason.
Re: Package Management for Haiku
packagemanager,appstore,softwarevalet.........it's all the same thing.
fears=bloat,dependecies,incompatibitlities,conflicts=you 're maintaining your OS instead of getting things done with it.
why are we having this discussion anyway?
all we need is an app (call it whatever you like) that installs/removes "Haiku" apps,wich means naitive ones,and updates the system "a la softwarevalet" period.
all the fears i mentioned above and the ones that others have mentioned here in this forum will not exist if we do not open the door to them,by just remembering that Haiku has an API that is its standerd wich should be followed.
so basicaly,what i'm saying is,do not try to solve problems that don't exist(yet) by opening them first a door.
Re: Package Management for Haiku
I would like to see 2 things:
1.) Haiku Updating/Upgrading
2.) Application Management
The reason to distinguish is: The "End User" distinguishes. The OS is usually perceived as an bigger entity with a higher purpose. And the User wouldn't want to mess with it much. (End User not being a developer...) Applications on the other hand are constantly installed and used and removed again. This process needs to be simple from the Users standpoint.
Therefore:
1.) This could probably be done with a Linux sort of package management system. But the "End User" couldn't care less about the internals. It would be nice to maybe check the system parts the user would like to update, but I'd say, that would be it. In the end it could probably be accomplished just by using the solution for 2.).
2.) In the comments there are quite often remarks on using the MAC way. But there are also some mentioned flaws with this application bundle sort of approach. I would like to support Zeno Arrows ideas on how to use Haikus strengths and features to solve this task. Of course this will need a lot of thinking about actual details, but overall it shows a direction of doing it the Haiku way. :-) Also I would like to add, that an application bundle, that bundles all its dependencies can be executed right away, a bundle missing libraries would need to be installed, so the the system can check if necessary libraries are already installed or otherwise install them. This might lead to this OpenGL way of library integration that Zenja has written about.
Also about repositories: There was (still is?) BeBits, there's HaikuWare, and maybe others. They allow to download applications. In the future these might then be Haiku-Packages. Just download, dubble click - either install or execute right away. No repository hassle, no need for Haiku to organize an application repository of its own.
As I understand, your task, Zooey, is to gather information in order to enable an informed decision by you and the Haiku Devs what to implement and aim for. You already stated the rather huge scope of this task with your blog entry. But please keep an eye open for those ideas that have not been implemented for Linux, even though it will mean more implementation work. :-)
Also, I believe 1.) would be important for R1. But 2.) can be postponed to R1.5 or R2 - no hurry there, really.
Best regards and good luck.
Disclaimer: I work with Windows and Ubuntu. The Windows way of application management sucks big time, but the OS update works quite alright. The Ubuntu (/Debian) way is lots better but still is flawed in regards to "End User" experience. It is enormous how many packages I sometimes have to install just for a simple application. Thus my liking of application bundles - rare libraries can be bundled with the application.
Re: Package Management for Haiku
I would like to support Zeno Arrows ideas on how to use Haikus strengths and features to solve this task. Of course this will need a lot of thinking about actual details, but overall it shows a direction of doing it the Haiku way. :-)
At last, some support! Thank you dudenz! :-)
Also, I believe 1.) would be important for R1. But 2.) can be postponed to R1.5 or R2 - no hurry there, really.
I partly agree in the sense that more advanced features can wait, however it's important to think about the future of package management now as implementation decisions made now will have consequences down the line should care not be taken, switching package managers would be disruptive if the original had momentum, so the advanced features should be able to be incorporated into the basic framework.
The package management system I'm describing (it really needs a name now, I'm open to ideas. I'll call it Tanka for now, which is a type of Japanese poetry), should it be chosen, only requires a few things to be different from a normal Linux package manager so that it can be implemented without fuss later. These are:
1. Package management functions to be implemented in a datatype/system-wide library rather than embedded in a single application. The basic package manager we can start with can still use these functions so only difference is how code is laid out.
2. Package management database information should be stored as attributes within system/application files, rather than using a locked down, central database.
3. Clear guidelines on which parts of the file system are used for which files, to avoid duplicate locations (duplicate in the sense of functionality).
Beyond the above I don't really mind what the first Haiku package manager looks like, as I know that the full power of Tanka can emerge later.
Thought it's worth expanding on point 3. With the flexibility Tanka provides regarding putting your files wherever you want, it might seem odd that I'm so keen to get clear instructions on where files should be stored. Way I think about it is this. Firstly, there should be sane defaults, so that if a user does choose to leave file management decisions to the package manager, it'll still be easy to find what they want in the file system because the layout will be as logical as it can be. Secondly, it allows easy grouping of files, which is important for updates (see below).
Expanding further, imagine you do want your own locations for a folder of library files. In the folder attributes, it should list the type of contents, 'Library' for example, as well as the library name, let's use 'SDL' as an example (side point, if the contents of a folder are mixed, multiple content types can be listed). Now when your system updater wants to find the files on your system to update, it can run a query. For example, it can run a query for the attribute 'Library' and all libraries on your system are displayed, so it knows which ones to search for updates for. If an update to the SDL library in particular is needed, the system updater knows where you stored it (no matter how obscure the location), because it can query for 'Library' and 'SDL'. Thus, the user is given flexibility in how their system is laid out. Another win for Tanka. :-)
Re: Package Management for Haiku
I partly agree in the sense that more advanced features can wait, however it's important to think about the future of package management now as implementation decisions made now will have consequences down the line should care not be taken, switching package managers would be disruptive if the original had momentum, so the advanced features should be able to be incorporated into the basic framework.
The package management system I'm describing (it really needs a name now, I'm open to ideas. I'll call it Tanka for now, which is a type of Japanese poetry), should it be chosen, only requires a few things to be different from a normal Linux package manager so that it can be implemented without fuss later. These are:
1. Package management functions to be implemented in a datatype/system-wide library rather than embedded in a single application. The basic package manager we can start with can still use these functions so only difference is how code is laid out.
2. Package management database information should be stored as attributes within system/application files, rather than using a locked down, central database.
3. Clear guidelines on which parts of the file system are used for which files, to avoid duplicate locations (duplicate in the sense of functionality).
You have my support, too if package manager should be (and I'm too not sure it should) your idea is the more "haikuish" :-)
Uniting the bundle concept with the dependency thing is the best of both world, I think...
None package manager for Linux (or for BSD if you want) will be good for Haiku...
Re: Package Management for Haiku
@fano
Thank you for your support fano, I'm encouraged you agree, Tanka is the best of all worlds and it follows the features and philosophy of Haiku (when completed it could even be a feature users of other operating systems envy). Misappropriating an Amiga slogan, you could even say 'Only Haiku makes it possible'. ;-)
Any ideas for other names instead of Tanka? My original idea was Ninja, as it's a stealthy, versatile and pragmatic package manager, but the name doesn't quite fit with Haiku for me (probably the whole destructive side of ninjas), so I went with Tanka. What do you think?
I think it's probably worth creating a Wiki for Tanka now, as realise the ideas are now spread out over a fair number of comments, plus a Wiki will be a good place to flesh out the details. Does anyone know a good place to host such a Wiki (for free)?
Re: Package Management for Haiku
Does anyone interest in pkgsrc on Haiku?
It already basically works and most of required features are supported.
It may not fit for a primary package management system for Haiku, but usable for me to install/deinstall additional softwares.
Re: Package Management for Haiku
Sure, why not? I think people should be given choice. They can then decide for themselves what they want to use or not. I'm sure that some Haiku users will be happy using it.
Please upload to Haikuware for others to use or post a download link somewhere. Thanks.
Re: Package Management for Haiku
Pkgsrc is a multi platform infrastructure for installing softwares from source,
and also contains package management tools as a part of such softwares.
You can use it on Haiku in the same manner as other supported platforms.
I have no plan to provide binary, pre-compiled packages for Haiku due to limited resources.
I don't want to jump straight in pkgsrc for Haiku peoples, just curious about someone else interested in it.
Re: Package Management for Haiku
Why are you only looking at package management solutions from GNU-Linux distributions? They are some of the most complex solutions given GNU-Linux's Bazar-like way of doing things. Some of them are filled with legacy solutions for historical reasons, and are not paradigms to emulate. If you want something as simple as possible, but no simpler, then you definitely need to look somewhere else entirely.
If you absolutely must go this way to handle package management, at least look at the simpler, robust solutions of BSD. NetBSD has a readily adaptable solution in the form of pkgsrc, but in particular OpenBSD has made really great strides to make an efficient, simple solution to management of 3rd party software. They already did the job of looking through all similar solutions and cleaning up cruft and removing crutches. It's better because they have actual clear cut design goals, stability and reproducability, less knobs, and simplicity. At the same time it handles issues better in many cases.
http://www.openbsd.org/papers/eurobsdcon_2010_pkg_add/index.html
It would help at least to have some clear goals for what package management in Haiku should be. I don't think there is.
On a personal note, I would much prefer it done like on Mac OS X. The price on storage these days is so low that any argument against static linking or something similar is just plain silly when talking about 3rd party software. Of course, the base system is something else entirely, and should be treated differently, including things like security updates, and mixing that up with 3rd part software management is just a bad idea. That is, if you want Haiku to stay bleeding edge while usable at the same time. Just look at the recent discussion at Fedora about how to handle this, which resembles the comments.
I think there is room for improvement over how it is done in Mac OS X. It is simpler both for developers and users, and you avoid the hairy, complex solutions that are really limited solutions after all, even in the case of OpenBSD's.
Please think about it. The current sketch above looks more like an astronaut-architect pipe-dream, i.e. a recipe for a be all end all solution, which ends up begin a nightmare for all. I think Haiku can do better than all the existing OS's out there -- better for both developers and users. Currently Mac OS X has the simples solution. Why not start there and improve things?
Re: Package Management for Haiku
Why are you only looking at package management solutions from GNU-Linux On a personal note, I would much prefer it done like on Mac OS X. The price on storage these days is so low that any argument against static linking or something similar is just plain silly when talking about 3rd party software. Of course, the base system is something else entirely, and should be treated differently, including things like security updates, and mixing that up with 3rd part software management is just a bad idea.
I'm sorry that doesn't make sense to me. Why is fixing security holes in the system important if you don't give applications the same level of protection? How many times are security flaws the result of application flaws? On Windows, applications like Internet Explorer, Adobe Flash Player, Adobe Acrobat are notoriously common attack vectors.
If you want to keep your system up to date (including applications), a package manager can help a great deal compared to the alternatives. I'm not against those who want app bundles, as I've said before I think we can have app bundles, package manager use, and the option to extract to own folder setup, all options can co-exist within one package management system, which leads to...
The current sketch above looks more like an astronaut-architect pipe-dream, i.e. a recipe for a be all end all solution, which ends up begin a nightmare for all.
If you can see a flaw in what I've proposed, please say so, I'm happy to listen. It's true that what I'm proposing is new (to my knowledge), but if you look at the three basic points I defined above for Tanka you'll see at worst you'll get a standard package management system (whilst at best you'll have the best package management system anywhere, something other systems will be keen to emulate). The only remotely challenging part is making sure you define enough attributes to cover all functionality, and if you look at the HPKG format definition you'll see most of the hard work here is already done. It doesn't matter that the data is split across attributes in the file system as Haiku can treat saved queries on attributes as standard folder search results, so the data can still be brought together centrally for processing by the package manager functions, and the stored nature of the queries makes accessing the data quick.
So like I said, if you have a valid criticism, please raise it.
Re: Package Management for Haiku
I'm sorry that doesn't make sense to me. Why is fixing security holes in the system important if you don't give applications the same level of protection? How many times are security flaws the result of application flaws? On Windows, applications like Internet Explorer, Adobe Flash Player, Adobe Acrobat are notoriously common attack vectors.
Do you really want to handle the security of all 3rd party software bundles as well? Wow! What a trade-off! Then you definitely need to go all the way, and I can only encourage you to take a look at OpenBSD's ports tools to learn, in addition to apt, yum, and all the rest of the bunch. I'd have to say that approach makes more sense on GNU-Linux where everything is spread out on the internet: It's all 3rd party software in some sense, hence the allusion to the Bazar. On an OS such as Haiku or one of the BSDs it makes less sense, where there is clear line between the base system and 3rd party software. It's a trade-off with a lot to win if you can pull it off. Even OpenBSD known for its stamina on security shies away from tracking security updates outside the base system (except for some minimal patching in the ports system), simply because of the enormous resources it takes to do that, and most projects simply don't have the man-power to do it.
I think you underestimate the challenge. On the other hand it never hurts to shoot over the target of something useful to reach excellence.
However, as you also point out, you have the advantage that a lot of things in Haiku is going to make it easier, so maybe, just maybe...
So like I said, if you have a valid criticism, please raise it.
That's all the valid criticism I could think of. I guess time will tell.
Re: Package Management for Haiku
@dennisdjensen
Thank you for your reply.
The responsibility of fixing the security holes found in applications should lie with the application developers themselves, just like it does on other systems. The difference with what I'm proposing is merely the method of delivery of those security updates, i.e. security patches downloaded through the package manager are just as easy to apply as security patches downloaded through an application's internal update mechanism. As a side note, security updates would be easier to apply in the sense that you wouldn't need to run the vulnerable app to get the fixes, they can all be delivered through the same channel (i.e. the package manager) as security updates for the OS. Hope that clears up the confusion.
Re: Package Management for Haiku
There are always trade-offs.
However, you're proposing a huge amount of extra hassle and complication in exchange for a tiny improvement in security. This extra security would effectively only help open-source applications and libraries, since close-source software would be extremely unlikely to use dependency resolution, plus there are potential problems with updating libraries independently of software. Besides, the hope is that Haiku ends up with its own APIs that most applications use, making the benefit negligible.
The idea that there should be more than one way of installing software is a terrible idea, and leads to a terrible user experience. Choose one way, let's not have to explain to people that installing something depends arbitrarily on whether you want Application X or Application Y. Again, that's what Linux does - given two clear choices, Linux ends up with seven different ways of doing things.
Re: Package Management for Haiku
@halo
However, you're proposing a huge amount of extra hassle and complication in exchange for a tiny improvement in security. This extra security would effectively only help open-source applications and libraries, since close-source software would be extremely unlikely to use dependency resolution, plus there are potential problems with updating libraries independently of software.
Why do you think closed-source apps are any less likely to use dependency resolution, you don't need the source for dependency resolution to work. Also, it's hardly a huge amount of extra hassle.
The idea that there should be more than one way of installing software is a terrible idea, and leads to a terrible user experience. Choose one way, let's not have to explain to people that installing something depends arbitrarily on whether you want Application X or Application Y.
Only one way eh, hmm... well the consensus seems to be that we'll need a package manager for updating system files at least, so let's all use a package manager. See, didn't like that did you.
I don't know why people are failing to see how many problems Tanka solves. Here's another one, implementing Tanka makes it easier for app bundles to update. How's this done? Let me explain.
First, let's look at what an application bundle is. To sum up what it is, you could refer to an application bundle as an executable folder. A .dmg file on OSX has a file structure behind it, it's just hidden from the user.
Now we've established that, what can Tanka do for app bundles. The first time you run a HPKG file it extracts the files in a .dmg-like hidden folder structure, adds an application shortcut to the Tracker menu and runs the executable inside. How is this possible? It's possible because Tanka wraps up all it's package management functionality into a datatype, the system knows how to extract HPKG files to app bundles.
Now that the app bundle is in place, because we used the HPKG datatype to extract the files, we've set the same attributes we would have done through a traditional install. What does that mean? It means that the application within the app bundle can use the Tanka package manager to update its files! You wouldn't need to write separate update code for each app, you could leverage the existing package manager to do it for you.
How would this work in practise? If you've read the other posts I've made, you might recall I gave the example of how you could update single libraries (SDL library was the example given), rather than having to update all libraries. Effectively, what you have are customisable update queries. The 'repo' for the app is set as an attribute, and we know which executables and libraries it has because they're tagged as such. All the application writer has to do to write a update function is run Tanka updates on the app bundle, any new files the user wants to install from the 'repo' will be picked up and installed. I keep on referring to 'repo' in quotes as really it could be any location that the developer sets (I suppose limited to sites wget can grab the files from), including websites where login authorisation is required (login details encrypted and embedded in the app bundle), which would be useful for updates to commercial software.
So do you like Tanka now?
By the way, I'm creating a Wikia page for Tanka, should be ready to show in the next few days.
Re: Package Management for Haiku
Why do you think closed-source apps are any less likely to use dependency resolution, you don't need the source for dependency resolution to work. Also, it's hardly a huge amount of extra hassle.
Then name some commercial software that uses dependency resolution. Do you think commercial library writers are going to want to put their libraries in the hands of dependency resolution? Can you imagine a company putting the stability of their software in the hands of people that they can't control? It's not going to happen.
Only one way eh, hmm... well the consensus seems to be that we'll need a package manager for updating system files at least, so let's all use a package manager. See, didn't like that did you.
OS updates are a bit different. You wouldn't say Windows or Mac OS X has a package manager, would you? Even so, having a single package manager is preferable to having two inconsistent ways of installing software. You need one way of installing software.
I genuine don't understand what's supposed to be special about the update mechanism in this "Tanka" business. Pretty much everyone agrees that Haiku should have a global software update mechanism, and that it's fairly obvious how it would work with any sane package format.
Take a package format (such as PackageFS), put an update URL and version number somewhere (whether the header or within a file in the package). The update URL is an XML/JSON file containing the latest version number, date of update, changelog, and a location to download the package. You can compare the signature between the final downloaded versions for security. Updater goes through all applications to find updates. Compression and diffs would both be nice features, but would add a bit of complexity.
All obvious to anyone who thinks about it for five minutes, no need for a package manager.
Re: Package Management for Haiku
I have been using Slackware for just over a decade and one of the main reasons I keep coming back is I love the pkgtools package management.
Slackware's package management system is extremely simple in comparison to most Linux distributions. For example, it doesn't do any dependency tracking/resolution. On those rare occasions when a package relies on 3rd party dependencies it is the responsibility of the sysadmin to install the appropriate version.
However in the past couple of years I started to get the feeling that Slackware's package management could be better. Toward that end I've been experimenting with extending pkgtools to install each package in a separate directory (similar to GNU Stow).
The Nix package manager from NixOS is pretty close to what I'd want, but I think they went a little overboard with making it "functional". You really don't need to isolate the ENTIRE dependency chain for each package.
I would argue for packages using shared libraries by default (so that you can patch/update once, instead of each package that depends on it), but it makes sense to be able to override the globally-installed shared libs on a case-by-case basis (at the discretion of the sysadmin, perhaps with recommendation from the package maintainer).
I'm not necessarily saying that any of these should be adopted for Haiku, but I think they're worth looking at.
I would imagine Haiku using something closer to (but not necessarily the same as) Slackware's pkgtools than APT or RPM.
I _HATE_ the package manager in Solaris. I think Gentoo's Emerge/Portage is probably one of the most powerful/advanced solutions in regular use, but at the cost of being slow and complex.
Re: Package Management for Haiku
I'm happy to see you pick up this important task, Oliver!
All of you who ask for simplicity, remember that if we create (or adopt) a solution capable of handling "linux amounts" of software - in a Haiku-like graceful fashion, without sacrificing simplicity or the good feeling of being in control - the very same system will work just as well for people who just want to run <10 seemingly monolithic applications.
But, the "handful of apps" use case can -not- be allowed to dictate overly simplistic management for Haiku. The system must also facilitate software development and integration, package creation and distribution. I think a huge majority of developers will expect solid dependency handling - for the software development phase itself - and will expect software libraries and frameworks to be provided as separate packages, for them to use.
Haiku package management should not be made overly simplistic, but it absolutely must be graceful. We can do better, we deserve better, than merely unzipped app folders with sporadic app-dependent updates.
I think providing a good "user experience" for all different roles, from developers, translators, packagers, admins and users, is key. If developers are happy and productive, users benefit.
I'm somewhere in between the classic zip/bundle/BFS-attributes crowd and the Linux-file-manager-that-must-support-multiple-concurrent-versions-of-Perl. I'm still very much into the packagefs idea, thinking it could be graceful and intuitive, but it could probably also be botched and done wrong.
Re: Package Management for Haiku
I can't tell you what to do. I invite every one to code it's own idea if they are not happy, and if you can't code, just finance a programmer to to it the way you want. Now that we are done with the whining i will tell you what i will do as a developer for MY apps.
I will ditch the library concept totally. I will use co-app (as in co-processor, companion) and the BeOS scriptable suite concept. I will not need centralized manager because the co-app will be able to auto update. The inter communication protocol will be based on the idea (i proposed on the Glass Elevator ML) of data unit, where all data have an associated unit. So, instead of using posix style lib, i will always need to "port" them, making then haiku native "lib". If i want to delete a co-app, the system will prevent me telling the co-app still have a contract with an app (a co-app can't use an app to prevent circular lock). If i decide to delete it anyway, my main app will still be able to launch, it will just lack some capabilities.
We already have to port GUI and drivers, so why not make native "lib". It would not require much other than enclosing them into a BApplication. This bring added overhead, but i really liked the early MPhipps idea of pointer based BMessage to speed them (maybe for R2).
Like many of you i would prefer to see the money spent on something else, but at least the ulcer will burst and we will be able to move on.
Re: Package Management for Haiku
@halo
"I genuine don't understand what's supposed to be special about the update mechanism in this "Tanka" business."
It's simple to understand. Take the functionality that a package manager provides, and liberate these functions from a single app and centralised database so that the whole system can call and use these functions.
So, traditional package manager is:
Specialised package manager app, centralised database of package information
Tanka is:
Shared library of package manager functions, package information distributed through file system
Do you understand the concept now?
If you do understand the concept, you can see that the benefits I've been describing all flow from this redesign. Traditional package managers could do some of what I describe, but they couldn't do so in an elegant way (imagine opening a package manager just to run an app bundle). By making the HPKG format understood by the whole system (and by giving package manager information directly to the files you're using) you're free to handle HPKG files in new ways. Easy updating app bundles is just one such benefit.
Now that you understand the concept (hopefully!), do you have any criticism regarding why it won't work? If you do, please say so, I'm willing to listen.
Re: Package Management for Haiku
It sounds like there is nothing special about your update mechanism, it's just extending the obvious update implementation for bundles to dependencies.
You've said an awful lot for an idea that can seemingly be summed up in very few words: "PackageFS bundles with dependency information in the package". That's not a particularly revelatory idea, and comes with all the trade-offs of dependency resultion, since something would need to do the job of a package manager to deal with dependency resolution and removal even if you call it something different.
I still think standalone PackageFS packages are by far the best idea. No dependency resolution. You download an .app file and double click and it mounts and runs. To "install", put the .app file in your Application directory and it appears in the Haiku menu. Put a symbolic link on your desktop and you have a shortcut. Put a symbolic link in a special directory and you can access it from anywhere in terminal (no messing with PATH like other OSes). For updates, an updater service checks the update URL in the headers for updates, prompts, and downloads an update to the current .app file. All the software's personal settings could be stored together in a different "application.settings" bundle. All really, really simple to use, no installation, no dependency resolution. Plenty of scope to be made secure too. It'd be an absolute joy to use.
Re: Package Management for Haiku
It sounds like there is nothing special about your update mechanism, it's just extending the obvious update implementation for bundles to dependencies.
You've said an awful lot for an idea that can seemingly be summed up in very few words: "PackageFS bundles with dependency information in the package". That's not a particularly revelatory idea, and comes with all the trade-offs of dependency resultion, since something would need to do the job of a package manager to deal with dependency resolution and removal even if you call it something different.
I still think standalone PackageFS packages are by far the best idea. No dependency resolution. You download an .app file and double click and it mounts and runs. To "install", put the .app file in your Application directory and it appears in the Haiku menu. Put a symbolic link on your desktop and you have a shortcut. Put a symbolic link in a special directory and you can access it from anywhere in terminal (no messing with PATH like other OSes). For updates, an updater service checks the update URL in the headers for updates, prompts, and downloads an update to the current .app file. All the software's personal settings could be stored together in a different "application.settings" bundle. All really, really simple to use, no installation, no dependency resolution. Plenty of scope to be made secure too. It'd be an absolute joy to use.
Yes, I have said a lot about it, and no it's not especially complex, which is why I can't understand why it's been so often misunderstood.
Even now you still don't understand the full scope, "PackageFS bundles with dependency information in the package" is only half the picture (plus info about dependencies aren't the only attributes needed). The rest of the picture, and what gives the idea the flexibility I've described, is by having package management functions accessible throughout the system rather than just the package manager. It allows all of what you describe in the second paragraph of your post, and more.
I've already given examples of the benefits of shared package management functions, but let's use a simple example so hopefully you see what I mean. You want to try out a new app you just read about on Haikuware, let's call it 'UltraRSS'. You could open the package manager app, search for the UltraRSS package, download and install it, but that seems less streamlined than it should be.
Instead, by making package manager functions accessible through all applications, your web browser can perform package manager functions DIRECTLY. Clicking on the UltraRSS HPKG link in Haikuware gives you a few basic options (the most common functions), which could be 'Install package', 'Configure as app bundle', 'Extract to folder'. All functions are handled by the same code that the package manager app uses, the functions are in a shared library so it's not a case of reinventing the functions but rather applying them in more intuitive ways.
Does it make sense to you now? If you understand it and can think of flaws, tell me. Thanks.
Re: Package Management for Haiku
Then throw an additional "plus an API for the package manager" to the end of my summarisation then.
Are you seriously proposing that every time someone tries to run an application they get to choose between "Install", "Configure as App Bundle", or "Extract to Folder"? Do you really think end users will understand the options and the consequences of them? I don't. People don't like making choices when they feel they don't have to.
The idea that providing lots of options results in having the benefits of all the options is ridiculous, and is another Linux-ism. The biggest single advantage to bundles is their consistency and simplisticity, something that completely disappears as soon as you add 3 other installation methods and throw dependency resolution in the mix on top of that. If you are doing that, then it's best not to have bundles at all and not confuse people in the process with something else they have to think about.
Defaults are also massively, massively important. No-one uses bundles or installers on Linux, everyone uses a package manager. No-one uses package managers or installers on Mac OS X, everyone uses bundles. No-one uses a package manager or bundles on Windows, everyone uses setup. No-one on Android uses installers or bundles, they all use the market.* Whatever the default is, people will use and abuse it, whatever the relative merits and the long-term impact of it is.
* Before someone decides to argue, I realise there are exceptions, and a tiny amount of companies or people use each of the methods on each of the platforms. However, it's clear that people using the standard installation method represent the overwhelming majority.
Re: Package Management for Haiku
@halo
Are you seriously proposing that every time someone tries to run an application they get to choose between "Install", "Configure as App Bundle", or "Extract to Folder"? Do you really think end users will understand the options and the consequences of them? I don't. People don't like making choices when they feel they don't have to.
You're just nitpicking now. I was giving a basic example of the options so you'd understand, clearly I overestimated your intelligence. Let's make it super easy for you to grasp. In Web+, double click on a HPKG file and it performs the default action, right click menu gives you more install options. Default action for HPKG can be set by the user, but Haiku ships as handling double clicks on HPKG as creating app bundles by default. In other words, for people unable to make a choice like you, double clicking on a HPKG creates an app bundle. Does that please you my lord?
Re: Package Management for Haiku
In other words, for people unable to make a choice like you, double clicking on a HPKG creates an app bundle. Does that please you my lord?
Well this unclear to me... why "create the bundle" the HPKG can not not be the bundle itself?
That is default action: double click and the application starts (the first time check and eventually INSTALL dependency), if right click you obtain "Extract to a folder" or "install" (that is simply copy the bundle itself on the Haiku default application folder and put a link on Haiku Deskbar).
Another great thing of the bundle is portability I can put my application(s) on removable drive go to friend house and double clicking on it and it starts!
Other example I have 2 partition Haiku System and Applications Partition... for some reasons I've to format Haiku partition... well I've not to install nothing, my applications are in their partitions and continues to works as usual! For me this a very powerful thing...
A side note is only me or this thread as problem "of time orders"?
The thread up this is here from yesterday... Zeno Arrow's (that apparently is 10 threads first) result new!
Very Strange :-)
Ooops it happened again! This post is followed by the vim Arnold is of yesterday at 20! It is a little impossible that I have written this first of Arnold, I've written this now! It is 7/1/11 14.10 for me...
Re: Package Management for Haiku
In other words, for people unable to make a choice like you, double clicking on a HPKG creates an app bundle. Does that please you my lord?
Well this unclear to me... why "create the bundle" the HPKG can not not be the bundle itself?
That is default action: double click and the application starts (the first time check and eventually INSTALL dependency), if right click you obtain "Extract to a folder" or "install" (that is simply copy the bundle itself on the Haiku default application folder and put a link on Haiku Deskbar).
Hi fano. The HPKG contains the app bundle information, but you must remember that HPKG compresses the data stored within. If you want to extract the data every time you run an app bundle then fair enough, but it makes sense to me to extract the data only once.
What I mean by creating the app bundle is extracting the archive and adding a shortcut to the application to the Tracker. You could still select the HPKG icon to start the app bundle.
@all
I'd be interested to know what OSX does when installing app bundles, for example do you have to run the app bundle to add it to your list of applications, or does downloading the .dmg file automatically add the application to your list of applications (e.g. does it show on the OSX dock straight away after download is complete)?
Re: Package Management for Haiku
Hi fano. The HPKG contains the app bundle information, but you must remember that HPKG compresses the data stored within. If you want to extract the data every time you run an app bundle then fair enough, but it makes sense to me to extract the data only once.
What I mean by creating the app bundle is extracting the archive and adding a shortcut to the application to the Tracker. You could still select the HPKG icon to start the app bundle.
Mmmh I understand you think this slowdown the starting of the application... I don't thinks make a lot of difference but its should good thought, I suppose!
(Apple Bundles are simply directory with .app at the end Apple tracker know is abundle and shows it as it is a file! But in reality is a directory).
For do this in a "transparent" way (that is the user not see the ugly directory structure) could be a sort of temporary "cache" folder in which applications are silently decompressed so in practice the first time the bundle "is executed":
The next time you click on the bundle "decompressed folder" attribute is set: application simply starts... as /var/.cache/xyz.app/xyz is written!
A little complicated, but feasible in the end...
The real question is compression is necessary in the first place?
I mean a application is not really very compressible for the majority is composed of binary data (executable, libraries, images) and maybe some little (circa 1-2 kB)text file... the result of compression maybe maximum 1-2% reduction on file size... it is really necessary to compress it?
@all
I'd be interested to know what OSX does when installing app bundles, for example do you have to run the app bundle to add it to your list of applications, or does downloading the .dmg file automatically add the application to your list of applications (e.g. does it show on the OSX dock straight away after download is complete)?
I've used MAC OSX only one time in my life and I was really surprised by the simplicity of the "installation" mechanism after the download from the producer site Safari asks me (I not remember if on first click or auto magically at the end of download) if I want to copy the application on the app folder with a slighty animation... the application is copied (installed if you want) a link is created in the Apple dock... DONE!
If I not wanted to install the .DMG is on the desktop (with a HDD icon as is a disk image in reality) I can click on it and the application starts simply as say 1-2-3...
I sincerely not know if it is decompressed silently (I suspect it is not compressed for first!)
Some links:
http://developer.apple.com/library/mac/#documentation/CoreFoundation/Con...
http://en.wikipedia.org/wiki/Apple_Disk_Image
and:
http://developer.apple.com/library/mac/#documentation/Porting/Conceptual...
Re: Package Management for Haiku
@fano
I agree with most of what you said above, certainly expanding of a compressed HPKG to make an app bundle will happen in the background. It would be better if compression was optional, but I don't see how that can be achieved with the current HPKG format. Perhaps we need a different type of wrapper for app bundles. Format choices will not affect the end user in terms of consistency, Haiku stores file type information in MIME format, three letter file extensions aren't displayed in the same way as other systems (Windows for example).
Would be interested to know if .dmg employ any compression. In any case, what we're proposing can work just as fluidly as .dmg, with added options for developers and users, making it better than OS X's solution.
Re: Package Management for Haiku
@fano
Would be interested to know if .dmg employ any compression. In any case, what we're proposing can work just as fluidly as .dmg, with added options for developers and users, making it better than OS X's solution.
Adding unnecessary complexity for the sake of "more advanced powah!!!1!!" sounds like a Linuxism that would almost certainly not be better than Mac OS X's solution. How much more simple than "drag to install" can you get?
Re: Package Management for Haiku
@fano
Would be interested to know if .dmg employ any compression. In any case, what we're proposing can work just as fluidly as .dmg, with added options for developers and users, making it better than OS X's solution.
Adding unnecessary complexity for the sake of "more advanced powah!!!1!!" sounds like a Linuxism that would almost certainly not be better than Mac OS X's solution. How much more simple than "drag to install" can you get?
Double click to install is simpler, in my opinion, however that's not what you were getting at...
Just because a package management system like Tanka gives you more options, whilst still remaining elegant, it doesn't imply 'unneccessary complexity'. Why can't you understand, deploying Tanka would let you use app bundles, just how you want to. The package management code is written once and shared across the system, giving everyone their preferred method of handling apps. Why is that a bad thing, why do you fight it? Is it because other people aren't as in love with the concept of app bundles as you, and must be 'educated'?
Re: Package Management for Haiku
Just because a package management system like Tanka gives you more options, whilst still remaining elegant, it doesn't imply 'unneccessary complexity'. Why can't you understand, deploying Tanka would let you use app bundles, just how you want to.
Tanka doesn't exist. I can dream up the perfect system that never fails or causes anyone grief, but from experience, that won't be the end result when (if) you actually write it.
The package management code is written once and shared across the system, giving everyone their preferred method of handling apps. Why is that a bad thing, why do you fight it? Is it because other people aren't as in love with the concept of app bundles as you, and must be 'educated'?
I fight it because it's a dumb idea that will result in a huge amount of complexity, ignores the current state of the art, and is put forward by someone who doesn't seem to have ever even used Mac OS X and instead wants to apply Linuxisms to a desktop operating system.
Re: Package Management for Haiku
Just because a package management system like Tanka gives you more options, whilst still remaining elegant, it doesn't imply 'unneccessary complexity'. Why can't you understand, deploying Tanka would let you use app bundles, just how you want to.
Tanka doesn't exist. I can dream up the perfect system that never fails or causes anyone grief, but from experience, that won't be the end result when (if) you actually write it.
You need to give me reasons why it won't work, beyond the challenges in implementation (which any system will have). I've outlined what is possible, if you think I've made a misjudgement in what I've suggested can be done, then call me up on it. I keep on asking people to tell me about the flaws but no one has told me why it won't work.
The package management code is written once and shared across the system, giving everyone their preferred method of handling apps. Why is that a bad thing, why do you fight it? Is it because other people aren't as in love with the concept of app bundles as you, and must be 'educated'?
I fight it because it's a dumb idea that will result in a huge amount of complexity, ignores the current state of the art, and is put forward by someone who doesn't seem to have ever even used Mac OS X and instead wants to apply Linuxisms to a desktop operating system.
So app bundles are state of the art now! Hahahaha. I've used computers released in the 80's with hidden folders, now Apple use them and it's 'magical', 'state of the art', please...
Please explain how storing package management attributes in the file that needs them adds 'a huge amount of complexity', I'm all ears.
I've used a variety of different systems, admittedly I've used OS X least of the three major platforms, but we're talking about concepts here, and app bundles aren't exactly a hard concept to grasp. If we were trying to clone OS X then you'd have a point, but we're not trying to clone OS X. Haiku offers the chance to do something different, what I've proposed fits in with Haiku's philosophy and technologies. If all you wanted was OS X then why are you here?
Re: Package Management for Haiku
Would be interested to know if .dmg employ any compression. In any case, what we're proposing can work just as fluidly as .dmg, with added options for developers and users, making it better than OS X's solution.
I've studied the Apple way: a bundle is simple a special type of directory with a particular structure; the Finder recognize it via mime type and show it as a file: that is a bundle.
As is in reality a directory is NOT compressed!
DMG is only a means to distribute a bundle as it is difficult (impossible?) to download a directory via browser or ftp. It is a disk image that contains the bundle only.
A DMG can be optionally compressed and encrypted if you want.
If you double click on it the OS reacts mounting the virtual drive as if you had inserted a removable drive. In it you, obviously find the bundle: you can execute from it, copy where you want or "install" that for Apple imply simply to copy on the system application directory.
In this way nothing is done mysteriously but it is all clear for the user... you have downloaded a compressed archive (in the end the pompous DMG is that... a compressed archive), then clicked on it and the OS mounts it (analogous as open an archive in memory... the windows way) and then YOU can decide to execute the bundle (that from the user prospective IS the application) from it directly, copy wherever you want, install or put in the trash when it annoyed you...
I think the DMG can be substituted with a zip or maybe with the hpkg in the end not is so different from an archive... as DMG is not so different.
The only thing I can find as defect is too many user operation... the ideal thing will be to distribute the bundle as is... but is a directory!