Written by Lachu the 10 Sep 09 at 07:55.
Category: System.
Related project:
Nothing/Others.
Status: New
Rationale
The problem is software vendors don't like apt/yum, etc. and provide own installers. Giving some tools, like installer root privileges is a security hole! Many installers actually needs root privileges - it's very bad situation.
@Solution #3: This is exactly what I think. I have describe in my solution multiple parts of system permission, like /opt for installing application by normal user, /sbin for installing system wide applications, etc. Additionally my idea include policy to overwrite files. How did you like do this by packaging system? Many programs have compiled-in libraries path or needs to set special environment variable. Package describes where we should put files included inside. We can use chroot, but we don't provide users pace chroot yet. Using chroot method will cause additionally problems.
@Solution 3: We don't need to change behavior of system menus. Actually all home directories contains place, where menu activators should be placed(look for example at PlayOnLinux).
Darwin Survivor(Brainstorm moderator)
wrote on the 11 Sep 09 at 10:38
Solution 3 is already in place. Just look at urban terror, the entire game runs out of a single folder.
All the developers need to do is create a user-level script that extracts the game data and adds a shortcut to the menu.
This is a not a linux problem, this is developers assuming that they know better than their customers and DEMAND that their installer script run as root even though the only reason for that is if you are installing for multiple users.
Solution #3 as I understand it is good. However, Lachu have obviously understood it differently since he/she insists on dragging /opt into this.
Installing an application for a single user should ONLY affect the user's home directory, not /opt or anything else outside the user's home directory. The only exception is that it's OK to use /tmp for temporary storage.
No new API is needed for this, only changes to dpkg/apt and perhaps a different packaging practice.
(Lachu is correct that we don't need to change behavior of system menus, they already work as desired.)
The topic was not: installing software for user
but: installers sucks, because some needs root privileges to copy files into system directories.
Why we should giving them root privileges?
I know that you will kill me after read this, but I must write about it.
Imagine specialized interdistribution packaging system to install package into specify directories. Default option should be /usr/share/ for shared data(example application icons, new wallpaper) and /opt/app_folder for others(binaries, libraries, unshared data, like levels, sounds). This packaging system should prevent to setting suid or guid or setting specify owner of file or access rights.
It should use PackageKit to solving dependency in first step. If PackageKit fails, it can download package from own repository or from internet(specified source - if user agree). Next it will generate runner as described in #4 idea. Application provided by this package system should be linked with path resolver(as solution #4). Path resolver should have get_path_for_resource(char *res_name, int type, char *mime), where type can be BINARY, LIBRARY, SHARED_DATA, WALLPAPER, ICON, LINK, SOUND, VOICE, CURSOR, UNSUPPORTED_DATA.
What is most interesting in this idea is packaging system above other packaging system. PolicyKit can helps us, because it provides package naming scheme(so it no way to some package supported by packagekit have different name).
We can using fakeroot to install software into /opt without root permisions. Of course it shouldn't allow to write on files of different users, so /opt should have sticky bit set.
@mikaelstaldal wrote on the 16 Sep 09 at 09:53 : Because we can use fakeroot to avoid malware. There will several problems occurs, when we do this in my way, example with updates(why application should update themselves?), but it protect against malware.
@Darwin Survivor wrote on the 11 Sep 09 at 10:38 : Exactly - it's not operating system problem, but it's user problem, because software distributor have plan to conquest whole world.
@Solution #8: New compatibility layer : The same solution I propose in this("Lachu wrote on the 13 Sep 09 at 13:27") comment. Actually PackageKit is only compatibility layer for many cases, but not for all. It would be good solution to develop file-based locker for packaging system. Some like - apt will register new package and tells system file /etc/configuration_file is owned by this package. If yum tries to overwrite this file, system will suggest to remove packacge, which owned /etc/configuration_file.
That's all. No magic. It will allow to working with many packaging system at the same time. And of course, there should been API for this - very similar to I suggest on first solution.
Basically - if file /etc/configuration_file is owned by the same packaging system, which would like to modify/remove them, we allow to do this. If this file belongs to other packaging system, we disallow to perform this operations. Is very similar to DAC, but files would have also packaging system or application as owner.
There's no reason solving this problem cannot be accomplished.
As far as dependencies being an issue, it doesn't require the "main" solution the LSB is implementing which is to make all distros have a standard set of libraries. While that may be somewhat helpful, all that is needed is a system to get users the required packages when they want something, and for that you just need a proper standardized way of communicating. Otherwise, if you include all libraries with your package then that gets rid of that, but it would be nice if there was something in place so you didn't have to waste that bandwidth.
Linux should utilize standards to wazoo and back, have them be available to make things more interoperable, so this is something which definitely needs attention.
Software on Linux is lacking enough as it is. Don't make things worse by fragmenting the Linux software ecosystem. Love your developers and give them the ability to release a single package for users to download. (and on a related topic, make adding repositories to install and then keep the software up-to-date easy, too)
It is absolutely one of the most annoying things for a developer to insist on making their own installer instead of using a (good in my opinion) stable one. That is one thing that is so infuriating about Windows.
I have not had any of the issues you mention. I don't think I was talking about letting a distro build your application, I was thinking of the developer building it themselves. I have never had any issues with a debian package personally.
@Solution #2: Create a universal package format : All package is only files + installation script + description. It will be great if we allow to put installation script to many distributions.
@Solution #11 : Will help with creating common package format. We should create hybrid package format and create consortium to care about it. Some information are common, so in first stage should be inserted in common definitions section and into specific distribution section(scripts).
I think a lot of people don't realize that a) creating more standards only increases the problem (http://xkcd.com/927/) and b) the dpkg command already has an option for installing in non-root directories