[tbb-dev] buildconf/num_procs inside RBM.pm?

David Fifield david at bamsoftware.com
Mon Jul 26 16:36:55 UTC 2021

On Mon, Jul 26, 2021 at 09:51:20AM +0200, Nicolas Vigier wrote:
> Yes, rbm doesn't know about buildconf/num_procs or anything in
> buildconf/*, it's only used in tor-browser-build.
> We usually use the following prefixes:
> - var/ for options used by tor-browser-build only (but not by rbm)
> - buildconf/ for options used by tor-browser-build only, that the user
>   can change in rbm.local.conf, and that we reset when computing
>   `var/build_id`, so that changing this option does not change the build
>   ids (which would cause everything to be rebuilt)
> - no prefix for the options used by rbm itself
> I think we can add support for a `git_opt` option, that rbm would use
> in all git commands. And then we would be able to add this line to
> rbm.conf:
>   git_opt: '--config pack.thread=[% c("buildconf/num_procs") %]'

Thanks, this makes sense. The multi-thread clone is only a minor
optimization, compared to the time needed to build, so it is probably
not worth adding another option just for this.

> > rbm.conf passes a buildconf.num_procs hash into the "c" function when
> > computing the build_id, but I was not able to find where it might be
> > used in the template expansion.
> > 	build_id: '[% sha256(c("var/build_id_txt", { buildconf => { num_procs => 4 } })).substr(0, 6) %]'
> > https://gitweb.torproject.org/builders/tor-browser-build.git/tree/rbm.conf?h=tbb-10.5.3-build1#n73
> var/build_id is used to compute a hash representing a build, based on
> its input files, git commit, container used, and build files. In some of
> the build files we use buildconf/num_procs, but we don't really want the
> hash to change when we change buildconf/num_procs, as it's not supposed
> to affect the output, so we override it in var/build_id.

Thanks, I understand now.

More information about the tbb-dev mailing list