pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/60630: devel/lua-language-server: leading-zero literal in OPSYS_VERSION



>Number:         60630
>Category:       pkg
>Synopsis:       devel/lua-language-server: leading-zero literal in OPSYS_VERSION
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 22 04:55:00 +0000 2026
>Originator:     Graham Greenfield
>Release:        pkgsrc-current August 21, 2026
>Organization:
>Environment:
NetBSD/amd64 11.0, pkgsrc-current (checked out from cdn.netbsd.org, 8/21/2026)
>Description:
devel/lua-language-server's Makefile contains:

    .if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 099975
    PKG_FAIL_REASON+=       "Requires EVFILT_USER, unavailable on NetBSD 9.x and prior"
    .endif

This fires PKG_FAIL_REASON on NetBSD 11.0/amd64, incorrectly marking the
package as broken. However:

    $ make show-var VARNAME=OPSYS_VERSION
    110000

110000 is numerically greater than 99975, so the comparison should not
evaluate true. The likely cause is that the leading zero on the literal
099975 is being interpreted as an octal prefix by bmake's .if numeric
parser; since 099975 contains the digit 9 (invalid in octal), this
produces incorrect or undefined comparison behavior rather than the
intended decimal comparison.

EVFILT_USER has been present in NetBSD's kqueue implementation well
before the 9.x series this check is meant to guard against, so on any
current release (9.x and later, including 11.0) this exclusion should
not apply at all.
>How-To-Repeat:
On NetBSD 11.0/amd64 with a current pkgsrc checkout:

    cd /usr/pkgsrc/devel/lua-language-server
    make

Compare against:

    make show-var VARNAME=OPSYS_VERSION

>Fix:
Remove the leading zero from the literal to avoid octal ambiguity:

    .if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 99975

Alternatively, restructure the check using explicit major/minor version
comparisons rather than a single concatenated literal, to avoid this
class of parsing ambiguity entirely.




Home | Main Index | Thread Index | Old Index