Please check the status of this specification in Launchpad before editing it. If it is Approved, contact the Assignee or another knowledgeable person before making changes.
Packages affected: apt, aptitude, apt-setup, gnome-app-install, gdebi, adept, synaptic and all programs that handle apt sources and packages
In the beginning sources.list was a good idea. Right now, it is a point of pain for end users and maintainers. This spec will propose a flexible and versatile replacement, addressing many needs that I have seen as a person who gives support to users, as a third party source for Ubuntu packages and as someone who sees the bugs in apt and pain for mirror admins that this can resolve.
Editing sources.list is cumbersome and error-prone. sources.list.d already makes this a bit easier, but still fails to recognize that a software channel is so much more than a sources.list entry.
- A software channel contains packages, maybe it has mirrors and there are many types of software channels.
- A software channel can be PGP signed
- A software channel contains software that should be easy to install via gnome-app-install
- Third party channels should be easy to create
- Distribution upgrades should be as easy as upgrading a channel entry via apt
- Sources.list can be commented, but comments aren't easily translatable
- Steven is an Ubuntu user. He wants an easy way to add new software sources without editing configuration files
- Mark is an entrepreneur offering closed-source packages for Ubuntu. He wants to make it easy for users to install them
- Simon is a QA person. He wants to make sure that users are warned when using unofficial packages
- Colin is a distribution maintainer. He wants to make it easy to enable only a few components of his distribution by default but make it just as easy for end users to add other components
- Karl is a mirror admin, he wants to make sure users can use close mirrors of the things that are mirrored by his mirror network
A 'software channel' should be easy to enable, also for third parties. Therefor it must be a single file, on which a user can double-click to install it. Fortunately we already have such files: .deb packages. A software channel can simply be a .deb package. No new software needs to be written for them: gdebi is already there for third party channels and Ubuntu channels can be easily upgraded.
Contents of the package
First and foremost, a channel contains software sources. While we're redesigning this: let's make them much more flexible as well.
This example shows it all:
- Support multiple channels in one file
- Mirrors integrated in the sources, both general and per-country mirrors
- Easy to mark disabled
- Unlike sources.list, these files are not to be edited. Making upgrades much easier.
[channel] name=Ubuntu supported packages name[nl]=Door Ubuntu ondersteunde pakketten name[de]=.... name[fr]=.... key=GPGKEYIDHERE enabled=True release=dapper components=main restricted [binary] default=http://archive.ubuntu.com/ubuntu mirror1=http://mirror.ubuntu.com/ubuntu nl=http://nl.archive.ubuntu.com us=http://us.archive.ubuntu.com ca=http://ca.archive.ubuntu.com [source] you get the idea [channel] name=Ubuntu security updates etc...
The default ubuntu install should install 7 channels: main+restricted (normal, updates, security), universe+multiverse (normal, updates, security) and dapper-commercial (not neccessarily in .channel files, apt-setup also needs to be modified). Only the normal and security channels for main+restricted should be enabled by default.
The .desktop files for gnome-app-install / adept-installer can also be integrated here. This way they can be disabled when the channel is disabled. Making the clumsy "show unsupported/commercial" entry obsolete. It also makes it easy for third parties to add files to gnome-app-install.
Adding keys this way is also easy. A graphical apt-key utility should be written. The postinst of the channel package can simply use this to install the key. The apt-key program and/or apt should be modified to emit warnings for third party channels.
case "$1" in configure) if "$DISPLAY") gdebi --add-key /var/lib/channels/1265DEA2 else apt-key add /var/lib/channels/1265DEA2 fi ;; esac
Data preservation and migration
Non-ubuntu entries in Sources.list should be converted upon upgrade. Ubuntu entries can be dropped.
BoF agenda and discussion
- A suggestion, in the channel file above, it lists a "components=main restricted" line. I think this line should be expanded with all the possible components in the repository ("components=main restricted universe multiverse"), with another line added "enabled=main restricted". In this manner, only one section is needed per repository, and another whole channel file does not need to be added to change which components are enabled. -Matt Kuiken, 07 Jan, 2007
- Software channels also have relationships to other software channels - should this be captured somehow?