Bug 287425 - Mk/bsd.sites.mk: Comparison with '>=' requires both operands 'fbsd-1.0.0' and '10' to be numeric
Summary: Mk/bsd.sites.mk: Comparison with '>=' requires both operands 'fbsd-1.0.0' and...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-10 12:45 UTC by Einar Bjarni Halldórsson
Modified: 2025-06-10 16:37 UTC (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Einar Bjarni Halldórsson 2025-06-10 12:45:12 UTC
Looks like https://cgit.freebsd.org/ports/commit/?id=a0ce779c88e46d0f5f05bd5753365344282ccd7a broke poudriere builds for us.


[00:00:00] Warning: Using packages from previously failed, or uncommitted, build: /usr/local/poudriere/data/packages/142amd64-142amd64_default-default/.building
[00:00:01] Warning: (sysutils/ansible-sysrc): make: "/usr/ports/Mk/bsd.sites.mk" line 586: Comparison with '>=' requires both operands 'g20200803' and '10' to be numeric
[00:00:01] Warning: (sysutils/ansible-sysrc): make: Fatal errors encountered -- cannot continue
[00:00:01] Warning: (sysutils/ansible-sysrc): Error: Error looking up dependencies for sysutils/ansible-sysrc
[00:00:01] Warning: (sysutils/mbgtools): make: "/usr/ports/Mk/bsd.sites.mk" line 586: Comparison with '>=' requires both operands 'fbsd-1.0.0' and '10' to be numeric
[00:00:01] Warning: (sysutils/mbgtools): make: Fatal errors encountered -- cannot continue
[00:00:01] Warning: (sysutils/mbgtools): Error: Error looking up dependencies for sysutils/mbgtools
[00:00:01] Error: /usr/local/share/poudriere/bulk.sh:gather_port_vars:183:Fatal errors encountered gathering ports metadata
[142amd64-142amd64_default-default] [2025-06-10_12h05m01s] [crashed] Time: 00:00:01
[00:00:01] Logs: /usr/local/poudriere/data/logs/bulk/142amd64-142amd64_default-default/2025-06-10_12h05m01s
[00:00:01] Warning: (archivers/ccmix): make: "/usr/local/poudriere/ports/142amd64_default/Mk/bsd.sites.mk" line 586: Comparison with '>=' requires both operands 'g20170612' and '10' to be numeric
[00:00:01] Warning: (archivers/ccmix): make: Fatal errors encountered -- cannot continue
[00:00:01] Warning: (archivers/nevada-toolset): make: "/usr/local/poudriere/ports/142amd64_default/Mk/bsd.sites.mk" line 586: Comparison with '>=' requires both operands 'g20200815' and '10' to be numeric
[00:00:01] Warning: (archivers/nevada-toolset): make: Fatal errors encountered -- cannot continue

--- SNIP ---
Comment 1 Robert Cina 2025-06-10 13:02:57 UTC
I can confirm i am seeing similar errors using poudriere.
Comment 2 M. Voorhis 2025-06-10 14:30:49 UTC
I'm also encountering this problem, although I first noticed it as it prevented the building of the ports INDEX file (i.e., "cd /usr/ports; make index").

FWIW I'm using a fresh FreeBSD 14-STABLE and ports collection.  Removing my /etc/make.conf does not alleviate the problem.

--MCV.
Comment 3 russo 2025-06-10 14:36:27 UTC
I am also encountering this, not through poudriere, but portupgrade:

...
[Gathering depends for x11/cool-retro-term ................................ done]
make: "/usr/ports/Mk/bsd.sites.mk" line 586: String comparison operator must be either == or !=
make: Fatal errors encountered -- cannot continue
** Makefile possibly broken: x11-fonts/courier-prime:
** Please report this to the maintainer for x11-fonts/courier-prime
        make: stopped in /usr/ports/x11-fonts/courier-prime
/usr/local/sbin/portupgrade:1575:in `get_pkgname': Makefile broken (MakefileBrokenError)
...

Obviously, the problem has nothing to do with x11-fonts/courier-prime, but the use of >= that was added in the commit referenced in the original report.
Comment 4 M. Voorhis 2025-06-10 15:43:46 UTC
A comparison in bsd.sites.mk compares each port's DISTVERSION (derived from the PORTVERSION in the port's Makefile) to the numeric value of 10.

This works fine except that some ports have non-numeric values, i.e., ansible-sysrc depends on the ansible-kld port which has a DISTVERSION of "g20200803".

When I try to build (single-threaded) and INDEX file for the ports, the breakage  happens at the first non-numerically versioned item in potrs/archivers, which is  archivers/ccmix which has a PORTVERSION of "g20170612".

I'm unsure of how to compare strings in a Makefile.
Comment 5 Einar Bjarni Halldórsson 2025-06-10 15:48:50 UTC
I'm working around it by setting `IGNORE_MASTER_SITE_GNOME=1` in make.conf
Comment 6 Oleh Hushchenkov 2025-06-10 15:50:13 UTC
Commit caused this: https://cgit.freebsd.org/ports/commit/?id=a0ce779c88e46d0f5f05bd5753365344282ccd7a
Comment 7 russo 2025-06-10 16:29:31 UTC
Looks like this may have been fixed by https://cgit.freebsd.org/ports/commit/?id=afae5957dd8c841977ed9cffa3051797e4a03937
Comment 8 Einar Bjarni Halldórsson 2025-06-10 16:36:55 UTC
(In reply to russo from comment #7)

Confirmed that it's fixed, closing issue