Git-buildpackage
From Wikitech
(Difference between revisions)
(→Experiments) |
(→Experiments) |
||
| Line 6: | Line 6: | ||
On i-00000080: | On i-00000080: | ||
| − | * The debian puppet package git repository was cloned into ~/git/debs/puppet | + | * The debian puppet package git repository was cloned into ~/git/debs/puppet: |
| + | $ cd ~/git/debs/ | ||
| + | $ git clone git://git.debian.org/git/pkg-puppet/puppet.git | ||
* Package build was attempted with <tt>git-buildpackage --git-ignore-new --git-pristine-tar</tt> | * Package build was attempted with <tt>git-buildpackage --git-ignore-new --git-pristine-tar</tt> | ||
* Signing the package failed, as the Debian maintainer's secret key is not available. | * Signing the package failed, as the Debian maintainer's secret key is not available. | ||
* Package build was attempted without signing: | * Package build was attempted without signing: | ||
| − | git-buildpackage --git-ignore-new --git-pristine-tar -us -uc | + | $ git-buildpackage --git-ignore-new --git-pristine-tar -us -uc |
* This worked. We ended up with built packages in ~/git/debs, and a dirty git working dir. | * This worked. We ended up with built packages in ~/git/debs, and a dirty git working dir. | ||
* The git working directory was made clean again, and another build was attempted using | * The git working directory was made clean again, and another build was attempted using | ||
| − | git-buildpackage --git-ignore-new --git-pristine-tar -us -uc --git-export-dir=/var/tmp/build-area/puppet | + | $ git-buildpackage --git-ignore-new --git-pristine-tar -us -uc --git-export-dir=/var/tmp/build-area/puppet |
* This worked as well. Packages were being built, and the git working dir remained clean. Packages ended up in the build dir. | * This worked as well. Packages were being built, and the git working dir remained clean. Packages ended up in the build dir. | ||
* The debian git dir only had version 2.7.6, but we want 2.7.7rc2. So I tried importing the dev release with | * The debian git dir only had version 2.7.6, but we want 2.7.7rc2. So I tried importing the dev release with | ||
| − | git-import-orig /tmp/puppet-2.7.7rc2.tar.gz | + | $ git-import-orig /tmp/puppet-2.7.7rc2.tar.gz |
| + | * This failed, as there was no local ''upstream'' branch in the cloned git repository yet. Ok, so let's create it from ''origin/upstream'': | ||
| + | $ git branch upstream origin/upstream | ||
| + | * Now the import worked. But commits were made, with the default git name/mail address. Do set it: | ||
| + | $ git config --global user.name "Your Name" | ||
| + | $ git config --global user.email you@example.com | ||
| + | * Try another build. | ||
| + | $ git-buildpackage --git-ignore-new --git-pristine-tar -us -uc --git-export-dir=/var/tmp/build-area/puppet | ||
| + | * Oops. This used version 2.7.6. But, the git-buildpackage manual says changing the changelog itself all the time isn't a good idea. Let's try git-dch: | ||
| + | $ git-dch --snapshot | ||
| + | Changelog has been prepared for snapshot #1 at 48473567008ad82cdb0d0a5654dffe7c868fad91 | ||
| + | <pre> | ||
| + | $ git diff | ||
| + | diff --git a/debian/changelog b/debian/changelog | ||
| + | index 796b61e..f6da810 100644 | ||
| + | --- a/debian/changelog | ||
| + | +++ b/debian/changelog | ||
| + | @@ -1,3 +1,11 @@ | ||
| + | +puppet (2.7.6-1ubuntu1~1.gbp484735) UNRELEASED; urgency=low | ||
| + | + | ||
| + | + ** SNAPSHOT build @48473567008ad82cdb0d0a5654dffe7c868fad91 ** | ||
| + | + | ||
| + | + * Imported Upstream version 2.7.7rc2 | ||
| + | + | ||
| + | + -- Mark Bergsma <mark@i-00000080.pmtpa.wmflabs> Wed, 23 Nov 2011 14:06:45 +0000 | ||
| + | + | ||
| + | </pre> | ||
| + | * Cool, but not quite what I need. | ||
[[Category:Ubuntu]] [[Category:Package management]] | [[Category:Ubuntu]] [[Category:Package management]] | ||
Revision as of 14:06, 23 November 2011
(To be written up once experimentation is done.)
Experiments
Mark is experimenting with building puppet using git-buildpackage, in labs.
On i-00000080:
- The debian puppet package git repository was cloned into ~/git/debs/puppet:
$ cd ~/git/debs/ $ git clone git://git.debian.org/git/pkg-puppet/puppet.git
- Package build was attempted with git-buildpackage --git-ignore-new --git-pristine-tar
- Signing the package failed, as the Debian maintainer's secret key is not available.
- Package build was attempted without signing:
$ git-buildpackage --git-ignore-new --git-pristine-tar -us -uc
- This worked. We ended up with built packages in ~/git/debs, and a dirty git working dir.
- The git working directory was made clean again, and another build was attempted using
$ git-buildpackage --git-ignore-new --git-pristine-tar -us -uc --git-export-dir=/var/tmp/build-area/puppet
- This worked as well. Packages were being built, and the git working dir remained clean. Packages ended up in the build dir.
- The debian git dir only had version 2.7.6, but we want 2.7.7rc2. So I tried importing the dev release with
$ git-import-orig /tmp/puppet-2.7.7rc2.tar.gz
- This failed, as there was no local upstream branch in the cloned git repository yet. Ok, so let's create it from origin/upstream:
$ git branch upstream origin/upstream
- Now the import worked. But commits were made, with the default git name/mail address. Do set it:
$ git config --global user.name "Your Name" $ git config --global user.email you@example.com
- Try another build.
$ git-buildpackage --git-ignore-new --git-pristine-tar -us -uc --git-export-dir=/var/tmp/build-area/puppet
- Oops. This used version 2.7.6. But, the git-buildpackage manual says changing the changelog itself all the time isn't a good idea. Let's try git-dch:
$ git-dch --snapshot Changelog has been prepared for snapshot #1 at 48473567008ad82cdb0d0a5654dffe7c868fad91
$ git diff diff --git a/debian/changelog b/debian/changelog index 796b61e..f6da810 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +puppet (2.7.6-1ubuntu1~1.gbp484735) UNRELEASED; urgency=low + + ** SNAPSHOT build @48473567008ad82cdb0d0a5654dffe7c868fad91 ** + + * Imported Upstream version 2.7.7rc2 + + -- Mark Bergsma <mark@i-00000080.pmtpa.wmflabs> Wed, 23 Nov 2011 14:06:45 +0000 +
- Cool, but not quite what I need.