Hi!

On Tue, 2025-07-08 at 15:26:37 +0200, Timothée Jaussoin wrote:
> We are adding the git commit to our alpha and beta packages and this
> issue appears when the git commit hash start with +b
> 
> dpkg-deb: construction du paquet « bc-flexisip-account-manager »
> dans
> « ../bc-flexisip-account-manager_2.0.0-0.beta.23+b427810_amd64.deb ».
>  dpkg-genbuildinfo 
> -O../bc-flexisip-account-manager_2.0.0-0.beta.23+b427810_amd64.buildinfo
>  dpkg-genchanges 
> -O../bc-flexisip-account-manager_2.0.0-0.beta.23+b427810_amd64.changes
> dpkg-genchanges: erreur: impossible de lire
> ../bc-flexisip-account-manager_2.0.0-0.beta.23.dsc: No such file or
> directory
> dpkg-buildpackage: erreur: le sous-processus dpkg-genchanges 
> -O../bc-flexisip-account-manager_2.0.0-0.beta.23+b427810_amd64.changes
> a retourné l’état de sortie 255
> 
> Changing the commit hash works but solving this issue would prevent
> some failing pipelines on our side.

Given that +bN has (had) magic semantics, I'd encourage you to use a
different versioning scheme.

As an example uscan in its mode=git, when taking code from HEAD with no
tags it will use the following pattern:

  $ git log --date=format:%Y%m%d --pretty=0.0~git%cd.%h

Although that might not work great if you need to package multiple
releases in a day, but prefixing the commit hash with something like
git is probably more descriptive anyway. Or where «git describe»
prefixes the commit hash with «g».

You might also want to consider using «~» for pre-release stuff to
sort earlier and avoid taking over the actual final version number.

Thanks,
Guillem

Reply via email to