• Bug#1100051: suricata: please use dpkg-query instead of apt-cache in d/

    From Jochen Sprickerhof@21:1/5 to All on Mon Mar 10 19:20:01 2025
    Source: suricata
    Version: 1:7.0.8-1
    Severity: normal
    Tags: patch
    X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org
    User: reproducible-builds@lists.alioth.debian.org
    Usertags: environment

    Hi,

    suricata uses apt-cache in debian/control but apt is not essential nor a
    biuld dependency so this does not work when apt is not installed, for
    example on:

    https://reproduce.debian.net/amd64/#suricata

    Instead of apt-cache you can rather use dpkg-query like this:

    -LIBHTP_PKG_VERSION=$(shell apt-cache policy libhtp2 | grep Installed | cut -f2- -d: | cut -c2-)
    +LIBHTP_PKG_VERSION=$(shell dpkg-query -W -f '$${Version}' libhtp2)

    This makes the package reproducible.

    Cheers Jochen

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)