[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to include the .git folder in a source package's .tar.xz archive?



On Thu, Oct 28, 2021 at 09:02:21PM -0500, Hunter Wittenborn wrote:
> I, or mostly the work of another individual rather, is working on getting a
> program packaged for Debian for potential inclusion in the Debian
> repositories, but we've hit a roadblock in getting our package to work.



> 
> 
> Part of the packaging process for our program includes running Git commands
> to get things like the timestamp for when some files were last modified,
> which are used in things like the building of man pages via Asciidoc to set
> the last modified time [1].
> 
> 
> 
> The problem is that whenever I (and the other guy) build the program with
> something like debuild, the resulting .tar.xz archive doesn't contain the
> .git repository in which the 'debian/' folder is contained. I've attempted to
> do some Googling, but I didn't get much of anywhere with it (I actually got
> some answers on how to do the opposite for some reason :P).
> 
> 
> 
> Anything I could try?

For the packaging, I'd implement to retrieve the timestamp from d/changelog.
(e.g. using dpkg-parsechangleog). Possibly you want to prepare your build
system that it accepts injecting this timestamps.)

Note that the Debian packaging, when the maintainer uses git for that, resides
in its own git repository; even if it is now on the same place, this might
change (e.g. if package maintainer changes). Best is you consider that already
now and dont rely on the git repo.  to be (See
https://wiki.debian.org/UpstreamGuide#Pristine_Upstream_Source to keep debian/)

-- 
tobi 


 
> 
> 
> [1]: https://github.com/gamer4life1/makedeb/blob/launchpad/Makefile#L1-L3
 
> 
> 
> ---
> 
> Hunter Wittenborn
> 
> mailto:hunter@hunterwittenborn.com
> 
> https://www.hunterwittenborn.com
> 
> https://github.com/hwittenborn


Reply to: