Commit a373adb590 for frr

commit a373adb590e68d77070931c6330bb133185170e8
Author: Vincent Jardin <vjardin@free.fr>
Date:   Sun Nov 22 20:07:31 2026 +0100

    build: fix symlinks for xref2vtysh paths

    When FRR is built from a source directory reached through a symbolic
    link, the build fails while compiling vtysh/vtysh_cmd.c:

      error: 'VTYSH_LIB' undeclared here (not in a function)

    Signed-off-by: Vincent Jardin <vjardin@free.fr>

diff --git a/python/xref2vtysh.py b/python/xref2vtysh.py
index 713ab513ad..1944f317fe 100644
--- a/python/xref2vtysh.py
+++ b/python/xref2vtysh.py
@@ -27,7 +27,7 @@ except ImportError:

 import _clippy

-frr_top_src = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+frr_top_src = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))

 # vtysh needs to know which daemon(s) to send commands to.  For lib/, this is
 # not quite obvious...
@@ -197,7 +197,9 @@ class CommandEntry:
         if path.name == "vtysh":
             return {}

-        defun_file = os.path.relpath(self._spec["defun"]["file"], frr_top_src)
+        defun_file = os.path.relpath(
+            os.path.realpath(self._spec["defun"]["file"]), frr_top_src
+        )
         defun_path = pathlib.Path(defun_file)

         if defun_path.parts[0] != "lib":