Bug 281151 - [patch] source upgrade path broken for stable/12 to stable/13 due to bmake
Summary: [patch] source upgrade path broken for stable/12 to stable/13 due to bmake
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 13.4-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: Simon J. Gerraty
URL:
Keywords: easy, patch-ready
Depends on:
Blocks:
 
Reported: 2024-08-31 09:47 UTC by Eugene Grosbein
Modified: 2024-09-03 19:34 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Grosbein freebsd_committer freebsd_triage 2024-08-31 09:47:48 UTC
I've just tried to "make builworld WITHOUT_TESTS=" with stable/12 system to upgrade it to stable/13 and it failed:

===> usr.bin/bmake (obj)
===> usr.bin/bmake/unit-tests (obj)
make[6]: "/usr/src/usr.bin/bmake/unit-tests/Makefile" line 445: Malformed conditional (${.SHELL:T}
== "ksh")
make[6]: "/usr/src/usr.bin/bmake/unit-tests/Makefile" line 774: Malformed conditional (${.SHELL:T}
== "ksh")
make[6]: Fatal errors encountered -- cannot continue


Please consider something like the following change to respect WITHOUT_TESTS:

--- usr.bin/bmake/Makefile.orig       2024-08-31 08:37:49.762012000 +0000
+++ usr.bin/bmake/Makefile    2024-08-31 09:38:30.244280000 +0000
@@ -87,7 +87,8 @@
 .PATH: ${srcdir}

 .if make(obj) || make(clean)
-SUBDIR+= unit-tests
+HAS_TESTS=
+SUBDIR.${MK_TESTS}+=   unit-tests
 .endif
Comment 1 Simon J. Gerraty freebsd_committer freebsd_triage 2024-09-01 02:28:51 UTC
I don't see how HAS_TESTS is relevant?
Absent that, this change would be easy to make.
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-09-01 06:29:45 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=2d203f534baef0568989555ebd26278134ef4c6b

commit 2d203f534baef0568989555ebd26278134ef4c6b
Author:     Simon J. Gerraty <sjg@FreeBSD.org>
AuthorDate: 2024-09-01 06:29:19 +0000
Commit:     Simon J. Gerraty <sjg@FreeBSD.org>
CommitDate: 2024-09-01 06:29:19 +0000

    bmake/unit-tests/Makefile use _shell

    Set _shell like later versions of bmake so that .SHELL
    does not appear in conditionals.

    This avoids errors when an older version of bmake parses this makefile
    such as when doing src upgrade from stable/12 or older.

    Direct commit to stable/13 since this is the only branch where
    this issue arrises.

    PR:             281151

 usr.bin/bmake/unit-tests/Makefile | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2024-09-03 19:34:40 UTC
^Triage: assign to committer who resolved.