Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Oct 2023 03:33:45 -0700
From:      "Edward Sanford Sutton, III" <mirror176@hotmail.com>
To:        ports@freebsd.org
Subject:   Re: We need to do something about build times
Message-ID:  <CO1PR11MB4770ACE5D604A023AD4CB0BAE6A1A@CO1PR11MB4770.namprd11.prod.outlook.com>
In-Reply-To: <SI2PR01MB50364FD3D9CC18702AB1F175FAA1A@SI2PR01MB5036.apcprd01.prod.exchangelabs.com>
References:  <c35b5dea9d6a810c1e051d620534fa67@mail.infomaniak.com> <SI2PR01MB50364FD3D9CC18702AB1F175FAA1A@SI2PR01MB5036.apcprd01.prod.exchangelabs.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10/29/23 21:39, Tatsuki Makino wrote:
> Daniel Engberg wrote on 2023/10/28 17:48:
>> If upstream uses GNU Autotools, use upstream release archives as they
>> usually contains a configure script ready to run which means that you
>> can avoid USES= autoreconf which is slow and adds unncessary
>> dependencies.
> 
> This has the following problem
> 
> Apply patches to {configure.ac,Makefile.am} and run autoreconf
>    versus
> Apply patches to {configure,Makefile.in} and run ./configure immediately
> 
> Incidentally, some ports (e.g. security/heimdal*) do not know which it is.

   I agree that some ports use autoreconf out of need instead of just 
want. By the time a 'download release archive' step just to get files to 
skip autoreconf is used, the release file should be used start to 
finish. Some ports benefit from following nonrelease versions while some 
projects have not released a release version that can be used.
   I thought there was a way to get performance improvements by creating 
a config.h before the tools are ran which will skip some checks when it 
contains values of some of those checks. It can be handy to avoid 
certain redundant tests; my machine will not change between big and 
little endian anytime soon, nor will my FreeBSD install become Linux or 
OSX anytime soon. If a port depends on another port, some values will 
always be populated by that dependency. Trying to autopopulate such data 
becomes harder when considering multiple versions due to dependency 
choices, mixing packages from different ports tree versions, and 
customized tests.

>> If dependencies are unbundled you can save I/O and processing time by
>> not extracting.
>>
>> Example:
>> https://cgit.freebsd.org/ports/tree/net-mgmt/netdata/Makefile#n32
> 
> With -X (or --exclude-from) of tar, a list of unwanted files can be made into a file.
> If the file is subject to SUB_FILES, the options also allow selection of unnecessary files.
> ... I have thought about this for a moment.
> It was impossible because the timing when SUB_FILES is extracted is much later than when it is possible to do so.

   Thought there was a way but wasn't finding it in the handbook so 
thank you. Mk/bsd.port.mk had that and similar variables noted. Now I 
was able to add a string of exclusions to a port I was working on which 
brings its own bundled copies of many things where before I was using an 
{RM} in "post-extract:' section, though I guess that particular work 
only matters if I succeed at porting that program which I got stuck on.
   It would be nice if this was documented in the porter's handbook. It 
could also serve additional benefit when options are changed for some 
ports but would become much harder to determine when appropriate if not 
familiar with the whole program + its build system. An overlooked area 
of easy possible gain would be not extracting documents when DOC (minor 
benefit) and NLS (major benefit for some) options are not enabled.
   Any idea if extraction speed is increased if skipping content? I know 
7-zip in Windows skips blocks of archives entirely when there is no 
requested data remaining in each block.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CO1PR11MB4770ACE5D604A023AD4CB0BAE6A1A>