Package: snapraid
Version: 12.4-1
Severity: minor
Tags: upstream
Distribution: trixie

On trixie (stable), snapraid -V prints "snapraid vnone by Andrea Mazzoleni"
instead of the actual version number. The bug is not present in forky/sid
(13.0-1) where upstream fixed the fallback.

*Reproducer:*
  apt-get install snapraid
  snapraid -V
  → snapraid vnone by Andrea Mazzoleni, http://www.snapraid.it

*Root cause:*
autover.sh in the v12.4 source tree has "none" as its final fallback:

  if [ -z $VERSION ]; then
      VERSION="none"
  fi

configure.ac runs autover.sh at autoconf time via m4_esyscmd_s:

  m4_define([git_revision], m4_esyscmd_s([./autover.sh]))
  AC_INIT([snapraid], [git_revision], ...)

The Debian build (debhelper-compat = 13) re-runs autoconf via
dh_autoreconf. At that point there is no .git directory and no .version
file in the source tree, so autover.sh returns "none", which gets baked
into PACKAGE_VERSION. The version() function then prints "v" VERSION →
"vnone".

This was fixed upstream in v13.0: the fallback was changed to "0" and
the .version file is now checked before git tags. The fix is not present
in v12.4.

*Suggested fix for the Debian package:*
Add an override in debian/rules to write the correct version before
dh_autoreconf runs:

  override_dh_autoreconf:
      echo "12.4" > .version
      dh_autoreconf

Alternatively, include a .version file containing "12.4" in the orig
tarball, or patch autover.sh to replace the "none" default with the
actual version string.

*Upstream fix reference:*
https://github.com/amadvance/snapraid/blob/v13.0/autover.sh

Best Regards,
Oliver

Reply via email to