[Pkg-puppet-devel] packaging puppet and clojure ITPs

Thomas Goirand zigo at debian.org
Sun Jul 5 18:13:45 BST 2020


On 7/4/20 8:37 PM, Elana Hashman wrote:
> On Sat, Jul 04, 2020 at 07:48:45PM +0200, Thomas Goirand wrote:
>> I was thinking that maybe, writing a package version bump would be a
>> good introduction to the team. Can you suggest one that I could attempt?
> 
> Once you file the version bump bugs I can try to divide and conquer
> among interested parties.

I'll try to fill-up the list of bugs for upgrading, and also refine the
ITP list, and match the RFS/RFP you mentioned.

> Because most Clojure upstream projects use git, I tend to preserve the
> upstream history in the Salsa repos because it makes patching, diffs,
> etc. easier. This is slightly unusual and something to watch out for,
> but I've documented this in our wiki and it should not add much
> confusion for someone familiar with git.

Hopefully that's what you are talking about:
https://wiki.debian.org/Clojure/PackagingTutorial

I've read this. I very much like to use upstream's Git, I also think
it's a way more convenient than working with tarballs. However, I do
have a few things to tell about what I read, I hope you don't mind,
hoping this is constructive.

I don't understand why you are doing *both* git tag based packaging,
*and* use pristine-tar.

What I've been doing for nearly 10 years in the OpenStack team, is use
upstream tag to merge them in the Debian branch. The orig.tar.gz is then
generated from the upstream tag, using something like this:

#!/bin/sh

set -e

VERSION=$(dpkg-parsechangelog -SVersion | sed \
	-e 's/^[[:digit:]]*://' \
	-e 's/[-].*//' \
	-e 's/~git.*//' \
	-e 's/~/.0/' \
	-e 's/+dfsg1//' | head -n 1)
GIT_TAG=$(echo ${VERSION} | sed -e 's/~/_/'

git archive --prefix=${DEBPKGNAME}-${VERSION}/ $(GIT_TAG) \
	| xz >../$(DEBPKGNAME)_$(VERSION).orig.tar.xz

Doing this, someone doesn't need pristine-tar. Since pristine-tar is
known to be broken anyway (I did experience this myself...), using git
archive to generate the orig.tar.gz is a nice way to go. Then if we
already have the .orig.tar.xz in the archive, the workflow is to just
download it before building.

Would you consider this as a valid way to work on the Clojure packages?
Or maybe, should I do this, but then also push the generated "git
archive" tarball to the pristine-tar branch? If not, when you're
downloading the upstream tarball as the wiki suggests, aren't you
sometimes getting some differences between that, and the upstream branch
then?

Now, to stop the blabla, and move a little bit forward, I tried to go
ahead and package libtrapperkeeper-comidi-metrics-clojure as a first try
(from upstream
https://github.com/puppetlabs/trapperkeeper-comidi-metrics). I went up
to pushing the upstream and pristine-tar branch, but then the wiki
suggests using clj-helper. Though this utility isn't in Debian. Did you
consider uploading it? What's suggested in the repository (ie: lein
uberjar) downloads from random locations, which doesn't feel safe. I
very much would prefer something packaged in /usr/bin/clj-helper, ready
to be used. :)
However, it was nice to use, and I appreciate the interactive thingy. Is
there anything I should review once that utility does everything for me?
In other words: what does this utility does *NOT* do for me?

First mistake I did was to add "lib" and postfix with "clojure" in my
package name which lead to liblibFOO-clojure-clojure, so I had to rename
a few things to make it work. Though ignoring my stupidity for not
reading well enough, I believe it went well.

Anyways, since it looks like I can't create new repositories in the
clojure team just yet, I've pushed my work here:
https://salsa.debian.org/puppet-team/libtrapperkeeper-comidi-metrics-clojure/

Would you be so kind as to review it and let me know if I did any
mistake? I haven't filled any ITP for it yet, but could...

Your thoughts?

Thanks a lot for your help, this is very much appreciated.
BTW, have you ever used puppet yourself? :)

Cheers,

Thomas Goirand (zigo)



More information about the Pkg-puppet-devel mailing list