[Pkg-puppet-devel] facter's dependence on gem2deb

Stig Sandbeck Mathisen ssm at debian.org
Sun Jul 17 18:22:25 UTC 2011


"David N. Blank-Edelman" <dnb at ccs.neu.edu> writes:

> I'm in the process of trying to create facter .deb packages from the
> Debian git repository via git-buildpackage because the official Ubuntu
> LTS (Lucid) versions available are quite far behind from the mainline
> Puppet Labs releases.

Here's a cut and pastable recipe, with optional extras. It assumes you
do not already have a "facter" directory in your current directory.


# packaging environment variable
DEBEMAIL=dnb at ccs.neu.edu

# Clone the repo from the official repository
gbp-clone git://git.debian.org/git/pkg-puppet/facter.git

# Create my own packaging branch, based the last commit before the
# gem2deb changes, but after the 1.6.0 merge. (You can use the "gitk"
# tool to easily navigate the git repository and find a good commit to
# base your branch on. )
cd facter
git checkout -b my_master 19e8027f84c7057bd1cf22ef371a73971a4149ac


# Handle upstream documentation changes
sed -i -e s/README/README.md/ -e /TODO/d debian/docs 
git add debian/docs 
git commit -m 'rename README, remove TODO'


# Optional: Cherry-pick some commits. 
# - license change
git cherry-pick b34873057c8792a81fde90411677b319147117a4
# - Updated man page
git cherry-pick dd723b07712b8b190b2caeb7a6afc13f0afdc700



# Update debian/changelog with the cherry-picked commits
git-dch --debian-branch=my_master --since 19e8027f84c7057bd1cf22ef371a73971a4149ac
git add debian/changelog
git commit -m 'Update changelog'


# Build (unsigned) package using this branch rather than the master branch
git-buildpackage -us -uc --git-debian-branch=my_master


If git-buildpackage stops due to missing dependencies, you use:

"cd facter ; dpkg-checkbuilddeps"  (the dependencies in this version)

"apt-get build-dep facter" (the dependencies for the version available
online)

> I'm fairly new to this process so I apologize in advance if the
> following question is highly naive or blatantly obvious.

I think I would say that the answer is obvious if you already know what
to do. git and git-buildpackage has a rather steep learning curve if you
are trying to deviate from just clone+build.

I hope this is helpful. :)

-- 
Stig Sandbeck Mathisen



More information about the Pkg-puppet-devel mailing list