Anything I could try?
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?
[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
Part of the packaging process for our program includes running GitThis is a bad idea for several reasons. It also seems to mean your
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 programPutting .git into the orig tarball is very wrong and you shouldn't do
with something like debuild, the resulting .tar.xz archive doesn't
contain the .git repository in which the 'debian/' folder is contained.
On Thu, Oct 28, 2021 at 09:02:21PM -0500, Hunter Wittenborn wrote:
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/)
Other solutions could be creating a file like VERSION with relevant git
data and add that to the distribution. That file can normally not be
checked into git, it's a chicken and egg problem. The solution is to add
the logic to autoconf/cmake/whatever is used.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 285 |
Nodes: | 16 (2 / 14) |
Uptime: | 76:36:44 |
Calls: | 6,489 |
Files: | 12,096 |
Messages: | 5,276,221 |