From: martin f. krafft Date: Mon, 17 Nov 2008 21:46:55 +0000 (+0100) Subject: Merge commit 'topgit-0.5' X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=4956e5734d10ac88fcca7276b402f1157644cb9b;hp=7db67d6925f059972cda19645eb5e245e37187d7;p=topgit.git Merge commit 'topgit-0.5' --- diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 0000000..94c5c39 --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,3 @@ +/files +/*.log +/topgit diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..077a583 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,7 @@ +topgit for Debian +----------------- + +TopGit is itself managed with TopGit. Per Debian policy, have a look into +README.source to see how this is done. + + -- martin f. krafft Mon, 11 Aug 2008 17:32:48 -0300 diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 0000000..e6c6f6c --- /dev/null +++ b/debian/README.source @@ -0,0 +1,122 @@ +Building topgit for Debian +-------------------------- + +The topgit source package uses quilt to apply and remove its patches. Please +refer to /usr/share/doc/quilt/README.source for information about how to use +quilt for source packages. + +The quilt series is, however, generated from the Git repository, using TopGit +itself. While subject to change, this currently happens as follows. Please +make sure to have the latest version of TopGit (>= 0.3) installed before +trying this: + +1. Cloning the repository +~~~~~~~~~~~~~~~~~~~~~~~~~ +Cloning a TopGit repository requires an additional step to normal Git cloning: + +1. git clone ssh://git.debian.org/git/collab-maint/topgit.git +2. cd topgit +3. tg remote --populate origin + +TODO: debcheckout support + +Branches in use +''''''''''''''' +The following branches are in use in the package: + +- upstream: tracks the upstream Git repository +- fixes/*: patches fixing problems with upstream +- features/*: patches providing new features, targetted upstream +- master: the main Debianisation branch +- debian/*: Debian-specific patches + +upstream and master are regular Git branches, while the others are TopGit +branches. The reason why master is not a TopGit branch itself is so that it's +possible to export all TopGit-managed branches into the quilt series, without +having to make an exception for master. + +2. Developing a new feature +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +If you want to develop a new feature (or bug fix), first consider whether the +patch is intended to go upstream or is a Debian-specific change. Choose the +namespace accordingly and base it off upstream or master respectively. If the +patch depends on another patch, obviously base it off the respective TopGit +branch. + +The following are the steps required to add a feature branch/patch: + +1. tg create features/new-feature upstream + - or - + tg create debian/new-debian-stuff master + +2. edit .topmsg and make the subject line be a short description, optionally + add a longer description to the body + +3. git add .topmsg && git commit -m'create branch features/new-feature' + +3. Obtaining the upstream tarball +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The upstream tarball for $VERSION can be obtained using pristine-tar: + + pristine-tar checkout ../topgit_$VERSION.orig.tar.gz + +4. Building the package +~~~~~~~~~~~~~~~~~~~~~~~ +To build the package, you check out the build branch, recreate debian/patches, +commit, build, test, upload, tag: + + 1. tg create stage-0.4-1 debian/locations + 2. git commit -m'staging 0.4-1' + 3. tg export --quilt debian/patches.new + 4. rm debian/patches.new/stage-* + 5. sed -i '/^stage-/d' debian/patches.new/series + 6. git checkout build && git rm -r debian/patches + 7. mv debian/patches.new debian/patches && git add debian/patches + 8. git commit -m'preparing 0.4-1' + 9. build, test, upload, tag ('debian/topgit-0.4-1') +10. tg delete stage-0.4-1 + +This process is still very cumbersome and needs to be improved, ideally within +TopGit. + +TODO: provide Makefile snippet for the above to prevent useless duplication (#501991) +TODO: rewrite to use tg-export -b, which will be fixed in TopGit 0.5 (#500273) + +5. Importing a new upstream version +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +To import a new upstream, update the remote, merge the tag you want to merge +into the master branch, ideally together with an update to debian/changelog, +then update all TopGit branches: + +1. git remote update +2. git checkout master +3. git merge topgit-0.4 + +Now proceed as in the next step. + +6. Making changes to the master branch +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +If you make changes to the master branch (the "debianisation" branch), follow +this procedure: + +1. tg summary +2. for every branch that is prefixed with 'D' in the output: + git checkout $BRANCH && tg update +3. git checkout build && git merge master + +7. Building an upstream tarball +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Until upstream provides official tarballs, the following can be used to create +them for Debian: + +1. git checkout topgit-0.4 +2. git archive --prefix=$(git describe HEAD)/ --verbose HEAD \ + | gzip -9 > ../$(git describe HEAD | sed s,-,_,).orig.tar.gz +3. pristine-tar commit ../$(git describe HEAD | sed s,-,_,).orig.tar.gz \ + HEAD +4. git checkout master + +All comments and suggestions are welcome, especially those pertaining to +auto-generating debian/changelog from commit logs. + + -- martin f. krafft Mon, 11 Aug 2008 17:32:48 -0300 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..40e7e14 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,22 @@ +topgit (0.4-1) unstable; urgency=low + + * New upstream release. + + -- martin f. krafft Fri, 26 Sep 2008 19:55:58 +0200 + +topgit (0.3-1) unstable; urgency=low + + * New upstream release (closes: #498559). + * Retire fixes/destdir branch as upstream does it better; amend debian/rules + to set $prefix instead of $PREFIX. + * Updated README.source to reflect TopGit remote handling and slight changes + to the process. + + -- martin f. krafft Wed, 10 Sep 2008 09:31:03 +0100 + +topgit (0.2-1) unstable; urgency=low + + * Initial release (closes: #494710). + + -- martin f. krafft Mon, 11 Aug 2008 17:32:48 -0300 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..ab2dd5e --- /dev/null +++ b/debian/control @@ -0,0 +1,22 @@ +Source: topgit +Section: devel +Priority: optional +Maintainer: martin f. krafft +Build-Depends: debhelper (>= 7), quilt +Standards-Version: 3.8.0 +Homepage: http://repo.or.cz/w/topgit.git +Vcs-Git: git://git.debian.org/git/collab-maint/topgit.git +Vcs-Browser: http://git.debian.org/?p=collab-maint/topgit.git + +Package: topgit +Architecture: all +Depends: git-core +Description: a Git patch queue manager + TopGit manages a patch queue using Git topic branches, one patch per + branch. It allows for patch dependencies and can thus manage + non-linear patch series. + . + TopGit is a minimal layer on top of Git, which does not limit use of + Git's functionality (such as the index). It rigorously keeps history + until a patch is accepted upstream. It is also fully usable across + distributed repositories. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..0afa1d4 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,33 @@ +This package was debianized by martin f. krafft on +Mon, 11 Aug 2008 17:32:48 -0300. + +It was downloaded from + +Upstream Author: + + Petr Baudis + +Copyright: + + Copyright © 2008 Petr Baudis + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +The Debian packaging is (C) 2008, martin f. krafft and +is licensed under the GPL, see above. diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..0f9bb2e --- /dev/null +++ b/debian/dirs @@ -0,0 +1,3 @@ +usr/bin +usr/share/topgit +usr/share/topgit diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..0da37bf --- /dev/null +++ b/debian/docs @@ -0,0 +1,2 @@ +README +debian/README.source diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..d331f92 --- /dev/null +++ b/debian/rules @@ -0,0 +1,44 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/quilt/quilt.make + +build: build-stamp +build-stamp: patch + dh_testdir + $(MAKE) prefix=/usr + touch $@ + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp + $(MAKE) clean + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + $(MAKE) DESTDIR=$(CURDIR)/debian/topgit prefix=/usr install + rm -f $(wildcard $(CURDIR)/debian/topgit/usr/share/topgit/*.txt) + + +binary-arch: build install +binary-indep: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure