Bug 267134 - (D22951, D28591) loader.help is no longer installed
Summary: (D22951, D28591) loader.help is no longer installed
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 13.1-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: Mitchell Horne
URL: https://github.com/freebsd/freebsd-sr...
Keywords: loader
Depends on:
Blocks:
 
Reported: 2022-10-17 00:39 UTC by Daniel O'Connor
Modified: 2023-05-01 17:59 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel O'Connor 2022-10-17 00:39:45 UTC
The loader will read loader.help to produce detailed help, however it is built but not installed so it no longer works.

I assume it was accidentally broken earlier but I don't have a good idea when it stopped working.

I had a look to find out where the loader is installed but go lost in a twisty maze of Makefiles, all alike.
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 04:25:33 UTC
Orientation
===========

<https://github.com/freebsd/freebsd-src/commit/25c2f4cb95686fa3dc2144872abe6df2a983c608> (2017-12-18) was: 

> Move loader help file definitions to being 100% inside of loader.mk.
> 
> …

<https://github.com/freebsd/freebsd-src/blob/main/stand/loader.mk>


Related
=======

⚙ D22951 "help" loader command broken
⚙ D28591 loader: always install help files
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-02-03 20:40:15 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=8859960436f5727f163a7b3468e08710c5e6d874

commit 8859960436f5727f163a7b3468e08710c5e6d874
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2021-02-11 14:29:00 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2023-02-03 20:35:06 +0000

    loader: always install help files

    Address two issues with current help file logic:

    The existing condition prevents the common help file from being
    installed when there are no additional help files defined. This results
    in no loader.help on EFI platforms, for example.

    Second, due to the fact that we build and install multiple loader types,
    each successive install will clobber the previous loader.help. The
    result is that we could lose type-specific commands, or possibly list
    them in loaders that do not have such commands.

    Instead, give each loader type a uniquely named help file. The EFI
    loader will look for /boot/loader.help.efi, userboot will look for
    /boot/loader.help.userboot, etc. The interpreter variant has no effect
    on which help file is loaded.

    This leaves the old /boot/loader.help unused.

    Some credit for the final approach goes to Mathieu <sigsys@gmail.com>
    for their version of the fix in https://reviews.freebsd.org/D22951.

    PR:             267134
    Reported by:    Daniel O'Connor <darius@dons.net.au>
    Reviewed by:    imp
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D28591

 ObsoleteFiles.inc                |  3 +++
 stand/common/commands.c          |  4 ++--
 stand/efi/loader/Makefile        |  1 +
 stand/i386/loader/Makefile       |  1 +
 stand/kboot/Makefile             |  2 ++
 stand/loader.mk                  | 15 ++++++++++-----
 stand/powerpc/ofw/Makefile       |  1 +
 stand/uboot/Makefile             |  3 ++-
 stand/userboot/userboot/Makefile |  2 ++
 9 files changed, 24 insertions(+), 8 deletions(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-02-15 17:11:41 UTC
A commit in branch stable/13 references this bug:

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

commit a2b4abce0e30e014b2c08c0bdc34b368aa9c7a6f
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2021-02-11 14:29:00 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2023-02-15 16:44:21 +0000

    loader: always install help files

    Address two issues with current help file logic:

    The existing condition prevents the common help file from being
    installed when there are no additional help files defined. This results
    in no loader.help on EFI platforms, for example.

    Second, due to the fact that we build and install multiple loader types,
    each successive install will clobber the previous loader.help. The
    result is that we could lose type-specific commands, or possibly list
    them in loaders that do not have such commands.

    Instead, give each loader type a uniquely named help file. The EFI
    loader will look for /boot/loader.help.efi, userboot will look for
    /boot/loader.help.userboot, etc. The interpreter variant has no effect
    on which help file is loaded.

    This leaves the old /boot/loader.help unused.

    Some credit for the final approach goes to Mathieu <sigsys@gmail.com>
    for their version of the fix in https://reviews.freebsd.org/D22951.

    PR:             267134
    Reported by:    Daniel O'Connor <darius@dons.net.au>
    Reviewed by:    imp
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D28591

    (cherry picked from commit 8859960436f5727f163a7b3468e08710c5e6d874)

 ObsoleteFiles.inc                |  3 +++
 stand/common/commands.c          |  4 ++--
 stand/efi/loader/Makefile        |  1 +
 stand/i386/loader/Makefile       |  1 +
 stand/kboot/Makefile             |  2 ++
 stand/loader.mk                  | 15 ++++++++++-----
 stand/powerpc/ofw/Makefile       |  1 +
 stand/uboot/Makefile             |  3 ++-
 stand/userboot/userboot/Makefile |  2 ++
 9 files changed, 24 insertions(+), 8 deletions(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-02-23 18:11:12 UTC
A commit in branch releng/13.2 references this bug:

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

commit ac25a113775ad527a0fc4040738bfc9e43c7db4e
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2021-02-11 14:29:00 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2023-02-23 18:10:19 +0000

    loader: always install help files

    Address two issues with current help file logic:

    The existing condition prevents the common help file from being
    installed when there are no additional help files defined. This results
    in no loader.help on EFI platforms, for example.

    Second, due to the fact that we build and install multiple loader types,
    each successive install will clobber the previous loader.help. The
    result is that we could lose type-specific commands, or possibly list
    them in loaders that do not have such commands.

    Instead, give each loader type a uniquely named help file. The EFI
    loader will look for /boot/loader.help.efi, userboot will look for
    /boot/loader.help.userboot, etc. The interpreter variant has no effect
    on which help file is loaded.

    This leaves the old /boot/loader.help unused.

    Some credit for the final approach goes to Mathieu <sigsys@gmail.com>
    for their version of the fix in https://reviews.freebsd.org/D22951.

    Approved by:    re (cperciva)
    PR:             267134
    Reported by:    Daniel O'Connor <darius@dons.net.au>
    Reviewed by:    imp
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D28591

    (cherry picked from commit 8859960436f5727f163a7b3468e08710c5e6d874)
    (cherry picked from commit a2b4abce0e30e014b2c08c0bdc34b368aa9c7a6f)

 ObsoleteFiles.inc                |  3 +++
 stand/common/commands.c          |  4 ++--
 stand/efi/loader/Makefile        |  1 +
 stand/i386/loader/Makefile       |  1 +
 stand/kboot/Makefile             |  2 ++
 stand/loader.mk                  | 15 ++++++++++-----
 stand/powerpc/ofw/Makefile       |  1 +
 stand/uboot/Makefile             |  3 ++-
 stand/userboot/userboot/Makefile |  2 ++
 9 files changed, 24 insertions(+), 8 deletions(-)