Title: Debian general Origin handling Status: Draft Author: Guillem Jover Last-Change: 2008-06-25 General Origin handling ======================= After the initial changelog closure discussion, and seeing some of the changes done in Ubuntu's dpkg, and the similar needs in Maemo, I rethought the initial proposal to come up with a more generic one that could solve all the following problems. Problems ~~~~~~~~ * Knowing in which distro a given package was built. - Ubuntu packages built on a Debian system, or the other way around. * Tracking changes done in derivatives. * Tracking the history of a package across distro boundaries. * Changing Maintainer when source changes are done on a derivative. - There was an informal vote for that already in Debian, and Ubuntu is changing the 'Maintainer' field for that, and preserving the originl ones as 'Original-Maintainer:'. (Probably Uploader and Original-Uploader should be changed as well.) * Bug closures for derivatives (or mainline once those get integrated back). - A way to be able to distinguish which bugs pertain to which distro w/o having to use special closure lines. * When to consider to include the orig tarball in a source release for a given distro. Proposal ~~~~~~~~ Distro default -------------- /etc/dpkg/origins/debian /etc/dpkg/origins/ubuntu /etc/dpkg/origins/maemo /etc/dpkg/origins/default -> debian Probably the debian origin should be moved from the dpkg package to base-files, and base-files would provide the symlink to the current distro, in the same way it provides the /etc/debian_version. Package Fields -------------- dpkg would be modified so that on package building, the binary packages gets the fields inserted from the default origin file (Vendor -> Origin, Bugs). The fields Origin and Bugs on the source debian/control file would keep propagating to the binary packages and would override the default origin file (not sure if this makes sense, and those should just be ignored). [ This would allow tracking where the binary was built. ] Changelog --------- devscripts (dch and other tools) would be modified to insert the current origin in a new field in the changelog file header (origin=foo), for each new revision. This allows to fork a package for a derivative of a given origin, and keep track of the specific derivative changes. The bug closures are specific to a distribution, and the upload is as well so it makes sense to bind the Closes field to those changelog entries specific to the target origin distribution. dpkg-dev would be changed to only output Closes fields if the changelog origin matches the current distro origin (in case a derived distro upload a source package w/o modification). [ This would allow tracking where the source was targetted, comes from. ] Archive ------- Each distro states their origin on the Release file (they should be doing this now already). When generating the Packages files the Origin and Bugs field coming from the packages get stripped if they match the target distro (avoiding redundancy/bloat). The archive would start rejecting packages with an Origin != than the current distro after some flag day. [ This would guarantee that no one uploads packages built against a different distro. ] Orig tarball ------------ When importing a new release from one distro to another not always the first version is taken (2.5-1 or similar), and the current tools do not include the tarball. This would be changed to analyze the changelog and include a tarball whenever the previous changelog entry to the current upload has a different upstream part or a different origin. [ This eases proper importing of sources to derived distros. ]