OpenStackPackaging

Differences between revisions 4 and 19 (spanning 15 versions)
Revision 4 as of 2015-06-30 12:52:54
Size: 3564
Editor: corey.bryant
Comment:
Revision 19 as of 2016-06-07 18:53:55
Size: 3910
Editor: corey.bryant
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
Ubuntu maintains it own set of Bazaar branches and Git repositories for OpenStack core projects on Launchpad; for the full list see [[https://code.launchpad.net/~ubuntu-server-dev/+git|Launchpad]]. Ubuntu maintains it own set of Bazaar branches and Git repositories for !OpenStack core projects on Launchpad.
Line 5: Line 5:
OpenStack releases prior to Liberty are maintained in Bazaar, Liberty onwards are maintained under Git. !OpenStack releases prior to Liberty are [[https://code.launchpad.net/~ubuntu-server-dev|maintained in Bazaar]], Liberty onwards are [[https://code.launchpad.net/~ubuntu-server-dev/+git|maintained in Git]].
Line 7: Line 7:
== Git == === Git Configuration ===
Line 9: Line 9:
First, you'll want to setup git to simplify your work-flow. See 'Configuring Git' in the [[https://help.launchpad.net/Code/Git|Launchpad git documentation]].
 
Line 11: Line 13:
The OpenStack packaging git repositories all make use of git-buildpackage and pristine-tar for managing upstream release tarballs. The !OpenStack packaging git repositories all make use of git-buildpackage and pristine-tar for managing upstream release tarballs.
Line 17: Line 19:
The current development release packaging is maintained under the 'master' branch; released versions of OpenStack will mirror upstream branch management - i.e. stable/liberty. The current development release packaging is maintained under the 'master' branch; released versions of !OpenStack will mirror upstream branch management - i.e. stable/liberty.
Line 46: Line 48:
If you're not on the latest Ubuntu release then directly clone the repository: If you're not on the latest Ubuntu release then directly clone the repository and checkout the branches:
Line 49: Line 51:
git clone https://git.launchpad.net/~ubuntu-server-dev/ubuntu/+source/nova git clone lp:~ubuntu-server-dev/ubuntu/+source/nova
git checkout pristine-tar
git checkout upstream
git checkout master
Line 88: Line 93:
=== Pushing a branch to Launchpad === === Pushing updates to Launchpad ===
Line 90: Line 95:
First, push your repository, with all of the branches (master, pristine-tar, and upstream), to your Launchpad account: To push any local commits and tags to Launchpad:
Line 93: Line 98:
git push --all git+ssh://<launchpad-id>@git.launchpad.net/~<launchpad-id>/ubuntu/+source/nova/+git/liberty-1 git push --all
git push --tags
Line 96: Line 102:
And then push the tags: '''NOTE''': you need to be a member of the ubuntu-server-dev team to be able todo this - this includes all Ubuntu Core Developers.

=== Contributors - pushing a personal repository to Launchpad ===

To push any local commits and tags to Launchpad:
Line 99: Line 109:
git push --tags git+ssh://<launchpad-id>@git.launchpad.net/~<launchpad-id>/ubuntu/+source/nova/+git/liberty-1 git push --all lp:~<launchpad-id>/ubuntu/+source/nova
git push --tags lp:~<launchpad-id>/ubuntu/+source/nova
Line 102: Line 113:
=== Proposing a merge === === Contributors - proposing a merge ===
Line 105: Line 116:
https://code.launchpad.net/~<launchpad-id>/ubuntu/+source/nova/+git/nova
Line 106: Line 118:
{{{
https://code.launchpad.net/~<launchpad-id>/ubuntu/+source/nova/+git/liberty-1
}}}

Propose each branch separately by:
Propose each branch separately:

Overview

Ubuntu maintains it own set of Bazaar branches and Git repositories for OpenStack core projects on Launchpad.

OpenStack releases prior to Liberty are maintained in Bazaar, Liberty onwards are maintained in Git.

Git Configuration

First, you'll want to setup git to simplify your work-flow. See 'Configuring Git' in the Launchpad git documentation.

Tools

The OpenStack packaging git repositories all make use of git-buildpackage and pristine-tar for managing upstream release tarballs.

For a general overview of git-buildpackage see the Debian documentation. This wiki page details the specifics of how we use these tools in Ubuntu.

Branches

The current development release packaging is maintained under the 'master' branch; released versions of OpenStack will mirror upstream branch management - i.e. stable/liberty.

Cloning a git repository

If you are running on the latests Ubuntu release, then the following should dtrt:

debcheckout --git-track='*' <projectname>

for example

debcheckout --git-track='*' nova

Using the git-track option ensures that all required branches are automatically setup - for example:

$ git branch
* master
  pristine-tar
  upstream

The 'upstream' and 'pristine-tar' branches are used by git-buildpackage to manage the upstream release tarballs.

If you're not on the latest Ubuntu release then directly clone the repository and checkout the branches:

git clone lp:~ubuntu-server-dev/ubuntu/+source/nova
git checkout pristine-tar
git checkout upstream
git checkout master

Building a source package

Use the buildpackage subcommand of gbp:

gbp buildpackage -S

The source package will be places in ../build-area.

Making a packaging change

Make your packaging changes as you normally would under the debian folder; then use 'git add' to add the changed files to the staging area; if you have added an appropriate changelog comment then:

debcommit

will DTRT and annotate the git commit with the changelog entry details - you get a chance to edit this if you have provided anything other than a single line entry to the changelog.

Updating to a new release

First, grab the new upstream release:

uscan --verbose --rename

this will drop the orig.tar.gz into the parent folder of the git repository. Then use git-buildpackage to import the archive:

gbp import-orig ../nova_12.0.0~b1.orig.tar.gz

This action will import the content into the upstream branch, create the required pristine-tar data and place it in the pristine-tar branch, and then merge the upstream branch into the master branch (or stable branch).

Pushing updates to Launchpad

To push any local commits and tags to Launchpad:

git push --all
git push --tags

NOTE: you need to be a member of the ubuntu-server-dev team to be able todo this - this includes all Ubuntu Core Developers.

Contributors - pushing a personal repository to Launchpad

To push any local commits and tags to Launchpad:

git push --all lp:~<launchpad-id>/ubuntu/+source/nova
git push --tags lp:~<launchpad-id>/ubuntu/+source/nova

Contributors - proposing a merge

Navigate to the URL of your pushed repository: https://code.launchpad.net/~<launchpad-id>/ubuntu/+source/nova/+git/nova

Propose each branch separately:

  • Click on the branch name and 'Propose for merging'
  • Select the target repository: lp:~ubuntu-server-dev/ubuntu/+source/nova
  • Select the target reference path: master, upstream, or pristine-tar

ServerTeam/OpenStackPackaging (last edited 2016-06-07 19:45:13 by corey.bryant)