Bug 266604 - Spurious deletion of /bin/rmail
Summary: Spurious deletion of /bin/rmail
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 13.1-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: Dmitry Chagin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-25 14:53 UTC by Philippe Michel
Modified: 2023-01-29 18:44 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 Philippe Michel 2022-09-25 14:53:02 UTC
When WITH_SENDMAIL is false, make delete-old wants to delete /bin/rmail via an entry in OptionalObsoleteFiles.inc.

But this file may have been installed by WITH_MAILWRAPPER or WITH_DMAGENT (I didn't try to investigate possible logical relationships between all these variables).

/bin/rmail should probably only be removed if the above variables are all false.
Comment 1 commit-hook freebsd_committer freebsd_triage 2022-10-04 15:50:23 UTC
A commit in branch stable/13 references this bug:

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

commit 6d2cfa2d34e3ade155f65066f25716dc734ac302
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2022-07-21 22:20:25 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2022-10-04 15:48:27 +0000

    check/delete-old: Fix /bin/rmail removal condition

    When WITHOUT_SENDMAIL is enabled and WITHOUT_MAILWRAPPER is disabled
    we install /bin/rmail as a link to the /usr/sbin/mailwrapper.
    Ensure make delete-old does not unlink /bin/rmail in that case.

    PR:                     266604
    Reviewed by:            emaste
    Differential Revision:  https://reviews.freebsd.org/D35874
    MFC after:              2 weeks

    (cherry picked from commit 55736146389f997fe3e2453f1d48d96ff1ad5b7a)

 tools/build/mk/OptionalObsoleteFiles.inc | 2 ++
 1 file changed, 2 insertions(+)
Comment 2 Dmitry Chagin freebsd_committer freebsd_triage 2023-01-29 18:44:03 UTC
fixed in my POV