Ubuntu QA:
BlogBrainstormPackage status
Log in
Ubuntu QA
The Ubuntu community has contributed 17459 ideas, 107690 comments, 2263278 votes
Idea sandbox Idea sandbox
Popular ideas Popular ideas
Ideas in development Ideas in development
Implemented ideas Implemented ideas
Idea #21385: Many game/software vendor dislikes packaging systems

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.

-55
votes
up equal down
Solution #1: Create D-BUS API for installers
Written by Lachu the 10 Sep 09 at 07:55.
Ubuntu(and other distribution) should provide D-BUS based API for installer/uninstallers. You will get extra points if you integrate it with package database ;-) .

It should been integrated with PolicyKit, so administrators can give users access to install many kind of software(example software, which no needs setting suid bit and installing in /opt and don't change any files, can be installed by normal user; software which needs install in /sbin or /bin or /usr/bin, /usr/sbin should be installed only by superuser; or whatever).

This API should gives many functions, like copy executable into system directory(/bin), copy executable into superuser directory(/sbin, /usr/sbin or whatever), install user library(/usr/lib), install system-wide library(/lib), change file(delete existing file or writing own in the same place), change group of file, change owner of file, set uid bit, set guid bit, install nonexecutables(data) to /usr/share/*, installing user software(only have access to /opt), start installation.

All this action will be logged and reported. Additionally user may have simple uninstall software by system tools, because all performed operation are logged.

Installer should first call start installer function, so system show message to user like: This program will install software - continue? If user agree, DBUS returns the path, where the installer should unpack all of the files (in /tmp directory). Of course installer should register software name, etc., but it is long term task. If this is a game, it should install in /opt, so it call DBUS API to copy file from unpack folder into specify /opt folder, like copy_file_to_opt(file_name, opt_suffix).

I know is less secure than installing package, but is more secure than giving installer root privileges.
248
votes
up equal down
Solution #2: Create a universal package format
Written by dandart the 10 Sep 09 at 20:43.
Create a format that all distros can use and is easy to implement. Perhaps integrate into Apt/Rpm or have packages that both can understand somehow. Then we can download "Linux" package without having to worry if we want Apt or Rpm.
124
votes
up equal down
Solution #3: Support applications for single users
Written by andruk the 11 Sep 09 at 02:12.
The reason apt needs root permissions is because the applications it installs are installed system-wide and therefore affect other users. If we allowed users to install programs to their home directory, then they could run their installed applications without affecting other users, and therefore wouldn't need to give apt root access.

This would have advantages with home users because my Applications menu wouldn't get cluttered when my daughter installs Barbietown to her home directory.

This would have advantages with sysadmins because they can run a piece of software from their home directory to test it out before installing it system-wide.

The system paths would have to be modified to look for libraries and executables in the home directory, but applications like Xournal already support this. This would also require the Applications menu to look in the user's home directory for the menus as well.
-33
votes
up equal down
Solution #4: Create libraries/shell script allowing to install package in specify directory
Written by Lachu the 12 Sep 09 at 17:59.
Like in solution #3:
The main problem is many application have hardcoded path. There's no way to detect/guess path of specified file. Of course, we can recompile package, but it lack functionality for users.

The solution is simple. Create script scheme for setting environment, where specify files are placed. It should set PATH, LD_LIBRATY_PATH, XDG_HOME, CONFIG_PATH, etc. Script will also checking dependency and fixing it if not satisfied(also using install into directory technology).

Create also library, which allows program to read these setting/environment. Program should don't read file from /etc/program_config, but from $CONFIG_PATH/program_config.
If some environment isn't set, library should return default value.

User will have many scheme of installing application - install in: user home directory, system-wide(/), opt(/opt), custom paths.

And of course -- allow to set flag SUPPORT_PATH_SELECTING for package.
40
votes
up equal down
Solution #5: Autopackage, anyone?
Written by o-bin-lad3n the 15 Sep 09 at 20:05.
This is much like #2, but why start from scratch?
We could push for better support and integration of autopackage with apt, rpm, etc.
Also, I think the need for root-permissions itself is not the real problem, it's the need to blindly trust the file you just downloaded. Of course, there is always a way to mess with a system, when the user executes your software, but this would be way better than "sudo ./somefileijustdownloaded". Autopackage can run with user rights and install into your home directory. And you can still integrate gpg-keys with this solution.

I'm not suggesting this as THE universal package format, but as a common solution for third party/proprietary software and commercial games.
36
votes
up equal down
Solution #6: apt capable of install and manage any software on earth
Written by darkjavi the 21 Sep 09 at 16:47.
And what about giving to apt/aptitude/synaptic the ability to control/install any software on earth not only deb packages.
apt could run the instalation from is inside and chroot the destination of the files generated by the installer into his own folders, so we can manage all the computer software from a single interface
8
votes
up equal down
Solution #7: Sandbox for installers.
Written by Lachu the 23 Sep 09 at 17:29.
Create sandbox for installers. It will check selinux context and when it isn't designed for installers, it will change it and fork with exec on executable file! It can't sets UID/GID bits or change any existing file, but can access to system directories.
-12
votes
up equal down
Solution #8: New compatibility layer
Written by Afroman10496 the 27 Sep 09 at 02:31.
You all know how Wine works, right: importing an opensource clone of the Windows API. Now, imagine that for the Red Hat YUM/RPM compatibility. It's already opensourced, so you won't have to actually clone it. Also, you already have most of what you need because it's all Linux :>. Just offer it as a regular package and when users click on the .rpm just offer a dialog asking if they want to install it or Alien, showing all the pros and cons.
5
votes
up equal down
Solution #9: make a gui for alien, and make it be default for rpm files
Written by ratdude747 the 27 Sep 09 at 22:01.
that would fix the rpm issue. beginners seem to get "scared" of the command line, and a gui saves time. that way, no matter whether they download an rpm or a deb, they are covered.

making it the default app for rpm would make it so a beginner wouldn't extract it by accident with archive manager. maybe you could then auto-load the resulting .deb.
16
votes
up equal down
Solution #10: DEB packages are good!!! Promote them harder!!!
Written by warlock24 the 7 Oct 09 at 17:38.
Do not multiply another installer formats, apis, ect. they only do unnecesary complicity of Ubuntu. Promote DEB packages to become unofficial standard for every linux. Develop visual tools for easy and fast creation of deb files (something like debGLADE?).
1
votes
up equal down
Solution #11: Create hybrid/common package format.
Written by Lachu the 28 Oct 09 at 07:42.
Not create new package format/packaging system, but allow to pack many packages into single archive. Structure will looks like this:

root
|
+definition&scripts
| |
| +deb
| +rpm
| .....
|
+files(must have structure like tar.gz - if in specify distribution one file must be moved into other directory, it's task for script)
|
+common definitions (name of author, license, features - installation into directory, etc.)


How distribution should handle it? In simple way. It will only unpack it into /tmp and handle as normal package(ex. run installation script for this distribution). It can also generate .deb or .rpm.

It should helps users, who like to download software from network. It can also helps game creators, because CD's can be used as repository of software.

Maybe there can occurs some problems with binaries, but most data of program is a resources, like icons, graphics, etc. Resources are shared, so there is a reason to create hybrid format.

Propose your solution

Attachments
No attachments.


Duplicates


Comments
Lachu wrote on the 10 Sep 09 at 07:57
Installing not executable should only require user privileges, but changing files will always need root password.

Lachu wrote on the 10 Sep 09 at 07:59
If installer fails, Ubuntu should revert any changes.

andruk (Idea reviewer) wrote on the 11 Sep 09 at 02:07
Edited solution #1 for grammar and clarity.

coolen wrote on the 11 Sep 09 at 03:06
Isn't this being worked on in the LSB?

Lachu wrote on the 11 Sep 09 at 06:02
This is not problem related to packaging system.

@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.

Lachu wrote on the 11 Sep 09 at 06:04
@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 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.

mikaelstaldal wrote on the 11 Sep 09 at 10:55
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.)

Lachu wrote on the 11 Sep 09 at 11:59
Only may idea will solve problem ;-) .

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?

Lachu wrote on the 12 Sep 09 at 18:02
Idea 2-3 isn't related to rationale, but I have decided to place similar solution/idea like ideas 2-3, so it's no problem for my.

Without first solution satisfied, we don't make world better. Software companies will still making installers, but installers are bad think.

Lachu wrote on the 13 Sep 09 at 13:27
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).

Lachu wrote on the 15 Sep 09 at 20:51
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
Why install in /opt for single user when you can install in /home/$USER ?

Lachu wrote on the 17 Sep 09 at 17:38
Using automake with PackageKit could be great improvement! But it still force to have source.

I must admit PackageKit force common naming scheme for packages. We can use this scheme in many places.

I must tell also, that Ubuntu don't contains PackageKit.

Lachu wrote on the 20 Sep 09 at 19:33
@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.

Lachu wrote on the 20 Sep 09 at 19:34
We can user fakeroot if user install tool works in user space.

Idea to place files owned by root is no good and possibly you need, that other user can user installed application.

Lachu wrote on the 29 Sep 09 at 16:52
@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.

Lachu wrote on the 2 Oct 09 at 13:03
@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.

Lachu wrote on the 2 Oct 09 at 13:05
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.

Jan-Nik wrote on the 7 Oct 09 at 09:13
Hi there,

I'm the current main developer of Autopackage and have to agree with solution #5. Why start from scratch?
Autopackage already supports solution #3.

Yfrwlf wrote on the 7 Oct 09 at 11:49
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)

billdotson wrote on the 7 Oct 09 at 14:39
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.

billdotson wrote on the 8 Oct 09 at 00:56
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.

Lachu wrote on the 10 Oct 09 at 12:15
@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.

Lachu wrote on the 28 Oct 09 at 07:47
@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).


Post your comment