From 96332ccff4f751dbd63549004fc6749b760adcb7 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Sat, 24 Mar 2012 13:27:31 +0100 Subject: Start documenting useful options when upstream uses git. This is quiet terse yet so follow up bugs are welcome. Closes: #664771 --- docs/chapters/import.sgml | 63 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 59 insertions(+), 4 deletions(-) (limited to 'docs/chapters') diff --git a/docs/chapters/import.sgml b/docs/chapters/import.sgml index a05b8af..25edb7d 100644 --- a/docs/chapters/import.sgml +++ b/docs/chapters/import.sgml @@ -63,7 +63,7 @@ by version number. The option can be used multiple times for more complex filtering. - + If you expect a merge conflict you can delay the merge to the via the and pull in @@ -98,7 +98,7 @@ by version number. &gitcmd; branch upstream theupstream-branch &gitcmd; branch theupstream-branch - + or you can tell &git-buildpackage; the name of the branch to use as : @@ -136,7 +136,7 @@ EOF In order to fix this you can prepend the upstream sources as a single commit to your tree using &git;'s grafts. Afterwards you - can simply create a branch as explained above and &git-import-orig; will + can simply create a branch as explained above and &git-import-orig; will work as expected. Alternatively, if you are only importing source from original tarballs (for instance when converting from a Subversion repository where the @@ -169,7 +169,7 @@ EOF mkdir package-0.1 cd package-0.1 git init - + Then you import the upstream sources, branch off the branch and add the debian files (e.g. via dh_make): @@ -179,4 +179,59 @@ EOF That's it, you're done. If you want to publish you're new repository you can use &gbp-create-remote-repo;. + + + When upstream uses GIT + + If upstream already uses git for packaging there are several ways to handle packaging. Two will + be described in a bit detail here: + + + No upstream tarballs + If upstream doesn't build upstream tarballs or you don't care about them the simplest + way is to clone upstreams repository and create a separate packaging branch in there. + + + + &git-buildpackage; will by default create an upstream tarball for you. By default it will + be created from the tag name given by the option. + You can customize it's value via the configuration variable. + + + + A common upstream format is to put a v in front of the version number. + In this case the configuration option would look like: + + +[git-buildpackage] +upstream-tag = v%(version)s + + + version will be replaced with the upstream version number as read from + debian/changelog. + + If you're using &pristine-tar; you can make &git-buildpackage commit the tarball back to the + pristine-tar branch by using the option. + + + + + Upstream tarballs + If you want to track upstream's git but continue to import the upstream tarballs, + e.g. to make sure the tarball uploaded + to &debian; has the same checksum as upstream's you can use the option + when importing new tarballs with &git-import-orig;. Assuming you have the upstream source in your + repository with a tag v0.0.1 you can use: + + &git-import-orig; --upstream-vcs-tag=v0.0.1 foo_0.0.1.orig.tar.gz + + to add upstream's tag as additional parent to the merge commit. + See #664771 for more details. + + + + + + -- cgit v1.2.3