Skip to content

Commit 8edb1f8

Browse files
committed
Set _smp_build_ncpus to work around issue #1956
This is necessary for cases where someone sets the architecture to something rpmbuild doesn't know about (like the fpm test suite uses "fancypants").
1 parent 69d71dd commit 8edb1f8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/fpm/package/rpm.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,9 @@ def output(output_path)
455455
%w(BUILD BUILDROOT RPMS SRPMS SOURCES SPECS).each { |d| FileUtils.mkdir_p(build_path(d)) }
456456
args = ["rpmbuild", "-ba"]
457457

458+
# Workaround rpm#2265 in case we've specified an unexpected architecture name
459+
args += [ "--define", "_smp_build_ncpus 1" ]
460+
458461
if %x{uname -m}.chomp != self.architecture
459462
rpm_target = self.architecture
460463
end

0 commit comments

Comments
 (0)