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: New
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: easy, needs-qa
Depends on:
Blocks:
 
Reported: 2018-05-12 01:39 UTC by Mateusz Piotrowski
Modified: 2019-06-11 11:16 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 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 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 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.