Browser, URL support
With all the websites out there sporting links to RPMs, I'm curious how
this idea sounds. Make apt into a helper application for browsers
(still text based is fine). Where a link on a page like:
http://www.somewhere.com/somepackage.apt
with a mime-type: application/x-apt, would get opened by apt. The
contents of the file would be something like:
package somepackage
version 0.3.5
alt-deb http://ftp.somewhere.com/debian homebrewed main
apt could prompt you to be sure you want to install 'somepackage', then
try to find the package in your normal locations in /etc/sources.list.
If found in one of your current sources.list archives, and a specific
version was requested as in this example, it would compare the version
in the archive to the version requested. If found, but a version
mismatch exists, it could prompt you if you'd like to install the
alternate version.
Upon saying 'no' to that question it could then prompt you if you'd like
to get the file from the location listed on the 'alt-deb' line.
Assuming you're in an environment where some people have sudo
priveledges to run apt, this last option should only be allowed if the
actual user has write priveledges to /etc/sources.list. A good strong
warning would be nice right about here. I don't fully understand the
security mechanism in Linux or what the application knows about the user
when being run from 'sudo', so I don't know if this is actually possible.
In an environment such as I'm using I could then tell mozilla that
application/x-apt / .apt files are to be handled by 'xterm -c sudo
apt-web-get %s'.
An alternative URL format could be used instead, to contain all the
information I'm proposing be put into a separate file. Then I think I'd
tell mozilla to use 'xterm -c sudo apt-web-get %u' ... I think.
Anyhow, with this, the fine people that have deb packages for their
software can make it real easy for us to click and install from the web,
while still maintaining the robustness and security of the deb/apt
packaging system.
Ryan Warner
Reply to: