[Pkg-puppet-devel] developing the 0.25.0 debs...

Stig Sandbeck Mathisen ssm at debian.org
Mon Sep 7 12:17:26 UTC 2009


Nigel Kersten <nigel at explanatorygap.net> writes:

> On Thu, Aug 6, 2009 at 9:15 AM, Nigel Kersten<nigel at explanatorygap.net> wrote:
>> so I'm hoping Micah or someone has more git-fu than I do, as I can't
>> see the best way forward to do this.
>>
>> We can't just merge the upstream 0.25.0 git branch into ours as far
>> as I can see, due to the fact they forked a while ago.
>>
>> I also can't see how to use git cherry-pick to consolidate the
>> debian-specific commits with a new 0.25.0 based branch.
>>
>> Hopefully I'm over-thinking this and there's a reasonably simple
>> solution....
>>
>> I'd quite like to produce 0.25.0-rc1 debs for people to be able to
>> test with.
>
> Anyone had any thoughts on this? I was going to have a look at it
> again tomorrow night, and now that 0.25.0 is released, we should start
> thinking about how to produce debs.

Hello, my name is Stig, and I just joined the puppet/facter packaging
team.

I've been looking at git-buildpackage on a local repo, and have managed
to import the new version, and build a package.

In this case, I've used an upstream tag to copy to a local upstream
branch, and I use "master" as the debian branch (orig sources + debian/
directory).

Testing this, I did:

# Check out the git repo
git clone git+ssh://git.debian.org/git/pkg-puppet/puppet.git
cd puppet

# Create local branches
git checkout -b pristine-tar origin/pristine-tar
git checkout -b upstream upstream/0.24.8

# Import new upstream version
git-import-orig --pristine-tar ../puppet_0.25.0.orig.tar.gz 

# This gives me a one-file conflict at
# lib/puppet/parser/functions/versioncmp.rb, which I fixed, and added a
# debian changelog entry:

dch -v 0.25.0-1 "new upstream version"
git add debian/changelog lib/puppet/parser/functions/versioncmp.rb
git commit -m 'Import new upstream version 0.25.0'


After this point, I'm ready to handle the upstream changes in install
path.  The following patch fixes this:

diff --git a/debian/puppet.install b/debian/puppet.install
index 18b8000..0d438ef 100644
--- a/debian/puppet.install
+++ b/debian/puppet.install
@@ -2,6 +2,6 @@ debian/puppet.conf etc/puppet
 debian/tmp/usr/bin/filebucket usr/bin
 debian/tmp/usr/bin/puppet usr/bin
 debian/tmp/usr/bin/puppetdoc usr/bin
-debian/tmp/usr/bin/puppetd usr/sbin
+debian/tmp/usr/sbin/puppetd usr/sbin
 debian/tmp/usr/bin/ralsh usr/bin
 debian/tmp/usr/lib/ruby/1.8/* usr/lib/ruby/1.8
diff --git a/debian/puppetmaster.install b/debian/puppetmaster.install
index 886d78c..3885b1d 100644
--- a/debian/puppetmaster.install
+++ b/debian/puppetmaster.install
@@ -1,7 +1,5 @@
 debian/fileserver.conf etc/puppet
 ext/puppetlast usr/bin
-# As of puppet 0.25.0 this will no longer be necessary
-# as sbindir will be used by install.rb
-debian/tmp/usr/bin/puppetmasterd usr/sbin
-debian/tmp/usr/bin/puppetca usr/sbin
-debian/tmp/usr/bin/puppetrun usr/sbin
+debian/tmp/usr/sbin/puppetmasterd usr/sbin
+debian/tmp/usr/sbin/puppetca usr/sbin
+debian/tmp/usr/sbin/puppetrun usr/sbin

...and voila, package builds (and gives me a lot of things to do from
lintian).

[...]
dpkg-deb: building package `puppet' in `../puppet_0.25.0-1_all.deb'.
dpkg-deb: building package `puppetmaster' in `../puppetmaster_0.25.0-1_all.deb'.
 dpkg-genchanges  >../puppet_0.25.0-1_amd64.changes
[...]

I've not pushed this upstream yet, comments are welcome.

-- 
Stig Sandbeck Mathisen
Trust the Computer, the Computer is your Friend



More information about the Pkg-puppet-devel mailing list