jq build version generation: include version in tagged releases
configure.ac looks up jq versioning information using the git command. In many packaging setups (such as Debian's) however, there is no access to the .git repository during package building. I propose to include versioning information in release tarballs, so that maintainers don't need to set that manually. One tool that could be used for this is autorevision, which can e.g. generate a header file.
Hmmm, I'm not sure what to do here. The tarball includes a ./configure doesn't use git. The configure.ac does, but why autoreconf if not in git?
I'll take a look at autorevision. Perhaps it will help.
I guess the setup.sh script could run autorevision to make an m4 file for configure.ac, and a version.h so that we don't need anything else like scripts/version. Although I'd rather avoid yet another external dependency for building from git. And anyways, the trick is to make sure that this runs when building from git and that its output is dist'ed when doing make dist.
@else can you point me to an autoconf project that does this correctly?
Please note that:
- debian trixie shipped a
1.7.1binary that claims to be1.7 - ubuntu noble ships a similar version of that same package with that same problem
- github's ubuntu-24.04 similarly claims to have a
1.7which is also really a1.7.1