OfflineUpdateSpec
Launchpad Entry: https://launchpad.net/distros/ubuntu/+spec/offline-updater
Created: Date(2006-05-01T07:27:18Z) by BaishampayanGhose
Contributors: BaishampayanGhose
Packages affected: A new package to be created (offline-updater)
Summary
We need a way to update Ubuntu installations which are not connected to the Internet. In many developing countries most of the people don't have access to the Internet. Though the Ubuntu CD contains many useful applications, they are very basic in nature and don't contain many useful applications. Also the security updates which are made available by Ubuntu aren't useful to people without Internet. This tool will enable a user to create Service Packs by downloading updates and required applications with dependencies automatically. Those Service Packs then can be installed with ease on other machines using this tool.
Rationale
The basic difference between Ubuntu and other distributions is that Ubuntu being a single CD distribution, can only put in a limited number of applications in the CD. While it's very easy to install more packages via Synaptic, people who don't have access to Internet find it very difficult to install more packages and updates. Also multiple installations which are not connected to each other have to download and install the same packages multiple times to install them. This not only is sub-optimal, it also wastes a lot of bandwidth.
Use cases
Joe has Ubuntu installed in both University and Home. He wants to install the LAMP stack in his home but he doesn't have Internet connection there. He uses the tool to download and create a Update Pack and takes it home in his USB Thumdrive. He then installs the LAMP stack on his Home machine using the tool.
Jane has multiple PCs in her office which use Ubuntu but are not connected to each other. She wants to install the security updates to all her PCs but doesn't want to download the updates on all the PCs. She uses the tool to create a Service Pack and burns the pack to a CD. She then installs the Service Pack to all her PCs from the CD. She also uses the same CD for updating her PC at Home.
John's mother uses a standalone Ubuntu PC. Each time security updates are released, he creates Service Packs using the tool and mails them on a CD to her.
Scope
- Installation and upgrading of packages
Design
- The tool should calculate the dependencies of the package to be downloaded and download them
It will create an archive from the downloaded packages by using apt-ftparchive and create an archive from it
- It will also add some Metadata to the archive if needed
The archive will be used as the Service Pack when installing
- When installing, the tool will first decompress the archive and then will install all the packages in the directory
- Optionally, it should be able to roll-back to a previous state in case some error occurs
- Some sort of heuristics should be added so that the tool doesn't download all the dependencies. The specifics are yet to be decided.
- As for the above heuristics, just excluding the packages included in the first CD seems feasible enough for the time being
- Integration with Synaptic may be considered once this tool is useful and stable
attachment:screen1.png attachment:screen2.png
Preliminary mockups of the GUI
Implementation
The tool will be written using Python,GTk+ & python-apt. An Ubuntu package will also be made.
BaishampayanGhose will do the programming
BaishampayanGhose will do the packaging
The discussion about the design of the tool is being summarised in ["OfflineUpdateSpec/DesignDiscussion"]
Comments
mvo (2006-05-03): I love the idea and the spec. Some minor things: I think we should use "apt-ftparchive" these days instead of "dpkg-scanpackages". But they are similar enough. I'm not sure that the archives needs to be compressed again (because debs don't compress very well). If we don't compress them the user does not have to unpack them on the local machine but can install directly from the cd and can use apt-cdrom add/synaptic cdrom support to get the packages from it. We may consider putting some additional meta-data on the cd to have some sort of "recommended install" (e.g. a add-on-cd with gnustep could recommend a gnustep meta-package or a add-on with some lean office apps could recommend gnumeric, abiword, scribus). Those recommended installs can then be displayed by e.g. update-notifier that detects when a cd is inserted (that is what it can do already).
Unfortunately roll-back is not easy (but would be very cool to have). The problem with rollback is that package downgrade don't work in the general case because postinst scripts can to stuff that works only one way (e.g. upgrading a datafile to a newer format, remove old symlinks etc).
For the heuristics, I think we might try to assume that at least "ubuntu-minimal" is installed so that we dont need packages that are dependencies of this package. We need to be careful about the versions because a user may need a newer version from e.g. dapper-updates for a particular tool. We may even add a "[ ] has ubuntu-desktop" installed to minize the download even further.
BaishampayanGhose (2006-05-03): I have added the above suggestions from mvo to the spec above.
LaszloPandy (2006-05-05): First off, I absolutely love this idea. Here are some questions/problems I came across while thinking about how this could be implemented:
- Many Service Packs would most likely only assume that the ubuntu-desktop or ubuntu-minimal sets of packages are installed. But for users creating their own Service Packs, this would make it include more dependencies then necessary, and make the size much bigger. Would there be a way to export a list of installed packages (including versions) from the target machine which would be taken to the download machine to intelligently reduce the bundle size?
- If the target machine has also installed many other applications in addition to the base Ubuntu system, and the user would like to update those as well, what would be the best way to transfer the required package list to the computer with internet access?
- Should the user be allowed to do selective upgrading (i.e. only upgrading some applications but not all of them)? If so, this would require a more complex user interface, as well a list like in the first point.
BaishampayanGhose (2006-05-05): Laszlo, thanks for your comments, my replies are here --
I agree with that. Probably we will create some diagnostic tool which will basically do a dpkg -l and generate a report on the client system, and on the basis of that the deps will be calculated.
- Again, I guess the diagnostic tool might help in this regard.
- Possibly. That'd include the use of APT-Pinning. The UI will certainly be more complicated, IMHO we would be better off integrating this feature to Synaptic itself.
Bill Cairns (30-05-2006): I think that this is a great idea and will greatly improve the useability of Ubuntu to those of us who have no, or only slow, network connections. (I have machines with both!) I know that this is absolute heresy - but this tool would be extremely useful if it was also available under Windows. Many of us only have broadband access on Windows platforms. It would be great to be able to create an update pack under Windows and take it to the Ubuntu machine. If the tool is to be programmed in Python this may not be too difficult.
Rene Rattur (01-06-2006): I have been wanting for this feature for a long time. You should definetly add support for Windows platform. How about the users run some tool on their ubuntu boxes, which generates metadata file saying that the user has the default ubuntu installation + some extra packages. Then the user could take this file to some other machine having a internet connection and feed this file to your application.
Jakob Petsovits (2006/06/08): It would also be a good idea to seperate the gui/gtk+ part and the worker part, making a library for the latter one which is then used by the gui. Maybe you had this in mind anyway. This approach makes it easier to build a similar KDE tool (or, if you want, a native Windows one) on the same code base and can only benefit the viability of this project.
Lukas Sabota (6/21/2006): I concur with Jakob's above statement. Also, a command-line tool would be beneficial to many.
CypherBios (8/26/2006): See this project, has been started, and maybe we can work together - [http://aptoncd.sourceforge.net APTonCD]