Bug 228187 - devel/ccache: /usr/local/share/doc/ccache/ccache-howto-freebsd.txt seems outdated
Summary: devel/ccache: /usr/local/share/doc/ccache/ccache-howto-freebsd.txt seems outd...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Bryan Drewery
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2018-05-12 01:39 UTC by Mateusz Piotrowski
Modified: 2021-07-12 19:48 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (bdrewery)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mateusz Piotrowski freebsd_committer freebsd_triage 2018-05-12 01:39:51 UTC
/usr/local/share/doc/ccache/ccache-howto-freebsd.txt has the following information:

> To use ccache for ports, just add WITH_CCACHE_BUILD=yes to
> /etc/make.conf. The rest of this guide is for building
> /usr/src and other checkouts.
> 
> To use ccache for base (11.0+) just add WITH_CCACHE_BUILD=yes
> to /etc/src.conf.  Refer to src.conf(5) for more information.

It sounds like /etc/make.conf is for ports and /etc/src.conf is for things like world and kernel whereas it is not entirely true as ports do pull /etc/src.conf, don't they?

The only reference to this behavior I could find was removed in this revision[1]. There's also this comment[2], which points to an email[3] saying that ports use /etc/src.conf as well.

Should we update it?

[1]: https://reviews.freebsd.org/D15238
[2]: https://reviews.freebsd.org/D15177#322986
[3]: https://lists.freebsd.org/pipermail/freebsd-current/2018-May/069300.html
Comment 1 Bryan Drewery freebsd_committer freebsd_triage 2018-06-26 19:57:40 UTC
(In reply to Mateusz Piotrowski from comment #0)
> /usr/local/share/doc/ccache/ccache-howto-freebsd.txt has the following
> information:
> 
> > To use ccache for ports, just add WITH_CCACHE_BUILD=yes to
> > /etc/make.conf. The rest of this guide is for building
> > /usr/src and other checkouts.
> > 
> > To use ccache for base (11.0+) just add WITH_CCACHE_BUILD=yes
> > to /etc/src.conf.  Refer to src.conf(5) for more information.
> 
> It sounds like /etc/make.conf is for ports and /etc/src.conf is for things
> like world and kernel whereas it is not entirely true as ports do pull
> /etc/src.conf, don't they?
> 
> The only reference to this behavior I could find was removed in this
> revision[1]. There's also this comment[2], which points to an email[3]
> saying that ports use /etc/src.conf as well.
> 
> Should we update it?
> 
> [1]: https://reviews.freebsd.org/D15238
> [2]: https://reviews.freebsd.org/D15177#322986
> [3]: https://lists.freebsd.org/pipermail/freebsd-current/2018-May/069300.html

Ports should NOT be pulling in src.conf. If it is that's a bug that needs
to be fixed, not documented as a feature.
Comment 2 Lorenzo Salvadore freebsd_committer freebsd_triage 2019-06-11 11:16:10 UTC
I am using FreeBSD 12.0-STABLE r348603 and I also disagree with those lines, but in a different way.

It seems to me that the situation is as following:

- if WITH_CCACHE_BUILD=yes is in make.conf, ccache will be used both for ports and for src, while the how-to says it would be used only for ports; it can be checked with make -V CC into /usr/src that will report ccache is used (the same command in /usr/ports will never report ccache is used, but it is, I tested);

- if WITH_CCACHE_BUILD=yes is in make.conf and WITHOUT_CCACHE_BUILD=no is in src.conf, then ccache will be used only for ports; again, this can be tested for src with make -V CC;

- if WITH_CCACHE_BUILD=yes is in src.conf but not in make.conf I guess ccache would be used only for src, but I have not tested.

I add that I have not found any documentation about WITHOUT_CCACHE_BUILD anywhere, not even in man src.conf: I just luckily guess its existence.
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-11 02:23:28 UTC
^Triage: Have the notes/docs been updated since the original report and are they still an issue? If so, please detail to relevent lines and/or provide proposed patches with rationale
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-07-12 19:48:51 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6feaf49e01d6dd6592a740c6d254b235e7f23860

commit 6feaf49e01d6dd6592a740c6d254b235e7f23860
Author:     Bryan Drewery <bdrewery@FreeBSD.org>
AuthorDate: 2021-07-12 19:47:55 +0000
Commit:     Bryan Drewery <bdrewery@FreeBSD.org>
CommitDate: 2021-07-12 19:47:55 +0000

    devel/ccache*: Clarify WITH_CCACHE_BUILD=yes usage.

    PR:     228187

 devel/ccache-memcached/Makefile                          | 2 +-
 devel/ccache-memcached/files/ccache-howto-freebsd.txt.in | 5 ++---
 devel/ccache/Makefile                                    | 2 +-
 devel/ccache/files/ccache-howto-freebsd.txt.in           | 5 ++---
 4 files changed, 6 insertions(+), 8 deletions(-)