<div>I just thought of what if git is missing.<br></div><div><br></div><div>Then it returns 127 and not 128.<br></div><div><br></div><div>So maybe the test should be "-gt 0" instead of "-eq 128".<br></div><div><br></div><div>Svenne</div><div><br></div><div><br></div><div><br></div><div><br></div><div>On Thursday, 24 April 2025 at 11:05:37 +02:00, Svenne Krap <svenne@kracon.dk> wrote:<br></div><blockquote type="cite"><div><br></div><div>Hi all,<br></div><div><br></div><div>I stumbled over, that Bird 3.1.0 in Arch Linux is missing all version information.<br></div><div><br></div><div>Having peeked at the PKGBUILD it seems to do nothing weird, so I have reproduced it by hand.<br></div><div><br></div><div>Steps:<br></div><div><br></div><div>$ wget <a href="https://gitlab.nic.cz/labs/bird/-/archive/v3.1.0/bird-v3.1.0.tar.gz" target="_blank">https://gitlab.nic.cz/labs/bird/-/archive/v3.1.0/bird-v3.1.0.tar.gz</a><br></div><div>$ tar axvf bird-v3.1.0.tar.gz<br></div><div>$ cd bird-v3.1.0<br></div><div>$ autoreconf -vif<br></div><div>$ ./configure<br></div><div>$ make<br></div><div>$ ./bird --version<br></div><div><br></div><div>The latter shows (like "show status" on the real Arch package)<br></div><div><span class="font" style="font-family: "courier new", monospace, sans-serif;"></span><br></div><div><span class="font" style="font-family: "courier new", monospace, sans-serif;">BIRD version +detached.</span><br></div><div><br></div><div>It seems like the error is in tools/version, that only works in a git repo.<br></div><div><br></div><div>The following patch is a suggestion for a fix<br></div><div><br></div><div><span class="font" style="font-family: "courier new", monospace, sans-serif;">--- ../bird-v3.1.0-failed/tools/version    2025-04-03 20:39:22.000000000 +0200</span><br></div><div><span class="font" style="font-family: "courier new", monospace, sans-serif;">+++ tools/version    2025-04-24 11:02:58.276023973 +0200</span><br></div><div><span class="font" style="font-family: "courier new", monospace, sans-serif;">@@ -1,5 +1,12 @@</span><br></div><div><span class="font" style="font-family: "courier new", monospace, sans-serif;">#!/bin/bash</span><br></div><div><span class="font" style="font-family: "courier new", monospace, sans-serif;"></span><br></div><div><span class="font" style="font-family: "courier new", monospace, sans-serif;">+# Are we in a release tarball?</span><br></div><div><span class="font" style="font-family: "courier new", monospace, sans-serif;">+git status >& /dev/null</span><br></div><div><span class="font" style="font-family: "courier new", monospace, sans-serif;">+if [ $? -eq 128 ]; then</span><br></div><div><span class="font" style="font-family: "courier new", monospace, sans-serif;">+   realpath .  | awk -F/ '{print $NF}' | cut -dv -f 2</span><br></div><div><span class="font" style="font-family: "courier new", monospace, sans-serif;">+    exit 0</span><br></div><div><span class="font" style="font-family: "courier new", monospace, sans-serif;">+fi</span><br></div><div><span class="font" style="font-family: "courier new", monospace, sans-serif;">+</span><br></div><div><span class="font" style="font-family: "courier new", monospace, sans-serif;"># Aren't we directly at version?</span><br></div><div><span class="font" style="font-family: "courier new", monospace, sans-serif;">TAG=$(git tag | grep -F $(git describe))</span><br></div><div><span class="font" style="font-family: "courier new", monospace, sans-serif;">if [ -n "$TAG" ]; then</span><br></div><div><br></div><div>Otherwise, the Arch package seems to work fine.<br></div><div><br></div><div>Regards, <br></div><div><br></div><div>Svenne<br></div><div><br></div></blockquote><div><br></div>