Lintian tag: debian-rules-calls-nproc

Type: warning

Description (from lintian-explain-tags)

The debian/rules file for this package appears to use nproc to determine
the number of jobs to run in parallel during the package build. This
violates the Debian Policy, as the build must respect "parallel=N" when
passed in DEB_BUILD_OPTIONS.

To determine the number of jobs to run in parallel during the package
build, you can use the DEB_BUILD_OPTION_PARALLEL variable from
/usr/share/dpkg/buildopts.mk, which is set to the value of "N" when
"parallel=N" is passed.

include /usr/share/dpkg/buildopts.mk
NUM_CPUS=$(DEB_BUILD_OPTION_PARALLEL)

You can also use Make's addprefix to add a prefix like "-j" if the
DEB_BUILD_OPTION_PARALLEL variable is present, which can then be passed as
an argument.

Please refer to debian/rules and DEB_BUILD_OPTIONS (Section 4.9.1) in the
Debian Policy Manual for details.

Visibility: warning
Show-Always: no
Check: debian/rules

Affected packages