Diff for "PackageBranches"

Not logged in - Log In / Register

Differences between revisions 4 and 5
Revision 4 as of 2008-11-20 04:34:49
Size: 9620
Editor: thumper
Comment:
Revision 5 as of 2008-11-20 04:59:00
Size: 9915
Editor: jml
Comment:
Deletions are marked like this. Additions are marked like this.
Line 238: Line 238:
  Although another interesting question is: Will we allow a new official source package to be created by someone pushing to lp:ubuntu/jaunty/package ? I think yes, but then it needs an owner and name (assuming we don't relax the constraint. -- [[LaunchpadHome:thumper]] <<DateTime(2008-11-20T04:34:49Z)>> == How are official source package branches created? ==

Will we allow a new official source package to be created by someone pushing to lp:ubuntu/jaunty/package ? I think yes, but then it needs an owner and name (assuming we don't relax the constraint. -- [[LaunchpadHome:thumper]] <<DateTime(2008-11-20T04:34:49Z)>>

This needs to be discussed with the distro (particularly James Westby) and the Soyuz crew.
Line 246: Line 250:
      Which is great, but those changes haven't really kicked in yet (see the [[https://code.edge.launchpad.net/bzr|Bazaar branch listing]]), so it's still relevant to the discussion.

Overview

  • Launchpad entry: package-branches

  • Created: 2008-11-20 by Jonathan Lange

  • Contributors: Michael Hudson, Martin Albisetti

  • Depends on: n/a

Goal

Provide a place to store Ubuntu source package branches on Launchpad, including the official branches for Ubuntu source packages.

Rationale

  • Bazaar is great, Launchpad makes Bazaar better, Ubuntu should use them both.

Constraints

  • Ubuntu developers naturally think in terms of releases of Ubuntu. Any hosting solution should respect this.
  • There must be a stable URL to refer to the latest official version of a source package. This has been repeatedly emphasised by the Ubuntu developers that we have talked with.

Out of Scope

  • Linking upstream branches to product series.
  • Stacking.
  • Building packages automatically from branches.
  • Altering Bazaar's directory service features.
  • Permissions on official source package branches.
  • Privacy
  • Specific changes to code.
  • Planning the implementation.

Terminology

Distribution
ubuntu, debian
Distribution Series
hardy, jaunty
Pocket
release, security, updates, backports
Distribution Suite

<series>-<pocket>. e.g. hardy (hardy + release pocket), hardy-security, hardy-backports.

Official source package branch
The Bazaar branch that represents the source package that is currently inthe Ubuntu archive. jaunty: The version of Ubuntu that everyone is working on right now, the "development focus". intrepid: The version of Ubuntu that has just been released. kickass: The "Kickass Koala", the hypothetical version of Ubuntu after jaunty.

Outline

The official branches for a source package are canonically available at /$distro/$suite/$sourcepackagename, where $suite is either $distroseries or $distroseries-$pocket.

For example:

  • /ubuntu/jaunty/openssh
  • /ubuntu/jaunty-security/openssh
  • /debian/woody/nautilus
  • /ubuntu/+latest/openssh

+latest is a special name that refers to the distroseries that is the current development focus. The exact spelling of "+latest" may vary. See Open Questions.

Official branches are owned by a celebrity Person, ~ubuntu-branches. Write permissions to these branches are determined by the permissions on the source package.

Personal branches are canonically available at $person/$distro/$distroseries/$sourcepackagename/$branch_name. Personal branches are not ever associated with a distribution suite.

For example:

  • ~jml/ubuntu/jaunty/openssh/break-dsa
  • ~jml/ubuntu/jaunty/openssh/fix-dsa

Database Schema Changes

Update the Branch table to allow any branch to be linked to a distribution series and source package:

-- Refer to a source package with the pair (DistroSeries, SourcePackageName)
ALTER TABLE Branch
    ADD COLUMN distroseries int REFERENCES DistroSeries(id);

ALTER TABLE Branch
    ADD COLUMN sourcepackagename int REFERENCES SourcePackageName(id);

-- A Branch can either be a product branch, a personal branch (i.e. +junk) or
-- a source package branch

ALTER TABLE Branch
    ADD CONSTRAINT one_container CHECK (
        ((distroseries IS NULL) = (sourcepackagename IS NULL))
         AND ((distroseries IS NULL) OR (product IS NULL)));

DROP INDEX branch_name_owner_product_key;

CREATE UNIQUE INDEX branch_name_owner_product_key
    ON Branch(name, owner, (COALESCE(product, (-1))))
    WHERE distribution IS NULL;


CREATE UNIQUE INDEX branch__distribution__sourcepackagename__key
    ON Branch(name, owner, distribution, sourcepackagename)
    WHERE distribution IS NOT NULL;


-- Link a source package branch to /ubuntu/<suite>/<package>.
CREATE TABLE BranchSourcePackageSeries (
    id serial PRIMARY KEY,
    date_created timestamp without time zone
        DEFAULT (CURRENT_TIMESTAMP AT TIME ZONE 'UTC') NOT NULL,
    registrant integer NOT NULL REFERENCES Person(id),
    branch integer NOT NULL REFERENCES Branch(id),
    distroseries integer NOT NULL REFERENCES DistroSeries(id),
    pocket integer,
    sourcepackagename int REFERENCES SourcePackageName(id),
    CONSTRAINT branchsourcepackageseries__branch__distroseries__pocket__key
        UNIQUE (branch, distroseries, pocket, sourcepackagename)
);

Indexes have been trimmed from this database patch so we can focus on the core relations.

Stories

John, the lazy Ubuntu developer

John is an Ubuntu developer who works on the OpenSSH package. He's made some fixes to the packaging, and he want to push them to Launchpad. He would:

$ bzr push lp:~john/ubuntu/openssh/john-fixes

The Canonical URL for this would be: /~john/ubuntu/jaunty/openssh/john-fixes

Six months later, John has been lazy and never got his branch merged in. He then does some additional changes, and pushes again:

$ bzr push lp:~john/ubuntu/openssh/john-fixes

The Canonical URL for this would be: /~john/ubuntu/kickass/openssh/john-fixes.

The branch is accessible through:

lp:~john/ubuntu/kickass/openssh/john-fixes
lp:~john/ubuntu/openssh/john-fixes (alias for ubuntu/kickass/openssh/john-fixes)

The branch, as of the last push to jaunty is at:

lp:~john/ubuntu/jaunty/openssh/john-fixes

Sarah, the helpful Ubuntu collaborator

Sarah has spoken with John the Lazy about his openssh fixes on and off over the last few months. She finally gets the time to take a look at the branch.

Thing is, jaunty got released in the mean-time and John hasn't yet pushed up his branch. Sarah tries:

$ bzr branch lp:~john/ubuntu/openssh/john-fixes

and gets Bazaar's equivalent of a 404 error.

Kevin the busy Ubuntu Hacker

Kev starts working on gedit:

$ bzr branch lp:ubuntu/gedit trunk

(this gets the latest, which happens to be jaunty)

lp:ubuntu/gedit --> bzr+ssh://bazaar.launchpad.net/ubuntu/+latest/gedit

Kev makes a whole bunch of branches all the time:

$ cd gedit
$ bzr branch trunk foo-stuff
$ bzr branch trunk obby-support

And sometimes he pushes these branches up to Launchpad:

$ bzr push lp:~kev/ubuntu/gedit/obby-support

He gets fresh updates to trunk by pulling:

$ bzr pull

Pulling from lp:ubuntu/gedit

And then Ubuntu gets released again:

$ bzr pull
bzr+ssh://bazaar.launchpad.net/ubuntu/+latest/gedit
$ bzr info -v
Parent branch: bzr+ssh://bazaar.launchpad.net/ubuntu/+latest/gedit

...which happens to be kickass. All the revisions that are in kickass and not in jaunty will be pulled in. If jaunty and kickass have diverged, then Bazaar will raise its "diverged branches" error.

What actually happens when Ubuntu is released

Matt the Canonical Ubuntu employee has just released Ubuntu Jaunty. He's tired, slightly hungover and he has to open up development on the Kickass Koala. Ubuntu has about 20G worth of branches.

Matt hits a button that says "Open up Kickass". Hitting this button deos the following:

  • Creates a new distroseries, "kickass".
  • Makes "kickass" the development focus of Ubuntu.
  • For each source package,
    • Make the official "kickass" distroseries package branch be the same as the jaunty one.
    • Create a new Bazaar branch from the distroseries package branch
    • Make this new branch the official "jaunty" distroseries package branch.

This means that "+latest" always refers to the same branch and that kickass has branches for every source package.

Other comments

The new Bazaar branch will very likely be stacked on the development focus Bazaar branch, so the operation ought to be cheap for both time and storage.

Note: We really need to consult closely with the distribution on this item.

Open Questions

How should we spell "+latest"?

+latest refers to the series that is the current development focus. How should we spell it?

Suggestions:

  • +devel
  • +trunk
  • +mainline
  • +latest
  • +current

What should the Branch.name property be for official source package branches?

jml's current favorite is NULL.

  • Since all branches will have to be created by someone first, they will have a name before they become the official branch. We may just choose not to show it. -- thumper 2008-11-20 04:17:36

How are official source package branches created?

  • Will we allow a new official source package to be created by someone pushing to lp:ubuntu/jaunty/package ? I think yes, but then it needs an owner and name (assuming we don't relax the constraint. -- thumper 2008-11-20 04:34:49

This needs to be discussed with the distro (particularly James Westby) and the Soyuz crew.

Do all source package branches need to be associated with distroseries?

Note that this question has been historically clouded by several points:

  • As they stand in Launchpad, series aren't very good.
  • Launchpad does almost no automatic gardening of branches. It could do a lot more without changes to the data model.
    • Well, the scanner does some now -- thumper 2008-11-20 04:17:36

      • Which is great, but those changes haven't really kicked in yet (see the Bazaar branch listing), so it's still relevant to the discussion.

  • We want source packages and upstream products to be as similar as possible. Linking all source package branches to series means that all product branches should be linked to series. Making such a change would involve a lot of work in designing the new system, migrating existing data, managing user expectations and actually coding up the change.

PackageBranches (last edited 2009-08-07 11:39:54 by jml)