#585842 git-buildpackage: save commit id in built packages

#585842#5
Date:
2010-06-14 09:10:39 UTC
From:
To:
Hi,

it would be nice, if git-buildpackage could provide an option to save
the commit id from which the package was build somewhere in the built
package.
I'm not sure, where the best place would be. It could be a separate file
in /usr/share/doc/PACKAGE, a note in the changelog, somewhere in the
..changes or .dsc files?
The file must be created/inserted on the fly during git-buildpackage [-b|-S]
invocation.
It must be possible to specify in gbp.conf that the file must be
created, so that I don't need to rely on my sponsor giving an option to
git-buildpackage.

#585842#8
Date:
2010-07-12 07:12:38 UTC
From:
To:
Hi Thomas,
this sounds like a worthwhile thing to have. Any chance you'd send a
patch?
 -- Guido

#585842#11
Date:
2010-07-17 14:15:14 UTC
From:
To:
Hi Thomas,
Jonathan recently send a patch to add a pre-build hook. That could be
used to achieve what you want. We can pass the SHA1 of the debian-branch
to the hook. The hook would then be responsible for storing the
information in the package e.g. by adding it as debian/SHA1.
 -- Guido